Payment risk identification method and device based on block chain
Through the blockchain-based payment risk identification method, multiple verification nodes are used to verify the information of payment users and paid users, and the payment risk value is calculated, which solves the problem that traditional methods are difficult to identify complex payment risks, and improves the security of payment.
Patent Information
- Application Number
- CN202411909472.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-15
AI Technical Summary
Traditional payment risk identification methods are difficult to accurately identify complex and changeable payment environments and user behaviors, resulting in the inability to effectively identify existing payment risks.
The payment risk identification method based on blockchain is adopted, and transaction scenario information, device information, network information, etc. of payment users and paid users are obtained, and these information are verified through multiple verification nodes in the blockchain, and the payment risk value is finally calculated to determine whether to allow payment transactions.
It improves the accuracy of payment risk identification, enhances the security of payment, and can effectively identify and prevent complex payment risks.
Smart Images

Figure CN119831602A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a payment risk identification method and device based on blockchain. Background Art
[0002] In recent years, the mobile payment market has continued to develop rapidly, and mobile payment products have become an indispensable part of residents' daily lives, and payment behavior has become an indispensable part of people's daily lives. However, the payment risks that come with it are also becoming increasingly prominent.
[0003] Traditional payment risk identification methods mainly rely on rule-based static models, which are often difficult to cope with complex and changeable payment environments and user behaviors, resulting in the inability to accurately identify existing payment risk behaviors. Therefore, a payment risk identification method is urgently needed to improve the accuracy of payment risk identification. Summary of the invention
[0004] In view of this, the present application provides a payment risk identification method and device based on blockchain, which is used to improve the accuracy of payment risk identification, thereby improving the security of payment.
[0005] In a first aspect, an embodiment of the present application provides a payment risk identification method based on blockchain, the method comprising:
[0006] Obtaining a payment transaction request initiated by a paying user, wherein the payment transaction request includes paying user information and paid user information;
[0007] Determine, through a query node in the blockchain, whether the relationship between the paying user information and the user corresponding to the paid user information is an authenticated relationship;
[0008] If the relationship between the users is a non-authenticated relationship, then the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user are obtained; as well as the payment record information of the paying user and the payment record information of the paid user;
[0009] Verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through a first verification node in the blockchain to obtain first verification information;
[0010] The second verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through a second verification node in the blockchain;
[0011] The third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user;
[0012] If the payment risk value is greater than a first preset value, prohibiting the payment transaction corresponding to the payment transaction request;
[0013] If the payment risk value is between the first preset value and the second preset value, then outputting payment transaction risk warning information; the first preset value is greater than the second preset value;
[0014] If the payment risk value is less than or equal to the second preset value, the payment transaction request is made, and the authentication passing relationship between the paying user and the paid user is written in the query node.
[0015] In an optional embodiment provided by the present invention, the first verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through the first verification node in the blockchain, including:
[0016] The first verification node in the blockchain determines the device feature vector matrix of the payment user according to the device information, device usage information, device network information, and device location information of the payment user;
[0017] Determining a scenario feature vector of the paying user according to the transaction scenario information;
[0018] The first verification node verifies the payment user through the device feature vector matrix and the scenario feature vector to obtain the first verification information.
[0019] In an optional embodiment provided by the present invention, the first verification node in the blockchain determines the device feature vector matrix of the paying user according to the device information, device usage information, device network information, and device location information of the paying user, including:
[0020] The first verification node in the blockchain obtains the device information, device usage information, device network information, and device location information of the payment user to determine the feature vectors corresponding to the device feature vectors of the payment user;
[0021] Determine, through a device database, weight vectors corresponding to the device information, device usage information, device network information, and device location information of the paying user;
[0022] A device feature vector matrix is determined based on feature vectors corresponding to the device information, device usage information, device network information, and device location information of the paying user and weight vectors.
[0023] In an optional embodiment provided by the present invention, the first verification node verifies the first verification information by using the device feature vector matrix and the scene feature vector of the paying user, including:
[0024] Inputting the device feature vector and the scenario feature vector of the payment user into a first verification model to obtain a first prediction value and a second prediction value, wherein the first prediction value is obtained based on the device feature vector of the payment user, and the second prediction value is obtained based on the scenario feature vector of the payment user;
[0025] Determining whether an absolute value of a difference between the first predicted value and the second predicted value is less than a target absolute value;
[0026] If the absolute value of the difference is less than the target absolute value, obtaining the first verification information according to the average value of the first predicted value and the second predicted value;
[0027] If the absolute value of the difference is greater than or equal to the target absolute value, a maximum value is selected from the first predicted value and the second predicted value as the first verification information.
[0028] In an optional embodiment provided by the present invention, the second verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through a second verification node in the blockchain, including:
[0029] The second verification node in the blockchain obtains the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user and inputs them into the feature extraction model to obtain the target data feature vector corresponding to each piece of information;
[0030] Verification is performed based on the target data feature vectors corresponding to all the information to obtain the second verification information.
[0031] In an optional embodiment provided by the present invention, the second verification information is obtained by verifying the target data feature vectors corresponding to all the information, including:
[0032] Calculating the similarity between each target data feature vector and each data feature vector in the data feature vector library;
[0033] Obtaining the data feature vector with the highest similarity to the target data feature vector in the data feature vector library;
[0034] The second verification information is obtained by performing weighted calculation based on the scores corresponding to the data feature vectors with the highest similarity.
[0035] In an optional embodiment provided by the present invention, the third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user, including:
[0036] Calculate the first risk value and the second risk value corresponding to the payment transaction request respectively according to the payment record information of the paying user and the payment record information of the paid user;
[0037] The first verification information, the second verification information, the first risk value, and the second risk value are input into a payment risk identification model to obtain the payment risk value.
[0038] In an optional embodiment provided by the present invention, the step of inputting the first verification information, the second verification information, the first risk value, and the second risk value into a payment risk identification model to obtain the payment risk value includes:
[0039] Input the first verification information, the second verification information, the first risk value, and the second risk value into a payment risk identification model, and obtain a first verification information vector, a second verification information vector, a first risk value vector, and a second risk value vector corresponding to the first verification information, the second verification information, the first risk value, and the second risk value through a feature extraction layer;
[0040] fusing the first verification information vector and the first risk value vector to obtain a first fused vector, and fusing the second verification information vector and the second risk value vector to obtain a second fused vector;
[0041] Obtain a first prediction value through the first fusion vector, and obtain a second prediction value through the second fusion vector;
[0042] The payment risk value is obtained according to the first prediction value and the second prediction value.
[0043] In an optional embodiment provided by the present invention, before allowing the payment transaction corresponding to the payment transaction request, the method further includes:
[0044] Querying the smart contract corresponding to the payment transaction request through a relay node;
[0045] If the smart contract includes the paying user information and the paid user information, the payment transaction corresponding to the payment transaction request is allowed.
[0046] In a second aspect, an embodiment of the present application further provides a payment risk identification device based on blockchain, the device comprising:
[0047] An acquisition module, used to acquire a payment transaction request initiated by a paying user, wherein the payment transaction request includes information of the paying user and information of the paid user;
[0048] A determination module, used to determine whether the relationship between the paying user information and the user corresponding to the paid user information is a certified relationship through a query node in the blockchain;
[0049] The acquisition module is further configured to acquire transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user, respectively, if the relationship between the users is a non-authenticated relationship; as well as the payment record information of the paying user and the payment record information of the paid user;
[0050] A first verification module, used to verify the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through a first verification node in the blockchain to obtain first verification information;
[0051] A second verification module, used to verify the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through a second verification node in the blockchain to obtain second verification information;
[0052] A third verification module, used for a third verification node in the blockchain to calculate a payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user;
[0053] a transaction prohibition module, configured to prohibit the payment transaction corresponding to the payment transaction request if the payment risk value is greater than a first preset value;
[0054] an output module, configured to output payment transaction risk warning information if the payment risk value is between the first preset value and the second preset value; the first preset value is greater than the second preset value;
[0055] The transaction allowing module is used to allow the payment transaction corresponding to the payment transaction request if the payment risk value is less than or equal to the second preset value, and write the authentication passing relationship between the paying user and the paid user in the query node.
[0056] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the blockchain-based payment risk identification method of the first aspect.
[0057] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the blockchain-based payment risk identification method in the above-mentioned first aspect are executed.
[0058] A payment risk identification method and device based on blockchain provided in an embodiment of the present application first obtains a payment transaction request initiated by a paying user, wherein the payment transaction request includes the paying user information and the paid user information; then determines through a query node in the blockchain whether the relationship between the paying user information and the user corresponding to the paid user information is an authenticated relationship; if the relationship between the users is a non-authenticated relationship, then obtains the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user respectively; as well as the paying user's payment record information and the paid user's collection record information; then verifies the paying user's transaction scenario information, device information, device usage information, device network information, and device location information through a first verification node in the blockchain The first verification information is obtained; the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user are verified by the second verification node in the blockchain to obtain the second verification information; and the third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user; if the payment risk value is greater than the first preset value, the payment transaction corresponding to the payment transaction request is prohibited; if the payment risk value is between the first preset value and the second preset value, the payment transaction risk warning information is output; the first preset value is greater than the second preset value; if the payment risk value is less than or equal to the second preset value, the payment transaction request is made, and the authentication relationship between the paying user and the paid user is written in the query node. The present application obtains the first verification information and the second verification information through different verification nodes, and then calculates the payment risk value according to the first verification information and the second verification information, and then determines whether the current payment transaction request has a transaction risk according to the payment risk value, so that the accuracy of payment risk identification can be improved through the present application, thereby improving the security of payment.
[0059] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 A flowchart of a payment risk identification method based on blockchain provided in an embodiment of the present application is shown;
[0062] Figure 2 A structural block diagram of a payment risk identification device based on blockchain provided in an embodiment of the present application is shown;
[0063] Figure 3 A schematic diagram of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0064] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects rather than to limit a specific order.
[0065] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.
[0066] In the description of this application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0067] In the embodiments of the present application, at least one can also be described as one or more, and multiple can be two, three, four or more, which is not limited in the present application.
[0068] like Figure 1 As shown, the embodiment of the present application provides a payment risk identification method based on blockchain. The payment risk identification method based on blockchain provided by the present application may include:
[0069] S10: Obtain a payment transaction request initiated by a paying user, wherein the payment transaction request includes paying user information and paid user information.
[0070] The paying user information includes the paying user's account number, name, identity identifier, etc.; the paid user information includes the paid user's account number, name, identity identifier, etc., which is not specifically limited in this embodiment.
[0071] S20. Determine, through a query node in the blockchain, whether the relationship between the paying user information and the user corresponding to the paid user information is an authenticated relationship.
[0072] The query node stores authentication relationships corresponding to multiple users. For example, if user A has made a payment to user B and the previous payment has passed the security verification, the query node stores authentication relationships between user A and user B.
[0073] S30. If the relationship between the users is a non-authenticated relationship, the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user respectively are obtained; as well as the paying user's payment record information and the paid user's payment record information.
[0074] In this embodiment, if the relationship between the paying user and another paying user is a non-authenticated relationship, verification is required based on the relevant information of the paying user and the paid user to ensure the security of the payment transaction request currently initiated. Specifically, the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user can be obtained; as well as the payment record information of the paying user and the payment record information of the paid user, so as to obtain the first verification information and the second verification information in the subsequent steps based on the obtained information.
[0075] Among them, the transaction scene information is the current payment scene, which can be obtained by taking pictures, such as using the camera of the terminal device used by the user to take pictures of the current transaction scene, thereby identifying the transaction scene, such as the scene can be a home, bank, workplace, etc., as well as the number of people in the scene, etc.; device information is the device information used by the user, which includes the device identification code, device brand, device model, operating system, MAC address, etc.; device usage information may include registration behavior, card binding behavior, login behavior, user information modification behavior, etc.; the network information where the device is located may include IP address, network type, etc. The payment record information of the paying user may include all of its payment record information within a certain historical period; the payment record information of the paid user may include all of its payment record information and transfer record information within a certain historical period.
[0076] S40. Verify the payment user's transaction scenario information, device information, device usage information, device network information, and device location information through a first verification node in the blockchain to obtain first verification information.
[0077] The first verification information is used to indicate the payment risk level of the payment transaction request currently initiated by the payment user.
[0078] In an optional embodiment provided by the application, the first verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through the first verification node in the blockchain, including:
[0079] S402. The first verification node in the blockchain determines the device feature vector matrix of the payment user according to the device information, device usage information, device network information, and device location information of the payment user.
[0080] Specifically, the first verification node in the blockchain determines the device feature vector matrix of the payment user according to the device information, device usage information, device network information, and device location information of the payment user, including: the first verification node in the blockchain obtains the device information, device usage information, device network information, and device location information of the payment user to determine the feature vectors corresponding to the device feature vectors of the payment user; determines the weight vectors corresponding to the device information, device usage information, device network information, and device location information of the payment user through a device database; determines the device feature vector matrix based on the feature vectors and weight vectors corresponding to the device information, device usage information, device network information, and device location information of the payment user.
[0081] Among them, the device database stores weight vectors corresponding to various types of device information, which can be determined by counting relevant data in existing fraud cases. For example, through statistical fraud cases, it is often found that payment users register new APPs, users bind cards, etc., and there is no anti-fraud APP installed in the terminal. Then, the weight value corresponding to the device information corresponding to the above behaviors can be set higher, so that the weight vectors corresponding to the payment user's device information, device usage information, device network information, and device location information can be obtained based on the device database. Then, the feature vector corresponding to the user's device information, device usage information, device network information, and device location information and the weight vector are multiplied to obtain the device feature vector matrix.
[0082] S402: Determine a scenario feature vector of the paying user according to the transaction scenario information.
[0083] The transaction scenario information may include the scenario type, the number of people in the scenario, and the relationship between the characters in the scenario. The scenario type may be family, bank, unit, etc. The number of people in the scenario refers to the number of people included in the scenario. The relationship between the characters in the scenario refers to the relationship between the paying user and other users in the scenario, such as husband-wife relationship, father-son relationship, etc.
[0084] S403. The first verification node verifies the payment user through the device feature vector matrix and the scenario feature vector to obtain first verification information.
[0085] Specifically, the first verification node verifies the first verification information by using the device feature vector matrix and the scene feature vector of the payment user, including:
[0086] S4031. Input the device feature vector and the scenario feature vector of the paying user into a first verification model to obtain a first prediction value and a second prediction value.
[0087] The first prediction value is obtained based on the device feature vector of the payment user, and the second prediction value is obtained based on the scene feature vector of the payment user. In this embodiment, the first verification model includes a first prediction module and a second prediction module, the first prediction module predicts the input device feature vector of the payment user to obtain the first prediction value; the second prediction module predicts the input scene feature of the payment user to obtain the second prediction value.
[0088] S4032. Determine whether the absolute value of the difference between the first predicted value and the second predicted value is less than the target absolute value.
[0089] The target absolute value is a value set according to actual needs.
[0090] S4033. If the absolute value of the difference is smaller than the target absolute value, obtaining the first verification information according to the average value of the first predicted value and the second predicted value.
[0091] S4034. If the absolute value of the difference is greater than or equal to the target absolute value, selecting a maximum value from the first predicted value and the second predicted value as the first verification information.
[0092] In this embodiment, if the absolute value of the difference between the first prediction value and the second prediction value is smaller than the target absolute value, it means that the gap between the prediction values obtained by the first prediction module and the second prediction module in the first verification model is small. At this time, the average value of the first prediction value and the second prediction value can be used as the first verification information; if the absolute value of the difference between the first prediction value and the second prediction value is greater than or equal to the target absolute value, it means that the gap between the prediction values obtained by the first prediction module and the second prediction module in the first verification model is large. At this time, the maximum value from the first prediction value and the second prediction value should be selected as the first verification information.
[0093] S50. Verify the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through a second verification node in the blockchain to obtain second verification information.
[0094] The second verification information is used to indicate the risk level of the payment received by the user being paid for the current payment transaction request. In an optional embodiment provided by the present application, the second verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the user being paid through the second verification node in the blockchain, including:
[0095] S501. The second verification node in the blockchain obtains the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user and inputs them into the feature extraction model to obtain the target data feature vectors corresponding to each piece of information.
[0096] Among them, the feature extraction model is an existing trained model. The feature extraction model in this embodiment is only used to extract the target data feature vectors corresponding to the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user.
[0097] S502: Verify according to the target data feature vectors corresponding to all the information to obtain second verification information.
[0098] Specifically, the verification according to the target data feature vectors corresponding to all the information to obtain the second verification information includes: calculating the similarity between each of the target data feature vectors and each of the data feature vectors in the data feature vector library; obtaining the data feature vector in the data feature vector library with the highest similarity to the target data feature vector; and performing weighted calculation according to the scores corresponding to the data feature vectors with the highest similarity to obtain the second verification information. The data feature vector library stores multiple data feature vectors and their corresponding scores.
[0099] S60. The third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user.
[0100] In an optional embodiment provided in the present application, the third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user, including:
[0101] S601. Calculate a first risk value and a second risk value corresponding to the payment transaction request according to the payment record information of the paying user and the payment record information of the paid user.
[0102] S602: Input the first verification information, the second verification information, the first risk value, and the second risk value into a payment risk identification model to obtain the payment risk value.
[0103] Specifically, the step of inputting the first verification information, the second verification information, the first risk value, and the second risk value into a payment risk identification model to obtain the payment risk value includes:
[0104] S6021. Input the first verification information, the second verification information, the first risk value and the second risk value into a payment risk identification model, and obtain the first verification information vector, the second verification information vector, the first risk value vector and the second risk value vector respectively corresponding to the first verification information, the second verification information, the first risk value and the second risk value through a feature extraction layer.
[0105] S6022: Fuse the first verification information vector and the first risk value vector to obtain a first fused vector, and fuse the second verification information vector and the second risk value vector to obtain a second fused vector.
[0106] Specifically, the first fusion vector and the second fusion vector can be obtained through weighted fusion.
[0107] S6023. Obtain a first prediction value through the first fusion vector, and obtain a second prediction value through the second fusion vector.
[0108] S6024. Obtain the payment risk value according to the first prediction value and the second prediction value.
[0109] Specifically, after obtaining the first prediction value and the second prediction value, this embodiment performs weighted calculation or average calculation on the first prediction value and the second prediction value to obtain the payment risk value.
[0110] It should be noted that the payment risk identification model in this embodiment is trained based on sample data and its sample labels. The sample data includes: sample first verification information, sample second verification information, sample first risk value and sample second risk value; the sample label is the marked payment risk value.
[0111] This embodiment first inputs the sample data into the payment risk identification model, obtains the sample first verification information vector, the sample second verification information vector, the sample first risk value vector and the sample second risk value vector through the feature extraction layer in the payment risk identification model, and then fuses the sample first verification information vector and the sample first risk value vector through the first feature fusion layer to obtain the first fusion vector; fuses the sample second verification information vector and the sample second risk value vector through the second feature fusion layer to obtain the second fusion vector. Then, the first prediction value is predicted based on the first fusion vector, and the second prediction value is predicted based on the second fusion vector; and the loss value is calculated based on the first prediction value and the second prediction value. When the loss value is less than the target value, the training of the payment risk identification model is completed.
[0112] In this embodiment, the loss value can be calculated by the following loss function:
[0113]
[0114] Among them, n is the number of sample data, x i is the first predicted value obtained according to the first fusion vector in the i-th sample data, z i The second predicted value obtained according to the second fusion vector in the i-th sample data, y i is the sample label of the i-th sample data.
[0115] S70: If the payment risk value is greater than a first preset value, prohibiting the payment transaction corresponding to the payment transaction request.
[0116] S80: If the payment risk value is between the first preset value and the second preset value, output payment transaction risk warning information.
[0117] Wherein, the first preset value is greater than the second preset value.
[0118] S90: If the payment risk value is less than or equal to the second preset value, the payment transaction corresponding to the payment transaction request is allowed, and the authentication passing relationship between the paying user and the paid user is written in the query node.
[0119] In an optional embodiment provided in the present application, before allowing the payment transaction corresponding to the payment transaction request, the method also includes: querying the smart contract corresponding to the payment transaction request through a relay node; if the smart contract includes the paying user information and the paid user information, allowing the payment transaction corresponding to the payment transaction request.
[0120] A payment risk identification method based on blockchain provided in an embodiment of the present application first obtains a payment transaction request initiated by a paying user, wherein the payment transaction request includes the paying user information and the paid user information; then determines through a query node in the blockchain whether the relationship between the paying user information and the user corresponding to the paid user information is an authenticated relationship; if the relationship between the users is a non-authenticated relationship, then obtains the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user respectively; as well as the payment record information of the paying user and the payment record information of the paid user; then verifies the transaction scenario information, device information, device usage information, device network information, and device location information of the paying user through a first verification node in the blockchain To the first verification information; the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user are verified by the second verification node in the blockchain to obtain the second verification information; and the third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user; if the payment risk value is greater than the first preset value, the payment transaction corresponding to the payment transaction request is prohibited; if the payment risk value is between the first preset value and the second preset value, the payment transaction risk warning information is output; the first preset value is greater than the second preset value; if the payment risk value is less than or equal to the second preset value, the payment transaction request is made, and the authentication relationship between the paying user and the paid user is written in the query node. This application obtains the first verification information and the second verification information through different verification nodes, and then calculates the payment risk value according to the first verification information and the second verification information, and then determines whether the current payment transaction request has a transaction risk according to the payment risk value, so that the accuracy of payment risk identification can be improved through this application, thereby improving the security of payment.
[0121] In the case of dividing each functional module into corresponding functional modules, Figure 2 A possible schematic diagram of the composition of the payment risk identification device based on blockchain involved in the above and embodiments is shown, as Figure 2 As shown, the blockchain-based payment risk identification device may include:
[0122] An acquisition module 21 is used to acquire a payment transaction request initiated by a paying user, wherein the payment transaction request includes information of the paying user and information of the paid user;
[0123] A determination module 22, configured to determine, through a query node in a blockchain, whether the relationship between the paying user information and the user corresponding to the paid user information is a certified relationship;
[0124] The acquisition module 21 is further used to acquire the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user respectively, as well as the payment record information of the paying user and the payment record information of the paid user, if the relationship between the users is a non-authenticated relationship;
[0125] A first verification module 23, used to verify the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through a first verification node in the blockchain to obtain first verification information;
[0126] The second verification module 24 is used to verify the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through the second verification node in the blockchain to obtain second verification information;
[0127] A third verification module 25, used for the third verification node in the blockchain to calculate the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user;
[0128] a transaction prohibition module 26, configured to prohibit the payment transaction corresponding to the payment transaction request if the payment risk value is greater than a first preset value;
[0129] An output module 27, configured to output payment transaction risk warning information if the payment risk value is between the first preset value and the second preset value; the first preset value is greater than the second preset value;
[0130] The transaction allowing module 28 is used to allow the payment transaction corresponding to the payment transaction request if the payment risk value is less than or equal to the second preset value, and write the authentication passing relationship between the paying user and the paid user in the query node.
[0131] In an optional embodiment provided by the present invention, the first verification module 23 is used to:
[0132] The first verification node in the blockchain determines the device feature vector matrix of the payment user according to the device information, device usage information, device network information, and device location information of the payment user;
[0133] Determining a scenario feature vector of the paying user according to the transaction scenario information;
[0134] The first verification node verifies the payment user through the device feature vector matrix and the scenario feature vector to obtain the first verification information.
[0135] In an optional embodiment provided by the present invention, the first verification module 23 is specifically used to:
[0136] The first verification node in the blockchain obtains the device information, device usage information, device network information, and device location information of the payment user to determine the feature vectors corresponding to the device feature vectors of the payment user;
[0137] Determine, through a device database, weight vectors corresponding to the device information, device usage information, device network information, and device location information of the paying user;
[0138] A device feature vector matrix is determined based on feature vectors corresponding to the device information, device usage information, device network information, and device location information of the paying user and weight vectors.
[0139] In an optional embodiment provided by the present invention, the first verification module 23 is specifically used to:
[0140] Inputting the device feature vector and the scenario feature vector of the payment user into a first verification model to obtain a first prediction value and a second prediction value, wherein the first prediction value is obtained based on the device feature vector of the payment user, and the second prediction value is obtained based on the scenario feature vector of the payment user;
[0141] Determining whether an absolute value of a difference between the first predicted value and the second predicted value is less than a target absolute value;
[0142] If the absolute value of the difference is less than the target absolute value, obtaining the first verification information according to the average value of the first predicted value and the second predicted value;
[0143] If the absolute value of the difference is greater than or equal to the target absolute value, a maximum value is selected from the first predicted value and the second predicted value as the first verification information.
[0144] In an optional embodiment provided by the present invention, the second verification module 24 is used to:
[0145] The second verification node in the blockchain obtains the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user and inputs them into the feature extraction model to obtain the target data feature vector corresponding to each piece of information;
[0146] Verification is performed based on the target data feature vectors corresponding to all the information to obtain the second verification information.
[0147] In an optional embodiment provided by the present invention, the second verification module 24 is specifically used for:
[0148] Calculating the similarity between each target data feature vector and each data feature vector in the data feature vector library;
[0149] Obtaining the data feature vector with the highest similarity to the target data feature vector in the data feature vector library;
[0150] The second verification information is obtained by performing weighted calculation based on the scores corresponding to the data feature vectors with the highest similarity.
[0151] In an optional embodiment provided by the present invention, the third verification module 25 is used to:
[0152] Calculate the first risk value and the second risk value corresponding to the payment transaction request respectively according to the payment record information of the paying user and the payment record information of the paid user;
[0153] The first verification information, the second verification information, the first risk value, and the second risk value are input into a payment risk identification model to obtain the payment risk value.
[0154] In an optional embodiment provided by the present invention, the third verification module 25 is specifically used for:
[0155] Input the first verification information, the second verification information, the first risk value, and the second risk value into a payment risk identification model, and obtain a first verification information vector, a second verification information vector, a first risk value vector, and a second risk value vector corresponding to the first verification information, the second verification information, the first risk value, and the second risk value through a feature extraction layer;
[0156] fusing the first verification information vector and the first risk value vector to obtain a first fused vector, and fusing the second verification information vector and the second risk value vector to obtain a second fused vector;
[0157] Obtain a first prediction value through the first fusion vector, and obtain a second prediction value through the second fusion vector;
[0158] The payment risk value is obtained according to the first prediction value and the second prediction value.
[0159] In an optional embodiment provided by the present invention, the transaction allowing module 28 is specifically used to query the smart contract corresponding to the payment transaction request through the relay node; if the smart contract includes the paying user information and the paid user information, the payment transaction corresponding to the payment transaction request is allowed.
[0160] For the specific definition of the device, please refer to the definition of the payment risk identification method based on blockchain above, which will not be repeated here. Each module in the above device can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0161] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a payment risk identification method based on blockchain is implemented.
[0162] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0163] Obtaining a payment transaction request initiated by a paying user, wherein the payment transaction request includes paying user information and paid user information;
[0164] Determine, through a query node in the blockchain, whether the relationship between the paying user information and the user corresponding to the paid user information is an authenticated relationship;
[0165] If the relationship between the users is a non-authenticated relationship, then the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user are obtained; as well as the payment record information of the paying user and the payment record information of the paid user;
[0166] Verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through a first verification node in the blockchain to obtain first verification information;
[0167] The second verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through a second verification node in the blockchain;
[0168] The third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user;
[0169] If the payment risk value is greater than a first preset value, prohibiting the payment transaction corresponding to the payment transaction request;
[0170] If the payment risk value is between the first preset value and the second preset value, then outputting payment transaction risk warning information; the first preset value is greater than the second preset value;
[0171] If the payment risk value is less than or equal to the second preset value, the payment transaction corresponding to the payment transaction request is allowed, and the authentication passing relationship between the paying user and the paid user is written into the query node.
[0172] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0173] Obtaining a payment transaction request initiated by a paying user, wherein the payment transaction request includes paying user information and paid user information;
[0174] Determine, through a query node in the blockchain, whether the relationship between the paying user information and the user corresponding to the paid user information is an authenticated relationship;
[0175] If the relationship between the users is a non-authenticated relationship, then the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user are obtained; as well as the payment record information of the paying user and the payment record information of the paid user;
[0176] Verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through a first verification node in the blockchain to obtain first verification information;
[0177] The second verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through a second verification node in the blockchain;
[0178] The third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user;
[0179] If the payment risk value is greater than a first preset value, prohibiting the payment transaction corresponding to the payment transaction request;
[0180] If the payment risk value is between the first preset value and the second preset value, then outputting payment transaction risk warning information; the first preset value is greater than the second preset value;
[0181] If the payment risk value is less than or equal to the second preset value, the payment transaction corresponding to the payment transaction request is allowed, and the authentication passing relationship between the paying user and the paid user is written into the query node.
[0182] In one embodiment, a computer program product is provided, the computer program product comprising a computer program, the computer program being executed by a processor to implement the following steps:
[0183] Obtaining a payment transaction request initiated by a paying user, wherein the payment transaction request includes paying user information and paid user information;
[0184] Determine, through a query node in the blockchain, whether the relationship between the paying user information and the user corresponding to the paid user information is an authenticated relationship;
[0185] If the relationship between the users is a non-authenticated relationship, then the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user are obtained; as well as the payment record information of the paying user and the payment record information of the paid user;
[0186] Verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through a first verification node in the blockchain to obtain first verification information;
[0187] The second verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through a second verification node in the blockchain;
[0188] The third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user;
[0189] If the payment risk value is greater than a first preset value, prohibiting the payment transaction corresponding to the payment transaction request;
[0190] If the payment risk value is between the first preset value and the second preset value, then outputting payment transaction risk warning information; the first preset value is greater than the second preset value;
[0191] If the payment risk value is less than or equal to the second preset value, the payment transaction corresponding to the payment transaction request is allowed, and the authentication passing relationship between the paying user and the paid user is written into the query node.
[0192] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0193] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0194] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A payment risk identification method based on blockchain, characterized in that: The method comprises: Obtaining a payment transaction request initiated by a paying user, wherein the payment transaction request includes paying user information and paid user information; Determine, through a query node in the blockchain, whether the relationship between the paying user information and the user corresponding to the paid user information is an authenticated relationship; If the relationship between the users is a non-authenticated relationship, then the transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user are obtained; as well as the payment record information of the paying user and the payment record information of the paid user; Verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through a first verification node in the blockchain to obtain first verification information; The second verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through a second verification node in the blockchain; The third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user; If the payment risk value is greater than a first preset value, prohibiting the payment transaction corresponding to the payment transaction request; If the payment risk value is between the first preset value and the second preset value, then outputting payment transaction risk warning information; the first preset value is greater than the second preset value; If the payment risk value is less than or equal to the second preset value, the payment transaction corresponding to the payment transaction request is allowed, and the authentication passing relationship between the paying user and the paid user is written into the query node.
2. The method according to claim 1, characterized in that The first verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through the first verification node in the blockchain, including: The first verification node in the blockchain determines the device feature vector matrix of the payment user according to the device information, device usage information, device network information, and device location information of the payment user; Determining a scenario feature vector of the paying user according to the transaction scenario information; The first verification node verifies the payment user through the device feature vector matrix and the scenario feature vector to obtain the first verification information.
3. The method according to claim 2, characterized in that The first verification node in the blockchain determines the device feature vector matrix of the paying user according to the device information, device usage information, device network information, and device location information of the paying user, including: The first verification node in the blockchain obtains the device information, device usage information, device network information, and device location information of the payment user to determine the feature vectors corresponding to the device feature vectors of the payment user; Determine, through a device database, weight vectors corresponding to the device information, device usage information, device network information, and device location information of the paying user; A device feature vector matrix is determined based on feature vectors corresponding to the device information, device usage information, device network information, and device location information of the paying user and weight vectors.
4. The method according to claim 2, characterized in that: The first verification node verifies the first verification information by using the device feature vector matrix and the scene feature vector of the paying user, including: Inputting the device feature vector and the scenario feature vector of the payment user into a first verification model to obtain a first prediction value and a second prediction value, wherein the first prediction value is obtained based on the device feature vector of the payment user, and the second prediction value is obtained based on the scenario feature vector of the payment user; Determining whether an absolute value of a difference between the first predicted value and the second predicted value is less than a target absolute value; If the absolute value of the difference is less than the target absolute value, obtaining the first verification information according to the average value of the first predicted value and the second predicted value; If the absolute value of the difference is greater than or equal to the target absolute value, a maximum value is selected from the first predicted value and the second predicted value as the first verification information.
5. The method according to claim 1, characterized in that The second verification information is obtained by verifying the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through the second verification node in the blockchain, including: The second verification node in the blockchain obtains the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user and inputs them into the feature extraction model to obtain the target data feature vector corresponding to each piece of information; Verification is performed based on the target data feature vectors corresponding to all the information to obtain the second verification information.
6. The method according to claim 5, characterized in that The step of performing verification according to the target data feature vectors corresponding to all the information to obtain the second verification information includes: Calculating the similarity between each target data feature vector and each data feature vector in the data feature vector library; Obtaining the data feature vector with the highest similarity to the target data feature vector in the data feature vector library; The second verification information is obtained by performing weighted calculation based on the scores corresponding to the data feature vectors with the highest similarity.
7. The method according to claim 1, characterized in that The third verification node in the blockchain calculates the payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user, including: Calculate the first risk value and the second risk value corresponding to the payment transaction request respectively according to the payment record information of the paying user and the payment record information of the paid user; The first verification information, the second verification information, the first risk value, and the second risk value are input into a payment risk identification model to obtain the payment risk value.
8. The method according to claim 7, characterized in that The step of inputting the first verification information, the second verification information, the first risk value, and the second risk value into a payment risk identification model to obtain the payment risk value includes: Input the first verification information, the second verification information, the first risk value, and the second risk value into a payment risk identification model, and obtain a first verification information vector, a second verification information vector, a first risk value vector, and a second risk value vector corresponding to the first verification information, the second verification information, the first risk value, and the second risk value through a feature extraction layer; fusing the first verification information vector and the first risk value vector to obtain a first fused vector, and fusing the second verification information vector and the second risk value vector to obtain a second fused vector; Obtain a first prediction value through the first fusion vector, and obtain a second prediction value through the second fusion vector; The payment risk value is obtained according to the first prediction value and the second prediction value.
9. The method according to any one of claims 1 to 8, characterized in that: Before allowing the payment transaction corresponding to the payment transaction request, the method further includes: Querying the smart contract corresponding to the payment transaction request through a relay node; If the smart contract includes the paying user information and the paid user information, the payment transaction corresponding to the payment transaction request is allowed.
10. A payment risk identification device based on blockchain, characterized in that: The device comprises: An acquisition module, used to acquire a payment transaction request initiated by a paying user, wherein the payment transaction request includes information of the paying user and information of the paid user; A determination module, used to determine whether the relationship between the paying user information and the user corresponding to the paid user information is a certified relationship through a query node in the blockchain; The acquisition module is further configured to acquire transaction scenario information, device information, device usage information, device network information, and device location information corresponding to the paying user and the paid user, respectively, if the relationship between the users is a non-authenticated relationship; as well as the payment record information of the paying user and the payment record information of the paid user; A first verification module, used to verify the transaction scenario information, device information, device usage information, device network information, and device location information of the payment user through a first verification node in the blockchain to obtain first verification information; A second verification module, used to verify the transaction scenario information, device information, device usage information, device network information, and device location information of the paid user through a second verification node in the blockchain to obtain second verification information; A third verification module, used for a third verification node in the blockchain to calculate a payment risk value according to the first verification information, the second verification information, the payment record information of the paying user, and the payment record information of the paid user; a transaction prohibition module, configured to prohibit the payment transaction corresponding to the payment transaction request if the payment risk value is greater than a first preset value; an output module, configured to output payment transaction risk warning information if the payment risk value is between the first preset value and the second preset value; the first preset value is greater than the second preset value; The transaction allowing module is used to allow the payment transaction corresponding to the payment transaction request if the payment risk value is less than or equal to the second preset value, and write the authentication passing relationship between the paying user and the paid user in the query node.