CN114638699A - Transaction data processing method, device, equipment and medium - Google Patents

Transaction data processing method, device, equipment and medium Download PDF

Info

Publication number
CN114638699A
CN114638699A CN202011477865.9A CN202011477865A CN114638699A CN 114638699 A CN114638699 A CN 114638699A CN 202011477865 A CN202011477865 A CN 202011477865A CN 114638699 A CN114638699 A CN 114638699A
Authority
CN
China
Prior art keywords
information
purchasing
node
encryption
encrypted
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202011477865.9A
Other languages
Chinese (zh)
Inventor
田心
王申
张盼
何丽
左雪松
邓壮壮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN202011477865.9A priority Critical patent/CN114638699A/en
Publication of CN114638699A publication Critical patent/CN114638699A/en
Pending legal-status Critical Current

Links

Images

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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0203Market surveys; Market polls
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The application provides a transaction data processing method, a transaction data processing device and a transaction data processing medium, which are used for improving the safety of data. The method is applied to a first purchasing node, wherein the first purchasing node is equipment corresponding to a bidder in a block chain network, the block chain network further comprises a second purchasing node and a selling node, and the method comprises the following steps: when a selling request is acquired from a block chain network, first purchasing information is generated; writing the first purchasing information into the block chain network, and acquiring second purchasing information of a second purchasing node from the block chain network; obfuscating and encrypting the first purchase information and the second purchase information to obtain first encrypted information; and sending the first encrypted information to a second purchasing node so that the second purchasing node decrypts the first encrypted information to obtain a comparison result of the first purchasing price and the second purchasing price, and writing the comparison result into the block chain network.

Description

Transaction data processing method, device, equipment and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for processing transaction data.
Background
Two roles are involved in the transaction process: seller and buyer. The process of achieving a trade between two roles is generally: the equipment of the seller issues a selling request to the outside, and the equipment of each buyer issues a purchasing price according to the issuing operation of the buyer. The seller obtains a plurality of purchase prices, and the seller selects a corresponding buyer to cooperate according to the purchase prices.
However, in this way, since these price data can be viewed or modified by each user, etc., it is not a true fair price to finally obtain multiple purchase prices.
Disclosure of Invention
The embodiment of the application provides a transaction data processing method, a transaction data processing device and a transaction data processing medium, which are used for improving the safety of data.
In a first aspect, a transaction data processing method is provided, where the method is applied to a first purchasing node, the first purchasing node is a device corresponding to a bidder in a block chain network, the block chain network further includes a second purchasing node and a selling node, and the method includes:
when a selling request is acquired from the block chain network, first purchasing information is generated; wherein the sale request is that the sale node is to request to sell an item, the first procurement information includes a first transaction number, the first transaction number generated from a first procurement price to procure the item;
writing the first purchasing information into the block chain network, and acquiring second purchasing information of the second purchasing node from the block chain network; wherein the second procurement information includes a second transaction number, the second transaction number generated according to a second procurement price provided by the second procurement node for the item;
obfuscating and encrypting the first purchase information and the second purchase information to obtain first encrypted information;
and sending the first encrypted information to the second purchasing node so that the second purchasing node decrypts the first encrypted information to obtain a comparison result of the first purchasing price and the second purchasing price, and writing the comparison result into the block chain network.
In the embodiment of the application, each purchasing node shares the transaction number corresponding to the purchasing price through the regional chain network, so that the purchasing information comprising the transaction number cannot be tampered. In addition, in the embodiment of the application, one purchasing node can perform obfuscation and encryption on two transaction numbers, and the other purchasing node can directly decrypt and obtain a price comparison result between the two purchasing nodes after obtaining the encrypted information after obfuscation and encryption, that is, each purchasing node does not directly disclose the purchasing price externally, so that comparison between the purchasing prices is realized, leakage of the purchasing price is avoided, and the safety of data is further improved. Furthermore, the comparison result is written into the block link network, and the sharing of the comparison result by each node is realized, so that on one hand, the non-tamper property of the comparison result is ensured, on the other hand, the selling node is enabled to select the transaction object only according to the comparison result, and the fairness of the transaction is ensured under the condition of ensuring the security of the data.
In one possible embodiment, obfuscating the encryption process for the first procurement information and the second procurement information to obtain first encrypted information includes:
encrypting the first purchase information to obtain second encrypted information, and encrypting the second purchase information to obtain third encrypted information;
obfuscating and encrypting the second encrypted information and the third encrypted information to obtain first encrypted information;
sending the first encrypted information to the second purchasing node, including:
sending the first encrypted information and the second encrypted information to the second purchasing node, and transmitting the third encrypted information to the second purchasing node by accident.
In the embodiment of the application, the first purchasing node encrypts the first purchasing information and the second purchasing information respectively to obtain the second encrypted information and the third encrypted information respectively, and further encrypts the second encrypted information and the third encrypted information in a mixed manner to obtain the first encrypted information. In addition, in the embodiment of the application, the first purchasing node sends the third encrypted information to the second purchasing node in an inadvertent transmission mode, so that the second purchasing node cannot exactly obtain the third encrypted information, and naturally, the second purchasing node cannot directly decrypt to obtain the first encrypted information, and the data security is further improved.
In a possible embodiment, the encrypting the second encrypted information and the third encrypted information respectively by a character string, and obfuscating the encrypting process to obtain the first encrypted information includes:
according to the sequence of each character in the second encryption information, performing logical operation on the character in the second encryption information, the character at the corresponding position in the third encryption information and the last logical operation result respectively to obtain the current logical operation result;
until each character in the second encryption information and the third encryption information is processed, obtaining each logical operation result;
encrypting the characters in the second encryption information, the characters at the corresponding positions in the third encryption information, the previous logical operation result and the current logical operation result according to the sequence of the characters in the second encryption information to obtain each encryption result;
first encryption information is obtained according to the encryption result of each time.
In this embodiment, the first purchasing node performs logical operations on the characters in the second encrypted information and the characters in the corresponding positions in the third encrypted information, and the previous logical operation result, respectively, to obtain the current logical operation result, so that each logical operation result includes information of the previous logical operation result, and the encrypted first encrypted information finally includes logical operation information of all the characters of the second encrypted information and the third encrypted information, and the second purchasing node can subsequently obtain a comparison result between the first purchasing price corresponding to the second encrypted information and the second purchasing price corresponding to the third encrypted information by decrypting the first encrypted information.
In one possible embodiment, the first purchasing node includes a comparison circuit that encrypts the first purchasing information to obtain second encrypted information, and encrypts the second purchasing information to obtain third encrypted information, including:
encrypting the first transaction number, the logic connection relation information among the comparators in the comparison circuit, the state information output by each comparator in the comparison circuit and the first timestamp of the first transaction number to obtain second encryption information;
and encrypting the second transaction number, the logic connection relation information among the comparators in the comparison circuit, the state information output by each comparator in the comparison circuit and a second timestamp of the second transaction number to obtain third encryption information.
In the embodiment of the application, the second encrypted information is obtained according to the first transaction number, the logical connection relationship among the comparators in the comparison circuit, the output of each comparator and the first timestamp, so that the information of the first purchase price corresponding to the first transaction number is hidden in the second encrypted information, and the second encrypted information can hide more complete and comprehensive information except the first purchase price, so as to increase the non-tamper-ability of the second encrypted information. Similarly, the third encrypted information generated in a similar manner can imply more complete and comprehensive information besides the second purchase price, so as to increase the tamperproof property of the third encrypted information, and further increase the tamperproof property of the first encrypted information after the second encrypted information and the third encrypted information are mixed for encryption.
In a possible embodiment, according to the sequence of each character in the second encryption information, performing a logical operation on the character in the second encryption information, the character at the corresponding position in the third encryption information, and the previous logical operation result, respectively, to obtain the current logical operation result, includes:
and inputting the characters in the second encrypted information, the characters at the corresponding positions in the third encrypted information and the output result of the last comparator into a current comparator in the comparison circuit according to the sequence of the characters in the second encrypted information, and taking the output of the current comparator as the current logical operation result.
In the embodiment of the application, the logic operation is realized through the comparator in the comparison circuit, and the cost of the comparator is relatively low, so that the realization cost of the scheme can be reduced. Moreover, the comparator has higher operation speed, so that the efficiency of obtaining the first encryption information can be improved.
In a second aspect, a transaction data processing method is provided, where the method is applied to a second purchasing node, where the second purchasing node is a device corresponding to a bidder in a block chain network, and the block chain network further includes a first purchasing node and a selling node, and the method includes:
generating second purchasing information when a selling request is acquired from the block chain network; wherein the sell request is for the sell node to request to sell an item, the second procurement information includes a second transaction number, the second transaction number generated from a second procurement price to procure the item;
writing the second procurement information into the blockchain network;
receiving first encryption information sent by the first purchasing node; wherein the first encryption information is obtained after the first purchasing node obfuscates and encrypts the first purchasing information and the second purchasing information, the first purchasing information includes a first transaction number, and the first transaction number is generated according to a first purchasing price for purchasing the item;
decrypting the first encrypted information to obtain a comparison result of the first purchase price and the second purchase price;
and writing the comparison result into the block chain network.
In one possible embodiment, receiving the first encrypted message sent by the first purchasing node comprises:
receiving first encryption information, second encryption information and fourth encryption information sent by the first purchasing node; the second encryption information is obtained after the first procurement node encrypts the first procurement information, the fourth encryption information is obtained after the first procurement node inadvertently transmits third encryption information, and the third encryption information is obtained after the first procurement node encrypts the second procurement information.
In one possible embodiment, decrypting the first encrypted information to obtain the comparison result of the first purchase price and the second purchase price includes:
according to the sequence of each character in the second encrypted information, decrypting the first encrypted information according to the character in the second encrypted information, the character at the corresponding position in the fourth encrypted information and the last logical operation result to obtain the current logical operation result;
until each character in the second encryption information and the fourth encryption information is processed, obtaining a final logical operation result;
and obtaining a comparison result of the first purchase price and the second purchase price according to the final logical operation result.
In a third aspect, a transaction data processing apparatus is provided, where the apparatus is disposed in a first purchasing node, the first purchasing node is a device corresponding to a bidder in a blockchain network, the blockchain network further includes a second purchasing node and a selling node, and the apparatus includes:
the generation module is used for generating first purchasing information when a selling request is acquired from the block chain network; wherein the sale request is that the sale node is to request to sell an item, the first procurement information includes a first transaction number, the first transaction number generated from a first procurement price to procure the item;
the writing module is used for writing the first purchasing information into the block chain network;
the acquisition module is used for acquiring second purchasing information of the second purchasing node from the block chain network; wherein the second procurement information includes a second transaction number, the second transaction number generated according to a second procurement price provided by the second procurement node for the item;
the obtaining module is used for carrying out confusion encryption processing on the first purchase information and the second purchase information to obtain first encryption information;
and the sending module is used for sending the first encrypted information to the second purchasing node so as to enable the second purchasing node to decrypt the first encrypted information, obtain a comparison result of the first purchasing price and the second purchasing price, and write the comparison result into the block chain network.
In a fourth aspect, a transaction data processing apparatus is provided, where the transaction data processing apparatus is disposed in a second purchasing node, the second purchasing node is a device corresponding to a bidder in a block chain network, the block chain network further includes a first purchasing node and a selling node, and the apparatus includes:
the generating module is used for generating second purchasing information when a selling request is acquired from the block chain network; wherein the sale request is that the sale node is to request to sell an item, the second procurement information includes a second transaction number, the second transaction number generated from a second procurement price for procurement of the item;
the writing module is used for writing the second purchasing information into the block chain network;
the receiving module is used for receiving first encryption information sent by the first purchasing node; wherein the first encrypted information is obtained after the first procurement node performs obfuscated encryption processing on the first procurement information and the second procurement information, the first procurement information including a first transaction number generated from a first procurement price at which the item is procured;
the obtaining module is used for decrypting the first encrypted information to obtain a comparison result of the first purchase price and the second purchase price;
the writing module is further configured to write the comparison result into the block chain network.
In a fourth aspect, there is provided a transaction data processing device comprising:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the at least one processor implementing the method of any one of the first or second aspects by executing the instructions stored by the memory.
In a fifth aspect, there is provided a computer readable storage medium having stored thereon computer instructions which, when run on a computer, cause the computer to perform the method of any of the first or second aspects.
Drawings
Fig. 1A is an application scenario diagram of a transaction data processing method according to an embodiment of the present application;
fig. 1B is a block diagram of a data transaction system according to an embodiment of the present application;
fig. 1C is a schematic structural diagram of a purchasing node according to an embodiment of the present disclosure;
fig. 2 is a schematic interaction diagram between the devices in fig. 1A according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a transaction data processing device according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a transaction data processing device according to an embodiment of the present application;
fig. 5 is a block diagram of a transaction data processing device according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the drawings and specific embodiments.
In order to facilitate understanding of technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained below.
Block chain (block chain): or distributed data record book, is a chain data structure composed of blocks for storing data in a certain order in a sequential connection manner. The blocks are connected in series in sequence to form a block chain.
A terminal: which may be referred to as user equipment, a mobile station, a terminal or a mobile terminal, etc., the terminal equipment may communicate with one or more core Network devices via a Radio Access Network (RAN). The terminal equipment may be a mobile telephone (or so-called "cellular" telephone) or a computer with a mobile terminal, etc., for example, the terminal equipment may also be a portable, pocket, hand-held, computer-included or vehicle-mounted mobile equipment. The terminal device can also be an internet of things device, such as a watch terminal, a wearable device, logistics tracking, an elevator picture or a satellite television and other internet of things devices. The terminal device may exchange voice and/or data with other devices through the radio access network or may exchange voice and/or data directly with the radio access network.
In order to improve data security, the embodiment of the application provides a transaction data processing method. Referring to the application scenario diagram shown in fig. 1A, an application scenario to which the method is applied will be described below.
The application scenario comprises at least one selling node and at least two purchasing nodes, wherein the at least one selling node and the at least two purchasing nodes form a block chain network. The selling node and the purchasing node may be implemented by various devices, for example, a computer, a mobile phone, an ore machine, a desktop, or a server, which have computing capabilities. Alternatively, the selling node or the purchasing node installs the corresponding software programs in these devices.
And each purchasing node in the at least two purchasing nodes acquires the selling request from the block chain network, generates purchasing information according to the input of a purchasing party, and writes the purchasing information into the block chain network. Wherein the role of each purchasing node is the same.
In the data transaction process, each purchasing node can acquire purchasing information of other purchasing nodes from the blockchain network, mix up and encrypt the purchasing information of the purchasing node and the purchasing information of other purchasing nodes to obtain encrypted information, and send the encrypted information to the corresponding other purchasing nodes to enable the corresponding other purchasing nodes to decrypt the encrypted information to obtain a comparison result of purchasing prices corresponding to the two purchasing information, and write the comparison result into the blockchain network, so that the selling node can obtain the comparison result of the purchasing prices corresponding to the two purchasing information under the condition that the purchasing prices corresponding to the two purchasing information are unknown. The process of comparing the purchase price ciphertext to obtain the comparison result will be described below.
It should be noted that fig. 1A illustrates an example in which at least one selling node includes the first selling node a1 and the second selling node a2, but the number of selling nodes is not limited in practice. Fig. 1 illustrates an example of at least two purchasing nodes including first purchasing node B1, second purchasing node B2, third purchasing node B3, and fourth purchasing node B4, but does not actually limit the number of purchasing nodes.
The transaction between the selling node and the purchasing node can be carried out on any article, including but not limited to one or more of various physical goods and virtual goods, such as data. In the following, a data transaction system formed by a selling node and a purchasing node is described by taking transaction data between the selling node and the purchasing node as an example, and the data transaction system can be further understood as a distribution diagram of functional modules of a blockchain network formed by the selling node and the purchasing node.
Fig. 1B is a structural diagram of a data transaction system according to an embodiment of the present disclosure. The system includes a data transaction management module 101, a transaction negotiation module 102, and a blockchain application module 103. The function of each module is briefly described as follows:
first, the data transaction management module 101 is used to implement registration management, information display and transaction management functions.
The registration management function refers to registering a selling node and a purchasing node in the blockchain network, for example, registering a new purchasing node. The information display function is to display corresponding information in the blockchain network, for example, a selling request issued by a selling node and purchasing information issued by a purchasing node can be displayed. Transaction management refers to managing transactions between various nodes, such as managing data transactions between a selling node and a purchasing node.
The trade negotiation module 102 is used to realize functions such as secret price comparison of the purchase price between the purchase nodes, encryption of the purchase price, decryption of the purchase price, and the like.
The secret price comparison function is to obtain a comparison result of the purchase prices on the basis that each purchase node cannot obtain the purchase prices of other purchase nodes, for example, to obtain a comparison result by secret comparing two purchase prices corresponding to two purchase nodes. Encryption encrypts the purchase price, for example, during a secret price comparison, and decryption decrypts the encrypted purchase price, for example, during a secret price comparison.
And thirdly, the block chain application module 103 comprises an intelligent contract, a block chain run and a union chain structure.
An intelligent contract refers to a transaction rule or the like that is recognized between various nodes defined in a blockchain network. The operation and maintenance of the block chain refers to the operation and maintenance of the block chain network, and provides support for the normal operation of the block chain network. The federation chain structure refers to a structure formed by at least two different types of nodes, such as a purchasing node and a selling node in the embodiment of the application.
In the embodiment of the present application, it may refer to the negotiation module 102, and the function of the negotiation module 102 is mainly implemented by the purchasing node, so in order to describe the function of the purchasing node more clearly, each functional module of the purchasing node is described below with reference to the schematic structural diagram of the purchasing node in fig. 1C.
Each purchasing node comprises a bit comparison module, a confusion calculation module, an oblivious transmission module, a transaction negotiation calculation control module and an encryption algorithm module.
And the transaction negotiation total calculation control module is used for controlling the bit comparison module, the confusion calculation module and the careless transmission module. The bit comparison module is used for generating encryption information according to the purchase information, and the bit comparison module can be realized by a comparison circuit. The obfuscation calculating module is used for performing encryption obfuscation on the encrypted information, and may be implemented by an obfuscating circuit, for example. The oblivious transmission module transmits the encrypted information to other nodes through an oblivious transmission protocol. The encryption algorithm module may encrypt the corresponding information in an encryption and obfuscation process, and may specifically encrypt the corresponding information according to a preset encryption algorithm. Preset encryption algorithms such as an elliptic curve public key cryptographic algorithm (also may be referred to as a national secret SM2 algorithm), a cryptographic hash algorithm (also may be referred to as a national secret SM3 algorithm), a block encryption algorithm (also may be referred to as a national secret SM4 algorithm), and the like.
The application scenarios of the embodiments of the present application are introduced as above, and the technical solutions provided by the embodiments of the present application are introduced below with reference to the application scenarios. Referring to fig. 2, a schematic diagram of interaction among the devices in fig. 1A is provided for an embodiment of the present application, in which fig. 2 illustrates at least one selling node including a first selling node a1, and in which fig. 2 illustrates at least two purchasing nodes including a first purchasing node B1 and a second purchasing node B2. The interaction process is described below.
S201: the first selling node a1 writes a selling request into the blockchain network.
Specifically, when a seller is ready to sell an item, the seller may enter information related to the item, which may include, for example, an identification of the item, a price range for the item such as a starting price for the item, and so forth. Alternatively, the first selling node a1 may automatically generate the related information of the item, for example, the first selling node a1 generates the related information of the item according to the marketing rule. The type of the item may be a physical commodity such as a house, a car, or a virtual commodity such as data, stock, or the like.
The first selling node a1 generates a corresponding selling request according to the relevant information inputted by the seller after obtaining the relevant information, the selling request being that the first selling node a1 is used for requesting to sell the item. Further, the first selling node a1 also writes the selling request into the blockchain network. Since the selling node and each purchasing node are both in the blockchain network, after the first selling node a1 writes the selling request into the blockchain network, it is equivalent that each purchasing node obtains the selling request.
S202: the first purchasing node B1 writes the first purchase information into the blockchain network.
Specifically, after the first selling node a1 writes a selling request into the blockchain network, the first purchasing node B1 may obtain the selling request from the blockchain network, and the purchasing party may obtain the item information carried in the selling request, and may input purchasing information when determining to participate in purchasing the item corresponding to the selling request, where the purchasing information includes a purchasing price, and the purchasing price refers to a price provided by the purchasing party for preparing to purchase the item. The purchase information may also include purchasing conditions. The procurement condition refers to a condition that needs to be satisfied by a seller for procurement of the item, such as delivery within one day.
After obtaining the purchase information, first purchasing node B1 may generate first purchase information based on the purchase information for the item. Alternatively, first purchasing node B1 may automatically generate first purchasing information for an item based on a sale request for the item. The first procurement information includes a first transaction number. The first transaction number is a unique identification generated by first purchasing node B1 for the first purchase price. The first purchase price is the purchase price offered by first purchasing node B1 in preparation for purchasing the item for first sale node a 1. The first transaction number corresponds to a first purchase price at which an item is purchased, and specifically, the first purchasing node B1 automatically generates the first transaction number for an item in response to a sale request for the item, and may generate the first transaction number by encrypting the first purchase price and a time stamp, or may generate the first transaction number by directly encrypting the first purchase price.
Further, the first purchasing node B1 may also write the first purchasing information to the blockchain network so that other purchasing nodes can obtain the first purchasing information.
It should be noted that the first purchasing node B1 may generate a plurality of first purchasing information for the sale request, where the transaction number in each first purchasing information corresponds to one purchasing price, and the purchasing prices corresponding to two purchasing information are different.
S203: the second purchasing node B2 writes the second purchase information into the blockchain network.
The process of the second purchasing node B2 generating the second purchasing information may refer to the process of the first purchasing node B1 generating the first purchasing information, and will not be described in detail here. The second procurement information includes a second transaction number. The second transaction number is the unique identification generated by the second purchasing node B2 for the second purchase price. The second purchase price is the purchase price offered by the second purchase node B2 in preparation for purchasing the item of the first vending node a 1. The second transaction number corresponds to the second purchase price at which the item is purchased, and specifically, the second purchasing node B2 automatically generates the second transaction number for the item in response to a sale request for the item, and may generate the second transaction number by encrypting the second purchase price and a time stamp, or may generate the second transaction number by directly encrypting the second purchase price, for example.
Further, after the second purchasing node B2 generates the second purchasing information, the second purchasing information may be written into the blockchain network, so that other purchasing nodes can obtain the second purchasing information. Similarly, the second purchasing node B2 may generate a plurality of second purchasing information for the sale request, where the transaction number in each second purchasing information corresponds to a purchasing price, and the purchasing prices corresponding to two purchasing information are different.
As an example, the execution order of S202 and S203 may be arbitrary.
S204: the first purchasing node B1 obtains second purchasing information from the blockchain network.
Since the information stored on the blockchain network is shared, any node can obtain the information from the blockchain network, so after second purchasing node B2 writes the second purchasing information into the blockchain network, first purchasing node B1 can obtain the second purchasing information for second purchasing node B2 from the blockchain network.
S205: the first purchasing node B1 performs obfuscated encryption processing on the first purchasing information and the second purchasing information to obtain first encrypted information.
In order to avoid that each purchasing node obtains the transaction prices of other purchasing nodes, etc., in the embodiment of the present application, the first purchasing node B1 may perform obfuscated encryption processing on the first purchasing information and the second purchasing information to obtain the first encrypted information, thereby avoiding ensuring the security of the purchasing information. The first purchasing node B1 may perform various encryption processing methods for the first purchasing information and the second purchasing information, which are described as follows:
the first method is as follows: the first purchasing node B1 may obfuscate the first purchasing information and the second purchasing information through an obfuscation circuit, and then encrypt the obfuscated result through a predetermined encryption algorithm to obtain first encrypted information. The garbled circuit is used for garbling various information to achieve the purpose of hiding the information, and can be specifically realized by combining a plurality of logic gates, and the specific implementation mode can be various, and the application does not limit the specific implementation mode.
The second method comprises the following steps: the first purchasing node B1 may encrypt the first purchasing information to obtain the second encrypted information, encrypt the second purchasing information to obtain the third encrypted information, and perform obfuscation and encryption on the second encrypted information and the third encrypted information to obtain the first encrypted information.
The following describes a process of acquiring the second encryption information: the first purchasing node B1 obtains the first transaction number from the first purchasing information, and encrypts the first transaction number, the logical connection relationship information between the comparators in the comparison circuit, the state information output by each comparator in the comparison circuit, and the first timestamp of the first transaction number using a preset encryption algorithm to obtain second encryption information.
As previously discussed, each of the purchase nodes includes a comparison circuit comprising a plurality of comparators, each comparator corresponding to a logic circuit, the output of a previous comparator connected to the input of a next comparator. The logic connection relation information between the comparators in the comparison circuit comprises the coding information of each comparator and the coding information of an input/output (I/O) interface of each comparator. The encoding information of the comparators is, for example, the encoding of the first comparator is "1" and the encoding of the second comparator is "2", the encoding information of the input/output (I/O) interface of the comparators is, for example, the encoding of the three input interfaces of the first comparator is "00", "01" and "10", and the encoding of the output interface is "10". The state information output from each comparator in the comparison circuit is, for example, "0", "1". The first timestamp is the time that the first purchasing node B1 written the first purchasing information into the blockchain network, e.g., "202012091011".
After the process of acquiring the second encrypted information is described, a process of acquiring the third encrypted information is described below: the first purchasing node B1 obtains the second transaction number from the second purchasing information, and encrypts the second transaction number, the logical connection relationship information between the comparators in the comparison circuit, the state information output by each comparator in the comparison circuit, and the second timestamp of the second transaction number using a preset encryption algorithm, to obtain third encryption information. The second timestamp is the time that the second purchasing node B2 written the second purchasing information into the blockchain network, e.g., "202012091012".
Further, the first purchasing node B1 performs obfuscating encryption processing on the second encryption information and the third encryption information after obtaining the second encryption information and the third encryption information, respectively, to obtain the first encryption information.
Specifically, the second encrypted information and the third encrypted information are both character strings, and the first purchasing node B1 performs logical operations on the characters in the second encrypted information, the characters at the corresponding positions in the third encrypted information, and the previous logical operation result according to the sequence of the characters in the second encrypted information, so as to obtain the current logical operation result. And obtaining each logical operation result until each character in the second encryption information and the third encryption information is processed.
For different 0/1 states, there are 8 input combinations corresponding to each character in the second encrypted message, the character at the corresponding position in the third encrypted message, and the last logical operation result, and each input combination corresponds to one logical operation result.
For example, the logical operation formula is as follows:
Figure BDA0002836201030000141
wherein, ci+1Representing the current logical operation result; c. CiThe result of the last logical operation is represented,
Figure BDA0002836201030000142
representing an exclusive or operation; n represents a union; b1iIndicating the ith character in the second encrypted information; b is a mixture of2iIndicating the ith character in the third encrypted information.
Each character in the second encrypted information, the character at the corresponding position in the third encrypted information, and the last logical operation result correspond to 8 types of input and output, and specific examples are as follows:
b1i、b2iand ciRespectively "0", "0" and "0", then ci+1Is "0";
b1i、b2iand ciRespectively "0", "0" and "1", then ci+1Is 1;
b1i、b2iand ciRespectively "0", "1" and "0", then ci+1Is "0";
b1i、b2iand ciRespectively "0", "1" and "1", then ci+1Is "0";
b1i、b2iand ciRespectively "1", "0" and "0", then ci+1Is 1;
b1i、b2iand ciAre respectively "1", "0" and "1", then ci+1Is 1;
b1i、b2iand ciAre respectively "1", "1" and "0", then ci+1Is "0";
b1i、b2iand ciRespectively "1", "1" and "1", then ci+1Is "1".
In one possible embodiment, each logical operation is implemented by a comparator in the comparison circuit.
Specifically, the first purchasing node B1 inputs the characters in the second encrypted information, the characters at the corresponding positions in the third encrypted information, and the output result of the previous comparator into the current comparator in the comparison circuit according to the sequence of the characters in the second encrypted information, and takes the output of the current comparator as the logical operation result of this time.
For example, the first purchasing node B1 will be B1i、b2i、ciInputting the ith comparator in the comparison circuit, and comparing the output c of the ith comparatori+1As the result of the current logical operation.
Further, the first purchasing node B1 encrypts the characters in the second encrypted information, the characters at the corresponding positions in the third encrypted information, the previous logical operation result, and the current logical operation result by using a preset encryption algorithm according to the sequence of the characters in the second encrypted information, so as to obtain each encryption result. Until the encryption result according to each time is processed, first encryption information is obtained.
Specifically, the first purchasing node B1 encrypts the current logical operation result with the previous logical operation result in a layer-by-layer encryption manner to obtain a first layer encryption result, encrypts the first layer encryption result with the character at the corresponding position in the third encryption information to obtain a second layer encryption result, encrypts the second layer encryption result with the character in the second encryption information to obtain a third layer encryption result, and takes the third layer encryption result as the encryption result of each time. First encryption information is obtained according to the encryption result of each time.
For example, using a preset encryption algorithm, such as the national secret SM4 algorithm, the formula for layer-by-layer encryption is as follows:
Figure BDA0002836201030000151
wherein S isiIndicating the encryption result of the ith time; c. Ci+1Representing the current logical operation result; c. CiRepresenting the last logical operation result; b1iIndicating the ith character in the second encrypted information; b2iIndicating the ith character in the third encrypted information; SM4() represents performing the SM4 encryption algorithm on () the data.
S206: the first purchasing node B1 sends the first encrypted information to the second purchasing node B2 to cause the second purchasing node B2 to decrypt the first encrypted information, obtain a comparison of the first purchase price and the second purchase price, and write the comparison into the blockchain network.
Specifically, first purchasing node B1, after obtaining the first encryption information, sends the first encryption information and the second encryption information directly to second purchasing node B2, and transmits the third encryption information in the form of a state table through carelessness to second purchasing node B2. Where the inadvertent transmission is meant that first purchasing node B1 transmitted the message in an obscured manner, protecting the third encrypted information from being fully acquired by second purchasing node B2. The first purchasing node B1 unsure of the specific message received by the second purchasing node B2 by inadvertently transmitting some information that was transmitted by the first purchasing node B1, which made the second purchasing node B2 inadvertently available.
For example, first purchasing node B1 would { { B { (B) }20 0,b20 0},…,{b2i 0,b2i 1} via an inadvertent transmission to a second purchasing node B2, where B2i 0Indicates that the ith character in the third encrypted information is '0', b2i 1Indicating that the ith character in the third encrypted message is "1" the second purchasing node B2 can only receive B with probability 1/22i 0Or b2i 1The first purchasing node B1 failed to determine that the second purchasing node B2 received B2i 0Or b2i 1
S207: the second purchasing node B2 decrypts the first encrypted information to obtain a comparison of the first purchase price and the second purchase price.
Because the first purchasing node B1 has different ways of acquiring the first encrypted information, and the second purchasing node B2 has different ways of decrypting the first encrypted information, the following is specifically introduced:
aiming at the first mode: the first purchasing node B1 performs obfuscated encryption on the first purchasing information and the second purchasing information to obtain first encrypted information. First purchasing node B1 sends the first purchase information and the first encrypted information directly to second purchasing node B2, and second purchase information is inadvertently transmitted to second purchasing node B2. The second purchasing node B2 decrypts the first encrypted information based on the first purchasing information and a portion of the second purchasing information.
With respect to the second mode: the first purchasing node B1 performs obfuscated encryption of the second encryption information and the third encryption information to obtain first encryption information. The second purchasing node B2 decrypts the first encrypted information based on the second encrypted information and the fourth encrypted information. Wherein the fourth encrypted information is obtained by the first purchasing node B1 after inadvertent transmission of the third encrypted information.
The following describes the process of obtaining the comparison of the first purchase price and the second purchase price:
the second purchasing node B2 decrypts the first encrypted information according to the sequence of each character in the second encrypted information, the character in the corresponding position in the second encrypted information, the character in the fourth encrypted information, and the last logical operation result, and obtains the logical operation result of this time. And obtaining a final logic operation result until all characters in the second encryption information and the fourth encryption information are processed.
Specifically, the second purchasing node B2 decrypts the third layer encryption result, which is the first encryption information, according to the second encryption information in a layer-by-layer decryption manner, to obtain the second layer encryption result, decrypts the second layer encryption result according to the fourth encryption information, to obtain the first layer encryption result, and decrypts the first layer encryption result according to the previous logical operation result, to obtain the current logical operation result. And obtaining a final logic operation result until the last character in the second encryption information and the fourth encryption information is processed.
For example, the second purchasing node B2 receives the 1 st character in the second encrypted message as "0", i.e., B11The 1 st character in the fourth encryption information is "0", that is, b21When the first character in the second encrypted information and the first character in the third encrypted information are processed at 0, the last logical operation result defaults to "0", that is, when i is 1, c10. According to b11、b21And c1To S1Decrypting layer by layer to obtain c2By analogy, according to b1i、b2iAnd ciTo SiDecrypting layer by layer to obtain ci+1Until the last character in the second encryption information and the fourth encryption information is processed, c is obtainedout,coutRepresenting the result of the final logical operation.
Further, the second purchasing node B2 obtains a comparison result of the first purchasing price and the second purchasing price according to the final logic operation result.
For example, if the final logical operation result CoutIs "1", it means that the first purchase price is greater than or equal to the second purchase price, if the final logical operation result CoutA "0" indicates that the first purchase price is less than the second purchase price.
It should be noted that, in the present application, for example, the second purchasing node acquires the first encrypted information, in fact, there are multiple purchasing nodes in the blockchain network, and other purchasing nodes may also acquire the first encrypted information for decryption, and the decryption process is random.
S208: the second purchasing node B2 writes the comparison into the blockchain network.
Specifically, the second purchasing node B2 writes the comparison result into the blockchain network after obtaining the comparison result of the first purchasing price and the second purchasing price. The particular form of the comparison does not involve actual purchase prices of both parties, e.g., a first transaction number greater than a second transaction number indicates that the first purchase price is greater than the second purchase price, or a first purchasing node B1 greater than a second purchasing node B2 indicates that the first purchase price is greater than the second purchase price.
It should be noted that, the present application is exemplified by a comparison process of the first purchase price and the second purchase price, and the present application may further compare the comparison result of the first purchase price and the second purchase price with a third purchase price, and so on, to obtain a sequence of the plurality of purchase prices, and write the final sequence result into the blockchain network, so that the first selling node a1 determines the object to be traded according to the final sequence result.
Based on the same inventive concept, an embodiment of the present application provides a transaction data processing apparatus, which is disposed in a first purchasing node, where the first purchasing node is a device corresponding to a bidder in a blockchain network, and the blockchain network further includes a second purchasing node and a selling node, please refer to fig. 3, and the apparatus includes:
the generation module 301 is configured to generate first purchase information when a selling request is acquired from a block chain network; the selling request is that the selling node is used for requesting to sell the article, the first purchasing information comprises a first transaction number, and the first transaction number is generated according to a first purchasing price of the purchased article;
a write module 302, configured to write the first purchase information into the blockchain network;
an obtaining module 303, configured to obtain second purchasing information of a second purchasing node from the blockchain network; the second purchasing information comprises a second transaction number, and the second transaction number is generated according to a second purchasing price provided by the second purchasing node for purchasing the article;
an obtaining module 304, configured to perform obfuscating encryption processing on the first purchase information and the second purchase information to obtain first encrypted information;
the sending module 305 is configured to send the first encrypted information to the second purchasing node, so that the second purchasing node decrypts the first encrypted information, obtains a comparison result between the first purchasing price and the second purchasing price, and writes the comparison result into the blockchain network.
In a possible embodiment, the obtaining module 304 is specifically configured to:
encrypting the first purchase information to obtain second encrypted information, and encrypting the second purchase information to obtain third encrypted information;
and obfuscating the encryption processing of the second encryption information and the third encryption information to obtain the first encryption information.
In a possible embodiment, the sending module 305 is specifically configured to:
the first encrypted information and the second encrypted information are sent to the second purchasing node, and the third encrypted information is transmitted to the second purchasing node through carelessness.
In a possible embodiment, the second encryption information and the third encryption information are both character strings, and the obtaining module 304 is specifically configured to:
according to the sequence of each character in the second encryption information, performing logical operation on the character in the second encryption information, the character at the corresponding position in the third encryption information and the last logical operation result respectively to obtain the current logical operation result;
until each character in the second encryption information and the third encryption information is processed, obtaining each logical operation result;
encrypting the characters in the second encryption information, the characters at the corresponding positions in the third encryption information, the previous logical operation result and the current logical operation result according to the sequence of the characters in the second encryption information to obtain each encryption result;
first encryption information is obtained according to the encryption result of each time.
In one possible embodiment, the first purchasing node includes a comparison circuit, and the obtaining module 304 is specifically configured to:
encrypting the first transaction number, the logic connection relation information among comparators in the comparison circuit, the state information output by each comparator in the comparison circuit and the first timestamp of the first transaction number to obtain second encryption information;
and encrypting the second transaction number, the logic connection relation information among the comparators in the comparison circuit, the state information output by each comparator in the comparison circuit and a second timestamp of the second transaction number to obtain third encryption information.
In a possible embodiment, the obtaining module 304 is specifically configured to:
and inputting the characters in the second encryption information, the characters at the corresponding positions in the third encryption information and the output result of the last comparator into a current comparator in the comparison circuit according to the sequence of the characters in the second encryption information, and taking the output of the current comparator as the logical operation result of this time.
Based on the same inventive concept, an embodiment of the present application provides a transaction data processing apparatus, which is disposed in a second purchasing node, where the second purchasing node is a device corresponding to a bidder in a blockchain network, and the blockchain network further includes a first purchasing node and a selling node, with reference to fig. 4, and the apparatus includes:
the generating module 401 is configured to generate second purchasing information when a selling request is acquired from the blockchain network; wherein the selling request is that the selling node is used for requesting to sell the article, the second purchasing information comprises a second transaction number, and the second transaction number is generated according to a second purchasing price of the purchasing article;
a writing module 402, configured to write the second purchasing information into the blockchain network;
a receiving module 403, configured to receive first encryption information sent by a first purchasing node; the first encrypted information is obtained after the first purchasing node performs obfuscated encryption processing on the first purchasing information and the second purchasing information, the first purchasing information comprises a first transaction number, and the first transaction number is generated according to a first purchasing price of a purchased article;
an obtaining module 404, configured to decrypt the first encrypted information, and obtain a comparison result of the first purchase price and the second purchase price;
the writing module 402 is further configured to write the comparison result into the blockchain network.
In a possible embodiment, the receiving module 403 is specifically configured to:
receiving first encryption information, second encryption information and fourth encryption information sent by a first purchasing node; the second encryption information is obtained after the first purchasing node encrypts the first purchasing information, the fourth encryption information is obtained after the first purchasing node transmits the third encryption information carelessly, and the third encryption information is obtained after the first purchasing node encrypts the second purchasing information.
In a possible embodiment, the obtaining module 404 is specifically configured to:
according to the sequence of each character in the second encrypted information, decrypting the first encrypted information according to the character in the second encrypted information, the character at the corresponding position in the fourth encrypted information and the last logical operation result to obtain the current logical operation result;
until each character in the second encryption information and the fourth encryption information is processed, obtaining a final logical operation result;
and obtaining a comparison result of the first purchase price and the second purchase price according to the final logical operation result.
Based on the same inventive concept, the present application provides a transaction data processing device, referring to fig. 5, which corresponds to the first purchasing node B1 or the second purchasing node B2 discussed above, and includes:
at least one processor 501, and
a memory 502 communicatively coupled to the at least one processor 501;
wherein the memory 502 stores instructions executable by the at least one processor 501, the at least one processor 501 implements the transaction data processing method as described above by executing the instructions stored by the memory 502.
As an example, the processor 501 in fig. 5 may implement the transaction data processing method discussed above, and the processor 501 may also implement the functions of the apparatus discussed above in fig. 3 or fig. 4.
Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the transaction data processing method as described above.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (12)

1. A transaction data processing method is applied to a first purchasing node, the first purchasing node is a device corresponding to a bidder in a block chain network, the block chain network further comprises a second purchasing node and a selling node, and the method comprises the following steps:
when a selling request is acquired from the block chain network, first purchasing information is generated; wherein the sell request is for the sell node to request to sell an item, the first procurement information comprises a first transaction number generated from a first procurement price to procure the item;
writing the first purchasing information into the block chain network, and acquiring second purchasing information of the second purchasing node from the block chain network; wherein the second procurement information includes a second transaction number, the second transaction number generated according to a second procurement price provided by the second procurement node for the item;
obfuscating and encrypting the first purchase information and the second purchase information to obtain first encrypted information;
and sending the first encrypted information to the second purchasing node so that the second purchasing node decrypts the first encrypted information to obtain a comparison result of the first purchasing price and the second purchasing price, and writing the comparison result into the block chain network.
2. The method of claim 1, wherein obfuscating the encryption process of the first procurement information and the second procurement information to obtain first encrypted information comprises:
encrypting the first purchase information to obtain second encrypted information, and encrypting the second purchase information to obtain third encrypted information;
obfuscating and encrypting the second encrypted information and the third encrypted information to obtain first encrypted information;
sending the first encrypted information to the second purchasing node, including:
and sending the first encryption information and the second encryption information to the second purchasing node, and transmitting the third encryption information to the second purchasing node through carelessness.
3. The method according to claim 2, wherein the second encrypted information and the third encrypted information are character strings, and obfuscating encryption processing of the second encrypted information and the third encrypted information to obtain first encrypted information includes:
according to the sequence of each character in the second encryption information, performing logical operation on the character in the second encryption information, the character at the corresponding position in the third encryption information and the last logical operation result respectively to obtain the current logical operation result;
until each character in the second encryption information and the third encryption information is processed, obtaining each logical operation result;
encrypting the characters in the second encryption information, the characters at the corresponding positions in the third encryption information, the previous logical operation result and the current logical operation result according to the sequence of the characters in the second encryption information to obtain each encryption result;
first encryption information is obtained according to the encryption result of each time.
4. The method of claim 2 or 3, wherein the first purchasing node includes a comparison circuit to encrypt the first purchasing information to obtain second encrypted information, and to encrypt the second purchasing information to obtain third encrypted information, including:
encrypting the first transaction number, the logic connection relation information among the comparators in the comparison circuit, the state information output by each comparator in the comparison circuit and the first timestamp of the first transaction number to obtain second encryption information;
and encrypting the second transaction number, the logic connection relation information among the comparators in the comparison circuit, the state information output by each comparator in the comparison circuit and a second timestamp of the second transaction number to obtain third encryption information.
5. The method as claimed in claim 4, wherein performing logic operations on the characters in the second encrypted information, the characters at the corresponding positions in the third encrypted information, and the previous logic operation result according to the sequence of the characters in the second encrypted information to obtain the current logic operation result comprises:
and inputting the characters in the second encryption information, the characters at the corresponding positions in the third encryption information and the output result of the last comparator into a current comparator in the comparison circuit according to the sequence of the characters in the second encryption information, and taking the output of the current comparator as the current logical operation result.
6. A transaction data processing method is applied to a second purchasing node, the second purchasing node is a device corresponding to a bidder in a block chain network, the block chain network further comprises a first purchasing node and a selling node, and the method comprises the following steps:
when a selling request is acquired from the block chain network, second purchasing information is generated; wherein the sale request is that the sale node is to request to sell an item, the second procurement information includes a second transaction number, the second transaction number generated from a second procurement price for procurement of the item;
writing the second procurement information into the blockchain network;
receiving first encryption information sent by the first purchasing node; wherein the first encryption information is obtained after the first purchasing node obfuscates and encrypts the first purchasing information and the second purchasing information, the first purchasing information includes a first transaction number, and the first transaction number is generated according to a first purchasing price for purchasing the item;
decrypting the first encrypted information to obtain a comparison result of the first purchase price and the second purchase price;
and writing the comparison result into the block chain network.
7. The method of claim 6, wherein receiving the first encrypted information sent by the first purchasing node comprises:
receiving first encryption information, second encryption information and fourth encryption information sent by the first purchasing node; the second encryption information is obtained after the first purchasing node encrypts the first purchasing information, the fourth encryption information is obtained after the first purchasing node inadvertently transmits third encryption information, and the third encryption information is obtained after the first purchasing node encrypts the second purchasing information.
8. The method of claim 7, wherein decrypting the first encrypted information to obtain the comparison of the first purchase price and the second purchase price comprises:
according to the sequence of each character in the second encrypted information, decrypting the first encrypted information according to the character in the second encrypted information, the character at the corresponding position in the fourth encrypted information and the last logical operation result to obtain the current logical operation result;
until each character in the second encryption information and the fourth encryption information is processed, obtaining a final logical operation result;
and obtaining a comparison result of the first purchase price and the second purchase price according to the final logical operation result.
9. A transaction data processing apparatus, disposed in a first purchasing node, the first purchasing node being a device corresponding to a bidder in a blockchain network, the blockchain network further including a second purchasing node and a selling node, the apparatus comprising:
the generation module is used for generating first purchasing information when a selling request is acquired from the block chain network; wherein the sell request is for the sell node to request to sell an item, the first procurement information comprises a first transaction number generated from a first procurement price to procure the item;
the writing module is used for writing the first purchasing information into the block chain network;
the acquisition module is used for acquiring second purchasing information of the second purchasing node from the block chain network; wherein the second procurement information includes a second transaction number, the second transaction number generated according to a second procurement price provided by the second procurement node for the item;
the obtaining module is used for carrying out confusion encryption processing on the first purchase information and the second purchase information to obtain first encryption information;
and the sending module is used for sending the first encrypted information to the second purchasing node so as to enable the second purchasing node to decrypt the first encrypted information, obtain a comparison result of the first purchasing price and the second purchasing price, and write the comparison result into the block chain network.
10. A transaction data processing device is characterized in that the transaction data processing device is arranged in a second purchasing node, the second purchasing node is a device corresponding to a bidding party in a block chain network, the block chain network further comprises a first purchasing node and a selling node, and the device comprises:
the generating module is used for generating second purchasing information when a selling request is acquired from the block chain network; wherein the sale request is that the sale node is to request to sell an item, the second procurement information includes a second transaction number, the second transaction number generated from a second procurement price for procurement of the item;
the writing module is used for writing the second purchasing information into the block chain network;
the receiving module is used for receiving first encryption information sent by the first purchasing node; wherein the first encryption information is obtained after the first purchasing node obfuscates and encrypts the first purchasing information and the second purchasing information, the first purchasing information includes a first transaction number, and the first transaction number is generated according to a first purchasing price for purchasing the item;
the obtaining module is used for decrypting the first encrypted information to obtain a comparison result of the first purchase price and the second purchase price;
the writing module is further configured to write the comparison result into the block chain network.
11. A transaction data processing device, comprising:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to perform the method of any of claims 1-5 or 6-8 by executing the instructions stored by the memory.
12. A computer-readable storage medium having stored thereon computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-5 or 6-8.
CN202011477865.9A 2020-12-15 2020-12-15 Transaction data processing method, device, equipment and medium Pending CN114638699A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011477865.9A CN114638699A (en) 2020-12-15 2020-12-15 Transaction data processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011477865.9A CN114638699A (en) 2020-12-15 2020-12-15 Transaction data processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114638699A true CN114638699A (en) 2022-06-17

Family

ID=81944384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011477865.9A Pending CN114638699A (en) 2020-12-15 2020-12-15 Transaction data processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114638699A (en)

Similar Documents

Publication Publication Date Title
CN108681853B (en) Logistics information transmission method, system and device based on block chain
CN109544160B (en) Transaction authenticity verification method and system based on block chain and intelligent contract
CN107454114B (en) Auction method, server and readable storage medium
TWI727114B (en) Data sending method and device
CN106527673B (en) Bind method and apparatus, electric paying method and the device of wearable device
US20200058023A1 (en) Decentralized Data Marketplace
JP5766199B2 (en) Secure mobile payment processing
CN101978646B (en) For performing the system and method for file distributing and purchase
CN111047443B (en) User scoring method and device, electronic equipment and computer readable storage medium
TW202023225A (en) Invoice access method and device based on block chain and electronic equipment
CN108650077B (en) Block chain based information transmission method, terminal, equipment and readable storage medium
US11917075B2 (en) Multi-signature security account control system
CN102790767B (en) Information safety control method, information safety display equipment and electronic trading system
WO2017092654A1 (en) Pos machine transaction processing method and system
CN111047321A (en) Service processing method and device, electronic equipment and storage medium
US11949671B2 (en) Systems and methods for managing secure sharing of online data
CN114401268A (en) Cross-link data sharing method, system, equipment and readable storage medium
CN111178840A (en) Service processing method, device, system, electronic equipment and storage medium
CN112581253A (en) Method for determining credit limit and secure multiparty computing system
CN111340477A (en) Service processing method and device, electronic equipment and storage medium
CN111861462B (en) Financial product transaction method and device based on blockchain
CN114240547A (en) Steel trade transaction method, system, device and storage medium based on digital signature
US11133926B2 (en) Attribute-based key management system
CN114514550A (en) Partitioning requests into blockchains
CN116823257A (en) Information processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination