A blockchain-based data comparison method and device, medium

By generating random data comparison rules and public key verification on the blockchain, the problem of data comparison in blockchain where parties are unwilling to disclose data is solved, realizing secure and confidential multi-party data comparison and result uploading, ensuring the invisibility of data and the reliability of results.

CN111752989BActive Publication Date: 2026-01-20INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010461071.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-27
Publication Date
2026-01-20
Estimated Expiration
2040-05-27

AI Technical Summary

Technical Problem

In blockchain or consortium blockchains, where members are unwilling to disclose their data to each other or to the user initiating the transaction, how can multi-party cooperation be conducted to compare data and ensure its security and confidentiality?

Method used

By obtaining the data comparison request from the initiating user, a random data comparison operation rule is generated to transform the data to be compared. The identity of the receiving user is verified using the initiating user's public key to ensure the security and confidentiality of the data comparison process. Finally, the result is uploaded to the data comparison blockchain.

Benefits of technology

It enables multi-party collaborative data comparison without disclosing the data, ensuring data security and confidentiality, and guaranteeing the authenticity, traceability, and immutability of the comparison results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111752989B_ABST
    Figure CN111752989B_ABST
Patent Text Reader

Abstract

The application discloses a kind of data comparison method and equipment based on blockchain, medium.The method includes obtaining data comparison application, at least including first to be compared data, initiating user end public key and receiving user end set, and sending initiating user end public key to receiving user end set;First to be compared data is converted to obtain first conversion data based on data comparison operation rule triggered by first to be compared data;At least one receiving user end response to data comparison application is obtained, at least including second to be compared data and initiating user end public key;According to initiating user end public key, corresponding data comparison operation rule is obtained, and second to be compared data is converted to obtain second conversion data using data comparison operation rule;Conversion data is compared and result is uploaded to blockchain.The method can compare data while ensuring that the data of each party on the blockchain is secret, so that the data is "available and invisible".
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of blockchain application, and in particular to a data comparison method and device based on blockchain, and a medium. BACKGROUND

[0002] In the digital economy era, data is the core asset of an enterprise, and encrypting and protecting data is one of the effective means to protect the assets of an enterprise. However, in the data lifecycle link, the privacy problem of the comparison process of data has not been well solved due to technical reasons.

[0003] In the past, in order to keep the comparison process of data secret, an enterprise often controls data and the data calculation and comparison process within its own control range, that is, data and the data calculation and comparison process are in a unified security domain within the enterprise, so as to protect the confidential data of the enterprise and ensure that there is no leakage of information.

[0004] However, with the development of digital economy, data sharing and data calculation mode have developed to a new height. In a blockchain or alliance chain, the various demanders of data are highly dispersed, and it is already impossible to control them in a unified security domain. In this case, how to ensure the security of data and the data calculation and comparison process in a multi-party cooperation mode and make the data of each party achieve the effect of “available but invisible” has become a technical problem to be solved urgently.

[0005] Therefore, with the development of digital economy and multi-party cooperation mode, it is urgent to develop a new data comparison method and device and medium to fill the above security gap and help the development of digital economy to a new height.

[0006] It should be noted that the above content belongs to the technical cognition range of the inventor and does not necessarily constitute prior art. SUMMARY

[0007] The embodiments of the present specification provide a data comparison method and device based on blockchain and a medium, which are used to solve the following technical problems in the prior art: in a blockchain or alliance chain, each member does not want to disclose the data owned by the member to each other, or even to a transaction initiator user terminal, but cooperation is needed and the data owned by each member needs to be compared.

[0008] The embodiments of the present specification adopt the following technical solutions:

[0009] A data comparison method based on blockchain, comprising:

[0010] obtaining a data comparison application sent by an initiating user terminal, the data comparison application including at least first comparison data, a public key of the initiating user terminal, and a set of receiving user terminals, and sending the public key of the initiating user terminal to the set of receiving user terminals;

[0011] generating a data comparison operation rule based on the first comparison data, and converting the first comparison data into first converted data using the data comparison operation rule;

[0012] obtaining a response to the data comparison application from at least one receiving user terminal in the set of receiving user terminals, the response including at least second comparison data and the public key of the initiating user terminal;

[0013] obtaining a corresponding data comparison operation rule from the set of data comparison operation rules based on the public key of the initiating user terminal, and converting the second comparison data into second converted data using the data comparison operation rule;

[0014] comparing the first converted data and the second converted data, and uploading the result to a data comparison blockchain.

[0015] In an embodiment of the data comparison method based on a blockchain, the size relationship between the converted data obtained by using the data comparison operation rule is the same as the size relationship between the comparison data.

[0016] In an embodiment of the data comparison method based on a blockchain, the sign of the converted data obtained by using the data comparison operation rule is the same as the sign of the corresponding comparison data.

[0017] In an embodiment of the data comparison method based on a blockchain, the data comparison operation rule includes at least one of addition, subtraction, multiplication, division, and a combination of addition, subtraction, multiplication, and division.

[0018] In an embodiment of the data comparison method based on a blockchain, the data comparison operation rule includes an encryption and decryption algorithm, and the encryption and decryption algorithm can encrypt and decrypt the comparison data.

[0019] Further, in any of the above data comparison methods based on a blockchain, the data comparison operation rule cannot be obtained by reverse deduction based on any set of comparison data and the corresponding converted data.

[0020] In an embodiment of the data comparison method based on a blockchain, the method further includes:

[0021] encrypting the data comparison operation rule using a public key in a secret key pair to obtain data comparison operation rule ciphertext, and storing the data comparison operation rule ciphertext in the set of data comparison operation rules, and the secret key pair is not disclosed to the user terminals on the data comparison blockchain.

[0022] Further, the data comparison method based on the blockchain further comprises:

[0023] According to the data comparison operation rule set, the data comparison operation rule ciphertext is obtained according to the public key of the initiating user terminal;

[0024] The private key in the secret key pair is called to decrypt the data comparison operation rule ciphertext, and the corresponding data comparison operation rule is obtained.

[0025] A device for data comparison based on a blockchain, characterized in that it comprises:

[0026] At least one processor; and,

[0027] The memory is in communication connection with the at least one processor; wherein,

[0028] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0029] Obtain the data comparison application sent by the initiating user terminal, wherein the data comparison application at least includes the first data to be compared, the public key of the initiating user terminal and the set of receiving user terminals, and the public key of the initiating user terminal is sent to the set of receiving user terminals;

[0030] Based on the first data to be compared, the data comparison operation rule is triggered to generate the first converted data by converting the first data to be compared;

[0031] Obtain the response of at least one receiving user terminal in the set of receiving user terminals to the data comparison application, wherein the response at least includes the second data to be compared and the public key of the initiating user terminal;

[0032] According to the data comparison operation rule set, the data comparison operation rule is obtained according to the public key of the initiating user terminal, and the second converted data is obtained by converting the second data to be compared according to the data comparison operation rule;

[0033] Compare the first converted data with the second converted data, and upload the result to the data comparison blockchain.

[0034] A non-volatile computer storage medium for data comparison based on a blockchain, storing computer executable instructions, characterized in that the computer executable instructions are set to:

[0035] Obtain the data comparison application sent by the initiating user terminal, wherein the data comparison application at least includes the first data to be compared, the public key of the initiating user terminal and the set of receiving user terminals, and the public key of the initiating user terminal is sent to the set of receiving user terminals;

[0036] generate a data comparison operation rule based on the first data to be compared, and convert the first data to be compared by using the data comparison operation rule to obtain first converted data;

[0037] obtain a response of at least one receiving user terminal in the set of receiving user terminals to the data comparison application, wherein the response at least includes second data to be compared and the public key of the initiating user terminal;

[0038] obtain a corresponding data comparison operation rule from a set of data comparison operation rules according to the public key of the initiating user terminal, and convert the second data to be compared by using the data comparison operation rule to obtain second converted data;

[0039] compare the first converted data and the second converted data, and upload the result to a data comparison blockchain.

[0040] The above at least one technical solution adopted by the embodiments of the present specification can achieve the following beneficial effects:

[0041] (1) The data comparison method based on a blockchain in the embodiments of the present specification converts the data to be compared by setting a randomly generated data comparison operation rule, and compares the converted data, which on the one hand ensures the security and confidentiality of the data of each party participating in the data comparison, so that each party cannot obtain the data of the other party, and on the other hand enables multi-party cooperation to compare the data owned by each party and obtain a comparison result.

[0042] (2) The data comparison method based on a blockchain in the embodiments of the present specification verifies a party responding to the data comparison application by using the public key of the initiating user terminal. The initiating user terminal selects the receiving user terminals that it hopes to perform data comparison with, and sends its public key to these receiving user terminals. Other user terminals cannot obtain the public key of the initiating user terminal, and thus cannot participate in the data comparison. In this way, the security and confidentiality of the data of the initiating user terminal are effectively protected, and other user terminals are prevented from participating in the data comparison at will.

[0043] (3) At the same time, the public key of the initiating user terminal is used to query and index the data comparison operation rule, so as to ensure that the initiating user terminal and the receiving user terminal perform the same complex operation of the randomly generated data comparison operation rule in the data comparison. In this way, the security and confidentiality of the data comparison operation rule are also protected, and other user terminals are prevented from obtaining the data comparison operation rule.

[0044] (4) Through the above method, in the case of separation of the data comparison application initiator user end, the receiving user end and the data calculation comparison party, the security and confidentiality of the data provided by the initiator user end and the receiving user end can be ensured, so that the data to be compared can achieve the effect of "available but invisible". At the same time, uploading the final comparison result of the data to the data comparison block chain can ensure the authenticity, traceability and non-tamperability of the comparison result. BRIEF DESCRIPTION OF DRAWINGS

[0045] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions serve to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:

[0046] Figure 1 A flowchart of a blockchain-based data comparison method provided by an embodiment of the present specification. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of the present specification clearer, the technical solutions of the present application will be described in detail below in combination with the specific embodiments of the present specification and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the specification, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0048] First, the technical concept of the technical solution disclosed by the present application is described. At present, with the rapid development of digital economy, the data sharing mode has developed to a new height. In the blockchain or alliance chain, the users with data needs are highly dispersed, and it is not possible to control the data and its comparison operation process in a unified security domain. Under this circumstance, how to realize the data security and privacy of each user end, ensure the security of each user end data and data calculation comparison process in the multi-party cooperation mode, and make the data of each party achieve the effect of "available but invisible", has become a technical problem to be solved. Therefore, a new type of blockchain-based data comparison method needs to be developed to fill the above security gap and help the better development of digital economy.

[0049] The technical solutions provided by the embodiments of the present application will be described in detail below in combination with the drawings. Figure 1 A flowchart of a blockchain-based data comparison method provided by an embodiment of the present specification.

[0050] As Figure 1As shown, a data comparison method based on a blockchain includes obtaining a data comparison application sent by an initiating user terminal, the data comparison application including at least first data to be compared, a public key of the initiating user terminal, and a set of receiving user terminals, and sending the public key of the initiating user terminal to the set of receiving user terminals; generating a data comparison operation rule based on the first data to be compared, and converting the first data to be compared to obtain first converted data using the data comparison operation rule; obtaining a response to the data comparison application from at least one receiving user terminal in the set of receiving user terminals, the response including at least second data to be compared and the public key of the initiating user terminal; obtaining a corresponding data comparison operation rule from a set of data comparison operation rules based on the public key of the initiating user terminal, and converting the second data to be compared to obtain second converted data using the data comparison operation rule; comparing the first converted data and the second converted data, and uploading a result to a data comparison blockchain.

[0051] The data comparison method based on the blockchain converts the data to be compared using the randomly generated data comparison operation rule, and indirectly obtains the size relationship between the data to be compared by comparing the converted data. This ensures the security and confidentiality of the data of each party participating in the data comparison, and makes it impossible for each party to obtain the data of the other party. In addition, the data comparison method can be used for multi-party cooperation to compare the data owned by each party and obtain the comparison result, thereby achieving the effect of "available but invisible" data.

[0052] In addition, the public key of the initiating user terminal is used to verify the identity of the user terminal responding to the data comparison application. The initiating user terminal can select the receiving user terminals with which it wants to compare data, and send its public key to these receiving user terminals. The receiving user terminals can carry the public key in their responses to achieve the purpose of verifying their identities. Other user terminals cannot obtain the public key of the initiating user terminal, and thus cannot verify their identities, and thus cannot participate in the data comparison. The data comparison method according to the embodiment of the application effectively protects the security and confidentiality of the data of the initiating user terminal, and prevents other user terminals from arbitrarily joining the comparison of the data.

[0053] The public key of the initiating user terminal is also used to index the data comparison operation rule, which ensures that the initiating user terminal and the receiving user terminals perform the same randomly generated data comparison operation rule in the data comparison operation, thereby protecting the security and confidentiality of the data comparison operation rule and preventing other user terminals from obtaining the data comparison operation rule.

[0054] In addition, the final comparison result is uploaded to the data comparison blockchain, which can ensure the authenticity, traceability, and non-tamperability of the data comparison result.

[0055] In an embodiment, the size relationship between the converted data obtained by converting the data comparison operation rule is the same as the size relationship between the data to be compared. By ensuring that the size relationship between the converted data is the same as the size relationship between the data to be compared, the purpose of indirectly comparing the sizes of the data to be compared through the converted data can be achieved.

[0056] In an embodiment, the sign of the converted data obtained by converting the data comparison operation rule is the same as the sign of the corresponding data to be compared. If the data to be compared is positive, the converted data obtained by converting the data comparison operation rule is also positive; if the data to be compared is negative, the converted data obtained by converting the data comparison operation rule is also negative. In this way, the size relationship between the data to be compared can be maintained.

[0057] The data comparison operation rule can be implemented by one of the following embodiments:

[0058] Embodiment 1: The data comparison operation rule can use at least one of the following: addition, subtraction, multiplication, division, combination of addition, subtraction, multiplication, and division. Preferably, the more complex the data comparison operation rule is, the better.

[0059] Embodiment 2: The data comparison operation rule can use a set of encryption and decryption algorithms, which can encrypt and decrypt the data to be compared.

[0060] Further, in any of the above blockchain-based data comparison methods, the data comparison operation rule cannot be obtained by reverse deduction from any data to be compared and its corresponding converted data. The data comparison operation rule cannot be obtained by reverse deduction from a group of input and output, where the input is the data to be compared and the output is the converted data obtained after conversion. In this way, the security of the data comparison operation rule can be further ensured; at the same time, the security of the data of each user end in the data comparison can also be further ensured. Because, once the data comparison operation rule is obtained by reverse deduction, it is easy to obtain the data to be compared of each user end through it.

[0061] In an embodiment, the blockchain-based data comparison method further comprises encrypting the data comparison operation rule using the public key in the secret key pair to obtain data comparison operation rule ciphertext, and storing the data comparison operation rule ciphertext in the data comparison operation rule set, the secret key pair is not disclosed to the user ends on the data comparison blockchain.

[0062] Encrypting the data comparison operation rule using the public key in the secret key pair that is not disclosed to any user end, including the initiating end, can ensure that each user end in the data comparison cannot decrypt the data comparison operation rule ciphertext, further ensuring the security of the data comparison operation rule and preventing the data comparison operation rule from being known by a user end.

[0063] Further, the data comparison method based on the blockchain further comprises obtaining the data comparison operation rule ciphertext from the data comparison operation rule set according to the initiator user end public key; calling the private key in the secret key pair to decrypt the data comparison operation rule ciphertext to obtain the corresponding data comparison operation rule.

[0064] When the data comparison operation rule is queried and called, the data comparison operation rule ciphertext is obtained through the initiator end public key index, and then the ciphertext is decrypted by using the private key in the special key pair which is not open to any user end to obtain the decrypted data comparison operation rule. In this way, the confidentiality of the data comparison operation rule can be further ensured, and the data comparison operation rule can be prevented from being cracked.

[0065] In order to facilitate understanding, the specific content of the above data comparison method based on the blockchain is further described as follows:

[0066] Firstly, a data comparison blockchain is constructed. The data comparison blockchain at least comprises a plurality of nodes, and the user ends can register to become nodes on the blockchain respectively.

[0067] When the user end a requires to compare a certain value with some user ends on the chain, the initiator user end sends a data comparison application, which contains the public key of the initiator user end, the user ends to be compared and the information of the data A to be compared.

[0068] The user end a triggers the chain code with the data A to be compared as a parameter, and the chain code randomly generates a series of operators and numbers, for example, A+20-100+50+40*20 / 100, that is, a data comparison operation rule is randomly generated, the data A to be compared is sequentially calculated according to the data comparison operation rule to obtain the converted data a, and then the calculation result is fed back to the user end a.

[0069] The above randomly generated data comparison operation rule can be simple addition, subtraction, multiplication, division or multi-step combination of addition, subtraction, multiplication and division. The data A to be compared can be converted by the data comparison operation rule to obtain the converted data. The converted data cannot change the size relationship between the plurality of data to be compared, and the data comparison operation rule cannot be deduced according to a group of input and output.

[0070] The above randomly generated data comparison operation rule can also be a set of encryption and decryption algorithm designed by cryptography, and only the same encryption and decryption algorithm needs to be used to encrypt each data to be compared.

[0071] Meanwhile, a secret key pair not open to any user terminal is generated when the data comparison blockchain is initialized, and the public key in the secret key pair can be used to encrypt the data comparison operation rule to form ciphertext, and the ciphertext is stored in the data comparison operation rule set during the data comparison process.

[0072] After receiving the data comparison application, the other nodes can determine whether to participate in the comparison according to the request information, and if so, upload the to-be-compared data B and the public key of the user terminal a to the chain code.

[0073] The chain code queries the data comparison operation rule ciphertext corresponding to the public key of the user terminal a in the data comparison operation rule set according to the public key of the user terminal a, and then calls the private key in the secret key pair to decrypt the data comparison operation rule ciphertext to obtain the corresponding data comparison operation rule. A unified data comparison operation rule is used to operate the to-be-compared data B to obtain the converted data β.

[0074] Finally, the converted data α and the converted data β are compared to indirectly obtain the comparison result of the to-be-compared data A and the to-be-compared data B, and the comparison result is uploaded to the data comparison blockchain.

[0075] Through the above data comparison method, multi-party cooperation can be completed to compare the sizes of the data owned by each party in the blockchain or alliance chain without the parties willing to disclose their data to each other or even to the transaction initiating user terminal.

[0076] The embodiment also provides a device for data comparison based on a blockchain, which comprises:

[0077] at least one processor; and

[0078] a memory in communication connection with the at least one processor; wherein

[0079] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0080] obtain a data comparison application sent by an initiating user terminal, the data comparison application at least comprising first to-be-compared data, an initiating user terminal public key and a receiving user terminal set, and send the initiating user terminal public key to the receiving user terminal set;

[0081] trigger generation of a data comparison operation rule based on the first to-be-compared data, and convert the first to-be-compared data to obtain first converted data by using the data comparison operation rule;

[0082] obtaining a response of at least one receiving user terminal in the receiving user terminal set to the data comparison application, the response including at least second to-be-compared data and the public key of the initiating user terminal;

[0083] obtaining a corresponding data comparison operation rule from a data comparison operation rule set according to the public key of the initiating user terminal, and converting the second to-be-compared data to obtain second converted data by using the data comparison operation rule;

[0084] comparing the first converted data and the second converted data, and uploading a result to a data comparison blockchain.

[0085] The embodiment also provides a nonvolatile computer storage medium based on data comparison of a blockchain, which stores computer executable instructions, wherein the computer executable instructions are configured to:

[0086] obtaining a data comparison application sent by an initiating user terminal, the data comparison application including at least first to-be-compared data, a public key of the initiating user terminal and a receiving user terminal set, and sending the public key of the initiating user terminal to the receiving user terminal set;

[0087] triggering generation of a data comparison operation rule based on the first to-be-compared data, and converting the first to-be-compared data to obtain first converted data by using the data comparison operation rule;

[0088] obtaining a response of at least one receiving user terminal in the receiving user terminal set to the data comparison application, the response including at least second to-be-compared data and the public key of the initiating user terminal;

[0089] obtaining a corresponding data comparison operation rule from a data comparison operation rule set according to the public key of the initiating user terminal, and converting the second to-be-compared data to obtain second converted data by using the data comparison operation rule;

[0090] comparing the first converted data and the second converted data, and uploading a result to a data comparison blockchain.

[0091] Each of the embodiments in the application is described in a progressive manner, and the same or similar parts of each of the embodiments can be referred to each other. Each of the embodiments mainly describes the difference from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, and thus the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0092] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0093] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can 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, etc.) containing computer-usable program code.

[0094] This invention relates to methods, apparatus (systems), and computer programs produced according to embodiments of the invention.

[0095] The flowcharts and / or block diagrams are used to describe the product. It should be understood that each block in the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the product in the flowcharts and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0096] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0097] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0098] In one typical arrangement, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0099] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) having a common memory space employing many flash memory devices. The memory is an example of computer readable media.

[0100] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0101] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements in the list, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that includes the recited element.

[0102] The above description is merely illustrative of the application, and not restrictive. Various modifications and changes can become apparent to those skilled in the art. The disclosure is intended to embrace all such modifications and changes that fall within the scope of the present application.

Claims

1. A blockchain-based data comparison method, characterized in that, The method comprises the following steps: obtaining a data comparison application sent by an initiating user terminal, the data comparison application comprising at least first comparison data, a public key of the initiating user terminal and a set of receiving user terminals, and sending the public key of the initiating user terminal to the set of receiving user terminals; generating a data comparison operation rule based on the first comparison data, and converting the first comparison data into first converted data by using the data comparison operation rule; obtaining a response of at least one receiving user terminal in the set of receiving user terminals to the data comparison application, the response comprising at least second comparison data and the public key of the initiating user terminal; obtaining a corresponding data comparison operation rule from a set of data comparison operation rules according to the public key of the initiating user terminal, and converting the second comparison data into second converted data by using the data comparison operation rule; comparing the first converted data with the second converted data, and uploading the result to a data comparison blockchain; the size relationship between the converted data obtained by using the data comparison operation rule is the same as the size relationship between the comparison data; the sign of the converted data obtained by using the data comparison operation rule is the same as the sign of the corresponding comparison data; the data comparison operation rule comprises at least one of addition, subtraction, multiplication, division, and a combination of addition, subtraction, multiplication and division; the data comparison operation rule comprises an encryption and decryption algorithm, and the encryption and decryption algorithm can encrypt and decrypt the comparison data; the data comparison operation rule cannot be obtained by reverse deduction according to any set of comparison data and the corresponding converted data; The method further comprises: encrypting the data comparison operation rule by using a public key in a secret key pair to obtain data comparison operation rule ciphertext, and storing the data comparison operation rule ciphertext in the set of data comparison operation rules, wherein the secret key pair is not disclosed to the user terminals on the data comparison blockchain; The method further comprises: obtaining the data comparison operation rule ciphertext from the set of data comparison operation rules according to the public key of the initiating user terminal; decrypting the data comparison operation rule ciphertext by using a private key in the secret key pair to obtain the corresponding data comparison operation rule.

2. A device for blockchain-based data comparison, characterized in that The method comprises the following steps: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: obtain a data comparison application sent by an initiating user terminal, the data comparison application comprising at least first comparison data, a public key of the initiating user terminal and a set of receiving user terminals, and send the public key of the initiating user terminal to the set of receiving user terminals; generate a data comparison operation rule based on the first comparison data, and convert the first comparison data into first converted data by using the data comparison operation rule; obtain a response of at least one receiving user terminal in the set of receiving user terminals to the data comparison application, the response comprising at least second comparison data and the public key of the initiating user terminal; According to the initiating user terminal public key, a corresponding data comparison operation rule is obtained from a data comparison operation rule set, and the second to-be-compared data is converted into second converted data by using the data comparison operation rule; The first converted data and the second converted data are compared, and the result is uploaded to a data comparison blockchain; The size relationship between the converted data obtained by using the data comparison operation rule is the same as the size relationship between the to-be-compared data; The sign of the converted data obtained by using the data comparison operation rule is the same as the sign of the corresponding to-be-compared data; The data comparison operation rule includes at least one of addition, subtraction, multiplication, division, and a combination of addition, subtraction, multiplication, and division; The data comparison operation rule includes an encryption and decryption algorithm, and the encryption and decryption algorithm can encrypt and decrypt the to-be-compared data; The data comparison operation rule cannot be obtained by reverse deduction according to any group of to-be-compared data and corresponding converted data; Further comprising: The data comparison operation rule is encrypted by using a public key in a secret key pair to obtain data comparison operation rule ciphertext, and the data comparison operation rule ciphertext is stored in the data comparison operation rule set, and the secret key pair is not disclosed to the user terminals on the data comparison blockchain; Further comprising: The data comparison operation rule ciphertext is obtained from the data comparison operation rule set according to the initiating user terminal public key; The data comparison operation rule is obtained by decrypting the data comparison operation rule ciphertext by using a private key in the secret key pair. 3.A non-transitory computer storage medium storing computer-executable instructions for data comparison based on blockchain, the computer-executable instructions comprising: The computer executable instructions are configured to: Obtain a data comparison application sent by an initiating user terminal, the data comparison application including at least first to-be-compared data, an initiating user terminal public key, and a receiving user terminal set, and send the initiating user terminal public key to the receiving user terminal set; Generate a data comparison operation rule based on the first to-be-compared data, and convert the first to-be-compared data into first converted data by using the data comparison operation rule; Obtain a response of at least one receiving user terminal in the receiving user terminal set to the data comparison application, the response including at least second to-be-compared data and the initiating user terminal public key; According to the initiating user terminal public key, a corresponding data comparison operation rule is obtained from a data comparison operation rule set, and the second to-be-compared data is converted into second converted data by using the data comparison operation rule; The first converted data and the second converted data are compared, and the result is uploaded to a data comparison blockchain; The size relationship between the converted data obtained by using the data comparison operation rule is the same as the size relationship between the to-be-compared data; The sign of the converted data obtained by using the data comparison operation rule is the same as the sign of the corresponding to-be-compared data; The data comparison operation rule includes at least one of addition, subtraction, multiplication, division, and a combination of addition, subtraction, multiplication, and division; The data comparison operation rule includes an encryption and decryption algorithm, and the encryption and decryption algorithm can encrypt and decrypt the to-be-compared data; The data comparison operation rule cannot be obtained by reverse deduction according to any set of to-be-compared data and corresponding converted data; Further comprising: The data comparison operation rule is encrypted by a public key in a secret key pair to obtain data comparison operation rule ciphertext, and the data comparison operation rule ciphertext is stored in the data comparison operation rule set. The secret key pair is not disclosed to the user terminals on the data comparison block chain; Further comprising: The data comparison operation rule ciphertext is obtained from the data comparison operation rule set according to the initiator user terminal public key; The data comparison operation rule ciphertext is decrypted by a private key in the secret key pair to obtain the corresponding data comparison operation rule.