Programmed abnormal security transaction risk identification method and device, computer equipment and storage medium
By constructing the graph structure and spatiotemporal data form of securities transaction data, combined with the fusion of graph neural network and multi-models, the identification problem of programmatic abnormal securities transactions is solved, the recognition accuracy and efficiency are improved, the market changes are adapted to market changes, and the regulatory goals are achieved.
Patent Information
- Application Number
- CN202410964028.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-07-18
AI Technical Summary
The existing technology is difficult to accurately identify and monitor programmatic abnormal securities trading, especially in massive data analysis and complex trading modes. Traditional rules are difficult to explore hidden abnormal laws and adapt to market changes, and the acquisition and processing of securities trading relationship charts are complex. High, unable to effectively solve the problem of scale explosion and unbalanced sample.
By constructing graph structure data of securities transaction data, using graph neural networks for risk identification, combining spatiotemporal data form and multi-model fusion, designing data and sample enhancement technology, realizing the capture of complex transaction patterns and correlations, and improving abnormal transaction identification Accuracy and efficiency.
Improve the accuracy and efficiency of programmatic abnormal securities transactions, reduce the risk of illegal transactions, improve market stability and fairness, achieve regulatory goals, and be automated and scalable to adapt to market dynamics and new abnormal transaction forms. .
Smart Images

Figure CN118967131A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of financial transaction risk identification, and specifically to a programmed abnormal securities transaction risk identification method, device, computer equipment and storage medium. Background Art
[0002] At present, in the context of strengthening the supervision of programmed trading, strengthening the identification and management capabilities of institutions for compliance with programmed abnormal trading has become a key issue. Traditional identification of abnormal securities trading mainly relies on expert rules, that is, the trading records that do not meet certain trading patterns are screened out through rules. The identification technology based on traditional rules is difficult to distinguish whether the anomaly comes from programmed trading. As the number of programmed trading in the market increases, new difficulties have been introduced in determining programmed anomalies in the abnormal trading identification process.
[0003] Compared with ordinary abnormal trading, programmatic abnormal trading has some new difficulties and challenges, mainly due to the special nature and complexity of programmatic trading. In the process of identifying and supervising programmatic abnormal trading, it is difficult to analyze and process massive data, it is difficult for expert rules to mine complex hidden abnormal laws, and it is difficult to monitor in real time under high-frequency trading data. The traditional rule-based identification method is no longer applicable to new programmatic trading. Expert rules are difficult to mine complex hidden abnormal laws. Limited by the complexity, diversity and secrecy of programmatic trading, existing expert rules face problems such as high mining difficulty, low updating efficiency and poor adaptability. Programmatic trading involves multiple targets, multiple trading strategies and multiple trading entities. Each trading strategy may have different behavior patterns and laws, and may also involve complex algorithmic logic and trading strategies. Rules formulated based on expert experience are difficult to cover all possible abnormal trading situations, especially hidden abnormal laws; the environment and conditions of the financial market often change, including market trends, liquidity, trading rules, etc. This rapid change makes it difficult for expert rules to adjust and adapt to new market conditions in a timely manner, resulting in difficulty in quickly discovering and identifying new types of abnormal trading behaviors; some complex abnormal trading behaviors involve complex trading patterns, data associations, and nonlinear relationships, which are not easy to detect through simple rules.
[0004] In order to cope with these new difficulties, financial institutions need to continuously upgrade their monitoring systems and integrate advanced technologies, algorithms and analytical methods to more effectively identify potential abnormal programmatic transactions. This also highlights the challenges of compliance and supervision, and the need to develop a flexible and adaptable regulatory framework.
[0005] However, there is no mature solution for intelligent programmatic identification of abnormal securities transactions. There are some algorithms that detect abnormal transfer transactions through artificial intelligence algorithms, which are usually referred to as abnormal transactions, but they are very different from the modeling methods and application scenarios of abnormal securities transactions. There is an existing detection solution for abnormal financial entities. The credit card transaction relationship feature graph is processed by a graph neural network to determine the abnormal detection structure of the financial entity, which can accurately detect abnormal financial entities and improve financial security. However, first of all, the acquisition of this transaction relationship graph cannot be used in securities trading, or the acquisition of the securities trading relationship graph is much more complicated and more difficult than this relationship graph. In securities trading, the transaction subject is not a point-to-point transaction, but a match with a centralized exchange, and the counterparty is unclear. The transaction nodes cannot be described by a simple transfer relationship. How to realize the generation of the graph structure in securities trading is a major difficulty of this technical solution. Secondly, the prior art is a static graph structure, and retraining and feature extraction processes are required after adding new nodes. In securities trading, the number of trading nodes that need to be judged changes dynamically, that is, new traders' trading accounts are added to the graph network at any time. Because the scale of securities trading graphs is huge, frequent retraining does not meet actual requirements. Furthermore, traditional graph neural networks cannot solve the problem of scale explosion in securities trading. The abnormal nodes of securities trading nodes are account-target-time. As the daily trading time expands, the number of nodes to be judged increases sharply, and effective pruning and model updating methods need to be implemented, which cannot be solved by this method. In addition, in securities anomaly identification, there is an extremely unbalanced problem of abnormal behavior data, that is, there are extremely few abnormal samples. In such problems, effective data and sample enhancement technologies need to be designed to enhance the effect of actual anomaly detection. The unbalanced sample processing mechanism cannot be solved by this method. Summary of the invention
[0006] In view of the above problems, an embodiment of the present invention provides a method, apparatus, computer device and storage medium for identifying risks of programmed abnormal securities trading, which are used to solve the technical problem of inaccurate identification of programmed trading risks in the prior art.
[0007] According to one aspect of an embodiment of the present invention, a programmed abnormal securities transaction risk identification method is provided, the method comprising:
[0008] Get the current transaction data for the current period;
[0009] Extracting features of the current transaction data in the current period to obtain current transaction features corresponding to the current transaction data;
[0010] According to the current transaction features of the current transaction data, current graph structure data is constructed; the current graph structure data includes a plurality of graph nodes and edges; the graph node is used to represent a current transaction data; the edge is used to represent the relationship between each current transaction data;
[0011] The current graph structure data is input into the first transaction risk identification model to obtain a first risk identification result; the first transaction risk model is obtained by training a graph neural network model based on the graph structure sample data; the graph structure sample data is constructed based on the transaction feature data of the programmed transaction samples at historical moments; the first risk identification result includes account information that has transaction risks in the current period.
[0012] In an optional manner, the method also includes: inputting the current transaction characteristics into a second transaction risk identification model and a third transaction risk identification model respectively to obtain a second risk identification result and a third risk identification result; the second transaction risk model is obtained by training a preset unsupervised time series neural network model according to programmed transaction samples; the third transaction risk model is obtained by training a preset supervised time series neural network model according to programmed transaction samples; and the target risk identification result is obtained based on the first risk identification result, the second risk identification result and the third risk identification result.
[0013] In an optional manner, before the current graph structure data is input into the first transaction risk identification model to obtain the first risk identification result, the method includes: determining a programmed transaction sample according to a preset programmed transaction determination rule; the programmed transaction sample includes programmed transaction sample feature data and a corresponding sample label; the programmed transaction sample feature data includes sample basic feature data and sample timing feature data; constructing graph structure sample data according to the programmed transaction sample feature data of the programmed transaction sample; the graph structure sample data includes graph nodes and edges; the graph nodes are used to characterize a programmed transaction sample, and the graph nodes include investor information, target information and transaction time information of the programmed transaction sample; the edges are used to characterize the association between each programmed transaction sample; the edges between the graph nodes are established according to whether each of the graph nodes is the same investor, the same account, and / or whether the same target is traded; the graph structure sample data is input into a graph neural network model for model training to obtain a first transaction risk identification model.
[0014] In an optional manner, the preset programmed transaction determination rules include whether the number of transactions exceeds a preset transaction number threshold, or whether the transaction amount exceeds a preset transaction amount threshold, or whether the transaction proportion exceeds a preset proportion threshold; the determination of programmed transaction samples based on the preset programmed transaction determination rules includes: based on the account identifier of the historical transaction data, statistically determining that the historical transaction data whose number of transactions corresponding to the account identifier within a preset time period is greater than the preset transaction number threshold is the programmed transaction sample; based on the account identifier of the historical transaction data, statistically determining that the transaction data whose transaction amount corresponding to the account identifier is greater than the preset transaction amount threshold is the programmed transaction sample; based on the account identifier of the historical transaction data, statistically determining that the transaction data whose transaction proportion corresponding to the account identifier within a preset time period is greater than the preset proportion threshold is the programmed transaction sample.
[0015] In an optional manner, constructing graph structure sample data based on the programmed transaction sample feature data of the programmed transaction sample includes: performing data cleaning and standardization processing on the sample information of the programmed transaction sample to obtain pre-processed programmed transaction sample feature data; performing dimensionality reduction processing on the pre-processed programmed transaction sample feature data to obtain the programmed transaction sample feature data after dimensionality reduction processing; taking each programmed transaction sample as a graph node, constructing edges between each programmed transaction sample with an associated relationship, and obtaining initial graph structure sample data; the node attributes of the graph node include the programmed transaction sample feature data after dimensionality reduction processing of the programmed transaction sample. The method comprises the following steps: characterizing data; using graph contrast learning to enhance the feature representation of graph nodes to obtain the programmatic trading sample feature data after the enhanced feature representation; performing sample enhancement on the programmatic trading sample feature data after the enhanced feature representation by oversampling to generate a first type of enhanced samples; performing sample enhancement by sample mixing technology to generate a second type of enhanced samples; performing sample enhancement by conditional generative adversarial network to generate a third type of enhanced samples; and performing feature screening on the programmatic trading sample feature data after the enhanced feature representation, the first type of enhanced samples, the second type of enhanced samples and the third type of enhanced samples according to a gradient descent boosting tree model to obtain the final programmatic trading sample feature data of the graph structure sample data.
[0016] In an optional manner, before inputting the graph structure sample data into a graph neural network model for training to obtain a first transaction risk identification model, the method further includes: pruning the programmatic transaction sample feature data of the graph structure sample data according to preset business rules to obtain first pruned programmatic transaction sample feature data; performing feature aggregation on the first pruned programmatic transaction sample feature data to calculate similarity, and pruning the first pruned programmatic transaction sample feature data again according to the similarity and a similarity threshold to obtain second pruned programmatic transaction sample feature data; calculating the local structure of the graph according to a community detection partitioning algorithm, and pruning the second pruned programmatic transaction sample feature data again to obtain third pruned programmatic transaction sample feature data.
[0017] In an optional manner, the graph neural network model is a GraphSage model; the step of inputting the graph structure sample data into the graph neural network model training to obtain a first transaction risk identification model includes: inputting the graph structure sample data into the GraphSage model training to obtain a first transaction risk identification model.
[0018] According to another aspect of an embodiment of the present invention, there is provided a programmed abnormal securities transaction risk identification device, comprising:
[0019] A data determination module, used to obtain current transaction data for the current period;
[0020] A feature extraction module, used to extract features from the current transaction data in the current period to obtain current transaction features corresponding to the current transaction data;
[0021] A construction module, configured to construct current graph structure data according to current transaction features of the current transaction data; the current graph structure data includes a plurality of graph nodes and edges; the graph node is used to represent a current transaction data; the edge is used to represent the relationship between each current transaction data;
[0022] An identification module is used to input the current graph structure data into a first transaction risk identification model to obtain a first risk identification result; the first transaction risk model is obtained by training a graph neural network model based on graph structure sample data; the graph structure sample data is constructed based on transaction feature data of the programmed transaction samples at historical moments; the first risk identification result includes account information that has transaction risks in the current period.
[0023] According to another aspect of an embodiment of the present invention, there is provided a computer device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction enables the processor to perform the operation of the programmed abnormal securities trading risk identification method. According to another aspect of an embodiment of the present invention, there is provided a computer-readable storage medium, wherein the storage medium stores at least one executable instruction, wherein when the executable instruction is executed on the computer device, the computer device performs the operation of the programmed abnormal securities trading risk identification method.
[0024] The embodiment of the present invention constructs graph structure data of securities trading data based on spatiotemporal data, preprocesses and screens the features of the graph data structure, and identifies risks through graph neural networks, which can better capture complex trading patterns and correlations, thereby improving the accuracy and efficiency of abnormal transaction identification, finding hidden new abnormal transactions, improving the effectiveness of compliance management, reducing illegal transaction risks, improving market stability and fairness, and achieving regulatory goals. The graph neural network's programmatic trading spatiotemporal pattern anomaly monitoring method also has the characteristics of automation and scalability, and can better adapt to market dynamics and emerging new abnormal trading forms. The embodiment of the present invention adds intuitive programmatic trading identification logic for securities trading anomalies, which facilitates the generalized identification of programmatic trading; according to the extreme imbalance problem of abnormal behavior data in securities trading data, effective data and sample enhancement technology is designed to improve the effect of anomaly detection.
[0025] Furthermore, through multi-model fusion, neural network models such as unsupervised models and supervised models are used to average the prediction results of multiple models to obtain an average value as the final output, which effectively improves the accuracy of programmatic risk identification.
[0026] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0028] Figure 1 A schematic diagram showing a flow chart of a programmatic abnormal securities trading risk identification method provided by an embodiment of the present invention;
[0029] Figure 2 A schematic diagram showing sample construction in a programmatic abnormal securities trading risk identification method provided by an embodiment of the present invention;
[0030] Figure 3 A schematic diagram showing the structure of a graph in a programmatic abnormal securities trading risk identification method provided by an embodiment of the present invention;
[0031] Figure 4 A schematic diagram showing a training process in a programmatic abnormal securities trading risk identification method provided by an embodiment of the present invention;
[0032] Figure 5 A schematic diagram showing the structure of a programmable abnormal securities trading risk identification device provided by an embodiment of the present invention is shown;
[0033] Figure 6 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0034] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0035] First, the relevant data in the embodiments of the present invention are explained:
[0036] Securities Trading: Securities trading is the process of buying and selling securities, where a security is a financial instrument that represents the holder’s interest in a company or other entity. Securities can include stocks, bonds, options, ETFs (Exchange Traded Funds), etc.
[0037] Program trading: Program trading is a financial trading strategy that uses computer programs to automatically execute trades. This trading method relies on pre-set rules and algorithms to automatically execute buy and sell decisions through computer systems without human intervention. Program trading is also called algorithmic trading or automated trading.
[0038] Abnormal securities trading: Definition: Abnormal securities trading refers to unusual, abnormal or concerning trading activities in the securities market. Such anomalies may involve securities prices, trading volumes, trading patterns or other phenomena that are inconsistent with normal market behavior. Characteristics: This may include sharp fluctuations in stock prices, sudden increases in trading volumes, unusual trading patterns, etc. Abnormal securities trading may be caused by insider trading, market manipulation, erroneous trading or other reasons. Monitoring: Regulators usually use monitoring systems and algorithms to detect abnormal securities trading in the market to maintain market fairness and transparency.
[0039] Abnormal transfer transactions: Definition: Abnormal transfer transactions usually refer to unusual or abnormal fund transfers or transaction activities that occur in fund flows and payment systems. Characteristics: This may include abnormally large fund transfers, frequent fund flows, unusual payment and collection patterns, etc. Abnormal transfer transactions may involve money laundering, fraud, illegal fund flows and other issues. Monitoring: Financial institutions, payment system providers and regulators usually use anti-money laundering (AML) and anti-fraud systems to monitor abnormal transfer transactions to prevent potential illegal activities.
[0040] Programmed abnormal securities trading: refers to unusual or abnormal trading activities that occur in automated trading strategies executed using computer programs.
[0041] Time series neural network: mainly used to process time series data deep learning neural network model
[0042] Graph Neural Network: Graph Neural Network (GNN) is a type of deep learning model specifically designed to process graph structured data. Graph structured data consists of nodes (or vertices) and edges (or connections) that are used to represent the relationships between entities. The goal of GNN is to learn the complex relationships between nodes so that effective inference and prediction can be performed on graph structured data.
[0043] Here, the background technology of the embodiments of the present invention is further described in detail:
[0044] Against the backdrop of enhanced regulation of programmed trading, strengthening compliance regulation and the ability to identify and manage abnormal programmed trading has become a key issue.
[0045] Traditionally, the identification of abnormal securities transactions mainly relies on expert rules, that is, the transaction records that do not meet certain transaction patterns are screened out through rules. It is difficult for traditional rule-based identification technology to distinguish whether the anomaly comes from programmed trading. As programmed trading in the market increases, new difficulties are introduced in the identification of programmed anomalies in the abnormal transaction identification process.
[0046] Compared with ordinary abnormal trading, programmatic abnormal trading has some new difficulties and challenges, mainly due to the special nature and complexity of programmatic trading. In the process of identifying and supervising programmatic abnormal trading, it is difficult to analyze and process massive data, it is difficult for expert rules to mine complex hidden abnormal laws, and it is difficult to monitor in real time under high-frequency trading data. The traditional rule-based identification method is no longer applicable to new programmatic trading. Expert rules are difficult to mine complex hidden abnormal laws. Limited by the complexity, diversity and secrecy of programmatic trading, existing expert rules face problems such as high mining difficulty, low updating efficiency and poor adaptability. Programmatic trading involves multiple targets, multiple trading strategies and multiple trading entities. Each trading strategy may have different behavior patterns and laws, and may also involve complex algorithmic logic and trading strategies. Rules formulated based on expert experience are difficult to cover all possible abnormal trading situations, especially hidden abnormal laws; the environment and conditions of the financial market often change, including market trends, liquidity, trading rules, etc. This rapid change makes it difficult for expert rules to adjust and adapt to new market conditions in a timely manner, resulting in difficulty in quickly discovering and identifying new types of abnormal trading behaviors; some complex abnormal trading behaviors involve complex trading patterns, data associations, and nonlinear relationships, which are not easy to detect through simple rules.
[0047] In order to cope with these new difficulties, financial institutions need to continuously upgrade their monitoring systems and integrate advanced technologies, algorithms and analytical methods to more effectively identify potential abnormal programmatic transactions. This also highlights the challenges of compliance and supervision, and the need to develop a flexible and adaptable regulatory framework.
[0048] There is no mature solution for intelligent programmatic identification of abnormal securities transactions. There are some algorithms that use artificial intelligence algorithms to detect abnormal transfer transactions, which are usually referred to as abnormal transactions, but they are very different from abnormal securities transactions in terms of modeling methods and application scenarios.
[0049] In order to solve the above pain points, the demand for abnormal trading behavior feature discovery and early warning system in the securities market has been proposed. The applicant proposed a method for monitoring spatiotemporal patterns of programmatic trading based on graph neural networks, built AI models such as deep learning and machine learning, enabled programmatic trading supervision business, mined hidden abnormal patterns from large-scale trading data, performed programmatic anomaly identification, and assisted compliance risk control personnel in identifying, judging and monitoring programmatic abnormal transactions, thereby improving the work efficiency of compliance risk control business management. Ultimately, it will help improve the level of intelligent application of compliance risk control and help the digital upgrade of compliance supervision.
[0050] In the prior art, abnormal programmed trading detection is generally based on expert rules. Securities trading supervision requires that the formulated rule model and the derived expert scorecard model rules generally include the following aspects:
[0051] 1. False declaration: refers to abnormal trading behavior that does not aim at transaction, but induces, misleads or affects other investors' normal trading decisions through large-scale declaration and cancellation. Such as some situations in the opening call auction stage and continuous auction stage. 2. Pushing up or suppressing stock prices: refers to abnormal trading behavior in which large-scale declaration, continuous declaration, intensive declaration or declaration of transaction at a price that is obviously deviated from the latest transaction price of the stock, during which the stock trading price obviously rises (falls). 3. Maintaining the price limit of increase (decrease): refers to abnormal trading behavior in which the stock trading price is kept within the state of increase (decrease) limit through large-scale declaration, continuous declaration and intensive declaration. 4. Self-buying and self-selling or mutual counterparty transactions: refers to abnormal trading behavior in which a large number of stock transactions are carried out between a single account, between accounts actually controlled by oneself or between suspected related accounts, affecting the stock trading price or trading volume. 5. Abnormal declaration rate of stocks with severe abnormal fluctuations: Severe abnormal fluctuations refer to the situation of severe abnormal fluctuations stipulated in the trading rules in the auction transactions of main board stocks. 6. Other abnormal trading behaviors that violate laws, administrative regulations, departmental regulations, normative documents or business rules of this exchange. The traditional rule-based identification method is no longer applicable to new programmatic trading. Expert rules are relatively simple and fixed, and it is difficult to cover all possible abnormal trading situations and to discover complex hidden abnormal patterns. Traditional rule-based identification technology currently only locates ordinary trading anomalies. There are no clear expert regulations for programmatic trading, and it is difficult to distinguish whether the anomaly comes from programmatic trading. The environment and conditions of the financial market often change, including market trends, liquidity, trading rules, etc. This rapid change makes it difficult for expert rules to adjust and adapt to new market conditions in a timely manner, making it difficult to quickly discover and identify new abnormal trading behaviors; limited by the complexity, diversity and secrecy of programmatic trading, new expert rules face problems such as difficulty in mining, low updating efficiency and poor adaptability. Some complex abnormal trading behaviors involve complex trading patterns, data associations and nonlinear relationships, which are not easy to detect with simple rules.
[0052] In the prior art, although transaction relationship graphs are used to detect abnormal financial entities, they cannot be used in securities trading. The acquisition of securities trading relationship graphs is much more complicated and difficult than this kind of relationship graph. In securities trading, the trading subjects are not point-to-point transactions, but are matched with centralized exchanges, and the counterparties are unclear. The transaction nodes cannot be described by simple transfer relationships. How to realize the generation of graph structure in securities trading is a major difficulty of this technical solution. The method extracts features from the credit card transaction relationship graph to obtain the credit card transaction relationship feature graph; the credit card transaction relationship feature graph is input into the graph neural network to obtain the abnormal prediction results of each financial entity; wherein the graph neural network includes at least one graph convolution layer and one prediction layer. The method still considers the problem of static graph structure, and retraining and feature extraction process are required after adding new nodes. In securities trading, the number of transaction nodes that need to be judged changes dynamically, that is, new trader trading accounts are added to the graph network at any time, and because the scale of securities trading graphs is huge, frequent retraining does not meet actual requirements. It is necessary to realize the dynamic scalability technology of the graph, which is not available in this method. Traditional graph neural networks cannot solve the problem of scale explosion in securities trading. The abnormal nodes of securities trading nodes are account-target-time. As the daily trading time expands, the number of nodes to be determined increases sharply, and effective pruning and model updating methods need to be implemented, which this method cannot solve. In securities anomaly identification, the abnormal behavior data is extremely unbalanced, that is, the number of abnormal samples is extremely small. In such problems, effective data and sample enhancement technologies need to be designed to enhance the effect of actual anomaly detection. The unbalanced sample processing mechanism is something this method cannot solve.
[0053] Compared with traditional methods, the embodiments of the present invention provide a method for monitoring the spatiotemporal patterns of programmatic trading using deep neural networks for spatiotemporal data and graph neural networks. The method has the ability to perform complex modeling analysis, mining and prediction under massive high-frequency trading data, and can effectively assist in the accurate prediction of programmatic anomalies. Graph neural networks are a type of neural network used to process graph data. Graph neural networks have achieved good results in the fields of social network analysis and recommendation systems. In programmatic trading, graph neural networks can be used to model trading data to extract the spatiotemporal patterns of trading data. Neural networks can better capture complex trading patterns and correlations, thereby improving the accuracy and efficiency of abnormal transaction identification, finding hidden new abnormal transactions, improving the effectiveness of compliance management, reducing illegal transaction risks, improving market stability and fairness, and achieving regulatory goals. The method for monitoring the spatiotemporal patterns of programmatic trading using graph neural networks also has the characteristics of automation and scalability, and can better adapt to market dynamics and emerging new forms of abnormal transactions. The method first converts the transaction data into the form of spatiotemporal data and constructs a time series deep neural network model; further, the spatiotemporal data is combined with the account node structure to construct a graph network and embed graph vectors to construct a graph neural network model. Figure 4 As shown in the figure, feature and sample enhancement algorithms are used in the model training process to mine hidden abnormal patterns from large-scale transaction data, ensure the accuracy, reliability and timeliness of the abnormal transaction identification model, and improve the work efficiency of compliance and risk control business management.
[0054] The embodiment of the present invention is aimed at anomaly detection in programmatic trading. Aiming at the problem of complex spatiotemporal relationship of trading behavior, the method of monitoring spatiotemporal patterns of abnormal transactions based on graph neural network is studied. By adopting graph neural network to fuse different types of relationships in trading data, and adopting network structures such as recurrent neural network and attention mechanism to model the temporal connection between transactions, real-time abnormal trading pattern discovery is achieved, and abnormal clues are provided to support the automatic generation of regulatory reports. The key technologies include: time series deep neural network modeling, graph neural network modeling, feature and sample enhancement algorithm and model deployment, to ensure the accuracy, reliability and efficiency of abnormal transaction identification model, and to ensure that the model has high accuracy, reliability and timeliness.
[0055] Figure 1 The flowchart of the programmatic abnormal securities trading risk identification method provided by the embodiment of the present invention is shown, and the method is executed by a computer device. The computer device may include a computer, an intelligent terminal, a distributed device, etc., and the embodiment of the present invention does not make specific restrictions. Figure 1 As shown, the method comprises the following steps:
[0056] Step 110: Obtain current transaction data for the current period.
[0057] The embodiment of the present invention periodically acquires securities trading data, and the current period is a period of the data acquisition cycle. By periodically acquiring securities trading data, the model is predicted through the programmed securities trading data identified in the historical period to identify the risks of the current trading data in the current period, so that the model combines the temporal characteristics of the data.
[0058] In the embodiment of the present invention, the current transaction data is in the form of a spatiotemporal sequence, and a piece of current transaction data includes information such as transaction time, customer identification (customer ID), account information, fund flow, transaction flow, transaction subject, and transaction unit time. Specifically, the Shanghai and Shenzhen stock market snapshots, customer basic information table, customer asset flow table, customer order withdrawal flow table, and other information are obtained, and the current transaction data is extracted based on this information.
[0059] Step 120: extracting features from the current transaction data of the current period to obtain current transaction features corresponding to the current transaction data.
[0060] Among them, firstly, feature extraction is performed on the current transaction data, and data cleaning and standardization processing is performed on the current transaction data to obtain the pre-processed current transaction features. Specifically, after data collection, data cleaning is performed, including removing duplicate data, processing outliers, etc. Outliers are processed, such as transaction data with negative prices or quantities or extremely abnormal needs to be checked and processed. There may be missing values in the data, such as some transaction records lack investor information or account information. For missing values, methods such as filling, deletion or interpolation are selected to process to ensure the integrity of the data. For numerical data, standardization processing is required to eliminate the dimensional differences between different variables to ensure the stability and accuracy of the model. Afterwards, according to the pre-set transaction feature dimensions, the pre-processed current transaction features are screened and processed to obtain the final current transaction features. Among them, the pre-set transaction feature dimensions are the transaction feature dimensions required for model prediction obtained after feature extraction, feature preprocessing, dimensionality reduction, feature enhancement and sample enhancement of programmatic transaction samples in advance during training.
[0061] Step 130: construct current graph structure data according to the current transaction features of the current transaction data.
[0062] The current graph structure data includes a plurality of graph nodes and edges. In the embodiment of the present invention, the graph node of the current graph structure data is used to represent a current transaction data; and the edge is used to represent the relationship between each current transaction data.
[0063] In the embodiment of the present invention, Figure 3As shown, when determining the current transaction data, each current transaction data is taken as a graph node, and edges are constructed between the current transaction data with associated relationships to obtain the initial graph structure current transaction data; the node attributes of the graph nodes include the current transaction features of the current transaction data.
[0064] Step 140: Input the current graph structure data into a first transaction risk identification model to obtain a first risk identification result.
[0065] In an embodiment of the present invention, the first transaction risk model is obtained by inputting graph structure sample data into a graph neural network model for model training. The graph structure sample data is constructed based on transaction feature data of the programmatic transaction samples at historical moments.
[0066] Specifically, the graph structure sample data is obtained in the following way:
[0067] Step 001: Determine the programmed trading sample according to the preset programmed trading determination rules.
[0068] The programmatic trading sample includes programmatic trading sample feature data and corresponding sample labels; the programmatic trading sample feature data includes sample basic feature data and sample time series feature data. Figure 2 As shown, the basic characteristic data of the sample includes investor / client identification, transaction subject and transaction time information. The sample time series characteristic data includes fields such as customer identification, sample label, transaction identification, transaction unit time, account information, fund flow, transaction flow, etc. Among them, the sample label is a label that characterizes whether the programmatic trading sample is a positive or negative sample. The sample label is based on the fact that customers / investors who have had programmatic trading behavior in the historical period are identified as customers who are capable of programmatic trading. Therefore, according to the customer identification, if there is a trading behavior that meets the definition of ordinary abnormal trading in the historical period, the label of the trading unit time corresponding to the time when the corresponding historical trading behavior occurred is 1, that is, it is judged to be a positive sample with programmatic abnormal trading behavior in this trading period.
[0069] In an embodiment of the present invention, the preset programmatic trading determination rules include whether the number of transactions exceeds a preset transaction number threshold, or whether the transaction amount exceeds a preset transaction amount threshold, or whether the transaction proportion exceeds a preset proportion threshold. Among them, according to the account identifier of the historical transaction data, the historical transaction data whose number of transactions corresponding to the account identifier within a preset time period is greater than the preset transaction number threshold is statistically determined as a programmatic trading sample; according to the account identifier of the historical transaction data, the transaction data whose transaction amount corresponding to the account identifier is greater than the preset transaction amount threshold is statistically determined as a programmatic trading sample; according to the account identifier of the historical transaction data, the transaction data whose transaction proportion corresponding to the account identifier within a preset time period is greater than the preset proportion threshold is statistically determined as a programmatic trading sample. Thus, a programmatic trading sample in the form of spatiotemporal data is obtained.
[0070] Step 002: constructing graph structure sample data according to the programmed transaction sample characteristic data of the programmed transaction sample.
[0071] like Figure 3 As shown, the graph structure sample data includes graph nodes and edges; the graph nodes are used to represent a programmatic trading sample, and the graph nodes include the investor information, target information and transaction time information of the programmatic trading sample; the edges are used to represent the association between each programmatic trading sample; the edges between the graph nodes are established based on whether each of the graph nodes is the same investor, the same account, and / or whether the same target is traded. Specifically, the graph nodes are constructed according to investor-target-time, and the relationship between the nodes can be represented by a graph structure. The edges represent the relationship between them, and here the edge relationship of the graph is established based on whether the nodes are the same investor, the same account, whether the same stock is traded, etc.
[0072] After the graph structure sample data is established, the following steps are used to determine the final programmatic trading sample feature data of the graph structure sample data (that is, to determine which dimensions can be used as programmatic trading sample feature data in the following manner):
[0073] Step 0021: Perform data cleaning and standardization on the sample information of the programmed trading sample to obtain pre-processed programmed trading sample characteristic data.
[0074] Specifically, after data collection, data cleaning is performed, including removing duplicate data and processing outliers. Outliers should be processed, such as negative or extremely abnormal transaction data in price or quantity. There may be missing values in the data, such as some transaction records lacking investor information or account information. For missing values, methods such as filling, deleting or interpolation can be used to ensure data integrity. For numerical data, standardization is required to eliminate dimensional differences between different variables and ensure the stability and accuracy of the model.
[0075] Step 0022: Perform dimensionality reduction processing on the pre-processed program trading sample feature data to obtain the program trading sample feature data after dimensionality reduction processing.
[0076] The embodiment of the present invention performs dimensionality reduction processing on the program trading sample feature data by calculating the similarity between the features, and obtains the program trading sample feature data after dimensionality reduction processing. In one specific implementation, 111-dimensional program trading sample feature data is constructed, and through similarity calculation, 26-dimensional features with correlation greater than 0.9 are removed, and 85-dimensional effective features are confirmed. As shown in Table 1, the typical features obtained include order cancellation transaction ratio, market share of the number of valid declarations of price limits, declaration amount in the opening call auction interval, number of declaration cancellations, reverse transaction transaction amount, number of large orders, number of high buy and low sell, etc.
[0077] Table 1:
[0078]
[0079]
[0080]
[0081] Step 0023: Use graph contrast learning to enhance the feature representation of graph nodes, and obtain the feature data of programmatic trading samples after enhanced feature representation.
[0082] Among them, based on sample features and label results, combined with the generalized samples obtained by data enhancement technology, a programmatic abnormal transaction identification model is constructed. In programmatic abnormal transaction detection, the transaction data is represented as a graph structure, in which the nodes represent the transaction process of a time period. The participants in the programmatic trading process of securities are called investors. A single investor can have up to 20 trading accounts, and a single account can trade multiple targets. The trading time can also be grouped. Therefore, Figure 3As shown in the figure, the graph nodes are constructed based on investor-target-time, and the relationship between nodes can be represented by the graph structure. The edge represents the relationship between them. Here, the edge relationship of the graph is established based on whether the nodes are the same investor, the same account, whether they trade the same stock, etc. The attribute information of the node is the features constructed above, including transaction time, price, quantity, etc.
[0083] The embodiment of the present invention uses graph contrast learning to enhance the feature representation of graph nodes and mine deep features. By learning the embedded representation of nodes or graphs, the similarities between positive samples are emphasized and the differences between negative samples are widened. This helps to make nodes or graphs of the same category close to each other in the embedding space, and nodes or graphs of different categories far away from each other. In graph contrast learning, two identical graph neural networks share weights and process positive samples and negative samples respectively, so that they are close to or far apart in the embedding space.
[0084] In the embodiment of the present invention, after the feature representation of the graph nodes is enhanced through graph contrast learning, the positive samples need to be enhanced because the ratio of positive and negative samples is very unbalanced. In addition, the transaction itself is affected by a variety of random factors, and specific features do not necessarily lead to specific results. Therefore, when enhancing the data, it is necessary to simulate the randomness of prices and yields to a certain extent. In order to increase the applicability of enhanced samples, the embodiment of the present invention adopts a variety of mixed methods to extract enhanced samples through steps 0024-0026, and uses a supervised model to filter and screen the enhanced samples, and retains credible enhanced samples to improve the sample enhancement effect.
[0085] Step 0024: Perform sample enhancement on the programmatic transaction sample feature data after the enhanced feature representation by oversampling to generate a first type of enhanced samples.
[0086] The first type of enhanced samples are generated by the synthetic minority over-sampling technique. The generation method uses k-nearest neighbors to find neighboring samples for all minority samples, and then performs linear random interpolation to achieve sample synthesis. In this way, the diversity of samples is enhanced.
[0087] Step 0025: Enhance the samples through sample mixing technology to generate the second type of enhanced samples.
[0088] Among them, the sample mixing technology is used to generate the second type of enhanced samples. The specific strategy of adding Gaussian noise to all feature columns and label columns is as follows:
[0089] X'=X+noise_b*noise_n,
[0090] X.shape=(batch_size,col_size)
[0091] noise_b~Bernoulli(1,p_noise,size=(batch_size,col_size)),
[0092] noise_n~Normal(0,x_var,size=(batch_size,col_size))
[0093] y'=y+noise_b*noise_n,
[0094] y.shape = (batch_size, 1)
[0095] noise_b~Bernoulli(1,p_noise,size=(batch_size,1)),
[0096] noise_n~Normal(0,x_var,size=(batch_size,1)).
[0097] Step 0026: Perform sample enhancement through conditional generative adversarial network to generate the third type of enhanced samples.
[0098] Among them, the conditional generative adversarial network (cGAN) is composed of a generator and a discriminator. The generator is responsible for generating realistic data to "fool" the discriminator, while the discriminator is responsible for judging whether a sample is real or "made". GAN training is actually a process of mutual learning and game between the two. However, since the data generated by the original GAN is random and unpredictable, it is impossible to control the network to output data with specific attributes, and the controllability is not strong. To address this problem, cGAN was proposed, the core of which is to integrate attribute information y into the generator and discriminator. Here y is a programmed abnormal label. Finally, cGAN is used to generate the third type of enhanced samples.
[0099] Step 0027: According to the gradient descent boosting tree model, feature screening is performed on the programmatic transaction sample feature data after the enhanced feature representation, the first type of enhanced samples, the second type of enhanced samples and the third type of enhanced samples to obtain the final programmatic transaction sample feature data of the graph structure sample data.
[0100] Among them, after obtaining enhanced samples in various ways, the diversity of enhanced samples has been guaranteed, but the validity and applicability of the samples are not guaranteed. Therefore, the embodiment of the present invention also trains the gradient descent boosting tree model based on the obtained (X, y) enhanced samples in combination with the original samples to select the top 30 important feature columns. Calculate the min_q quantile and max_q quantile of these feature columns and label columns on the validation set, and in (X', y'), intercept the data rows with feature values and label values between the two, that is, through machine learning generalization, retain valid samples and remove the generated outlier samples.
[0101] Through the above methods, the diversity of samples is ensured and false samples can be effectively eliminated.
[0102] Step 003: Input the graph structure sample data into the graph neural network model for model training to obtain a first transaction risk identification model.
[0103] Among them, the sample data of the graph structure after sample enhancement can be divided into a training set and a test set for model training and evaluation.
[0104] In an embodiment of the present invention, the training scheme of the graph neural network model uses GraphSage as the basic model. GraphSage is a node representation learning method for graph data, which aims to learn the representation vector of the node to facilitate subsequent tasks such as node classification, link prediction, and graph clustering. The core idea of GraphSage is to update the representation of the node by aggregating the neighbor node features of the node, thereby obtaining the global information of the node. The sample data of the graph structure is input into the GraphSage model training to obtain the first transaction risk identification model. Among them, GraphSage can greatly reduce the scale of the problem. There is no need to train the entire graph containing millions of nodes. Only the target nodes need to be sampled for low-order aggregation and retraining. Secondly, in the anomaly detection problem with extremely unbalanced samples, a small number of positive samples can be used as target nodes. GraphSage can also efficiently process nodes that have never been seen. When new nodes appear in the graph, the adjacency matrix of GCN or GAT changes and needs to be retrained. When GraphSage predicts, it only needs to aggregate the neighbor information of the new node to make predictions for the new node without updating the entire adjacency matrix of millions of nodes. The method for monitoring spatiotemporal pattern anomalies in programmed trading using a graph neural network in an embodiment of the present invention constructs a graph network with each trading interval (preset period) of each account as a node, and models it as a graph neural network node classification model.
[0105] When the graph structure sample data is input into the GraphSage model for training, the GraphSage model is divided into the following steps, through which the graph structure sample data is pruned to perform prediction:
[0106] 1. Randomly sample neighbors, and the number of neighbors sampled per hop is no more than N;
[0107] 2. Generate the aggregation of the target node: First aggregate the features of the two-hop neighbors to generate the embedding vector of the one-hop neighbors, then aggregate the one-hop embedding vector to generate the embedding vector of the target node;
[0108] 3. Input the embedding vector of the target node into the fully connected network to obtain the predicted value of the target node.
[0109] Among them, in order to control the scale of the graph, according to the preset business rules, the programmatic transaction sample feature data of the graph structure sample data is pruned to obtain the first pruned programmatic transaction sample feature data; the first pruned programmatic transaction sample feature data is feature aggregated, similarity is calculated, and the first pruned programmatic transaction sample feature data is pruned again according to the similarity and similarity threshold to obtain the second pruned programmatic transaction sample feature data; the local structure of the graph is calculated according to the community detection partitioning algorithm, and the second pruned programmatic transaction sample feature data is pruned again to obtain the third pruned programmatic transaction sample feature data. Specifically, the embodiment of the present invention adopts three methods, first relying on artificial rules and business experience, then cutting edges according to aggregated features, then calculating the n% quantile of cosine similarity, determining the threshold, discarding edges below the threshold, and finally relying on the community detection partitioning algorithm to calculate the local structure of the graph and cutting nodes. This is because, during the training process, it may be found that there is no abnormality after the edge connection between some graph nodes, so it is deleted; some accounts are whitelisted (such as institutional accounts, with low risks), and the data corresponding to these accounts are deleted.
[0110] In the embodiment of the present invention, the GraphSage model training process is as follows: 1. The positive and negative sample points agreed as above are used as target nodes. 2. Each target node samples M one-hop samples and N two-hop samples (2-layer message passing) of the sampling graph. It is necessary to sample samples before the transaction time of the target node to prevent the leakage of sample sequence. When the samples are sufficient, sampling without replacement is adopted, and resampling is adopted when the samples are insufficient. 3. The M*N samples are aggregated to the target node through the aggregation operation of GraphSage. 4. The problem scale is reduced from the full graph scale to a small-scale graph node data, and trained through the FC layer and abnormal label. Through the above method, the first transaction risk identification model after training is obtained. During training, considering that the programmatic abnormal transaction detection belongs to the extreme sample imbalance problem, the usual machine learning evaluation methods such as accuracy and recall are difficult to fully characterize the accuracy of the problem. The embodiment of the present invention adopts downsampling precision, top k% sample recall, and AUC and other indicators to measure the model accuracy, and the accuracy of the downsampling precision indicator can reach 85%.
[0111] After obtaining the first transaction risk identification model, the current graph structure data of the current period is input into the first transaction risk identification model to obtain a first risk identification result. The first risk identification result represents the account with programmed trading risk in the current period, including account information with transaction risk in the current period, such as account identification, investor information, transaction target information, etc.
[0112] In an embodiment of the present invention, the current transaction data of the current period is data in the form of a spatiotemporal series. In order to improve the accuracy of the prediction, the method performs risk identification through multi-model fusion. The method also includes: inputting the current transaction features into the second transaction risk identification model and the third transaction risk identification model respectively to obtain a second risk identification result and a third risk identification result; the second transaction risk model is obtained by training a preset unsupervised time series neural network model according to a programmed transaction sample; the third transaction risk model is obtained by training a preset supervised time series neural network model according to a programmed transaction sample; according to the first risk identification result, the second risk identification result and the third risk identification result, a target risk identification result is obtained. The unsupervised time series neural network model can be an Isolation Forest, and the supervised time series neural network model can be a lightGBM (LSTM, CNN-LSTM+attention). By averaging the prediction results of multiple models, an average value is obtained as the final output.
[0113] The embodiment of the present invention constructs graph structure data of securities trading data based on spatiotemporal data, preprocesses and screens the features of the graph data structure, and identifies risks through graph neural networks, which can better capture complex trading patterns and correlations, thereby improving the accuracy and efficiency of abnormal trading identification, finding hidden new abnormal transactions, improving the effect of compliance management, reducing illegal trading risks, improving market stability and fairness, and achieving regulatory goals. The programmatic trading spatiotemporal pattern anomaly monitoring method of graph neural networks also has the characteristics of automation and scalability, which can better adapt to market dynamics and emerging new abnormal trading forms. The embodiment of the present invention adds intuitive programmatic trading identification logic for securities trading anomalies, which facilitates the generalization of programmatic trading identification; according to the extreme imbalance problem of abnormal behavior data of securities trading data, effective data and sample enhancement technology is designed to improve the effect of anomaly detection. Furthermore, through multi-model fusion, neural network models such as unsupervised models and supervised models are used to average the prediction results of multiple models to obtain an average value as the final output, effectively improving the accuracy of programmatic risk identification.
[0114] Figure 5 The schematic diagram of the structure of the programmable abnormal securities trading risk identification device provided by the embodiment of the present invention is shown. Figure 5 As shown, the device 500 includes:
[0115] The data determination module 510 is used to obtain the current transaction data of the current period;
[0116] A feature extraction module 520 is used to extract features from the current transaction data in the current period to obtain current transaction features corresponding to the current transaction data;
[0117] A construction module 530 is used to construct current graph structure data according to the current transaction characteristics of the current transaction data; the current graph structure data includes a plurality of graph nodes and edges; the graph node is used to represent a current transaction data; the edge is used to represent the relationship between each current transaction data;
[0118] Identification module 540 is used to input the current graph structure data into a first transaction risk identification model to obtain a first risk identification result; the first transaction risk model is obtained by training a graph neural network model based on graph structure sample data; the graph structure sample data is constructed based on transaction feature data of the programmed transaction samples at historical moments; the first risk identification result includes account information that has transaction risks in the current period.
[0119] In an optional manner, the device also includes: a second identification module, used to input the current transaction features into a second transaction risk identification model and a third transaction risk identification model respectively to obtain a second risk identification result and a third risk identification result; a third identification module, used to train the second transaction risk model based on programmed transaction samples to obtain a preset unsupervised time series neural network model; the third transaction risk model is obtained by training a preset supervised time series neural network model based on programmed transaction samples; a target identification module, used to obtain a target risk identification result based on the first risk identification result, the second risk identification result and the third risk identification result.
[0120] In an optional manner, the device also includes: a programmed determination module, which is used to determine a programmed trading sample according to a preset programmed trading determination rule; the programmed trading sample includes programmed trading sample feature data and a corresponding sample label; the programmed trading sample feature data includes sample basic feature data and sample timing feature data; a sample graph structure construction module, which is used to construct graph structure sample data according to the programmed trading sample feature data of the programmed trading sample; the graph structure sample data includes graph nodes and edges; the graph nodes are used to characterize a programmed trading sample, and the graph nodes include investor information, target information and transaction time information of the programmed trading sample; the edges are used to characterize the relationship between each programmed trading sample; the edges between the graph nodes are established according to whether each of the graph nodes is the same investor, the same account, and / or whether the same target is traded; the graph structure sample data is input into a graph neural network model for model training to obtain a first transaction risk identification model.
[0121] In an optional manner, the preset programmed transaction determination rules include whether the number of transactions exceeds a preset transaction number threshold, or whether the transaction amount exceeds a preset transaction amount threshold, or whether the transaction proportion exceeds a preset proportion threshold; the determination of programmed transaction samples based on the preset programmed transaction determination rules includes: based on the account identifier of the historical transaction data, statistically determining that the historical transaction data whose number of transactions corresponding to the account identifier within a preset time period is greater than the preset transaction number threshold is the programmed transaction sample; based on the account identifier of the historical transaction data, statistically determining that the transaction data whose transaction amount corresponding to the account identifier is greater than the preset transaction amount threshold is the programmed transaction sample; based on the account identifier of the historical transaction data, statistically determining that the transaction data whose transaction proportion corresponding to the account identifier within a preset time period is greater than the preset proportion threshold is the programmed transaction sample.
[0122] In an optional manner, constructing graph structure sample data according to the programmed transaction sample characteristic data of the programmed transaction sample includes: performing data cleaning and standardization processing on the sample information of the programmed transaction sample to obtain the pre-processed programmed transaction sample characteristic data; performing dimensionality reduction processing on the pre-processed programmed transaction sample characteristic data to obtain the programmed transaction sample characteristic data after dimensionality reduction processing; taking each programmed transaction sample as a graph node, constructing edges between each programmed transaction sample having an associated relationship, and obtaining the initial graph structure sample data; the node attributes of the graph node include the programmed transaction sample characteristic data after dimensionality reduction processing of the programmed transaction sample;
[0123] The feature representation of graph nodes is enhanced by graph contrast learning to obtain the programmatic trading sample feature data after the enhanced feature representation; the programmatic trading sample feature data after the enhanced feature representation is enhanced by oversampling to generate the first type of enhanced samples; the sample is enhanced by sample mixing technology to generate the second type of enhanced samples; the sample is enhanced by conditional generative adversarial network to generate the third type of enhanced samples; according to the gradient descent boosting tree model, the programmatic trading sample feature data after the enhanced feature representation, the first type of enhanced samples, the second type of enhanced samples and the third type of enhanced samples are feature screened to obtain the final programmatic trading sample feature data of the graph structure sample data.
[0124] In an optional manner, the device also includes: a first pruning module, which is used to prune the programmatic transaction sample feature data of the graph structure sample data according to preset business rules to obtain the first pruned programmatic transaction sample feature data; a second pruning module, which is used to perform feature aggregation on the first pruned programmatic transaction sample feature data, calculate the similarity, and prune the first pruned programmatic transaction sample feature data again according to the similarity and the similarity threshold to obtain the second pruned programmatic transaction sample feature data; a third pruning module, which is used to calculate the local structure of the graph according to the community detection partitioning algorithm, and prune the second pruned programmatic transaction sample feature data again to obtain the third pruned programmatic transaction sample feature data.
[0125] In an optional manner, the graph neural network model is a GraphSage model; the step of inputting the graph structure sample data into the graph neural network model training to obtain a first transaction risk identification model includes: inputting the graph structure sample data into the GraphSage model training to obtain a first transaction risk identification model.
[0126] The embodiment of the present invention constructs graph structure data of securities trading data based on spatiotemporal data, preprocesses and screens the features of the graph data structure, and identifies risks through graph neural networks, which can better capture complex trading patterns and correlations, thereby improving the accuracy and efficiency of abnormal trading identification, finding hidden new abnormal transactions, improving the effect of compliance management, reducing illegal trading risks, improving market stability and fairness, and achieving regulatory goals. The programmatic trading spatiotemporal pattern anomaly monitoring method of graph neural networks also has the characteristics of automation and scalability, which can better adapt to market dynamics and emerging new abnormal trading forms. The embodiment of the present invention adds intuitive programmatic trading identification logic for securities trading anomalies, which facilitates the generalization of programmatic trading identification; according to the extreme imbalance problem of abnormal behavior data of securities trading data, effective data and sample enhancement technology is designed to improve the effect of anomaly detection. Furthermore, through multi-model fusion, neural network models such as unsupervised models and supervised models are used to average the prediction results of multiple models to obtain an average value as the final output, effectively improving the accuracy of programmatic risk identification.
[0127] Figure 6 The schematic diagram of the structure of the computer device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computer device.
[0128] like Figure 6 As shown, the computer device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
[0129] Wherein: the processor 602, the communication interface 604, and the memory 606 communicate with each other through the communication bus 608. The communication interface 604 is used to communicate with other devices such as a client or other server network elements. The processor 602 is used to execute the program 610, which can specifically execute the relevant steps in the above-mentioned embodiment of the method for programmatically identifying the risk of abnormal securities transactions. Specifically, the program 610 may include a program code, which includes computer executable instructions.
[0130] The processor 602 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0131] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0132] The program 610 may be specifically called by the processor 602 to enable the computer device to perform the following operations:
[0133] Get the current transaction data for the current period;
[0134] Extracting features of the current transaction data in the current period to obtain current transaction features corresponding to the current transaction data;
[0135] According to the current transaction features of the current transaction data, current graph structure data is constructed; the current graph structure data includes a plurality of graph nodes and edges; the graph node is used to represent a current transaction data; the edge is used to represent the relationship between each current transaction data;
[0136] The current graph structure data is input into the first transaction risk identification model to obtain a first risk identification result; the first transaction risk model is obtained by training a graph neural network model based on the graph structure sample data; the graph structure sample data is constructed based on the transaction feature data of the programmed transaction samples at historical moments; the first risk identification result includes account information that has transaction risks in the current period.
[0137] In an optional manner, the current transaction features are respectively input into a second transaction risk identification model and a third transaction risk identification model to obtain a second risk identification result and a third risk identification result; the second transaction risk model is obtained by training a preset unsupervised time series neural network model according to programmed transaction samples; the third transaction risk model is obtained by training a preset supervised time series neural network model according to programmed transaction samples;
[0138] A target risk identification result is obtained according to the first risk identification result, the second risk identification result and the third risk identification result.
[0139] In an optional manner, before inputting the current graph structure data into the first transaction risk identification model to obtain the first risk identification result, the method includes:
[0140] According to the preset program trading determination rules, a program trading sample is determined; the program trading sample includes program trading sample feature data and a corresponding sample label; the program trading sample feature data includes sample basic feature data and sample time series feature data;
[0141] According to the programmed trading sample characteristic data of the programmed trading sample, graph structure sample data is constructed; the graph structure sample data includes graph nodes and edges; the graph node is used to represent a programmed trading sample, and the graph node includes investor information, target information and transaction time information of the programmed trading sample; the edge is used to represent the relationship between each programmed trading sample; the edge between the graph nodes is established according to whether each graph node is the same investor, the same account, and / or whether the same target is traded;
[0142] The graph structure sample data is input into the graph neural network model for model training to obtain a first transaction risk identification model.
[0143] In an optional manner, the preset programmed transaction determination rules include whether the number of transactions exceeds a preset transaction number threshold, or whether the transaction amount exceeds a preset transaction amount threshold, or whether the transaction proportion exceeds a preset proportion threshold; the determination of programmed transaction samples based on the preset programmed transaction determination rules includes: based on the account identifier of the historical transaction data, statistically determining that the historical transaction data whose number of transactions corresponding to the account identifier within a preset time period is greater than the preset transaction number threshold is the programmed transaction sample; based on the account identifier of the historical transaction data, statistically determining that the transaction data whose transaction amount corresponding to the account identifier is greater than the preset transaction amount threshold is the programmed transaction sample; based on the account identifier of the historical transaction data, statistically determining that the transaction data whose transaction proportion corresponding to the account identifier within a preset time period is greater than the preset proportion threshold is the programmed transaction sample.
[0144] In an optional manner, constructing graph structure sample data based on the programmed transaction sample feature data of the programmed transaction sample includes: performing data cleaning and standardization processing on the sample information of the programmed transaction sample to obtain pre-processed programmed transaction sample feature data; performing dimensionality reduction processing on the pre-processed programmed transaction sample feature data to obtain the programmed transaction sample feature data after dimensionality reduction processing; taking each programmed transaction sample as a graph node, constructing edges between each programmed transaction sample with an associated relationship, and obtaining initial graph structure sample data; the node attributes of the graph node include the programmed transaction sample feature data after dimensionality reduction processing of the programmed transaction sample. The method comprises the following steps: characterizing data; using graph contrast learning to enhance the feature representation of graph nodes to obtain the programmatic trading sample feature data after the enhanced feature representation; performing sample enhancement on the programmatic trading sample feature data after the enhanced feature representation by oversampling to generate a first type of enhanced samples; performing sample enhancement by sample mixing technology to generate a second type of enhanced samples; performing sample enhancement by conditional generative adversarial network to generate a third type of enhanced samples; and performing feature screening on the programmatic trading sample feature data after the enhanced feature representation, the first type of enhanced samples, the second type of enhanced samples and the third type of enhanced samples according to a gradient descent boosting tree model to obtain the final programmatic trading sample feature data of the graph structure sample data.
[0145] In an optional manner, before inputting the graph structure sample data into a graph neural network model for training to obtain a first transaction risk identification model, the method further includes: pruning the programmatic transaction sample feature data of the graph structure sample data according to preset business rules to obtain first pruned programmatic transaction sample feature data; performing feature aggregation on the first pruned programmatic transaction sample feature data to calculate similarity, and pruning the first pruned programmatic transaction sample feature data again according to the similarity and a similarity threshold to obtain second pruned programmatic transaction sample feature data; calculating the local structure of the graph according to a community detection partitioning algorithm, and pruning the second pruned programmatic transaction sample feature data again to obtain third pruned programmatic transaction sample feature data.
[0146] In an optional manner, the graph neural network model is a GraphSage model; the step of inputting the graph structure sample data into the graph neural network model training to obtain a first transaction risk identification model includes: inputting the graph structure sample data into the GraphSage model training to obtain a first transaction risk identification model.
[0147] The embodiment of the present invention constructs graph structure data of securities trading data based on spatiotemporal data, preprocesses and screens the features of the graph data structure, and identifies risks through graph neural networks, which can better capture complex trading patterns and correlations, thereby improving the accuracy and efficiency of abnormal trading identification, finding hidden new abnormal transactions, improving the effect of compliance management, reducing illegal trading risks, improving market stability and fairness, and achieving regulatory goals. The programmatic trading spatiotemporal pattern anomaly monitoring method of graph neural networks also has the characteristics of automation and scalability, which can better adapt to market dynamics and emerging new abnormal trading forms. The embodiment of the present invention adds intuitive programmatic trading identification logic for securities trading anomalies, which facilitates the generalization of programmatic trading identification; according to the extreme imbalance problem of abnormal behavior data of securities trading data, effective data and sample enhancement technology is designed to improve the effect of anomaly detection. Furthermore, through multi-model fusion, neural network models such as unsupervised models and supervised models are used to average the prediction results of multiple models to obtain an average value as the final output, effectively improving the accuracy of programmatic risk identification.
[0148] An embodiment of the present invention provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on a computer device, the computer device executes the programmed abnormal securities trading risk identification method in any of the above method embodiments.
[0149] The executable instructions can be specifically used to cause the computer device to perform the following operations:
[0150] Get the current transaction data for the current period;
[0151] Extracting features of the current transaction data in the current period to obtain current transaction features corresponding to the current transaction data;
[0152] According to the current transaction features of the current transaction data, current graph structure data is constructed; the current graph structure data includes a plurality of graph nodes and edges; the graph node is used to represent a current transaction data; the edge is used to represent the relationship between each current transaction data;
[0153] The current graph structure data is input into the first transaction risk identification model to obtain a first risk identification result; the first transaction risk model is obtained by training a graph neural network model based on the graph structure sample data; the graph structure sample data is constructed based on the transaction feature data of the programmed transaction samples at historical moments; the first risk identification result includes account information that has transaction risks in the current period.
[0154] In an optional manner, the current transaction features are respectively input into a second transaction risk identification model and a third transaction risk identification model to obtain a second risk identification result and a third risk identification result; the second transaction risk model is obtained by training a preset unsupervised time series neural network model according to programmed transaction samples; the third transaction risk model is obtained by training a preset supervised time series neural network model according to programmed transaction samples; based on the first risk identification result, the second risk identification result and the third risk identification result, a target risk identification result is obtained.
[0155] In an optional manner, before the current graph structure data is input into the first transaction risk identification model to obtain the first risk identification result, the method includes: determining a programmed transaction sample according to a preset programmed transaction determination rule; the programmed transaction sample includes programmed transaction sample feature data and a corresponding sample label; the programmed transaction sample feature data includes sample basic feature data and sample timing feature data; constructing graph structure sample data according to the programmed transaction sample feature data of the programmed transaction sample; the graph structure sample data includes graph nodes and edges; the graph nodes are used to characterize a programmed transaction sample, and the graph nodes include investor information, target information and transaction time information of the programmed transaction sample; the edges are used to characterize the association between each programmed transaction sample; the edges between the graph nodes are established according to whether each of the graph nodes is the same investor, the same account, and / or whether the same target is traded; the graph structure sample data is input into a graph neural network model for model training to obtain a first transaction risk identification model.
[0156] In an optional manner, the preset programmed transaction determination rules include whether the number of transactions exceeds a preset transaction number threshold, or whether the transaction amount exceeds a preset transaction amount threshold, or whether the transaction proportion exceeds a preset proportion threshold; the determination of programmed transaction samples based on the preset programmed transaction determination rules includes: based on the account identifier of the historical transaction data, statistically determining that the historical transaction data whose number of transactions corresponding to the account identifier within a preset time period is greater than the preset transaction number threshold is the programmed transaction sample; based on the account identifier of the historical transaction data, statistically determining that the transaction data whose transaction amount corresponding to the account identifier is greater than the preset transaction amount threshold is the programmed transaction sample; based on the account identifier of the historical transaction data, statistically determining that the transaction data whose transaction proportion corresponding to the account identifier within a preset time period is greater than the preset proportion threshold is the programmed transaction sample.
[0157] In an optional manner, constructing graph structure sample data based on the programmed transaction sample feature data of the programmed transaction sample includes: performing data cleaning and standardization processing on the sample information of the programmed transaction sample to obtain pre-processed programmed transaction sample feature data; performing dimensionality reduction processing on the pre-processed programmed transaction sample feature data to obtain the programmed transaction sample feature data after dimensionality reduction processing; taking each programmed transaction sample as a graph node, constructing edges between each programmed transaction sample with an associated relationship, and obtaining initial graph structure sample data; the node attributes of the graph node include the programmed transaction sample feature data after dimensionality reduction processing of the programmed transaction sample. The method comprises the following steps: characterizing data; using graph contrast learning to enhance the feature representation of graph nodes to obtain the programmatic trading sample feature data after the enhanced feature representation; performing sample enhancement on the programmatic trading sample feature data after the enhanced feature representation by oversampling to generate a first type of enhanced samples; performing sample enhancement by sample mixing technology to generate a second type of enhanced samples; performing sample enhancement by conditional generative adversarial network to generate a third type of enhanced samples; and performing feature screening on the programmatic trading sample feature data after the enhanced feature representation, the first type of enhanced samples, the second type of enhanced samples and the third type of enhanced samples according to a gradient descent boosting tree model to obtain the final programmatic trading sample feature data of the graph structure sample data.
[0158] In an optional manner, before inputting the graph structure sample data into a graph neural network model for training to obtain a first transaction risk identification model, the method further includes: pruning the programmatic transaction sample feature data of the graph structure sample data according to preset business rules to obtain first pruned programmatic transaction sample feature data; performing feature aggregation on the first pruned programmatic transaction sample feature data to calculate similarity, and pruning the first pruned programmatic transaction sample feature data again according to the similarity and a similarity threshold to obtain second pruned programmatic transaction sample feature data; calculating the local structure of the graph according to a community detection partitioning algorithm, and pruning the second pruned programmatic transaction sample feature data again to obtain third pruned programmatic transaction sample feature data.
[0159] In an optional manner, the graph neural network model is a GraphSage model; the step of inputting the graph structure sample data into the graph neural network model training to obtain a first transaction risk identification model includes: inputting the graph structure sample data into the GraphSage model training to obtain a first transaction risk identification model.
[0160] The embodiment of the present invention constructs graph structure data of securities trading data based on spatiotemporal data, preprocesses and screens the features of the graph data structure, and identifies risks through graph neural networks, which can better capture complex trading patterns and correlations, thereby improving the accuracy and efficiency of abnormal trading identification, finding hidden new abnormal transactions, improving the effect of compliance management, reducing illegal trading risks, improving market stability and fairness, and achieving regulatory goals. The programmatic trading spatiotemporal pattern anomaly monitoring method of graph neural networks also has the characteristics of automation and scalability, which can better adapt to market dynamics and emerging new abnormal trading forms. The embodiment of the present invention adds intuitive programmatic trading identification logic for securities trading anomalies, which facilitates the generalization of programmatic trading identification; according to the extreme imbalance problem of abnormal behavior data of securities trading data, effective data and sample enhancement technology is designed to improve the effect of anomaly detection. Furthermore, through multi-model fusion, neural network models such as unsupervised models and supervised models are used to average the prediction results of multiple models to obtain an average value as the final output, effectively improving the accuracy of programmatic risk identification.
[0161] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general systems may also be used with the teachings based thereon. Based on the above description, the structure required to construct such a system is obvious. In addition, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the present invention described herein can be implemented using various programming languages, and the above description of a specific language is to disclose the best implementation of the present invention. In the specification provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present invention can be practiced without these specific details. In some examples, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this specification. Similarly, it should be understood that in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. It will be appreciated by those skilled in the art that the modules in the devices in the embodiments may be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and they may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this specification (including accompanying claims, abstracts and drawings) may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0162] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may design alternative embodiments without departing from the scope of the present application. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim that lists a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limiting the order of execution.
Claims
1. A programmed abnormal securities trading risk identification method, characterized in that: The method comprises: Get the current transaction data for the current period; Extracting features of the current transaction data in the current period to obtain current transaction features corresponding to the current transaction data; According to the current transaction features of the current transaction data, current graph structure data is constructed; the current graph structure data includes a plurality of graph nodes and edges; the graph node is used to represent a current transaction data; the edge is used to represent the relationship between each current transaction data; The current graph structure data is input into the first transaction risk identification model to obtain a first risk identification result; the first transaction risk model is obtained by training a graph neural network model based on the graph structure sample data; the graph structure sample data is constructed based on the transaction feature data of the programmed transaction samples at historical moments; the first risk identification result includes account information that has transaction risks in the current period.
2. The method according to claim 1, characterized in that: The method further comprises: The current transaction features are respectively input into the second transaction risk identification model and the third transaction risk identification model to obtain the second risk identification result and the third risk identification result; the second transaction risk model is obtained by training a preset unsupervised time series neural network model according to the programmed transaction samples; the third transaction risk model is obtained by training a preset supervised time series neural network model according to the programmed transaction samples; A target risk identification result is obtained according to the first risk identification result, the second risk identification result and the third risk identification result.
3. The method according to claim 1 or 2, characterized in that: Before inputting the current graph structure data into the first transaction risk identification model to obtain the first risk identification result, the method includes: According to the preset program trading determination rules, a program trading sample is determined; the program trading sample includes program trading sample feature data and a corresponding sample label; the program trading sample feature data includes sample basic feature data and sample time series feature data; According to the programmed trading sample characteristic data of the programmed trading sample, graph structure sample data is constructed; the graph structure sample data includes graph nodes and edges; the graph node is used to represent a programmed trading sample, and the graph node includes investor information, target information and transaction time information of the programmed trading sample; the edge is used to represent the relationship between each programmed trading sample; the edge between the graph nodes is established according to whether each graph node is the same investor, the same account, and / or whether the same target is traded; The graph structure sample data is input into the graph neural network model for model training to obtain a first transaction risk identification model.
4. The method according to claim 3, characterized in that The preset programmatic trading determination rules include whether the number of transactions exceeds a preset transaction number threshold, or whether the transaction amount exceeds a preset transaction amount threshold, or whether the transaction proportion exceeds a preset proportion threshold; The step of determining the programmed trading sample according to the preset programmed trading determination rules includes: According to the account identifier of the historical transaction data, the historical transaction data whose transaction times corresponding to the account identifier within a preset time period are greater than a preset transaction times threshold are statistically determined as programmed transaction samples; According to the account identifier of the historical transaction data, the transaction data whose transaction amount corresponding to the account identifier is greater than a preset transaction amount threshold is statistically determined as a programmed transaction sample; According to the account identifier of the historical transaction data, the transaction data whose transaction proportion corresponding to the account identifier within a preset time period is greater than a preset proportion threshold is statistically determined as a programmed transaction sample.
5. The method according to claim 3, characterized in that: The step of constructing graph structure sample data according to the programmatic transaction sample feature data of the programmatic transaction sample includes: Performing data cleaning and standardization processing on the sample information of the programmed trading sample to obtain pre-processed programmed trading sample characteristic data; Performing dimensionality reduction processing on the pre-processed program trading sample feature data to obtain the program trading sample feature data after dimensionality reduction processing; Each programmatic trading sample is taken as a graph node, and edges are constructed between the programmatic trading samples that have an associated relationship, so as to obtain initial graph structure sample data; the node attributes of the graph node include the programmatic trading sample feature data after the dimensionality reduction processing of the programmatic trading sample; Use graph contrast learning to enhance the feature representation of graph nodes, and obtain the feature data of programmatic trading samples after enhanced feature representation; Performing sample enhancement on the programmatic transaction sample feature data after the enhanced feature representation by oversampling to generate a first type of enhanced samples; The samples are enhanced by using sample mixing technology to generate the second type of enhanced samples; The samples are enhanced through conditional generative adversarial networks to generate the third type of enhanced samples; According to the gradient descent boosting tree model, feature screening is performed on the programmatic transaction sample feature data after the enhanced feature representation, the first type of enhanced samples, the second type of enhanced samples and the third type of enhanced samples to obtain the final programmatic transaction sample feature data of the graph structure sample data.
6. The method according to claim 3, characterized in that Before inputting the graph structure sample data into a graph neural network model for model training to obtain a first transaction risk identification model, the method further includes: According to a preset business rule, pruning the programmatic transaction sample feature data of the graph structure sample data to obtain the programmatic transaction sample feature data after first pruning; Performing feature aggregation on the first pruned programmatic transaction sample feature data, calculating similarity, and pruning the first pruned programmatic transaction sample feature data again according to the similarity and the similarity threshold, to obtain second pruned programmatic transaction sample feature data; According to the local structure of the graph calculated by the community detection partitioning algorithm, the second pruned programmatic trading sample feature data is pruned again to obtain the third pruned programmatic trading sample feature data.
7. The method according to claim 3, characterized in that The graph neural network model is a GraphSage model; the graph structure sample data is input into the graph neural network model for training to obtain a first transaction risk identification model, including: The graph structure sample data is input into the GraphSage model training to obtain a first transaction risk identification model.
8. A programmed abnormal securities trading risk identification device, characterized in that: The device comprises: A data determination module, used to obtain current transaction data for the current period; A feature extraction module, used to extract features from the current transaction data in the current period to obtain current transaction features corresponding to the current transaction data; A construction module, configured to construct current graph structure data according to current transaction features of the current transaction data; the current graph structure data includes a plurality of graph nodes and edges; the graph node is used to represent a current transaction data; the edge is used to represent the relationship between each current transaction data; An identification module is used to input the current graph structure data into a first transaction risk identification model to obtain a first risk identification result; the first transaction risk model is obtained by training a graph neural network model based on graph structure sample data; the graph structure sample data is constructed based on transaction feature data of the programmed transaction samples at historical moments; the first risk identification result includes account information that has transaction risks in the current period.
9. A computer device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the programmed abnormal securities trading risk identification method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction, and when the executable instruction is executed on a computer device, the computer device executes the operation of the programmed abnormal securities transaction risk identification method as described in any one of claims 1-7.
Citation Information
Patent Citations
Programmed trading strategy management system and management method based on Internet
CN103500417A
Risk identification method and device, computer equipment and storage medium
CN114386981A
Bank anti-call fraud data model construction method based on multi-feature fusion
CN117993919A
Anti-fraud transaction identification method and system based on artificial intelligence
CN118070141A
Cited By
Fraudulent transaction risk monitoring method and device based on graph neural network, equipment and medium
CN119722106A
Transaction risk analysis method and device
CN119809648A
Abnormal transaction identification and early warning system based on financial time sequence characteristics
CN120031572A
Dangerous article risk detection method, device, equipment, medium and program product
CN120145246A
Collaborative market manipulation behavior identification method, system, device and medium
CN120765388A
