Transaction data security detection method and device, equipment and medium
By encoding and classifying transaction data through a quantum neural network model, the problem of transaction data security detection relying on manual experience in existing technologies is solved, and fast and accurate transaction data security detection is achieved, which reduces costs and improves detection efficiency and system security.
Patent Information
- Application Number
- CN202510690258.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-05
AI Technical Summary
The existing security detection scheme for transaction data relies on manual experience, which has high time and labor costs, and its accuracy is difficult to guarantee.
By obtaining the quantum state of the transaction data to be processed and inputting it into a pre-trained transaction data classification model, the quantum neural network model is used to determine the category label value of the transaction data, and finally the security detection result of the transaction data is determined based on the category label value.
It achieves fast and accurate transaction data security detection, reduces time and labor costs, improves detection efficiency and accuracy, and enhances the security of financial institutions' business systems.
Smart Images

Figure CN120597031A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for security detection of transaction data. Background Art
[0002] During the operation of a financial institution's business system, it acquires a large amount of transaction data. Each transaction data item may be a text file describing the transaction account number, transaction time, and transaction amount for a specific transaction conducted through the financial institution's business system. To ensure the security of the financial institution's business system and the transaction processes related to the financial institution's business system, after acquiring the transaction data, it is necessary to perform security checks on the transaction data to determine whether the transaction described in the transaction data is legitimate or fraudulent.
[0003] In the related art, a common transaction data security testing solution involves business personnel conducting security checks on transaction data obtained from a financial institution's business system based on manual experience to determine whether the transaction behavior described in the transaction data is normal or fraudulent. This transaction data security testing solution in the related art relies on manual experience, resulting in high time and labor costs, and difficulty in ensuring accuracy. Summary of the Invention
[0004] The present invention provides a transaction data security detection method, device, equipment and medium to solve the problem that the transaction data security detection scheme in the related art relies on manual experience, has high time and labor costs, and is difficult to ensure accuracy.
[0005] According to one aspect of the present invention, a method for security detection of transaction data is provided, comprising:
[0006] Acquiring transaction data to be processed, encoding the transaction data to be processed, and obtaining a quantum state of the transaction data to be processed;
[0007] Inputting the quantum state of the transaction data to be processed into a pre-trained transaction data classification model to obtain a category label value of the transaction data to be processed; wherein the category label value is a normal label value or a fraud label value, the transaction data classification model is obtained by training a quantum neural network model based on training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category label value of the transaction data;
[0008] A security detection result of the transaction data to be processed is determined according to the category mark value of the transaction data to be processed.
[0009] According to another aspect of the present invention, there is provided a transaction data security detection device, comprising:
[0010] a data acquisition module, configured to acquire transaction data to be processed, encode the transaction data to be processed, and obtain a quantum state of the transaction data to be processed;
[0011] a category determination module, configured to input the quantum state of the transaction data to be processed into a pre-trained transaction data classification model to obtain a category label value for the transaction data to be processed; wherein the category label value is a normal label value or a fraud label value, the transaction data classification model is obtained by training a quantum neural network model based on training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category label value for the transaction data;
[0012] The result determination module is used to determine the security detection result of the transaction data to be processed according to the category mark value of the transaction data to be processed.
[0013] According to another aspect of the present invention, an electronic device is provided, comprising:
[0014] at least one processor;
[0015] and a memory communicatively coupled to the at least one processor;
[0016] The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the transaction data security detection method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the transaction data security detection method described in any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the transaction data security detection method according to any embodiment of the present invention is implemented.
[0019] The technical solution of the embodiment of the present invention obtains the transaction data to be processed, encodes the transaction data to be processed, and obtains the quantum state of the transaction data to be processed; then the quantum state of the transaction data to be processed is input into a pre-trained transaction data classification model to obtain the category mark value of the transaction data to be processed; wherein the category mark value is a normal mark value or a fraud mark value, the transaction data classification model is obtained by training a quantum neural network model according to training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category mark value of the transaction data; finally, the security detection result of the transaction data to be processed is determined according to the category mark value of the transaction data to be processed, which solves the security detection problem of transaction data in the related art. The detection scheme relies on manual experience, has high time and labor costs, and is difficult to guarantee accuracy. The transaction data classification model constructed based on the quantum neural network model can be used to determine the category label value of the transaction data, and then determine the security detection result of the transaction data based on the determined category label value of the transaction data. The transaction data classification model constructed based on the quantum neural network model can be used to automatically and accurately perform security detection on the transaction data, determine whether the transaction behavior described by the transaction data is normal transaction behavior or fraudulent transaction behavior, reduce the time and labor costs of the transaction data security detection process, improve the efficiency and accuracy of the transaction data security detection process, and thus improve the security of the financial institution's business system.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 This is a flowchart of a transaction data security detection method provided in Example 1 of the present invention.
[0023] Figure 2 A schematic diagram of the process of constructing a transaction data classification model provided in Example 1 of the present invention.
[0024] Figure 3 This is a schematic diagram of functional modules in a business system of a financial institution provided in the first embodiment of the present invention.
[0025] Figure 4 A schematic diagram of a transaction data processing flow in a business system of a financial institution provided in the first embodiment of the present invention.
[0026] Figure 5 This is a flow chart of a transaction data security detection method provided in Example 2 of the present invention.
[0027] Figure 6 This is a structural diagram of a transaction data security detection device provided in Example 3 of the present invention.
[0028] Figure 7 A schematic diagram of the structure of an electronic device for implementing the transaction data security detection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "target", "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprise", "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0032] Example 1
[0033] Figure 1This is a flowchart of a transaction data security detection method provided in the first embodiment of the present invention. This embodiment can be applied to perform security detection on transaction data acquired by the business system of a financial institution to determine whether the transaction behavior described by the transaction data is a normal transaction behavior or a fraudulent transaction behavior. The method can be executed by a transaction data security detection device, which can be implemented in the form of hardware and / or software, and can be configured in the business system of a financial institution. The business system of a financial institution can be an electronic device used to process the business of the financial institution. For example, a server used to process the business of a financial institution. Figure 1 As shown, the method includes:
[0034] Step 101: Acquire transaction data to be processed, encode the transaction data to be processed, and obtain the quantum state of the transaction data to be processed.
[0035] Optionally, users conducting transactions through a financial institution's business system can send transaction data of these transactions to the financial institution's business system via a terminal device. A transaction may refer to an exchange of valuable products or services between a buyer and a seller. The transaction data of a transaction may be text describing the transaction account, transaction time, and transaction amount involved in the transaction. The transaction account may refer to the account provided by the financial institution to the user during the transaction. The transaction time may refer to the time the transaction took place. The transaction amount may refer to the amount paid by the buyer during the transaction. To ensure the security of the financial institution's business system and the transaction processes related to the financial institution's business system, it is necessary to perform security checks on the transaction data received by the financial institution's business system to determine whether the transaction described by the transaction data is legitimate or fraudulent. In the technical solution of the present invention, the transaction data and information related to the transaction data involved are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of the transaction data and information related to the transaction data comply with the relevant laws, regulations, and standards of the relevant region.
[0036] Alternatively, a normal transaction is a transaction conducted normally without fraud. A fraudulent transaction is a transaction involving fraud. A normal transaction without fraud may refer to a transaction in which all parties involved provide complete and accurate information related to the transaction. A fraudulent transaction may refer to a transaction in which a party intentionally conceals or provides false information related to the transaction in order to gain a profit. The parties involved may refer to the buyer and / or the seller.
[0037] Optionally, the pending transaction data may refer to transaction data that currently requires security testing. Whether the financial institution's business system has received the transaction data may be detected. Each time the financial institution's business system is detected to have received the transaction data, the received transaction data may be identified as pending transaction data, and the received transaction data may be acquired, thereby obtaining the pending transaction data.
[0038] Optionally, the quantum state of transaction data may refer to transaction data encoded into a form of quantum state processable by a quantum neural network model. The transaction data may be encoded using a preset encoding algorithm to obtain the quantum state of the transaction data. The preset encoding algorithm may be a pre-set algorithm for encoding transaction data into a form of quantum state processable by a quantum neural network model. Each time transaction data to be processed is acquired, the preset encoding algorithm may be used to encode the transaction data to obtain the quantum state of the transaction data to be processed.
[0039] Step 102: Input the quantum state of the transaction data to be processed into a pre-trained transaction data classification model to obtain a category label value of the transaction data to be processed.
[0040] The category mark value is a normal mark value or a fraud mark value, the transaction data classification model is obtained by training a quantum neural network model based on training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category mark value of the transaction data.
[0041] Optionally, the category mark value of the transaction data may be a value used to characterize whether the transaction behavior described by the transaction data and conducted through the business system of a financial institution is a fraudulent transaction behavior. The category mark value of the transaction data is a normal mark value or a fraud mark value. The normal mark value and the fraud mark value may be two different pre-set values. When the category mark value of the transaction data is a normal mark value, it indicates that the transaction behavior described by the transaction data and conducted through the business system of a financial institution is not a fraudulent transaction behavior, but a normal transaction behavior. When the category mark value of the transaction data is a fraud mark value, it indicates that the transaction behavior described by the transaction data and conducted through the business system of a financial institution is a fraudulent transaction behavior. Exemplarily, the normal mark value is 1, and the fraud mark value is 0.
[0042] Optionally, a pre-trained transaction data classification model is provided in the financial institution's business system. The pre-trained transaction data classification model is used to analyze and detect the quantum state of transaction data and determine the category label value of the transaction data. The input of the pre-trained transaction data classification model is the quantum state of the transaction data, and the output of the pre-trained transaction data classification model is the category label value of the transaction data. The quantum state of the transaction data can be input into the pre-trained transaction data classification model, which will analyze and detect the quantum state of the transaction data, determine the category label value of the transaction data, and then output the category label value of the transaction data. The category label value of the transaction data output by the transaction data classification model can be obtained.
[0043] Optionally, the quantum state of the transaction data to be processed can be input into a pre-trained transaction data classification model. The pre-trained transaction data classification model analyzes and detects the quantum state of the transaction data to be processed, determines the category label value of the transaction data to be processed, and then outputs the category label value of the transaction data to be processed. The category label value of the transaction data to be processed output by the transaction data classification model can be obtained.
[0044] Optionally, the quantum states and category label values of multiple transaction data can be collected in advance, and the quantum neural network model can be trained using the collected quantum states and category label values of each transaction data to obtain a transaction data classification model, and then the transaction data classification model can be set in the business system of the financial institution.
[0045] Optionally, before obtaining the transaction data to be processed, it also includes: obtaining the quantum state and category label values of a preset number of transaction data, dividing the quantum state and category label values of each transaction data into a training sample set and a test sample set; using the training sample set to train the quantum neural network model to obtain a transaction data classification model; using the test sample set to test the transaction data classification model to determine the model loss value of the transaction data classification model; judging whether the model loss value of the transaction data classification model is less than a preset value; if the model loss value of the transaction data classification model is less than the preset value, determining that the training of the transaction data classification model is completed; if the model loss value of the transaction data classification model is greater than or equal to the preset value, updating the parameter values of the parameters of the transaction data classification model through a pre-trained parameter prediction model, and continuing to use the training sample set to train the transaction data classification model after the parameter update until the model loss value of the transaction data classification model is less than the preset value; wherein, the parameter prediction model is obtained by training the classical neural network model based on the training samples.
[0046] Optionally, obtaining the quantum state and category mark values of a preset number of transaction data includes: obtaining the quantum state and category mark values of a preset number of transaction data from a model data file.
[0047] Optionally, the quantum state and category mark values of the preset number of transaction data may be the quantum state and category mark values of multiple transaction data collected in advance. The preset number may be set based on business needs. Exemplarily, the quantum state and category mark values of the preset number of transaction data are the quantum state and category mark values of 1,000 transaction data collected in advance. The quantum state and category mark values of the preset number of transaction data may be stored in a model data file. The model data file may be a file set in a financial institution's business system for storing the quantum state and category mark values of pre-collected transaction data used to train a transaction data classification model. The quantum state and category mark values of the preset number of transaction data may be obtained from the model data file.
[0048] Optionally, the training sample set may be the quantum states and category label values of multiple transaction data used to train the quantum neural network model, and the test sample set may be the quantum states and category label values of multiple transaction data used to test the transaction data classification model.
[0049] Optionally, the quantum state and category mark value of each transaction data are divided into a training sample set and a test sample set, including: dividing the quantum state and category mark value of each transaction data into a training sample set and a test sample set according to a preset division ratio.
[0050] Optionally, the preset division ratio may include a first ratio and a second ratio. The first ratio and the second ratio may be two preset ratios. The sum of the first ratio and the second ratio is 1. According to the preset division ratio, the quantum states and category mark values of each transaction data are divided into a training sample set and a test sample set, including: determining the quantum states and category mark values of the transaction data of a first ratio among the quantum states and category mark values of the preset number of transaction data as the training sample set; and determining the quantum states and category mark values of the remaining second ratio of the transaction data as the testing sample set. Exemplarily, the quantum states and category mark values of the preset number of transaction data are the quantum states and category mark values of 1,000 transaction data collected in advance. The first ratio is 80%, and the second ratio is 20%. The quantum states and category mark values of 80% of the 1,000 transaction data are determined as the training sample set, that is, the quantum states and category mark values of 800 transaction data out of the 1,000 transaction data are determined as the training sample set. The quantum states and category mark values of the remaining 20% of the transaction data are determined as the test sample set, that is, the quantum states and category mark values of the remaining 200 transaction data are determined as the test sample set.
[0051] Optionally, the quantum states and category label values of the transaction data in the training sample set can be used as training samples to train a pre-defined quantum neural network model, determine the parameter values of the quantum neural network model, and obtain a transaction data classification model. The input of the transaction data classification model is the quantum state of the transaction data, and the output is the category label value of the transaction data. The parameters of the quantum neural network model can refer to the weights of each neuron in the quantum neural network model.
[0052] Optionally, the model loss value of the transaction data classification model may be a value used to characterize the difference between the category label value of the transaction data output by the transaction data classification model and the correct category label value of the transaction data. A smaller model loss value of the transaction data classification model indicates a smaller difference between the category label value of the transaction data output by the transaction data classification model and the correct category label value of the transaction data. A larger model loss value of the transaction data classification model indicates a larger difference between the category label value of the transaction data output by the transaction data classification model and the correct category label value of the transaction data. The category label value in the quantum state and category label value of each transaction data in the test sample set is the correct category label value of each transaction data. Testing the transaction data classification model using the test sample set to determine a model loss value of the transaction data classification model includes: inputting the quantum state and the quantum state of the category label value of each transaction data in the test sample set into the transaction data classification model to obtain the category label value of each transaction data output by the transaction data classification model; calculating the difference between the category label value of each transaction data in the test sample set and the category label value of each transaction data output by the transaction data classification model, and summing the calculated differences; and determining the summed value as the model loss value of the transaction data classification model. The sum of the differences between the category label value of each transaction data in the test sample set and the category label value of each transaction data output by the transaction data classification model can be used to represent the difference between the category label value of the transaction data output by the transaction data classification model and the correct category label value of the transaction data. The sum of the differences between the category label value of each transaction data in the test sample set and the category label value of each transaction data output by the transaction data classification model can be determined as the model loss value of the transaction data classification model, thereby determining the model loss value of the transaction data classification model.
[0053] Optionally, the preset value may be a pre-set value. When the model loss value of the transaction data classification model is less than the preset value, it can be determined that the training of the transaction data classification model is completed. When the model loss value of the transaction data classification model is greater than or equal to the preset value, it can be determined that the transaction data classification model needs to be further trained. After determining the model loss value of the transaction data classification model, it is determined whether the model loss value of the transaction data classification model is less than the preset value. If the model loss value of the transaction data classification model is less than the preset value, it is determined that the training of the transaction data classification model is completed. If the model loss value of the transaction data classification model is greater than or equal to the preset value, the parameter values of the parameters of the transaction data classification model are updated through the pre-trained parameter prediction model, and the training sample set is continued to be used to train the transaction data classification model after the parameter update until the model loss value of the transaction data classification model is less than the preset value.
[0054] Optionally, a pre-trained parameter prediction model is provided in the financial institution's business system. The pre-trained parameter prediction model is used to analyze and detect the parameter values of the transaction data classification model's parameters to determine predicted parameter values for the transaction data classification model's parameters. The predicted parameter values for the transaction data classification model's parameters can be parameter values suitable for the transaction data classification model's parameters calculated based on the input parameter values of the transaction data classification model's parameters. The input to the pre-trained parameter prediction model is the parameter values of the transaction data classification model's parameters, i.e., the parameter values of the transaction data classification model's parameters at the current moment. The output of the pre-trained parameter prediction model is the predicted parameter values of the transaction data classification model's parameters. The parameter values of the transaction data classification model's parameters can be input into the pre-trained parameter prediction model. The pre-trained parameter prediction model analyzes and calculates the input parameter values of the transaction data classification model's parameters to determine predicted parameter values for the transaction data classification model's parameters, and then outputs the predicted parameter values for the transaction data classification model's parameters. The predicted parameter values for the transaction data classification model's parameters output by the parameter prediction model can be obtained.
[0055] Optionally, a classical neural network model can be trained using pre-collected parameter values and predicted parameter values of the transaction data classification model parameters to obtain a parameter prediction model, which can then be deployed in the financial institution's business system. Classical neural network models include, but are not limited to, recurrent neural network models. The pre-trained parameter prediction model can also be deployed in the financial institution's business system by a technician. The technician can use pre-collected parameter values and predicted parameter values of the transaction data classification model parameters to train the classical neural network model to obtain a parameter prediction model, which can then be deployed in the financial institution's business system.
[0056] Optionally, updating the parameter values of the parameters of the transaction data classification model through a pre-trained parameter prediction model includes: inputting the parameter values of the parameters of the transaction data classification model into the pre-trained parameter prediction model to obtain the predicted parameter values of the parameters of the transaction data classification model; and updating the parameter values of the parameters of the transaction data classification model from the current values to the predicted parameter values. The parameter values of the parameters of the transaction data classification model can be input into the pre-trained parameter prediction model, and the pre-trained parameter prediction model analyzes and calculates the parameter values of the input parameters of the transaction data classification model to determine the predicted parameter values of the parameters of the transaction data classification model, and then outputs the predicted parameter values of the parameters of the transaction data classification model. The predicted parameter values of the parameters of the transaction data classification model output by the parameter prediction model can be obtained, and the parameter values of the parameters of the transaction data classification model are updated from the current values to the predicted parameter values, thereby updating the parameter values of the parameters of the transaction data classification model.
[0057] Optionally, after each update of the parameter values of the transaction data classification model's parameters, the training sample set is continued to be used to train the transaction data classification model after the parameter updates, and then the transaction data classification model is tested using the test sample set to determine the model loss value of the transaction data classification model and determine whether the model loss value of the transaction data classification model is less than a preset value. If the model loss value of the transaction data classification model is less than the preset value, then the training of the transaction data classification model is determined to be complete. If the model loss value of the transaction data classification model is greater than or equal to the preset value, the parameter values of the parameters of the transaction data classification model are again updated using the pre-trained parameter prediction model, and then the training sample set is continued to be used to train the transaction data classification model after the parameter updates until the model loss value of the transaction data classification model is less than the preset value.
[0058] Alternatively, the pre-trained transaction data classification model can be installed by technical personnel in the financial institution's business system. Technical personnel can use the quantum states and category label values of pre-collected transaction data to train the quantum neural network model to obtain the transaction data classification model, and then install the transaction data classification model in the financial institution's business system.
[0059] Step 103: Determine the security detection result of the transaction data to be processed according to the category mark value of the transaction data to be processed.
[0060] Optionally, determining a security check result for the pending transaction data based on the category tag value of the pending transaction data includes: if the category tag value of the pending transaction data is a normal tag value, determining that the transaction behavior corresponding to the pending transaction data is a normal transaction behavior; and if the category tag value of the pending transaction data is an abnormal tag value, determining that the transaction behavior corresponding to the pending transaction data is a fraudulent transaction behavior. The transaction behavior corresponding to the pending transaction data is the transaction behavior described by the pending transaction data.
[0061] Optionally, after determining that the transaction behavior corresponding to the pending transaction data is a fraudulent transaction behavior, it also includes: sending the pending transaction data and the category mark value of the pending transaction data to the transaction management module, so that the transaction management module issues an alarm for the transaction behavior corresponding to the pending transaction data.
[0062] Optionally, the transaction management module may be a software or hardware module configured within a financial institution's business system to manage fraudulent transactions conducted through the financial institution's business system. After determining that the transaction corresponding to the pending transaction data is fraudulent, the pending transaction data and the category tag value of the pending transaction data may be sent to the transaction management module. The target user may be a technician responsible for handling fraudulent transactions. After receiving the pending transaction data and the category tag value of the pending transaction data, the transaction management module may send the pending transaction data and the category tag value of the pending transaction data to the target user, thereby issuing an alert regarding the transaction corresponding to the pending transaction data. After receiving the pending transaction data and the category tag value of the pending transaction data, the transaction management module may generate alert information corresponding to the pending transaction data based on the pending transaction data and the category tag value of the pending transaction data, and send the alert information corresponding to the pending transaction data to the target user, thereby issuing an alert regarding the transaction corresponding to the pending transaction data. The alert information corresponding to the pending transaction data may be text indicating that the transaction corresponding to the pending transaction data is fraudulent and requires action.
[0063] The technical solution of the embodiment of the present invention obtains the transaction data to be processed, encodes the transaction data to be processed, and obtains the quantum state of the transaction data to be processed; then the quantum state of the transaction data to be processed is input into a pre-trained transaction data classification model to obtain the category mark value of the transaction data to be processed; wherein the category mark value is a normal mark value or a fraud mark value, the transaction data classification model is obtained by training a quantum neural network model according to training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category mark value of the transaction data; finally, the security detection result of the transaction data to be processed is determined according to the category mark value of the transaction data to be processed, which solves the security detection problem of transaction data in the related art. The detection scheme relies on manual experience, has high time and labor costs, and is difficult to guarantee accuracy. The transaction data classification model constructed based on the quantum neural network model can be used to determine the category label value of the transaction data, and then determine the security detection result of the transaction data based on the determined category label value of the transaction data. The transaction data classification model constructed based on the quantum neural network model can be used to automatically and accurately perform security detection on the transaction data, determine whether the transaction behavior described by the transaction data is normal transaction behavior or fraudulent transaction behavior, reduce the time and labor costs of the transaction data security detection process, improve the efficiency and accuracy of the transaction data security detection process, and thus improve the security of the financial institution's business system.
[0064] Optionally, in a specific example, Figure 2This is a schematic diagram of the process for constructing a transaction data classification model provided in Example 1 of the present invention. A quantum neural network model is trained using a training sample set to obtain a transaction data classification model. The transaction data classification model is then tested using a test sample set to determine the model loss value of the transaction data classification model and determine whether the model loss value of the transaction data classification model is less than a preset value. If the model loss value of the transaction data classification model is less than the preset value, training of the transaction data classification model is determined to be complete. A parameter prediction model is obtained by training a classical neural network model based on the training samples. If the model loss value of the transaction data classification model is greater than or equal to a preset value, the parameters of the transaction data classification model are updated using the pre-trained parameter prediction model. The parameter-updated transaction data classification model is then trained again using the training sample set until the model loss value of the transaction data classification model is less than the preset value. In other words, during the training process, the parameters of the quantum neural network model are updated based on the classical neural network model. Thus, a transaction data classification model is constructed based on the quantum neural network model and the classical neural network model.
[0065] Optionally, in a specific example, Figure 3 This is a schematic diagram of functional modules in a financial institution's business system, provided in a first embodiment of the present invention. A business module may be a functional module within a financial institution's business system that provides services to users of the financial institution's business system. An accounting module may be a functional module within a financial institution's business system that manages the accounts of users of the financial institution's business system. An intelligent anti-fraud module may be a functional module within a financial institution's business system that handles fraudulent transactions. The intelligent anti-fraud module includes a rule-based decision engine, an asset center, and a transaction data security detection unit. The rule-based decision engine may be a software module or hardware module that uses preset rules to detect fraudulent transactions. The asset center may be a software module or hardware module that manages information about assets related to fraudulent transactions. The transaction data security detection unit may be a software module or hardware module that executes the transaction data security detection method according to an embodiment of the present invention. A quantum computing resource may be a quantum processor within the financial institution's business system. The business module, accounting module, and intelligent anti-fraud module may interact with each other. The transaction data security detection unit may utilize quantum computing resources.
[0066] Optionally, in a specific example, Figure 4A schematic diagram of the processing flow of transaction data in a business system of a financial institution provided in the first embodiment of the present invention. A user who conducts transactions through the business system of a financial institution can initiate a transaction and send the transaction data of the transaction to the accounting module in the business system of the financial institution or directly send the transaction data of the transaction to the security detection unit of the transaction data in the business system of the financial institution. The accounting module will send the received transaction data to the security detection unit of the transaction data. The security detection unit of the transaction data can perform a security detection on the transaction data to obtain a security detection result of the transaction data, and send the security detection result of the transaction data to relevant personnel to assist the relevant personnel in determining the transaction result of the transaction. The security detection unit of the transaction data can use quantum computing resources.
[0067] Example 2
[0068] Figure 5 This is a flow chart of a transaction data security detection method provided by the second embodiment of the present invention. This embodiment of the present invention can be combined with each optional solution in one or more of the above embodiments. Figure 5 As shown, the method includes:
[0069] Step 201: Obtain quantum states and category label values of a preset number of transaction data, and divide the quantum states and category label values of each transaction data into a training sample set and a test sample set.
[0070] Step 202: Use the training sample set to train the quantum neural network model to obtain a transaction data classification model.
[0071] Step 203: Use the test sample set to test the transaction data classification model to determine the model loss value of the transaction data classification model.
[0072] Step 204 , determining whether the model loss value of the transaction data classification model is less than a preset value: if so, executing step 205 ; if not, executing step 209 .
[0073] Step 205: Determine whether the transaction data classification model training is completed.
[0074] Step 206: Acquire the transaction data to be processed, encode the transaction data to be processed, and obtain the quantum state of the transaction data to be processed.
[0075] Step 207: Input the quantum state of the transaction data to be processed into a pre-trained transaction data classification model to obtain a category label value of the transaction data to be processed.
[0076] The category mark value is a normal mark value or a fraud mark value, the transaction data classification model is obtained by training a quantum neural network model based on training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category mark value of the transaction data.
[0077] Step 208: Determine the security detection result of the transaction data to be processed according to the category mark value of the transaction data to be processed.
[0078] Step 209: Update the parameter values of the parameters of the transaction data classification model using the pre-trained parameter prediction model.
[0079] The parameter prediction model is obtained by training a classical neural network model based on the training samples. After step 209 is completed, the process returns to step 202.
[0080] The technical solution of the embodiment of the present invention can determine the category mark value of the transaction data through a transaction data classification model constructed based on the quantum neural network model and the classical neural network model, and then determine the security detection result of the transaction data based on the determined category mark value of the transaction data. It can realize automatic security detection of the transaction data through the transaction data classification model constructed based on the quantum neural network model, quickly and accurately determine whether the transaction behavior described by the transaction data is normal transaction behavior or fraudulent transaction behavior, reduce the time cost and labor cost of the transaction data security detection process, improve the efficiency and accuracy of the transaction data security detection process, and thus improve the security of the business system of the financial institution.
[0081] Example 3
[0082] Figure 6 This is a schematic diagram of the structure of a transaction data security detection device provided by the third embodiment of the present invention. The device can be configured in an electronic device. Figure 6 As shown, the device includes: a data acquisition module 301, a category determination module 302 and a result determination module 303.
[0083] Among them, the data acquisition module 301 is used to obtain the transaction data to be processed, encode the transaction data to be processed, and obtain the quantum state of the transaction data to be processed; the category determination module 302 is used to input the quantum state of the transaction data to be processed into a pre-trained transaction data classification model to obtain the category mark value of the transaction data to be processed; wherein the category mark value is a normal mark value or a fraud mark value, the transaction data classification model is obtained by training a quantum neural network model based on training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category mark value of the transaction data; the result determination module 303 is used to determine the security detection result of the transaction data to be processed based on the category mark value of the transaction data to be processed.
[0084] The technical solution of the embodiment of the present invention obtains the transaction data to be processed, encodes the transaction data to be processed, and obtains the quantum state of the transaction data to be processed; then the quantum state of the transaction data to be processed is input into a pre-trained transaction data classification model to obtain the category mark value of the transaction data to be processed; wherein the category mark value is a normal mark value or a fraud mark value, the transaction data classification model is obtained by training a quantum neural network model according to training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category mark value of the transaction data; finally, the security detection result of the transaction data to be processed is determined according to the category mark value of the transaction data to be processed, which solves the security detection problem of transaction data in the related art. The detection scheme relies on manual experience, has high time and labor costs, and is difficult to guarantee accuracy. The transaction data classification model constructed based on the quantum neural network model can be used to determine the category label value of the transaction data, and then determine the security detection result of the transaction data based on the determined category label value of the transaction data. The transaction data classification model constructed based on the quantum neural network model can be used to automatically and accurately perform security detection on the transaction data, determine whether the transaction behavior described by the transaction data is normal transaction behavior or fraudulent transaction behavior, reduce the time and labor costs of the transaction data security detection process, improve the efficiency and accuracy of the transaction data security detection process, and thus improve the security of the financial institution's business system.
[0085] In an optional implementation of an embodiment of the present invention, the transaction data security detection device may further include: a sample division module for obtaining a preset number of quantum states and category mark values of transaction data, and dividing the quantum states and category mark values of each transaction data into a training sample set and a test sample set; a model training module for training a quantum neural network model using the training sample set to obtain a transaction data classification model; a model testing module for testing the transaction data classification model using the test sample set to determine a model loss value of the transaction data classification model; and a loss value detection module for determining the model loss of the transaction data classification model. value is less than a preset value; a completion determination module is used to determine that the training of the transaction data classification model is completed if the model loss value of the transaction data classification model is less than the preset value; a parameter updating module is used to update the parameter values of the parameters of the transaction data classification model through a pre-trained parameter prediction model if the model loss value of the transaction data classification model is greater than or equal to the preset value, and continue to use the training sample set to train the transaction data classification model after the parameter update until the model loss value of the transaction data classification model is less than the preset value; wherein, the parameter prediction model is obtained by training a classical neural network model based on the training samples.
[0086] In an optional implementation manner of an embodiment of the present invention, optionally, when the parameter update module performs the operation of updating the parameters of the parameters of the transaction data classification model through a pre-trained parameter prediction model, it is specifically used to: input the parameter values of the parameters of the transaction data classification model into the pre-trained parameter prediction model to obtain the predicted parameter values of the parameters of the transaction data classification model; and update the parameter values of the parameters of the transaction data classification model from the current values to the predicted parameter values.
[0087] In an optional implementation of an embodiment of the present invention, optionally, the result determination module 303 is specifically used to: if the category mark value of the transaction data to be processed is a normal mark value, then determine that the transaction behavior corresponding to the transaction data to be processed is a normal transaction behavior; if the category mark value of the transaction data to be processed is an abnormal mark value, then determine that the transaction behavior corresponding to the transaction data to be processed is a fraudulent transaction behavior.
[0088] In an optional implementation of an embodiment of the present invention, optionally, the transaction data security detection device also includes: a behavior alarm module, which is used to send the pending transaction data and the category mark value of the pending transaction data to the transaction management module, so that the transaction management module can alarm the transaction behavior corresponding to the pending transaction data.
[0089] In an optional implementation of an embodiment of the present invention, optionally, when the sample partitioning module performs the operation of obtaining the quantum state and category mark values of a preset number of transaction data, it is specifically used to: obtain the quantum state and category mark values of a preset number of transaction data from the model data file.
[0090] In an optional implementation of an embodiment of the present invention, optionally, when the sample partitioning module performs the operation of partitioning the quantum state and category mark value of each transaction data into a training sample set and a test sample set, it is specifically used to: partition the quantum state and category mark value of each transaction data into a training sample set and a test sample set according to a preset partitioning ratio.
[0091] The transaction data security detection device provided in the embodiment of the present invention can execute the transaction data security detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0092] Example 4
[0093] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement the security detection method for transaction data of an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, electronic devices, blade electronic devices, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0094] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0095] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0096] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the transaction data security detection method.
[0097] In some embodiments, the security detection method for transaction data may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on a heterogeneous hardware accelerator via a ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the security detection method for transaction data described above may be performed. Alternatively, in other embodiments, the processor may be configured to execute the security detection method for transaction data by any other appropriate means (e.g., by means of firmware).
[0098] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or electronic device.
[0100] In the context of the present invention, computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on a heterogeneous hardware accelerator that has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the heterogeneous hardware accelerator. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0102] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as data electronics), or a computing system that includes middleware components (e.g., application electronics), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0103] A computing system may include a client and an electronic device. The client and electronic device are generally remote from each other and typically interact via a communication network. The client-electronic device relationship is established by computer programs running on the respective computers and establishing a client-electronic device relationship. The electronic device may be a cloud electronic device, also known as a cloud computing electronic device or cloud host, a host product within a cloud computing service ecosystem that addresses the management difficulties and limited business scalability of traditional physical hosts and VPS services.
[0104] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0105] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A transaction data security detection method, characterized in that: include: Acquiring transaction data to be processed, encoding the transaction data to be processed, and obtaining a quantum state of the transaction data to be processed; Inputting the quantum state of the transaction data to be processed into a pre-trained transaction data classification model to obtain a category label value of the transaction data to be processed; wherein the category label value is a normal label value or a fraud label value, the transaction data classification model is obtained by training a quantum neural network model based on training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category label value of the transaction data; A security detection result of the transaction data to be processed is determined according to the category mark value of the transaction data to be processed.
2. The transaction data security detection method according to claim 1, characterized in that: Before obtaining the pending transaction data, it also includes: Obtaining quantum states and category label values of a preset number of transaction data, and dividing the quantum states and category label values of each of the transaction data into a training sample set and a test sample set; Using the training sample set to train the quantum neural network model to obtain a transaction data classification model; Testing the transaction data classification model using the test sample set to determine a model loss value of the transaction data classification model; Determining whether a model loss value of the transaction data classification model is less than a preset value; If the model loss value of the transaction data classification model is less than the preset value, it is determined that the training of the transaction data classification model is completed; If the model loss value of the transaction data classification model is greater than or equal to the preset value, the parameter values of the parameters of the transaction data classification model are updated through the pre-trained parameter prediction model, and the transaction data classification model with updated parameters is continuously trained using the training sample set until the model loss value of the transaction data classification model is less than the preset value; wherein, the parameter prediction model is obtained by training a classical neural network model based on the training samples.
3. The transaction data security detection method according to claim 2, characterized in that: Updating the parameter values of the transaction data classification model using a pre-trained parameter prediction model includes: Inputting parameter values of the parameters of the transaction data classification model into a pre-trained parameter prediction model to obtain predicted parameter values of the parameters of the transaction data classification model; The parameter values of the parameters of the transaction data classification model are updated from current values to the predicted parameter values.
4. The transaction data security detection method according to claim 1, characterized in that: Determining a security detection result of the transaction data to be processed according to the category tag value of the transaction data to be processed includes: If the category mark value of the transaction data to be processed is a normal mark value, determining that the transaction behavior corresponding to the transaction data to be processed is a normal transaction behavior; If the category mark value of the transaction data to be processed is an abnormal mark value, it is determined that the transaction behavior corresponding to the transaction data to be processed is a fraudulent transaction behavior.
5. The transaction data security detection method according to claim 4, characterized in that: After determining that the transaction behavior corresponding to the to-be-processed transaction data is a fraudulent transaction behavior, the method further includes: The transaction data to be processed and the category mark value of the transaction data to be processed are sent to the transaction management module, so that the transaction management module issues an alarm for the transaction behavior corresponding to the transaction data to be processed.
6. The transaction data security detection method according to claim 2, characterized in that: Get the quantum state and category tag values of a preset amount of transaction data, including: Get the quantum state and category tag values of a preset number of transaction data from the model data file.
7. The transaction data security detection method according to claim 2, characterized in that: Dividing the quantum states and category label values of each of the transaction data into a training sample set and a test sample set, including: According to a preset division ratio, the quantum state and category label value of each transaction data are divided into a training sample set and a test sample set.
8. A transaction data security detection device, characterized in that: include: a data acquisition module, configured to acquire transaction data to be processed, encode the transaction data to be processed, and obtain a quantum state of the transaction data to be processed; a category determination module, configured to input the quantum state of the transaction data to be processed into a pre-trained transaction data classification model to obtain a category label value for the transaction data to be processed; wherein the category label value is a normal label value or a fraud label value, the transaction data classification model is obtained by training a quantum neural network model based on training samples, the input of the transaction data classification model is the quantum state of the transaction data, and the output of the transaction data classification model is the category label value for the transaction data; The result determination module is used to determine the security detection result of the transaction data to be processed according to the category mark value of the transaction data to be processed.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the transaction data security detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the transaction data security detection method according to any one of claims 1 to 7 when executed.