WO2021174778A1 - Blockchain secure transaction method, computer device, and readable storage medium - Google Patents

Blockchain secure transaction method, computer device, and readable storage medium Download PDF

Info

Publication number
WO2021174778A1
WO2021174778A1 PCT/CN2020/111628 CN2020111628W WO2021174778A1 WO 2021174778 A1 WO2021174778 A1 WO 2021174778A1 CN 2020111628 W CN2020111628 W CN 2020111628W WO 2021174778 A1 WO2021174778 A1 WO 2021174778A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
transaction
information
request information
transaction request
Prior art date
Application number
PCT/CN2020/111628
Other languages
French (fr)
Chinese (zh)
Inventor
孔令炜
王健宗
黄章成
程宁
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021174778A1 publication Critical patent/WO2021174778A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • G06Q20/223Payment schemes or models based on the use of peer-to-peer networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3823Payment protocols; Details thereof insuring higher security of transaction combining multiple encryption tools for a transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • the embodiments of the present application relate to the field of blockchain technology, and in particular to a blockchain secure transaction method, computer equipment, and readable storage medium.
  • Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • an industry based on blockchain technology has initially taken shape, but the blockchain still faces many technical bottlenecks.
  • Bitcoin is a well-known application based on blockchain technology, which has the advantages of decentralization, collective maintenance, information that cannot be tampered with, and no trust system.
  • the inventor found that Bitcoin also embodies the shortcomings and challenges of blockchain technology in its application, which are mainly reflected in:
  • the purpose of the embodiments of the present application is to provide a blockchain secure transaction method, which can solve the above-mentioned problems in the prior art.
  • the implementation of the present application provides a blockchain secure transaction method, which is applied to computer equipment, including: collecting transaction request information of each node participating in a secure transaction, and the nodes participating in the secure transaction Including seller nodes, buyer nodes, and billing rights nodes; record the transaction request information, verify the legitimacy of the transaction request information; generate transaction blocks based on the transaction request information, and package the transaction blocks into the blockchain Block; obtain and verify the accounting right transferred by the accounting right node; broadcast to each node in the transaction request information the ownership of the accounting right after verification in the block, so that all Each node reaches a consensus according to a preset consensus algorithm; the transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
  • the implementation of this application also provides a blockchain secure transaction system, including:
  • the collection module is used to collect transaction request information of each node participating in a secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
  • the recording module is used to record the transaction request information and verify the legality of the transaction request information
  • the packaging module is used to generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
  • the issuing module is used to obtain and verify the bookkeeping right transferred by the bookkeeping right node, and when the bookkeeping right is verified to be qualified, issue a reward to the bookkeeping right node;
  • a broadcasting module configured to broadcast to each node in the transaction request information the attribution status of the accounting right after verification in the block, so that each node can reach a consensus mechanism
  • the synchronization module is used to verify the transaction request information through the accounting right, and when the verification is successful, notify each node to record the transaction request information, and synchronize the account information of each node.
  • the embodiment of the present application also provides a computer device that includes a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor.
  • the computer-readable instructions When executed by the processor, the following steps are implemented:
  • Collect transaction request information of each node participating in a secure transaction the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
  • each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
  • the transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
  • the embodiment of the present application also provides a computer-readable storage medium having computer-readable instructions stored in the computer-readable storage medium, and the computer-readable instructions may be executed by at least one processor to enable the At least one processor performs the following steps:
  • Collect transaction request information of each node participating in a secure transaction the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
  • each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
  • the transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
  • the blockchain secure transaction method proposed in the implementation of this application enables the federated learning to be combined with the blockchain in the secure transaction process, and all transaction records are recorded through a third-party trusted node.
  • the node where each participant is located no longer records all transactions.
  • Transaction records enhance privacy; third-party trusted nodes will verify transaction information to solve possible asymmetric encryption crackability issues; third-party trusted nodes will confirm and verify the accounting rights, which reduces the number of secure transactions , After the participating nodes compete for the accounting right and after the accounting is completed, the confirmation delay required for the synchronization verification between each other; the legality verification of the transaction request information is added, so that under certain circumstances, the regulatory agency is allowed Intervention solves the problem that cannot be supervised in the existing technology.
  • Fig. 1 is a schematic flowchart of a blockchain secure transaction method according to the first embodiment of the present application
  • FIG. 2 is a schematic diagram of each node in the blockchain secure transaction process in the first embodiment of the present application
  • Fig. 3 is a block diagram of a block chain secure transaction system according to the second embodiment of the present application.
  • Fig. 4 is a schematic diagram of the hardware architecture of a computer device suitable for a blockchain secure transaction method according to the present application.
  • first, second, third, etc. may be used in this disclosure to describe various information, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word “if” as used herein can be interpreted as "when” or “when” or "in response to determination”.
  • FIG. 1 The schematic flow diagram of the block chain secure transaction method in this embodiment is shown in FIG. 1, and the method is applied to computer equipment.
  • Step S101 Collect transaction request information of each node participating in a secure transaction.
  • the participating nodes in the secure transaction include a seller node, a buyer node, and an accounting authority node.
  • FIG. 2 is a schematic diagram of each node in the blockchain secure transaction process in the first embodiment of the application.
  • the seller in the blockchain transaction is the seller node
  • the buyer in the blockchain transaction is the buyer node
  • the endpoint obtained by the accounting right in the blockchain transaction is the accounting right node.
  • the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes.
  • the computer device compared to the buyer and seller in the transaction process, serves as a third-party trust node or a third-party organization outside the buyer and seller.
  • the computer equipment is described in the form of a third-party trusted node.
  • the seller node, the buyer node, and the bookkeeping right node cannot directly exchange information, and can only exchange information with a third-party trusted node. It also includes: performing federated learning for each node participating in the secure transaction in the transaction process.
  • Federated learning Learning is an emerging basic artificial intelligence technology. Its design goal is to ensure information security during big data exchange, protect terminal data and personal data privacy, and ensure legal compliance. High-efficiency machine learning is carried out between the points. Through federated learning, the interactive data is encrypted during model training and inference, so as to realize the efficient and accurate common use of their respective data.
  • the node where each participant is located no longer records all transaction records, which can enhance the privacy of the participants. Therefore, when a blockchain security transaction occurs, the third-party trust node obtains the transaction request information sent by each node.
  • the transaction request information between each node and the third-party trusted node is transmitted through semi-homomorphic encryption.
  • performing federated learning for each node participating in the secure transaction during the transaction process includes:
  • the computer device is used as a third-party trust node, and a federated learning model is established between the seller node, the buyer node, the accounting right node, and the third-party trust node to obtain the information in the secure transaction.
  • the model is transmitted to the third-party trust node; and the transaction results of the seller node, the buyer node, and the accounting right node are respectively transmitted to each node through the federated learning model.
  • the seller nodes, buyer nodes, and bookkeeping power nodes participating in the transaction cannot directly obtain the transaction results from each other, and can only obtain the transaction results through the third-party trust node through the jointly established federated learning model.
  • it solves the security problem and reduces In order to avoid the confirmation delay of synchronization verification, on the other hand, when the supervision department needs supervision, the supervision can be completed directly through the third-party trust node.
  • Step S102 Record the transaction request information, and verify the legality of the transaction request information.
  • the third-party trust node records the detailed transaction information of each transaction in the form of a block in the blockchain, and the transaction request information includes at least the transfer-in party, the transfer-out party, the transaction amount and the transfer-out party’s numbers sign.
  • the transaction request information also includes seller node information, buyer node information, and billing rights node information.
  • the third-party trust node further verifies the validity of the buyer node information, the seller node information, and the transaction request information.
  • the buyer node information includes at least the account balance of the buyer node.
  • the verification of the legality of the transaction request information by the third-party trust node is mainly to verify whether illegal information is hidden in the transaction information through a preset rule.
  • the third-party trust node judges whether the preset illegal information is hidden in the transaction information. When the illegal information is hidden in the transaction information, the transaction request information is illegal. When the illegal information is not hidden in the transaction information, the transaction request The information is legal.
  • the third-party trust node has the right to remove the participant node.
  • Step S103 Generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain.
  • the block in the blockchain at least includes a block header, transaction details, transaction counter, and block size.
  • the third-party trust node collects the transaction request information of each node, generates a transaction block and packs it into the block.
  • Step S104 Obtain and verify the accounting right transferred by the accounting right node.
  • the accounting right node obtains the accounting right
  • the accounting right is transferred to the third-party trusted node
  • the third-party trusted node verifies the accounting right according to preset rules Whether it is qualified or not, when the bookkeeping right is verified successfully, a reward is sent to the bookkeeping right node.
  • the reward is mainly divided into two parts.
  • One is the system reward after nodes compete for the right to keep accounts.
  • the initial reward is 50 BTC, which will decrease at a rate of 0.5 every four years; the second is the fee paid by each exchange; the fee is due to the slow transaction speed of Bitcoin, and you can take the initiative to pay more The handling fee to get priority trading rights.
  • the accounting right is the value after hashing by calculating a string consisting of the block version number, the hash value of the previous block, the merkle tree, the utc time, the difficulty target, and a random number. Compare this value with the value corresponding to the target difficulty, and the value less than the target difficulty is considered as qualified.
  • Step S105 Broadcast the ownership of the accounting rights in the block to each node in the transaction request information, so that each node can reach a consensus according to a preset consensus algorithm.
  • the consensus mechanism is the certificate to obtain the accounting right. Therefore, when the third-party trust node obtains the accounting right handed over by the accounting right node and is verified as qualified, it will request information from each node in the transaction (Seller node, buyer node, bookkeeping right node) broadcast the ownership of the bookkeeping right in the block to reach a consensus.
  • the consensus mechanism is essentially a consensus algorithm.
  • commonly used consensus algorithms include proof of work (POW), proof of stake (Proof of Stake, PoS), and authorized equity proof mechanism (Delegated Proof of Stake, DPoS), in this embodiment, the consensus algorithm is not limited.
  • Step S106 Verify the transaction request information through the accounting right, and when the verification is successful, notify each node to record the transaction information, and update the account information synchronously.
  • the third-party trusted node obtains the accounting right, the third-party trusted node verifies the transaction request information through the accounting right, and when the verification succeeds, notifies each node to record the transaction information and synchronize the account information. For example, the third-party trust node notifies the seller node and the buyer node to confirm that the transaction is successful, and notifies the seller node and the buyer node to synchronize the account balance.
  • Each node participating in a secure transaction enters the next competition for the right to keep accounts after synchronizing account information.
  • the corresponding summary information is obtained based on the transaction information. Specifically, the summary information is obtained by hashing the transaction information, for example, obtained by processing the sha256s algorithm.
  • the blockchain can ensure its security and fairness and transparency to users.
  • the user equipment can download the summary information from the blockchain to verify whether the transaction information has been tampered with.
  • the blockchain referred to in this example is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the verification and verification of the accounting right is performed by a third-party trusted node, which reduces the need for synchronization verification between the participating nodes after competing for the accounting right and after the accounting is completed in a secure transaction.
  • the confirmation delay is performed by a third-party trusted node, which reduces the need for synchronization verification between the participating nodes after competing for the accounting right and after the accounting is completed in a secure transaction.
  • federated learning is adopted, and the transaction information is verified by a third-party trusted node, replacing the traditional Hash+asymmetric encryption transmission method, which can solve the possible crackability of asymmetric encryption.
  • the blockchain secure transaction method proposed in the implementation of this application enables the federated learning to be combined with the blockchain in the secure transaction process, and all transaction records are recorded through a third-party trusted node.
  • the node where it is located no longer records all transaction records, which enhances privacy;
  • a third-party trusted node verifies transaction information to solve possible asymmetric encryption crackability issues;
  • the third-party trusted node confirms and verifies the accounting rights , Which reduces the confirmation delay required for synchronization verification between the participating nodes after they compete for the accounting right and after the accounting is completed in a secure transaction; add the legality verification of the transaction request information, so that the Under the circumstance, the regulatory agencies are allowed to intervene, which solves the problem that the existing technology cannot be supervised.
  • the blockchain secure transaction method provided in this example is based on the establishment of a federated learning model between the participants of the blockchain and computer equipment.
  • Each participant of the blockchain is connected to the federated learning model as a node,
  • computer equipment serves as a third-party trust node.
  • the information between nodes is not directly exchanged to ensure privacy. And each node only saves its own wallet and related transaction information.
  • the node's information is used to encrypt and transmit transaction information and has been used by the federated learning third-party trust node to verify its validity.
  • the third-party trust node is used to record the transaction information of all participants, verify the validity and legality of the transaction, and notify both parties of the transaction after the transaction is completed and store it in the transaction record.
  • the blockchain participants in the federated learning model must abide by several guidelines: First, when the amount of memory in the account of the node's participant changes, the third-party trust node in the federated learning model must be notified; second, the node's participation The party is not allowed to encode illegal information into the transaction information during the transaction, otherwise the third-party trust node has the right to remove the participant; third, under special circumstances (for example, under the policy of the regulatory authority), supervision is allowed.
  • the process of the blockchain secure transaction method is as follows:
  • a federated learning model is established based on the seller node, the buyer node, the bookkeeping right node and the third-party trust node.
  • S1 The seller node transmits the transaction information to a third-party trust node through semi-homomorphic encryption, and the third-party trust node records the transaction information and verifies the seller's node account balance and the legitimacy of the transaction information.
  • the third-party trust node records the detailed information of each transaction in the form of blocks in the blockchain (for example, the transferor and the transferor, the transfer amount, the digital signature of the transferor), and the third-party trust node Verifying the legitimacy of the transaction request information is mainly by verifying whether illegal information is hidden in the transaction information.
  • S2 Generate a transaction block according to the transaction information, and collect the transaction information of multiple nodes and pack it into a block of the blockchain.
  • the bookkeeping right node transfers the right to a third-party trust node, and the third-party trust node verifies whether the bookkeeping right is qualified. If it is verified that the bookkeeping right is qualified, the bookkeeping right node is rewarded.
  • the reward is mainly divided into two parts.
  • One is the system reward after nodes compete for the right to keep accounts.
  • the initial reward is 50 BTC, which will decrease at a rate of 0.5 every four years; the second is the fee paid by each exchange; the fee is due to the slow transaction speed of Bitcoin, and you can take the initiative to pay more The handling fee to get priority trading rights.
  • the accounting right is the value after hashing by calculating a string consisting of the block version number, the hash value of the previous block, the merkle tree, the utc time, the difficulty target, and a random number. Compare this value with the value corresponding to the target difficulty, and the value less than the target difficulty is considered as qualified.
  • the third-party trust node broadcasts the ownership of the bookkeeping rights of the block to the seller node, the buyer node, and the bookkeeping node, and reaches a consensus through a preset consensus algorithm;
  • the third-party trust node After the third-party trust node obtains the bookkeeping right, it verifies the transaction information through the bookkeeping right, and after verifying the transaction is successful, notifies the seller node, the buyer node, and the bookkeeping right node to record the transaction information and update each Account balance.
  • the third-party trust node separately obtains the transaction results of the seller node, the buyer node, and the bookkeeping right node in the secure transaction, wherein the seller node, the buyer node, and the bookkeeping right
  • the nodes respectively transmit the results of the secure transaction to the third-party trust node through the federated learning model; and send the transaction results of the seller node, the buyer node, and the bookkeeping node through the federated learning
  • the model is transmitted to each node separately.
  • the federated learning is combined with the blockchain to enhance privacy and provide a foundation for the application of the blockchain in other fields.
  • the blockchain secure transaction method proposed in the implementation of this application makes the process of secure transactions , Combine federated learning and blockchain, record all transaction records through a third-party trusted node, and each participant’s node no longer records all transaction records, which enhances privacy; the third-party trusted node verifies transaction information and resolves There may be problems with the crackability of asymmetric encryption; the verification and verification of the accounting right through a third-party trusted node reduces the number of participating nodes in a secure transaction after they compete for the accounting right and after the accounting is completed.
  • the confirmation time delay required for synchronization verification; adding the verification of the legality of the transaction request information allows the supervision agency to intervene under certain circumstances, which solves the problem that supervision cannot be carried out in the prior art.
  • the second embodiment of the present application relates to a block diagram of a blockchain secure transaction system.
  • the blockchain secure transaction system can be divided into one or more program modules, one or more program modules are stored in a storage medium, and It is executed by one or more processors to complete the embodiments of the present application.
  • the program module referred to in the embodiment of the present application refers to a series of computer-readable instruction segments that can complete specific functions. The following description will specifically introduce the function of each program module in this embodiment.
  • the blockchain secure transaction system 300 may include a collection module 310, a recording module 320, a packaging module 330, a distribution module 340, a broadcasting module 350, and a synchronization module 360, among which:
  • the collection module 310 is configured to collect transaction request information of various nodes participating in a secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
  • the recording module 320 is used to record the transaction request information and verify the legitimacy of the transaction request information
  • the packaging module 330 is configured to generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
  • the issuing module 340 is configured to obtain and verify the bookkeeping right transferred by the bookkeeping right node, and when the bookkeeping right is verified to be qualified, issue a reward to the bookkeeping right node;
  • the broadcasting module 350 is configured to broadcast to each node in the transaction request information the attribution status of the accounting right after verification in the block, so that each node can reach a consensus mechanism;
  • the synchronization module 360 is configured to verify the transaction request information through the accounting right, and when the verification is successful, notify each node to record the transaction request information, and synchronize the account information of each node.
  • the issuing module is further configured to: verify whether the bookkeeping right transferred by the bookkeeping right node is qualified according to a preset rule; when the bookkeeping right is qualified, issue a reward to the bookkeeping right node.
  • the recording module is further configured to: determine whether preset illegal information is hidden in the transaction information; when the preset illegal information is hidden in the transaction information, verify that the transaction information is legal; If the preset illegal information is not hidden in the transaction information, it is verified that the transaction information is illegal.
  • a federated learning model establishment module configured to: use the computer device as a third-party trust node; based on the seller node, the buyer node, the accounting right node, and the third-party trust node Establish a federated learning model; obtain the transaction results of the seller node, the buyer node, and the billing authority node in the secure transaction respectively, where the seller node, the buyer node, and the billing node
  • the right node respectively transmits the result of the secure transaction to the third-party trust node through the federated learning model; and transmits the transaction result of the seller node, the buyer node, and the bookkeeping right node through the federation
  • the learning models are transmitted to each other respectively.
  • the third embodiment of the present application relates to a computer device. As shown in FIG. 4, it is a schematic diagram of the hardware architecture of the computer device suitable for the blockchain secure transaction method of the present application.
  • the computer device 400 is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
  • it can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of multiple servers).
  • the computer device 400 at least includes but is not limited to: a memory 410, a processor 420, and a network interface 430 that can communicate with each other via a system bus. in:
  • the memory 410 includes at least one type of readable storage medium.
  • the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory ( SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the memory 410 may be an internal storage module of the computer device 400, such as a hard disk or memory of the computer device 400.
  • the memory 410 may also be an external storage device of the computer device 400, such as a plug-in hard disk equipped on the computer device 400, a smart memory card (Smart Media Card, referred to as SMC), Secure Digital (Secure Digital, abbreviated as SD) card, flash memory card (Flash Card) and so on.
  • the memory 410 may also include both an internal storage module of the computer device 400 and an external storage device thereof.
  • the memory 410 is generally used to store the operating system and various application software installed in the computer device 400, such as the program code of the blockchain secure transaction method.
  • the memory 410 may also be used to temporarily store various types of data that have been output or will be output.
  • the processor 420 may be a central processing unit (Central Processing Unit, CPU for short), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 420 is generally used to control the overall operation of the computer device 400, for example, to perform data interaction or communication-related control and processing with the computer device 400.
  • the processor 420 is configured to run program codes stored in the memory 410 or process data.
  • the network interface 430 may include a wireless network interface or a wired network interface, and the network interface 430 is generally used to establish a communication link between the computer device 400 and other computer devices.
  • the network interface 430 is used to connect the computer device 400 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 400 and the external terminal.
  • the network can be an enterprise intranet (Intranet), the Internet (Internet), global mobile communication system (Global System of Mobile communication, GSM for short), Wideband Code Division Multiple Access (WCDMA for short), 4G network, 5G network, Bluetooth, Wi-Fi and other wireless or wired networks.
  • FIG. 4 only shows a computer device with components 410-430, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
  • the blockchain secure transaction method stored in the memory 410 can also be divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 420). To complete this application.
  • the memory 410 stores instructions that can be executed by the at least one processor 420, and the instructions are executed by the at least one processor 420, so that the at least one processor 420 can execute the following steps:
  • Collect transaction request information of each node participating in a secure transaction the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
  • each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
  • the transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
  • the computer device proposed in the implementation of this application serves as a third-party trust node outside the buyer and seller in a secure transaction, so that in the secure transaction process, federated learning is combined with the blockchain, and the third-party trust node All transaction records are recorded.
  • the node where each participant is located no longer records all transaction records, which strengthens privacy; third-party trusted nodes verify transaction information and solve possible asymmetric encryption crackability issues; through a third party
  • the trusted node performs the confirmation verification of the accounting right, which reduces the confirmation delay required for the synchronization verification between the participating nodes after competing for the accounting right and after the accounting is completed in a secure transaction; join the transaction request.
  • the embodiment of the present application also provides a computer-readable storage medium that stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the following steps are implemented:
  • Collect transaction request information of each node participating in a secure transaction the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
  • each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
  • the transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the readable storage medium includes flash memory, hard disk, multimedia card, card type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electronic Erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the readable storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device.
  • the readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, referred to as SMC), and a secure digital (Secure Digital) equipped on the computer device. Digital, abbreviated as SD) card, flash card (Flash Card), etc.
  • the readable storage medium may also include both the internal storage unit and the external storage device of the computer device.
  • the readable storage medium is generally used to store the operating system and various application software installed in the computer device, such as the program code of the data processing method based on the QUIC protocol stack in the embodiment.
  • the readable storage medium can also be used to temporarily store various types of data that have been output or will be output.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal device (which can be a mobile phone, a computer, a mobile terminal, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
  • a terminal device which can be a mobile phone, a computer, a mobile terminal, an air conditioner, or a network device, etc.

Abstract

A blockchain secure transaction method, comprising: collecting transaction request information of each node participating in a secure transaction (S101); recording the transaction request information, and verifying the validity of the transaction request information (S102); generating a transaction block according to the transaction request information, and packaging the transaction block into a block of a blockchain (S103); obtaining and verifying a bookkeeping right transferred by a bookkeeping right node (S104); broadcasting the attribution of the verified bookkeeping right in the block to each node in the transaction request information, so that the various nodes reach a consensus according to a preset consensus algorithm (S105); verifying the transaction request information by means of the bookkeeping right, and when the verification is successful, notifying each node to record the transaction request information, and synchronously updating account information of each node (S106). The blockchain secure transaction method can be used to solve problems in the existing technology such as prolonged transaction data confirmation times, tamperproof illegal information, poor security, and inadequate privacy.

Description

区块链安全交易方法、计算机设备及可读存储介质Block chain safe transaction method, computer equipment and readable storage medium
本申请申明202年07月30日递交的申请号为202010752626.3、名称为“区块链安全交易方法、计算机设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application affirms the priority of the Chinese patent application with the application number 202010752626.3 and titled "Blockchain secure transaction method, computer equipment and readable storage medium" filed on July 30, 202, the entire content of which is incorporated herein by reference Applying.
技术领域Technical field
本申请实施例涉及区块链技术领域,特别涉及一种区块链安全交易方法、计算机设备及可读存储介质。The embodiments of the present application relate to the field of blockchain technology, and in particular to a blockchain secure transaction method, computer equipment, and readable storage medium.
背景技术Background technique
区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。当前阶段下,基于区块链技术的产业已经初步形成,但区块链仍然面临着许多技术上的瓶颈。比特币是广为人知的基于区块链技术的应用,具有去中心化、集体维护、信息不可篡改和无须信任系统等优点。但发明人发现比特币在应用中也体现了区块链技术存在的缺点和挑战,主要体现在:Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. At the current stage, an industry based on blockchain technology has initially taken shape, but the blockchain still faces many technical bottlenecks. Bitcoin is a well-known application based on blockchain technology, which has the advantages of decentralization, collective maintenance, information that cannot be tampered with, and no trust system. However, the inventor found that Bitcoin also embodies the shortcomings and challenges of blockchain technology in its application, which are mainly reflected in:
(1)高度去中心化的背景下,鼓励所有参与者保存完整的备份,这对普通用户来说是一种负担,同时,这种模式导致所有的交易记录对所有参与者透明;(1) In the context of a high degree of decentralization, all participants are encouraged to keep complete backups, which is a burden for ordinary users. At the same time, this model makes all transaction records transparent to all participants;
(2)交易的结果需要所有节点核对,数据确认时延长;(2) The result of the transaction needs to be checked by all nodes, and the data confirmation will be extended;
(3)采用Hash+非对称加密的方式,随着未来计算能力的发展,非对称加密方式存在可破解性;(3) The Hash+ asymmetric encryption method is adopted. With the development of future computing capabilities, the asymmetric encryption method is crackable;
(4)区块链去中心化的思想,淡化了国家的监管,且由于区块链信息的不可篡改性,违法信息写入后将永久保存。(4) The idea of decentralization of the blockchain has diluted the national supervision, and due to the immutability of blockchain information, illegal information will be permanently stored after being written.
发明内容Summary of the invention
本申请实施方式的目的在于提供一种区块链安全交易方法,能够解决现有技术中存在的上述问题。The purpose of the embodiments of the present application is to provide a blockchain secure transaction method, which can solve the above-mentioned problems in the prior art.
为解决上述技术问题,本申请的实施方式提供了一种区块链安全交易方法,应用于计算机设备,包括:收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;记录所述交易请求信息,验证所述交易请求信息的合法性;根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;获得并且验证所述记账权节点转交的记账权;向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点按照预设的共识算法达成共识;通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步更新各个节点的账户信息。In order to solve the above technical problems, the implementation of the present application provides a blockchain secure transaction method, which is applied to computer equipment, including: collecting transaction request information of each node participating in a secure transaction, and the nodes participating in the secure transaction Including seller nodes, buyer nodes, and billing rights nodes; record the transaction request information, verify the legitimacy of the transaction request information; generate transaction blocks based on the transaction request information, and package the transaction blocks into the blockchain Block; obtain and verify the accounting right transferred by the accounting right node; broadcast to each node in the transaction request information the ownership of the accounting right after verification in the block, so that all Each node reaches a consensus according to a preset consensus algorithm; the transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
本申请的实施方式还提供了一种区块链安全交易系统,包括:The implementation of this application also provides a blockchain secure transaction system, including:
收集模块,用于收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;The collection module is used to collect transaction request information of each node participating in a secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
记录模块,用于记录所述交易请求信息,验证所述交易请求信息的合法性;The recording module is used to record the transaction request information and verify the legality of the transaction request information;
打包模块,用于根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;The packaging module is used to generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
发放模块,用于获得并且验证所述记账权节点转交的记账权,当所述记账权验证合格后,发放奖励给所述记账权节点;The issuing module is used to obtain and verify the bookkeeping right transferred by the bookkeeping right node, and when the bookkeeping right is verified to be qualified, issue a reward to the bookkeeping right node;
广播模块,用于向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点达成共识机制;A broadcasting module, configured to broadcast to each node in the transaction request information the attribution status of the accounting right after verification in the block, so that each node can reach a consensus mechanism;
同步模块,用于通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步各个节点的账户信息。The synchronization module is used to verify the transaction request information through the accounting right, and when the verification is successful, notify each node to record the transaction request information, and synchronize the account information of each node.
本申请的实施方式还提供了一种计算机设备,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述计算机可读指令被处理器执行时实现以下步骤:The embodiment of the present application also provides a computer device that includes a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor. The computer-readable instructions When executed by the processor, the following steps are implemented:
收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;Collect transaction request information of each node participating in a secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
记录所述交易请求信息,验证所述交易请求信息的合法性;Record the transaction request information and verify the legitimacy of the transaction request information;
根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;Generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
获得并且验证所述记账权节点转交的记账权;Obtain and verify the bookkeeping right forwarded by the bookkeeping right node;
向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点按照预设的共识算法达成共识;Broadcast to each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步更新各个节点的账户信息。The transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
本申请的实施方式还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机可读指令,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:The embodiment of the present application also provides a computer-readable storage medium having computer-readable instructions stored in the computer-readable storage medium, and the computer-readable instructions may be executed by at least one processor to enable the At least one processor performs the following steps:
收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;Collect transaction request information of each node participating in a secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
记录所述交易请求信息,验证所述交易请求信息的合法性;Record the transaction request information and verify the legitimacy of the transaction request information;
根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;Generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
获得并且验证所述记账权节点转交的记账权;Obtain and verify the bookkeeping right forwarded by the bookkeeping right node;
向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点按照预设的共识算法达成共识;Broadcast to each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步更新各个节点的账户信息。The transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
本申请实施方式中提出的区块链安全交易方法,使得安全交易过程中,将联邦学习与区块链结合,通过第三方信任节点记录所有的交易记录,各个参与方所在节点不再记录所有的交易记录,加强了隐私性;由第三方信任节点进行核验交易信息,解决可能存在的非对称加密的可破解性问题;通过第三方信任节点进行记账权的确认验证,减少了在安全交易中,参与的各个节点在争夺记账权后和记账完成后,相互之间进行同步验证时所需要的确认时延;加入交易请求信息的合法性验证,使得在特定的情况下,允许监管机构介入,解决了现有技术中无法进行监管的问题。The blockchain secure transaction method proposed in the implementation of this application enables the federated learning to be combined with the blockchain in the secure transaction process, and all transaction records are recorded through a third-party trusted node. The node where each participant is located no longer records all transactions. Transaction records enhance privacy; third-party trusted nodes will verify transaction information to solve possible asymmetric encryption crackability issues; third-party trusted nodes will confirm and verify the accounting rights, which reduces the number of secure transactions , After the participating nodes compete for the accounting right and after the accounting is completed, the confirmation delay required for the synchronization verification between each other; the legality verification of the transaction request information is added, so that under certain circumstances, the regulatory agency is allowed Intervention solves the problem that cannot be supervised in the existing technology.
附图说明Description of the drawings
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定。One or more embodiments are exemplified by the pictures in the corresponding drawings, and these exemplified descriptions do not constitute a limitation on the embodiments.
图1是根据本申请第一实施方式的区块链安全交易方法的流程示意图;Fig. 1 is a schematic flowchart of a blockchain secure transaction method according to the first embodiment of the present application;
图2是本申请第一实施例中区块链安全交易过程中各个节点的示意图;FIG. 2 is a schematic diagram of each node in the blockchain secure transaction process in the first embodiment of the present application;
图3是根据本申请第二实施方式的区块链安全交易系统的框图;Fig. 3 is a block diagram of a block chain secure transaction system according to the second embodiment of the present application;
图4是根据本申请适于区块链安全交易方法的计算机设备的硬件架构示意图。Fig. 4 is a schematic diagram of the hardware architecture of a computer device suitable for a blockchain secure transaction method according to the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施方式中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请所要求保护的技术方案。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the various embodiments of the present application will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the present application, many technical details are proposed in order to enable readers to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solution claimed in this application can be realized.
下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施方式中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。应当理解,此处所描述的具体实施方式仅用以解释本申请,并不用于限定本申请。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本申请保护的范围。When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary implementation manners do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the application as detailed in the appended claims. It should be understood that the specific implementations described here are only used to explain the application, and are not used to limit the application. Based on the implementation manners in this application, all other implementation manners obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
在本公开使用的术语是仅仅出于描述特定实施方式的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in the present disclosure are only for the purpose of describing specific embodiments, and are not intended to limit the present disclosure. The singular forms of "a", "said" and "the" used in the present disclosure and appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and/or" as used herein refers to and includes any or all possible combinations of one or more associated listed items.
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determination".
在本申请的描述中,需要理解的是,步骤前的数字标号并不标识执行步骤的前后顺序,仅用于方便描述本申请及区别每一步骤,因此不能理解为对本申请的限制。In the description of this application, it should be understood that the numerical label before the steps does not identify the sequence of execution of the steps, but is only used to facilitate the description of the application and distinguish each step, and therefore cannot be construed as a limitation of the application.
本实施方式中的区块链安全交易方法的流程示意图如图1所示,该方法应用于计算机设备。The schematic flow diagram of the block chain secure transaction method in this embodiment is shown in FIG. 1, and the method is applied to computer equipment.
在本实施方式中,根据不同的需求,图1所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。In this embodiment, according to different requirements, the execution order of the steps in the flowchart shown in FIG. 1 can be changed, and some steps can be omitted.
步骤S101:收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点。Step S101: Collect transaction request information of each node participating in a secure transaction. The participating nodes in the secure transaction include a seller node, a buyer node, and an accounting authority node.
本实施例中,进行区块链安全交易时,将每个区块链的参与方都作为一个节点。节点间的信息不进行直接交流,保证各个节点间的隐私性。如图2所示为本申请第一实施例中区块链安全交易过程中各节点的示意图。In this embodiment, when performing blockchain security transactions, each participant of the blockchain is regarded as a node. The information between nodes is not directly communicated to ensure the privacy of each node. Figure 2 is a schematic diagram of each node in the blockchain secure transaction process in the first embodiment of the application.
本实施例中,区块链交易中卖方为卖方节点,区块链交易中买方为买方节点,区块链交易中记账权获得的端点为记账权节点。即,在本实施例中,安全交易中参与的节点包括卖方节点,买方节点,记账权节点。本实施例中,计算机设备相比于交易过程中的买卖方,作为买卖方外的第三方信任节点,或者第三方机构。下文中,为了清楚地说明本申请的技术方案,计算机设备均以第三方信任节点的形式进行叙述。In this embodiment, the seller in the blockchain transaction is the seller node, the buyer in the blockchain transaction is the buyer node, and the endpoint obtained by the accounting right in the blockchain transaction is the accounting right node. That is, in this embodiment, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes. In this embodiment, compared to the buyer and seller in the transaction process, the computer device serves as a third-party trust node or a third-party organization outside the buyer and seller. In the following, in order to clearly illustrate the technical solution of the present application, the computer equipment is described in the form of a third-party trusted node.
本实施例中,卖方节点,买方节点,记账权节点间均不能直接进行信息交流,只能与第三方信任节点进行信息互通。还包括:对所述安全交易中参与的各个节点在交易过程中均进行联邦学习。In this embodiment, the seller node, the buyer node, and the bookkeeping right node cannot directly exchange information, and can only exchange information with a third-party trusted node. It also includes: performing federated learning for each node participating in the secure transaction in the transaction process.
联邦学习(Federated Learning)是一种新兴的人工智能基础技术,其设计目标是在保障大数据交换时的信息安全、保护终端数据和个人数据隐私、保证合法合规的前提下,在多参与方或多计算结点之间开展高效率的机器学习,通过联邦学习,在模型训练和推理的过程中对交互数据进行加密运算,实现了高效、准确的共同使用各自的数据。Federated learning Learning) is an emerging basic artificial intelligence technology. Its design goal is to ensure information security during big data exchange, protect terminal data and personal data privacy, and ensure legal compliance. High-efficiency machine learning is carried out between the points. Through federated learning, the interactive data is encrypted during model training and inference, so as to realize the efficient and accurate common use of their respective data.
这样,安全交易过程中,各个参与方所在节点不再记录所有的交易记录,能够增强参与方的隐私性。因此,当发生区块链安全交易时,第三方信任节点获取各个节点发送的交易请求信息。另外,本实施例中,各个节点与第三方信任节点间的交易请求信息通过半同态加密进行传输。In this way, during the secure transaction process, the node where each participant is located no longer records all transaction records, which can enhance the privacy of the participants. Therefore, when a blockchain security transaction occurs, the third-party trust node obtains the transaction request information sent by each node. In addition, in this embodiment, the transaction request information between each node and the third-party trusted node is transmitted through semi-homomorphic encryption.
具体地,对所述安全交易中参与的各个节点在交易过程中均进行联邦学习包括:Specifically, performing federated learning for each node participating in the secure transaction during the transaction process includes:
将所述计算机设备作为第三方信任节点,基于所述卖方节点,所述买方节点,所述记账权节点以及所述第三方信任节点之间建立联邦学习模型,分别获取所述安全交易中所述卖方节点,所述买方节点,所述记账权节点的交易结果,其中,所述卖方节点,所述买方节点,所述记账权节点分别将所述安全交易的结果通过所述联邦学习模型传输给所述第三方信任节点;及将所述卖方节点,所述买方节点,所述记账权节点的交易结果通过所述联邦学习模型分别传输给各个节点。The computer device is used as a third-party trust node, and a federated learning model is established between the seller node, the buyer node, the accounting right node, and the third-party trust node to obtain the information in the secure transaction. The seller node, the buyer node, and the transaction result of the bookkeeping right node, wherein the seller node, the buyer node, and the bookkeeping right node respectively pass the result of the secure transaction through the federated learning The model is transmitted to the third-party trust node; and the transaction results of the seller node, the buyer node, and the accounting right node are respectively transmitted to each node through the federated learning model.
这样参与交易的卖方节点,买方节点,记账权节点均不能直接相互获取交易结果,只能通过联合建立的联邦学习模型透过第三方信任节点获取交易结果,一方面解决了安全性问题,减少了同步验证的确认时延,另一方面,当监管部门需要监管时,直接通过第三方信任节点就可以完成监管。In this way, the seller nodes, buyer nodes, and bookkeeping power nodes participating in the transaction cannot directly obtain the transaction results from each other, and can only obtain the transaction results through the third-party trust node through the jointly established federated learning model. On the one hand, it solves the security problem and reduces In order to avoid the confirmation delay of synchronization verification, on the other hand, when the supervision department needs supervision, the supervision can be completed directly through the third-party trust node.
步骤S102:记录所述交易请求信息,验证所述交易请求信息的合法性。Step S102: Record the transaction request information, and verify the legality of the transaction request information.
本实施例中,第三方信任节点以区块链中区块的形式记录每笔交易的详细交易信息,所述交易请求信息至少包括转入方、转出方、交易金额和转出方的数字签名。In this embodiment, the third-party trust node records the detailed transaction information of each transaction in the form of a block in the blockchain, and the transaction request information includes at least the transfer-in party, the transfer-out party, the transaction amount and the transfer-out party’s numbers sign.
具体地,交易请求信息还包括卖方节点信息,买方节点信息,记账权节点信息。第三方信任节点进一步验证买方节点信息、卖方节点信息,以及所述交易请求信息的合法性。其中,买方节点信息至少包括买方节点的账户余额。本实施例中,第三方信任节点验证交易请求信息的合法性主要是通过预设规则验证所述交易信息中是否隐藏了非法信息。第三方信任节点判断所述交易信息中是否隐藏了预设的非法信息,当交易信息中隐藏了非法信息,则该交易请求信息是非法的,当交易信息中未隐藏非法信息,则该交易请求信息是合法的。当交易过程中,交易请求信息中被编码了违法信息,第三方信任节点有权将该参与方节点剔除。Specifically, the transaction request information also includes seller node information, buyer node information, and billing rights node information. The third-party trust node further verifies the validity of the buyer node information, the seller node information, and the transaction request information. Among them, the buyer node information includes at least the account balance of the buyer node. In this embodiment, the verification of the legality of the transaction request information by the third-party trust node is mainly to verify whether illegal information is hidden in the transaction information through a preset rule. The third-party trust node judges whether the preset illegal information is hidden in the transaction information. When the illegal information is hidden in the transaction information, the transaction request information is illegal. When the illegal information is not hidden in the transaction information, the transaction request The information is legal. When illegal information is encoded in the transaction request information during the transaction, the third-party trust node has the right to remove the participant node.
鉴于此,从监管的角度来说,第三方信任节点的存在可以在交易发生前验证交易请求信息是否含有违法信息,因此,相比于现有技术,在必要的情况,本申请中允许特殊情况下对参与方进行监管,解决了现有技术中无法进行监管的问题。In view of this, from a regulatory perspective, the existence of a third-party trust node can verify whether the transaction request information contains illegal information before the transaction occurs. Therefore, compared with the prior art, when necessary, special circumstances are allowed in this application. Under supervision of the participants, the problem that supervision cannot be carried out in the existing technology is solved.
步骤S103:根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中。Step S103: Generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain.
本实施例中,所述区块链中区块至少包括区块头、交易详情、交易计数器和区块大小。第三方信任节点收集各个节点的交易请求信息,产生交易块后打包到区块中。In this embodiment, the block in the blockchain at least includes a block header, transaction details, transaction counter, and block size. The third-party trust node collects the transaction request information of each node, generates a transaction block and packs it into the block.
步骤S104:获得并且验证所述记账权节点转交的记账权。Step S104: Obtain and verify the accounting right transferred by the accounting right node.
本实施例中,因为各个节点间信息不互通,因此,当记账权节点获得记账权后将记账权移交给第三方信任节点,由第三方信任节点按照预设规则验证该记账权是否合格,当该记账权验证成功后,发送奖励给该记账权节点。In this embodiment, because the information between the various nodes is not interoperable, when the accounting right node obtains the accounting right, the accounting right is transferred to the third-party trusted node, and the third-party trusted node verifies the accounting right according to preset rules Whether it is qualified or not, when the bookkeeping right is verified successfully, a reward is sent to the bookkeeping right node.
举个例子,以比特币为例,奖励主要分两部分,一是节点争夺到记账权后的系统奖励。从2008年起的初始奖励是50BTC,每四年以0.5的倍率递减;二是每一笔交易所付出的手续费;手续费的出现是因为比特币的交易速度慢,可以主动提出支付更多的手续费来获得优先的交易权。另外,比特币中,记账权是通过计算由区块版本号、前一区块Hash值、merkle树、utc时间、难度目标以及随机数组成的字符串,进行Hash后的值。将该值与目标难度对应的数值对比,小于目标难度的数值则认为记账权合格。For example, taking Bitcoin as an example, the reward is mainly divided into two parts. One is the system reward after nodes compete for the right to keep accounts. Starting from 2008, the initial reward is 50 BTC, which will decrease at a rate of 0.5 every four years; the second is the fee paid by each exchange; the fee is due to the slow transaction speed of Bitcoin, and you can take the initiative to pay more The handling fee to get priority trading rights. In addition, in Bitcoin, the accounting right is the value after hashing by calculating a string consisting of the block version number, the hash value of the previous block, the merkle tree, the utc time, the difficulty target, and a random number. Compare this value with the value corresponding to the target difficulty, and the value less than the target difficulty is considered as qualified.
步骤S105:向所述交易请求信息中各个节点广播所述区块中所述记账权的归属情况,以使所述各个节点按照预设的共识算法达成共识。Step S105: Broadcast the ownership of the accounting rights in the block to each node in the transaction request information, so that each node can reach a consensus according to a preset consensus algorithm.
在区块链技术中,共识机制是获得记账权的凭证,因此,当第三方信任节点获得记账权节点移交的记账权,且验证为合格后,向所述交易请求信息中各个节点(卖方节点,买方节点,记账权节点)广播所述区块中所述记账权的归属情况,达成共识。共识机制本质上为共识算法。现有技术中,常用的共识算法有工作量证明机制(Proof of Work, POW), 股权证明机制(Proof of Stake, PoS), 授权股权证明机制(Delegated Proof of Stake, DPoS),本实施例中,并不对共识算法作限定。In the blockchain technology, the consensus mechanism is the certificate to obtain the accounting right. Therefore, when the third-party trust node obtains the accounting right handed over by the accounting right node and is verified as qualified, it will request information from each node in the transaction (Seller node, buyer node, bookkeeping right node) broadcast the ownership of the bookkeeping right in the block to reach a consensus. The consensus mechanism is essentially a consensus algorithm. In the prior art, commonly used consensus algorithms include proof of work (POW), proof of stake (Proof of Stake, PoS), and authorized equity proof mechanism (Delegated Proof of Stake, DPoS), in this embodiment, the consensus algorithm is not limited.
步骤S106:通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易信息,并同步更新账户信息。Step S106: Verify the transaction request information through the accounting right, and when the verification is successful, notify each node to record the transaction information, and update the account information synchronously.
达成共识机制后,第三方信任节点获得记账权,第三方信任节点通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易信息,并同步账户信息。例如,第三方信任节点通知卖方节点与买方节点确认交易成功,且通知卖方节点与买方节点同步账户余额。而安全交易中参与的各个节点则在同步账户信息后进入下一次记账权的争夺。基于所述交易信息得到对应的摘要信息,具体来说,摘要信息由所述交易信息进行散列处理得到,比如利用sha256s算法处理得到。将摘要信息上传至区块链可保证其安全性和对用户的公正透明性。用户设备可以从区块链中下载得该摘要信息,以便查证所述交易信息是否被篡改。本示例所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。After the consensus mechanism is reached, the third-party trusted node obtains the accounting right, the third-party trusted node verifies the transaction request information through the accounting right, and when the verification succeeds, notifies each node to record the transaction information and synchronize the account information. For example, the third-party trust node notifies the seller node and the buyer node to confirm that the transaction is successful, and notifies the seller node and the buyer node to synchronize the account balance. Each node participating in a secure transaction enters the next competition for the right to keep accounts after synchronizing account information. The corresponding summary information is obtained based on the transaction information. Specifically, the summary information is obtained by hashing the transaction information, for example, obtained by processing the sha256s algorithm. Uploading summary information to the blockchain can ensure its security and fairness and transparency to users. The user equipment can download the summary information from the blockchain to verify whether the transaction information has been tampered with. The blockchain referred to in this example is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
本实施例中,通过第三方信任节点进行记账权的确认验证,减少了在安全交易中,参与的各个节点在争夺记账权后和记账完成后,相互之间进行同步验证时所需要的确认时延。In this embodiment, the verification and verification of the accounting right is performed by a third-party trusted node, which reduces the need for synchronization verification between the participating nodes after competing for the accounting right and after the accounting is completed in a secure transaction. The confirmation delay.
另外,本实施例中,采用联邦学习,且由第三方信任节点进行核验交易信息,替换传统Hash+非对称加密传输的方式,可以解决可能存在的非对称加密的可破解性。In addition, in this embodiment, federated learning is adopted, and the transaction information is verified by a third-party trusted node, replacing the traditional Hash+asymmetric encryption transmission method, which can solve the possible crackability of asymmetric encryption.
与现有技术相比,本申请实施方式中提出的区块链安全交易方法,使得安全交易过程中,将联邦学习与区块链结合,通过第三方信任节点记录所有的交易记录,各个参与方所在节点不再记录所有的交易记录,加强了隐私性;由第三方信任节点进行核验交易信息,解决可能存在的非对称加密的可破解性问题;通过第三方信任节点进行记账权的确认验证,减少了在安全交易中,参与的各个节点在争夺记账权后和记账完成后,相互之间进行同步验证时所需要的确认时延;加入交易请求信息的合法性验证,使得在特定的情况下,允许监管机构介入,解决了现有技术中无法进行监管的问题。Compared with the prior art, the blockchain secure transaction method proposed in the implementation of this application enables the federated learning to be combined with the blockchain in the secure transaction process, and all transaction records are recorded through a third-party trusted node. The node where it is located no longer records all transaction records, which enhances privacy; a third-party trusted node verifies transaction information to solve possible asymmetric encryption crackability issues; the third-party trusted node confirms and verifies the accounting rights , Which reduces the confirmation delay required for synchronization verification between the participating nodes after they compete for the accounting right and after the accounting is completed in a secure transaction; add the legality verification of the transaction request information, so that the Under the circumstance, the regulatory agencies are allowed to intervene, which solves the problem that the existing technology cannot be supervised.
上面各种方法的步骤划分,只是为了描述清楚,并不对步骤执行的先后顺序进行限定,而且实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The division of steps in the various methods above is only for clarity of description, and does not limit the order in which the steps are performed. In addition, it can be combined into one step or some steps can be split into multiple steps, as long as the same steps are included. The logical relationships are all within the scope of protection of this patent; the addition of insignificant modifications to the algorithm or process or the introduction of insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
为了使得本申请便于理解,以下提供一个具体示例:In order to facilitate the understanding of this application, a specific example is provided below:
本示例提供的区块链安全交易方法,基于区块链的参与方以及计算机设备之间建立联邦学习模型,每个区块链的参与方都接入到联邦学习的模型中,作为一个节点,计算机设备作为第三方信任机构,则作为第三方信任节点。节点之间的信息不进行直接交流,保证隐私性。且每个节点仅保存与自己的钱包和相关的交易信息。节点的信息用于加密传输交易信息已经供联邦学习第三方信任节点验证有效性。第三方信任节点用于记录所有参与者的交易信息,核实交易的有效性和合法性,并在交易完成后对交易双方进行通知并存入交易记录。联邦学习模型中的区块链参与方必须遵守几个准则:第一,当节点的参与方的账户内存量发生变化时,需告知联邦学习模型中的第三方信任节点;第二,节点的参与方在交易过程中不允许将违法信息编码至交易信息中,否则第三方信任节点有权将该参与方剔除;第三,在特殊情况下(例如监管部门的政策下),允许监管。The blockchain secure transaction method provided in this example is based on the establishment of a federated learning model between the participants of the blockchain and computer equipment. Each participant of the blockchain is connected to the federated learning model as a node, As a third-party trust institution, computer equipment serves as a third-party trust node. The information between nodes is not directly exchanged to ensure privacy. And each node only saves its own wallet and related transaction information. The node's information is used to encrypt and transmit transaction information and has been used by the federated learning third-party trust node to verify its validity. The third-party trust node is used to record the transaction information of all participants, verify the validity and legality of the transaction, and notify both parties of the transaction after the transaction is completed and store it in the transaction record. The blockchain participants in the federated learning model must abide by several guidelines: First, when the amount of memory in the account of the node's participant changes, the third-party trust node in the federated learning model must be notified; second, the node's participation The party is not allowed to encode illegal information into the transaction information during the transaction, otherwise the third-party trust node has the right to remove the participant; third, under special circumstances (for example, under the policy of the regulatory authority), supervision is allowed.
区块链安全交易方法的流程如下:The process of the blockchain secure transaction method is as follows:
S0.在各方节点完成了记账权的争夺后,基于卖方节点,买方节点,记账权节点以及第三方信任节点之间建立联邦学习模型。S0. After all nodes have completed the competition for the bookkeeping right, a federated learning model is established based on the seller node, the buyer node, the bookkeeping right node and the third-party trust node.
S1,卖方节点将交易信息通过半同态加密传输至第三方信任节点,第三方信任节点记录该交易信息并验证卖方节点账户余额、交易信息合法性等。S1: The seller node transmits the transaction information to a third-party trust node through semi-homomorphic encryption, and the third-party trust node records the transaction information and verifies the seller's node account balance and the legitimacy of the transaction information.
其中,第三方信任节点以区块链中区块的形式记录每笔交易的详细信息(例如,转入方和转出方、转账金额、转出方的数字签名),另外,第三方信任节点验证交易请求信息的合法性主要是通过验证所述交易信息中是否隐藏了非法信息。S2,根据该交易信息产生交易块,且将多个节点的交易信息收集,打包至区块链的区块中。Among them, the third-party trust node records the detailed information of each transaction in the form of blocks in the blockchain (for example, the transferor and the transferor, the transfer amount, the digital signature of the transferor), and the third-party trust node Verifying the legitimacy of the transaction request information is mainly by verifying whether illegal information is hidden in the transaction information. S2: Generate a transaction block according to the transaction information, and collect the transaction information of multiple nodes and pack it into a block of the blockchain.
S3.记账权节点将权利转交第三方信任节点,并由第三方信任节点验证该记账权是否合格,若验证该记账权合格,则记账权节点获得奖励。S3. The bookkeeping right node transfers the right to a third-party trust node, and the third-party trust node verifies whether the bookkeeping right is qualified. If it is verified that the bookkeeping right is qualified, the bookkeeping right node is rewarded.
举个例子,以比特币为例,奖励主要分两部分,一是节点争夺到记账权后的系统奖励。从2008年起的初始奖励是50BTC,每四年以0.5的倍率递减;二是每一笔交易所付出的手续费;手续费的出现是因为比特币的交易速度慢,可以主动提出支付更多的手续费来获得优先的交易权。另外,比特币中,记账权是通过计算由区块版本号、前一区块Hash值、merkle树、utc时间、难度目标以及随机数组成的字符串,进行Hash后的值。将该值与目标难度对应的数值对比,小于目标难度的数值则认为记账权合格。For example, taking Bitcoin as an example, the reward is mainly divided into two parts. One is the system reward after nodes compete for the right to keep accounts. Starting from 2008, the initial reward is 50 BTC, which will decrease at a rate of 0.5 every four years; the second is the fee paid by each exchange; the fee is due to the slow transaction speed of Bitcoin, and you can take the initiative to pay more The handling fee to get priority trading rights. In addition, in Bitcoin, the accounting right is the value after hashing by calculating a string consisting of the block version number, the hash value of the previous block, the merkle tree, the utc time, the difficulty target, and a random number. Compare this value with the value corresponding to the target difficulty, and the value less than the target difficulty is considered as qualified.
S4,第三方信任节点向卖方节点,买方节点,记账权节点广播此次区块的记账权的归属情况,通过预设的共识算法达成共识;S4, the third-party trust node broadcasts the ownership of the bookkeeping rights of the block to the seller node, the buyer node, and the bookkeeping node, and reaches a consensus through a preset consensus algorithm;
S5,第三方信任节点获得记账权后,通过所述记账权验证交易信息,且在验证交易成功后,通知卖方节点,买方节点,记账权节点记录此次交易信息,并同步更新各自的账户余额。其中,第三方信任节点分别获取所述安全交易中所述卖方节点,所述买方节点,所述记账权节点的交易结果,其中,所述卖方节点,所述买方节点,所述记账权节点分别将所述安全交易的结果通过所述联邦学习模型传输给所述第三方信任节点;及将所述卖方节点,所述买方节点,所述记账权节点的交易结果通过所述联邦学习模型分别传输给各个节点。S5: After the third-party trust node obtains the bookkeeping right, it verifies the transaction information through the bookkeeping right, and after verifying the transaction is successful, notifies the seller node, the buyer node, and the bookkeeping right node to record the transaction information and update each Account balance. Wherein, the third-party trust node separately obtains the transaction results of the seller node, the buyer node, and the bookkeeping right node in the secure transaction, wherein the seller node, the buyer node, and the bookkeeping right The nodes respectively transmit the results of the secure transaction to the third-party trust node through the federated learning model; and send the transaction results of the seller node, the buyer node, and the bookkeeping node through the federated learning The model is transmitted to each node separately.
本实施例中,将联邦学习与区块链结合,加强了隐私性,为区块链在其他领域的应用提供基础,本申请实施方式中提出的区块链安全交易方法,使得安全交易过程中,将联邦学习与区块链结合,通过第三方信任节点记录所有的交易记录,各个参与方所在节点不再记录所有的交易记录,加强了隐私性;由第三方信任节点进行核验交易信息,解决可能存在的非对称加密的可破解性问题;通过第三方信任节点进行记账权的确认验证,减少了在安全交易中,参与的各个节点在争夺记账权后和记账完成后,相互之间进行同步验证时所需要的确认时延;加入交易请求信息的合法性验证,使得在特定的情况下,允许监管机构介入,解决了现有技术中无法进行监管的问题。In this embodiment, the federated learning is combined with the blockchain to enhance privacy and provide a foundation for the application of the blockchain in other fields. The blockchain secure transaction method proposed in the implementation of this application makes the process of secure transactions , Combine federated learning and blockchain, record all transaction records through a third-party trusted node, and each participant’s node no longer records all transaction records, which enhances privacy; the third-party trusted node verifies transaction information and resolves There may be problems with the crackability of asymmetric encryption; the verification and verification of the accounting right through a third-party trusted node reduces the number of participating nodes in a secure transaction after they compete for the accounting right and after the accounting is completed. The confirmation time delay required for synchronization verification; adding the verification of the legality of the transaction request information allows the supervision agency to intervene under certain circumstances, which solves the problem that supervision cannot be carried out in the prior art.
本申请第二实施方式涉及一种区块链安全交易系统的框图,该区块链安全交易系统可以被分割成一个或多个程序模块,一个或者多个程序模块被存储于存储介质中,并由一个或多个处理器所执行,以完成本申请实施例。本申请实施例所称的程序模块是指能够完成特定功能的一系列计算机可读指令段,以下描述将具体介绍本实施例中各程序模块的功能。The second embodiment of the present application relates to a block diagram of a blockchain secure transaction system. The blockchain secure transaction system can be divided into one or more program modules, one or more program modules are stored in a storage medium, and It is executed by one or more processors to complete the embodiments of the present application. The program module referred to in the embodiment of the present application refers to a series of computer-readable instruction segments that can complete specific functions. The following description will specifically introduce the function of each program module in this embodiment.
如图3所示,该区块链安全交易系统300可以包括收集模块310、记录模块320、打包模块330、发放模块340、广播模块350和同步模块360,其中:As shown in FIG. 3, the blockchain secure transaction system 300 may include a collection module 310, a recording module 320, a packaging module 330, a distribution module 340, a broadcasting module 350, and a synchronization module 360, among which:
收集模块310,用于收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;The collection module 310 is configured to collect transaction request information of various nodes participating in a secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
记录模块320,用于记录所述交易请求信息,验证所述交易请求信息的合法性;The recording module 320 is used to record the transaction request information and verify the legitimacy of the transaction request information;
打包模块330,用于根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;The packaging module 330 is configured to generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
发放模块340,用于获得并且验证所述记账权节点转交的记账权,当所述记账权验证合格后,发放奖励给所述记账权节点;The issuing module 340 is configured to obtain and verify the bookkeeping right transferred by the bookkeeping right node, and when the bookkeeping right is verified to be qualified, issue a reward to the bookkeeping right node;
广播模块350,用于向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点达成共识机制;The broadcasting module 350 is configured to broadcast to each node in the transaction request information the attribution status of the accounting right after verification in the block, so that each node can reach a consensus mechanism;
同步模块360,用于通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步各个节点的账户信息。The synchronization module 360 is configured to verify the transaction request information through the accounting right, and when the verification is successful, notify each node to record the transaction request information, and synchronize the account information of each node.
优选地,所述发放模块还用于:按照预设规则验证所述记账权节点转交的记账权是否合格;当所述记账权合格时,发放奖励给所述记账权节点。Preferably, the issuing module is further configured to: verify whether the bookkeeping right transferred by the bookkeeping right node is qualified according to a preset rule; when the bookkeeping right is qualified, issue a reward to the bookkeeping right node.
优选地,所述记录模块还用于:判断所述交易信息中是否隐藏了预设的非法信息;当所述交易信息中隐藏了预设的非法信息,则验证所述交易信息为合法;当所述交易信息中未隐藏预设的非法信息,则验证所述交易信息不合法。Preferably, the recording module is further configured to: determine whether preset illegal information is hidden in the transaction information; when the preset illegal information is hidden in the transaction information, verify that the transaction information is legal; If the preset illegal information is not hidden in the transaction information, it is verified that the transaction information is illegal.
优选地,还包括:联邦学习模型建立模块,用于:将所述计算机设备作为第三方信任节点;基于所述卖方节点,所述买方节点,所述记账权节点以及所述第三方信任节点之间建立联邦学习模型;分别获取所述安全交易中所述卖方节点,所述买方节点,所述记账权节点的交易结果,其中,所述卖方节点,所述买方节点,所述记账权节点分别将所述安全交易的结果通过所述联邦学习模型传输给所述第三方信任节点;及将所述卖方节点,所述买方节点,所述记账权节点的交易结果通过所述联邦学习模型分别传输给对方。Preferably, it further includes: a federated learning model establishment module, configured to: use the computer device as a third-party trust node; based on the seller node, the buyer node, the accounting right node, and the third-party trust node Establish a federated learning model; obtain the transaction results of the seller node, the buyer node, and the billing authority node in the secure transaction respectively, where the seller node, the buyer node, and the billing node The right node respectively transmits the result of the secure transaction to the third-party trust node through the federated learning model; and transmits the transaction result of the seller node, the buyer node, and the bookkeeping right node through the federation The learning models are transmitted to each other respectively.
本申请第三实施方式涉及一种计算机设备,参阅图4所示,是本申请适于区块链安全交易方法的计算机设备的硬件架构示意图。The third embodiment of the present application relates to a computer device. As shown in FIG. 4, it is a schematic diagram of the hardware architecture of the computer device suitable for the blockchain secure transaction method of the present application.
本实施方式中,计算机设备400是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。例如,可以是智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图4所示,计算机设备400至少包括但不限于:可通过系统总线相互通信链接存储器410、处理器420、网络接口430。其中:In this embodiment, the computer device 400 is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions. For example, it can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of multiple servers). As shown in FIG. 4, the computer device 400 at least includes but is not limited to: a memory 410, a processor 420, and a network interface 430 that can communicate with each other via a system bus. in:
存储器410至少包括一种类型的可读存储介质,可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器410可以是计算机设备400的内部存储模块,例如该计算机设备400的硬盘或内存。在另一些实施例中,存储器410也可以是计算机设备400的外部存储设备,例如该计算机设备400上配备的插接式硬盘,智能存储卡(Smart Media Card,简称为SMC),安全数字(Secure Digital,简称为SD)卡,闪存卡(Flash Card)等。当然,存储器410还可以既包括计算机设备400的内部存储模块也包括其外部存储设备。本实施例中,存储器410通常用于存储安装于计算机设备400的操作系统和各类应用软件,例如区块链安全交易方法的程序代码等。此外,存储器410还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 410 includes at least one type of readable storage medium. The readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory ( SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc. In some embodiments, the memory 410 may be an internal storage module of the computer device 400, such as a hard disk or memory of the computer device 400. In other embodiments, the memory 410 may also be an external storage device of the computer device 400, such as a plug-in hard disk equipped on the computer device 400, a smart memory card (Smart Media Card, referred to as SMC), Secure Digital (Secure Digital, abbreviated as SD) card, flash memory card (Flash Card) and so on. Of course, the memory 410 may also include both an internal storage module of the computer device 400 and an external storage device thereof. In this embodiment, the memory 410 is generally used to store the operating system and various application software installed in the computer device 400, such as the program code of the blockchain secure transaction method. In addition, the memory 410 may also be used to temporarily store various types of data that have been output or will be output.
处理器420在一些实施例中可以是中央处理器(Central Processing Unit,简称为CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器420通常用于控制计算机设备400的总体操作,例如执行与计算机设备400进行数据交互或者通信相关的控制和处理等。本实施例中,处理器420用于运行存储器410中存储的程序代码或者处理数据。In some embodiments, the processor 420 may be a central processing unit (Central Processing Unit, CPU for short), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 420 is generally used to control the overall operation of the computer device 400, for example, to perform data interaction or communication-related control and processing with the computer device 400. In this embodiment, the processor 420 is configured to run program codes stored in the memory 410 or process data.
网络接口430可包括无线网络接口或有线网络接口,该网络接口430通常用于在计算机设备400与其他计算机设备之间建立通信链接。例如,网络接口430用于通过网络将计算机设备400与外部终端相连,在计算机设备400与外部终端之间的建立数据传输通道和通信链接等。网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,简称为GSM)、宽带码分多址(Wideband Code Division Multiple Access,简称为WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。The network interface 430 may include a wireless network interface or a wired network interface, and the network interface 430 is generally used to establish a communication link between the computer device 400 and other computer devices. For example, the network interface 430 is used to connect the computer device 400 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 400 and the external terminal. The network can be an enterprise intranet (Intranet), the Internet (Internet), global mobile communication system (Global System of Mobile communication, GSM for short), Wideband Code Division Multiple Access (WCDMA for short), 4G network, 5G network, Bluetooth, Wi-Fi and other wireless or wired networks.
需要指出的是,图4仅示出了具有部件410-430的计算机设备,但是应理解的是,并不要求实施所有示出的部件,可以替代的实施更多或者更少的部件。It should be pointed out that FIG. 4 only shows a computer device with components 410-430, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
在本实施例中,存储于存储器410中的区块链安全交易方法还可以被分割为一个或者多个程序模块,并由一个或多个处理器(本实施例为处理器420)所执行,以完成本申请。In this embodiment, the blockchain secure transaction method stored in the memory 410 can also be divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 420). To complete this application.
存储器410存储有可被至少一个处理器420执行的指令,指令被至少一个处理器420执行,以使至少一个处理器420能够执行以下步骤:The memory 410 stores instructions that can be executed by the at least one processor 420, and the instructions are executed by the at least one processor 420, so that the at least one processor 420 can execute the following steps:
收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;Collect transaction request information of each node participating in a secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
记录所述交易请求信息,验证所述交易请求信息的合法性;Record the transaction request information and verify the legitimacy of the transaction request information;
根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;Generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
获得并且验证所述记账权节点转交的记账权;Obtain and verify the bookkeeping right forwarded by the bookkeeping right node;
向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点按照预设的共识算法达成共识;Broadcast to each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步更新各个节点的账户信息。The transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
与现有技术相比,本申请实施方式中提出的计算机设备,作为安全交易参与买卖方外的第三方信任节点,使得安全交易过程中,将联邦学习与区块链结合,通过第三方信任节点记录所有的交易记录,各个参与方所在节点不再记录所有的交易记录,加强了隐私性;由第三方信任节点进行核验交易信息,解决可能存在的非对称加密的可破解性问题;通过第三方信任节点进行记账权的确认验证,减少了在安全交易中,参与的各个节点在争夺记账权后和记账完成后,相互之间进行同步验证时所需要的确认时延;加入交易请求信息的合法性验证,使得在特定的情况下,允许监管机构介入,解决了现有技术中无法进行监管的问题。Compared with the prior art, the computer device proposed in the implementation of this application serves as a third-party trust node outside the buyer and seller in a secure transaction, so that in the secure transaction process, federated learning is combined with the blockchain, and the third-party trust node All transaction records are recorded. The node where each participant is located no longer records all transaction records, which strengthens privacy; third-party trusted nodes verify transaction information and solve possible asymmetric encryption crackability issues; through a third party The trusted node performs the confirmation verification of the accounting right, which reduces the confirmation delay required for the synchronization verification between the participating nodes after competing for the accounting right and after the accounting is completed in a secure transaction; join the transaction request The verification of the legality of information allows regulatory agencies to intervene under certain circumstances, which solves the problem of inability to conduct supervision in the prior art.
本申请的实施方式还提供了一种计算机可读存储介质,存储有计算机可读指令,所述计算机可读指令被处理器执行时实现以下步骤:The embodiment of the present application also provides a computer-readable storage medium that stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the following steps are implemented:
收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;Collect transaction request information of each node participating in a secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
记录所述交易请求信息,验证所述交易请求信息的合法性;Record the transaction request information and verify the legitimacy of the transaction request information;
根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;Generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
获得并且验证所述记账权节点转交的记账权;Obtain and verify the bookkeeping right forwarded by the bookkeeping right node;
向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点按照预设的共识算法达成共识;Broadcast to each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步更新各个节点的账户信息。The transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
本实施例中,所述计算机可读存储介质可以是非易失性,也可以是易失性。所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,可读存储介质可以是计算机设备的内部存储单元,例如该计算机设备的硬盘或内存。在另一些实施例中,可读存储介质也可以是计算机设备的外部存储设备,例如该计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,简称为SMC),安全数字(Secure Digital,简称为SD)卡,闪存卡(Flash Card)等。当然,可读存储介质还可以既包括计算机设备的内部存储单元也包括其外部存储设备。本实施例中,可读存储介质通常用于存储安装于计算机设备的操作系统和各类应用软件,例如实施例中的基于QUIC协议栈的数据处理方法的程序代码等。此外,可读存储介质还可以用于暂时地存储已经输出或者将要输出的各类数据。In this embodiment, the computer-readable storage medium may be non-volatile or volatile. The readable storage medium includes flash memory, hard disk, multimedia card, card type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electronic Erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc. In some embodiments, the readable storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, referred to as SMC), and a secure digital (Secure Digital) equipped on the computer device. Digital, abbreviated as SD) card, flash card (Flash Card), etc. Of course, the readable storage medium may also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the readable storage medium is generally used to store the operating system and various application software installed in the computer device, such as the program code of the data processing method based on the QUIC protocol stack in the embodiment. In addition, the readable storage medium can also be used to temporarily store various types of data that have been output or will be output.
上述本申请实施方式序号仅仅为了描述,不代表实施方式的优劣。The serial numbers of the foregoing implementation manners of the present application are only for description, and do not represent the superiority or inferiority of the implementation manners.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施方式方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,移动终端,空调器,或者网络设备等)执行本申请各个实施方式所述的方法。Through the description of the above implementations, those skilled in the art can clearly understand that the above implementations can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal device (which can be a mobile phone, a computer, a mobile terminal, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
以上仅为本申请的优选实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly used in other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种区块链安全交易方法,应用于计算机设备,其中,所述方法包括:A blockchain secure transaction method applied to computer equipment, wherein the method includes:
    收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;Collect transaction request information of each node participating in the secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
    记录所述交易请求信息,验证所述交易请求信息的合法性;Record the transaction request information and verify the legitimacy of the transaction request information;
    根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;Generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
    获得并且验证所述记账权节点转交的记账权;Obtain and verify the bookkeeping right forwarded by the bookkeeping right node;
    向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点按照预设的共识算法达成共识;Broadcast to each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
    通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步更新各个节点的账户信息。The transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
  2. 根据权利要求1所述的区块链安全交易方法,其中,所述验证所述记账权节点转交的记账权包括:The blockchain secure transaction method according to claim 1, wherein the verification of the accounting right transferred by the accounting right node comprises:
    按照预设规则验证所述记账权节点转交的记账权是否合格;Verifying whether the bookkeeping right transferred by the bookkeeping right node is qualified according to preset rules;
    当所述记账权合格时,发放奖励给所述记账权节点。When the bookkeeping right is qualified, a reward is issued to the bookkeeping right node.
  3. 根据权利要求1所述的区块链安全交易方法,其中,所述验证所述交易信息的合法性,包括:The blockchain secure transaction method according to claim 1, wherein said verifying the legality of said transaction information comprises:
    判断所述交易信息中是否隐藏了预设的非法信息;Determine whether preset illegal information is hidden in the transaction information;
    当所述交易信息中隐藏了预设的非法信息,则验证所述交易信息为合法;When the preset illegal information is hidden in the transaction information, verify that the transaction information is legal;
    当所述交易信息中未隐藏预设的非法信息,则验证所述交易信息不合法。When the preset illegal information is not hidden in the transaction information, it is verified that the transaction information is illegal.
  4. 根据权利要求1所述的区块链安全交易方法,其中,还包括: The block chain secure transaction method according to claim 1, further comprising:
    将所述计算机设备作为第三方信任节点;Using the computer device as a third-party trust node;
    基于所述卖方节点,所述买方节点,所述记账权节点以及所述第三方信任节点之间建立联邦学习模型;Establishing a federated learning model based on the seller node, the buyer node, the billing authority node, and the third-party trust node;
    分别获取所述安全交易中所述卖方节点,所述买方节点,所述记账权节点的交易结果,其中,所述卖方节点,所述买方节点,所述记账权节点分别将所述安全交易的结果通过所述联邦学习模型传输给所述第三方信任节点;及Obtain the transaction results of the seller node, the buyer node, and the billing authority node in the secure transaction, respectively, wherein the seller node, the buyer node, and the billing authority node separately The result of the transaction is transmitted to the third-party trust node through the federated learning model; and
    将所述卖方节点,所述买方节点,所述记账权节点的交易结果通过所述联邦学习模型分别传输给对方。The transaction results of the seller node, the buyer node, and the bookkeeping right node are respectively transmitted to each other through the federated learning model.
  5. 根据权利要求1所述的区块链安全交易方法,其中,还包括: The block chain secure transaction method according to claim 1, further comprising:
    通过半同态加密对所述交易请求信息进行传输,所述交易请求信息至少包括转入方、转出方、交易金额和转出方的数字签名。The transaction request information is transmitted through semi-homomorphic encryption, and the transaction request information includes at least the transfer-in party, the transfer-out party, the transaction amount, and the digital signature of the transfer-out party.
  6. 一种区块链安全交易系统,其中,所述系统包括:A block chain secure transaction system, wherein the system includes:
    收集模块,用于收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;The collection module is used to collect transaction request information of each node participating in a secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
    记录模块,用于记录所述交易请求信息,验证所述交易请求信息的合法性;The recording module is used to record the transaction request information and verify the legality of the transaction request information;
    打包模块,用于根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;The packaging module is used to generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
    发放模块,用于获得并且验证所述记账权节点转交的记账权;Issuing module for obtaining and verifying the accounting right transferred by the accounting right node;
    广播模块,用于向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点达成共识机制;A broadcasting module, configured to broadcast to each node in the transaction request information the attribution status of the accounting right after verification in the block, so that each node can reach a consensus mechanism;
    同步模块,用于通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步各个节点的账户信息。The synchronization module is used to verify the transaction request information through the accounting right, and when the verification is successful, notify each node to record the transaction request information, and synchronize the account information of each node.
  7. 根据权利要求6所述的区块链安全交易系统,其中,所述发放模块还用于:The blockchain secure transaction system according to claim 6, wherein the issuing module is further used for:
    按照预设规则验证所述记账权节点转交的记账权是否合格;Verifying whether the bookkeeping right transferred by the bookkeeping right node is qualified according to preset rules;
    当所述记账权合格时,发放奖励给所述记账权节点。When the bookkeeping right is qualified, a reward is issued to the bookkeeping right node.
  8. 根据权利要求6所述的区块链安全交易系统,其中,所述记录模块还用于:The blockchain secure transaction system according to claim 6, wherein the recording module is further used for:
    判断所述交易信息中是否隐藏了预设的非法信息;Determine whether preset illegal information is hidden in the transaction information;
    当所述交易信息中隐藏了预设的非法信息,则验证所述交易信息为合法;When the preset illegal information is hidden in the transaction information, verify that the transaction information is legal;
    当所述交易信息中未隐藏预设的非法信息,则验证所述交易信息不合法。When the preset illegal information is not hidden in the transaction information, it is verified that the transaction information is illegal.
  9. 根据权利要求6所述的区块链安全交易系统,其中,还包括: The blockchain secure transaction system according to claim 6, further comprising:
    联邦学习模型建立模块,用于:The federated learning model building module is used to:
    将所述计算机设备作为第三方信任节点;Using the computer device as a third-party trust node;
    基于所述卖方节点,所述买方节点,所述记账权节点以及所述第三方信任节点之间建立联邦学习模型;Establishing a federated learning model based on the seller node, the buyer node, the billing authority node, and the third-party trust node;
    分别获取所述安全交易中所述卖方节点,所述买方节点,所述记账权节点的交易结果,其中,所述卖方节点,所述买方节点,所述记账权节点分别将所述安全交易的结果通过所述联邦学习模型传输给所述第三方信任节点;及Obtain the transaction results of the seller node, the buyer node, and the billing authority node in the secure transaction, respectively, wherein the seller node, the buyer node, and the billing authority node separately The result of the transaction is transmitted to the third-party trust node through the federated learning model; and
    将所述卖方节点,所述买方节点,所述记账权节点的交易结果通过所述联邦学习模型分别传输给对方。The transaction results of the seller node, the buyer node, and the bookkeeping right node are respectively transmitted to each other through the federated learning model.
  10. 根据权利要求6所述的区块链安全交易系统,其中,所述同步模块还用于: The blockchain secure transaction system according to claim 6, wherein the synchronization module is also used for:
    通过半同态加密对所述交易请求信息进行传输,所述交易请求信息至少包括转入方、转出方、交易金额和转出方的数字签名。The transaction request information is transmitted through semi-homomorphic encryption, and the transaction request information includes at least the transfer-in party, the transfer-out party, the transaction amount, and the digital signature of the transfer-out party.
  11. 一种计算机设备,其中,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述计算机可读指令被处理器执行时实现以下步骤:A computer device, wherein the computer device includes a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and the computer-readable instructions are implemented when the processor is executed The following steps:
    收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;Collect transaction request information of each node participating in the secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
    记录所述交易请求信息,验证所述交易请求信息的合法性;Record the transaction request information and verify the legitimacy of the transaction request information;
    根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;Generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
    获得并且验证所述记账权节点转交的记账权;Obtain and verify the bookkeeping right forwarded by the bookkeeping right node;
    向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点按照预设的共识算法达成共识;Broadcast to each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
    通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步更新各个节点的账户信息。The transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
  12. 根据权利要求11所述的计算机设备,其中,所述计算机可读指令被处理器执行时还实现以下步骤:The computer device according to claim 11, wherein the computer-readable instructions further implement the following steps when being executed by the processor:
    按照预设规则验证所述记账权节点转交的记账权是否合格;Verifying whether the bookkeeping right transferred by the bookkeeping right node is qualified according to preset rules;
    当所述记账权合格时,发放奖励给所述记账权节点。When the bookkeeping right is qualified, a reward is issued to the bookkeeping right node.
  13. 根据权利要求11所述的计算机设备,其中,所述计算机可读指令被处理器执行时还实现以下步骤:The computer device according to claim 11, wherein the computer-readable instructions further implement the following steps when being executed by the processor:
    判断所述交易信息中是否隐藏了预设的非法信息;Determine whether preset illegal information is hidden in the transaction information;
    当所述交易信息中隐藏了预设的非法信息,则验证所述交易信息为合法;When the preset illegal information is hidden in the transaction information, verify that the transaction information is legal;
    当所述交易信息中未隐藏预设的非法信息,则验证所述交易信息不合法。When the preset illegal information is not hidden in the transaction information, it is verified that the transaction information is illegal.
  14. 根据权利要求11所述的计算机设备,其中,所述计算机可读指令被处理器执行时还实现以下步骤: The computer device according to claim 11, wherein the computer-readable instructions further implement the following steps when being executed by the processor:
    将所述计算机设备作为第三方信任节点;Using the computer device as a third-party trust node;
    基于所述卖方节点,所述买方节点,所述记账权节点以及所述第三方信任节点之间建立联邦学习模型;Establishing a federated learning model based on the seller node, the buyer node, the billing authority node, and the third-party trust node;
    分别获取所述安全交易中所述卖方节点,所述买方节点,所述记账权节点的交易结果,其中,所述卖方节点,所述买方节点,所述记账权节点分别将所述安全交易的结果通过所述联邦学习模型传输给所述第三方信任节点;及Obtain the transaction results of the seller node, the buyer node, and the billing authority node in the secure transaction, respectively, wherein the seller node, the buyer node, and the billing authority node separately The result of the transaction is transmitted to the third-party trust node through the federated learning model; and
    将所述卖方节点,所述买方节点,所述记账权节点的交易结果通过所述联邦学习模型分别传输给对方。The transaction results of the seller node, the buyer node, and the bookkeeping right node are respectively transmitted to each other through the federated learning model.
  15. 根据权利要求11所述的计算机设备,其中,所述计算机可读指令被处理器执行时还实现以下步骤: The computer device according to claim 11, wherein the computer-readable instructions further implement the following steps when being executed by the processor:
    通过半同态加密对所述交易请求信息进行传输,所述交易请求信息至少包括转入方、转出方、交易金额和转出方的数字签名。The transaction request information is transmitted through semi-homomorphic encryption, and the transaction request information includes at least the transfer-in party, the transfer-out party, the transaction amount, and the digital signature of the transfer-out party.
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质内存储有计算机可读指令,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:A computer-readable storage medium, wherein computer-readable instructions are stored in the computer-readable storage medium, and the computer-readable instructions can be executed by at least one processor, so that the at least one processor executes the following step:
    收集安全交易中参与的各个节点的交易请求信息,所述安全交易中参与的节点包括卖方节点,买方节点,记账权节点;Collect transaction request information of each node participating in the secure transaction, the nodes participating in the secure transaction include seller nodes, buyer nodes, and billing rights nodes;
    记录所述交易请求信息,验证所述交易请求信息的合法性;Record the transaction request information and verify the legitimacy of the transaction request information;
    根据所述交易请求信息产生交易块,将所述交易块打包至区块链的区块中;Generate a transaction block according to the transaction request information, and package the transaction block into a block of the blockchain;
    获得并且验证所述记账权节点转交的记账权;Obtain and verify the bookkeeping right forwarded by the bookkeeping right node;
    向所述交易请求信息中的各个节点广播所述区块中验证后的所述记账权的归属情况,以使所述各个节点按照预设的共识算法达成共识;Broadcast to each node in the transaction request information the attribution status of the bookkeeping right after verification in the block, so that each node reaches a consensus according to a preset consensus algorithm;
    通过所述记账权验证所述交易请求信息,当验证成功后,通知各个节点记录所述交易请求信息,并同步更新各个节点的账户信息。The transaction request information is verified through the accounting right, and when the verification is successful, each node is notified to record the transaction request information, and the account information of each node is updated synchronously.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述计算机可读指令还可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:The computer-readable storage medium according to claim 16, wherein the computer-readable instructions are also executable by at least one processor, so that the at least one processor executes the following steps:
    按照预设规则验证所述记账权节点转交的记账权是否合格;Verifying whether the bookkeeping right transferred by the bookkeeping right node is qualified according to preset rules;
    当所述记账权合格时,发放奖励给所述记账权节点。When the bookkeeping right is qualified, a reward is issued to the bookkeeping right node.
  18. 根据权利要求16所述的计算机可读存储介质,其中,所述计算机可读指令还可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:The computer-readable storage medium according to claim 16, wherein the computer-readable instructions are also executable by at least one processor, so that the at least one processor executes the following steps:
    判断所述交易信息中是否隐藏了预设的非法信息;Determine whether preset illegal information is hidden in the transaction information;
    当所述交易信息中隐藏了预设的非法信息,则验证所述交易信息为合法;When the preset illegal information is hidden in the transaction information, verify that the transaction information is legal;
    当所述交易信息中未隐藏预设的非法信息,则验证所述交易信息不合法。When the preset illegal information is not hidden in the transaction information, it is verified that the transaction information is illegal.
  19. 根据权利要求16所述的计算机可读存储介质,其中,所述计算机可读指令还可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤: The computer-readable storage medium according to claim 16, wherein the computer-readable instructions are also executable by at least one processor, so that the at least one processor executes the following steps:
    将所述计算机设备作为第三方信任节点;Using the computer device as a third-party trust node;
    基于所述卖方节点,所述买方节点,所述记账权节点以及所述第三方信任节点之间建立联邦学习模型;Establishing a federated learning model based on the seller node, the buyer node, the billing authority node, and the third-party trust node;
    分别获取所述安全交易中所述卖方节点,所述买方节点,所述记账权节点的交易结果,其中,所述卖方节点,所述买方节点,所述记账权节点分别将所述安全交易的结果通过所述联邦学习模型传输给所述第三方信任节点;及Obtain the transaction results of the seller node, the buyer node, and the billing authority node in the secure transaction, respectively, wherein the seller node, the buyer node, and the billing authority node separately The result of the transaction is transmitted to the third-party trust node through the federated learning model; and
    将所述卖方节点,所述买方节点,所述记账权节点的交易结果通过所述联邦学习模型分别传输给对方。The transaction results of the seller node, the buyer node, and the bookkeeping right node are respectively transmitted to each other through the federated learning model.
  20. 根据权利要求16所述的计算机可读存储介质,其中,所述计算机可读指令还可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤: The computer-readable storage medium according to claim 16, wherein the computer-readable instructions are also executable by at least one processor, so that the at least one processor executes the following steps:
    通过半同态加密对所述交易请求信息进行传输,所述交易请求信息至少包括转入方、转出方、交易金额和转出方的数字签名。The transaction request information is transmitted through semi-homomorphic encryption, and the transaction request information includes at least the transfer-in party, the transfer-out party, the transaction amount, and the digital signature of the transfer-out party.
PCT/CN2020/111628 2020-07-30 2020-08-27 Blockchain secure transaction method, computer device, and readable storage medium WO2021174778A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010752626.3A CN111882308A (en) 2020-07-30 2020-07-30 Block chain secure transaction method, computer device and readable storage medium
CN202010752626.3 2020-07-30

Publications (1)

Publication Number Publication Date
WO2021174778A1 true WO2021174778A1 (en) 2021-09-10

Family

ID=73205650

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/111628 WO2021174778A1 (en) 2020-07-30 2020-08-27 Blockchain secure transaction method, computer device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN111882308A (en)
WO (1) WO2021174778A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113362181A (en) * 2021-07-20 2021-09-07 永旗(北京)科技有限公司 Transaction method and system based on block chain
CN115049402A (en) * 2022-08-17 2022-09-13 国网区块链科技(北京)有限公司 Transaction risk parameter calculation method, block chain verification node and storage medium
CN116611829A (en) * 2023-07-21 2023-08-18 山东美丽乡村云计算有限公司 Consumption supervision system based on block chain

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819564A (en) * 2021-01-12 2021-05-18 北京金山云网络技术有限公司 Method and device for determining block accounting right, block chain network and related equipment
CN113852598B (en) * 2021-08-06 2022-10-21 中标慧安信息技术股份有限公司 Internet of things data transaction process recording method based on block chain
CN113763180B (en) * 2021-11-09 2022-02-08 环球数科集团有限公司 Transaction system based on centralized settlement and block chain deposit

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086622A (en) * 2018-07-25 2018-12-25 深圳慧安康科技有限公司 A kind of implementation method and node device of intelligence community
US20190340619A1 (en) * 2018-05-07 2019-11-07 Accenture Global Solutions Limited Distributed ledger based identity and origins of supply chain application enabling financial inclusion and sustainability
CN111200589A (en) * 2019-12-05 2020-05-26 北京数字认证股份有限公司 Data protection method and system for alliance chain
CN111292014A (en) * 2020-03-10 2020-06-16 江苏大学 Intelligent agricultural machinery scheduling system based on alliance chain and scheduling method thereof
CN111464335A (en) * 2020-03-10 2020-07-28 北京邮电大学 Intelligent service customization method and system for endogenous trusted network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109377221B (en) * 2018-10-16 2021-09-03 杭州趣链科技有限公司 Privacy transaction protection method based on block chain of alliance
CN110490330A (en) * 2019-08-16 2019-11-22 安徽航天信息有限公司 A kind of distributed machines learning system based on block chain
CN110827147A (en) * 2019-10-31 2020-02-21 山东浪潮人工智能研究院有限公司 Federal learning incentive method and system based on alliance chain
CN111325538B (en) * 2020-02-19 2023-06-23 福建瑞达精工股份有限公司 Payment method based on blockchain digital currency and digital watch payment system
CN111460511B (en) * 2020-04-17 2023-05-02 支付宝(杭州)信息技术有限公司 Federal learning and virtual object distribution method and device based on privacy protection

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190340619A1 (en) * 2018-05-07 2019-11-07 Accenture Global Solutions Limited Distributed ledger based identity and origins of supply chain application enabling financial inclusion and sustainability
CN109086622A (en) * 2018-07-25 2018-12-25 深圳慧安康科技有限公司 A kind of implementation method and node device of intelligence community
CN111200589A (en) * 2019-12-05 2020-05-26 北京数字认证股份有限公司 Data protection method and system for alliance chain
CN111292014A (en) * 2020-03-10 2020-06-16 江苏大学 Intelligent agricultural machinery scheduling system based on alliance chain and scheduling method thereof
CN111464335A (en) * 2020-03-10 2020-07-28 北京邮电大学 Intelligent service customization method and system for endogenous trusted network

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113362181A (en) * 2021-07-20 2021-09-07 永旗(北京)科技有限公司 Transaction method and system based on block chain
CN113362181B (en) * 2021-07-20 2023-11-24 佳乔(深圳)投资有限公司 Transaction method and system based on blockchain
CN115049402A (en) * 2022-08-17 2022-09-13 国网区块链科技(北京)有限公司 Transaction risk parameter calculation method, block chain verification node and storage medium
CN115049402B (en) * 2022-08-17 2022-10-25 国网区块链科技(北京)有限公司 Transaction risk parameter calculation method, block chain verification node and storage medium
CN116611829A (en) * 2023-07-21 2023-08-18 山东美丽乡村云计算有限公司 Consumption supervision system based on block chain
CN116611829B (en) * 2023-07-21 2023-11-14 山东美丽乡村云计算有限公司 Consumption supervision system based on block chain

Also Published As

Publication number Publication date
CN111882308A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
WO2021174778A1 (en) Blockchain secure transaction method, computer device, and readable storage medium
WO2021204040A1 (en) Federated learning data processing method and apparatus, and device and storage medium
CN108734576B (en) Block chain-based educational resource sharing method and system
CN111737724B (en) Data processing method and device, intelligent equipment and storage medium
TWI679874B (en) Cross-blockchain authentication method and device, and electronic equipment
WO2021184826A1 (en) Blockchain-based resource transfer method and apparatus, and node device and storage medium
Zhou et al. Med-PPPHIS: blockchain-based personal healthcare information system for national physique monitoring and scientific exercise guiding
CN109829824B (en) Commodity transaction information sharing method based on block chain technology
CN111414210B (en) Method, apparatus and computer readable storage medium for generating side chains based on main chains
TWM561279U (en) Blockchain system and node server for processing strategy model scripts of financial assets
JP2023103330A (en) Method for transaction verification node in blockchain network, storage media, electronic device, transaction verification node, super node, and blockchain network
Wang et al. Blockchain-based IoT device identification and management in 5G smart grid
WO2017107976A1 (en) Client apparatus, server apparatus and access control system for authorized access
TW201943250A (en) Cross-blockchain authentication method and apparatus, and electronic device
TW202009841A (en) Least decentralized fund trading system and method thereof
WO2020125234A1 (en) Blockchain-based data processing method and apparatus
TW201935299A (en) Blockchain system, node server and method for processing strategy model scripts of financial assets
TWI691924B (en) Carbon trading system and carbon trading platform
CN110944301A (en) Intelligent cell equipment monitoring system based on block chain and key management method
TW202011312A (en) Authenticating server and method for transactions on blockchain
CN112163950A (en) Block chain network construction method and system convenient for expansion and node resource reuse and terminal equipment
CN112565412B (en) Data transaction method, system and equipment based on block chain
CN112801778A (en) Federated bad asset blockchain
WO2020216053A1 (en) Distributed data processing method, device, apparatus and medium
CN110941840B (en) Data processing method, system and terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20923046

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.05.2023

122 Ep: pct application non-entry in european phase

Ref document number: 20923046

Country of ref document: EP

Kind code of ref document: A1