Banking & Financial Audits through parallel computing DPC++ ( Process Millions of records in seconds)

1 0
  • 0 Collaborators

Design scalable and flexible parallel data processing and audit systems with Intel DPC++. We show you how you can utilize DPC++ to efficiently process millions of records in parallel in under 60 seconds . For Auditing interest paid to each user based on the users dynamic account balances . ...learn more

Project status: Published/In Market

oneAPI

Intel Technologies
DPC++

Code Samples [1]

Overview / Usage

This article will show how you can utilize DPC++ In Banks and Financial Institutions to perform quicker audits of accounts.

Enabling you to run interest calculations on 1 million records in 4 seconds giving your organization a significant boost in conducting audit operations.

Introduction:

Banking , Finance , Retail , corporate's and even you ,.

We all every year at some point in time have to engage in data processing and time consuming audits.

Often this is to settle ,balance and keep track of accounts and records.

While processing your records and data on a small scale manually is achievable , it is time consuming and labor intensive.

But what happens if you need to process big data and do audit's in larger organizations which have hundreds of thousands to millions of records ?

Lets take a Banking situation or a money transfer situation or a money lending situation as an example where some form of dynamic computation is required on large or very big datasets for audit purposes:

Banking Scenario:

Imagine that you are a bank and you have over 500 thousand to a 1 million customers who have bank accounts with you, where each individual account holder has a different amount of bank balance .

You can Imagine the amount of time it will take to process and audit your customers records monthly or weekly or daily and not to mention the number of additional staff, VDI & server equipment and software licenses that you would need to cater for the data processing and auditing workload .

As a Bank every month you pay out variable interest to the account holders based on the money they have in there respective bank accounts .

0.01% for balances from $1.00 upto $50,000

0.02% for balances from $50,001 upto $100,000

0.03% for balances from $100,001 upto $400,000

0.04% for balances from $400,001 upto $700,000

0.05% for balances from $700,001 upto $1000,000 .

As you can see transitioning from a managing and auditing a lower subset of users to managing of a higher number of users accounts would be very time consuming and labor intensive .

So How do organizations currently go about managing and auditing accounts now ?

Small Organizations:

The most common option used for small to medium organization is Manual processing via spreadsheets .

You can imagine if you were to manually process this records using manual labor and opened 1 million records in your spread sheet to do the calculations what would happen to the spread sheet (Probably stop responding and crash or may take a long time to process ) to avoid this you would have to divide the file in smaller chunks and higher more workers to work on each file at the same time, this would be a time consuming process.

Medium to Large Organizations:

For Medium to large scale organizations they purchase specialized hardware and software to conduct structured queries, Often these are Licensed products which require extensive training , specialized workers and paying for licenses and or equipment . Most common solutions are proprietary and operate non parallel for computations , leaving room for further improvements.

So how do we solve for this problems or make existing situations more better ?

The answer is through Intel's data parallel++ platform and One API.

You can build tool's and software that compliment your workforce by offloading labor intensive tasks such as searching , collecting ,collating ,tallying ,grouping and organizing data and calculating figures to a computer.

When you have labor intensive tasks out of the way that your computer can process for you , you can spend more time on making better sense of your data .

This in turn allows you to deliver quicker services , higher quality results and drive innovative and well informed financial decisions in record breaking times within your business..

With Intel's DPC ++ platform and our solution we solve problems such as :

  1. Making Computation affordable and more accessible
  2. Maximizing full use of your equipment for processing using multiple GPU , CPU and FPGA devices.
  3. Reducing the work load on your workers by offloading data processing tasks to the computer.
  4. Allowing for better analysis of your data and quicker and better business decisions by reducing the processing time allowing you to spend less time on processing and becoming tired and more time on analysis and productivity.
  5. Reducing operational and overhead costs .

With Intel's dpc++ you can do things bigger , better , quicker and achieving higher standards with greater enhanced quality.

Methodology / Approach

We demonstrate speed of calculating simple interest on user bank account balance using parallel processing for the purposes of financial auditing .

Our Method follows the below simplified process :

Identification Stage

  1. Find a time consuming or slow labor intensive process

  2. Identify tasks that can be offloaded to the computer

  3. Determine the type of device suitable for the job CPU , GPU or FPGA

Demo Data Collection Stage

  1. We take single column of customer account balances as our input data.

  2. For the purpose of this demo we assume bank balances are already sorted in ascending order

  3. For the purpose of this demo we assume customer account id is same as the incrementor index id

Programming Stage

  1. We include required header files

  2. Declare relevant namespaces

  3. Define variables and determine datatypes

  4. Select a device for processing CPU ,GPU or FPGA . In our case we utilize the CPU device for parallel processing

  5. Load data for processing into an memory.

  6. Allocate a shared memory space for our arrays using malloc_shared()

  7. Initiate parallel processing through parallel_for()

  8. Define our conditional simple interest calculation algorithm

  9. Collect the results of our parallelly processed algorithm and populate our shared arrays.

  10. Once parallel computations are complete we output the results to a text file that can be than used by the auditor or user to perform random sampling based comparison checks against the interest that was supposed to be processed against what the bank actually processed per account .

This allows for a lot of future innovation and development, such as automating the process of checking records for inconsistencies or fraud specially when data processing times are this quick.

Allowing Businesses to step up there game and increase the speed, frequency and accuracy of there internal audits to prevent fraud and overall have a faster delivery of service.

Cross architecture compatibility:

This code can run both on CPU or GPU architectures as per below..

If you select a GPU device than Device: Intel(R) Graphics Gen9 [0x3e96] which supports (double) will process in 3 to 6 seconds for this tutorial

 queue q(gpu\_selector{});

if you select a CPU device than Device: Intel(R) Xeon(R) E-2176G CPU @ 3.70GHz will process in 5 to 9 seconds for this tutorial

 queue q(=gpu\_selector{});

Data processing time is always subject to how you load the data and which device you use.

Usage instructions :

You can find the code at our github repository mentioned below in the article.

Copy the entire structure including all files to Intel dev cloud .

Ensure that the Python 3.7 (Intel OneApi) kernal is running

Ensure that you are using the q file ,run_audit.sh and Makefile that is provided with this sourcecode.

Ensure that file exist in lab/simple_interest_audit.cpp

Run the following jupyter notebook Interest-on-account-audit-onemillion_records.ipynb

Than Run the following command
! chmod 755 q; chmod 755 run\\_audit.sh;if [ -x "$(command -v qsub)" ]; then ./q run\\_audit.sh; else ./run\\_audit.sh; fi

On successfull run you would have processed simple interest calculations on One million records at around 4 to 6 seconds This same calculation in php or msql will take ages to complete.

You should be able to download the file containing the out put from the left hand side in jupyter notebook named parallel_interest_on_account_audit.txt containing 1 million records at around 180 mb .

**DPC++ Development Experience **

If you come from a php and js back ground and are developing an application from scratch you will love dpc for its speed .and flexibility as it allowed us to code both on the cloud using intel's dev cloud in jupyter notebook and locally on our computer using Microsoft visual studio . Dpc is great there are alot of examples and lots of community support ,There are no drawbacks apart from having to go through the api and knowledgebase to find the information that you need and trying to understand certain concepts such as learning about accessor's ,shared memory spaces and how to use external header files and call there functions from within the kernel .

We had great fun developing this application and innovatively took dpc from the normal vector examples towards Banking and Finance to innovatively reduce processing and calculation times for audit processing. Developing with dpc allows for your application to be able to run both on the windows and Linux architecture or even the cloud.

Technologies Used

We use Intel's One API , DPC and Intel's DPC in Jupyter lab .

What is One Api:

One API is an open, unified programming model built on standards to simplify development and deployment of data-centric workloads across CPUs, GPUs, FPGAs and other accelerators.

-You can find out more information about One API here https://software.intel.com/content/www/us/en/develop/tools/oneapi.html

What is DPC++ :

DPC = ISO C and Khronos SYCL* and community extensions

Allows for parallel processing using CPU ,GPU and FPGA devices. -You can find out more information about DPC++ here https://software.intel.com/content/www/us/en/develop/tools/oneapi/data-parallel-c-plus-plus.html

Repository

https://github.com/prilcool/Intel-devmesh-codeproject-one

Comments (0)