Mobile payment trusted data processing method and system based on block chain

By adopting a trusted data processing method based on blockchain in the mobile payment system, using isolated forest models and smart contracts, the shortcomings of existing mobile payment systems in terms of security and credibility are solved, and more efficient risks are achieved Identification and transaction security.

CN119477309AActive Publication Date: 2025-02-18DONGGUAN UNIONPAY TONGGUAN POS LEASING SERVICE
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411477915.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-18
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

While ensuring transaction convenience, existing mobile payment systems are difficult to effectively improve the security and transaction credibility of the payment system, especially in POS transactions, bank cards are more likely to be stolen and fraudulent transactions.

Method used

Using a blockchain-based mobile payment trusted data processing method, by obtaining the historical POS transaction data of the current payment request, using a pre-configured isolated forest model to detect abnormal transaction data, and calculate the editing distance to make the first round of credibility judgment, combined with Smart contracts perform compliance verification to ensure transaction security and credibility.

Benefits of technology

Accurate detection of abnormal transaction behaviors, improve risk identification capabilities in the payment process, enhance the security and transaction credibility of the payment system, reduce the probability of misjudgment and misjudgment, and optimize the payment experience and transaction success Rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477309A_ABST
    Figure CN119477309A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of financial payment, and discloses a mobile payment trusted data processing method and system based on a block chain, and the method comprises the steps: calling first historical POS transaction data from a first block chain according to a current payment request; acquiring first historical abnormal POS transaction data about the target bank card from the first historical POS transaction data by using a pre-configured first isolated forest model; calculating a first editing distance between the current POS transaction data and the first abnormal POS transaction data, and executing a first round of credibility judgment on the current POS transaction data according to the size of the first editing distance; executing a transaction processing operation on the current payment request according to the credible data or the fraud data; according to the invention, the security and transaction credibility of the payment system are effectively improved while the transaction convenience is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial payment technology, and more specifically, to a blockchain-based mobile payment trusted data processing method and system. Background Art

[0002] In modern payment systems, mobile payment methods are gradually becoming mainstream, and users make payments through QR codes, NFC, etc.; however, as the convenience of payment methods increases, payment security issues are becoming increasingly severe, especially in POS transactions, where the risks of bank card theft and fraudulent transactions are increasing; therefore, how to effectively improve the security of the payment system and the credibility of transactions while ensuring transaction convenience has become an important research direction in the current field of financial technology.

[0003] Traditional payment security systems usually rely on password or signature verification to determine the legitimacy and risk of transactions; however, these methods have obvious flaws. For example, password-free payment may put users at risk of fraudulent card fraud, and signature-based verification methods are also difficult to effectively identify potential fraudulent behavior; in addition, abnormal transaction detection in POS transactions usually relies on simple rule judgments and lacks sufficient intelligent analysis capabilities, resulting in frequent misjudgments or missed judgments, which in turn affects the operating efficiency of the payment system and user experience. Summary of the invention

[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a mobile payment trusted data processing method and system based on blockchain.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A mobile payment trusted data processing method based on blockchain, wherein the blockchain includes a first blockchain for storing first historical POS transaction data, and the method includes:

[0007] Obtaining a current payment request initiated by the user at the current moment on the target POS device through a mobile payment method, and retrieving first historical POS transaction data from the first blockchain according to the current payment request; the current payment request includes the target bank card bound to the user's mobile payment method and the current POS transaction data;

[0008] Acquire first historical abnormal POS transaction data about a target bank card from first historical POS transaction data using a preconfigured first isolation forest model; the first historical POS transaction data includes a plurality of historical POS transaction records about the target bank card; the first historical abnormal POS transaction data includes at least one historical abnormal POS transaction record about the target bank card;

[0009] Calculating a first edit distance between current POS transaction data and first abnormal POS transaction data, and performing a first round of credibility judgment on the current POS transaction data according to the first edit distance to obtain a first judgment result; the first judgment result includes one of credible data and fraudulent data;

[0010] The bank system associated with the target bank card performs a transaction processing operation on the current payment request according to the trusted data or the fraud data, and uploads the trusted data or the fraud data to the first blockchain for storage; the transaction processing operation includes one of transaction approval or rejection.

[0011] Further, the obtaining of first historical abnormal POS transaction data about the target bank card from the first historical POS transaction data includes:

[0012] Inputting the first historical POS transaction data into a preconfigured first isolation forest model to obtain an anomaly score for each historical POS transaction record related to the target bank card;

[0013] The abnormality score is compared with a preset abnormality score threshold. If the abnormality score is greater than or equal to the abnormality score threshold, the historical POS transaction record of the target bank card is marked as abnormal.

[0014] The logic for obtaining the abnormality score is as follows:

[0015] Extract the path length of each isolated tree in the first isolation forest model, and calculate the mean of the path lengths of all isolated trees to obtain the average path length;

[0016] Calculate the anomaly score of each historical POS transaction record about the target bank card based on the average path length;

[0017] All historical abnormal POS transaction records about the target bank card are counted to obtain first historical abnormal POS transaction data in a collection form.

[0018] Furthermore, the generation process of the preconfigured first isolation forest model is as follows:

[0019] Initialize the isolation forest model and determine the various model parameters of the isolation forest model;

[0020] According to the initialized isolation forest model with determined model parameters, a portion of samples are randomly selected from the first historical POS transaction data as a training data set;

[0021] A preset feature selection mechanism is introduced to randomly select a target transaction feature from the training data set as the basis for segmentation, and a segmentation point is determined within the value range of the selected target transaction feature;

[0022] Perform binary partitioning based on the characteristic value and split point of the target transaction feature to obtain two child nodes, namely the left child node and the right child node;

[0023] Repeat the above steps for each child node until the preset stop condition is met, then stop dividing the child nodes and get a single isolated tree;

[0024] The preset stop condition includes any one of the following: there is only one sample left in the node or the preset maximum segmentation depth has been reached;

[0025] Repeat the above single isolated tree construction process to generate m isolated trees, and combine the m isolated trees to obtain the first isolation forest model, where m is an integer greater than zero.

[0026] Furthermore, the introduction of a preset feature selection mechanism to randomly select a target transaction feature from the training data set as a segmentation basis includes:

[0027] Obtain all historical POS transaction records about the target bank card in the training data set, and extract multiple transaction features from the historical POS transaction records;

[0028] Under each transaction feature, the K-means algorithm is used to cluster all historical POS transaction records of the target bank card to obtain multiple data clusters under each transaction feature;

[0029] Count the number of multiple data clusters under each transaction feature, and compare the number of data clusters with a preset number threshold; if the number of data clusters is less than or equal to the number threshold, mark the corresponding transaction feature as a target transaction feature; if the number of data clusters is greater than the number threshold, mark the corresponding transaction feature as a non-target transaction feature;

[0030] All target transaction features are counted to form a target transaction feature set, and any target transaction feature in the target transaction feature set is used as a basis for segmentation.

[0031] Furthermore, the performing of a first round of credibility judgment on the current POS transaction data includes:

[0032] Extracting each historical abnormal POS transaction record about the target bank card from the first abnormal POS transaction data;

[0033] Using a hash algorithm to perform hash processing on each historical abnormal POS transaction record of the target bank card to obtain multiple first character strings;

[0034] The current POS transaction data is hashed using a hash algorithm to obtain a second character string;

[0035] Calculate the edit distance between each first character string and the second character string to obtain multiple first edit distances;

[0036] Sorting the plurality of first edit distances in ascending order of value, and comparing the first edit distance at the top of the order with a preset first edit distance threshold;

[0037] If the first edit distance of the first ranked item is less than or equal to the first edit distance threshold, the current POS transaction data is marked as fraudulent data, and the fraudulent data is used as the first judgment result of the first round of credibility judgment;

[0038] If the first edit distance of the first ranked item is greater than the first edit distance threshold, the current POS transaction data is marked as credible data, and the credible data is used as the first judgment result of the first round of credibility judgment.

[0039] Furthermore, after performing the first round of credibility judgment on the current POS transaction data, it includes:

[0040] When the first judgment result is credible data, calling a second blockchain including a preset smart contract; the preset smart contract includes standard verification data;

[0041] Wherein, the standard verification data includes but is not limited to one of a pre-stored correct password, a correct fingerprint, and a correct face image;

[0042] A second blockchain including a preset smart contract is used to perform compliance verification on the trusted data to obtain a compliance verification result; the compliance verification result includes one of compliance or non-compliance.

[0043] Further, after obtaining the first historical abnormal POS transaction data about the user's target bank card, the method includes:

[0044] Retrieve the preconfigured second isolation forest model;

[0045] Acquire second historical abnormal POS transaction data from the second historical POS transaction data using a preconfigured second isolation forest model; the second historical abnormal POS transaction data includes at least one historical abnormal POS transaction record of a target bank card on a target POS device;

[0046] A second round of credibility judgment is performed on the current POS transaction data according to the second historical abnormal POS transaction data to obtain a second judgment result; the second judgment result includes one of credible data and fraudulent data.

[0047] Furthermore, the performing of a second round of credibility judgment on the current POS transaction data includes:

[0048] Extracting each historical abnormal POS transaction record about the target bank card on the target POS device from the second historical abnormal POS transaction data;

[0049] Using a hash algorithm to perform hash processing on each historical abnormal POS transaction record of the target bank card on the target POS device to obtain multiple third character strings;

[0050] Calculate the edit distance between each third character string and the second character string to obtain multiple second edit distances;

[0051] Sorting the plurality of second edit distances in ascending order of value, and comparing the second edit distance ranked first in the sorting with a preset second edit distance threshold;

[0052] If the second edit distance of the first ranked item is less than or equal to the second edit distance threshold, the current POS transaction data is marked as fraudulent data, and the fraudulent data is used as the second judgment result of the second round of credibility judgment;

[0053] If the second edit distance of the first ranked data is greater than the second edit distance threshold, the current POS transaction data is marked as credible data, and the credible data is used as the second judgment result of the second round of credibility judgment.

[0054] A mobile payment trusted data processing system based on blockchain, comprising:

[0055] A data acquisition module, used to acquire a current payment request initiated by a user at the current moment on a target POS device through a mobile payment method, and retrieve first historical POS transaction data from the first blockchain according to the current payment request; the current payment request includes the target bank card bound to the user's mobile payment method and the current POS transaction data;

[0056] an anomaly detection module, used for obtaining first historical abnormal POS transaction data about a target bank card from first historical POS transaction data by using a preconfigured first isolation forest model; the first historical POS transaction data includes a plurality of historical POS transaction records about the target bank card; the first historical abnormal POS transaction data includes at least one historical abnormal POS transaction record about the target bank card;

[0057] a credible verification module, configured to calculate a first edit distance between current POS transaction data and first abnormal POS transaction data, and perform a first round of credibility judgment on the current POS transaction data according to the first edit distance to obtain a first judgment result; the first judgment result includes one of credible data and fraudulent data;

[0058] A transaction processing module is used by the bank system associated with the target bank card to perform a transaction processing operation on the current payment request according to the trusted data or the fraud data, and upload the trusted data or the fraud data to the first blockchain for storage; the transaction processing operation includes one of transaction approval or rejection.

[0059] Compared with the prior art, the present invention has the following beneficial effects:

[0060] The present application discloses a blockchain-based mobile payment trusted data processing method and system, comprising: retrieving first historical POS transaction data from a first blockchain according to a current payment request; obtaining first historical abnormal POS transaction data about a target bank card from the first historical POS transaction data using a preconfigured first isolation forest model; calculating a first edit distance between the current POS transaction data and the first abnormal POS transaction data, and performing a first round of credibility judgment on the current POS transaction data according to the first edit distance; performing a transaction processing operation on the current payment request according to the trusted data or the fraud data; based on the above features, the present invention realizes accurate detection of abnormal transaction behaviors by adopting an isolation forest model. Accurate detection ensures efficient risk identification during the payment process and enhances the security of the payment system. The system is not only based on the historical transaction data of the user's bank card, but also combines the transaction characteristics of specific POS devices and adopts a multi-round credibility judgment mechanism to improve the accuracy of judgment and effectively reduce the probability of misjudgment and missed judgment. In the early stage of system operation, even in the face of insufficient data, the present invention ensures stable operation of the system through dynamic adjustment and multi-layer judgment strategies, and further optimizes the model performance as transaction data continues to accumulate. While ensuring transaction convenience, it effectively improves the security and transaction credibility of the payment system, reduces interference in the user's payment process, optimizes the payment experience, and improves transaction success rate and user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 A flowchart of a blockchain-based mobile payment trusted data processing method provided by the present invention;

[0062] Figure 2 A schematic diagram of the module structure of a blockchain-based mobile payment trusted data processing system provided by the present invention. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments 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 creative work are within the scope of protection of the present invention.

[0064] Example 1

[0065] See also Figure 1 As shown, this embodiment discloses a mobile payment trusted data processing method based on blockchain, wherein the blockchain includes a first blockchain for storing first historical POS transaction data, and the method includes:

[0066] S101: Obtain a current payment request initiated by a user at the current moment on a target POS device through a mobile payment method, and retrieve first historical POS transaction data from a first blockchain according to the current payment request; the current payment request includes the target bank card bound to the user's mobile payment method and the current POS transaction data;

[0067] S102: using a preconfigured first isolation forest model to obtain first historical abnormal POS transaction data about a target bank card from first historical POS transaction data; the first historical POS transaction data includes a plurality of historical POS transaction records about the target bank card; the first historical abnormal POS transaction data includes at least one historical abnormal POS transaction record about the target bank card;

[0068] S103: Calculate a first edit distance between the current POS transaction data and the first abnormal POS transaction data, and perform a first round of credibility judgment on the current POS transaction data according to the first edit distance to obtain a first judgment result; the first judgment result includes one of credible data and fraudulent data;

[0069] S104: The bank system associated with the target bank card performs a transaction processing operation on the current payment request according to the trusted data or the fraud data, and uploads the trusted data or the fraud data to the first blockchain for storage; the transaction processing operation includes one of transaction approval or rejection;

[0070] It should be noted that: the current payment request initiated by the user at the target POS device through a mobile payment method at the current moment, wherein the mobile payment method may include but is not limited to one of the payment methods such as QR code or NFC, but no matter which mobile payment method is used, only the bank card (including debit card and credit card, etc.) associated with the mobile payment method used in the current payment request will be used as the target bank card; for example, the user's mobile payment method is associated with multiple bank cards, namely card 1 and card 2, etc., but the current payment request uses card 1, then card 1 will be used as the target bank card;

[0071] The first historical POS transaction data stores multiple historical POS transaction records of the user using the target bank card, and each historical POS transaction record records transaction features in multiple dimensions, including but not limited to user ID, transaction amount, transaction time, transaction location, and unique identifier of the target POS device (such as a digital machine code), etc.;

[0072] Therefore, it can be understood that when retrieving the first historical POS transaction data from the first blockchain according to the current payment request, the first historical POS transaction data about the target bank card can be retrieved from the first blockchain through the card number of the target bank card;

[0073] In implementation, the step of obtaining first historical abnormal POS transaction data about a target bank card from first historical POS transaction data includes:

[0074] Inputting the first historical POS transaction data into a preconfigured first isolation forest model to obtain an anomaly score for each historical POS transaction record related to the target bank card;

[0075] Specifically, the generation process of the preconfigured first isolation forest model is as follows:

[0076] Initialize the isolation forest model and determine the various model parameters of the isolation forest model;

[0077] For example, n_estimators: 100 (number of isolated trees); max_samples: 256 (number of samples per tree); contamination: 0.05 (5% of samples are expected to be abnormal); random_state: 42 (to ensure consistency of results);

[0078] According to the initialized isolation forest model with determined model parameters, a portion of samples are randomly selected from the first historical POS transaction data as a training data set;

[0079] A preset feature selection mechanism is introduced to randomly select a target transaction feature from the training data set as the basis for segmentation, and a segmentation point is determined within the value range of the selected target transaction feature;

[0080] Specifically, the introduction of a preset feature selection mechanism to randomly select a target transaction feature from the training data set as a segmentation basis includes:

[0081] Obtain all historical POS transaction records about the target bank card in the training data set, and extract multiple transaction features from the historical POS transaction records;

[0082] Under each transaction feature, the K-means algorithm is used to cluster all historical POS transaction records of the target bank card to obtain multiple data clusters under each transaction feature;

[0083] It should be understood that when clustering historical POS transaction records according to each transaction feature, if more data clusters are obtained under the transaction feature, it means that the transaction feature is difficult to quickly distinguish abnormal POS transaction records. On the contrary, fewer data clusters are obtained, which means that the transaction feature can quickly distinguish abnormal POS transaction records.

[0084] For example, assuming that the POS transaction amount of a certain user's bank card is usually below 100, if the K-means algorithm is used to divide two data clusters of POS transaction amounts, one for a data cluster above 100 and the other for a data cluster below 100, transactions can be quickly divided according to the POS transaction amount. However, if the POS transaction amount of the user's bank card is usually between 100 and 1000, this will increase the number of data clusters under the POS transaction amount. Therefore, if you want to distinguish abnormal transaction data, you need to perform multiple rounds of analysis, which greatly reduces the processing speed of trusted verification.

[0085] Count the number of multiple data clusters under each transaction feature, and compare the number of data clusters with a preset number threshold; if the number of data clusters is less than or equal to the number threshold, mark the corresponding transaction feature as a target transaction feature; if the number of data clusters is greater than the number threshold, mark the corresponding transaction feature as a non-target transaction feature;

[0086] All target transaction features are counted to form a target transaction feature set, and any target transaction feature in the target transaction feature set is used as a basis for segmentation;

[0087] The above is set manually by technicians based on experimental data or experience. For example, if the target transaction feature is the transaction amount, and the transaction amount is between 80 and 5,000 yuan, 150 yuan is selected as the split point.

[0088] Perform binary partitioning based on the characteristic value and split point of the target transaction feature to obtain two child nodes, namely the left child node and the right child node;

[0089] For example, the left child node is the sample whose characteristic value of the transaction amount is less than 150 yuan; the right child node is the sample whose characteristic value of the transaction amount is greater than or equal to 150 yuan;

[0090] Repeat the above steps for each child node until the preset stop condition is met, then stop dividing the child nodes and get a single isolated tree;

[0091] The preset stop condition includes any one of the following: there is only one sample left in the node or the preset maximum segmentation depth has been reached;

[0092] Repeat the above single isolated tree construction process to generate m isolated trees, and combine the m isolated trees to obtain the first isolation forest model, where m is an integer greater than zero;

[0093] The abnormality score is compared with a preset abnormality score threshold. If the abnormality score is greater than or equal to the abnormality score threshold, the historical POS transaction record of the target bank card is marked as abnormal.

[0094] The logic for obtaining the abnormality score is as follows:

[0095] Extract the path length of each isolated tree in the first isolation forest model, and calculate the mean of the path lengths of all isolated trees to obtain the average path length;

[0096] Calculate the anomaly score of each historical POS transaction record about the target bank card based on the average path length;

[0097] The calculation formula of the abnormal score is: Where: S(x) is the anomaly score, E(h(x)) is the average path length, c(n) is the normalization constant related to the number of historical POS transaction records n, which is a correction term based on the harmonic number, so that the path length of the isolation forest under different sample numbers is consistent;

[0098] Count all historical abnormal POS transaction records about the target bank card to obtain first historical abnormal POS transaction data in a collection form;

[0099] It should be understood that the Isolation Forest Algorithm is an unsupervised learning algorithm for anomaly detection. It isolates abnormal data points from normal data points by building a decision tree. The core idea of ​​the Isolation Forest is that abnormal points are easier to be isolated than normal points, that is, abnormal points can be distinguished under fewer segmentation operations. Therefore, applying it to POS transaction verification can quickly complete the credibility assessment of each POS transaction of the user. Compared with the traditional method, it can ensure the security of POS transactions while effectively ensuring the speed of credibility verification of POS transactions.

[0100] In implementation, the first round of credibility judgment on the current POS transaction data includes:

[0101] Extracting each historical abnormal POS transaction record about the target bank card in the first abnormal POS transaction data;

[0102] Using a hash algorithm to perform hash processing on each historical abnormal POS transaction record of the target bank card to obtain multiple first character strings;

[0103] The current POS transaction data is hashed using a hash algorithm to obtain a second character string;

[0104] Calculate the edit distance between each first character string and the second character string to obtain multiple first edit distances;

[0105] Sorting the plurality of first edit distances in ascending order of value, and comparing the first edit distance at the top of the order with a preset first edit distance threshold;

[0106] It should be noted that: the hash algorithm is specifically one of the algorithms such as MD5 or SHA256; the first edit distance, also known as Levenshte in distance, is used to measure the degree of difference between two strings, which indicates the minimum number of edit operations required to convert one string into another string; when the first edit distance is smaller, it indicates that the two hash strings are more similar; if the distance is 0, it indicates that the two hash strings are exactly the same;

[0107] If the first edit distance of the first ranked item is less than or equal to the first edit distance threshold, the current POS transaction data is marked as fraudulent data, and the fraudulent data is used as the first judgment result of the first round of credibility judgment;

[0108] If the first edit distance of the first ranked data is greater than the first edit distance threshold, the current POS transaction data is marked as credible data, and the credible data is used as the first judgment result of the first round of credibility judgment;

[0109] In some specific implementations, after performing a first round of credibility judgment on the current POS transaction data, the following steps are included:

[0110] When the first judgment result is credible data, calling a second blockchain including a preset smart contract; the preset smart contract includes standard verification data;

[0111] Wherein, the standard verification data includes but is not limited to one of a pre-stored correct password, a correct fingerprint, and a correct face image;

[0112] Using a second blockchain including a preset smart contract to perform compliance verification on the trusted data to obtain a compliance verification result; the compliance verification result includes one of compliance or non-compliance;

[0113] Specifically, the use of a second blockchain including a preset smart contract to verify the compliance of the trusted data includes:

[0114] Extracting actual verification data in the current payment request according to the trusted data, the actual verification data including but not limited to one of an input password, an input fingerprint, and an input face image;

[0115] Using a smart contract containing standard verification data, the actual verification data is compared with the standard verification data;

[0116] If the actual verification data and the standard verification data are completely consistent, the trusted data is judged to be compliant;

[0117] If the actual verification data and the standard verification data are not completely consistent, the trusted data is judged to be non-compliant;

[0118] It should be noted that: completely consistent means that the actual verification data and the standard verification data are exactly the same. For example, if the actual verification data is an input password (such as a PIN password), the correct password stored in the smart contract of the second blockchain is retrieved according to the target bank card, and the characters and positions of the correct password and the input password are compared to see if they are exactly the same. If they are exactly the same, it means that the actual verification data and the standard verification data are completely consistent. Otherwise, it means that the actual verification data and the standard verification data are not completely consistent.

[0119] It is understandable that in order to promote consumption and improve the success rate of transactions, existing merchants will ask users to set up password-free payment or signature verification (i.e., credit card transactions may only require the cardholder's signature to complete the transaction). Although this method provides convenience, it also increases the risk of bank card fraud. Therefore, the present invention limits users to identity authentication in the early stage, which can effectively ensure the credibility of the initial POS transaction data, and thus is conducive to the payment security in the subsequent password-free payment or signature verification scenario, and improves the effective analysis data basis;

[0120] It should also be noted that: in the early stage of system investment, or in the early stage of user use, since there are fewer historical POS transaction records stored in the first blockchain, and fewer historical POS transaction records mean less training data for the isolation forest model, this will lead to the present invention in the early stage of investment in the misjudgment or omission of existing occurrences. As the historical POS transaction records continue to be enriched, this problem can be effectively solved. However, if certain automatic intervention is not performed in the early stage, it will lead to a large detection deviation in the subsequent isolation forest model.

[0121] Therefore, by initially adapting the second blockchain containing the preset smart contract, the normal and correct operation of the system in the initial stage of investment can be effectively guaranteed, and at the same time, it is conducive to ensuring the accuracy of the historical POS transaction records uploaded to the first blockchain for storage;

[0122] In some specific implementations, after obtaining the first historical abnormal POS transaction data about the user's target bank card, the method includes:

[0123] Retrieve the preconfigured second isolation forest model;

[0124] Acquire second historical abnormal POS transaction data from the second historical POS transaction data using a preconfigured second isolation forest model; the second historical abnormal POS transaction data includes at least one historical abnormal POS transaction record of a target bank card on a target POS device;

[0125] The second historical abnormal POS transaction data is the same as the first historical abnormal POS transaction data, and is pre-stored in the first blockchain. The difference is that the second historical abnormal POS transaction data is a plurality of historical transaction records about the target bank card on the target POS device;

[0126] In addition, the training and processing logic of the preconfigured second isolation forest model is the same as that of the first isolation forest model. For details, please refer to the relevant content of the first isolation forest model, and no further details will be given here.

[0127] It should be noted that the target POS device refers to the POS device from which the current payment request is initiated. In other words, the POS device currently used by the target bank card is used as the target POS device.

[0128] Exemplarily, continuing the above assumption, card 1 is the target bank card, and assuming that there are multiple POS devices, namely POS device A and POS device B, etc., wherein POS device A is the POS device used by the target bank card at the current moment, then POS device A is taken as the target POS device, and further, when obtaining the second historical abnormal POS transaction data, multiple historical transaction records of card 1 on POS device A are retrieved;

[0129] It should be understood that: by retrieving the second historical abnormal POS transaction data of the target bank card on the target POS device, that is, multiple historical transaction records of the target bank card on the target POS device (that is, the specific POS device), the behavior characteristics of the target bank card on the target POS device (that is, the specific POS device) can be captured, and then the similarity between the first historical abnormal POS transaction data and the current POS transaction data, and the similarity between the second historical abnormal POS transaction data and the current POS transaction data can be combined to effectively improve the accuracy of the credibility judgment of the current POS transaction data. Compared with the credibility judgment based solely on the similarity between the first historical abnormal POS transaction data and the current POS transaction data, the accuracy of the credibility judgment is further improved, the probability of misjudgment or omission of fraud data is reduced, and the security of the user in implementing each POS transaction is greatly improved, avoiding the possibility of the user's bank card being stolen;

[0130] Performing a second round of credibility judgment on the current POS transaction data according to the second historical abnormal POS transaction data to obtain a second judgment result; the second judgment result includes one of credible data and fraudulent data;

[0131] In some further specific implementations, the performing a second round of credibility judgment on the current POS transaction data includes:

[0132] Extracting each historical abnormal POS transaction record about the target bank card on the target POS device from the second historical abnormal POS transaction data;

[0133] Using a hash algorithm to perform hash processing on each historical abnormal POS transaction record of the target bank card on the target POS device to obtain multiple third character strings;

[0134] Calculate the edit distance between each third character string and the second character string to obtain multiple second edit distances;

[0135] Sorting the plurality of second edit distances in ascending order of value, and comparing the second edit distance ranked first in the sorting with a preset second edit distance threshold;

[0136] If the second edit distance of the first ranked item is less than or equal to the second edit distance threshold, the current POS transaction data is marked as fraudulent data, and the fraudulent data is used as the second judgment result of the second round of credibility judgment;

[0137] If the second edit distance of the first ranked data is greater than the second edit distance threshold, the current POS transaction data is marked as credible data, and the credible data is used as the second judgment result of the second round of credibility judgment;

[0138] In some other specific implementations, only after the second judgment result is obtained, the content of step S104 is executed, thereby completing the transaction approval or rejection operation for the current payment request;

[0139] By combining the historical abnormal POS transaction records of the target bank card and the historical abnormal POS transaction records of the target bank card on a specific POS device, the present invention can accurately and effectively capture fraudulent or risky POS transaction behaviors, thereby protecting the payment security of users or merchants to the greatest extent and improving payment credibility.

[0140] Example 2

[0141] See also Figure 2 As shown, based on the same inventive concept, this embodiment discloses a mobile payment trusted data processing system based on blockchain. For details not provided in this embodiment, please refer to the description of the relevant parts in Embodiment 1. The system includes:

[0142] The data acquisition module 210 is used to acquire the current payment request initiated by the user at the current moment on the target POS device through the mobile payment method, and retrieve the first historical POS transaction data from the first blockchain according to the current payment request; the current payment request includes the target bank card bound to the user's mobile payment method and the current POS transaction data;

[0143] The anomaly detection module 220 is used to obtain first historical abnormal POS transaction data about the target bank card from the first historical POS transaction data by using a preconfigured first isolation forest model; the first historical POS transaction data includes a plurality of historical POS transaction records about the target bank card; the first historical abnormal POS transaction data includes at least one historical abnormal POS transaction record about the target bank card;

[0144] The trust verification module 230 is used to calculate a first edit distance between the current POS transaction data and the first abnormal POS transaction data, and perform a first round of credibility judgment on the current POS transaction data according to the first edit distance to obtain a first judgment result; the first judgment result includes one of trustworthy data and fraudulent data;

[0145] The transaction processing module 240 is used by the bank system associated with the target bank card to perform a transaction processing operation on the current payment request according to the trusted data or the fraud data, and upload the trusted data or the fraud data to the first blockchain storage; the transaction processing operation includes one of transaction approval or rejection.

[0146] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters, weights and thresholds in the formula are set by technicians in this field according to actual conditions.

[0147] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through a wired network or a wireless network. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD) or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0148] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0150] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only one, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0151] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0152] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0153] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0154] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for processing trusted data of mobile payment based on blockchain, wherein the blockchain comprises a first blockchain for storing first historical POS transaction data, characterized in that: The method comprises: Obtaining a current payment request initiated by the user at the current moment on the target POS device through a mobile payment method, and retrieving first historical POS transaction data from the first blockchain according to the current payment request; the current payment request includes the target bank card bound to the user's mobile payment method and the current POS transaction data; Acquire first historical abnormal POS transaction data about a target bank card from first historical POS transaction data using a preconfigured first isolation forest model; the first historical POS transaction data includes a plurality of historical POS transaction records about the target bank card; the first historical abnormal POS transaction data includes at least one historical abnormal POS transaction record about the target bank card; Calculating a first edit distance between current POS transaction data and first abnormal POS transaction data, and performing a first round of credibility judgment on the current POS transaction data according to the first edit distance to obtain a first judgment result; the first judgment result includes one of credible data and fraudulent data; The bank system associated with the target bank card performs a transaction processing operation on the current payment request according to the trusted data or the fraud data, and uploads the trusted data or the fraud data to the first blockchain for storage; the transaction processing operation includes one of transaction approval or rejection.

2. The blockchain-based mobile payment trusted data processing method according to claim 1 is characterized in that: The step of acquiring first historical abnormal POS transaction data about the target bank card from the first historical POS transaction data includes: Inputting the first historical POS transaction data into a preconfigured first isolation forest model to obtain an anomaly score for each historical POS transaction record related to the target bank card; The abnormality score is compared with a preset abnormality score threshold. If the abnormality score is greater than or equal to the abnormality score threshold, the historical POS transaction record of the target bank card is marked as abnormal. The logic for obtaining the abnormality score is as follows: Extract the path length of each isolated tree in the first isolation forest model, and calculate the mean of the path lengths of all isolated trees to obtain the average path length; Calculate the anomaly score of each historical POS transaction record about the target bank card based on the average path length; All historical abnormal POS transaction records about the target bank card are counted to obtain first historical abnormal POS transaction data in a collection form.

3. The blockchain-based mobile payment trusted data processing method according to claim 2 is characterized in that: The generation process of the preconfigured first isolation forest model is as follows: Initialize the isolation forest model and determine the various model parameters of the isolation forest model; According to the initialized isolation forest model with determined model parameters, a portion of samples are randomly selected from the first historical POS transaction data as a training data set; A preset feature selection mechanism is introduced to randomly select a target transaction feature from the training data set as the basis for segmentation, and a segmentation point is determined within the value range of the selected target transaction feature; Perform binary partitioning based on the characteristic value and split point of the target transaction feature to obtain two child nodes, namely the left child node and the right child node; Repeat the above steps for each child node until the preset stop condition is met, then stop dividing the child node and get a single isolated tree; The preset stop condition includes any one of the following: there is only one sample left in the node or the preset maximum segmentation depth has been reached; Repeat the above single isolated tree construction process to generate m isolated trees, and combine the m isolated trees to obtain the first isolation forest model, where m is an integer greater than zero.

4. The blockchain-based mobile payment trusted data processing method according to claim 3 is characterized in that: The introduction of a preset feature selection mechanism to randomly select a target transaction feature from the training data set as a basis for segmentation includes: Obtain all historical POS transaction records about the target bank card in the training data set, and extract multiple transaction features from the historical POS transaction records; Under each transaction feature, the K-means algorithm is used to cluster all historical POS transaction records of the target bank card to obtain multiple data clusters under each transaction feature; Count the number of multiple data clusters under each transaction feature, and compare the number of data clusters with a preset number threshold; if the number of data clusters is less than or equal to the number threshold, mark the corresponding transaction feature as a target transaction feature; if the number of data clusters is greater than the number threshold, mark the corresponding transaction feature as a non-target transaction feature; All target transaction features are counted to form a target transaction feature set, and any target transaction feature in the target transaction feature set is used as a basis for segmentation.

5. The blockchain-based mobile payment trusted data processing method according to claim 4 is characterized in that: The first round of credibility judgment on the current POS transaction data includes: Extracting each historical abnormal POS transaction record about the target bank card from the first abnormal POS transaction data; Using a hash algorithm to perform hash processing on each historical abnormal POS transaction record of the target bank card to obtain multiple first character strings; The current POS transaction data is hashed using a hash algorithm to obtain a second character string; Calculate the edit distance between each first character string and the second character string to obtain multiple first edit distances; Sorting the plurality of first edit distances in ascending order of value, and comparing the first edit distance at the top of the order with a preset first edit distance threshold; If the first edit distance of the ranked data is less than or equal to the first edit distance threshold, the current POS transaction data is marked as fraudulent data, and the fraudulent data is used as the first judgment result of the first round of credibility judgment; If the first edit distance of the first ranked item is greater than the first edit distance threshold, the current POS transaction data is marked as credible data, and the credible data is used as the first judgment result of the first round of credibility judgment.

6. The blockchain-based mobile payment trusted data processing method according to claim 5 is characterized in that: After the first round of credibility judgment is performed on the current POS transaction data, including: When the first judgment result is credible data, calling a second blockchain including a preset smart contract; the preset smart contract includes standard verification data; Wherein, the standard verification data includes but is not limited to one of a pre-stored correct password, a correct fingerprint, and a correct face image; A second blockchain including a preset smart contract is used to perform compliance verification on the trusted data to obtain a compliance verification result; the compliance verification result includes one of compliance or non-compliance.

7. The blockchain-based mobile payment trusted data processing method according to claim 6 is characterized in that: After obtaining the first historical abnormal POS transaction data about the user's target bank card, including: Retrieve the preconfigured second isolation forest model; Acquire second historical abnormal POS transaction data from the second historical POS transaction data using a preconfigured second isolation forest model; the second historical abnormal POS transaction data includes at least one historical abnormal POS transaction record of a target bank card on a target POS device; A second round of credibility judgment is performed on the current POS transaction data according to the second historical abnormal POS transaction data to obtain a second judgment result; the second judgment result includes one of credible data and fraudulent data.

8. The blockchain-based mobile payment trusted data processing method according to claim 7 is characterized in that: The performing of a second round of credibility judgment on the current POS transaction data includes: Extracting each historical abnormal POS transaction record about the target bank card on the target POS device from the second historical abnormal POS transaction data; Using a hash algorithm to perform hash processing on each historical abnormal POS transaction record of the target bank card on the target POS device to obtain multiple third character strings; Calculate the edit distance between each third character string and the second character string to obtain multiple second edit distances; Sorting the plurality of second edit distances in ascending order of value, and comparing the second edit distance ranked first in the sorting with a preset second edit distance threshold; If the second edit distance of the first ranked item is less than or equal to the second edit distance threshold, the current POS transaction data is marked as fraudulent data, and the fraudulent data is used as the second judgment result of the second round of credibility judgment; If the second edit distance of the first ranked data is greater than the second edit distance threshold, the current POS transaction data is marked as credible data, and the credible data is used as the second judgment result of the second round of credibility judgment.

9. A mobile payment trusted data processing system based on blockchain, characterized in that: include: A data acquisition module, used to acquire a current payment request initiated by a user at the current moment on a target POS device through a mobile payment method, and retrieve first historical POS transaction data from the first blockchain according to the current payment request; the current payment request includes the target bank card bound to the user's mobile payment method and the current POS transaction data; an anomaly detection module, used for obtaining first historical abnormal POS transaction data about a target bank card from first historical POS transaction data by using a preconfigured first isolation forest model; the first historical POS transaction data includes a plurality of historical POS transaction records about the target bank card; the first historical abnormal POS transaction data includes at least one historical abnormal POS transaction record about the target bank card; a credible verification module, configured to calculate a first edit distance between current POS transaction data and first abnormal POS transaction data, and perform a first round of credibility judgment on the current POS transaction data according to the first edit distance to obtain a first judgment result; the first judgment result includes one of credible data and fraudulent data; A transaction processing module is used by the bank system associated with the target bank card to perform a transaction processing operation on the current payment request according to the trusted data or the fraud data, and upload the trusted data or the fraud data to the first blockchain for storage; the transaction processing operation includes one of transaction approval or rejection.

Citation Information

Patent Citations

  • Fraudulent behavior identification method and device

    CN118052594A

  • Supply chain financial application method based on supervisible block chain private transaction

    CN118229420A

  • Bill data analysis method and system based on multi-modal large model

    CN118552331A

  • Bill payment system based on business configuration

    CN118761773A

  • Method and system for fraud prevention via blockchain

    US20190318359A1