AI/ML based Card Payment Fraud Detection on AWS using replicated data from mainframe
Summary
TLDRこのビデオでは、AWS上でAIMLベースのカード詐欺検出ソリューションを構築する方法を紹介します。ZOSメインフレーム上のカード支払い承認アプリケーションは、静的なビジネスルールを使って取引を承認または拒否します。レガシーアプリケーションは、AWSにリアルタイムでアクセスしてAmazon詐欺検出サービスまたはSageMakerで構築された他のAIMLモデルによって詐欺スコアを生成するように強化されています。モデルは、過去48時間の顧客購入履歴や過去24時間の売主販売履歴などの属性でトレーニングされています。スコアの推論中に同じ属性がモデルに渡され、最適なスコアを生成します。ソリューションアーキテクチャは、顧客がターミナルでカードをスワイプしたりオンラインで購入したりすると、銀行はメインフレームシステムで承認リクエストを受け取り、アプリケーションはAWSにリアルタイムでアクセスしてAIMLスコアリングモデルに顧客と売主の履歴を提供します。高いスコアは潜在的な詐欺取引を示します。メインフレームアプリケーションは他のビジネスルールと組み合わせて取引を承認または拒否する決定を行います。詳細はメインフレームデータベースに挿入され、ほぼリアルタイムでAWSに適用されます。
Takeaways
- 😀 ビデオではAWS上でAIMLベースのカード詐欺検出ソリューションの構築方法を紹介しています。
- 🏢 既存のZOSメインフレーム上のカード支払い承認アプリケーションは静的なビジネスルールを使用してトランザクションを承認または拒否します。
- 🔄 レガシーアプリケーションはAWSにリアルタイムで詐欺スコアを取得するための呼び出しを行い、Amazon Fraud DetectorサービスまたはSageMakerで構築された他のAIMLモデルによって強化されています。
- 🛍️ モデルは過去48時間の顧客の購入履歴や過去24時間における販売者の売上履歴などの属性を使用してトレーニングされています。
- 📊 スコア推定の際には、同様の属性がモデルに渡され、最適なスコアを生成します。
- 💳 カードをターミナルでスワイプしたりオンラインで購入をした場合、銀行のメインフレームシステムは承認リクエストを受け取り、AWSへのリアルタイム呼び出しを行います。
- 🔎 AWS上で動作するプロセスはリレーショナルデータベースから顧客および商人の履歴詳細を取得し、AIMLスコアリングモデルに提供します。
- ✅ 高いスコアは潜在的な不正取引を示し、メインフレームアプリケーションは他のビジネスルールと組み合わせてトランザクションを承認または拒否する決定を行います。
- 🔄 詳細はメインフレームデータベースに挿入され、Precisely Publisher AgentとApply Agentを使用してほぼリアルタイムでAWSにレプリケートされます。
- 📚 S3上でオフラインでAIMLモデルをトレーニングするために使用されるデータは、MSKからストリーミングされます。
- 📈 Amazon Redshiftを使用してビジネスユーザーは自然言語でクエリを実行し、ビジネスインサイトを得ることができます。
Q & A
AWS上で構築されたカード詐欺検出ソリューションの主な目的は何ですか?
-AWS上で構築されたカード詐欺検出ソリューションは、リアルタイムでAmazon Fraud Detectorサービスまたは他のAI/MLモデルを使用して詐欺スコアを生成し、カード支払い承認アプリケーションを強化するものです。
レガシーアプリケーションはどのようにしてAI/MLモデルと連携していますか?
-レガシーアプリケーションはリアルタイムでAWSにコールを行い、AI/MLモデルから詐欺スコアを取得します。これにより、ビジネスルールと組み合わせて取引の承認または拒否の決定を下します。
モデルはどのような属性を使用してトレーニングされていますか?
-モデルは顧客の購入履歴(過去48時間の購入回数など)や商人の販売履歴(過去24時間の報告された詐欺など)などの属性を使用してトレーニングされています。
メインフレームアプリケーションはどのようにしてAWSと通信していますか?
-メインフレームアプリケーションはリアルタイムでAWSにコールをかけ、AWS上で実行されているプロセスはリレーショナルデータベースから顧客と商人の履歴詳細を取得し、AIMLスコアリングモデルに提供します。
どのようなAWSリソースが作成され使用されていますか?
-作成されたAWSリソースには、VPC、サブネット、プライベートリンクエンドポイント、MSKクラスター、RDSポスターデータベースインスタンス、Lambda関数、SNSトピックなどがあります。
Precisely Publisher AgentとApply Agentはどのような役割を持っていますか?
-Precisely Publisher Agentはメインフレーム上で動作し、データベースの変更をキャプチャしてMSKに配信します。Apply AgentはAmazon EC2インスタンス上で動作し、MSKからの生データベースログをコピーブックを使用してJSON形式に変換し、Amazon Managed Streaming for Kafkaに配信します。
データはどのようにしてAmazon S3にストリーミングされるのですか?
-MSKからAmazon S3にデータをストリーミングするために、Firehoseを使用してコードなしで統合しています。
Amazon Redshiftを使用して自然言語でクエリを実行することはどのように行われますか?
-Amazon RedshiftのGenerative SQLを使用すると、自然言語で記述されたクエリを実行できます。Redshiftは大きな言語モデルを活用して、自然言語の要求を理解し、データベースを検索してSQLクエリを生成します。
AWS CloudFormationテンプレートを使用する利点は何ですか?
-AWS CloudFormationテンプレートを使用することで、VPC、サブネット、IAMロールなどのAWSリソースの事前構築を簡素化し、迅速にデプロイすることができます。
メインフレームからのデータレプリケーションソフトウェアをどのように取得しますか?
-AWS MarketplaceからPrecisely社のデータレプリケーションソフトウェアを取得し、購読の指示に従って設定します。
メインフレームとEC2インスタンスを接続するために必要な手順はどのようなものでしょうか?
-メインフレームとEC2インスタンスを接続するためには、まずメインフレーム上で公開キーファイルを設定し、次にEC2インスタンス上で必要なソフトウェアをインストールし、最後にPreciselyの設定スクリプトを実行して接続を確立します。
Outlines
😀 AWS上のAIMLベースカード詐欺検出ソリューションの構築
このビデオでは、AWS上でAIML(人工知能マシンラーニング)を使用したカード詐欺検出ソリューションの構築方法を紹介します。ZOSメインフレーム上のカード支払い承認アプリケーションは、静的なビジネスルールを使って取引を承認または拒否します。レガシーアプリケーションは、AWSにリアルタイムでアクセスしてAmazon Fraud DetectorサービスまたはSageMakerで構築された他のAIMLモデルから詐欺スコアを生成するように強化されています。モデルは、過去48時間の顧客購入履歴や過去24時間の販売者売上履歴などの属性でトレーニングされ、推論時に同じ属性がモデルに渡されて最適なスコアを生成します。ソリューションアーキテクチャでは、顧客がカードをターミナルでスワイプしたりオンラインで購入をしたりすると、銀行はメインフレームシステム上で承認リクエストを受け取り、アプリケーションはAWSにリアルタイムでアクセスして顧客と販売者の履歴を取得し、AIMLスコアリングモデルに提供します。高いスコアは潜在的な詐欺取引を示し、メインフレームアプリケーションは他のビジネスルールと組み合わせて取引を承認または拒否します。詳細はメインフレームデータベースに記録され、Amazon EC2インスタンス上で実行されるApply AgentによってAWSにほぼリアルタイムで反映されます。
🛠️ AWSリソースの設定とメインフレームとの統合
この段落では、AWS上で作成されたリソースとメインフレームとの統合について説明しています。AWS Marketplaceからメインフレームデータレプリケーションソフトウェアを取得し、Amazon EC2インスタンスを設定します。EC2インスタンスは、Kafka、SQLクライアント、IAMロールなどの必要なソフトウェアをインストールし、MSK(Amazon Managed Streaming for Apache Kafka)との通信に使用されるJavaライブラリをダウンロードして設定します。また、メインフレーム上で設定されるPrecisely(データレプリケーションツール)の認証に必要な公開鍵と秘密鍵を作成し、メインフレームにコピーします。メインフレーム上でカード支払い承認履歴がVSAMデータベースに保存されている場合、そのデータベースから変更ログを取得し、MSKに公開します。
🚀 MSK、S3、SNSとの統合とデータパイプラインの設定
このセクションでは、MSK、S3、SNSとの統合とデータパイプラインの設定方法について説明しています。MSKとS3の間のデータ配信を設定し、EventBridgeパイプを使用してSNSとの統合を行います。MSKからS3にデータを配信し、Lambda関数を使用してMSKからRDS(Relational Database Service)にデータを挿入します。さらに、EventBridgeパイプを設定して、MSKからSNSにメッセージをストリーミングし、メール通知を送信します。これらの設定により、リアルタイムのデータストリーミングと分析が可能になります。
🔍 Redshiftを使用した自然言語でのクエリと詐欺検出のデモンストレーション
最後の段落では、Redshiftを使用して自然言語でデータベースクエリを実行し、ビジネス洞察を提供する方法を紹介しています。RedshiftのGenerative SQL機能を使用して、自然言語で書かれた質問に応じてSQLクエリを生成し、データから洞察を引き出します。また、デモンストレーションでは、VSAMデータベースにレコードを挿入し、それがMSKを経由してRDSに反映される様子を見ることができます。さらに、S3に格納されたデータを使用してAIMLモデルをトレーニングし、詐欺検出ソリューションを強化する方法も説明されています。
Mindmap
Keywords
💡AIML
💡AWS
💡カード詐欺検出
💡リアルタイム
💡SagMaker
💡Amazon Fraud Detector service
💡Mainframe
💡Relational Database
💡Amazon S3
💡Amazon Redshift
Highlights
展示如何在AWS上构建基于AIML的信用卡欺诈检测解决方案。
信用卡支付授权应用程序在ZOS大型机系统上运行,并使用静态业务规则来批准或拒绝交易。
通过AWS实时调用,使用Amazon Fraud Detection Service或其他任何使用SageMaker构建的AIML模型生成欺诈分数。
模型使用诸如客户购买历史和商家销售历史等属性进行训练。
在分数推理期间,相同的属性被传递到模型以生成最佳分数。
当客户刷卡或在线购物时,银行将在大型机系统上接收授权请求。
AWS上的应用程序将获取客户和商家历史详细信息,并提供给AIML评分模型。
较高的分数将表明潜在的欺诈交易。
大型机应用程序结合其他业务规则将决定批准或拒绝交易。
详细信息被插入到大型机数据库中,例如VSAM、DB2或IMS。
记录将被捕获并实时使用精确发布者代理重新应用到AWS。
精确发布者代理在大型机上运行,应用代理在Amazon EC2实例上运行。
应用代理将原始数据库日志转换为JSON格式,并发布消息到Amazon管理的流媒体服务。
消息将从MSK流式传输到Amazon S3,数据将用于离线训练AIML模型。
MSK的消息可以被拉取到Amazon Redshift,业务用户可以使用自然语言运行查询。
演示中创建了几个AWS资源,其中一些是使用CloudFormation模板预构建的。
从AWS Marketplace获取大型机数据复制软件。
设置Amazon EC2实例并安装精确软件。
在大型机上安装精确软件并配置发布者作业。
创建RDS Postgres表并验证表结构。
设置MSK S3交付通过Firehose和与SNS的集成通过EventBridge管道。
启动应用引擎并在VSAM数据库中插入一些记录。
使用Redshift的生成SQL以自然语言查询数据。
GitHub上提供了构建欺诈检测部分的代码示例。
Transcripts
in this video we are going to show you
how you can build an AIML based card
fraud detection Solution on
AWS in this use case the card payment
authorization application is running on
zos mainframe system and using static
business rules to approve or decline the
Legacy application is enhanced to make a
real-time call to AWS to get a fraud
score generated by Amazon fraud
detection service or any other AIML
model built using sag maker the model is
trained with attributes such as as
customer purchase history for example
number of purchases in last 48 hours and
Merchant sales history for example
reported frauds in last 2 24 hours
during inference of the score same
attributes are passed to the model to
generate optimal
score let us review the solution
architecture when a customer swipes a
card at Terminal or makes an online
purchase the bank will receive the
authorization request on the mainframe
system the application will make a
real-time call to AWS the process
running on AWS will get the customer and
Merchant history details from relational
database and provide to the AIML scoring
model running on say Amazon fraud
Detector service the model will return a
score higher score will indicate
potential fraudulent transaction the
Mainframe application combining with the
other business rule will make a decision
to approve or decline the transaction
detail is inserted on Mainframe database
either vsam db2 or IMS the record will
be captured and rep applicated to AWS
near real time using precisely the
precisely publisher agent is running on
Mainframe and the apply agent is running
on an Amazon ec2 instance the apply
agent converts raw database logs
received from publisher agent to Json
format using the copy book and publishes
the messages to Amazon managed streaming
for cofco or msk several service will
consume the message from msk a kovka
connect process can pull the messages
from msk and write to RDS database the
history detail details are read from
same database during the scoring process
MSG will stream the messages to Amazon
S3 using no code integration with fire
hose the data on S3 will be used offline
to train the AIML models along with
other internal or external data sources
for analytics and business intelligence
the messages from msk can be pulled to
Amazon red shift business users can run
query against the database using natural
language similarly other integration may
be built using Amazon event Bridge pipe
to stream data to services like Amazon
SNS or pinpoint for notification and
alerting in this demonstration there are
several AWS resources created some of
them are pre-built using cloud formation
template this includes VPC subnets I am
roles AWS Key Management Service
Etc on AWS console we can see there is a
VPC created with three
subnets private link end points are
created for access to seress services
such as secret manager STS event Bridge
pipes
Etc a msk cluster is defined in the VPC
with three Brokers and three different
subnets both I am and sasl a
password-based authentication is
enabled the credentials are stored in
secret manager the bootstrap servers
detail for both IM and sasl
authentication types are available in
client
information RDS posters database
instance would DB name as card payments
fraud a Lambda function is created to
pull the messages from msk and insert
RDS posters
database the function will be running in
the same VPC
the environment variables are set for
RDS database connection
details a SNS topic messages from msk
will be streamed to SNS using an event
Bridge pipe the SNS topic is configured
to send email notification first we are
going to obtain the Mainframe data
replication software from Marketplace
from AWS console search for
Marketplace click discover products
type AWS Mainframe migration with
precisely on search
bar click on data replication for IBM
zos then click continue to subscribe
button follow the instructions to
complete subscription next we are going
to set up the amazon ec2 instance once
you have completed the subscription come
back to AWS Marketplace console and
click manage subscriptions then click
launch new instance click continue to
launch through
ec2 provide a name for the ec2
instance scroll down to network settings
and click
edit select the VPC created for this
solution select one of the
subnet click on select existing Security
Group and from the drop down on common
Security Group select the security group
created for the
solution expand the advanced details and
click existing I am roll and select
instance profile created by cloud
formation paste the script in the user
data text box the script first installs
the required software such as Liber
kofka poster SQL client Etc then it
creates a Kafka folder downloads and
extracts the Java Kafka libraries inside
the Kafka Libs folder downloads the msk
am jar file it creates an I am
authentication client properties file
the jar and the properties file are used
by the javascripts runs the kofka topic
script to create the kofka topic
precisely publisher will publish the
records to this topic then runs the
kofka consumer group script to create a
consumer group to be used later by the
even Bridge pipe andc broker details
have to be passed as one of the
parameter for the scripts next it
creates a precisely folder and then the
sasl producer configuration file for
precisely sets the path variable to
include precisely B directory and runs
the school key gen command to create the
private and public key file for
precisely the content of the public key
file has to be copied to main frame and
added in key file for demon for
authentication click launch instance to
launch a new ec2 instance with precisely
software installed next click on the
instance ID to open the details page for
the ec2 created click the connect
[Music]
button type ec2 user for
username then click connect
this will open the ec2 command line the
ec2 user data script created the public
private key files for precisely the
naacl directory contains the public key
file to be copied to
Mainframe the software agent folder
contains software components to be
installed on Mainframe is zip file a
system administrator access is required
to install the software log into the
main frame in this use case we
considered the card payments
authorization history is stored in a
vsam
database the screen shows the Cobalt
copy Book used to define the layout of
the message the precisely software is
already installed and UI is available
using the ispf panel to perform admin
works the demon process in the publisher
is already created in started as a batch
job in this demonstration the demon job
is running on Port 90 5 DD name sqd off
refers the keys file the content of the
public key file created within the ec2
instance is pasted in this file and will
be used to authenticate the apply engine
when connection request is
made here's the publisher
job from the ispf panel for precisely
select option
three vssm to msk is the name of the
publisher engine and the configuration
is stored in cab mentioned the screen
shows the stats such as records captured
records published The Source log stream
shows the log stream name configured to
Stage the database changes in our
scenario the log stream is a vsam based
file but in production coupling facility
based log stream is
recommended One Source object is
configured which is identified by vsam
pure C this will capture the logs from
the card payments authorization V Sam
file switch back to ec2 command prompt
we will create the RDS posters table
connect to the RDS database using the
psql
command then run the create table
command the table columns corresponds to
the fields in the vsam copy book run a
select query to validate the table next
create a cpy subfolder inside precisely
folder create a file named cardor
payments and paste the Cobalt copybook
layout save the copy book
file create the apply engine script file
named script.
sqd The Script has the job name vs samam
to msk is identifier the description
section refers to metadata referring to
the Cobalt copybook location the Sam
perk is the name of source object
identifier set by publisher Source data
store points to Mainframe IP address and
port for demon on Mainframe vssm to msk
is the publisher name vam CDC is data
source
type Target data store points to topic
name of the msk messages will be
distributed to kofka partitions using
key Json is the record format both
source and Target data source use cardor
payment SRC to describe the message
metadata the script used the replicate
function to convert raw ebcc log to Json
format with key fields from
copybook next we are going to set up the
msk S3 delivery via fire hose and
integration with SNS via event Bridge
pipe
MSG provides no code integration with
various AWS services on the MSG S3
delivery tab click create fire hose
stream some of the details are
pre-populated such as Source destination
mskk
cluster paste the topic
name enter a name for the
stream select the S3 bucket created by
cloud formation template
add
prefixes click create fire host stream
to
create once the creation is complete you
will see the status is
active next click integration Tab and
then click connect Amazon msk cluster to
pipe enter a pipe
name paste the topic name in the
consumer group created
earlier for demonstration we are not
adding any filtering or enrichment
on the target page click in Target
service dropdown you can see the
different Services you can integrate
with select SNS then the topic expand
Target input Transformer on the sample
event select msk click on the value to
select the field for output click create
pipe to create the event Bridge pipe
once successfully created the status
will show is running now let's start the
apply engine and insert some record in
the vsam database on the ec2 command
prompt start the apply engine using the
sqdg command the process displays
valuable information about the data
sources and message layouts it's
connected to publisher engine on
Mainframe and waiting for data
now switch to Mainframe this PS file
contains records that will be inserted
to the vsam database the records map to
the layout of the copy book we saw
earlier in this demonstration we will
use the precisely batched differ
functionality to replicate data online
Sam or db2 IMS follow the same capture
publisher architecture with some
differences in setup and
configurations we are going to use the
job to copy the PS file to the current
vam and then run the sqd DFC DC utility
the utility compares the base and
current files and updates the change
records in the log stream submit the
job switching to the ispf panel we see
the engine is connected now the capture
and publish record counts have gone up
ec2 command prompt also shows records
ingested let's switch to another
terminal and let's run the select query
on RDS posters again we see the records
in the
table the metrics on Lambda console
shows the invocations it picked up the
messages from msk and inserted them to
RDS let's look at the other data
pipelines created from msk on S3 console
let's navigate to data folder and then
to the subfolders select one object and
click query with S3 select on the page
select Json as input and output format
then run SQL query we see the Json
message that was published to MSG by
precisely apply agent the change
operation is an insert in this case you
will denote an update and D delete
operation after image contains the new
values of the key Fields corresponding
to copybook fields and their respective
values an update database operation will
have both before and after image the
object stored in S3 will be aggreg ated
and used offline to train and update the
AIML
models the even Bridge pipe also
consumed the messages and sent email
notification with the Json messages body
here's a sample
email now let's experiment how we can
use generative SQL from Red shift to
query using natural language on the red
shift console page click on query data
click on plus sign and select notebook
select the cluster run SQL to create
schema directly from the msk topic and
then a materialized view with the data
from the
topic then click on generative SQL a
chatbot window is opened on right hand
side type in plain language for example
show top five states by purchase Amazon
qbed by large language model or llm
generates the SQL query to be executed
click add to notebook and then click run
we see the SQL
results let's try something little
complex
let's ask show top five Merchants with
highest single purchase ask to include
state of purchase and output also ask to
show the purchase amount in currency
format using generative AI red shift is
able to understand the request written
in natural language search the database
and generate the SQL you can do lot more
ask complex business Insight on the data
here's the
result in case you are looking for the
code sample to build the fraud detection
section check the sample code in GitHub
thanks for watching
تصفح المزيد من مقاطع الفيديو ذات الصلة
5.0 / 5 (0 votes)