Blockchain-based foreign exchange transaction data processing method and device

By building a consortium chain through blockchain technology and utilizing ant colony algorithm and encrypted tunnel protocol to optimize foreign exchange transaction data processing, the security and efficiency issues of inter-bank transaction data transmission are solved, and efficient and secure foreign exchange transactions across banks are realized.

CN119579308BActive Publication Date: 2025-10-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311346166.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-17
Publication Date
2025-10-10
Estimated Expiration
2043-10-17

AI Technical Summary

Technical Problem

The existing foreign exchange trading system has security and efficiency issues in the inter-bank data transmission process, especially when the trading volume is high, which can easily cause data processing bottlenecks, and transaction data can be easily tampered with during Internet transmission.

Method used

We use blockchain technology to build a consortium chain, use the ant colony algorithm to optimize the communication path, and combine the Diffie-Hellman algorithm and encrypted tunnel protocol to achieve safe and fast foreign exchange transaction data processing.

Benefits of technology

Through the decentralization and multi-party sharing characteristics of blockchain, a cross-bank foreign exchange trading platform has been realized, which improves the speed and security of data transmission, reduces transaction risks, and protects customer privacy and business secrets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579308B_ABST
    Figure CN119579308B_ABST
Patent Text Reader

Abstract

The application provides a foreign exchange transaction data processing method and device based on a blockchain, relates to the technical field of the blockchain, and can be applied to the financial field and other fields. The method comprises the following steps: obtaining current quotation information and a market exchange rate from a foreign exchange transaction center node according to a preset data update period parameter, updating local data according to the quotation information, and generating transaction information through the market exchange rate; generating transaction data through matching and rolling after receiving a transaction request and the transaction information, obtaining a communication path of the foreign exchange transaction center node updated through an ant colony algorithm in a blockchain network according to the transaction data, providing the transaction data to the foreign exchange transaction center node through the communication path for transaction processing, and performing corresponding account processing according to a transaction processing result fed back by the foreign exchange transaction center node.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of blockchain, and can be applied to the financial field and other fields, in particular to a foreign exchange transaction data processing method and device based on blockchain. BACKGROUND

[0002] Foreign exchange trading refers to the behavior of buying and selling convertible currencies of different countries at a specific exchange rate on international financial markets (including domestic financial markets), and has a clear settlement date. Among them, the exchange rate refers to the ratio between the currencies of two countries, which is the conversion price of the currency units of one country into the currency units of other countries. In the existing foreign exchange quotation transaction, the market maker subscribes to the market from the foreign exchange trading center, configures the corresponding quotation rules, and pushes the price to the foreign exchange trading center. The member party clicks on the quotation to complete the transaction.

[0003] Foreign exchange trading is usually completed through financial institutions, for example, many banks provide foreign exchange trading financial services, which convert the currency of one country into the currency of another country at a certain time point according to the exchange rate, and provide customers with buying and selling transactions. With the substantial increase in bank foreign currency deposits, it is necessary to open corresponding foreign exchange business to meet the growing demand for foreign exchange trading, especially the exponential increase in foreign exchange trading volume of large bank customers. Currently, bank foreign exchange transaction requests are submitted to the foreign exchange trading center for processing, which causes the foreign exchange trading center server to become a hotspot, and the data processing bottleneck is easy to cause when the transaction is large. Foreign exchange trading amount is huge and a complex transaction process, the exchange rate on the foreign exchange market will fluctuate over time, like the price of stocks, in the blink of an eye, which will affect the transaction result, so the foreign exchange system has high requirements for data transmission security and efficiency, and has high requirements for transaction response speed. Exchange rate, also known as exchange rate, foreign exchange market, foreign exchange rate, is the ratio of the currency of one country to the currency of another country, that is, the exchange rate of one country's currency to another country's currency. There are many types of exchange rates, which can be generally divided into basic exchange rate and calculation exchange rate, single exchange rate and multiple exchange rate, nominal exchange rate and real exchange rate, bilateral exchange rate and effective exchange rate, limited exchange rate and forward exchange rate, buying exchange rate and selling exchange rate, etc.

[0004] Blockchain, a new decentralized, tamper-proof, and traceable technology, offers a promising solution for decentralized privacy protection and data sharing. In a blockchain network, bank users form a consortium chain with multiple transacting entities through participating institutions. These entities act as authenticators and jointly witness transactions. When multiple banks form a consortium chain, transaction data is transmitted over the internet, making it vulnerable to modification. Traditional secure communication technologies typically utilize the IPSec tunneling protocol. This protocol, located at the transport layer of the OSI Layer 7 protocol, provides data encryption, verification, anti-replay, and authentication, effectively ensuring the security of end-to-end peer-to-peer communications. This protocol is feature-rich and highly scalable. Users enter keys or compression parameters in the core structure to determine the packet security parameters and routing subsystems required for communication. Furthermore, the protocol updates data structures based on user keys based on control processes. Unfortunately, IPsec is complex in design and has a high barrier to adoption. Secure internet communications have become a critical issue that requires urgent resolution. In addition, since the blockchain system is a distributed system, the existing node server data transmission mode is to broadcast data synchronization and run the smart contract program for consensus. The data timeliness is slow. Since transaction data must be transmitted through the Internet channel, it is easy to be modified by criminals in the middle. Summary of the Invention

[0005] The purpose of this application is to provide a blockchain-based foreign exchange transaction data processing method and device to meet the security of data transmission, and also to solve the problem of rapid transmission of transaction data, ensuring that transactions are carried out safely, quickly and reliably.

[0006] To achieve the above-mentioned purpose, the blockchain-based foreign exchange transaction data processing method provided in this application specifically includes: obtaining current quotation information and market exchange rates from the foreign exchange trading center node according to preset data update cycle parameters, updating local data according to the quotation information, and generating transaction information through the market exchange rate; generating transaction data through matching and netting according to the received transaction request and the transaction information, obtaining a communication path with the foreign exchange trading center node calculated and updated by the ant colony algorithm in the blockchain network according to the transaction data; providing the transaction data to the foreign exchange trading center node through the communication path for transaction processing, and performing corresponding accounting processing according to the transaction processing results fed back by the foreign exchange trading center node.

[0007] In the above-mentioned blockchain-based foreign exchange transaction data processing method, optionally, providing the transaction data to the foreign exchange transaction center node through the communication path for transaction processing further comprises: providing a message sending message to the foreign exchange transaction center node according to the communication path, and obtaining the verification feedback result of the message sending message by the foreign exchange transaction center node by using the Diffie-Hellman algorithm to generate a common public key; according to the verification feedback result, a secure channel is established with the foreign exchange transaction center node, and the transaction data is provided to the foreign exchange transaction center node through the secure channel for transaction processing.

[0008] In the above-mentioned blockchain-based foreign exchange transaction data processing method, optionally, the method further comprises: generating corresponding node public keys and node private keys respectively according to the node information of the communication nodes participating in multi-party secure communication in the blockchain network through an encryption function; generating a common public key through the Diffie-Hellman algorithm according to the node public key, and storing the common public key in the blockchain network.

[0009] In the above-mentioned blockchain-based foreign exchange transaction data processing method, optionally, generating corresponding node public keys and node private keys respectively according to the node information of the communication nodes participating in multi-party secure communication in the blockchain network through an encryption function comprises: initializing node parameters of each communication node through an elliptic curve algorithm according to the node information of the communication nodes participating in multi-party secure communication in the blockchain network; generating signature data by signing the corresponding node parameters stored in the blockchain network through the node private key of each communication node; and consensus the signature data to the blockchain network.

[0010] In the above-mentioned blockchain-based foreign exchange transaction data processing method, optionally, the method further comprises: setting a state transition rule for all communication processes of the communication nodes participating in multi-party secure communication in the blockchain network; calculating the pheromone parameters of the communication paths between the communication nodes according to the state transition rule through the simulated ant colony algorithm; cyclically updating the pheromone concentration of the communication paths between the communication nodes according to the pheromone parameters; obtaining the communication path between the communication nodes according to the pheromone concentration, updating the routing table through the communication path, and uploading the routing table to the blockchain network for sharing.

[0011] In the above-mentioned blockchain-based foreign exchange transaction data processing method, optionally, obtaining the verification feedback result of the message sending message by the foreign exchange transaction center node using the common public key generated by the Diffie-Hellman algorithm includes: the foreign exchange transaction center node uses the decryption function, the node private key of the target node and the communication node participating in the multi-party secure communication in the blockchain network to perform signature verification on the message sending message using the common public key generated by the Diffie-Hellman algorithm; and according to the signature verification result, verifying the identity information of the sender in the message sending message using the node public key of the sender and the common public key to obtain the verification feedback result.

[0012] In the above-mentioned blockchain-based foreign exchange transaction data processing method, optionally, the method further includes: receiving a security parameter range determined by a user through a communication node and first key data generated according to the security parameter range, performing a preset legitimacy check on the first key data to obtain a test result; determining a second security parameter within the security parameter range according to the test result, feeding back the second security parameter to the communication node, and the communication node generating second key data according to the second security parameter; constructing a signature certificate based on the verification result of the second key data and a randomly generated prime number and feeding it back to the communication node for verification; and adding the node information of the communication node to the directory of communication nodes participating in multi-party secure communication in the blockchain network according to the verification result of the communication node.

[0013] The present application also provides a blockchain-based foreign exchange transaction data processing device, which includes an update module, a calculation module and a transaction module; the update module is used to obtain current quotation information and market exchange rates from the foreign exchange trading center node according to preset data update cycle parameters, update local data according to the quotation information, and generate transaction information through the market exchange rate; the calculation module is used to generate transaction data through matching and netting based on the received transaction request and the transaction information, and obtain a communication path with the foreign exchange trading center node calculated and updated by an ant colony algorithm in the blockchain network based on the transaction data; the transaction module is used to provide the transaction data to the foreign exchange trading center node through the communication path for transaction processing, and perform corresponding accounting processing based on the transaction processing results fed back by the foreign exchange trading center node.

[0014] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method when executing the computer program.

[0015] The present application also provides a computer-readable storage medium, which stores a computer program for executing the above method.

[0016] The application also provides a computer program product comprising computer programs / instructions which, when executed by a processor, implement the steps of the above method.

[0017] The beneficial technical effects of the application are that the blockchain technology is used to build a consortium chain for each bank, implement a cross-bank foreign exchange transaction platform, support data processing of foreign exchange transactions, strengthen preprocessing of foreign exchange data, and perform netting processing on foreign exchange buying and selling transactions within and between banks, thereby reducing the number of transactions submitted to the foreign exchange transaction center server, accelerating the transmission speed of foreign exchange transaction data, simulating the gain or loss of pheromone introduced by the ant colony algorithm, implementing a path dynamic optimization algorithm for IP data packets based on the encrypted tunnel protocol, simultaneously using the characteristics of decentralization and multi-party sharing of the blockchain to provide public key basic data, routing information, and other shared service capabilities, realizing the organic integration of the ant colony algorithm and the encrypted tunnel, thereby realizing secure communication and optimized routing in the process of multi-party communication, improving the data network data transmission speed, and effectively solving the problems of eavesdropping by attackers and privacy protection. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings, which are included to provide a further understanding of the application and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0019] Figure 1A A flowchart of a foreign exchange transaction data processing method based on a blockchain provided by an embodiment of the application;

[0020] Figure 1B A structural diagram of a foreign exchange transaction data processing system based on a blockchain provided by an embodiment of the application;

[0021] Figure 2A A schematic diagram provided by an embodiment of the application;

[0022] Figure 2B A flowchart of a secure channel construction process provided by an embodiment of the application;

[0023] Figure 3 A flowchart of a security verification process provided by an embodiment of the application;

[0024] Figure 4 A flowchart of an ant algorithm provided by an embodiment of the application;

[0025] Figure 5 A logical flowchart of joining encrypted tunnel communication provided by an embodiment of the application;

[0026] Figure 6 An application flowchart of joining encrypted tunnel communication provided by an embodiment of the application;

[0027] Figure 7 A schematic diagram of the structure of a bank node server provided in one embodiment of the present application;

[0028] Figure 8 A schematic diagram of a process for dynamically optimizing the routing path of foreign exchange transaction data provided in one embodiment of the present application;

[0029] Figure 9 A schematic diagram of the actual application process of the blockchain-based foreign exchange transaction data processing method provided in one embodiment of the present application;

[0030] Figure 10 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0031] The following will describe in detail the implementation methods of this application in conjunction with the accompanying drawings and examples, so that the application can fully understand how technical means are used to solve technical problems and achieve technical effects, and implement them accordingly. It should be noted that as long as there is no conflict, the various embodiments and the various features in each embodiment of this application can be combined with each other, and the resulting technical solutions are all within the scope of protection of this application.

[0032] Additionally, the steps shown in the flowcharts of the accompanying drawings may be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown.

[0033] Please refer to Figure 1A As shown, the blockchain-based foreign exchange transaction data processing method provided in this application specifically includes:

[0034] S101 obtains current quotation information and market exchange rates from a foreign exchange trading center node according to preset data update cycle parameters, updates local data according to the quotation information, and generates transaction information using the market exchange rate;

[0035] S102 generates transaction data by matching and netting the received transaction request and the transaction information, and obtains a communication path with the foreign exchange trading center node calculated and updated by an ant colony algorithm in the blockchain network based on the transaction data;

[0036] S103 provides the transaction data to the foreign exchange trading center node through the communication path for transaction processing, and performs corresponding account entry processing according to the transaction processing result fed back by the foreign exchange trading center node.

[0037] Based on the above embodiments, the application can construct each bank into a consortium chain through blockchain technology, realize a cross-bank foreign exchange transaction platform, support data processing of foreign exchange transactions, strengthen preprocessing of foreign exchange data, and perform netting processing on foreign exchange buying and selling transactions within and between banks, thereby reducing the number of transactions submitted to the foreign exchange transaction center server, accelerating the transmission speed of foreign exchange transaction data, simulating the gain or loss of pheromone introduced by the ant colony algorithm, realizing a path dynamic optimization algorithm of IP data packets based on the encrypted tunnel protocol, simultaneously utilizing the characteristics of decentralization and multi-party sharing of blockchain to provide public key basic data, routing information and other shared service capabilities, realizing the organic integration of the ant colony algorithm and the encrypted tunnel, thereby realizing secure communication and optimized routing in the process of multi-party communication, improving the data network data transmission speed, and effectively solving the problems of attacker eavesdropping and privacy protection.

[0038] On the basis of the above method, the application further provides a foreign exchange transaction data processing device based on blockchain, which comprises an updating module, a calculation module and a transaction module; the updating module is used to obtain current quotation information and market exchange rate from a foreign exchange transaction center node according to a preset data update period parameter, update local data according to the quotation information and generate transaction information through the market exchange rate; the calculation module is used to generate transaction data after matching and netting according to the received transaction request and the transaction information, obtain an updated communication path with the foreign exchange transaction center node in the blockchain network through ant colony algorithm calculation according to the transaction data; and the transaction module is used to provide the transaction data to the foreign exchange transaction center node for transaction processing through the communication path, and perform corresponding account processing according to the transaction processing result fed back by the foreign exchange transaction center node.

[0039] Specifically, reference can be made to Figure 1B In actual work, the above device can be a foreign exchange transaction system, which comprises a customer transaction terminal, a bank node server, a foreign exchange transaction center node server and an Internet network. The customer transaction terminal of each bank is connected to the bank node server of the bank through the network; the bank node servers of each bank are connected to each other through the Internet, and the bank node servers of each bank are connected to the foreign exchange transaction center node server through the Internet to form a financial blockchain system.

[0040] The client transaction terminal is responsible for providing users with services such as foreign exchange quotation information inquiries and foreign exchange trading applications, and performs group signing, encryption, and decryption on transaction request data. A query transaction involves the client transaction terminal submitting a query request to a bank node server, which then retrieves and stores the current quotation information for the currency pair from the exchange center node server. This current quotation information includes the quotation type, currency pair, quotation date, and current quotation. The current quotation is determined by the quotation system based on the current market exchange rate for the currency pair. A currency pair is a foreign exchange transaction involving two currencies, represented by two ISO country codes and a separator.

[0041] The bank node server is responsible for obtaining foreign exchange transaction request data submitted by its customers from its own bank server. Transaction request data includes transaction inquiries or foreign exchange buy and sell requests. The bank node server periodically (e.g., every 30 seconds) obtains and stores current quote information for currency pairs from the foreign exchange trading center node server. To mitigate bank transaction risk, bank buy and sell prices are set. The bank buy price refers to the market price at which a currency is prepared to be purchased in a foreign exchange or cross-currency contract, typically calculated based on the buy rate. The sell price refers to the price applied by a foreign exchange bank when selling foreign exchange to peers or customers, typically calculated based on the sell rate. Due to the high volume of foreign exchange transactions, there are often numerous buy and sell requests simultaneously. For buy and sell transactions submitted within the same period (e.g., 10 seconds), the server internally matches and nets the difference between buy and sell request amounts with the same target price. Based on the netted difference, a new foreign exchange transaction request is submitted to the foreign exchange trading center node server, significantly reducing data impact on the foreign exchange trading center node server. Transaction request data is synchronized with other bank node servers through blockchain technology, running smart contracts to synchronize relevant data. During the synchronization process, the OSI layer 3 (network layer) security tunnel protocol is executed to realize multi-party anonymous communication in the public network environment. The public key is placed in the blockchain network through the interface wg0 provided by the encrypted tunnel. Each participating node generates a key pair based on the public key, reducing the complexity of multiple iterations. Through group signatures and encrypted tunnels, the group signature security parameters are set in the gateway node, which is used as the group signature of multiple participating nodes, and participants are allowed to join on demand. The encrypted tunnel is used to ensure the security of the transmission of transaction request data through the Internet channel. The introduction of a multi-party secure tunnel protocol protects the privacy of customers and the commercial confidential data of various commercial banks. During the transaction, the accepting bank can only obtain the minimum necessary customer privacy data and basic data of other commercial banks. Multi-party secure encryption ensures that the data is available but not visible, thereby protecting the privacy of customers and the commercial secrets of other commercial banks. The ant colony algorithm is simulated to introduce the gain or loss of pheromones, and a dynamic path optimization algorithm for IP data packets is implemented based on the encrypted tunnel protocol. At the same time, the decentralized and multi-party sharing characteristics of the blockchain are utilized to provide shared service capabilities such as public key basic data and routing information, realizing the organic integration of the ant colony algorithm and the encrypted tunnel, thereby achieving secure communication and optimized routing in the multi-party communication process, improving the data network data transmission speed, and thus ensuring the success rate of foreign exchange.

[0042] The blockchain system is composed of bank node servers of different banks. Each server uses encryption, decryption, signature, blockchain and other technologies to build a consortium chain of bank node servers of each bank, execute the agreed smart contract program and secure tunnel protocol, realize anonymous sharing of cross-bank transaction information, accelerate information flow, improve transaction success rate, reduce fees, time and other costs, and at the same time ensure that transaction data information is secure, transparent and cannot be tampered with.

[0043] Please refer to Figure 2A As shown, in one embodiment of the present application, providing the transaction data to the foreign exchange trading center node through the communication path for transaction processing further includes:

[0044] S201 provides the message sending message to the foreign exchange trading center node according to the communication path, and obtains the verification feedback result of the message sending message by the foreign exchange trading center node using the common public key generated by the Diffie-Hellman algorithm;

[0045] S202 establishes a secure channel with the foreign exchange trading center node according to the verification feedback result, and provides the transaction data to the foreign exchange trading center node through the secure channel for transaction processing.

[0046] Please refer to Figure 2B As shown, in one embodiment of the present application, obtaining the verification feedback result of the message sent by the foreign exchange trading center node using the common public key generated by the Diffie-Hellman algorithm includes:

[0047] The foreign exchange trading center node in S2011 performs signature verification on the message sent by using a decryption function, the node private key of the target node, and a common public key generated by the Diffie-Hellman algorithm of the communication nodes participating in multi-party secure communication in the blockchain network;

[0048] S2012 verifies the identity information of the sender by using the node public key of the sender in the message and the common public key according to the signature verification result to obtain a verification feedback result.

[0049] Please refer to Figure 3 As shown, in one embodiment of the present application, the method further includes:

[0050] S301 generates corresponding node public keys and node private keys respectively through encryption functions according to the node information of the communication nodes participating in multi-party secure communication in the blockchain network;

[0051] S302 generates a common public key based on the node public key through the Diffie-Hellman algorithm, and stores the common public key in the blockchain network.

[0052] According to the node information of the communication nodes participating in the multi-party secure communication in the blockchain network, the corresponding node public key and node private key are respectively generated by an encryption function, and the method comprises the following steps of: initializing node parameters of each communication node according to node information of communication nodes participating in multi-party secure communication in the blockchain network through an elliptic curve algorithm; generating signature data by signing corresponding node parameters stored in the blockchain network through the node private key of each communication node; and consensus of the signature data to the blockchain network.

[0053] In actual work, through the above-mentioned multi-party secure communication scheme, the characteristics of the decentralized multi-party information sharing of the blockchain are utilized to promote the secure multi-party sharing of public basic information, thereby effectively expanding the point-to-point two-party secure communication to the multi-party anonymous communication field, realizing the multi-party anonymous communication in the public network environment, placing the public key in the blockchain network through the interface wg0 provided by the encryption tunnel, and generating a key pair according to the public key by each participating node, thereby reducing the complexity of multiple reciprocating iterations. The specific implementation process will be described in detail in subsequent embodiments, and will not be described one by one here.

[0054] Please refer to Figure 4 In an embodiment of the present application, the method further comprises:

[0055] S401 setting a state transition rule for all communication processes of communication nodes participating in multi-party secure communication in the blockchain network;

[0056] S402 calculating the pheromone parameter of the communication path between the communication nodes according to the state transition rule through the simulated ant colony algorithm;

[0057] S403 cyclically updating the pheromone concentration of the communication path between the communication nodes according to the pheromone parameter;

[0058] S404 calculating the communication path between the communication nodes according to the pheromone concentration, updating the routing table through the communication path, and uploading the routing table to the blockchain network for sharing.

[0059] Specifically, in actual work, the logic of the ant colony algorithm is as follows:

[0060] Phase one: initialization:

[0061] Step 1: set the initial node of the datagram as a and the destination node as b;

[0062] Step 2: set the loop flag loop

[0063] Step 2.1: in the loop, each (ant colony: route selection) process adds a state transition rule to establish a path solution and prepare for local pheromone update for iteration

[0064] Step 2.2: Until all ant colonies have completed the path solution

[0065] Phase 2: Dynamically update pheromones:

[0066] Step 1: The ant colony dynamically updates the pheromone in the path according to the state transition rule in the first stage (initialization). The state transition rule is defined as follows:

[0067]

[0068] In the above formula, it is assumed that the path selected by k (ant colony) is from source node a to target node b, a and b are both communication nodes, τ represents pheromone, μ = 1 / δ represents the inverse of the path distance δ(a, b) between a and b, and J k (r) is the set of communication nodes that ant colony k (from a to b) can choose; β is a parameter that determines the relative importance of pheromone and distance, usually β>0.

[0069] Step 2: Update the pheromone τ according to the path distance μ and the pheromone "concentration". The pheromone update rule is as follows:

[0070]

[0071] in:

[0072]

[0073] In the above formula, 0<α<1 represents the pheromone attenuation factor, L k represents the length of the path traveled by ant colony k, and m represents the number of ant colonies.

[0074] Step 3: Optimal route selection, that is, selecting the best path s based on the "concentration" of pheromones:

[0075]

[0076] Where q is a random number distributed in [0...1], q0 (0≤q0≤1) is a constant parameter, and S is a randomly selected variable that follows the state transition rule (see step 1).

[0077] The detailed path optimization process will be described in subsequent embodiments and will not be described in detail here.

[0078] The blockchain-based foreign exchange transaction data processing method provided by this application also provides a multi-party working in the OSI layer 3 (network layer) security tunnel protocol, executing the kernel virtual network interface (mainly serving the Linux operating system). This encrypted tunnel protocol associates the node's public key with the source tunnel address, and can realize key exchange, connection, connection termination, reconnection, node discovery and other service capabilities, effectively protecting the security of multi-user communication, ensuring that the transaction data transmitted through the Internet has not been tampered with, and avoiding the risk of eavesdropping and interference by attackers in an untrusted public network environment. For details, please refer to Figure 5 As shown, in one embodiment of the present application, the method further includes:

[0079] S501 receives a security parameter range determined by a user through a communication node and first key data generated according to the security parameter range, and performs a preset legitimacy check on the first key data to obtain a check result;

[0080] S502 determines a second security parameter within the security parameter range based on the detection result, feeds the second security parameter back to the communication node, and the communication node generates second key data based on the second security parameter;

[0081] S503 constructs a signature certificate based on the verification result of the second key data and a randomly generated prime number and feeds it back to the communication node for verification;

[0082] S504 adds the node information of the communication node to the directory of communication nodes participating in multi-party secure communication in the blockchain network based on the verification result of the communication node.

[0083] Please refer to Figure 6 As shown, in actual work, when a new user registers to join the foreign exchange transaction blockchain system to conduct foreign exchange transactions, the transaction data is transmitted on the blockchain, which requires multi-party anonymous encrypted tunnel communication. Therefore, the encrypted tunnel generation module needs to execute the joining application. The user joining method of the encrypted tunnel communication includes the following steps:

[0084] S601: The user applies to the public key manager (blockchain) to join the communication group;

[0085] S602: The user selects a security parameter (such as a random number) through the communication node module and generates a key c1; the security parameter is expressed as The expression of key c1 is as follows:

[0086]

[0087] S603: After receiving the security parameters, the blockchain checks the legitimacy of the key c1, that is, determines c1∈QR(n) and selects the security parameters (α1, β1), and sets Return to the communication node;

[0088] S604: Communication node calculates x i , formally expressed as follows:

[0089]

[0090] And send back to the blockchain key In order to prove it to the blockchain;

[0091] S605: Blockchain verification key c2∈QR(n). If the verification is successful, it indicates that the above proof is correct. A random prime number e is selected. i ∈Γ, calculate the new signature certificate (A i , e i ), A i The expression is as follows:

[0092]

[0093] And send it back to the communication node where the user is located;

[0094] S606: The user verifies the signature certificate. The verification method is as follows:

[0095]

[0096] S607: Output the result of whether the user joins successfully or not.

[0097] To facilitate a clearer understanding of the blockchain-based foreign exchange transaction data processing method and apparatus provided in this application, the specific implementation logic and principles of each of the above steps will be described in detail below. Relevant technicians in this field should be aware that this example does not limit the blockchain-based foreign exchange transaction data processing method and apparatus required by this application.

[0098] Please refer to Figure 7 As shown, in actual work, the bank node server includes: a parameter configuration module 20, a foreign exchange quotation information synchronization module 21, a foreign exchange bank price production module 22, a foreign exchange transaction matching and netting module 23, a foreign exchange transaction request module 24, a foreign exchange transaction processing module 25, a communication module 26, an encrypted tunnel generation module 27, and a routing management module 28.

[0099] The parameter configuration module 20 is responsible for configuring parameters such as the transaction submission concurrency parameters, foreign exchange quotation information synchronization cycle, reconciliation batch time, bank buying price premium ratio, bank selling price premium ratio, etc. Concurrency parameters include: configuration process data, maximum number of connections, and timeout period.

[0100] The foreign exchange quote information synchronization module 21 is responsible for regularly obtaining current quote information for currency pairs from the foreign exchange trading center node server based on the data update cycle parameters in the parameter configuration module, and updating and storing it in the bank node server data. The current quote information includes the quote type, currency pair, quote date, and current quote. The current quote is determined by the quote system based on the current market exchange rate of the currency pair.

[0101] The foreign exchange bank price production module 22 is responsible for calculating the market exchange rate obtained from the foreign exchange trading center node server based on parameters such as the bank buying price premium ratio and the bank selling price premium ratio in the parameter configuration module, generating the bank buying price and bank selling price for bank foreign exchange transactions, and displaying them on the client terminal.

[0102] The foreign exchange transaction matching and netting module 23 is responsible for aggregating all newly submitted foreign exchange buying and selling transactions within the same period (e.g., 10 seconds), internally matching and netting the buy and sell transaction request amounts with the same transaction target price, and finally submitting the foreign exchange transaction request to the foreign exchange trading center node server based on the netting results, thereby significantly reducing the data impact on the foreign exchange trading center node server.

[0103] The foreign exchange transaction request module 24 is responsible for submitting the foreign exchange transaction to the foreign exchange transaction center node server based on the netting result, generating a transaction unique identifier, a contract unique identifier, and call parameters to assemble the transaction message, and calling the smart contract transaction to calculate the result;

[0104] The foreign exchange transaction processing module 25 is responsible for receiving the transaction result data returned by the foreign exchange transaction center node server, determining that the valid foreign exchange transaction is successful; generating a transaction log for the customer corresponding to the successful transaction, and completing the account debit and credit settlement of the customer account.

[0105] The communication module 26 is responsible for the communication interaction between the nodes of the blockchain, completing the transmission and reception of general blockchain node communication information, including transaction broadcast information, consensus information, block synchronization information, network status information, etc.; and signing, encrypting and decrypting communication data messages; the signature processing steps are as follows:

[0106] Step 1: Generate a random number And calculate:

[0107] T1=A1y w modn;

[0108] T2=g w modn;

[0109]

[0110] Step 2: Randomly select And calculate the following operator:

[0111] (1)

[0112] (2)c=H(g||h||y||a0||a||T1||T2||T3||d1||d2||d3||d4||m)

[0113] (3) s3=r3-ce i w), s4=r4-cw

[0114] Step 3: Output (c, s1, s2, s3, s4, T1, T2, T3).

[0115] The encrypted tunnel generation module 27 is responsible for applying cryptographic algorithms to encrypt and decrypt the generated data packets. It uses a multi-party secure tunneling protocol operating at OSI Layer 3 (Network Layer) and executes the kernel virtual network interface (primarily serving the Linux operating system). This encrypted tunneling protocol associates the node's public key with the source tunnel address and can implement key exchange, connection, connection termination, reconnection, node discovery and other service capabilities. It effectively protects the security of multi-user communications, ensures that they have not been tampered with, and avoids the risk of eavesdropping and interference by attackers in untrusted public network environments. The following is a definition of the method used by the secure tunneling protocol:

[0116] Define a byte sequence concatenation: Let X and Y be byte sequences, then concatenation is the process of connecting two byte sequences X and Y to form another byte sequence Z, formally expressed as Z = X||Y;

[0117] Define the security parameters of the two-group signature: Let ω>1, k and l p is a security parameter, let λ1, λ2, γ1, γ2 represent length variables, and satisfy λ1>ω(λ2+k)+2, λ1>4l p , γ1>ω(γ2+k)+2, and γ2>γ1+2. Define the ranges of integers Λ and Γ as follows:

[0118]

[0119] Let H denote a hash function, formally expressed as: H: {0, 1}* → {0, 1} k .

[0120] When a new user registers to join the foreign exchange trading blockchain system for multi-party anonymous encrypted tunnel communication, the encrypted tunnel generation module executes the joining application.

[0121] The routing management module 28 manages the routing of communication messages, saving, deleting, and adding routing information. It also dynamically detects and manages routing paths to ensure that transaction data is delivered to the target address as quickly as possible. The execution process involves two phases: initialization and dynamic pheromone update. These phases have been described in detail in the previous embodiment and will not be repeated here.

[0122] Please refer to Figure 8 As shown, the method for dynamically optimizing the routing path of foreign exchange transaction data in the blockchain-based foreign exchange transaction data processing method provided by this application comprises the following steps:

[0123] S801: Initialize security parameters, such as the initialization parameters of the elliptic curve algorithm X25519 used in this example; execute the GenKey() function, and for each communication node i (i∈[1,n]), cyclically generate the public key pk(i) and private key sk(i) of the communication node i, and at the same time, upload pk(i) to the blockchain for evidence storage; formally:

[0124] (pk(i),sk(i))=genkey(1 k ))

[0125] S802: For all communication processes or ant colonies k (k∈[1,n]), cyclically set state transition rules;

[0126] S803: Add initialization state transition rules for each path search process (ant colony). The state transition rules are defined as follows:

[0127]

[0128] In the above formula, it is assumed that the path selected by k (ant colony) is from source node a to target node b, a and b are both communication nodes, τ represents pheromone, μ = 1 / δ represents the inverse of the path distance δ(a, b) between a and b, and J k (r) is the set of communication nodes that ant colony k (from a to b) can choose; β is a parameter that determines the relative importance of pheromone and distance, usually β>0.

[0129] S804: Prepare to add pheromone and other information to each ant colony;

[0130] S805: For all ant colonies k (k∈[1,n]), cyclically update the pheromone parameters.

[0131] S806: The specific method for updating pheromones is: updating pheromone T according to the path distance μ and the pheromone "concentration". The pheromone update rules are as follows:

[0132]

[0133] in:

[0134]

[0135] In the above formula, 0<α<1 represents the pheromone attenuation factor, L k represents the length of the path traveled by ant colony k, and m represents the number of ant colonies.

[0136] S807: Execute the optimization path selection function to select the optimal path. The operation is as follows: According to the "concentration" of pheromone, select the best path s:

[0137]

[0138] Wherein, q is a random number distributed in [0...1], q0 (0≤q0≤1) is a constant parameter, and S is a randomly selected variable that follows the state transition rule (refer to step 503).

[0139] S808: Collect the optimized combined path nodes and update the routing table;

[0140] S809: Store the latest routing table on the blockchain to enable network-wide sharing.

[0141] S810: When multi-party secure communication begins, the third party sends a datagram according to the dynamic routing table. The execution steps include: (1) identifying the third party node information and performing signature authentication; (2) identifying the common public key information and performing identity authentication, as follows:

[0142] (1) Signature Verification

[0143] Execute the Verifysign(PK, sk(i)) function to verify the digital signature of PK. If the verification passes, proceed to the next step. Otherwise, the communication connection is rejected. The function is executed as follows:

[0144] bool = Verifysign(PK, sk(i))

[0145] Where sk(i) represents the private key of node i, PK represents the common public key, and bool represents the result of verifying the signature. bool=true indicates success, and bool=false indicates failure.

[0146] (2) Identity Authentication

[0147] Execute the AuthenKey(PK, PK(i)) function to verify the third-party node identity information of PK. If the identity authentication passes, proceed to the next step; otherwise, reject the communication connection. The function is executed as follows:

[0148] bool = AuthenKey(PK, pk(j))

[0149] Where PK(j) represents the public key of node j, PK represents the common public key, bool represents the result of verifying the signature, bool=true represents successful identity authentication, and bool=false represents failed identity authentication.

[0150] The handshake information data format is as follows:

[0151]

[0152] The IP header represents the datagram header, Next hop represents the next hop routing information; type represents the message type, TYPE = 0x1 represents sending a message; TYPE = 0x2 represents receiving a message, etc.; reserved represents the receiver's public key; sender represents the sender's public key; ephemeral represents a temporary credential; timestamp represents the sending timestamp; mac1 represents physical address 1; mac2 represents physical address 2; static represents static information, including the common public key PK, the hashed header information H i ,formal:

[0153] Hi=Hash(Hash(Construct)||PK(i))

[0154] Among them, Hash represents the hash algorithm SHA-256, Construct represents the content information of the structure, PK(i) represents the public key of communication node i, and || represents the byte sequence cascade operator.

[0155] S811: After receiving the communication request, the other party will respond with a message. If the communication is successful, the response message will be output as a success or failure. The response message format is as follows:

[0156]

[0157] Where type indicates the message type, TYPE=0X1 indicates sending a message, TYPE=0x2 indicates receiving a message, etc.; reserved indicates the receiver's public key; sender indicates the sender's public key; ephemeral indicates a temporary credential; static indicates static information, Timestamp indicates the sending timestamp; mac1 indicates physical address 1; mac2 indicates physical address 2.

[0158] Please refer to Figure 9 As shown, based on the above embodiment, the actual application process of the blockchain-based foreign exchange transaction data processing method provided by this application is as follows:

[0159] S901: The foreign exchange quote information synchronization module periodically (e.g., every 20 seconds) obtains current quote information for currency pairs from the foreign exchange trading center node server based on the data update cycle parameter in the parameter configuration module, and updates and stores the information in the bank node server data. The current quote information includes the quote type, currency pair, quote date, and current quote. The current quote is determined by the quote system based on the current market exchange rate of the currency pair.

[0160] S902: The foreign exchange bank price production module calculates the current market exchange rate quote obtained from the foreign exchange trading center node server based on the bank buying price premium ratio, bank selling price premium ratio and other parameters in the parameter configuration module, generates the bank buying price and bank selling price of the bank foreign exchange transaction, and displays them on the client terminal.

[0161] S903: Zhang San, a customer of Bank A, submits a foreign exchange buy transaction request on his client terminal based on the bank's buy price. The buy transaction request data includes the bank's buy price, buy amount, transaction submission time, etc. Similarly, Li Si, a customer of Bank A, submits a foreign exchange sell transaction request on his client terminal based on the bank's sell price. The sell transaction request data includes the bank's sell price, sell amount, transaction submission time, etc.

[0162] The transaction request is submitted to Bank A's node server. The node server reads the parameter configuration module. The foreign exchange transaction matching and reconciliation module 23 aggregates all newly submitted foreign exchange transactions within the same period (e.g., 10 seconds, with the period parameters stored in the parameter configuration module). It then performs internal matching and reconciliation on the amounts of buy and sell transactions with the same target price. Finally, based on the reconciliation results, the foreign exchange transaction request is submitted to the foreign exchange trading center node server, significantly reducing the data impact on the foreign exchange trading center node server. Optionally, after matching and reconciling qualified foreign exchange transactions within Bank A, Bank A can first match and reconcile qualified foreign exchange transactions with other banks. After multiple reconciliations, the foreign exchange transaction request can be submitted to the foreign exchange trading center node server based on the reconciliation results.

[0163] S904: The foreign exchange transaction request module of the A bank node server submits the foreign exchange transaction to the foreign exchange transaction center node server based on the netting result, generates a transaction unique identifier, a contract unique identifier, and call parameters to assemble the transaction message. The encryption tunnel generation module uses a multi-party OSI layer 3 (network layer) secure tunnel protocol to execute the agreed smart contract program and secure tunnel protocol to encrypt and decrypt the generated data message. For details on the encryption method, see Figure 3 .

[0164] S905: The routing management module of Bank A's node server executes the optimized path selection function based on the transaction data routing path dynamic optimization method, selects the optimal path, and sends the foreign exchange request message data to the foreign exchange trading center node server as quickly as possible. The execution operation is as follows:

[0165] Step A: The ant colony dynamically updates the pheromones in the path according to the state transition rules in the first stage (initialization). The state transition rules are defined as follows:

[0166]

[0167] In the above formula, it is assumed that the path selected by k (ant colony) is from source node a to target node b, a and b are both communication nodes, τ represents pheromone, μ = 1 / δ represents the inverse of the path distance δ(a, b) between a and b, and J k (r) is the set of communication nodes that ant colony k (from a to b) can choose; β is a parameter that determines the relative importance of pheromone and distance, usually β>0.

[0168] Step B: Update the pheromone τ according to the path distance μ and the pheromone "concentration". The pheromone update rule is as follows:

[0169]

[0170] in:

[0171]

[0172] In the above formula, 0<α<1 represents the pheromone attenuation factor, L k represents the length of the path traveled by ant colony k, and m represents the number of ant colonies.

[0173] Step C: Optimal routing selection, that is, selecting the best path s based on the "concentration" of pheromones, so as to send the foreign exchange request message data to the node server of Bank B at the fastest speed:

[0174]

[0175] Where q is a random number distributed in [0...1], q0 (0≤q0≤1) is a constant parameter, and S is a randomly selected variable that follows the state transition rule.

[0176] S906: The foreign exchange trading center node server receives the foreign exchange transaction request data from Bank A and processes the transaction based on the transaction price and transaction amount in the request data. After the communication is successful, the transaction is credited to Bank A's public account and the transaction result is returned to Bank A's node server.

[0177] S907: The A bank node server performs entry processing on the related customer foreign exchange account according to the transaction result, and the transaction ends.

[0178] The beneficial technical effects of the present application are that the blockchain technology is used to build a consortium chain for each bank, realize a cross-bank foreign exchange transaction platform, support data processing of foreign exchange transactions, strengthen preprocessing of foreign exchange data, and perform netting processing on foreign exchange buying and selling transactions within and between banks, thereby reducing the number of transactions submitted to the foreign exchange transaction center server, accelerating the transmission speed of foreign exchange transaction data, simulating the gain or loss of pheromone introduced by the ant colony algorithm, realizing a path dynamic optimization algorithm of IP data packets based on the encrypted tunnel protocol, simultaneously using the characteristics of decentralization and multi-party sharing of the blockchain to provide public key basic data, routing information and other shared service capabilities, realizing the organic integration of the ant colony algorithm and the encrypted tunnel, thereby realizing secure communication and optimized routing in the process of multi-party communication, improving the data network data transmission speed, and effectively solving the problems of attacker eavesdropping and privacy protection.

[0179] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.

[0180] The present application also provides a computer readable storage medium storing a computer program for executing the above method.

[0181] The present application also provides a computer program product comprising computer programs / instructions, which, when executed by a processor, implement the steps of the above method.

[0182] As shown in Figure 10 , the electronic device 600 can also include a communication module 110, an input unit 120, an audio processor 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily include all the components shown in Figure 10 ; in addition, the electronic device 600 can also include components not shown in Figure 10 , which can refer to prior art.

[0183] As shown in Figure 10 , the central processor 100, also known as a controller or operation control, can include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of each component of the electronic device 600.

[0184] Memory 140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information and may also store programs that execute the relevant information. The CPU 100 may execute the programs stored in memory 140 to implement information storage or processing.

[0185] The input unit 120 provides input to the CPU 100. The input unit 120 may be, for example, a keypad or touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.

[0186] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), or a SIM card. Alternatively, it may be a memory that retains information even when power is off, can be selectively erased, and is provided with more data. Examples of such memory are sometimes referred to as EPROMs. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142 for storing application programs and function programs or processes for executing the operations of the electronic device 600 via the central processing unit 100.

[0187] The memory 140 may also include a data storage unit (data 143) for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit (driver 144) of the memory 140 may include various driver programs for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0188] The communication module 110 is a transmitter / receiver that transmits and receives signals via the antenna 111. The communication module 110 is coupled to the central processing unit 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0189] Based on different communication technologies, multiple communication modules 110, such as a cellular network module, a Bluetooth module, and / or a wireless local area network module, can be provided in the same electronic device. The communication modules 110 are also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and to receive audio input from the microphone 132 to enable typical telecommunication functions. The audio processor 130 can include any suitable buffers, decoders, amplifiers, etc. In addition, the audio processor 130 is coupled to the central processor 100 to enable recording on-board via the microphone 132 and to enable playing on-board stored sounds via the speaker 131.

[0190] Those skilled in the art will appreciate that embodiments of the present application can be readily used as software, hardware, or a combination of software and hardware. In one embodiment, the present application can be implemented as a computer program product, which can include a computer readable storage medium having stored computer program instructions. These computer program instructions can be used to program a computer (e.g., a processor of a mobile terminal) to implement an embodiment of the present application. The computer program instructions can be software loaded and executed by the computer.

[0191] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations 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, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks.

[0192] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart illustrations and / or block diagrams block or blocks.

[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks.

[0194] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for processing foreign exchange transaction data based on blockchain, characterized in that: The method comprises: Obtain current quote information and market exchange rates from a foreign exchange trading center node according to preset data update cycle parameters, update local data based on the quote information, and generate transaction information using the market exchange rate; Generate transaction data through matching and netting based on the received transaction request and the transaction information, and obtain a communication path with the foreign exchange trading center node calculated and updated using an ant colony algorithm in the blockchain network based on the transaction data; Providing the transaction data to the foreign exchange trading center node via the communication path for transaction processing, and performing corresponding account entry processing based on the transaction processing result fed back by the foreign exchange trading center node; Providing the transaction data to the foreign exchange trading center node through the communication path for transaction processing further includes: Providing the message sending message to the foreign exchange trading center node according to the communication path, and obtaining the verification feedback result of the message sending message by the foreign exchange trading center node using the common public key generated by the Diffie-Hellman algorithm; Establishing a secure channel with the foreign exchange trading center node based on the verification feedback result, and providing the transaction data to the foreign exchange trading center node through the secure channel for transaction processing; The method further comprises: Generate corresponding node public keys and node private keys through encryption functions based on the node information of the communication nodes participating in multi-party secure communication in the blockchain network; Generate a common public key based on the node public key using the Diffie-Hellman algorithm, and store the common public key in the blockchain network; According to the node information of the communication nodes participating in multi-party secure communication in the blockchain network, the corresponding node public key and node private key are generated through encryption functions, including: Initialize the node parameters of each communication node using the elliptic curve algorithm based on the node information of the communication nodes participating in multi-party secure communication in the blockchain network; Signing the corresponding node parameters stored in the blockchain network using the node private key of each communication node to generate signature data; The signature data is consensus-confirmed to the blockchain network.

2. The method for processing foreign exchange transaction data based on blockchain according to claim 1, characterized in that: The method further comprises: Set state transfer rules for all communication processes of communication nodes participating in multi-party secure communication in the blockchain network; Pheromone parameters of the communication path between the communication nodes calculated by simulating the ant colony algorithm according to the state transition rule; cyclically updating the pheromone concentration of the communication path between the communication nodes according to the pheromone parameter; The communication path between the communication nodes is calculated based on the pheromone concentration, the routing table is updated through the communication path, and the routing table is uploaded to the blockchain network for sharing.

3. The method for processing foreign exchange transaction data based on blockchain according to claim 1, characterized in that: Obtaining the verification feedback result of the message sent by the foreign exchange trading center node using the common public key generated by the Diffie-Hellman algorithm includes: The foreign exchange trading center node performs signature verification on the message sending message using a decryption function, the node private key of the target node, and a common public key generated by the communication nodes participating in multi-party secure communication in the blockchain network using the Diffie-Hellman algorithm; According to the signature verification result, the identity information of the sender is verified by using the node public key of the sender in the message and the common public key to obtain a verification feedback result.

4. The method for processing foreign exchange transaction data based on blockchain according to claim 1, characterized in that: The method further comprises: receiving a security parameter range determined by a user through a communication node and first key data generated according to the security parameter range, and performing a preset legitimacy check on the first key data to obtain a check result; determining a second security parameter within the security parameter range based on the detection result, feeding the second security parameter back to the communication node, and having the communication node generate second key data based on the second security parameter; Constructing a signature certificate based on the verification result of the second key data and a randomly generated prime number and feeding it back to the communication node for verification; According to the verification result of the communication node, the node information of the communication node is added to the directory of communication nodes participating in multi-party secure communication in the blockchain network.

5. A blockchain-based foreign exchange transaction data processing device for executing the method according to any one of claims 1 to 4, characterized in that: The device comprises an update module, a calculation module and a transaction module; The update module is used to obtain current quotation information and market exchange rates from the foreign exchange trading center node according to preset data update cycle parameters, update local data according to the quotation information, and generate transaction information using the market exchange rate; The calculation module is used to generate transaction data by matching and netting the received transaction request and the transaction information, and obtain a communication path with the foreign exchange trading center node calculated and updated by an ant colony algorithm in the blockchain network based on the transaction data; The transaction module is used to provide the transaction data to the foreign exchange transaction center node through the communication path for transaction processing, and perform corresponding account entry processing based on the transaction processing results fed back by the foreign exchange transaction center node.

6. An electronic 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 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 for causing a computer to execute the method according to any one of claims 1 to 4.

8. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Foreign exchange transaction simulation test method and device, computer equipment and storage medium

    CN112634047A

  • Foreign exchange quotation reminding method and device based on block chain

    CN113487318A