CN112883419A - Data consensus method and device among nodes in distributed network and node equipment - Google Patents

Data consensus method and device among nodes in distributed network and node equipment Download PDF

Info

Publication number
CN112883419A
CN112883419A CN202110152144.9A CN202110152144A CN112883419A CN 112883419 A CN112883419 A CN 112883419A CN 202110152144 A CN202110152144 A CN 202110152144A CN 112883419 A CN112883419 A CN 112883419A
Authority
CN
China
Prior art keywords
data
node
hash
nodes
network
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.)
Granted
Application number
CN202110152144.9A
Other languages
Chinese (zh)
Other versions
CN112883419B (en
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.)
Li Caimei
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202110152144.9A priority Critical patent/CN112883419B/en
Publication of CN112883419A publication Critical patent/CN112883419A/en
Application granted granted Critical
Publication of CN112883419B publication Critical patent/CN112883419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a device and node equipment for data consensus among nodes in a distributed network, which are very valuable for ensuring that 100% of data can reach any number of nodes and 100% of data received by the nodes are the same in a distributed network system formed by a plurality of network nodes; because the data can be transmitted to the target node one hundred percent technically, the data received by the target node is 100 percent consistent, and the data is difficult to alter or delete, and can be trusted by all parties, so that the data generates credit; the problem that data provided by the main bodies relative to each other cannot be trusted due to the possibility of counterfeiting in the economic activity is solved, and the efficiency of the economic activity is greatly promoted; the traditional block chain can only realize data consistency of the whole network, and can not realize consistency among any number of partial nodes, so that the problem of protecting business privacy can not be solved. The invention can realize the consistency of the whole network and the consistency among any number of nodes.

Description

Data consensus method and device among nodes in distributed network and node equipment
Technical Field
The invention relates to the technical field of data consensus and block chaining, in particular to the field of how data can dynamically complete consensus among any nodes.
Background
The advent of blockchain technology successfully addresses the long-standing mode in which human trust can only be demonstrated by an authoritative third party. After all, the neutral third party is authoritative, and the possibility of being hooked up is avoided. The best mode for obtaining the trust among people can only be a multi-party mutual witness mode. In the multi-party mutual witness mode, collusion change is much more difficult than the certification of an authoritative third party, so the witness is naturally higher. However, under the traditional conditions, multiple parties commonly witness that the operation cost is too high, the efficiency is too low, and practically, the method is hardly feasible except for few scenes. Thus, for millions of years, third party proven trust models have become prevalent in human society for cost and efficiency reasons.
The advent of blockchain technology has provided a practically acceptable cost and efficiency method for multiple parties to jointly witness. The method for establishing trust in the human society must be rewritten, so that the operation mode of the human society can be thoroughly reformed finally.
However, to date, the blockchain technique can only solve the problem of data consensus over the entire network, i.e., data is transparently disclosed between all nodes joining the blockchain. The problem of data consensus among any number of nodes, i.e. data is only publicly transparent among any designated nodes, has not been solved.
In view of the complexity of human behaviors and the importance of privacy, all things need to be published in a whole network, and the method is not suitable for most human activity scenes, so that the popularization and the application of a trust mode which is commonly seen by multiple parties and is a block chain are greatly limited. The invention provides a method for completing data consensus among any number of nodes. The purpose is to clear the limitation of the block chain and enable the block chain which is a trust mode witnessed by multiple parties to better serve the human society.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method, an apparatus, and a node device for implementing data consensus among nodes in a distributed network, which can effectively complete data consensus among any number of nodes in the distributed network, that is, ensure that 100% of data reaches a target node and 100% of data received by all target nodes are consistent, thereby effectively solving the above problems.
In a first aspect, an embodiment of the present invention provides a method for implementing data consensus among nodes in a distributed network, where the method includes:
s01, forming a block chain network by a plurality of nodes by using a block chain technology;
s02, directly publishing data needing whole network disclosure to the block chain network;
s03, issuing hash of data which cannot be disclosed in the whole network, a target node to be sent and information of a sending node to the block chain network;
s04, after each node receives a block, checking transactions contained in the block, and actively requesting data corresponding to the hash from the sending node if only the hash is found, no data is found, and the target node contains the target node;
s05, after the sending node receives the request, the identity of the requesting node is verified by using an asymmetric encryption technology, and after the sending node is confirmed to be the target node, the data is encrypted by using a public key of the requesting node and is sent to the requesting node;
and S06, after the data request node receives the data, decrypting the data by using a private key of the data request node, calculating the hash of the data, comparing the hash with the hash obtained from the block, if the hash is the same as the hash obtained from the block, indicating that the data is consistent with other nodes, otherwise, discarding the data, and continuing to repeat the request until the hash comparison is consistent.
The further scheme is that the data needing to be disclosed in the whole network refers to data of which the sending target is all nodes in the block chain network; publishing the data directly as a transaction onto the blockchain network.
The data which can not be disclosed in the whole network, namely the data which can only be disclosed at partial nodes, is not directly issued to the block chain, but the hash of the data, the information of the sending target node and the information of the sending node are packed together and issued to the block chain network as a transaction.
The further scheme is that after the sending target node receives the block, the transaction in the block is checked, if the transaction only contains the hash and does not contain data, and the sending target node comprises the sending target node, the sending target node signs the hash by using a private key of the sending target node, sends the hash and the signature to the sending node and requests the data corresponding to the hash.
The further scheme is that after the sending node receives the data request, the public key of the requesting node is used for verifying the signature, the verification is passed, and if the requesting node is the target sending object node, the public key of the requesting node is used for encrypting the data and sending the data to the requesting node, otherwise, the request is rejected.
The data request node decrypts the data by using its own private key after receiving the data sent by the sending node, then calculates the hash of the data, and compares the hash with the hash of the block, if the two are completely the same, because the hashes received over the whole network are consistent, it can be determined that the data is consistent with other nodes, the data is stored, otherwise, the data is discarded, and the request is continuously initiated until the hash comparison is consistent.
In a second aspect, an embodiment of the present invention further provides a device for data consensus among nodes in a distributed network, where the device includes:
the networking module is used for forming a block chain network by a plurality of nodes by using a block chain technology;
the first publishing module is used for directly publishing the data needing the whole network disclosure to the block chain network;
the second publishing module is used for publishing the hash of the data which can not be published in the whole network, the sent target node and the sending node information to the block chain network;
the data request module is used for checking the transaction contained in the block after each node receives the block, and actively requesting the data corresponding to the hash from the sending node if only the hash is found, no data is found, and the target node contains the data;
a request verification module, configured to verify the identity of the requesting node by using an asymmetric encryption technology after the sending node receives the request, and after the sending node confirms that the sending node is the target node, encrypt the data by using a public key of the requesting node and send the data to the requesting node;
and the data verification module is used for decrypting the data by using a private key of the data request node after the data request node receives the data, calculating the hash of the data, comparing the hash with the hash obtained from the block, if the hash is the same as the hash obtained from the block, indicating that the data is consistent with other nodes, otherwise, indicating that the data is inconsistent, discarding the data, and continuing to repeat the request until the hash comparison is consistent.
In a third aspect, the embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, the method is performed.
In a fourth aspect, an embodiment of the present invention further provides a node device, which includes a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the above method through the computer program.
According to the invention, each node in the distributed network forms a block chain network by using a block chain technology, for data needing to be disclosed in the whole network, the block chain network is directly used for completing the consistency of the whole network, the block chain network can ensure that the data is finally sent to all the nodes by 100%, and the data received by all the nodes is 100% consistent; for data which cannot be disclosed in the whole network and can only be disclosed among a part of nodes, the data is not directly issued to the blockchain, but the hash of the data, the target object of transmission and the sender information are issued to the blockchain; after the target node receives the block, the transaction in the block is checked, and if only hash is found, no data exists and the sending object contains the target node, the target node actively requests the sending node for the data corresponding to the hash; after receiving the request, the sending node verifies the identity of the opposite party by using an asymmetric encryption technology, confirms that the requesting node is really a sending target, encrypts data by using a public key of the requesting node and then sends the encrypted data to the data requesting node; after the data request node receives the data, the data request node decrypts the data by using a private key of the data request node, calculates the hash of the data, and if the hash is consistent with the hash obtained from the block, the hash in the block is also necessarily consistent because the block is received in the whole network, so that the data can be confirmed to be consistent with the hash received by other nodes; the method for realizing data consensus among any number of nodes in the distributed network has the following beneficial technical effects. In many activity scenarios of human society, different information is necessarily only suitable to be disclosed in different scopes based on the need of privacy protection. With the method of the invention, this effect can be achieved with convenience and low cost. Therefore, the method can greatly promote the activity scene of the human society to establish trust and greatly promote the prosperity and development of the human society.
Drawings
FIG. 1 is a flowchart of a method for implementing data consensus among nodes in a distributed network according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the operation of a program network according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of implementing data consensus among nodes in a distributed network according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a node device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In general, any network connection is not 100% reliable, and a machine is not 100% reliable, so that data transmission between any two computing devices cannot be 100% reliable, and it is difficult to ensure 100% delivery and 100% consistency of data between any number of multiple nodes.
As shown in fig. 1 to 2, each node in the distributed network forms a blockchain network by using a blockchain technology, and for data that needs to be disclosed in the whole network, the blockchain network is directly used to complete the consistency of the whole network, and the blockchain network can ensure that 100% of the data is finally sent to all nodes and 100% of the data received by all nodes is consistent; for data which cannot be disclosed in the whole network and can only be disclosed among a part of nodes, the data is not directly issued to a blockchain, but the hash of the data, a target object to be sent and sender information are issued to the blockchain; after the target node receives the block, checking the transaction in the block, and if only hash is found, no data exists, and the sending target node contains the target node, actively requesting the sending node for the data corresponding to the hash; after receiving the request, the sending node verifies the identity of the opposite party by using an asymmetric encryption technology, encrypts data by using a public key of the requesting node after confirming that the requesting node is really a sending target, and then sends the data to the data requesting node; after the data request node receives the data, the data request node decrypts the data by using a private key of the data request node, and then calculates the hash of the data, if the hash is consistent with the hash obtained from the block, the hash in the block is also necessarily consistent because the block received by the whole network is the same, so that the data can be confirmed to be consistent with the hash received by other nodes;
the embodiment of the invention provides a data consensus method among distributed network nodes, which comprises the following steps:
s01, a plurality of nodes in the distributed network form a block chain network by using a block chain technology;
s02, directly publishing the data needing to be published in the whole network to the block chain, and finally enabling all network nodes to receive the data in percentage by using the block chain technology, wherein the data received by all the nodes are consistent;
s03, for the data which cannot be disclosed in the whole network and can only be disclosed among partial nodes, only the hash of the data, the sent target node and the sent node information are issued to the block chain; the target node is a part of nodes in the block chain network and not all the nodes.
S04, after each node receives the block, checking the transaction contained in the block, and actively requesting data corresponding to the hash from the sending node if only the hash exists, no data exists and the target object contains the node;
s05, after the sending node receives the request, the identity of the requesting node is verified by using an asymmetric encryption technology, after the sending node is confirmed to be the sending target node, the data is encrypted by using a public key of the requesting node and sent to the requesting node, and if the data is not the sending target node, the request is rejected;
s06, after the data request node receives the data, decrypting the data by using a private key of the data request node, calculating the hash of the data, comparing the hash with the hash obtained from the block, if the hash is the same as the hash obtained from the block, indicating that the data is consistent with other nodes, otherwise, discarding the data, and continuing to repeat the request until the hash comparison is consistent;
the method for realizing data consensus among any number of nodes in the distributed network is achieved.
Further, all nodes in the distributed network form a blockchain network by using a conventional blockchain technology, and the blockchain network may be based on any blockchain technology.
Further, the data which needs to be disclosed in the whole network refers to the data of which the sending target is all nodes in the whole network; and directly issuing the data as a transaction to the block chain, and finally receiving the data by one hundred percent by all the nodes of the whole network by using the technical characteristics of the block chain, wherein the received data is consistent with other nodes by one hundred percent.
Further, the data which cannot be disclosed in the whole network and can be disclosed only by partial nodes is not directly issued to the blockchain, but the hash of the data, the information of the sending target node and the information of the sending node are packaged together and issued to the blockchain as a transaction.
Further, after receiving the block, the sending target node checks the transaction in the block, and if the transaction only contains hash and does not contain data, and the sending target node includes itself, signs the hash by using its own private key, and sends the hash and the signature to the sending node to request the data corresponding to the hash.
Further, after receiving the data request, the sending node verifies the signature by using the public key of the requesting node, the verification is passed, the requesting node is the target sending object node, the public key of the requesting node is used for encrypting the data, and the data is sent to the requesting node, otherwise, the request is rejected.
Further, after receiving the data sent by the sending node, the data requesting node decrypts the data by using its own private key, calculates the hash of the data, and compares the hash with the hash of the block, if the two are completely the same, because the block received by the whole network is the same, the hashes in the block are also necessarily consistent, so that the data can be determined to be consistent with other nodes, the data is stored, otherwise, the data is discarded, and the request is continuously initiated until the hash comparison is consistent.
Therefore, the data can be sent to any number of nodes 100% according to the requirement, and 100% of the data received by the nodes is consistent with other nodes, so that the method for realizing data consensus among any number of nodes in the distributed network is completed.
By using the method of the invention, the main body can select the range of data to be disclosed according to different needs of business or society, 100% of the data is delivered to the target object, and the data received by the target object is 100% consistent with other target nodes. Making it difficult for data recorded in this form to be falsified and deleted, thereby creating trust.
Referring to fig. 3, fig. 3 is a schematic diagram of a data consensus device between distributed network nodes according to an embodiment of the present invention; the image magnification device can be applied to a node device.
As shown in fig. 3, the data consensus device 30 between the distributed network nodes includes: a networking module 31, configured to form a blockchain network by using a blockchain technique for a plurality of nodes in the distributed network;
the first distribution module 32 is configured to directly distribute the data that needs to be published over the entire network to the blockchain, and implement that the data can be received by the nodes over the entire network in the end by percentage by using the blockchain technology, and the data received by all the nodes are consistent;
a second publishing module 33, configured to publish the hash of the data that cannot be published over the entire network, the sent target node, and the sending node information to the blockchain; the data which cannot be disclosed in the whole network is data which is disclosed only among partial nodes;
a data request module 34, configured to check the transactions included in the block after each node receives the block, and if only the hash is found, no data is found, and the target object includes itself, actively request the sending node for data corresponding to the hash;
a request verification module 35, configured to verify the identity of the requesting node by using an asymmetric encryption technology after the sending node receives the request, and after the sending node confirms that the sending node is the target node, encrypt the data by using a public key of the requesting node and send the data to the requesting node, otherwise, reject the request;
and the data verification module 36 is configured to decrypt the data with a private key of the data request node after the data request node receives the data, calculate a hash of the data, compare the hash with the hash obtained from the block, if the hash is the same as the hash obtained from the block, indicate that the data is consistent with other nodes, otherwise, discard the data, and continue to repeat the request until the hash comparison is consistent.
Further, the data which needs to be disclosed in the whole network refers to the data of which the sending target is all nodes in the whole network; and directly issuing the data as a transaction to the block chain, and finally receiving the data by one hundred percent by all the nodes of the whole network by using the technical characteristics of the block chain, wherein the received data is consistent with other nodes by one hundred percent.
Further, the data which cannot be disclosed in the whole network and can be disclosed only by partial nodes is not directly issued to the blockchain, but the hash of the data, the information of the sending target node and the information of the sending node are packaged together and issued to the blockchain as a transaction.
Further, after receiving the block, the sending target node checks the transaction in the block, and if the transaction only contains hash and does not contain data, and the sending target node includes itself, signs the hash by using its own private key, and sends the hash and the signature to the sending node to request the data corresponding to the hash.
Further, after receiving the data request, the sending node verifies the signature by using the public key of the requesting node, the verification is passed, the requesting node is the target sending object node, the public key of the requesting node is used for encrypting the data, and the data is sent to the requesting node, otherwise, the request is rejected.
Further, after receiving the data sent by the sending node, the data requesting node decrypts the data by using its own private key, calculates the hash of the data, and compares the hash with the hash of the block in claim 5, if the two are identical, because the block received by the whole network is identical, the hashes in the blocks are also necessarily identical, so that it can be determined that the data is identical to other nodes, store the data, otherwise, discard the data, and continue to initiate the request until the hash comparison is identical.
Therefore, the data can be sent to any number of nodes 100% according to the requirement, and 100% of the data received by the nodes is consistent with other nodes, so that the method for realizing data consensus among any number of nodes in the distributed network is completed.
Since the apparatus embodiment and the method embodiment are based on the same concept, the contents of the apparatus embodiment may refer to the method embodiment on the premise that the contents do not conflict with each other, and are not described herein again.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a node device according to an embodiment of the present invention. As shown in fig. 4, the node apparatus 40 includes one or more processors 41 and a memory 42. In fig. 4, one processor 41 is taken as an example.
The processor 41 and the memory 42 may be connected by a bus or other means, such as the bus connection in fig. 4.
The memory 42 is a non-volatile computer-readable storage medium and can be used for storing non-volatile software programs, non-volatile computer-executable programs, and modules, such as units (e.g., units described in fig. 3) corresponding to the method for implementing data consensus among nodes in a distributed network according to the embodiment of the present invention. The processor 41 executes various functional applications of the method for realizing data consensus among nodes in the distributed network and data processing, namely, functions of the method for realizing data consensus among nodes in the distributed network and the various modules and units of the above device embodiments, by running nonvolatile software programs, instructions and modules stored in the memory 42.
The memory 42 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 42 may optionally include memory located remotely from processor 41, which may be connected to processor 41 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The modules are stored in the memory 42 and, when executed by the one or more processors 41, perform a method for implementing data consensus among nodes in a distributed network in any of the above-described method embodiments, e.g., performing the various steps described above and shown in fig. 1; the functions of the various modules or units described in fig. 3 may also be implemented.
Processors of embodiments of the invention exist in a variety of forms, including but not limited to:
(1) tower type processor
The general tower type processor chassis is almost as large as the commonly used PC chassis, while the large tower type chassis is much larger, and the overall dimension is not a fixed standard.
(2) Rack-mounted processor
Rack-mounted processors are a type of processor that has a standard width of 19 inch racks, with heights ranging from 1U to several U, due to the dense deployment of the enterprise. Placing the processors on the rack not only facilitates routine maintenance and management, but also may avoid unexpected failures. First, placing the processor does not take up too much space. The rack processors are neatly arranged in the rack, and no space is wasted. Secondly, the connecting wires and the like can be neatly stored in the rack. The power line, the LAN line and the like can be distributed in the cabinet, so that the connection lines accumulated on the ground can be reduced, and the accidents such as the electric wire kicking off by feet can be prevented. The specified dimensions are the width (48.26cm ═ 19 inches) and height (multiples of 4.445 cm) of the processor. Because of its 19 inch width, a rack that meets this specification is sometimes referred to as a "19 inch rack".
(3) Blade type processor
A blade processor is a HAHD (High available High Density) low cost processor platform designed specifically for application specific industries and High Density computer environments, where each "blade" is essentially a system motherboard, similar to an individual processor. In this mode, each motherboard runs its own system, serving a designated group of different users, without any relationship to each other. But the motherboards may be grouped into a processor cluster using system software. In the cluster mode, all motherboards can be connected to provide a high-speed network environment, and resources can be shared to serve the same user group.
Embodiments of the present invention further provide a non-transitory computer storage medium, where the computer storage medium stores computer-executable instructions, which are executed by one or more processors, for example, one processor 41 in fig. 4, and enable the one or more processors to perform a method for implementing data consensus among nodes in a distributed network in any of the above method embodiments, for example, perform the above-described steps shown in fig. 1; the functions of the various elements described in fig. 3 may also be implemented.
The above-described embodiments of the apparatus or device are merely illustrative, wherein the unit modules described as separate parts may or may not be physically separate, and the parts displayed as module units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions substantially or partially contributing to the related art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a processor, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (9)

1. A data consensus method among nodes in a distributed network is characterized in that:
s01, forming a block chain network by a plurality of nodes by using a block chain technology;
s02, directly publishing data needing whole network disclosure to the block chain network;
s03, issuing hash of data which cannot be disclosed in the whole network, a target node to be sent and information of a sending node to the block chain network;
s04, after each node receives a block, checking transactions contained in the block, and actively requesting data corresponding to the hash from the sending node if only the hash is found, no data is found, and the target node contains the target node;
s05, after the sending node receives the request, the identity of the requesting node is verified by using an asymmetric encryption technology, and after the sending node is confirmed to be the target node, the data is encrypted by using a public key of the requesting node and is sent to the requesting node;
and S06, after the data request node receives the data, decrypting the data by using a private key of the data request node, calculating the hash of the data, comparing the hash with the hash obtained from the block, if the hash is the same as the hash obtained from the block, indicating that the data is consistent with other nodes, otherwise, discarding the data, and continuing to repeat the request until the hash comparison is consistent.
2. The method according to claim 1, wherein the data requiring network-wide disclosure refers to data whose transmission targets are all nodes in the blockchain network; publishing the data directly as a transaction onto the blockchain network.
3. The method according to claim 1, wherein the data that cannot be published all over the network, that is, the data that can only be published at a part of nodes, is not directly published to a blockchain, but a hash of the data is packaged with the destination node information and is published to the blockchain network as a transaction.
4. The method according to claim 1, wherein the sending target node checks the transaction in the block after receiving the block, signs the hash with its own private key if the transaction only contains the hash and does not contain data, and sends the hash and the signature to the sending node to request the data corresponding to the hash.
5. The method according to claim 1, wherein after the sending node receives the data request, the public key of the requesting node is used to verify the signature, and if the signature passes the verification, and the requesting node is the target sending object node, the public key of the requesting node is used to encrypt the data and send the data to the requesting node, otherwise, the request is rejected.
6. The method of claim 1, wherein the data requesting node decrypts data with its private key after receiving the data sent by the sending node, calculates the hash of the data, and compares the hash with the hash of the block, if the two are identical, since the hashes received over the whole network are identical, it can be determined that the data is identical to other nodes, saves the data, otherwise, discards the data, and continues to initiate requests until the hash comparisons are identical.
7. An apparatus for data consensus among nodes in a distributed network, the apparatus comprising:
the networking module is used for forming a block chain network by a plurality of nodes by using a block chain technology;
the first publishing module is used for directly publishing the data needing the whole network disclosure to the block chain network;
the second publishing module is used for publishing the hash of the data which can not be published in the whole network, the sent target node and the sending node information to the block chain network;
the data request module is used for checking the transaction contained in the block after each node receives the block, and actively requesting the data corresponding to the hash from the sending node if only the hash is found, no data is found, and the target node contains the data;
a request verification module, configured to verify the identity of the requesting node by using an asymmetric encryption technology after the sending node receives the request, and after the sending node confirms that the sending node is the target node, encrypt the data by using a public key of the requesting node and send the data to the requesting node;
and the data verification module is used for decrypting the data by using a private key of the data request node after the data request node receives the data, calculating the hash of the data, comparing the hash with the hash obtained from the block, if the hash is the same as the hash obtained from the block, indicating that the data is consistent with other nodes, otherwise, indicating that the data is inconsistent, discarding the data, and continuing to repeat the request until the hash comparison is consistent.
8. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 6.
9. A node device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202110152144.9A 2021-02-03 2021-02-03 Data consensus method and device among nodes in distributed network and node equipment Active CN112883419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110152144.9A CN112883419B (en) 2021-02-03 2021-02-03 Data consensus method and device among nodes in distributed network and node equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110152144.9A CN112883419B (en) 2021-02-03 2021-02-03 Data consensus method and device among nodes in distributed network and node equipment

Publications (2)

Publication Number Publication Date
CN112883419A true CN112883419A (en) 2021-06-01
CN112883419B CN112883419B (en) 2024-04-19

Family

ID=76057149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110152144.9A Active CN112883419B (en) 2021-02-03 2021-02-03 Data consensus method and device among nodes in distributed network and node equipment

Country Status (1)

Country Link
CN (1) CN112883419B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107181599A (en) * 2017-07-18 2017-09-19 天津理工大学 The storage of route location data confidentiality and sharing method based on block chain
CN107423152A (en) * 2017-04-24 2017-12-01 杭州趣链科技有限公司 A kind of block chain common recognition node automatic recovery method
CN109086585A (en) * 2018-07-10 2018-12-25 众安信息技术服务有限公司 History data processing method, system and computer readable storage medium
CN109271805A (en) * 2018-08-10 2019-01-25 广东工业大学 A kind of storage of data subregion, querying method and system based on block chain
CN109802993A (en) * 2018-12-13 2019-05-24 深圳市链联科技有限公司 A kind of alliance's chain building method based on supply chain ecology
CN110602096A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Data processing method, device, storage medium and equipment in block chain network
WO2020088074A1 (en) * 2018-10-31 2020-05-07 阿里巴巴集团控股有限公司 Privacy transaction method and apparatus based on blockchain, and application method and apparatus therefor
CN111415252A (en) * 2020-01-23 2020-07-14 众安信息技术服务有限公司 Privacy transaction processing method and device based on block chain
CN111913833A (en) * 2020-06-28 2020-11-10 华南理工大学 Medical Internet of things transaction system based on block chain

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423152A (en) * 2017-04-24 2017-12-01 杭州趣链科技有限公司 A kind of block chain common recognition node automatic recovery method
CN107181599A (en) * 2017-07-18 2017-09-19 天津理工大学 The storage of route location data confidentiality and sharing method based on block chain
CN109086585A (en) * 2018-07-10 2018-12-25 众安信息技术服务有限公司 History data processing method, system and computer readable storage medium
CN109271805A (en) * 2018-08-10 2019-01-25 广东工业大学 A kind of storage of data subregion, querying method and system based on block chain
WO2020088074A1 (en) * 2018-10-31 2020-05-07 阿里巴巴集团控股有限公司 Privacy transaction method and apparatus based on blockchain, and application method and apparatus therefor
CN109802993A (en) * 2018-12-13 2019-05-24 深圳市链联科技有限公司 A kind of alliance's chain building method based on supply chain ecology
CN110602096A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Data processing method, device, storage medium and equipment in block chain network
CN111415252A (en) * 2020-01-23 2020-07-14 众安信息技术服务有限公司 Privacy transaction processing method and device based on block chain
CN111913833A (en) * 2020-06-28 2020-11-10 华南理工大学 Medical Internet of things transaction system based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁昊;吴鲲;仇善梁;: "基于区块链的去中心化个人隐私数据保护", 陇东学院学报, no. 02, pages 28 - 31 *

Also Published As

Publication number Publication date
CN112883419B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
KR102274294B1 (en) How to retrieve access data to a blockchain network using a highly available trusted execution environment
CN110059494B (en) Privacy protection method for block chain transaction data and block chain system
Samaniego et al. Zero-trust hierarchical management in IoT
CN107888562B (en) Data verification and transceiving method, node and system for parallel link access to interconnection chain
CN111556120B (en) Data processing method and device based on block chain, storage medium and equipment
US11303431B2 (en) Method and system for performing SSL handshake
CN111030814B (en) Secret key negotiation method and device
WO2020224239A1 (en) Block chain implementation method,device, system and storage medium
CN113055188B (en) Data processing method, device, equipment and storage medium
CN112600671B (en) Data processing method, device, equipment and storage medium
CN111125781B (en) File signature method and device and file signature verification method and device
CN108574687B (en) Communication connection establishment method and device, electronic equipment and computer readable medium
CN113055176B (en) Terminal authentication method and system, terminal device, P2P verification platform and medium
CN110266763A (en) Block chain network implementation method, system and the storage medium of cross-network segment interconnection
WO2022068356A1 (en) Blockchain-based information encryption method and apparatus, device and medium
CN111611623A (en) Private data processing method and device
Athena et al. Survey on public key cryptography scheme for securing data in cloud computing
CN114168923B (en) Group CA certificate generation method and system based on digital certificate
CN109302425B (en) Identity authentication method and terminal equipment
CN110737725A (en) Electronic information inspection method, device, equipment, medium and system
Paul et al. Security of the MaidSafe vault network
JP2022545809A (en) Secure environment for cryptographic key generation
WO2020093609A1 (en) Block generation method, apparatus and device for blockchain, and non-volatile readable storage medium
CN112883419A (en) Data consensus method and device among nodes in distributed network and node equipment
Hwang et al. Efficient real-time auditing and proof of violation for cloud storage systems

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240321

Address after: 518000, Room 402, Building 2, No. 37 Gongye 7th Road, Shekou, Nanshan District, Shenzhen, Guangdong Province

Applicant after: Li Caimei

Country or region after: China

Address before: 516000 room 1604, unit 2, building 5, shuishuiwan, No.3 Guihua Road, Xiqu street, Dayawan District, Huizhou City, Guangdong Province

Applicant before: Song Xinmin

Country or region before: China

GR01 Patent grant
GR01 Patent grant