Blockchain-based multi-currency payment method and device
Through blockchain technology, the establishment of currency trading charts and foreign currency account trading charts has solved the problem of risk control in transactions of different currency accounts, achieved risk probability recommendation, and reduced user transaction risks.
Patent Information
- Application Number
- CN202210549664.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-05-20
AI Technical Summary
In account transactions of different currencies, the prior art lacks analysis and means to recommend appropriate currencies to control transaction risks.
Through blockchain technology, based on transaction data between different currencies, a currency trading chart and a foreign currency account trading chart are established to determine the transaction risk probability and scenario risk probability, and the most suitable foreign currency account is recommended for trading.
Effectively reduce user transaction risks, provide risk probability recommendations based on currency and trading scenarios, and help users choose the right currency for trading.
Smart Images

Figure CN114881629B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of blockchain, and in particular to a multi-currency payment method and device based on blockchain. Background Art
[0002] This section aims to provide background or context for the embodiments of the present invention described in the claims. The description herein is not admitted to be prior art merely by including it in this section.
[0003] When customers use accounts in different currencies for payment, they may encounter various risks. In order to control the transaction risks of customers, banks need to carry out various controls. The risk situations corresponding to different currencies are different, that is, the selection of accounts in different currencies can correspond to some risks to a certain extent. At present, there is no analysis and technical means in this regard to recommend accounts in different currencies to customers. Summary of the Invention
[0004] An embodiment of the present invention provides a multi-currency payment method based on blockchain, the method comprising:
[0005] Determining the risk probability of transactions between different currencies according to the transaction data between different currencies;
[0006] Establishing a currency transaction graph based on the risk probability of transactions between different currencies;
[0007] Determining the risk probability of each currency corresponding to each scenario according to the transaction data of different currencies;
[0008] Obtaining multiple foreign currency accounts of a user, and determining a foreign currency account transaction graph corresponding to the user based on the currency transaction graph;
[0009] Determining the to-be-recommended foreign currency accounts of the user according to the multiple foreign currency accounts and the risk probability of each currency corresponding to each scenario;
[0010] For each to-be-recommended foreign currency account, determining the transfer risk of each to-be-recommended foreign currency account in this transaction based on the transaction amount of this transaction and the foreign currency account transaction graph corresponding to the user;
[0011] Recommending the to-be-recommended foreign currency accounts to the customer according to the transfer risk of each to-be-recommended foreign currency account in this transaction for the user to select and conduct transactions.
[0012] An embodiment of the present invention further provides a multi-currency payment device based on blockchain, the device comprising:
[0013] A risk probability determination module, configured to determine the risk probability of transactions between different currencies according to the transaction data between different currencies;
[0014] A currency transaction graph building module, configured to build a currency transaction graph based on the risk probabilities of transactions between different currencies;
[0015] The risk probability determination module is further configured to: determine the risk probabilities of different currencies corresponding to each scenario according to the transaction data of different currencies;
[0016] A foreign currency account transaction graph determination module, configured to obtain multiple foreign currency accounts of a user and determine the foreign currency account transaction graph corresponding to the user based on the currency transaction graph;
[0017] A to-be-recommended foreign currency account determination module, configured to determine the to-be-recommended foreign currency accounts of the user according to the multiple foreign currency accounts and the risk probabilities of different currencies corresponding to each scenario;
[0018] A transfer risk determination module, configured to, for each to-be-recommended foreign currency account, determine the transfer risk of each to-be-recommended foreign currency account in this transaction based on the transaction amount of this transaction and the foreign currency account transaction graph corresponding to the user;
[0019] A foreign currency account recommendation module, configured to recommend the to-be-recommended foreign currency accounts to a customer according to the transfer risks of each to-be-recommended foreign currency account in this transaction for the user to select and conduct transactions.
[0020] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned blockchain-based multi-currency payment method is implemented.
[0021] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned blockchain-based multi-currency payment method is implemented.
[0022] An embodiment of the present invention further provides a computer program product including a computer program, and when the computer program is executed by a processor, the above-mentioned blockchain-based multi-currency payment method is implemented.
[0023] In the embodiments of the present invention, based on the transaction data between different currencies, the risk probability of transactions between different currencies and the risk probability of each currency corresponding to various scenarios are determined; based on the risk probability of transactions between different currencies, a currency transaction graph is established; multiple foreign currency accounts of a user are obtained, and based on the currency transaction graph, the foreign currency account transaction graph corresponding to the user is determined; based on the multiple foreign currency accounts and the risk probability of each currency corresponding to various scenarios, the to-be-recommended foreign currency accounts of the user are determined; for each to-be-recommended foreign currency account, based on the transaction amount of the current transaction and the foreign currency account transaction graph, the transfer risk of each to-be-recommended foreign currency account in the current transaction is determined; the to-be-recommended foreign currency accounts are recommended to the customer according to the transfer risk for the user to select and conduct transactions. The present invention can recommend a suitable currency to the user based on the risk probability of the currency and the transaction scenario during the transaction, which can effectively reduce the risk of the transaction for the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. In the drawings:
[0025] Figure 1 is the flowchart of the multi-currency payment method based on blockchain in the embodiments of the present invention Figure 1 ;
[0026] Figure 2 is the flowchart of the multi-currency payment method based on blockchain in the embodiments of the present invention Figure 1 ;
[0027] Figure 3 is the flowchart of the multi-currency payment method based on blockchain in the embodiments of the present invention Figure 3 ;
[0028] Figure 4 is the flowchart of the multi-currency payment method based on blockchain in the embodiments of the present invention Figure 4 ;
[0029] Figure 5 is the structural block diagram of a multi-currency payment device based on blockchain in the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer and more understandable, the following will further elaborate on the embodiments of the present invention with reference to the drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but not to limit the present invention.
[0031] Based on the problems existing in the prior art, the present invention proposes a multi-currency payment method based on blockchain, as Figure 1 shown, the method includes:
[0032] Step 101: Determine the risk probability of transactions between different currencies based on the transaction data between different currencies;
[0033] Step 102: Establish a currency transaction graph based on the risk probability of transactions between different currencies;
[0034] Step 103: Determine the risk probability of each currency corresponding to each scenario based on the transaction data of different currencies;
[0035] Step 104: Obtain multiple foreign currency accounts of the user, and determine the foreign currency account transaction graph corresponding to the user based on the currency transaction graph;
[0036] Step 105: Determine the to-be-recommended foreign currency accounts of the user based on the multiple foreign currency accounts and the risk probability of each currency corresponding to each scenario;
[0037] Step 106: For each to-be-recommended foreign currency account, determine the transfer risk of each to-be-recommended foreign currency account in this transaction based on the transaction amount of this transaction and the foreign currency account transaction graph corresponding to the user;
[0038] Step 107: Recommend the to-be-recommended foreign currency accounts to the customer according to the transfer risk of each to-be-recommended foreign currency account in this transaction for the user to select and conduct transactions.
[0039] Specifically, the user has multiple foreign currency accounts, such as US dollars, Japanese yen, euros, Swiss francs, etc. When conducting transactions, the user needs to select the corresponding foreign currency account. However, the transaction processing procedures for different currencies are different, the risk control capabilities are different, and the types of transaction risks faced are also different, that is, different currencies can resist different types of risks (other than the types of transaction risks faced). The present invention can recommend a suitable currency to the user based on the risk probability of the currency and the transaction scenario during the transaction, so as to effectively reduce the risk of this transaction of the user.
[0040] Specifically, step 101 determines the risk probability of transactions between different currencies based on the transaction data between different currencies, including:
[0041] For each currency combination, divide the transaction data between the currency combinations into multiple sub-transaction data so that the transaction quantity of each sub-transaction data is greater than a set value, where each currency combination includes two different currencies;
[0042] Determine the risk probability of each sub-transaction data as the proportion of the risk transaction data in the sub-transaction data;
[0043] Determine the risk probabilities of the multiple sub - transaction data as multiple samples corresponding to the risk probabilities of transactions between the currency combinations;
[0044] Based on the multiple samples corresponding to the risk probabilities of transactions between the currency combinations, determine the variance σ;
[0045] Set the error threshold to θ;
[0046] Determine the size relationship between the number n of the multiple sub - transaction data and If Then loop and execute the following steps until the number m of all obtained sub - transaction data satisfies
[0047] Obtain new transaction data between the currency combinations, and divide the new transaction data into multiple new sub - transaction data such that the transaction quantity of each new sub - transaction data is greater than the set value;
[0048] When the number m of all obtained sub - transaction data satisfies Determine the risk probability of the transactions between the currency combinations as the mean of the risk probabilities of all obtained sub - transaction data.
[0049] Among them, the error threshold θ can be set to ε 2 ×P, where ε is the set allowable probability error threshold, and P is the probability that the allowable probability error is greater than ε.
[0050] In the embodiment of the present invention, step 102 establishes a currency transaction graph based on the risk probabilities of transactions between different currencies, including:
[0051] Establish a currency transaction graph, where each node of the currency transaction graph corresponds to a currency one by one, and there is an edge between two nodes if and only if the risk probability between the two currencies corresponding to the two nodes is greater than a predetermined value, and the risk probability corresponding to each edge is the risk probability between the two currencies corresponding to the two nodes of the edge;
[0052] For each edge, when there exists a node such that there is an edge between this node and the first node of the edge, and there is an edge between this node and the second node of the edge, and the condition: p < q + r - q×r is satisfied, then delete this edge from the currency transaction graph, where p is the risk probability corresponding to this edge, q is the risk probability corresponding to the edge between this node and the first node of the edge, and r is the risk probability corresponding to the edge between this node and the second node of the edge.
[0053] In the embodiment of the present invention, step 104 obtains multiple foreign currency accounts of the user and determines the foreign currency account transaction graph corresponding to the user based on the currency transaction graph, including:
[0054] Create a foreign currency account transaction graph corresponding to the user. Each node of the foreign currency account transaction graph corresponds one-to-one to each foreign currency account of the user. There is an edge between two nodes if and only if there is an edge between the two currency types corresponding to the two foreign currency accounts corresponding to the two nodes in the currency transaction graph;
[0055] The risk probability corresponding to each edge of the foreign currency account transaction graph corresponding to the user is determined as the risk probability of the edge corresponding to the two currency types corresponding to the two foreign currency accounts corresponding to the two nodes of the edge in the currency transaction graph.
[0056] In the embodiment of the present invention, as Figure 2 shown, step 105 determines the foreign currency accounts to be recommended for the user according to the multiple foreign currency accounts and the risk probabilities corresponding to each scenario for different currency types, including:
[0057] Step 201: Determine the partial order of the foreign currency accounts according to the multiple foreign currency accounts and the risk probabilities corresponding to each scenario for different currency types. Among them, for any two foreign currency accounts, this partial order is used to determine whether the first foreign currency account among any two foreign currency accounts in the multiple foreign currency accounts is superior to the second foreign currency account;
[0058] Step 202: Determine multiple maximal foreign currency accounts of this partial order according to the partial order of the foreign currency accounts, where the maximal foreign currency account is the maximal element of this partial order;
[0059] Step 203: Determine the multiple maximal foreign currency accounts as the foreign currency accounts to be recommended for the user.
[0060] In the embodiment of the present invention, step 201 determines the partial order of the foreign currency accounts according to the multiple foreign currency accounts and the risk probabilities corresponding to each scenario for different currency types, including:
[0061] For any two foreign currency accounts among the multiple foreign currency accounts, if for any scenario, the risk probability corresponding to the currency type of the first foreign currency account of the two foreign currency accounts is less than or equal to the risk probability corresponding to the currency type of the second foreign currency account of the two foreign currency accounts, then determine that the first foreign currency account is superior to the second foreign currency account.
[0062] It should be noted that the maximal element of the partial order is an element in the set corresponding to the partial order for which there is no other element in the set that is superior to it. Determining multiple maximal foreign currency accounts of this partial order according to the partial order of the foreign currency accounts includes:
[0063] For each foreign currency account, according to the partial order of the foreign currency accounts, compare this foreign currency account with other foreign currency accounts except the maximum element in turn. If there is no other foreign currency account superior to this foreign currency account, then determine this foreign currency account as the maximum foreign currency account of this partial order.
[0064] In the embodiment of the present invention, as Figure 3 shown, step 105 for each foreign currency account to be recommended, based on the transaction amount of this transaction and the foreign currency account transaction graph corresponding to this user, determine the transfer risk of each foreign currency account to be recommended in this transaction, including:
[0065] Step 301: For each foreign currency account to be recommended, according to the foreign currency account transaction graph corresponding to this user, determine the transfer risk probability corresponding to each foreign currency account of this user;
[0066] Step 302: According to the transaction amount of this transaction and the transfer risk probability corresponding to each foreign currency account of this user, determine the transaction amount corresponding to each foreign currency account of this user;
[0067] Step 303: According to the transfer risk and the corresponding transaction amount corresponding to each foreign currency account of this user, determine the transfer risk of this foreign currency account to be recommended in this transaction as: where r i is the transfer risk corresponding to the i-th foreign currency account of this user, m i is the transaction amount corresponding to the i-th foreign currency account of this user, and n is the number of foreign currency accounts of this user.
[0068] In the embodiment of the present invention, as Figure 4 shown, step 301 for each foreign currency account to be recommended, according to the foreign currency account transaction graph corresponding to this user, determine the transfer risk probability corresponding to each foreign currency account of this user, including:
[0069] Step 401: For each edge of the foreign currency account transaction graph corresponding to this user, set the safety distance corresponding to this edge as: lg(1 - r), where r is the risk probability corresponding to this edge;
[0070] Step 402: According to the safety distance, determine the shortest path between the two nodes corresponding to each foreign currency account of this user and this foreign currency account to be recommended in the foreign currency account transaction graph, and determine this shortest path as the safety distance between this foreign currency account and this foreign currency account to be recommended;
[0071] Step 403: Determine the transfer risk corresponding to each foreign currency account of this user as: 1 - 10 s where s is the safety distance between this foreign currency account and this foreign currency account to be recommended.
[0072] In an embodiment of the present invention, step 302 determines the transaction amount corresponding to each foreign currency account of the user based on the transaction amount of the current transaction and the transfer risk probability corresponding to each foreign currency account of the user, including:
[0073] Sort the multiple foreign currency accounts of the user in ascending order according to the corresponding transfer risk probability;
[0074] Initialize the remaining transaction amount as the transaction amount of the current transaction;
[0075] Repeat the following steps until the remaining transaction amount is equal to 0 or the transaction amount corresponding to each foreign currency account of the user is determined:
[0076] According to the sorting result, for each foreign currency account of the user, determine the fund amount corresponding to this transaction of the foreign currency account based on the exchange rate stored in the blockchain;
[0077] Determine whether the fund amount corresponding to this transaction of the foreign currency account is greater than the remaining transaction amount; if it is greater, determine the transaction amount of the foreign currency account as the remaining transaction amount; otherwise, determine the transaction amount of the foreign currency account as the fund amount corresponding to this transaction of the foreign currency account, calculate the difference between the remaining transaction amount and the fund amount corresponding to this transaction of the foreign currency account, and update the remaining transaction amount to this difference.
[0078] Specifically, send the current exchange rate information as a reference to the blockchain on the bank side. When the user terminal needs to conduct a foreign currency transaction, the exchange rate information stored in the blockchain, the current payment amount, and the current foreign currency balance can be enabled to determine whether to support the current payment transaction, and the transaction information (including transaction time, transaction amount, transaction currency, etc.) is stored in the blockchain.
[0079] In an embodiment of the present invention, the method may further include:
[0080] Set the recommended priority coefficient of each foreign currency account to be recommended according to the transfer risk of the foreign currency account to be recommended, and recommend the foreign currency account to be recommended to the user according to the recommended priority coefficient for the user to select and conduct transactions. Specifically:
[0081] For each foreign currency account to be recommended, determine the recommended priority coefficient of the foreign currency account to be recommended as where r i is the transfer risk of the i-th foreign currency account to be recommended, and m is the number of foreign currency accounts to be recommended;
[0082] Sort all the foreign currency accounts to be recommended;
[0083] Select a probability density function;
[0084] Take the first foreign currency account to be recommended in the sorting as the current foreign currency account to be recommended;
[0085] Loop and execute the following steps until the optimal intervals corresponding to all the foreign currency accounts to be recommended are determined:
[0086] If the current foreign currency account to be recommended is the first foreign currency account to be recommended in the sorting, determine the left endpoint corresponding to the current foreign currency account to be recommended as the minimum value of the domain of the probability density function; otherwise, determine the left endpoint corresponding to the current foreign currency account to be recommended as the right endpoint corresponding to the previous foreign currency account to be recommended of the current foreign currency account in the sorting;
[0087] Determine the right endpoint corresponding to the current foreign currency account to be recommended such that the integral of the probability density function from the left endpoint corresponding to the current foreign currency account to be recommended to the corresponding right endpoint is equal to the recommended priority coefficient of the current foreign currency account to be recommended;
[0088] Determine the optimal interval corresponding to the current foreign currency account to be recommended, where the optimal interval is a left-closed and right-open interval, and the left endpoint and the right endpoint of the optimal interval are respectively the left endpoint and the right endpoint corresponding to the current foreign currency account to be recommended;
[0089] Take the next foreign currency account to be recommended of the current foreign currency account in the sorting as the current foreign currency account to be recommended;
[0090] After determining the optimal intervals corresponding to all the foreign currency accounts to be recommended, generate a random number according to the probability density function;
[0091] Determine the optimal interval where the random number is located, and recommend the foreign currency account corresponding to the optimal interval to the user.
[0092] In the embodiments of the present invention, the method may further include:
[0093] For each recommendable foreign currency account, based on the transaction amount of the user's transaction, the predicted exchange rate information, and the foreign currency account transaction graph corresponding to the user, determine the transfer risk of each recommendable foreign currency account in this transaction.
[0094] In the technical solution of the present application, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of national laws and regulations;
[0095] In the embodiments of the present invention, a multi-currency payment device based on blockchain is also provided as described in the following embodiments. Since the principle of the device for solving problems is similar to that of the multi-currency payment method based on blockchain, the implementation of the device can refer to the implementation of the multi-currency payment method based on blockchain, and the repeated parts will not be described again.
[0096] Figure 5The structural block diagram of a multi - currency payment device based on blockchain in an embodiment of the present invention is as follows Figure 5 As shown, the device includes:
[0097] A risk probability determination module 02, configured to determine the risk probability of transactions between different currencies according to the transaction data between different currencies;
[0098] A currency transaction graph establishment module 04, configured to establish a currency transaction graph based on the risk probability of transactions between different currencies;
[0099] The risk probability determination module is further configured to: determine the risk probability of each scenario corresponding to different currencies according to the transaction data of different currencies;
[0100] A foreign currency account transaction graph determination module 06, configured to obtain multiple foreign currency accounts of a user and determine the foreign currency account transaction graph corresponding to the user based on the currency transaction graph;
[0101] A to - be - recommended foreign currency account determination module 08, configured to determine the to - be - recommended foreign currency accounts of the user according to the multiple foreign currency accounts and the risk probability of each scenario corresponding to different currencies;
[0102] A transfer risk determination module 10, configured to, for each to - be - recommended foreign currency account, determine the transfer risk of each to - be - recommended foreign currency account in this transaction based on the transaction amount of this transaction and the foreign currency account transaction graph corresponding to the user;
[0103] A foreign currency account recommendation module 12, configured to recommend the to - be - recommended foreign currency accounts to the customer according to the transfer risk of each to - be - recommended foreign currency account in this transaction for the user to select and conduct transactions.
[0104] In an embodiment of the present invention, the currency transaction graph establishment module 04 is specifically configured to:
[0105] Establish a currency transaction graph, where each node of the currency transaction graph corresponds one - to - one with a currency, and there is an edge between two nodes if and only if the risk probability between the two currencies corresponding to the two nodes is greater than a predetermined value, and the risk probability corresponding to each edge is the risk probability between the two currencies corresponding to the two nodes of the edge;
[0106] For each edge, when there is a node such that there is an edge between this node and the first node of this edge, and there is an edge between this node and the second node of this edge, and the condition: p < q + r - q×r is satisfied, then this edge is deleted from the currency transaction graph, where p is the risk probability corresponding to this edge, q is the risk probability corresponding to the edge between this node and the first node of this edge, and r is the risk probability corresponding to the edge between this node and the second node of this edge.
[0107] In an embodiment of the present invention, the foreign currency account transaction graph determination module 06 is specifically configured to:
[0108] Establish a foreign currency account transaction graph corresponding to the user, where each node of the foreign currency account transaction graph corresponds one-to-one to each foreign currency account of the user, and there is an edge between two nodes if and only if there is an edge between the two currency types corresponding to the two foreign currency accounts corresponding to the two nodes in the currency transaction graph;
[0109] The risk probability corresponding to each edge of the foreign currency account transaction graph corresponding to the user is determined as the risk probability of the edge corresponding to the two currency types corresponding to the two foreign currency accounts corresponding to the two nodes of the edge in the currency transaction graph.
[0110] In an embodiment of the present invention, the foreign currency account to be recommended determination module 08 is specifically configured to:
[0111] Determine a partial order of the foreign currency accounts according to the multiple foreign currency accounts and the risk probabilities corresponding to each scenario for different currency types, where, for any two foreign currency accounts, the partial order is used to determine whether a first foreign currency account among any two foreign currency accounts in the multiple foreign currency accounts is superior to a second foreign currency account;
[0112] Determine multiple maximal foreign currency accounts of the partial order according to the partial order of the foreign currency accounts, where the maximal foreign currency account is a maximal element of the partial order;
[0113] Determine the multiple maximal foreign currency accounts as the foreign currency accounts to be recommended for the user.
[0114] In an embodiment of the present invention, the foreign currency account to be recommended determination module 08 is specifically configured to:
[0115] For any two foreign currency accounts among the multiple foreign currency accounts, if for any scenario, the risk probability of the currency type of the first foreign currency account corresponding to the scenario is less than or equal to the risk probability of the currency type of the second foreign currency account corresponding to the scenario, then determine that the first foreign currency account is superior to the second foreign currency account.
[0116] In an embodiment of the present invention, the transfer risk determination module 10 is specifically configured to:
[0117] For each foreign currency account to be recommended, determine the transfer risk probability corresponding to each foreign currency account of the user according to the foreign currency account transaction graph corresponding to the user;
[0118] Determine the transaction amount corresponding to each foreign currency account of the user according to the transaction amount based on the current transaction and the transfer risk probability corresponding to each foreign currency account of the user;
[0119] Based on the transfer risk corresponding to each foreign currency account of the user and the corresponding transaction amount, determine that the transfer risk of the to-be-recommended foreign currency account in this transaction is: where r i is the transfer risk corresponding to the i-th foreign currency account of the user, m i is the transaction amount corresponding to the i-th foreign currency account of the user, and n is the number of the user's foreign currency accounts.
[0120] In the embodiment of the present invention, the transfer risk determination module 10 is specifically configured to:
[0121] For each edge of the foreign currency account transaction graph corresponding to the user, set the safety distance corresponding to the edge to: lg(1 - r), where r is the risk probability corresponding to the edge;
[0122] Based on the safety distance, determine the shortest path between the two nodes corresponding to each foreign currency account of the user and the to-be-recommended foreign currency account in the foreign currency account transaction graph, and determine the shortest path as the safety distance between the foreign currency account and the to-be-recommended foreign currency account;
[0123] Determine the transfer risk corresponding to each foreign currency account of the user as: 1 - 10 s , where s is the safety distance between the foreign currency account and the to-be-recommended foreign currency account.
[0124] In the embodiment of the present invention, the transfer risk determination module 10 is specifically configured to:
[0125] Sort the multiple foreign currency accounts of the user in ascending order according to the corresponding transfer risk probability;
[0126] Initialize the remaining transaction amount as the transaction amount of this transaction;
[0127] Repeat the following steps until the remaining transaction amount is equal to 0 or the transaction amount corresponding to each foreign currency account of the user is determined:
[0128] According to the sorting result, for each foreign currency account of the user in turn, determine the fund amount corresponding to the foreign currency account for this transaction based on the exchange rate stored in the blockchain;
[0129] Determine whether the fund amount corresponding to the foreign currency account for this transaction is greater than the remaining transaction amount; if it is greater, determine the transaction amount of the foreign currency account as the remaining transaction amount; otherwise, determine the transaction amount of the foreign currency account as the fund amount corresponding to the foreign currency account for this transaction, calculate the difference between the remaining transaction amount and the fund amount corresponding to the foreign currency account for this transaction, and update the remaining transaction amount to the difference.
[0130] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned multi-currency payment method based on blockchain is implemented.
[0131] An embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned multi-currency payment method based on blockchain is implemented.
[0132] An embodiment of the present invention further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the above-mentioned multi-currency payment method based on blockchain is implemented.
[0133] In the embodiment of the present invention, by relying on the transaction data between different currencies, the risk probability of transactions between different currencies and the risk probability of each currency corresponding to each scenario are determined; based on the risk probability of transactions between different currencies, a currency transaction graph is established; multiple foreign currency accounts of a user are obtained, and based on the currency transaction graph, the foreign currency account transaction graph corresponding to the user is determined; according to the multiple foreign currency accounts and the risk probability of each currency corresponding to each scenario, the to-be-recommended foreign currency accounts of the user are determined; for each to-be-recommended foreign currency account, based on the transaction amount of this transaction and the foreign currency account transaction graph, the transfer risk of each to-be-recommended foreign currency account in this transaction is determined; according to the transfer risk, the to-be-recommended foreign currency accounts are recommended to the customer for the user to select and conduct transactions. The present invention can, when the user conducts a transaction, recommend a suitable currency to the user based on the risk probability of the currency and the transaction scenario, so as to effectively reduce the risk of this transaction of the user.
[0134] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0135] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0136] These computer program instructions can 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, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0138] The specific embodiments described above further elaborate on the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A multi-currency payment method based on blockchain, characterized in that Including: Determine the risk probability of transactions between different currencies based on the transaction data between different currencies; Based on the risk probability of transactions between different currencies, establish a currency transaction graph; Determine the risk probability of each currency corresponding to each scenario based on the transaction data of different currencies; Obtain multiple foreign currency accounts of the user, and based on the currency transaction graph, determine the foreign currency account transaction graph corresponding to the user; Based on the multiple foreign currency accounts and the risk probability of each currency corresponding to each scenario, determine the foreign currency accounts to be recommended for the user; For each foreign currency account to be recommended, based on the transaction amount of this transaction and the foreign currency account transaction graph corresponding to the user, determine the transfer risk of each foreign currency account to be recommended in this transaction; Based on the transfer risk of each foreign currency account to be recommended in this transaction, recommend the foreign currency accounts to be recommended to the customer for the user to select and conduct transactions.
2. The multi-currency payment method based on blockchain according to claim 1, characterized in that Based on the risk probability of transactions between different currencies, establish a currency transaction graph, including: Establish a currency transaction graph, where each node of the currency transaction graph corresponds to a currency one by one, and there is an edge between two nodes if and only if the risk probability between the two currencies corresponding to the two nodes is greater than a predetermined value, and the risk probability corresponding to each edge is the risk probability between the two currencies corresponding to the two nodes of this edge; For each edge, when there is a node such that there is an edge between this node and the first node of this edge, and there is an edge between this node and the second node of this edge, and the condition: p < q + r - q × r is satisfied, then delete this edge from the currency transaction graph, where p is the risk probability corresponding to this edge, q is the risk probability corresponding to the edge between this node and the first node of this edge, and r is the risk probability corresponding to the edge between this node and the second node of this edge.
3. The multi-currency payment method based on blockchain according to claim 1, wherein Obtain multiple foreign currency accounts of the user, and based on the currency transaction graph, determine the foreign currency account transaction graph corresponding to the user, including: Establish the foreign currency account transaction graph corresponding to the user, where each node of the foreign currency account transaction graph corresponds to each foreign currency account of the user one by one, and there is an edge between two nodes if and only if there is an edge between the two currencies corresponding to the two foreign currency accounts corresponding to the two nodes in the currency transaction graph; The risk probability corresponding to each edge of the foreign currency account transaction graph corresponding to the user is determined as the risk probability of the edge corresponding to the two currencies corresponding to the two nodes corresponding to this edge in the currency transaction graph.
4. The multi-currency payment method based on blockchain according to claim 1, wherein Based on the multiple foreign currency accounts and the risk probability of each currency corresponding to each scenario, determine the foreign currency accounts to be recommended for the user, including: Based on the multiple foreign currency accounts and the risk probability of each currency corresponding to each scenario, determine the partial order of foreign currency accounts, where for any two foreign currency accounts, this partial order is used to determine whether the first foreign currency account in any two foreign currency accounts among the multiple foreign currency accounts is superior to the second foreign currency account; Based on the partial order of foreign currency accounts, determine multiple maximal foreign currency accounts of this partial order, where the maximal foreign currency account is the maximal element of this partial order; Determine the multiple maximal foreign currency accounts as the foreign currency accounts to be recommended for the user.
5. The multi-currency payment method based on blockchain according to claim 4, characterized in that Determine the partial order of foreign currency accounts based on the multiple foreign currency accounts and the risk probabilities corresponding to each scenario for different currencies, including: For any two foreign currency accounts among the multiple foreign currency accounts, if for any scenario, the risk probability corresponding to the currency of the first foreign currency account of the two foreign currency accounts is less than or equal to the risk probability corresponding to the currency of the second foreign currency account of the two foreign currency accounts, then determine that the first foreign currency account is superior to the second foreign currency account.
6. The multi-currency payment method based on blockchain according to claim 1, wherein For each foreign currency account to be recommended, based on the transaction amount of this transaction and the foreign currency account transaction graph corresponding to this user, determine the transfer risk of each foreign currency account to be recommended in this transaction, including: For each foreign currency account to be recommended, determine the transfer risk probability corresponding to each foreign currency account of this user according to the foreign currency account transaction graph corresponding to this user; Based on the transaction amount of this transaction and the transfer risk probability corresponding to each foreign currency account of this user, determine the transaction amount corresponding to each foreign currency account of this user; Based on the transfer risk corresponding to each foreign currency account of the user and the corresponding transaction amount, determine that the transfer risk of the to-be-recommended foreign currency account in this transaction is: where r i is the transfer risk corresponding to the i-th foreign currency account of the user, m i is the transaction amount corresponding to the i-th foreign currency account of the user, and n is the number of the user's foreign currency accounts.
7. The multi-currency payment method based on blockchain according to claim 6, wherein, For each foreign currency account to be recommended, determine the transfer risk probability corresponding to each foreign currency account of this user according to the foreign currency account transaction graph corresponding to this user, including: For each edge of the foreign currency account transaction graph corresponding to this user, set the safety distance corresponding to this edge as: lg(1 - r), where r is the risk probability corresponding to this edge; Based on the safety distance, determine the shortest path between the two nodes corresponding to each foreign currency account of this user and the foreign currency account to be recommended in the foreign currency account transaction graph, and determine this shortest path as the safety distance between this foreign currency account and the foreign currency account to be recommended; Determine that the transfer risk corresponding to each foreign currency account of the user is: 1 - 10 s , where s is the security distance between the foreign currency account and the to-be-recommended foreign currency account.
8. The multi-currency payment method based on blockchain according to claim 6, wherein Based on the transaction amount of this transaction and the transfer risk probability corresponding to each foreign currency account of this user, determine the transaction amount corresponding to each foreign currency account of this user, including: Sort the multiple foreign currency accounts of this user in ascending order according to the corresponding transfer risk probability; Initialize the remaining transaction amount as the transaction amount of this transaction; Repeat the following steps until the remaining transaction amount is equal to 0 or the transaction amount corresponding to each foreign currency account of this user is determined: According to the sorting result, for each foreign currency account of this user in turn, determine the fund amount corresponding to this foreign currency account for this transaction according to the exchange rate stored in the blockchain; Determine whether the fund amount corresponding to this foreign currency account for this transaction is greater than the remaining transaction amount; if it is greater, then determine the transaction amount of this foreign currency account as the remaining transaction amount; otherwise, determine the transaction amount of this foreign currency account as the fund amount corresponding to this foreign currency account for this transaction, calculate the difference between the remaining transaction amount and the fund amount corresponding to this foreign currency account for this transaction, and update the remaining transaction amount as this difference.
9. A multi-currency payment device based on blockchain, characterized in that, Including: A risk probability determination module, configured to determine the risk probability of transactions between different currencies according to the transaction data between different currencies; A currency transaction graph establishment module, configured to establish a currency transaction graph based on the risk probability of transactions between different currencies; The risk probability determination module is further configured to: determine the risk probability corresponding to each scenario for different currencies according to the transaction data of different currencies; A foreign currency account transaction graph determination module, configured to obtain multiple foreign currency accounts of a user, and determine a foreign currency account transaction graph corresponding to the user based on a currency transaction graph; A to-be-recommended foreign currency account determination module, configured to determine a to-be-recommended foreign currency account of the user according to the multiple foreign currency accounts and the risk probabilities corresponding to each scenario for different currencies; A transfer risk determination module, configured to, for each to-be-recommended foreign currency account, determine the transfer risk of each to-be-recommended foreign currency account in this transaction based on the transaction amount of this transaction and the foreign currency account transaction graph corresponding to the user; A foreign currency account recommendation module, configured to recommend the to-be-recommended foreign currency accounts to a customer according to the transfer risks of each to-be-recommended foreign currency account in this transaction for the user to select and conduct transactions.
10. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the multi-currency payment method based on blockchain according to any one of claims 1 to 8.
11. 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 multi-currency payment method based on blockchain according to any one of claims 1 to 8.
12. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the multi-currency payment method based on blockchain according to any one of claims 1 to 8.
Citation Information
Patent Citations
Internet-based currency exchange and settlement method and system
CN105069685A
Graphical structure model-based method for transaction risk control, and device and equipment
WO2019114434A1