An AI-based trading risk identification method and device

By obtaining and processing transaction data in real time, generating feature matrix and calculating risk proximity, the problem of insufficient comprehensive trading risk assessment in the existing technology is solved, and efficient and accurate trading risk identification and management is achieved.

CN119313338BActive Publication Date: 2025-06-20SHENZHEN TOPWISE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411882139.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-06-20
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The existing technology lacks an effective comprehensive assessment mechanism, which combines the risk score of transactions with context information, and cannot conduct a comprehensive and multi-level risk assessment of multi-stage transaction data.

Method used

By obtaining user transaction information and behavior data in real time, extracting data features to generate feature matrix, generating transaction risk scores based on the feature matrix, and calculating the risk proximity of transactions, sorting and controlling transaction risks.

Benefits of technology

It significantly improves the accuracy and refinement level of risk identification, realizes quantitative ranking of transaction risks, deeply explores transaction characteristics, and dynamically optimizes the risk assessment model throughout the entire life cycle of the transaction, improving the efficiency and accuracy of transaction risk identification in complex trading scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313338B_ABST
    Figure CN119313338B_ABST
Patent Text Reader

Abstract

The present invention discloses a transaction risk identification method and device based on AI intelligence, which relates to the technical field of risk identification. It includes obtaining user transaction information and behavior data in real time and preprocessing the data, extracting data features to generate a feature matrix; generating a transaction risk score based on the feature matrix and performing preliminary risk classification, calculating the positive and negative ideal solution distances of the classified transaction data, and calculating the risk proximity of the transaction according to the ideal solution distance. Through multi-stage classification algorithms and the calculation of positive and negative ideal solution distances, the present invention significantly improves the accuracy and refinement level of risk identification. By calculating the risk proximity of transactions using positive and negative ideal solution distances, it realizes the quantitative ranking of transaction risks. It can not only deeply mine transaction features, but also dynamically optimize the risk assessment model throughout the transaction life cycle, significantly improving the efficiency and accuracy of transaction risk identification in complex transaction scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of risk identification, and particularly to a method and device for identifying transaction risks based on AI intelligence. Background Art

[0002] With the rapid development of e-commerce, online payment, and fintech, the volume of transactions has shown exponential growth, and the real-time nature and complexity of transactions have also been continuously increasing. However, the diversity and complexity of transaction scenarios have posed unprecedented challenges to traditional transaction risk identification methods. In the prior art, methods based on rules and statistical analysis can, to a certain extent, identify some risky transactions, but these methods rely on the setting of fixed rules and are difficult to cope with new types of fraud or abnormal patterns. In recent years, the rapid development of artificial intelligence (AI) technology has brought new opportunities to the field of transaction risk identification. Through machine learning and deep learning models, multi-dimensional features can be extracted from complex transaction data to achieve more efficient risk assessment. In the prior art, traditional transaction risk identification methods mainly include risk assessment models based on feature engineering, anomaly detection methods based on statistical laws, and classification models based on machine learning. However, these methods usually only analyze a single stage of a transaction and ignore the dynamic characteristics in the transaction life cycle, such as the evolution of data features in the transaction initiation, processing, and completion stages. In addition, the prior art lacks an effective comprehensive evaluation mechanism to combine the risk score of a transaction with context information, thus unable to conduct a full-range and multi-level risk assessment on multi-stage transaction data. Summary of the Invention

[0003] In view of the problems existing in the above-mentioned prior art methods and devices for identifying transaction risks based on AI intelligence, the present invention is proposed.

[0004] Therefore, the problem to be solved by the present invention is that the prior art lacks an effective comprehensive evaluation mechanism to combine the risk score of a transaction with context information, thus unable to conduct a full-range and multi-level risk assessment on multi-stage transaction data.

[0005] To solve the above technical problems, the present invention provides the following technical solution: A method for identifying transaction risks based on AI intelligence, which includes: obtaining user transaction information and behavior data in real time and preprocessing the data, and extracting data features to generate a feature matrix;

[0006] Generating a transaction risk score based on the feature matrix and performing a preliminary risk classification, calculating the positive and negative ideal solution distances of the classified transaction data, and calculating the risk proximity of the transaction according to the ideal solution distance;

[0007] Performing a transaction risk ranking according to the proximity, and controlling the risky transactions according to the ranking.

[0008] As a preferred embodiment of the AI - based trading risk identification method of the present invention, the following steps are involved: The real - time acquisition of user trading information and behavior data and the pre - processing of the data refer to obtaining the key fields, user behavior data, and context data of each transaction. After cleaning and standardizing the collected data, according to the transaction timestamp of the data, the transactions are divided into peak hours and non - peak hours, and time - context labels are marked.

[0009] The key fields include amount, timestamp, payment method, and account information.

[0010] The user behavior data includes the user device ID, the IP address of login and operation, and the operation frequency.

[0011] The context data includes market fluctuations and geographical events.

[0012] As a preferred embodiment of the AI - based trading risk identification method of the present invention, the following steps are involved: The extraction of data features to generate a feature matrix refers to extracting the basic features, context features, behavior features, and cross - features of trading data based on the time, space, and environment information of the transaction.

[0013] The context features include converting the transaction timestamp into periodic hour features and week features, calculating the geographical distance based on the geographical coordinates of the transaction location and the account registration location, and combining hot events to mark the risk level of the trading environment.

[0014] The behavior features include calculating the number of transactions and the total transaction amount of the user within time T, and the number of device switches of the user.

[0015] The cross - features refer to generating cross - features by combining the relationships between different features, including calculating the ratio A of the current transaction amount to the account balance, and calculating the ratio C of the transaction frequency to the account activity.

[0016] Assign a unique transaction ID to each transaction. After pre - processing the features, divide the features into a basic feature group, a context feature group, a behavior feature group, and a cross - feature group, and store each feature group as a table with the transaction ID as the primary key.

[0017] The pre - processing refers to normalizing numerical features and using Label Encoding for feature encoding of categorical features.

[0018] Merge the data tables of different feature groups into the main data table according to the transaction ID to obtain the merged feature matrix.

[0019] As a preferred solution of the AI intelligence-based transaction risk identification method described in the present invention, wherein: generating a transaction risk score based on the feature matrix and performing a preliminary risk classification means dividing the feature matrix into a basic feature subset, a behavior feature and a context feature subset, and a cross feature subset according to feature groups;

[0020] Extract the basic feature subset during the transaction initiation stage for rapid screening, use Naive Bayes for rapid classification, and calculate the basic feature classification probability of each sample ;

[0021] Set a probability threshold D. If the probability is less than the threshold D, it is a low-risk transaction and it is directly passed. Otherwise, it is a high-risk transaction, which is marked, a text message verification is sent to the user and the user's single-transaction amount is restricted. If the user passes the verification, the transaction continues. If not, the transaction is rejected;

[0022] During the transaction processing stage, extract the behavior feature and context feature subsets of the high-risk transactions that have passed the text message verification to comprehensively construct a dynamic feature matrix X;

[0023] Use a random forest to construct a non-linear relationship model between features and risks, perform random forest classification on the dynamic feature matrix X, and output a behavior feature score ;

[0024] Extract the context feature subset and continue gradient boosting classification to output a context feature score ;

[0025] Combine the results of the random forest and gradient boosting to generate a risk score R for the processing stage;

[0026] Set a threshold E. If the risk score is less than the threshold E, it is a medium-risk transaction and an artificial review is applied. Otherwise, it is a high-risk transaction and it is marked;

[0027] During the transaction completion stage, extract the cross feature subset of the high-risk transactions, and calculate the historical activity of the user's account for the high-risk transactions to comprehensively construct a final feature matrix;

[0028] Initialize the input layer, hidden layer and output layer of the multi-layer perceptron model, use historical transaction data to train the model, and calculate the classification error of the current model in each round of iteration ;

[0029] Update the weight adjustment factor according to the classification error ;

[0030] Update the sample weights using the weight adjustment factor;

[0031] Introduce the updated sample weights into the cross loss function ;

[0032] Iteratively optimize the model parameters based on the cross-entropy loss function and the Adam optimizer until the loss reaches the minimum and then stop the iteration. Input the iterated model parameters into the multi-layer perceptron model to obtain the multi-layer perceptron model;

[0033] Input the final feature matrix into the input layer of the model, extract non-linear features through the hidden layer, and calculate the probability distribution of each risk category through the Softmax function in the output layer to obtain the probability of the risk category to which the transaction belongs;

[0034] Select the risk category corresponding to the maximum probability as the classification result of the transaction data;

[0035] Summarize the classification results to form a low-risk transaction set, a medium-risk transaction set, and a high-risk transaction set.

[0036] As a preferred solution of the AI-intelligent-based transaction risk identification method described in the present invention, wherein: calculating the distances of the classified transaction data to the positive and negative ideal solutions means calculating the feature mean in the low-risk transaction set and generating a feature mean vector as the positive ideal solution, and calculating the feature mean in the high-risk transaction set and generating a feature mean vector as the negative ideal solution;

[0037] Integrate all transaction data features into a matrix J, and calculate the feature covariance matrix S;

[0038] Use the Mahalanobis distance formula to calculate the distance of each transaction to the positive ideal solution and to the negative ideal solution distance.

[0039] As a preferred solution of the AI-intelligent-based transaction risk identification method described in the present invention, wherein: calculating the risk proximity of the transaction according to the ideal solution distance means calculating the risk proximity of the transaction based on the calculated distances of the transaction data to the positive ideal solution and to the negative ideal solution ;

[0040] Substitute the distance of each transaction to the positive ideal solution and to the negative ideal solution distance into the formula of the transaction risk proximity, and gradually calculate the of each transaction.

[0041] As a preferred solution of the AI-intelligent-based transaction risk identification method described in the present invention, wherein: sorting the transactions according to the proximity means sorting the transaction data in the low-risk transaction set, the medium-risk transaction set, and the high-risk transaction set in a decreasing order according to the transaction risk proximity.

[0042] As a preferred solution of the AI - based transaction risk identification method of the present invention, the control of risk transactions according to the ranking means pushing the risk ranking result to the risk team. The risk team checks the risk transaction set according to the risk ranking, temporarily freezes the user accounts related to each transaction in high - risk transactions, transfers the transaction amount to the account to be audited, and manually checks medium - risk transactions and low - risk transactions in sequence according to the ranking, and updates the risk transaction set according to the real - time risk value.

[0043] A computer device, comprising: a memory and a processor; the memory stores a computer program, characterized in that: when the processor executes the computer program, the steps of the AI - based transaction risk identification method are implemented.

[0044] A computer - readable storage medium, on which a computer program is stored, characterized in that: when the computer program is executed by a processor, the steps of the AI - based transaction risk identification method are implemented.

[0045] The beneficial effects of the present invention are as follows: Through the multi - stage classification algorithm and the calculation of the distance between positive and negative ideal solutions, the accuracy and refinement level of risk identification are significantly improved. By calculating the risk proximity of transactions using the distance between positive and negative ideal solutions, the quantitative ranking of transaction risks is realized. It can not only deeply mine transaction characteristics, but also dynamically optimize the risk assessment model throughout the entire life cycle of transactions, significantly improving the efficiency and accuracy of transaction risk identification in complex transaction scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0047] Figure 1 It is a schematic flow chart of the AI - based transaction risk identification method. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] To make the above - mentioned objects, features, and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention will be described in detail below with reference to the drawings in the specification.

[0049] Many specific details are set forth in the following description to facilitate a thorough understanding of the present invention. However, the present invention may be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0050] Secondly, the "one embodiment" or "embodiment" mentioned herein refers to specific features, structures or characteristics that may be included in at least one implementation manner of the present invention. The phrase "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it an independent or selectively mutually exclusive embodiment with other embodiments.

[0051] Example 1, referring to Figure 1 , is the first embodiment of the present invention. This embodiment provides a method for identifying transaction risks based on AI intelligence. The method for identifying transaction risks based on AI intelligence includes the following steps:

[0052] S1. Real-time obtain user transaction information and behavior data, preprocess the data, and extract data features to generate a feature matrix;

[0053] Specifically, real-time obtaining user transaction information and behavior data and preprocessing the data means obtaining the key fields of each transaction, user behavior data and context data, cleaning and standardizing the collected data, and dividing the transactions into peak periods and non-peak periods according to the transaction timestamps of the data, and labeling time context tags. Through the intelligent division of transaction time, the transaction characteristics in peak periods can be captured, such as frequent transactions and abnormal fund flows. The non-peak period helps to identify isolated or scattered abnormal transaction behaviors. This kind of period division can improve the model's recognition ability of transaction behavior patterns. By labeling the context tags (such as peak period, non-peak period) when the transaction occurs, the model's understanding ability of the transaction behavior environment is enhanced, especially effective in identifying scenarios of batch fraud or attacks against peak periods;

[0054] Through real-time data collection, the timeliness of transaction risk assessment is ensured, misjudgment caused by data lag is avoided, and the system's instant response ability is improved. Real-time collection of behavior data such as device ID and IP address can also capture the dynamic behavior changes of users, laying a foundation for subsequent risk classification;

[0055] The key fields include amount, timestamp, payment method and account information;

[0056] The user behavior data includes user device ID, IP address of login and operation, and operation frequency;

[0057] The context data includes market fluctuations and geographical events (promotion activities, regional hot events).

[0058] By obtaining user transaction information, behavioral data, and context data in real time, combined with data cleaning, standardization processing, and the generation of time context tags, a multi-dimensional and dynamic feature matrix is constructed, providing a comprehensive and real-time analysis basis for transaction risk assessment. Real-time dynamic feature extraction realizes multi-dimensional dynamic monitoring of user behavior and trading environment, making up for the deficiencies of traditional methods in mining transaction timeliness and context features. Context-enhanced analysis introduces external information such as market fluctuations and geographical events, improving the model's scenario adaptability and environmental sensitivity. Time-sensitive feature annotation enhances the model's ability to identify high-frequency and concentrated transaction risks by dividing peak and off-peak periods.

[0059] Furthermore, extracting data features to generate a feature matrix means extracting basic features, context features, behavioral features, and cross features of transaction data based on the time, space, and environment information of the transaction;

[0060] The context features include converting the transaction timestamp into periodic hour features and week features, calculating the geographical distance based on the geographical coordinates of the trading location and the account registration location, and combining hot events to mark the risk level of the trading environment. Example: Marked as "high trading volume risk" during major promotional activities, and marked as "high abnormal possibility" for transactions in natural disaster areas;

[0061] By converting the timestamp into hour features and week features, it is possible to discover the time periodic patterns of trading behaviors (such as trading differences between weekdays and weekends). The calculation of geographical distance can effectively capture abnormal trading locations (such as a large span between the account registration location and the trading location). The environmental risk labels generated by hot events (such as natural disasters) provide a key basis for identifying abnormal transactions;

[0062] Implementing hierarchical organization of transaction data improves analysis efficiency. Different feature groups cover multi-dimensional information such as the time, space, and user behavior of transactions, providing rich inputs for risk assessment and supporting dynamic feature expansion (such as adding new hot events or new behavioral metrics) to adapt to changing trading scenarios;

[0063] The behavioral features include calculating the number of transactions and the total transaction amount of the user within time T, as well as the number of device switches of the user;

[0064] Quantitative features of trading behaviors can effectively distinguish normal users from potential abnormal users. Behavioral features such as frequent device switching or abnormally high trading frequency provide direct clues for identifying fraudulent transactions;

[0065] The cross features refer to generating cross features by combining the relationships between different features, including calculating the ratio A of the current transaction amount to the account balance, and calculating the ratio C of the trading frequency to the account activity;

[0066] Reveal hidden transaction behavior patterns through cross - features (such as the ratio of transaction amount to account balance). As advanced features input, cross - features can enhance the model's adaptability to complex scenarios;

[0067] Assign a unique transaction ID to each transaction. After pre - processing the features, divide the features into basic feature groups, context feature groups, behavior feature groups, and cross - feature groups, and store each feature group as a table with the transaction ID as the primary key;

[0068] The pre - processing refers to normalizing numerical features such as amount, account balance, transaction frequency, geographical distance, etc., and using Label Encoding for feature encoding of categorical features (such as payment method, market volatility label);

[0069] Normalization eliminates the differences in units and magnitudes between features, ensuring the stability of data input. The Label Encoding method converts categorical features into numerical representations, improving the model's processing efficiency;

[0070] Merge the data tables of different feature groups into the main data table according to the transaction ID to obtain the merged feature matrix. Store the feature groups with the transaction ID as the primary key, which is convenient for subsequent data merging and processing. Integrate the time, space, behavior, etc. features of the transaction into a single matrix for subsequent analysis. The complete feature matrix provides high - quality input for the machine learning model, improving the classification and evaluation effects.

[0071] By performing refined feature extraction, pre - processing, and matrix construction on transaction data, the efficiency and accuracy of transaction risk identification are significantly improved. The introduction of feature classification and context, behavior, and cross - features breaks through the limitations of the single dimension of traditional methods, providing a multi - dimensional analysis perspective for abnormal transactions. By normalizing and encoding the data standardization, and combining the unified storage and management of the feature matrix, the present invention improves the real - time performance of risk identification, has high flexibility and adaptability, and can be efficiently applied in diverse transaction scenarios.

[0072] S2. Generate a transaction risk score based on the feature matrix and conduct a preliminary risk classification, calculate the positive and negative ideal solution distances of the classified transaction data, and calculate the risk proximity of the transaction according to the ideal solution distance;

[0073] Specifically, generating a transaction risk score based on the feature matrix and conducting a preliminary risk classification means dividing the feature matrix into basic feature subsets, behavior and context feature subsets, and cross - feature subsets according to the feature groups;

[0074] Extract the basic feature subset at the transaction initiation stage for rapid screening, use Naive Bayes for rapid classification, and calculate the basic feature classification probability of each sample :

[0075]

[0076] P

[0077] wherein, is the probability that the transaction belongs to category after the known basic feature subset V, and are the prior probabilities of categories and respectively, is the basic feature value, is the mean value of the basic feature under category respectively, is the standard deviation of the basic feature under category respectively, is the conditional probability of the feature value under category respectively, is the conditional probability of the feature value under category respectively, n is the total number of features in the basic feature subset, K represents the number of types of risk classifications, h is the index of the feature, indicating the h-th feature being processed currently;

[0078] Set the probability threshold D through the statistical distribution of historical transaction data. If the probability is less than the threshold D, it is a low-risk transaction and is directly passed. Otherwise, it is a high-risk transaction, which is marked, a text message verification is sent to the user, and the user's single-transaction amount is restricted. If the user passes the verification, the transaction continues. If not, the transaction is rejected;

[0079] Naive Bayes is a lightweight algorithm with high computational efficiency. It can quickly complete risk screening at the transaction initiation stage. By directly screening out low-risk transactions, it reduces the computational pressure in the subsequent stage, provides smooth services for low-risk transactions, and implements necessary verification and restrictions on high-risk transactions, balancing security and user convenience;

[0080] In the transaction processing stage, extract the behavioral features and context feature subset of the high-risk transactions that have passed the text message verification, and comprehensively construct a dynamic feature matrix X;

[0081] Use random forest to construct a non-linear relationship model between features and risks, perform random forest classification on the dynamic feature matrix X, and output the behavioral feature score :

[0082]

[0083] wherein, T is the total number of decision trees in the random forest, is the classification probability output of the t-th decision tree;

[0084] Extract the context feature subset and continue gradient boosting classification to output the context feature score :

[0085]

[0086] In the formula, Y is the total number of weak classifiers, which is only used as a counting variable. is the learning rate of the m-th weak classifier. is the classification probability output of the m-th weak classifier, and Z is the context feature subset;

[0087] Combine the results of random forest and gradient boosting to generate the risk score R in the processing stage:

[0088]

[0089] In the formula, and are the weights of the random forest and gradient boosting models, which are usually determined by cross-validation to ensure positive values;

[0090] Provide a more balanced risk assessment by weighted fusion of the scoring results of different models;

[0091] Set the threshold E through the grid search method. If the risk score is less than the threshold E, it is a medium-risk transaction and an artificial review is requested. Otherwise, it is a high-risk transaction and is marked. The dynamic adjustment of the threshold can meet the risk management requirements in different business scenarios;

[0092] The dynamic feature matrix reflects the changes in transaction behavior in real time, improving the real-time performance and accuracy of classification. The combination of random forest and gradient boosting uses various feature data to provide a more comprehensive risk assessment, taking into account the risk impacts of both transaction behavior features and environmental features, and optimizing the reliability of the scoring results;

[0093] In the transaction completion stage, extract the cross-feature subset of high-risk transactions and calculate the historical activity of the user accounts of high-risk transactions, and comprehensively construct the final feature matrix;

[0094] Initialize the input layer, hidden layer, and output layer of the multi-layer perceptron model, and use historical transaction data to train the model. In each round of iteration, calculate the classification error of the current model :

[0095]

[0096] In the formula, is the weight of sample i, is the classification error flag, is the true label of sample i, is the predicted label of sample i, and N is the total number of samples;

[0097] The cross features enhance the understanding of complex trading behaviors, especially the ability to identify potential risk patterns. The multi-layer perceptron can efficiently extract non-linear features from high-dimensional data and achieve more accurate risk classification;

[0098] Update the weight adjustment factor according to the classification error :

[0099]

[0100] Update the sample weights using the weight adjustment factor :

[0101]

[0102] Introduce the updated sample weights into the cross-entropy loss function :

[0103]

[0104] In the formula, is the true label of the k-th class of sample i, is the probability that sample i is predicted as the k-th class, and K is the total number of risk classification categories;

[0105] Through the iterative optimization of the cross-entropy loss function and the Adam optimizer, ensure the continuous improvement of the model performance;

[0106] Based on the cross-entropy loss function and the Adam optimizer, perform iterative optimization of the model parameters until the loss reaches the minimum and then stop the iteration. Input the iterative model parameters into the multi-layer perceptron model to obtain the multi-layer perceptron model;

[0107] Input the final feature matrix into the input layer of the model, extract non-linear features through the hidden layer, and calculate the probability distribution of each risk category through the Softmax function in the output layer to obtain the probability of the risk category to which the transaction belongs;

[0108] Select the risk category corresponding to the maximum probability as the classification result of the transaction data;

[0109] Summarize the classification results to form a low-risk transaction set, a medium-risk transaction set, and a high-risk transaction set. The classification results combined with the sorting information provide a basis for prioritizing the investigation of high-risk transactions. Freeze the high-risk transactions and transfer them to the account to be audited. The low-risk transactions pass quickly, improving the efficiency and effect of overall risk control, providing a clear priority for manual review, and optimizing resource allocation.

[0110] By constructing a dynamic feature matrix and multiple classification models in stages, the precision, real-time performance, and intelligence of transaction risk identification are achieved. The basic feature screening ensures rapid classification in the transaction initiation stage. The combination of random forest and gradient boosting provides multi-dimensional risk assessment for the processing stage. The multi-layer perceptron conducts in-depth analysis and classification optimization on high-risk transactions in the transaction completion stage.

[0111] Furthermore, calculating the positive and negative ideal solution distances of the classified transaction data means calculating the feature means in the low-risk transaction set and generating a feature mean vector as the positive ideal solution, and calculating the feature means in the high-risk transaction set and generating a feature mean vector as the negative ideal solution.

[0112] Generating the positive and negative ideal solutions based on the feature means of low-risk and high-risk transactions helps to construct a unified reference standard, making the transaction risk assessment more targeted and accurate. By extracting the feature mean vector, the noise interference of transaction data is effectively reduced, and the calculation efficiency and result stability are improved.

[0113] Integrate all transaction data features into matrix J and calculate the feature covariance matrix S.

[0114] Integrating all transaction features into a unified matrix form facilitates batch calculation and analysis, ensures the consistency of the data structure for each transaction, and lays a foundation for covariance matrix and distance calculation. Calculating the feature covariance matrix considers the correlation between features, eliminates the redundant influence between features, makes the distance calculation more accurate, improves the adaptability to high-dimensional feature data, and makes the calculation result more robust.

[0115] Use the Mahalanobis distance formula to calculate the distance of each transaction to the positive ideal solution and the distance to the negative ideal solution :

[0116]

[0117]

[0118] In the formula, is the feature vector of the qth transaction, is the feature vector of the positive ideal solution, is the feature vector of the negative ideal solution, S is the feature covariance matrix, T is the transpose operation. Compared with the traditional Euclidean distance, the Mahalanobis distance can fully consider the correlation between features, thus more accurately evaluating the closeness of transaction features to the positive and negative ideal solutions, avoiding the error problem caused by different feature scales, and enhancing the applicability of the model to complex transaction data.

[0119] By introducing the feature covariance matrix S, this method can adapt to the changes in the feature distribution of different trading scenarios, ensuring high - efficiency risk identification ability in various complex trading environments. Based on the distance calculation between the positive and negative ideal solutions and the risk proximity formula, this method can accurately quantify trading risks, providing a reliable basis for subsequent ranking and control. Using Mahalanobis distance calculation fully considers the correlation between features, avoiding result deviation caused by feature scale or noise problems and improving the stability of calculation. By using the feature mean vector and matrix operations, a batch - structured risk assessment process is realized, significantly reducing the computational complexity in practical applications.

[0120] S3. Rank trading risks according to the proximity, and control risky transactions according to the ranking;

[0121] Specifically, calculating the risk proximity of a transaction based on the ideal - solution distance means calculating the risk proximity of a transaction based on the distances from the calculated transaction data to the positive ideal solution and the negative ideal solution. :

[0122]

[0123] Substitute the distance to the positive ideal solution of each transaction and the distance to the negative ideal solution into the formula for the risk proximity of a transaction, and gradually calculate the .

[0124] By calculating the distances between the positive and negative ideal solutions and the risk proximity, a multi - dimensional quantitative assessment of trading risks is realized, significantly improving the accuracy of risk assessment. By dynamically adjusting the positive and negative ideal solutions and the feature matrix, the present invention can quickly respond to changes in complex trading environments, ensuring that the risk assessment results are always highly consistent with the actual situation. The risk proximity ranking provides a basis for prioritizing high - risk transactions, enabling the risk team to concentrate limited resources on the most important transactions and optimizing the risk management process.

[0125] Furthermore, controlling risky transactions according to the ranking means pushing the risk ranking results to the risk team. The risk team checks the set of risky transactions based on the risk ranking, temporarily freezes the user accounts related to each transaction in high - risk transactions, transfers the transaction amount to the account to be audited, and manually checks medium - risk and low - risk transactions in order according to the ranking, and updates the set of risky transactions according to the real - time risk value.

[0126] From risk ranking to risk transaction control, the entire solution realizes the full life-cycle management of high, medium, and low-risk transactions, ensuring that each transaction can be handled specifically. Through real-time risk value updates and dynamic ranking, the present invention has the ability to quickly respond in complex transaction environments, providing a reliable solution for sudden risk events. The design of freezing high-risk transactions and isolating funds significantly improves the system's prevention and control capabilities for suspicious transactions, reduces the exposure of capital risks during system operation, allocates processing priorities according to risk rankings, maximizes the utilization of human resources, and reduces system resource waste.

[0127] Embodiment 2 is the second embodiment of the present invention. The difference between this embodiment and the previous one is as follows:

[0128] If the described function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0129] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or used in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.

[0130] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection (electronic device) having one or more wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing it as appropriate, and then storing it in a computer memory.

[0131] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: a discrete logic circuit having logic gate circuits for implementing logical functions on data signals, an application specific integrated circuit having appropriate combinational logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

Claims

1. A transaction risk identification method based on AI intelligence, characterized by: Obtain user transaction information and behavior data in real time and pre-process the data to extract data features and generate feature matrices; Generate transaction risk scores based on the feature matrix and perform preliminary risk classification, calculate the positive and negative ideal solution distances of the classified transaction data, and calculate the risk proximity of the transaction based on the ideal solution distance; Rank transaction risks according to proximity, and manage risky transactions based on the ranking; The extracting of data features to generate a feature matrix refers to extracting basic features, context features, behavior features and cross features of transaction data based on the time, space and environment information of the transaction; the context features include converting the transaction timestamp into periodic hour features and week features, calculating the geographical distance based on the geographical coordinates of the transaction location and the account registration location, and marking the risk level of the transaction environment in combination with hot events; the behavior features include calculating the number of transactions and the total transaction amount of the user within the time T, as well as the number of device switches of the user; the cross features refer to generating cross features by combining the relationship between different features, including calculating the ratio A of the current transaction amount and the account balance, and calculating the ratio C of the transaction frequency and the account activity; Generating a transaction risk score based on the feature matrix and performing preliminary risk classification refers to dividing the feature matrix into a basic feature subset, a behavioral feature subset, a context feature subset, and a cross feature subset according to the feature group; extracting the basic feature subset for rapid screening at the transaction initiation stage, using naive Bayes for rapid classification, and calculating the basic feature classification probability P(B k |V), where P(B k |V) is when the transaction belongs to category B after the basic feature subset V is known. k The probability of a transaction is 0.001; set a probability threshold D. If the probability is less than the threshold D, it is a low-risk transaction and is passed directly. Otherwise, it is a high-risk transaction and is marked. A text message verification is sent to the user and the user's single transaction amount is limited. If the user passes the verification, the transaction continues. If not, the transaction is rejected. In the transaction processing stage, the behavioral features and context feature subsets of high-risk transactions that pass the text message verification are extracted to comprehensively construct a dynamic feature matrix X. A random forest is used to construct a nonlinear relationship model between features and risks, and the dynamic feature matrix X is classified by random forest to output the behavioral feature score G1. Extract the context feature subsets. The set continues gradient boosting classification and outputs the context feature score G2; the risk score R of the processing stage is generated by combining the random forest and gradient boosting results; the threshold E is set. If the risk score is less than the threshold E, it is a medium-risk transaction and a manual review is required. Otherwise, it is a high-risk transaction and is marked; in the transaction completion stage, the cross-feature subset of high-risk transactions is extracted, and the historical activity of the user account of high-risk transactions is calculated to comprehensively construct the final feature matrix; the input layer, hidden layer and output layer of the multi-layer perceptron model are initialized, and the model is trained using historical transaction data. In each round of iteration, the classification error ∈ of the current model is calculated t ; Update the weight adjustment factor β according to the classification error t ; Update sample weights using weight adjustment factors; Introduce updated sample weights into the cross loss function Based on the cross loss function and Adam optimizer, the model parameters are iteratively optimized until the loss is minimized and then the iteration is stopped. The iterative model parameters are input into the multi-layer perceptron model to obtain the multi-layer perceptron model. The final feature matrix is ​​input into the model input layer, nonlinear features are extracted through the hidden layer, and the probability distribution of each risk category is calculated through the Softmax function in the output layer to obtain the probability of the risk category to which the transaction belongs. The risk category corresponding to the maximum probability is selected as the classification result of the transaction data. The classification results are summarized to form a low-risk transaction set, a medium-risk transaction set and a high-risk transaction set.

2. The AI-based transaction risk identification method according to claim 1, characterized in that: The calculation of the positive and negative ideal solution distances of the classified transaction data refers to calculating the feature mean in the low-risk transaction set and generating the feature mean vector as the positive ideal solution, calculating the feature mean in the high-risk transaction set and generating the feature mean vector as the negative ideal solution; integrating all transaction data features into a matrix J, and calculating the feature covariance matrix S; The Mahalanobis distance formula is used to calculate the distance M(Q q , W + ) and the distance to the negative ideal solution M(Q q , W - ).

3. The AI-based transaction risk identification method according to claim 2, characterized in that: The calculation of the transaction risk proximity based on the ideal solution distance refers to calculating the transaction risk proximity c based on the calculated distance of the transaction data to the positive ideal solution and the distance to the negative ideal solution. I ; The distance M(Q q , W + ) and the distance to the negative ideal solution M(Q q , W - ) into the formula of transaction risk proximity, and gradually calculate the c of each transaction I .

4. The AI-based transaction risk identification method according to claim 3, characterized in that: The transaction sorting according to proximity refers to sorting the transaction data in the low-risk transaction set, the medium-risk transaction set and the high-risk transaction set in descending order according to the transaction risk proximity.

5. The AI-based transaction risk identification method according to claim 4, characterized in that: The control of risky transactions based on ranking refers to pushing the risk ranking results to the risk team, which checks the risk transaction set based on the risk ranking, temporarily freezes the user account related to each high-risk transaction, transfers the transaction amount to the account to be reviewed, and manually checks medium-risk and low-risk transactions in sequence according to the ranking, and updates the risk transaction set based on the real-time risk value.

6. A computer device comprising: A memory and a processor; the memory stores a computer program, characterized in that: when the processor executes the computer program, the steps of the AI-based transaction risk identification method described in any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the transaction risk identification method based on AI intelligence described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Account transaction risk judgment method and device and electronic equipment

    CN111260368A

  • Bank anti-call fraud data model construction method based on multi-feature fusion

    CN117993919A