Transaction processing method and device, equipment, medium and product
By using a competitive dual-depth Q-network model (D3QN) to process the state information of transaction events, the problem of poor accuracy in transaction processing is solved, and efficient processing of complex transaction information is achieved, thereby improving the accuracy of transaction processing and decision-making efficiency.
Patent Information
- Application Number
- CN202511057582.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-11
AI Technical Summary
Existing transaction processing technologies are ill-suited to complex abnormal transaction patterns, leading to situations where normal transactions are blocked or abnormal transactions are allowed, resulting in poor accuracy.
A competitive dual deep Q-network model (D3QN) is used for transaction processing. By determining the state information of transaction events, including the transaction user state, temporal features and environmental state, convolutional neural networks, long short-term memory networks and attention networks are used for feature extraction and temporal modeling. The optimal processing strategy, including interception, release and warning, is determined by combining the epsilon-greedy strategy.
It improves the accuracy of transaction processing, can adapt to complex transaction information, accurately extract event features, capture temporal correlations, improve decision-making efficiency, and adapt to the needs of complex transaction scenarios.
Smart Images

Figure CN120931395A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a transaction processing method, apparatus, device, medium and product. Background Technology
[0002] Currently, core transaction processing technologies, including rule engines and graph computing, are difficult to adapt to complex abnormal transaction patterns, leading to situations where normal transactions are easily blocked or abnormal transactions are allowed to proceed. Summary of the Invention
[0003] The present invention provides a transaction processing method, apparatus, device, medium, and product that can adapt to the processing of complex transaction information and improve the accuracy of transaction processing.
[0004] In a first aspect, embodiments of the present invention provide a transaction processing method, the method comprising:
[0005] In response to the triggering of a transaction event, determine the transaction information associated with the transaction event;
[0006] Based on the transaction information, the first event status information corresponding to the transaction event is determined. The first event status information includes transaction user status information, transaction timing characteristic information, and transaction environment status information.
[0007] Input the first event status information into the transaction processing model to obtain the first processing strategy for the transaction event;
[0008] The transaction processing model is a competitive dual-depth Q-network model. The transaction processing model is trained based on sample transaction information and sample processing strategies of sample transaction events. The first processing strategy includes interception, release, and warning.
[0009] Secondly, embodiments of the present invention provide a transaction processing apparatus, the apparatus comprising:
[0010] The transaction information determination module is used to determine the transaction information associated with a transaction event in response to the triggering of the transaction event.
[0011] The event status information determination module is used to determine the first event status information corresponding to the transaction event based on the transaction information. The first event status information includes transaction user status information, transaction timing characteristic information, and transaction environment status information.
[0012] The processing strategy determination module is used to input the first event status information into the transaction processing model to obtain the first processing strategy for the transaction event;
[0013] The transaction processing model is a competitive dual-depth Q-network model. The transaction processing model is trained based on sample transaction information and sample processing strategies of sample transaction events. The first processing strategy includes interception, release, and warning.
[0014] Thirdly, embodiments of the present invention also provide a computer device, the computer device comprising:
[0015] One or more processors;
[0016] Memory, used to store one or more programs;
[0017] When the above one or more programs are executed by one or more processors, the above one or more processors implement the transaction processing method provided in any embodiment of the present invention.
[0018] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the transaction processing method as provided in any embodiment of the present invention.
[0019] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the transaction processing method provided in any embodiment of the present invention.
[0020] The embodiments of the above invention have the following advantages or beneficial effects:
[0021] In this embodiment of the invention, in response to the triggering of a transaction event, transaction information associated with the transaction event is determined; based on the transaction information, first event state information corresponding to the transaction event is determined, including transaction user state information, transaction timing feature information, and transaction environment state information; the first event state information is input into a transaction processing model to obtain a first processing strategy for the transaction event; wherein, the transaction processing model is a competitive dual-depth Q-network model, and the transaction processing model is trained based on sample transaction information and sample processing strategies of sample transaction events, and the first processing strategy includes interception, release, and warning. The technical solution of this embodiment of the invention solves the problem of poor accuracy in current transaction processing, can adapt to the processing of complex transaction information, and improves the accuracy of transaction processing. Attached Figure Description
[0022] Figure 1 This is a flowchart of a transaction processing method provided in an embodiment of the present invention;
[0023] Figure 2 This is a flowchart of a transaction processing method provided in an embodiment of the present invention;
[0024] Figure 3This is a schematic diagram of a transaction processing method provided in an embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram of the structure of a transaction processing device provided in an embodiment of the present invention;
[0026] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0027] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0028] Figure 1 This is a flowchart illustrating a transaction processing method provided in an embodiment of the present invention. This embodiment is applicable to transaction processing scenarios. The method can be executed by a transaction processing device, which can be implemented in software and / or hardware and integrated into a computer device with application development capabilities.
[0029] like Figure 1 As shown, the transaction processing method in this embodiment includes the following steps:
[0030] S110. In response to the triggering of a transaction event, determine the transaction information associated with the transaction event.
[0031] When a user performs a payment action, such as clicking the payment confirmation button, the transaction system triggers a corresponding transaction event. In response to this event, the system queries and aggregates transaction information associated with the event through a pre-defined database, cache, or third-party interface.
[0032] S120. Determine the first event status information corresponding to the transaction event based on the transaction information.
[0033] Transaction event feature information is obtained by extracting features from transaction information. This feature information can include transaction characteristics, user profile information, and transaction environment data. For example, transaction features such as amount, timestamp, and merchant category code are extracted; user profile information such as credit rating and historical behavior tags are extracted; transaction device fingerprints such as device ID hash, IP address, and browser fingerprint are extracted; and transaction environment data such as GPS coordinates, network latency, and proxy detection results are extracted. Based on the extracted transaction feature information, the first event status information corresponding to the transaction event is determined through data analysis and data integration.
[0034] The first event status information includes transaction user status information, transaction time-series characteristic information, and transaction environment status information. For example, transaction user status information, i.e., user attribute information, changes infrequently and reflects the basic risk level; it may include the credit rating of the transacting party, historical fraud rate, device fingerprint, and the authenticity of registration information. Transaction time-series characteristic information represents the real-time changing characteristics of transaction patterns, used to capture short-term anomalies; it may include the weighted transaction amount sequence of the transacting user, deviation of behavioral patterns, and sliding window statistics of transaction characteristics from historical transaction events. The transaction environment status information represents the environmental context in which the transaction occurs, reflecting external risk factors; it may include sudden changes in geographical location and IP risk scoring.
[0035] S130. Input the first event status information into the transaction processing model to obtain the first processing strategy for the transaction event.
[0036] The transaction processing model is a competitive double-depth Q-network model, trained based on sample transaction information and processing strategies from sample transaction events. The first processing strategy includes interception, release, and warning. The competitive double-depth Q-network model, also known as the D3QN network, combines the ideas of Double DQN and Dueling DQN algorithms. Double DQN and Dueling DQN are variations of the DQN algorithm. Double DQN separates action selection and value estimation to avoid overestimation of value. Dueling DQN decomposes the Q-value into state value and advantage function, obtaining more decision-making basis.
[0037] The competitive dual-depth Q-network model comprises an evaluation network and a target network. The evaluation network selects actions based on the first event state information from the input network using an action selection strategy such as an epsilon-greedy strategy. The optimal action selected corresponds to the processing strategy of the first processing strategy, which is then executed. After the first processing strategy is executed, the first event state information and the first processing strategy are added to the experience replay pool as training samples. During the training phase, the target network generates a target Q-value. The parameters of the transaction processing model are updated using the target Q-value and the predictions from the evaluation network.
[0038] The transaction processing model is trained based on sample transaction information and processing strategies from sample transaction events. The initial model takes the sample event state information, determined by the feature information of the sample transaction events, as input, and the sample processing strategy as the target action label. Parameter optimization is performed by incorporating feedback signals from transaction results, ultimately resulting in a converged transaction processing model. Therefore, in the application phase, the transaction processing model, based on the model parameters determined through training with a large number of samples, performs feature extraction and strategy inference on the input event state information to obtain the first processing strategy.
[0039] The technical solution of this embodiment determines the transaction information associated with the transaction event in response to the triggering of the transaction event; determines the first event state information corresponding to the transaction event based on the transaction information, the first event state information including transaction user state information, transaction timing feature information, and transaction environment state information; inputs the first event state information into the transaction processing model to obtain the first processing strategy for the transaction event; wherein, the transaction processing model is a competitive dual-depth Q-network model, and the transaction processing model is trained based on sample transaction information and sample processing strategies of sample transaction events, the first processing strategy includes interception, release, and warning. The technical solution of this embodiment solves the problem of poor accuracy in current transaction processing, can adapt to the processing of complex transaction information, and improves the accuracy of transaction processing.
[0040] Figure 2 This is a flowchart illustrating a transaction processing method provided in an embodiment of the present invention. This embodiment belongs to the same inventive concept as the transaction processing methods in the above embodiments, and further describes the process of determining the processing strategy. This method can be executed by a transaction processing device, which can be implemented in software and / or hardware and integrated into a computer device with application development capabilities.
[0041] like Figure 2 As shown, the transaction processing method in this embodiment includes the following steps:
[0042] S210. In response to the triggering of a transaction event, determine the transaction information associated with the transaction event.
[0043] like Figure 3 As shown, transaction information can include transaction characteristics, device fingerprints, user profiles, and geographical location.
[0044] S220. Determine the first event status information corresponding to the transaction event based on the transaction information.
[0045] The first event status information can be the transaction event triggered (t). i The spatiotemporal fusion state s corresponding to the time. i =[Φ i ,Γ i H i ], Φ i For transaction user status information, Γ i For transaction timing characteristics, H i This embodiment constructs a multi-modal spatiotemporal state, integrating user static profiles, dynamic behaviors, and environmental context to comprehensively characterize transaction risks. It performs local anomaly capture and long-term behavior modeling, achieving multi-dimensional feature complementarity, further enhancing transaction characterization capabilities. The attention mechanism focuses on key state dimensions, clarifies risk signals, and improves the accuracy of subsequent processing strategy determination.
[0046] S230. Input the first event state information into the transaction processing model, and extract features from the first event state information through the convolutional neural network layer of the transaction processing model to obtain the convolutional layer processing result.
[0047] The Convolutional Neural Network (CNN) layer consists of multiple convolutional kernels of different sizes. It can extract local transaction pattern features from the first event state information through the convolutional kernels, such as sudden large transactions and high-frequency small-amount trials, to obtain the processing results of the convolutional layer.
[0048] S240. The convolutional layer processing results are modeled temporally using the long short-term memory network layer of the transaction processing model to obtain the temporal modeling results.
[0049] The LSTM layer of the transaction processing model is used to perform temporal modeling on the processing results of the convolutional layer, extracting long-term temporal dependencies, such as periodic trading habits. The number of input channels is consistent with the number of output channels of the CNN, and the output bidirectional hidden state captures both forward and backward causality, thus obtaining the temporal modeling results.
[0050] S250. The transaction feature vector is obtained by performing attention-weighted calculation on the time series modeling results through the attention network layer of the transaction processing model.
[0051] The attention network layer of the transaction processing model is used to calculate feature weights and identify the importance of different time steps and feature dimensions. For example, more weights are given to recent transactions and abnormal device fingerprints. The time series modeling results are then weighted by attention based on the feature weights to obtain the transaction feature vector.
[0052] S260. The evaluation network of the transaction processing model determines the optimal action based on the transaction feature vector and a preset action selection strategy, and uses the processing method corresponding to the optimal action as the first processing strategy for the transaction event.
[0053] The preset action selection strategy can be an epsilon-greedy strategy. The transaction feature vector is input to the policy inference layer of the evaluation network. Through the policy inference layer and the epsilon-greedy strategy, at time t... i Among the possible decision actions at any given moment—allowing passage, issuing a warning, and intercepting—determine the optimal action and adopt the processing method corresponding to the optimal action as the primary processing strategy for the transaction event. i .
[0054] The optimal action selection is determined according to the following formula:
[0055] P(a i =argmax a Q(a))=1-ε i ;
[0056] in, Indicates t i The network randomly selects an action from the action set at each moment, i.e., allow, warn, and block. The epsilon-greedy policy tends to choose randomly in the early stages of training and to choose based on experience in the later stages. In addition to selecting the action with the highest reward, it may also randomly select an action, which helps to escape local optima.
[0057] In one optional implementation, the second event state information after the execution of the first processing strategy is determined based on the state transition function, the first processing strategy, and the first event state information; the event attributes of the transaction event are obtained, and the reward value after the execution of the first processing strategy is calculated based on the event attributes, the event attributes including abnormal transactions and normal transactions; the first event state information, the second event state information, the first processing strategy, and the reward value are added as the first sample to the experience replay pool used to store training samples.
[0058] Based on the state transition function and the first processing strategy a i and the first event status information s i Determine the second event status information s after the execution of the first processing strategy. i+1 After the first processing strategy is executed, the event attributes of the transaction event are obtained. The event attributes include abnormal transactions and normal transactions. The event attributes are used to determine whether the event has been processed correctly, and then determine 'a' based on whether the processing is correct. i Reward value r after execution i , will the first event status information s i Second event status information s i+1 First processing strategy a i and reward value r i It is added as the first sample to the experience replay pool used to store training samples.
[0059] In one optional implementation, calculating the reward value after the execution of the first processing strategy based on event attributes can be achieved by: determining an immediate reward based on the mapping relationship between the first event attribute determined by the trading system associated with the transaction event and the preset event attribute and processing strategy after the execution of the first processing strategy; determining a cost penalty based on the strategy type of the first processing strategy; determining a delayed reward based on the mapping relationship between the second event attribute determined by manual review or the transaction review agency and the preset event attribute and processing strategy; and calculating the reward value based on the immediate reward, delayed reward, and cost penalty to obtain the reward value after the execution of the first processing strategy.
[0060] For example, the reward value r i The calculation method can be expressed by the following formula:
[0061] For immediate rewards, a, b, and c are preset weight values. The first event attribute is determined by an algorithm that identifies the event attributes of the transaction system associated with the transaction event. A positive reward is given when a fraudulent transaction is intercepted or flagged, and a negative reward is given when a legitimate transaction is intercepted or a fraudulent transaction is missed. ψ i This represents the cost penalty, setting different cost values for release, interception, and warning. Considering that the risk type of some transactions cannot be determined immediately, ω is defined. i To represent delayed rewards, historical rewards can be updated using n-step TD (n-step Temporal Difference) to balance the impact of multi-step delays. When processing each transaction event in real-time, the current state (first-time state), action (first-time processing strategy), and timestamp t are used. i A unique transaction identifier is stored in a temporary cache queue. When a manual review result or a third-party fraud label from a transaction review agency arrives, the corresponding record in the cache is searched based on the unique transaction identifier. If the record is found and has not expired, the first-time status pair is extracted and the sample reward value r is calculated. i Add the record to the experience replay pool. If the record has expired or a preset time window has passed, discard the third-party fraud label.
[0062] In one optional implementation, sample transaction information associated with a sample transaction event is obtained, and at least one feature information in the sample transaction information is modified according to a preset adversarial sample generation rule to obtain a second sample; the second sample is added to an experience replay pool used to store training samples.
[0063] To further enhance the model's robustness and resistance to attacks, the method introduces adversarial attacks. By simulating potential policy changes through adversarial examples, the model is forced to dynamically adapt to new attack patterns. This effectively identifies bypass attacks launched by fraudsters through carefully designed adversarial transactions, such as feature perturbations and behavioral pattern spoofing, while also adapting to dynamic changes in the environment, such as iterative fraud strategies.
[0064] Based on pre-defined adversarial example generation rules, at least one feature of the sample transaction information is modified, such as the amount, timestamp, and device fingerprint. For example, the amount is fluctuated within ±10% to simulate exploratory transactions; a random delay, such as less than 5 minutes, is added to the timestamp to evade frequency detection; secondary features of the device fingerprint, such as screen resolution, are modified while keeping the core hash unchanged to simulate escape attacks and poisoning attacks. Adversarial examples can be generated using FGSM (Fast Gradient Sign Method).
[0065]
[0066] χ i This represents the perturbation strength, which can be gradually increased as training progresses to avoid early overfitting. 's' represents sample transaction information. ω represents the direction of the disturbance.
[0067] Disturbance intensity χ i It can be calculated using the following formula:
[0068] χ i As the number of iterations i decreases from the minimum value χ min Gradually increase to χ max .
[0069] By introducing adversarial attacks, the adversarial loss is added to the model's total loss during subsequent training. The model parameters are updated based on backpropagation, enabling the model to learn to identify abnormal patterns in feature perturbations, improve the model's classification confidence for ambiguous samples, cover a wide range of fraud patterns, and gain insights into new fraud methods.
[0070] This embodiment uses FGSM to generate adversarial examples to simulate the evolution of fraud strategies, helping the model adapt to the risk of fraud variants and solving the problem of model strategy rigidity.
[0071] In one optional implementation, in response to training the transaction processing model, training samples are randomly selected from the experience replay pool; the second event state information of the training samples is input into the transaction processing model, and the action corresponding to the optimal action value is obtained through the evaluation network; the target action value corresponding to the optimal action value is calculated through the target network, and the target value is calculated based on the target action value and the reward value of the training samples, which is used as a reference value for updating the evaluation network; based on the target value and the predicted state action value of the training samples output by the evaluation network, the loss value is calculated through a preset loss function, and the parameters of the evaluation network are updated based on the loss value.
[0072] In the application phase, the transaction processing model continues to be trained based on new samples. Training samples are randomly selected from the first and second samples in the experience replay pool; the second event state information s of the training samples is then used to train the transaction processing model. i+1 In the input transaction processing model, the optimal action value is determined by the evaluation network, that is, the action with the highest Q value. Then, the action value of the action is calculated by the target network, and the target value is obtained based on the action value and the reward value of the training samples.
[0073] The target value, or target Q-value, is then calculated based on the policy value and the reward value corresponding to the first processing policy of the training samples. The target Q-value can be calculated using the following formula:
[0074] y i =r i+γ·Q(s i+1 argmax A Q(s i+1 ,a,ω),ω ′ );
[0075] Where γ is a discount factor used to weigh the importance of future rewards, and argmax A Q(s i+1 (a, ω) represents the state s i+1 Next, select action a that maximizes Q, Q(s) i+1 (a, ω) is the Q-value estimate for evaluating the network ω, where ω ′ ω represents the parameters of the target network, and ω represents the parameters of the evaluation network.
[0076] Based on the target value y i And evaluate the predicted state-action values Q(s) of the training samples output by the network. i ,a i The loss value is calculated using a preset loss function, and the parameters ω of the evaluation network are updated based on the loss value.
[0077] In this embodiment, the Q value, i.e., the state action value, is determined based on the state value function V(s). i ,θ,β) and action advantage function A(s i ,a i Given the state values (θ, α), the state value stream and the action dominance stream are combined through a convergence operation to form the state-action value Q(s). i ,a i ,θ,α,β).
[0078] The state action value, or action value, can be calculated using the following formula:
[0079] This embodiment adopts the D3QN architecture, which separates the value function and advantage function of the dual neural network, solves the overestimation problem, and ensures faster and more stable model convergence.
[0080] The preset loss function can be:
[0081] L i (ω)=E[(y i -Q(s i ,a i ,ω)) 2 ];
[0082] The gradient of the network loss function can be further expressed as follows:
[0083]
[0084] The evaluation network parameters are updated using a gradient descent strategy, while the target network parameters are softly updated based on the evaluation network parameters. The target network parameter ω... ′ The update method is as follows:
[0085] ω′←τω+(1-τ)ω;
[0086] Where τ represents the soft update parameter, the target network slowly tracks and evaluates the network parameters, which can reduce Q(s) i ,a i ,ω) and y i The correlation between them effectively avoids the problem of algorithm overestimation. This embodiment constructs a spatiotemporal fusion state based on transaction information and mines its potential features to accurately depict the full picture of transaction risk. The D3QN framework solves the overestimation problem in traditional deep reinforcement learning. At the same time, an adversarial evolution mechanism is introduced to enhance the robustness of the model and help the model adapt to dynamic and time-varying fraud methods. It can effectively assess transaction risks and provide disposal strategies, and to a certain extent cope with fraud risks. By updating parameters based on new samples, it reduces the dependence on manual intervention while ensuring adaptability to fraud methods.
[0087] The technical solution of this embodiment determines the transaction information associated with the transaction event in response to the triggering of the transaction event; determines the first event state information corresponding to the transaction event based on the transaction information; the first event state information includes transaction user state information, transaction time sequence feature information, and transaction environment state information; inputs the first event state information into the transaction processing model, extracts features from the first event state information through the convolutional neural network layer of the transaction processing model, and obtains the convolutional layer processing result; performs time sequence modeling on the convolutional layer processing result through the long short-term memory network layer of the transaction processing model, and obtains the time sequence modeling result; performs attention weighted calculation on the time sequence modeling result through the attention network layer of the transaction processing model, and obtains the transaction feature vector; and determines the optimal action based on the transaction feature vector through the evaluation network of the transaction processing model using a preset action selection strategy, and uses the processing method corresponding to the optimal action as the first processing strategy of the transaction event; wherein, the transaction processing model is a competitive dual deep Q network model, and the transaction processing model is trained based on sample transaction information and sample processing strategies of sample transaction events, and the first processing strategy includes interception, release, and warning. The technical solution of this invention solves the problem of poor accuracy in current transaction processing. It can adapt to the processing of complex transaction information, improve the accuracy of transaction processing, and by combining convolutional networks, LSTM and attention mechanisms, it can accurately extract event features, capture temporal correlations and focus on key information. Then, the evaluation network selects the best option using a preset action selection strategy, which not only ensures the depth of feature extraction and the accuracy of temporal modeling, but also strengthens important features through the attention mechanism, improves the pertinence of transaction strategies and decision-making efficiency, and adapts to the needs of complex transaction scenarios.
[0088] Figure 4 This is a schematic diagram of a transaction processing device provided in an embodiment of the present invention. This embodiment is applicable to transaction processing scenarios. The transaction processing device can be implemented by software and / or hardware and integrated into a computer terminal device with application development capabilities.
[0089] like Figure 4 As shown, the transaction processing device includes: a transaction information determination module 310, an event status information determination module 320, and a processing strategy determination module 330.
[0090] The transaction information determination module 310 is used to determine the transaction information associated with the transaction event in response to the triggering of the transaction event; the event status information determination module 320 is used to determine the first event status information corresponding to the transaction event based on the transaction information, the first event status information including transaction user status information, transaction timing feature information and transaction environment status information; the processing strategy determination module 330 is used to input the first event status information into the transaction processing model to obtain the first processing strategy for the transaction event; wherein, the transaction processing model is a competitive dual deep Q network model, the transaction processing model is trained based on sample transaction information and sample processing strategies of sample transaction events, and the first processing strategy includes interception, release and warning.
[0091] The technical solution of this embodiment determines the transaction information associated with the transaction event in response to the triggering of the transaction event; determines the first event state information corresponding to the transaction event based on the transaction information, the first event state information including transaction user state information, transaction timing feature information and transaction environment state information; inputs the first event state information into the transaction processing model to obtain the first processing strategy of the transaction event; wherein, the transaction processing model is a competitive dual deep Q network model, the transaction processing model is trained based on sample transaction information and sample processing strategies of sample transaction events, and the first processing strategy includes interception, release and warning.
[0092] In one optional implementation, the processing strategy determination module 330 is specifically used for:
[0093] The first event state information is input into the transaction processing model. Features are extracted from this information using a convolutional neural network layer, yielding the convolutional layer processing result. A long short-term memory network layer then performs temporal modeling on the convolutional layer processing result, producing a temporal modeling result. An attention network layer further performs attention-weighted calculations on the temporal modeling result, resulting in a transaction feature vector. Finally, the evaluation network of the transaction processing model determines the optimal action based on the transaction feature vector and a preset action selection strategy. This optimal action is then used as the first processing strategy for the transaction event. This invention solves the problem of poor accuracy in current transaction processing, adapts to the processing of complex transaction information, and improves transaction processing accuracy.
[0094] In one alternative embodiment, the apparatus further includes:
[0095] The first sample determination module is used to determine the second event state information after the execution of the first processing strategy based on the state transition function, the first processing strategy, and the first event state information; obtain the event attributes of the transaction event, calculate the reward value after the execution of the first processing strategy based on the event attributes, and the event attributes include abnormal transactions and normal transactions; and add the first event state information, the second event state information, the first processing strategy, and the reward value as the first sample to the experience replay pool used to store training samples.
[0096] The second sample determination module is used to obtain sample transaction information associated with sample transaction events, modify at least one feature information in the sample transaction information according to the preset adversarial sample generation rules, and obtain the second sample; the second sample is added to the experience replay pool used to store training samples.
[0097] The model training module is used to randomly select training samples from the experience replay pool in response to training the transaction processing model; input the second event state information of the training samples into the transaction processing model, and obtain the action corresponding to the optimal action value through the evaluation network; calculate the target action value of the action corresponding to the optimal action value through the target network, calculate the target value based on the target action value and the reward value of the training samples, and use the target value as a reference value for updating the evaluation network; calculate the loss value through a preset loss function based on the target value and the predicted state action value of the training samples output by the evaluation network, and update the parameters of the evaluation network based on the loss value.
[0098] In an optional implementation, the first sample determination module is further configured to: determine an immediate reward based on the mapping relationship between the first event attribute determined by the transaction system associated with the transaction event and the preset event attribute and processing strategy after the execution of the first processing strategy; determine a cost penalty based on the strategy type of the first processing strategy; determine a delayed reward based on the mapping relationship between the second event attribute determined by manual review or transaction review agency and the preset event attribute and processing strategy; and calculate the reward value based on the immediate reward, delayed reward, and cost penalty to obtain the reward value after the execution of the first processing strategy.
[0099] The transaction processing apparatus provided in the embodiments of the present invention can execute the transaction processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0100] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Figure 5 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 5 The computer device 12 shown is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the present invention. The computer device 12 can be any terminal device with computing capabilities, such as intelligent controllers and servers, mobile phones, and other terminal devices.
[0101] like Figure 5 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0102] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0103] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0104] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 5 Not shown; usually referred to as a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0105] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0106] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 5 As not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, R AID systems, tape drives, and data backup storage systems.
[0107] Processing unit 16 executes various functional applications and data processing by running programs stored in system memory 28, such as implementing the transaction processing method provided in this embodiment, which includes:
[0108] In response to the triggering of a transaction event, determine the transaction information associated with the transaction event;
[0109] Based on the transaction information, the first event status information corresponding to the transaction event is determined. The first event status information includes transaction user status information, transaction timing characteristic information, and transaction environment status information.
[0110] Input the first event status information into the transaction processing model to obtain the first processing strategy for the transaction event;
[0111] The transaction processing model is a competitive dual-depth Q-network model. The transaction processing model is trained based on sample transaction information and sample processing strategies of sample transaction events. The first processing strategy includes interception, release, and warning.
[0112] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the transaction processing method provided in any embodiment of this invention, the method comprising:
[0113] In response to the triggering of a transaction event, determine the transaction information associated with the transaction event;
[0114] Based on the transaction information, the first event status information corresponding to the transaction event is determined. The first event status information includes transaction user status information, transaction timing characteristic information, and transaction environment status information.
[0115] Input the first event status information into the transaction processing model to obtain the first processing strategy for the transaction event;
[0116] The transaction processing model is a competitive dual-depth Q-network model. The transaction processing model is trained based on sample transaction information and sample processing strategies of sample transaction events. The first processing strategy includes interception, release, and warning.
[0117] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0118] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0119] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0120] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, Python, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0121] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the transaction processing method provided in any embodiment of this application.
[0122] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, Python, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0123] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computing device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0124] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A transaction processing method, characterized in that, include: In response to the triggering of a transaction event, determine the transaction information associated with the transaction event; Based on the transaction information, a first event status information corresponding to the transaction event is determined, wherein the first event status information includes transaction user status information, transaction timing feature information, and transaction environment status information; The first event status information is input into the transaction processing model to obtain the first processing strategy for the transaction event; The transaction processing model is a competitive dual-depth Q-network model, which is trained based on sample transaction information and sample processing strategies of sample transaction events. The first processing strategy includes interception, release, and warning.
2. The method according to claim 1, characterized in that, The step of inputting the first event status information into the transaction processing model to obtain the first processing strategy for the transaction event includes: The first event state information is input into the transaction processing model, and the first event state information is processed by the convolutional neural network layer of the transaction processing model to obtain the convolutional layer processing result. The processing results of the convolutional layer are modeled temporally using the long short-term memory network layer of the transaction processing model to obtain the temporal modeling result. The transaction feature vector is obtained by performing attention-weighted calculation on the time-series modeling results through the attention network layer of the transaction processing model. The evaluation network of the transaction processing model determines the optimal action based on the transaction feature vector and a preset action selection strategy, and uses the processing method corresponding to the optimal action as the first processing strategy for the transaction event.
3. The method according to claim 2, characterized in that, The method also includes: Based on the state transition function, the first processing strategy, and the first event state information, determine the second event state information after the execution of the first processing strategy; Obtain the event attributes of the transaction event, and calculate the reward value after the execution of the first processing strategy based on the event attributes. The event attributes include abnormal transactions and normal transactions. The first event status information, the second event status information, the first processing strategy, and the reward value are added as the first sample to the experience replay pool used to store training samples.
4. The method according to claim 2, characterized in that, The method also includes: Obtain sample transaction information associated with sample transaction events, and modify at least one feature information in the sample transaction information according to preset adversarial sample generation rules to obtain a second sample; Add the second sample to the experience replay pool used to store training samples.
5. The method according to claim 3 or 4, characterized in that, The method also includes: In response to training the transaction processing model, training samples are randomly selected from the experience replay pool; The second event state information of the training samples is input into the transaction processing model, and the action corresponding to the optimal action value is obtained through the evaluation network. The target action value corresponding to the optimal action value is calculated through the target network. The target value is calculated based on the target action value and the reward value of the training sample. The target value is used as a reference value for evaluating network updates. Based on the target value and the predicted state action value of the training sample output by the evaluation network, a loss value is calculated using a preset loss function, and the parameters of the evaluation network are updated based on the loss value.
6. The method according to claim 3, characterized in that, The step of calculating the reward value after the execution of the first processing strategy based on the event attributes includes: Based on the mapping relationship between the first event attribute determined by the transaction system associated with the transaction event and the preset event attribute and processing strategy after the first processing strategy is executed, an immediate reward is determined. The cost penalty is determined based on the strategy type of the first processing strategy; The delay reward is determined based on the mapping relationship between the second event attribute determined by manual review or transaction review agency and the preset event attribute and processing strategy; The reward value is calculated based on the immediate reward, the delayed reward, and the cost penalty to obtain the reward value after the first processing strategy is executed.
7. A transaction processing apparatus, characterized in that, include: The transaction information determination module is used to determine the transaction information associated with a transaction event in response to the triggering of the transaction event. The event status information determination module is used to determine the first event status information corresponding to the transaction event based on the transaction information. The first event status information includes transaction user status information, transaction timing feature information, and transaction environment status information. The processing strategy determination module is used to input the first event status information into the transaction processing model to obtain the first processing strategy for the transaction event; The transaction processing model is a competitive dual-depth Q-network model, which is trained based on sample transaction information and sample processing strategies of sample transaction events. The first processing strategy includes interception, release, and warning.
8. A computer device, characterized in that, The computer device includes: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the transaction processing method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the transaction processing method as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the transaction processing method as described in any one of claims 1-6.