Multi-account payment method and device based on blockchain
By obtaining the direct transfer risk coefficient between multiple accounts of customers, establishing an account transfer chart, determining the minimum risk coefficient and the best transfer path, and automatically selecting the transfer account for transfer, solving the poor customer experience caused by manual transfer, and realizing automated multi-account transfer.
Patent Information
- Application Number
- CN202210545417.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-05-19
AI Technical Summary
In the prior art, manual and manual transfer of multiple accounts leads to poor customer experience.
By obtaining the direct transfer risk coefficient between multiple accounts of the customer, establishing an account transfer chart, determining the minimum risk coefficient and the best transfer path, and automatically selecting the transfer account that meets the preset conditions for transfer.
Automated multi-account transfers have been realized, reducing risks and improving customer experience.
Smart Images

Figure CN114926160B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain-based multi-account payment method and device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. No statement herein is admitted to be prior art by virtue of its inclusion in this section.
[0003] When customers make payments, it often happens that their account balance is insufficient and they need to transfer money from other places. Currently, customers usually transfer money manually, which leads to a poor customer experience. Summary of the Invention
[0004] An embodiment of the present invention provides a multi-account payment method based on blockchain to solve the technical problem that manual multi-account transfers result in a poor customer experience. The method includes:
[0005] Obtain multiple accounts of the client and determine the risk factor of direct transfers between different accounts;
[0006] Establishing an account transfer graph corresponding to the customer based on the direct transfer risk coefficient;
[0007] Based on the account transfer graph corresponding to the customer, determine the minimum risk factor and the optimal transfer path between each two accounts of the customer, where one of the two accounts is the transfer-in account and the other is the transfer-out account;
[0008] When the customer uses one account to trade and the balance of the account is less than the transaction amount, multiple transfer-out accounts whose balances meet preset conditions are selected from the customer's multiple accounts;
[0009] Determine the transfer-out account for this transaction based on the minimum risk factor of the account and the selected multiple transfer-out accounts;
[0010] According to the optimal transfer path between this account and the transfer-out account of this transaction, the transfer is made from the transfer-out account of this transaction to this account, and this account completes this transaction.
[0011] An embodiment of the present invention further provides a multi-account payment device based on blockchain to solve the technical problem that manual multi-account transfers result in a poor customer experience. The device includes:
[0012] A risk factor determination module is used to obtain multiple accounts of a customer and determine the risk factor of direct transfers between different accounts in the multiple accounts;
[0013] An account transfer graph establishing module, configured to establish an account transfer graph corresponding to the customer based on the direct transfer risk coefficient;
[0014] An optimal transfer path determination module, configured to determine, based on the account transfer graph corresponding to the customer, a minimum risk factor and an optimal transfer path between every two accounts of the customer, where one of the two accounts is a transfer-in account and the other is a transfer-out account;
[0015] The transfer-out account selection module is used to select multiple transfer-out accounts whose balances meet preset conditions from multiple accounts of the customer when the customer uses one account for transaction and the balance of the account is less than the transaction amount;
[0016] The transaction transfer-out account determination module is used to determine the transfer-out account for this transaction based on the minimum risk factor of the account number and the selected multiple transfer-out accounts;
[0017] The transfer transaction module is used to transfer funds from the transfer-out account of this transaction to this account according to the optimal transfer path between this account and the transfer-out account of this transaction, and this account completes this transaction.
[0018] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the multi-account payment method based on blockchain is implemented.
[0019] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned blockchain-based multi-account payment method.
[0020] An embodiment of the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the above-mentioned blockchain-based multi-account payment method.
[0021] In an embodiment of the present invention, compared with the technical solution of manually performing multi-account transfers in the prior art, a direct transfer risk coefficient between different accounts in the multiple accounts is determined by obtaining multiple accounts of a customer; an account transfer map corresponding to the customer is established based on the direct transfer risk coefficient; a minimum risk coefficient and an optimal transfer path between each two accounts of the customer are determined based on the account transfer map corresponding to the customer, wherein one of the two accounts is a transfer-in account and the other is a transfer-out account; when the customer uses an account for a transaction and the amount of the account is less than the transaction amount, multiple transfer-out accounts with balances that meet preset conditions are selected from the multiple accounts of the customer; a transfer-out account for the transaction is determined based on the account and the minimum risk coefficient of the selected multiple transfer-out accounts; and a transfer is performed from the transfer-out account of the transaction to the account according to the optimal transfer path of the account and the transfer-out account of the transaction, and the transaction is completed by the account. The present invention can automatically complete transfer transactions based on risk information between accounts, the optimal transfer path, and the balance information of each account, thereby minimizing risk and avoiding the problem of poor customer experience caused by insufficient balance in a single account. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0023] Figure 1 The multi-account payment method process based on blockchain in the embodiment of the present invention Figure 1 ;
[0024] Figure 2 The multi-account payment method process based on blockchain in the embodiment of the present invention Figure 2 ;
[0025] Figure 3 The multi-account payment method process based on blockchain in the embodiment of the present invention Figure 3 ;
[0026] Figure 4 The multi-account payment method process based on blockchain in the embodiment of the present invention Figure 4 ;
[0027] Figure 5 The multi-account payment method process based on blockchain in the embodiment of the present invention Figure 5 ;
[0028] Figure 6This is a structural block diagram of a multi-account payment device based on blockchain in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] To make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0030] Based on the problems existing in the prior art, the present invention proposes a multi-account payment method based on blockchain, such as Figure 1 As shown, the method includes:
[0031] Step 101: Obtain multiple accounts of a customer and determine the risk factor of direct transfers between different accounts in the multiple accounts;
[0032] Step 102: Creating an account transfer graph corresponding to the customer based on the direct transfer risk coefficient;
[0033] Step 103: Based on the account transfer graph corresponding to the customer, determine the minimum risk factor and the optimal transfer path between every two accounts of the customer, where one of the two accounts is a transfer-in account and the other is a transfer-out account;
[0034] Step 104: When the customer uses one account to make a transaction and the balance of the account is less than the transaction amount, multiple transfer-out accounts whose balances meet preset conditions are selected from the customer's multiple accounts;
[0035] Step 105: Determine the transfer-out account for this transaction based on the account number and the minimum risk factor of the selected multiple transfer-out accounts;
[0036] Step 106: According to the optimal transfer path between the account and the transfer-out account of this transaction, the transfer is made from the transfer-out account of this transaction to the account, and the transaction is completed by the account.
[0037] Specifically, step 106 may be: the bank recommends the transfer-out account of this transaction to the customer. After the customer confirms, the bank executes the transfer according to the optimal transfer path, and then the account completes this transaction.
[0038] The preset condition may be that the balance is greater than the payment amount, or the balance is greater than the difference between the payment amount and the payment account balance.
[0039] In an embodiment of the present invention, the following further comprises:
[0040] The transfer-in account and transfer-out account pair, the corresponding optimal transfer path, and the corresponding minimum risk factor are stored in the blockchain.
[0041] In an embodiment of the present invention, step 101 obtains multiple accounts of a customer and determines the risk coefficient of direct transfers between different accounts in the multiple accounts, including:
[0042] For each two accounts of the customer, select the transfer data of the customer and multiple similar customers from the transfer data between the bank systems corresponding to the two accounts;
[0043] Divide the selected transfer data of multiple similar customers of the customer into multiple transfer data subsets in a certain order (e.g., chronological order), such that the transfer quantity in each transfer data subset is greater than a set value;
[0044] The proportion of risky transfer transactions in each transfer data subset is determined as a direct transfer risk coefficient sample corresponding to the two accounts;
[0045] Based on all direct transfer risk coefficient samples corresponding to the two accounts, determine the variance σ and the number n of the samples;
[0046] Set the error threshold r;
[0047] Compare the error threshold and If the size relationship Then the following steps are executed repeatedly until the number of direct transfer risk coefficient samples corresponding to the two accounts is greater than
[0048] Selecting transfer data of multiple new similar customers of the customer from the transfer data between the bank systems corresponding to the two accounts; dividing the transfer data of the new similar customers into multiple new transfer data subsets in order, such that the transfer amount of each new transfer data subset is greater than a set value;
[0049] The proportion of risky transfer transactions in each new transfer data subset is determined as a direct transfer risk coefficient sample corresponding to the two accounts;
[0050] When the number of direct transfer risk coefficient samples corresponding to the two accounts is greater than When the direct transfer risk coefficient between the two accounts is determined as the average of the direct transfer risk coefficient samples corresponding to the two accounts.
[0051] In an embodiment of the present invention, step 102 of establishing an account transfer graph corresponding to the customer based on the direct transfer risk coefficient includes:
[0052] Each node in the account transfer graph is an account of a customer. There is an edge between two accounts if and only if there is historical transfer data between the two bank systems corresponding to the two accounts. The risk coefficient of the edge is the direct transfer risk coefficient between the two accounts corresponding to the edge.
[0053] Specifically, for each edge, when there is an account such that there is an edge between the account and the first account of the edge, and there is an edge between the node and the second account of the edge, and the condition is satisfied: p<q+rq×r, then the edge is deleted from the account transfer graph, where p is the risk coefficient of the edge, q is the risk coefficient of the edge corresponding to the account and the first account of the edge, and r is the risk coefficient of the edge corresponding to the node and the second account of the edge.
[0054] The above account transfer graph can be a directed graph or an undirected graph.
[0055] In the embodiment of the present invention, Figure 2 As shown, step 103 determines the minimum risk factor and the optimal transfer path between every two accounts of the customer based on the account transfer graph corresponding to the customer, where one of the two accounts is the transfer-in account and the other is the transfer-out account, including:
[0056] Step 201: For each edge of the account transfer graph corresponding to the customer, set the non-risk distance corresponding to the edge to: lg(1-r), where r is the risk coefficient corresponding to the edge;
[0057] Step 202: Determine the shortest path between every two accounts of the customer in the account transfer graph and the shortest distance corresponding to the shortest path based on the non-risk distance;
[0058] Step 203: Determine the shortest path between the two accounts in the account transfer graph as the optimal transfer path between the two accounts;
[0059] Step 204: Determine the shortest distance corresponding to the shortest path as the minimum non-risk distance between the two accounts;
[0060] Step 205: Determine the minimum risk factor between the two accounts: 1-10 s , where s is the minimum non-risk distance between the two accounts.
[0061] In the embodiment of the present invention, Figure 3 As shown, step 105 determines the transfer-out account for this transaction based on the minimum risk coefficient of the account number and the selected multiple transfer-out accounts, including:
[0062] Step 301: Select the transfer-out account with the smallest risk coefficient as the account number from the selected multiple transfer-out accounts, and determine the selected transfer-out account as the transfer-out account for this transaction.
[0063] In the embodiment of the present invention, Figure 4As shown, step 301 determines the transfer-out account for this transaction based on the account number and the minimum risk coefficient of the selected multiple transfer-out accounts, including:
[0064] Step 401: Determine the probability of each selected transfer-out account being selected based on the minimum risk coefficient of the account number and the selected multiple transfer-out accounts;
[0065] Step 402: Select a probability density function and determine the interval corresponding to each selected transfer-out account, where the interval is a subset of the domain of the probability density function, the intervals corresponding to different transfer-out accounts do not intersect, and the probability of selection of each selected transfer-out account is equal to the integral of the probability density function over the interval corresponding to the transfer-out account;
[0066] Step 403: Generate a random number based on the selected probability density function;
[0067] Step 404: Determine the interval to which the generated random number belongs from the multiple intervals, and determine the transfer-out account of this transaction as the transfer-out account corresponding to the interval to which the random number belongs.
[0068] Specifically, the probability of selecting the i-th transfer-out account among the multiple selected transfer-out accounts is: Among them, r j is the minimum risk coefficient of the account and the jth selected transfer-out account, and n is the number of multiple selected transfer-out accounts.
[0069] In the embodiment of the present invention, Figure 5 As shown, step 402 selects a probability density function and determines the interval corresponding to each selected transfer-out account, wherein the interval is a subset of the domain of the probability density function, the intervals corresponding to different transfer-out accounts have no intersection, and the probability of selection of each selected transfer-out account is equal to the integral of the probability density function over the interval corresponding to the transfer-out account, including:
[0070] Step 501: sorting the selected multiple transfer-out accounts;
[0071] Step 502: For each of the ranked transfer-out accounts, sum the probability of selection of the transfer-out account and the probabilities of selection of all transfer-out accounts ranked before the transfer-out account, and determine the sum as the cumulative probability of selection of the transfer-out account;
[0072] Step 503: For each of the sorted transfer-out accounts, determine the upper bound corresponding to the transfer-out account, so that the integral of the selected probability density function from the minimum value of the domain of the probability density function to the upper bound corresponding to the transfer-out account is equal to the cumulative probability of selection of the transfer-out account;
[0073] Step 504: For each transfer-out account after sorting, determine the interval corresponding to the transfer-out account based on the upper limit value corresponding to the transfer-out account and the upper limit value corresponding to the transfer-out account that precedes and is immediately adjacent to the transfer-out account in the sorting, wherein the interval is a left-closed and right-open interval, the right endpoint of the interval is the upper limit value corresponding to the transfer-out account, and the left endpoint of the interval is the upper limit value corresponding to the transfer-out account that precedes and is immediately adjacent to the transfer-out account in the sorting.
[0074] In an embodiment of the present invention, the method further includes: determining a transfer threshold between the account and a transfer-out account of the current transaction based on the account transfer graph, and controlling a transfer transaction from the transfer-out account of the current transaction to the account based on the transfer threshold;
[0075] The transfer threshold between the account and the outgoing account of this transaction is determined based on the account transfer graph, including:
[0076] Set the capacity of each edge of the account transfer graph to the maximum historical transfer amount of the two accounts on that edge, and initialize the flow of each edge to 0;
[0077] Loop through the following steps until no path is found from the transfer-out account to the account, such that there is an edge on the path that satisfies the flow rate of the edge equal to the capacity of the edge:
[0078] Select a path from the transfer-out account of this transaction to the account, satisfying the requirement that the flow of each edge of the path is less than the corresponding capacity;
[0079] For each edge of the path, determine the difference between the capacity of the edge and the flow of the edge, and determine the minimum value of all differences corresponding to all edges of the path as the flow allowable value;
[0080] Increase the flow allowance for each edge of the path;
[0081] When no path from the transfer-out account of this transaction to the account is found, such that there is an edge on the path that satisfies the flow of the edge equal to the capacity of the edge, the transfer threshold between the account and the transfer-out account of this transaction is determined as the sum of the flow of all edges corresponding to the transfer-out account of this transaction.
[0082] The acquisition, storage, use, and processing of data in this application's technical solution comply with relevant national laws and regulations.
[0083] The present invention also provides a blockchain-based multi-account payment device, as described in the following embodiments. Since the principles of this device are similar to those of the blockchain-based multi-account payment method, the implementation of this device can refer to the implementation of the blockchain-based multi-account payment method, and the repeated parts will not be repeated here.
[0084] Figure 6 This is a block diagram of a multi-account payment device based on blockchain in an embodiment of the present invention. Figure 6 As shown, the multi-account payment device based on blockchain includes:
[0085] Risk coefficient determination module 02, for obtaining multiple accounts of a customer and determining the risk coefficient of direct transfers between different accounts in the multiple accounts;
[0086] An account transfer graph establishing module 04 is configured to establish an account transfer graph corresponding to the customer based on the direct transfer risk coefficient;
[0087] The optimal transfer path determination module 06 is configured to determine, based on the account transfer graph corresponding to the customer, a minimum risk factor and an optimal transfer path between each two accounts of the customer, where one of the two accounts is a transfer-in account and the other is a transfer-out account;
[0088] The transfer-out account selection module 08 is configured to select multiple transfer-out accounts whose balances meet preset conditions from multiple accounts of the customer when the customer uses one account for the transaction and the balance of the account is less than the transaction amount;
[0089] The transaction transfer-out account determination module 10 is used to determine the transfer-out account for this transaction based on the account number and the minimum risk coefficient of the selected multiple transfer-out accounts;
[0090] The transfer transaction module 12 is used to transfer funds from the transfer-out account of this transaction to the account according to the best transfer path between the account and the transfer-out account of this transaction, and the account completes this transaction.
[0091] In an embodiment of the present invention, the device further includes:
[0092] The storage module is used to store the transfer-in account and transfer-out account pair, the corresponding optimal transfer path, and the corresponding minimum risk factor in the blockchain.
[0093] In the embodiment of the present invention, the account transfer graph establishment module 04 is specifically used to:
[0094] Each node in the account transfer graph is an account of a customer. There is an edge between two accounts if and only if there is historical transfer data between the two bank systems corresponding to the two accounts. The risk coefficient of the edge is the direct transfer risk coefficient between the two accounts corresponding to the edge.
[0095] In the embodiment of the present invention, the optimal transfer path determination module 06 is specifically configured to:
[0096] For each edge of the account transfer graph corresponding to the customer, set the non-risk distance corresponding to the edge to: lg(1-r), where r is the risk coefficient corresponding to the edge;
[0097] Based on the non-risk distance, determine the shortest path between every two accounts of the customer in the account transfer graph and the shortest distance corresponding to the shortest path;
[0098] Determine the shortest path between the two accounts in the account transfer graph as the optimal transfer path between the two accounts;
[0099] The shortest distance corresponding to the shortest path is determined as the minimum non-risk distance between the two accounts;
[0100] Determine the minimum risk factor between the two accounts: 1-10 s , where s is the minimum non-risk distance between the two accounts.
[0101] In the embodiment of the present invention, the transaction transfer-out account determination module 10 is specifically configured to:
[0102] From the selected multiple transfer-out accounts, a transfer-out account having the smallest risk coefficient with the account number is selected, and the selected transfer-out account is determined as the transfer-out account for this transaction.
[0103] In the embodiment of the present invention, the transaction transfer-out account determination module 10 is specifically configured to:
[0104] Determine the probability of each selected transfer-out account being selected based on the minimum risk factor of the account and the selected multiple transfer-out accounts;
[0105] A probability density function is selected, and an interval corresponding to each selected transfer-out account is determined, where the interval is a subset of the domain of the probability density function, the intervals corresponding to different transfer-out accounts do not intersect, and the probability of selection of each selected transfer-out account is equal to the integral of the probability density function over the interval corresponding to the transfer-out account;
[0106] Generate a random number based on the chosen probability density function;
[0107] From the multiple intervals, determine the interval to which the generated random number belongs, and determine the transfer-out account of this transaction as the transfer-out account corresponding to the interval to which the random number belongs.
[0108] In the embodiment of the present invention, the transaction transfer-out account determination module 10 is specifically configured to:
[0109] Sort the selected multiple transfer-out accounts;
[0110] For each of the ranked transfer-out accounts, sum the probability of selection of the transfer-out account and the probabilities of selection of all transfer-out accounts ranked before the transfer-out account, and determine the sum as the cumulative probability of selection of the transfer-out account;
[0111] For each of the sorted transfer-out accounts, determine the upper bound corresponding to the transfer-out account so that the integral of the selected probability density function from the minimum value of the domain of the probability density function to the upper bound corresponding to the transfer-out account equals the cumulative probability of selection of the transfer-out account;
[0112] For each transfer-out account after sorting, determine the interval corresponding to the transfer-out account based on the upper limit value corresponding to the transfer-out account and the upper limit value corresponding to the transfer-out account that precedes and is immediately adjacent to the transfer-out account in the sorting, wherein the interval is a left-closed and right-open interval, the right endpoint of the interval is the upper limit value corresponding to the transfer-out account, and the left endpoint of the interval is the upper limit value corresponding to the transfer-out account that precedes and is immediately adjacent to the transfer-out account in the sorting.
[0113] In an embodiment of the present invention, the preset condition is that the balance is greater than the payment amount, or the balance is greater than the difference between the payment amount and the payment account balance.
[0114] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the multi-account payment method based on blockchain is implemented.
[0115] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned blockchain-based multi-account payment method.
[0116] An embodiment of the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the above-mentioned blockchain-based multi-account payment method.
[0117] In an embodiment of the present invention, compared with the technical solution of manually performing multi-account transfers in the prior art, a direct transfer risk coefficient between different accounts in the multiple accounts is determined by obtaining multiple accounts of a customer; an account transfer map corresponding to the customer is established based on the direct transfer risk coefficient; a minimum risk coefficient and an optimal transfer path between each two accounts of the customer are determined based on the account transfer map corresponding to the customer, wherein one of the two accounts is a transfer-in account and the other is a transfer-out account; when the customer uses an account for a transaction and the amount of the account is less than the transaction amount, multiple transfer-out accounts with balances that meet preset conditions are selected from the multiple accounts of the customer; a transfer-out account for the transaction is determined based on the account and the minimum risk coefficient of the selected multiple transfer-out accounts; and a transfer is performed from the transfer-out account of the transaction to the account according to the optimal transfer path of the account and the transfer-out account of the transaction, and the transaction is completed by the account. The present invention can automatically complete transfer transactions based on risk information between accounts, the optimal transfer path, and the balance information of each account, thereby minimizing risk and avoiding the problem of poor customer experience caused by insufficient balance in a single account.
[0118] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0119] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0120] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0122] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A multi-account payment method based on blockchain, characterized in that: include: Obtain multiple accounts of the client and determine the risk factor of direct transfers between different accounts; Establishing an account transfer graph corresponding to the customer based on the direct transfer risk coefficient; Based on the account transfer graph corresponding to the customer, determine the minimum risk factor and the optimal transfer path between each two accounts of the customer, where one of the two accounts is the transfer-in account and the other is the transfer-out account; When the customer uses one account to trade and the balance of the account is less than the transaction amount, multiple transfer-out accounts whose balances meet preset conditions are selected from the customer's multiple accounts; Determine the transfer-out account for this transaction based on the minimum risk factor of the account and the selected multiple transfer-out accounts; According to the optimal transfer path between this account and the outgoing account of this transaction, the outgoing account of this transaction transfers funds to this account, and this account completes this transaction; The transfer-out account for this transaction is determined based on the minimum risk factor of the account and the selected multiple transfer-out accounts, including: Determine the probability of selection of each selected transfer-out account based on the minimum risk coefficient of the account and the selected multiple transfer-out accounts; A probability density function is selected to determine an interval corresponding to each selected transfer-out account, wherein the interval is a subset of the domain of the probability density function, the intervals corresponding to different transfer-out accounts have no intersection, and the cumulative probability of selection of each selected transfer-out account is equal to the integral of the probability density function over the interval corresponding to the transfer-out account; wherein, selecting a probability density function to determine an interval corresponding to each selected transfer-out account comprises: sorting the selected multiple transfer-out accounts; for each sorted transfer-out account, summing the probability of selection of the transfer-out account and the probability of selection of all transfer-out accounts sorted before the transfer-out account, and determining the sum as the cumulative probability of selection of the transfer-out account; and For each transfer-out account after sorting, determine the upper bound value corresponding to the transfer-out account so that the integral of the selected probability density function from the minimum value of the domain of the probability density function to the upper bound value corresponding to the transfer-out account is equal to the cumulative probability of selection of the transfer-out account; for each transfer-out account after sorting, determine the interval corresponding to the transfer-out account based on the upper bound value corresponding to the transfer-out account and the upper bound value corresponding to the transfer-out account that precedes and is immediately adjacent to the transfer-out account in the sorting, wherein the interval is a left-closed and right-open interval, the right endpoint of the interval is the upper bound value corresponding to the transfer-out account, and the left endpoint of the interval is the upper bound value corresponding to the transfer-out account that precedes and is immediately adjacent to the transfer-out account in the sorting; Generate a random number based on the chosen probability density function; Determine the interval to which the generated random number belongs from the multiple intervals, and determine the transfer-out account of this transaction as the transfer-out account corresponding to the interval to which the random number belongs; The method also includes storing the transfer-in account and the transfer-out account pair, the corresponding optimal transfer path, and the corresponding minimum risk factor in the blockchain.
2. The multi-account payment method based on blockchain as claimed in claim 1, characterized in that: Establishing an account transfer graph corresponding to the customer based on the direct transfer risk coefficient includes: Each node in the account transfer graph is an account of a customer. There is an edge between two accounts if and only if there is historical transfer data between the two bank systems corresponding to the two accounts. The risk coefficient of the edge is the direct transfer risk coefficient between the two accounts corresponding to the edge.
3. The multi-account payment method based on blockchain as claimed in claim 1, characterized in that: Based on the account transfer graph corresponding to the customer, determine the minimum risk factor and optimal transfer path between each two accounts of the customer, where one of the two accounts is the transfer-in account and the other is the transfer-out account, including: For each edge of the account transfer graph corresponding to the customer, set the non-risk distance corresponding to the edge to: lg(1-r), where r is the risk coefficient corresponding to the edge; Based on the non-risk distance, determine the shortest path between every two accounts of the customer in the account transfer graph and the shortest distance corresponding to the shortest path; Determine the shortest path between the two accounts in the account transfer graph as the optimal transfer path between the two accounts; The shortest distance corresponding to the shortest path is determined as the minimum non-risk distance between the two accounts; Determine the minimum risk factor between the two accounts: 1-10 s , where s is the minimum non-risk distance between the two accounts.
4. The multi-account payment method based on blockchain as claimed in claim 1, characterized in that: The preset condition is that the balance is greater than the payment amount, or the balance is greater than the difference between the payment amount and the payment account balance.
5. A multi-account payment device based on blockchain, characterized in that: include: A risk factor determination module is used to obtain multiple accounts of a customer and determine the risk factor of direct transfers between different accounts in the multiple accounts; An account transfer graph establishing module, configured to establish an account transfer graph corresponding to the customer based on the direct transfer risk coefficient; An optimal transfer path determination module, configured to determine, based on the account transfer graph corresponding to the customer, a minimum risk factor and an optimal transfer path between every two accounts of the customer, where one of the two accounts is a transfer-in account and the other is a transfer-out account; The transfer-out account selection module is used to select multiple transfer-out accounts whose balances meet preset conditions from multiple accounts of the customer when the customer uses one account for transaction and the balance of the account is less than the transaction amount; The transaction transfer-out account determination module is used to determine the transfer-out account for this transaction based on the minimum risk factor of the account number and the selected multiple transfer-out accounts; The transfer transaction module is used to transfer funds from the transfer-out account of this transaction to the account in accordance with the optimal transfer path between the account and the transfer-out account of this transaction, and the account completes this transaction; The transaction transfer-out account determination module is specifically used for: Determine the probability of selection of each selected transfer-out account based on the minimum risk coefficient of the account and the selected multiple transfer-out accounts; A probability density function is selected to determine an interval corresponding to each selected transfer-out account, wherein the interval is a subset of the domain of the probability density function, the intervals corresponding to different transfer-out accounts have no intersection, and the cumulative probability of selection of each selected transfer-out account is equal to the integral of the probability density function over the interval corresponding to the transfer-out account; wherein, selecting a probability density function to determine an interval corresponding to each selected transfer-out account comprises: sorting the selected multiple transfer-out accounts; for each sorted transfer-out account, summing the probability of selection of the transfer-out account and the probability of selection of all transfer-out accounts sorted before the transfer-out account, and determining the sum as the cumulative probability of selection of the transfer-out account; and For each transfer-out account after sorting, determine the upper bound value corresponding to the transfer-out account so that the integral of the selected probability density function from the minimum value of the domain of the probability density function to the upper bound value corresponding to the transfer-out account is equal to the cumulative probability of selection of the transfer-out account; for each transfer-out account after sorting, determine the interval corresponding to the transfer-out account based on the upper bound value corresponding to the transfer-out account and the upper bound value corresponding to the transfer-out account that precedes and is immediately adjacent to the transfer-out account in the sorting, wherein the interval is a left-closed and right-open interval, the right endpoint of the interval is the upper bound value corresponding to the transfer-out account, and the left endpoint of the interval is the upper bound value corresponding to the transfer-out account that precedes and is immediately adjacent to the transfer-out account in the sorting; Generate a random number based on the chosen probability density function; Determine the interval to which the generated random number belongs from the multiple intervals, and determine the transfer-out account of this transaction as the transfer-out account corresponding to the interval to which the random number belongs; The method also includes storing the transfer-in account and the transfer-out account pair, the corresponding optimal transfer path, and the corresponding minimum risk factor in the blockchain.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the blockchain-based multi-account payment method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the blockchain-based multi-account payment method according to any one of claims 1 to 4.
8. A computer program product, characterized in that The computer program product includes a computer program, which, when executed by a processor, implements the blockchain-based multi-account payment method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for controlling risk of transfer transaction
CN105005931A
Payment method and device, computing equipment and storage medium
CN114169873A
Test scheme determination method and device, computer readable medium and electronic equipment
CN114490372A