CN114401271A - Test data tamper-proof method, block chain system and medium - Google Patents

Test data tamper-proof method, block chain system and medium Download PDF

Info

Publication number
CN114401271A
CN114401271A CN202210036646.XA CN202210036646A CN114401271A CN 114401271 A CN114401271 A CN 114401271A CN 202210036646 A CN202210036646 A CN 202210036646A CN 114401271 A CN114401271 A CN 114401271A
Authority
CN
China
Prior art keywords
test data
data storage
storage node
target
consensus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210036646.XA
Other languages
Chinese (zh)
Inventor
林少锋
钱凤臣
耿君峰
倪林
董长富
寇万里
张帅
张明江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
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 National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN202210036646.XA priority Critical patent/CN114401271A/en
Publication of CN114401271A publication Critical patent/CN114401271A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/30Decision processes by autonomous network management units using voting and bidding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a test data tamper-proofing method, a block chain system and a medium, wherein the method comprises the following steps: when the integrity check of the target test data fails, broadcasting a consensus proposal corresponding to a target block where the target test data is located on the first test data storage node through the first test data storage node; receiving the consensus proposal through a second test data storage node, and broadcasting the corresponding pre-vote; if the number of the pre-votes received by the second test data storage node is greater than two-thirds of the total number of the second test data storage node, broadcasting corresponding pre-confirmation votes; and if the number of the received preconfirmations of the second test data storage nodes is more than two thirds of the total number of the second test data storage nodes, judging that the target test data is not tampered, otherwise, judging that the target test data is tampered, and performing recovery operation on the test data on the first test data storage nodes. This can prevent the test data in the blockchain system from being falsified or forged.

Description

Test data tamper-proof method, block chain system and medium
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method for preventing test data from being tampered, a blockchain system, and a medium.
Background
Currently, the blockchain technology has practical application cases in the fields of justice, industry, credit, copyright, medical treatment, finance, etc., and has been verified in a marketized manner, for example: a judicial evidence storage chain, an industrial internet, a star fire chain network, a source tracing chain, an enterprise credit investigation chain and the like. In addition, the block chain technology can also be applied to the related fields of test data storage and management, and the block chain integrates the technologies of point-to-point transmission, distributed data storage, a consensus mechanism, an encryption algorithm and the like, has the characteristics of non-falsification, traceability, decentralization and the like, is very suitable for storing and sharing the test data, and can effectively manage the test data. However, in the face of the requirements of massive, multi-source and heterogeneous test data storage, transmission, retrieval, sharing and the like, the block chain still has the problems that test data on some nodes are tampered, forged and the like.
In view of the above problems, in the prior art, malicious nodes are mainly discovered through a practical byzantine fault-tolerant (PBFT) algorithm and test data are recovered, but the practical byzantine fault-tolerant algorithm is insufficient, that is, the algorithm performance depends on the number of consensus nodes, and each node related to consensus needs to perform P2P (peer-to-peer) communication with other nodes to realize consensus synchronization, so that the performance is reduced quickly with the increase of nodes, and when the number of nodes reaches more than 1000, a huge amount of communication overhead is caused to a block chain network, which affects the performance of the block chain system.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method for preventing test data from being tampered with and forged in a blockchain system, a blockchain system and a medium, which can prevent test data in the blockchain system from being tampered with and forged, recover data when the test data is tampered with and forged, save the number of network communications in a consensus process, and improve the performance of the blockchain system. The specific scheme is as follows:
in a first aspect, the application discloses a method for preventing test data from being tampered, which is applied to a block chain system and includes:
when target test data integrity check failure information sent by a client is received, broadcasting a consensus proposal corresponding to a target block where target test data are located on a first test data storage node through the first test data storage node, wherein the first test data storage node is a node sending the target test data to the client;
receiving the consensus proposal through a second test data storage node, and performing pre-voting corresponding to the consensus proposal in a broadcasting mode, wherein the second test data storage node and the first test data storage node are in a duplicate node relationship;
if the number of the pre-votes received by the second test data storage node is more than two thirds of the total number of the second test data storage node, performing pre-confirmation voting corresponding to the consensus proposal by the second test data storage node in a broadcasting mode;
and if the number of the received preconfirmations of the second test data storage node is more than two thirds of the total number of the second test data storage node, judging that the target test data on the first test data storage node is not tampered, otherwise, judging that the target test data on the first test data storage node is tampered, and performing recovery operation on the test data on the first test data storage node.
Optionally, the broadcasting, by the first test data storage node, a consensus proposal corresponding to a target block where target test data on the first test data storage node is located includes:
and broadcasting a consensus proposal corresponding to a target block where target test data on a first test data storage node is located by the first test data storage node by adopting a gossip protocol.
Optionally, the receiving, by the second experimental data storage node, the consensus offer and performing pre-vote corresponding to the consensus offer in a broadcast manner includes:
receiving, by a second experimental data storage node, the consensus proposal;
integrity verification is carried out on the copy data corresponding to the target test data stored by the second test data storage node through the second test data storage node, and a verification result is obtained;
and pre-voting corresponding to the consensus proposal is carried out by the second test data storage node according to the verification result in a broadcasting mode.
Optionally, the integrity verification of the copy data corresponding to the target test data stored in the second test data storage node by the second test data storage node to obtain a verification result includes:
calculating a HASH value of copy data corresponding to the target test data stored by the second test data storage node through the second test data storage node to obtain a first HASH value;
comparing the first HASH value to a second HASH value, wherein the second HASH value is the HASH value of the target test data;
and if the first HASH value is the same as the second HASH value, judging that the verification is passed, otherwise, judging that the verification is not passed, and obtaining a verification result.
Optionally, the pre-voting corresponding to the consensus offer by the second experimental data storage node according to the verification result in a broadcast manner includes:
if the verification result shows that the verification is passed, broadcasting the pre-vote corresponding to the consensus proposal through the second test data storage node;
and if the check result shows that the check is not passed, broadcasting a null pre-vote corresponding to the consensus proposal through the second test data storage node.
Optionally, after the receiving, by the second experimental data storage node, the consensus offer and performing pre-vote corresponding to the consensus offer in a broadcast manner, the method further includes:
and if the number of the pre-votes received by each second test data storage node is less than two thirds of the total number of the second test data storage nodes, determining that the target test data on the first test data storage node is tampered, and performing recovery operation on the test data on the first test data storage node.
Optionally, the method for preventing the test data from being tampered further includes:
when target test data integrity check failure information sent by a client is received, activating an anti-tampering intelligent contract so that the first test data storage node and the second test data storage node start a consensus mechanism to perform consensus on a target block where target test data on the first test data storage node are located.
In a second aspect, the present application discloses a blockchain system, comprising:
the system comprises a first test data storage node and a second test data storage node, wherein the first test data storage node is used for broadcasting a consensus proposal corresponding to a target block where target test data are located on the first test data storage node when target test data integrity check failure information sent by a client is received, and the first test data storage node is a node for sending the target test data to the client;
the second test data storage node is used for receiving the consensus proposal and performing pre-voting corresponding to the consensus proposal in a broadcasting mode, wherein the second test data storage node and the first test data storage node are in a duplicate node relationship;
the second test data storage node is used for carrying out pre-confirmation voting corresponding to the consensus proposal in a broadcasting mode when the number of the received pre-votes is greater than two thirds of the total number of the second test data storage node;
the second test data storage node is used for judging that the target test data on the first test data storage node is not tampered when the number of the received pre-confirmations is greater than two thirds of the total number of the second test data storage node, and otherwise, judging that the target test data on the first test data storage node is tampered;
and the data recovery module is used for performing recovery operation on the test data on the first test data storage node when the target test data on the first test data storage node is tampered.
Optionally, the blockchain system further includes:
and the intelligent contract management module is used for activating the anti-tampering intelligent contract when receiving target test data integrity check failure information sent by the client, so that the first test data storage node and the second test data storage node start a consensus mechanism to perform consensus on a target block where target test data on the first test data storage node are located.
In a third aspect, the present application discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the method for tamper-proofing test data as disclosed above.
It can be seen that, in the present application, after a first test data storage node sends target test data to a client, the client checks the integrity of the target test data, and if the check fails, check failure information is sent, when a block chain system receives the information, the first test data storage node broadcasts a consensus proposal corresponding to a target block where the target test data stored by itself is located, after receiving the consensus proposal, a second test data storage node in a relationship with the first test data storage node as a duplicate node performs a pre-vote corresponding to the consensus proposal in a broadcast manner, and when the number of pre-votes received by the second test data storage node is greater than two thirds of the total number of the second test data storage node, the second test data storage node performs a pre-confirmation vote corresponding to the consensus proposal in a broadcast manner, if the number of the received preconfirmations of the second test data storage node is more than two thirds of the total number of the second test data storage node, the target test data in the second test data storage node can be judged to be unmodified, otherwise, the target test data in the first test data storage node is judged to be modified, and the test data on the first test data storage node needs to be recovered, so that the test data in the block chain system can be prevented from being tampered and forged, and the data can be recovered when the test data is tampered and forged. Compared with the prior art, in the consensus process, each node related to the consensus needs to perform P2P communication with other nodes to realize consensus synchronization, each node participating in the consensus in the application adopts a broadcast mode to perform communication, the network communication quantity is greatly saved, the performance advantages are particularly obvious under complex network environments with limited network bandwidth, low hardware configuration, a large number of nodes, a plurality of failure nodes and the like, and in the pre-vote and pre-confirmation stage, the obtained corresponding confirmation votes are more than two thirds of the total voting node quantity to obtain corresponding confirmation, so that the consensus can be quickly achieved while one third of error nodes (dropped lines and overtime nodes) are contained, the high availability and high expansion requirements of test data management in a block chain system are better met, and the performance of the block chain system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method for tamper-proofing test data disclosed herein;
FIG. 2 is a specific experimental data tamper-proof flow chart disclosed herein;
FIG. 3 is a specific experimental data tamper-resistant flow chart disclosed herein;
fig. 4 is a block chain system structure diagram disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
At present, in order to solve the problem that the block chain still has the test data on some nodes tampered and forged, a practical byzantine fault-tolerant algorithm is mainly used for discovering malicious nodes and recovering the test data, but the practical byzantine fault-tolerant algorithm has some defects, namely, the performance of the algorithm depends on the number of commonly-identified nodes, and each commonly-identified related node needs to communicate with other nodes through P2P to realize commonly-identified synchronization, so that the performance is reduced rapidly along with the increase of the nodes, and when the number of the nodes reaches more than 1000, a huge amount of communication overhead is caused to the block chain network, and the performance of the block chain system is influenced. In view of this, the present application provides a method for preventing test data from being tampered and forged, and data recovery can be performed when the test data is tampered and forged, and the number of network communications can be saved in the consensus process, so as to improve the performance of the blockchain system.
Referring to fig. 1, an embodiment of the present application discloses a method for preventing test data from being tampered, which is applied to a blockchain system, and includes:
step S11: when target test data integrity check failure information sent by a client is received, broadcasting a consensus proposal corresponding to a target block where the target test data is located on a first test data storage node through the first test data storage node, wherein the first test data storage node is a node sending the target test data to the client.
In a specific implementation, a user may download test data from the blockchain system through a client, and when the client requests target test data from the blockchain system, target trial data required by a client may be sent to the client by a first trial data storage node, the client, after receiving the target trial data, calculating a second HASH value of the target trial data, and obtaining a reference HASH value corresponding to the target test data from a certificate chain in the block chain system, and comparing the second HASH value with the reference HASH value, if the second HASH value is consistent with the reference HASH value, the target test data integrity check may be determined to be successful, if the second HASH value and the reference HASH value are not consistent, it may be determined that the target test data integrity check fails. The proof chain is a chain of reference HASH values for storing the test data in the blockchain system, that is, when the test data is stored in the blockchain system, the HASH values of the test data are calculated and stored as the reference HASH values in the proof chain so as to be used for integrity check of the test data. The target test data is also the test data requested by the client.
When the target test data integrity check fails, it indicates that the target test data on the first test data storage node may be tampered or forged, so it is necessary to perform consensus on the target test data on the first test data storage node in order to determine whether the target test data on the first test data storage node is really tampered or forged. Specifically, it is required that the client sends target test data integrity check failure information to the blockchain system, and after receiving the target test data integrity check failure information, the blockchain system starts a related consensus mechanism to perform consensus on the target test data on the first test data storage node.
In the actual implementation process, when target test data integrity check failure information sent by a client is received, a tamper-resistant intelligent contract is activated, so that a common identification mechanism is started by the first test data storage node and the second test data storage node, and a target block where target test data are located on the first test data storage node is commonly identified. That is, a tamper-resistant intelligent contract may be set in the blockchain system, and when receiving target test data integrity check failure information sent by the client, the tamper-resistant intelligent contract is activated, so as to notify the first test data storage node and the second test data storage node to start a consensus mechanism, and perform consensus on a target block where target test data on the first test data storage node is located.
When the block chain system fails to receive the target test data integrity check, it indicates that the target test data on the first test data storage node needs to be identified in common to determine whether the target test data on the first test data storage node is really tampered or forged, and at this time, the first test data storage node needs to initiate a common identification proposal corresponding to a target block where the target test data is located on the first test data storage node in a broadcast manner.
Specifically, the first test data storage node may broadcast, by using the gossip protocol, a consensus proposal corresponding to a target block where the target test data is located.
Step S12: and receiving the consensus proposal through a second test data storage node, and performing pre-voting corresponding to the consensus proposal in a broadcasting mode, wherein the second test data storage node and the first test data storage node are in a duplicate node relationship.
After the first test data storage node broadcasts the consensus proposal, a second test data storage node which is in a duplicate relationship with the first test data storage node receives the consensus proposal, and after the consensus proposal is received, pre-vote corresponding to the consensus proposal is performed in a broadcasting mode.
Specifically, the second test data storage node receives the consensus offer, performs integrity check on the copy data corresponding to the target test data stored in the second test data storage node to obtain a check result, and then performs pre-vote corresponding to the consensus offer in a broadcasting manner according to the check result.
The integrity verification of the copy data corresponding to the target test data stored by the second test data storage node is performed by the second test data storage node to obtain a verification result, and the method comprises the following steps: calculating a HASH value of copy data corresponding to the target test data stored by the second test data storage node through the second test data storage node to obtain a first HASH value; comparing the first HASH value to a second HASH value, wherein the second HASH value is the HASH value of the target test data; and if the first HASH value is the same as the second HASH value, judging that the verification is passed, otherwise, judging that the verification is not passed, and obtaining a verification result.
The second test data storage node stores duplicate data of the target test data, before pre-voting, the second test data storage node firstly performs integrity check on the target test data by using the duplicate data stored in the second test data storage node, and performs pre-voting according to a check result. That is, a first HASH value of the copy data corresponding to the target test data stored in the HASH table is calculated, the first HASH value is compared with a second HASH value of the target test data on the first test data storage node, if the first HASH value is the same as the second HASH value, it is determined that the verification is passed, and if the first HASH value is not the same as the second HASH value, it is determined that the verification is failed, and a corresponding verification result is obtained.
Correspondingly, the pre-voting corresponding to the consensus proposal is carried out by the second test data storage node according to the verification result in a broadcasting mode, and the method comprises the following steps: if the verification result shows that the verification is passed, broadcasting the pre-vote corresponding to the consensus proposal through the second test data storage node; and if the check result shows that the check is not passed, broadcasting a null pre-vote corresponding to the consensus proposal through the second test data storage node.
That is, when the verification result indicates that the verification is passed, the duplicate data corresponding to the target test data stored in the second test data storage node is consistent with the target test data, and then the second test data storage node may broadcast the pre-vote corresponding to the consensus proposal, and when the verification result indicates that the verification is not passed, the duplicate data corresponding to the explicit test data stored in the second test data storage node is inconsistent with the target test data, and then the second test data storage node broadcasts the empty pre-vote corresponding to the consensus proposal.
Step S13: and if the number of the pre-votes received by the second test data storage node is more than two thirds of the total number of the second test data storage node, performing pre-confirmation voting corresponding to the consensus proposal by the second test data storage node in a broadcasting mode.
It can be understood that if the number of pre-votes received by the second experimental data storage node is greater than two thirds of the total number of the second experimental data storage node, the second experimental data storage node performs a pre-confirmation vote corresponding to the consensus proposal in a broadcast manner.
And if the number of the pre-votes received by each second test data storage node is less than two thirds of the total number of the second test data storage nodes, determining that the target test data on the first test data storage node is tampered, and performing recovery operation on the test data on the first test data storage node.
Step S14: and if the number of the received preconfirmations of the second test data storage node is more than two thirds of the total number of the second test data storage node, judging that the target test data on the first test data storage node is not tampered, otherwise, judging that the target test data on the first test data storage node is tampered, and performing recovery operation on the test data on the first test data storage node.
After the second test data storage nodes perform pre-confirmation corresponding to the consensus proposal, each second test data storage node also receives pre-confirmation votes, if the number of the pre-confirmations received by the second test data storage nodes is greater than two thirds of the total number of the second test data storage nodes, the target test data on the first test data storage node is judged not to be tampered, otherwise, the target test data on the first test data storage node is judged to be tampered, and recovery operation is performed on the test data on the first test data storage node.
And performing recovery operation on the test data on the first test data storage node, specifically, synchronizing the data on the credible second test data storage node to the first test data storage node.
It can be seen that, in the present application, after a first test data storage node sends target test data to a client, the client checks the integrity of the target test data, and if the check fails, check failure information is sent, when a block chain system receives the information, the first test data storage node broadcasts a consensus proposal corresponding to a target block where the target test data stored by itself is located, after receiving the consensus proposal, a second test data storage node in a relationship with the first test data storage node as a duplicate node performs a pre-vote corresponding to the consensus proposal in a broadcast manner, and when the number of pre-votes received by the second test data storage node is greater than two thirds of the total number of the second test data storage node, the second test data storage node performs a pre-confirmation vote corresponding to the consensus proposal in a broadcast manner, if the number of the received preconfirmations of the second test data storage node is more than two thirds of the total number of the second test data storage node, the target test data in the second test data storage node can be judged to be unmodified, otherwise, the target test data in the first test data storage node is judged to be modified, and the test data on the first test data storage node needs to be recovered, so that the test data in the block chain system can be prevented from being tampered and forged, and the data can be recovered when the test data is tampered and forged. Compared with the prior art, in the consensus process, each node related to the consensus needs to perform P2P communication with other nodes to realize consensus synchronization, each node participating in the consensus in the application adopts a broadcast mode to perform communication, the network communication quantity is greatly saved, the performance advantages are particularly obvious under complex network environments with limited network bandwidth, low hardware configuration, a large number of nodes, a plurality of failure nodes and the like, and in the pre-vote and pre-confirmation stage, the obtained corresponding confirmation votes are more than two thirds of the total voting node quantity to obtain corresponding confirmation, so that the consensus can be quickly achieved while one third of error nodes (dropped lines and overtime nodes) are contained, the high availability and high expansion requirements of test data management in a block chain system are better met, and the performance of the block chain system is improved.
Referring to fig. 2, a flow chart for preventing the test data from being tampered is shown. When the integrity check of the test data in the file access process is wrong, activating a tamper-resistant intelligent contract, starting a Practical Byzantine (PBFT) consensus fault-tolerant mechanism of a first test data storage node and a second test data storage node, so that the first test data storage node broadcasts a consensus proposal corresponding to a target block where the target test data is located on the first test data storage node, then the second test data storage node receives the consensus proposal, performs data check under a link, and performs pre-voting corresponding to the consensus proposal in a broadcasting mode according to a check result, wherein the second test data storage node and the first test data storage node are in a duplicate node relationship. And if the consensus is achieved, performing a tampered file recovery operation, and recording a corresponding audit log. Wherein, the consensus is achieved, that is, whether the target test data is tampered or not is determined, and the specific determination process is referred to the content disclosed in the foregoing embodiment. If the target test data is not modified, the target test data is not judged, the exception needs to be reported, and an audit log is recorded.
Referring to fig. 3, a flow chart for preventing the test data from being tampered is shown. After the first test data storage node broadcasts the consensus proposal corresponding to the target block where the target test data is located, the second test data storage node judges the target block in the consensus proposal to see whether the block is valid, if so, performs pre-voting on the target block, if not, performs voting on null data, if the number of pre-votes received by the second test data storage node is more than two thirds of the total number of the second test data storage node, performs pre-confirmation voting corresponding to the consensus proposal in a broadcast mode, otherwise, judges that the target test data on the first test data storage node is falsified, and after performing the pre-confirmation voting, if the number of pre-confirmations received by the second test data storage node is more than two thirds of the total number of the second test data storage node, judging that the target test data on the first test data storage node is not tampered, otherwise, judging that the target test data on the first test data storage node is tampered; after the target test data on the first test data storage node is tampered, a recovery operation needs to be performed on the data on the first test data storage node.
Referring to fig. 4, an embodiment of the present application discloses a blockchain system, including:
the system comprises a first test data storage node 11, a first storage node and a second storage node, wherein the first test data storage node is used for broadcasting a consensus proposal corresponding to a target block where target test data are located on the first test data storage node when target test data integrity check failure information sent by a client is received, and the first test data storage node is a node for sending the target test data to the client;
a second test data storage node 12, configured to receive the consensus suggestion, and perform pre-voting corresponding to the consensus suggestion in a broadcast manner, where the second test data storage node and the first test data storage node are in a duplicate node relationship;
the second test data storage node 12 is configured to perform pre-confirmation voting corresponding to the consensus proposal in a broadcast manner if the number of received pre-votes is greater than two thirds of the total number of the second test data storage nodes;
the second test data storage node 12 is configured to determine that the target test data on the first test data storage node is not tampered when the number of the received pre-confirmations is greater than two thirds of the total number of the second test data storage nodes, and otherwise determine that the target test data on the first test data storage node is tampered;
and the data recovery module 13 is configured to perform a recovery operation on the test data on the first test data storage node when the target test data on the first test data storage node has been tampered with.
It can be seen that, in the present application, after a first test data storage node sends target test data to a client, the client checks the integrity of the target test data, and if the check fails, check failure information is sent, when a block chain system receives the information, the first test data storage node broadcasts a consensus proposal corresponding to a target block where the target test data stored by itself is located, after receiving the consensus proposal, a second test data storage node in a relationship with the first test data storage node as a duplicate node performs a pre-vote corresponding to the consensus proposal in a broadcast manner, and when the number of pre-votes received by the second test data storage node is greater than two thirds of the total number of the second test data storage node, the second test data storage node performs a pre-confirmation vote corresponding to the consensus proposal in a broadcast manner, if the number of the received preconfirmations of the second test data storage node is more than two thirds of the total number of the second test data storage node, the target test data in the second test data storage node can be judged to be unmodified, otherwise, the target test data in the first test data storage node is judged to be modified, and the test data on the first test data storage node needs to be recovered, so that the test data in the block chain system can be prevented from being tampered and forged, and the data can be recovered when the test data is tampered and forged. Compared with the prior art, in the consensus process, each node related to the consensus needs to perform P2P communication with other nodes to realize consensus synchronization, each node participating in the consensus in the application adopts a broadcast mode to perform communication, the network communication quantity is greatly saved, the performance advantages are particularly obvious under complex network environments with limited network bandwidth, low hardware configuration, a large number of nodes, a plurality of failure nodes and the like, and in the pre-vote and pre-confirmation stage, the obtained corresponding confirmation votes are more than two thirds of the total voting node quantity to obtain corresponding confirmation, so that the consensus can be quickly achieved while one third of error nodes (dropped lines and overtime nodes) are contained, the high availability and high expansion requirements of test data management in a block chain system are better met, and the performance of the block chain system is improved.
In a specific implementation process, the first test data storage node 11 is configured to:
and broadcasting a consensus proposal corresponding to a target block where the target test data on the first test data storage node is located by adopting a gossip protocol.
In a specific implementation process, the second test data storage node 12 is configured to:
receiving the consensus proposal;
carrying out integrity verification on the copy data corresponding to the target test data stored by the self to obtain a verification result;
and performing pre-voting corresponding to the consensus offers in a broadcasting mode according to the verification result.
In a specific implementation process, the second test data storage node 12 is configured to:
calculating a HASH value of copy data corresponding to the target test data stored in the HASH table to obtain a first HASH value;
comparing the first HASH value to a second HASH value, wherein the second HASH value is the HASH value of the target test data;
and if the first HASH value is the same as the second HASH value, judging that the verification is passed, otherwise, judging that the verification is not passed, and obtaining a verification result.
In a specific implementation process, the second test data storage node 12 is configured to:
if the verification result shows that the verification is passed, broadcasting the pre-vote corresponding to the consensus proposal;
and if the check result shows that the check is not passed, broadcasting a null pre-vote corresponding to the consensus proposal.
In a specific implementation process, the second test data storage node 12 is configured to:
and if the number of the pre-votes received by each second test data storage node is less than two thirds of the total number of the second test data storage nodes, determining that the target test data on the first test data storage node is tampered, and performing recovery operation on the test data on the first test data storage node.
In a specific implementation, the blockchain system further includes:
and the intelligent contract management module is used for activating the anti-tampering intelligent contract when receiving target test data integrity check failure information sent by the client, so that the first test data storage node and the second test data storage node start a consensus mechanism to perform consensus on a target block where target test data on the first test data storage node are located.
Further, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the method for preventing the tampering of the test data disclosed in any of the foregoing embodiments.
For the specific process of the above method for preventing the test data from being tampered, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," 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 other elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method for preventing test data from being tampered, the block chain system and the medium provided by the application are described in detail above, a specific example is applied in the description to explain the principle and the implementation of the application, and the description of the above embodiment is only used to help understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for preventing test data from being tampered is applied to a block chain system and comprises the following steps:
when target test data integrity check failure information sent by a client is received, broadcasting a consensus proposal corresponding to a target block where target test data are located on a first test data storage node through the first test data storage node, wherein the first test data storage node is a node sending the target test data to the client;
receiving the consensus proposal through a second test data storage node, and performing pre-voting corresponding to the consensus proposal in a broadcasting mode, wherein the second test data storage node and the first test data storage node are in a duplicate node relationship;
if the number of the pre-votes received by the second test data storage node is more than two thirds of the total number of the second test data storage node, performing pre-confirmation voting corresponding to the consensus proposal by the second test data storage node in a broadcasting mode;
and if the number of the received preconfirmations of the second test data storage node is more than two thirds of the total number of the second test data storage node, judging that the target test data on the first test data storage node is not tampered, otherwise, judging that the target test data on the first test data storage node is tampered, and performing recovery operation on the test data on the first test data storage node.
2. The method of claim 1, wherein the broadcasting, by the first test data storage node, of the consensus proposal corresponding to the target block in which the target test data is located on the first test data storage node comprises:
and broadcasting a consensus proposal corresponding to a target block where target test data on a first test data storage node is located by the first test data storage node by adopting a gossip protocol.
3. The method for preventing test data from being tampered according to claim 1, wherein the receiving the consensus proposal by the second test data storage node and performing pre-vote corresponding to the consensus proposal in a broadcast manner includes:
receiving, by a second experimental data storage node, the consensus proposal;
integrity verification is carried out on the copy data corresponding to the target test data stored by the second test data storage node through the second test data storage node, and a verification result is obtained;
and pre-voting corresponding to the consensus proposal is carried out by the second test data storage node according to the verification result in a broadcasting mode.
4. The method for preventing test data from being tampered according to claim 3, wherein the integrity of the copy data corresponding to the target test data stored in the second test data storage node is checked through the second test data storage node to obtain a check result, and the method comprises the following steps:
calculating a HASH value of copy data corresponding to the target test data stored by the second test data storage node through the second test data storage node to obtain a first HASH value;
comparing the first HASH value to a second HASH value, wherein the second HASH value is the HASH value of the target test data;
and if the first HASH value is the same as the second HASH value, judging that the verification is passed, otherwise, judging that the verification is not passed, and obtaining a verification result.
5. The method for preventing test data from being tampered according to claim 4, wherein the pre-voting corresponding to the consensus proposal by the second test data storage node according to the verification result in a broadcasting manner comprises:
if the verification result shows that the verification is passed, broadcasting the pre-vote corresponding to the consensus proposal through the second test data storage node;
and if the check result shows that the check is not passed, broadcasting a null pre-vote corresponding to the consensus proposal through the second test data storage node.
6. The method for preventing tampering with test data according to claim 1, wherein after receiving the consensus proposal by the second test data storage node and performing a pre-vote corresponding to the consensus proposal in a broadcast manner, the method further comprises:
and if the number of the pre-votes received by each second test data storage node is less than two thirds of the total number of the second test data storage nodes, determining that the target test data on the first test data storage node is tampered, and performing recovery operation on the test data on the first test data storage node.
7. The test data tamper-proofing method according to any one of claims 1 to 6, further comprising:
when target test data integrity check failure information sent by a client is received, activating an anti-tampering intelligent contract so that the first test data storage node and the second test data storage node start a consensus mechanism to perform consensus on a target block where target test data on the first test data storage node are located.
8. A blockchain system, comprising:
the system comprises a first test data storage node and a second test data storage node, wherein the first test data storage node is used for broadcasting a consensus proposal corresponding to a target block where target test data are located on the first test data storage node when target test data integrity check failure information sent by a client is received, and the first test data storage node is a node for sending the target test data to the client;
the second test data storage node is used for receiving the consensus proposal and performing pre-voting corresponding to the consensus proposal in a broadcasting mode, wherein the second test data storage node and the first test data storage node are in a duplicate node relationship;
the second test data storage node is used for carrying out pre-confirmation voting corresponding to the consensus proposal in a broadcasting mode when the number of the received pre-votes is greater than two thirds of the total number of the second test data storage node;
the second test data storage node is used for judging that the target test data on the first test data storage node is not tampered when the number of the received pre-confirmations is greater than two thirds of the total number of the second test data storage node, and otherwise, judging that the target test data on the first test data storage node is tampered;
and the data recovery module is used for performing recovery operation on the test data on the first test data storage node when the target test data on the first test data storage node is tampered.
9. The blockchain system of claim 8, further comprising:
and the intelligent contract management module is used for activating the anti-tampering intelligent contract when receiving target test data integrity check failure information sent by the client, so that the first test data storage node and the second test data storage node start a consensus mechanism to perform consensus on a target block where target test data on the first test data storage node are located.
10. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the assay data tamper-proofing method of any one of claims 1 to 7.
CN202210036646.XA 2022-01-13 2022-01-13 Test data tamper-proof method, block chain system and medium Pending CN114401271A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210036646.XA CN114401271A (en) 2022-01-13 2022-01-13 Test data tamper-proof method, block chain system and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210036646.XA CN114401271A (en) 2022-01-13 2022-01-13 Test data tamper-proof method, block chain system and medium

Publications (1)

Publication Number Publication Date
CN114401271A true CN114401271A (en) 2022-04-26

Family

ID=81230227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210036646.XA Pending CN114401271A (en) 2022-01-13 2022-01-13 Test data tamper-proof method, block chain system and medium

Country Status (1)

Country Link
CN (1) CN114401271A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109447810A (en) * 2018-11-29 2019-03-08 杭州秘猿科技有限公司 Parallel block chain common recognition method, system, electronic equipment and computer readable storage medium
CN110012100A (en) * 2019-04-09 2019-07-12 杭州秘猿科技有限公司 A kind of the block chain common recognition method, apparatus and electronic equipment of bandwidth optimization
CN111080288A (en) * 2019-10-18 2020-04-28 湖南天河国云科技有限公司 Block chain consensus achieving method and device based on directed acyclic graph
CN112632637A (en) * 2020-12-23 2021-04-09 杭州趣链科技有限公司 Tamper-proof evidence obtaining method, system, device, storage medium and electronic equipment
CN112822159A (en) * 2020-12-28 2021-05-18 杭州趣链科技有限公司 Permission control method and device for block chain account, electronic equipment and storage medium
CN113630257A (en) * 2021-10-09 2021-11-09 支付宝(杭州)信息技术有限公司 Consensus method, block chain system and consensus node
WO2021244568A1 (en) * 2020-06-05 2021-12-09 支付宝(杭州)信息技术有限公司 Method for consensus in blockchain, and system
CN113794694A (en) * 2021-08-25 2021-12-14 清华大学 Binary consensus method and device based on reliable broadcast

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109447810A (en) * 2018-11-29 2019-03-08 杭州秘猿科技有限公司 Parallel block chain common recognition method, system, electronic equipment and computer readable storage medium
CN110012100A (en) * 2019-04-09 2019-07-12 杭州秘猿科技有限公司 A kind of the block chain common recognition method, apparatus and electronic equipment of bandwidth optimization
CN111080288A (en) * 2019-10-18 2020-04-28 湖南天河国云科技有限公司 Block chain consensus achieving method and device based on directed acyclic graph
WO2021244568A1 (en) * 2020-06-05 2021-12-09 支付宝(杭州)信息技术有限公司 Method for consensus in blockchain, and system
CN112632637A (en) * 2020-12-23 2021-04-09 杭州趣链科技有限公司 Tamper-proof evidence obtaining method, system, device, storage medium and electronic equipment
CN112822159A (en) * 2020-12-28 2021-05-18 杭州趣链科技有限公司 Permission control method and device for block chain account, electronic equipment and storage medium
CN113794694A (en) * 2021-08-25 2021-12-14 清华大学 Binary consensus method and device based on reliable broadcast
CN113630257A (en) * 2021-10-09 2021-11-09 支付宝(杭州)信息技术有限公司 Consensus method, block chain system and consensus node

Similar Documents

Publication Publication Date Title
EP3776208B1 (en) Runtime self-correction for blockchain ledgers
JP4662706B2 (en) Secure recovery in serverless distributed file system
CN109543065B (en) Video active identification method combined with block chain
CN110785760A (en) Method and system for registering digital documents
Rodrigues et al. The design of a robust peer-to-peer system
EP1122649A1 (en) Method and apparatus for dynamically altering configurations of clustered computer systems
US11611567B2 (en) Method and system for management and resolution of blockchain-based top-level domain
JP5801482B2 (en) Method and system for storing and retrieving data from key-value storage
US7809898B1 (en) Detecting and repairing inconsistencies in storage mirrors
CN111737104A (en) Block chain network service platform, test case sharing method thereof and storage medium
CN112328558B (en) Access log storage method and system of medical system based on block chain
CN111339551A (en) Data verification method and related device and equipment
CN114936253A (en) Block chain consensus method and device, electronic equipment and storage medium
US8386775B2 (en) Tolerant key verification method
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN117407437A (en) Block chain-based data processing method, equipment and readable storage medium
CN114401271A (en) Test data tamper-proof method, block chain system and medium
KR20210142823A (en) Method and apparatus for managing data based on blockchain
CN115001707B (en) Device authentication method based on block chain and related device
CN115935414A (en) Block chain based data verification method and device, electronic equipment and storage medium
US7051065B2 (en) Method and system for performing fault-tolerant online validation of service requests
CN110598477A (en) Block chain based information processing method and device, storage medium and equipment
CN117156474B (en) Remote intelligent operation and maintenance system and operation and maintenance method thereof
CN117692149B (en) Method, equipment and medium for checking integrity of log transparent entity
CN112822279B (en) Monitoring method and device based on intelligent sensing and trusted storage

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