CN114579581B - Data supervision method and device based on block chain - Google Patents
Data supervision method and device based on block chain Download PDFInfo
- Publication number
- CN114579581B CN114579581B CN202210477889.7A CN202210477889A CN114579581B CN 114579581 B CN114579581 B CN 114579581B CN 202210477889 A CN202210477889 A CN 202210477889A CN 114579581 B CN114579581 B CN 114579581B
- Authority
- CN
- China
- Prior art keywords
- block chain
- target
- judicial
- hash value
- judicial evidence
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 95
- 238000012795 verification Methods 0.000 claims abstract description 60
- 230000004048 modification Effects 0.000 claims description 65
- 238000012986 modification Methods 0.000 claims description 65
- 238000004364 calculation method Methods 0.000 claims description 31
- 238000004422 calculation algorithm Methods 0.000 claims description 29
- 238000012550 audit Methods 0.000 claims description 20
- 230000011218 segmentation Effects 0.000 claims description 16
- 230000000977 initiatory effect Effects 0.000 claims description 11
- 238000010187 selection method Methods 0.000 claims description 11
- 230000005540 biological transmission Effects 0.000 claims description 10
- 230000002194 synthesizing effect Effects 0.000 claims description 6
- 230000000903 blocking effect Effects 0.000 claims description 3
- 230000010354 integration Effects 0.000 claims description 3
- 238000001308 synthesis method Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 12
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 238000007726 management method Methods 0.000 description 8
- 238000012544 monitoring process Methods 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000003999 initiator Substances 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012954 risk control Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2255—Hash tables
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Storage Device Security (AREA)
Abstract
The invention provides a data supervision method and a data supervision device based on a block chain, which comprise the following steps: the block chain is divided into a plurality of sub-block chains, corresponding temporary block chains are constructed based on different judicial evidences to store data, the situation that each data node stores the judicial evidences is avoided, meanwhile, in the subsequent verification process, verification can be carried out on any data node, the verification mode is that the corresponding temporary block chain is activated according to the corresponding target first key value, and the judicial evidence blocks are obtained from the rest target data nodes through the corresponding first target data nodes, so that a third hash value list is obtained and compared. The invention has the beneficial effects that: the judicial evidence stored in the block chain is supervised.
Description
Technical Field
The present invention relates to the field of blockchains, and in particular, to a method and an apparatus for supervising data based on blockchains.
Background
With the development of information technology, the coverage rate of a network space is wider and wider, whether traces of a network can be seen in various cases or not, a block chain has the characteristic of tamper resistance, and for a judicial authority, electronic evidence of the block chain is approved by the judicial authority.
Disclosure of Invention
The invention mainly aims to provide a block chain-based data supervision method, a block chain-based data supervision device and computer equipment, and aims to solve the problem that judicial evidence is stored in different nodes of a block chain respectively and lacks of data supervision.
The invention provides a data supervision method based on a block chain, wherein the block chain comprises a plurality of sub-block chains, each sub-block chain comprises a plurality of data nodes, the block chain is used for storing judicial evidence, the judicial evidence is uploaded by the data nodes and carries a corresponding first hash value after the common authentication of the data nodes, the judicial is divided into a plurality of judicial evidence blocks by a preset data division method, and the first hash value of each judicial evidence block is obtained by carrying out hash calculation on each judicial evidence block by a first preset hash algorithm to obtain a first hash value list of each judicial evidence block; wherein the data policing method is applied to the block chain, the data policing method comprising:
selecting a corresponding number of first target sub-block chains from the plurality of sub-block chains based on the number of judicial evidence blocks;
selecting a data node from each first target sub-block chain as a first target data node according to a preset selection rule, storing the judicial evidence blocks in the corresponding first target data nodes respectively, and forming a first key value pair by the first hash value of each judicial evidence block and the ID of the corresponding first target data node so as to obtain a first key value pair list;
constructing a temporary block chain according to the obtained first target data node, and endowing the temporary block chain with a chain name by combining the creation time and the name of the first target data node;
in the temporary block chain, calculating by a second preset hash algorithm according to the first hash value and the chain name to obtain a second hash value;
acquiring an index of the judicial evidence, and assigning the index and a second hash value to each first key-value pair in the first key-value pair list so as to obtain a target first key-value pair corresponding to each first target data node;
identifying the corresponding target first key value in the corresponding first target sub-block chain through each first target data node;
when a verification data node triggers a request for verifying the judicial evidence, acquiring a corresponding target first key-value pair at the verification data node; the verification data node is any one of the data nodes;
acquiring a first target data node of the temporary block chain in the sub-block chain in which the verification data node is positioned based on the target first key value pair;
acquiring judicial evidence blocks of all the other first target data nodes from the temporary block chain through the first target data node, and performing hash calculation according to the first preset hash algorithm to obtain a third hash value list;
and comparing the third hash value list with the first hash value list, and judging whether the judicial evidence is stored perfectly according to a comparison result.
Further, after the step of comparing the third hash value list with the first hash value list and judging whether the judicial evidence is stored perfectly according to the comparison result, the method further includes:
when the judicial evidence is stored completely and a modification instruction is received, initiating secondary verification to a commonly authenticated data node based on the modification instruction;
when the secondary verification is passed, acquiring the temporary block chain and acquiring the modification type of the data node in the modification instruction;
when the modification type is adding a judicial file, uploading the added judicial file to the temporary block chain, dividing the added judicial file into a plurality of judicial evidence blocks to be added by a preset data division method, and updating the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be added to obtain fourth hash values corresponding to the judicial evidence blocks to be added, and adding the fourth hash values into the first hash value list to obtain an updated first hash value list;
selecting a corresponding number of second target sub-block chains from the remaining obtained sub-block chains according to the judicial evidence blocks to be increased;
selecting a data node from each first target sub-block chain as a second target data node according to a preset selection rule, storing the judicial evidence blocks in the corresponding second target data nodes respectively, adding the second target data nodes into the temporary block chain, and forming a second key value pair by using a fourth hash value of each judicial evidence block to be added and an ID (identity) of the corresponding second target data node;
assigning the index and the second hash value to each second key-value pair in the updated first key-value pair list, thereby obtaining a target second key-value pair corresponding to each second target data node;
and identifying the corresponding target second key value in the corresponding second target sub-block chain through each second target data node.
Further, after the step of obtaining the temporary block chain and obtaining the modification type of the data node in the modification instruction after the secondary verification is passed, the method further includes:
when the modification type is that the judicial file is modified, acquiring judicial evidence blocks before modification based on the first hash value list;
segmenting the modified judicial file by a preset data segmentation method to obtain a plurality of judicial evidence blocks to be modified, and updating the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be modified to obtain fifth hash values corresponding to the judicial evidence blocks to be modified, and adding the fifth hash values into the first hash value list to obtain an updated first hash value list;
forming a third key value pair by the fifth hash value of each judicial evidence block to be modified and the ID of the corresponding third target data node;
assigning the index and the second hash value to each third key-value pair in the updated first key-value pair list, thereby obtaining a target third key-value pair corresponding to each third target data node;
and identifying the corresponding target third key value in the corresponding third target sub-block chain through each third target data node.
Further, after comparing the third list of hash values with the first list of hash values and determining whether the judicial evidence is stored perfectly according to the comparison result, the method further includes:
the query block chain node receives retrieval data of the judicial evidence queried by the user; the query block chain node is any one block chain node in the block chain;
checking whether the retrieval data is matched with indexes in a prestored index directory in the inquiry block chain node;
if so, searching a first target data node corresponding to a temporary block chain corresponding to the index in a sub-block chain where the link points of the query block are located, and initiating a data acquisition request to the temporary block chain based on the first target data node;
acquiring a transmitted judicial evidence block from the temporary block chain;
and integrating each judicial evidence block according to the integration method corresponding to the data segmentation method to obtain the judicial evidence.
Further, after the step of synthesizing each judicial evidence block according to the synthesis method corresponding to the data segmentation method to obtain the judicial evidence, the method further includes:
selecting a plurality of auditing nodes from the block chain link points according to a preset selection method;
calculating the obtained judicial evidence blocks based on the first preset hash algorithm to obtain a sixth hash value list;
and sending the sixth hash value list and the first hash value list to the auditing node, and the auditing node audits the sixth hash value list based on the first hash value list and sends the auditing result to the query block chain node.
The invention also provides a data supervision device based on the block chain, wherein the block chain comprises a plurality of sub-block chains, each sub-block chain comprises a plurality of data nodes, the block chain is used for storing judicial evidence, the judicial evidence is uploaded by the data nodes and carries corresponding first hash values after the common authentication of the data nodes, the judicial is divided into a plurality of judicial evidence blocks by a preset data division method, and the first hash values of the judicial evidence blocks are obtained by performing hash calculation on the judicial evidence blocks through a first preset hash algorithm to obtain a first hash value of each judicial evidence block to obtain a first hash value list; wherein the data policing means is applied to the block chain, the data policing means comprising:
a first selecting module, configured to select, based on the number of judicial evidence blocks, a corresponding number of first target sub-block chains from the multiple sub-block chains;
the second selection module is used for selecting a data node from each first target sub-block chain as a first target data node according to a preset selection rule, storing the judicial evidence blocks in the corresponding first target data nodes respectively, and forming a first key value pair by the first hash value of each judicial evidence block and the ID of the corresponding first target data node so as to obtain a first key value pair list;
the building module is used for building a temporary block chain according to the obtained first target data node, and endowing the temporary block chain with a chain name by combining the creation time and the name of the first target data node;
the calculation module is used for calculating in the temporary block chain according to the first hash value and the chain name through a second preset hash algorithm to obtain a second hash value;
a first obtaining module, configured to obtain an index of the judicial evidence, and assign the index and a second hash value to each first key-value pair in the first key-value pair list, so as to obtain a target first key-value pair corresponding to each first target data node;
the consensus module is used for performing consensus on the corresponding target first key value in the corresponding first target sub-block chain through each first target data node;
the trigger module is used for acquiring a corresponding target first key value pair at a verification data node when the verification data node triggers a request for verifying the judicial evidence; the verification data node is any one of the data nodes;
a second obtaining module, configured to obtain, based on the target first key-value pair, a first target data node of the temporary blockchain in the subblock chain in which the verification data node is located;
a third obtaining module, configured to obtain judicial evidence blocks of each of the remaining first target data nodes from the temporary block chain through the first target data node, and perform hash calculation according to the first preset hash algorithm to obtain a third hash value list;
and the comparison module is used for comparing the third hash value list with the first hash value list and judging whether the judicial evidence is stored completely according to a comparison result.
Further, the data supervision apparatus further includes:
the secondary verification module is used for initiating secondary verification to the commonly authenticated data node based on the modification instruction when the judicial evidence is completely stored and the modification instruction is received;
a block chain obtaining module, configured to obtain the temporary block chain and obtain a modification type of the data node in the modification instruction after the secondary verification passes;
an uploading module, configured to upload the added judicial file to the temporary block chain when the modification type is adding a judicial file, divide the added judicial file into a plurality of judicial evidence blocks to be added by using a preset data division method, and update the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be added to obtain fourth hash values corresponding to the judicial evidence blocks to be added, and adding the fourth hash values into the first hash value list to obtain an updated first hash value list;
a second target sub-block chain obtaining module, configured to select, according to the judicial evidence to be added, a corresponding number of second target sub-block chains from the remaining obtained sub-block chains;
a second target data node selection module, configured to select a data node from each first target sub-block chain as a second target data node according to a preset selection rule, store the judicial evidence blocks in corresponding second target data nodes, add the second target data node to the temporary block chain, and combine a fourth hash value of each to-be-added judicial evidence block and an ID of the corresponding second target data node into a third key value pair;
an index assigning module, configured to assign the index and the second hash value to each second key-value pair in the updated first key-value pair list, so as to obtain a target second key-value pair corresponding to each second target data node;
and the target second key value consensus module is used for performing consensus on the corresponding target second key value pairs in the corresponding second target sub-block chains through each second target data node.
Further, the data supervision apparatus further includes:
a judicial evidence block acquisition module, configured to, when the modification type is to modify a judicial file, acquire a judicial evidence block before modification based on the first hash value list;
the judicial file segmentation module is used for segmenting the modified judicial file by a preset data segmentation method to obtain a plurality of judicial evidence blocks to be modified and updating the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be modified to obtain fifth hash values corresponding to the judicial evidence blocks to be modified, and adding the fifth hash values into the first hash value list to obtain an updated first hash value list;
the composition module is used for forming a third key value pair by the fifth hash value of each judicial evidence block to be modified and the ID of the corresponding third target data node;
a second key-value pair assigning module, configured to assign the index and the second hash value to each key-value pair in the updated first key-value pair list, so as to obtain a target third key-value pair corresponding to each third target data node;
and the target third key value pair consensus module is configured to perform consensus on the corresponding target third key value pair in the corresponding third target subblock chain through each third target data node.
Further, the data supervision apparatus further includes:
the retrieval data receiving module is used for receiving retrieval data of the judicial evidence queried by the user through the query block chain node; the query block chain node is any one block chain node in the block chain;
the checking module is used for checking whether the retrieval data is matched with indexes in a prestored index catalog in the link points of the query block;
a searching module, configured to search, if the index is matched with the index, a first target data node corresponding to a temporary block chain corresponding to the index in a sub-block chain where the query block chain link point is located, and initiate a data acquisition request to the temporary block chain based on the first target data node;
a transmission judicial evidence blocking acquisition module, configured to acquire a transmitted judicial evidence block from the temporary block chain;
and the comprehensive module is used for synthesizing each judicial evidence block according to the comprehensive method corresponding to the data segmentation method to obtain the judicial evidence.
Further, the data supervision apparatus further includes:
the audit node selection module is used for selecting a plurality of audit nodes from the block chain nodes according to a preset selection method;
the judicial evidence block calculation module is used for calculating the obtained judicial evidence blocks based on the first preset Hash algorithm to obtain a sixth Hash value list;
and the sending module is used for sending the sixth hash value list and the first hash value list to the auditing node, and the auditing node audits the sixth hash value list based on the first hash value list and sends the auditing result to the query block chain node.
The invention has the beneficial effects that: the block chain is divided into a plurality of sub-block chains, corresponding temporary block chains are constructed based on different judicial evidences to store data, and it is avoided that each data node stores the judicial evidences.
Drawings
Fig. 1 is a schematic flowchart of a block chain-based data supervision method according to an embodiment of the present invention;
fig. 2 is a block diagram illustrating a structure of a data policing apparatus based on a block chain according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
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.
It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used for explaining the relative position relationship between the components, the movement situation, etc. in a specific posture (as shown in the attached drawings), and if the specific posture is changed, the directional indicator is also changed accordingly, and the connection may be a direct connection or an indirect connection.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In addition, the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Referring to fig. 1, the invention provides a data supervision method based on a block chain, where the block chain includes multiple sub-block chains, each sub-block chain includes multiple data nodes, the block chain is used for storing judicial evidence, the judicial evidence is uploaded by the data nodes and carries a corresponding first hash value after the multiple data nodes are jointly authenticated, the judicial is divided into multiple judicial evidence blocks by a preset data division method, and a first preset hash algorithm is used for performing hash calculation on each judicial evidence block to obtain the first hash value of each judicial evidence block, so as to obtain a first hash value list; wherein the data policing method is applied to the block chain, and the data policing method comprises:
s1: selecting a corresponding number of first target sub-block chains from the plurality of sub-block chains based on the number of judicial evidence blocks;
s2: selecting a data node from each first target sub-block chain as a first target data node according to a preset selection rule, storing the judicial evidence blocks in the corresponding first target data nodes respectively, and forming a first key value pair by the first hash value of each judicial evidence block and the ID of the corresponding first target data node so as to obtain a first key value pair list;
s3: constructing a temporary block chain according to the obtained first target data node, and assigning a chain name to the temporary block chain by combining the creation time and the name of the first target data node;
s4: in the temporary block chain, calculating by a second preset hash algorithm according to the first hash value and the chain name to obtain a second hash value;
s5: acquiring an index of the judicial evidence, and assigning the index and a second hash value to each first key-value pair in the first key-value pair list so as to obtain a target first key-value pair corresponding to each first target data node;
s6: identifying the corresponding target first key value in the corresponding first target sub-block chain through each first target data node;
s7: when a verification data node triggers a request for verifying the judicial evidence, acquiring a corresponding target first key-value pair at the verification data node; the verification data node is any one of the data nodes;
s8: acquiring a first target data node of the temporary block chain in the sub-block chain in which the verification data node is positioned based on the target first key value pair;
s9: acquiring judicial evidence blocks of all the other first target data nodes from the temporary block chain through the first target data node, and performing hash calculation according to the first preset hash algorithm to obtain a third hash value list;
s10: and comparing the third hash value list with the first hash value list, and judging whether the judicial evidence is stored completely according to a comparison result.
As described in the foregoing steps S1-S2, a corresponding number of first target subblock chains are selected from the multiple subblock chains based on the number of judicial evidence chunks, one data node is selected from each first target subblock chain as a first target data node according to a preset selection rule, the judicial evidence chunks are respectively stored in the corresponding first target data nodes, and a first key value pair is formed by the first hash value of each judicial evidence chunk and the ID of the corresponding first target data node, so as to obtain a first key value pair list. The data nodes can be provided with one or more temporary block chains, data transmission can be carried out in the sub-block chains, when the two nodes are respectively arranged in different sub-block chains and do not have a common temporary block chain, data can not be interacted, data transmission corresponding to judicial evidence can only be carried out in the temporary block chains, namely data interaction corresponding to the hash values in the first hash value list is required. Therefore, a corresponding number of first target sub-block chains can be selected for the blocks giving judicial evidence, the first target sub-block chain is a sub-block chain and belongs to one block chain, the data node can comprise entity devices corresponding to each court, and can also comprise mobile terminals of related personnel. Each first hash value and the corresponding target block link point form a key value pair, which means that each first hash value and the first target data node are in one-to-one correspondence so as to be convenient for reproducing the temporary block chain subsequently.
As described in the above steps S3-S4, a temporary block chain is constructed according to the obtained first target data node, and a chain name is assigned to the temporary block chain by combining the creation time and the name of the first target data node; and in the temporary block chain, calculating by a second preset hash algorithm according to the first hash value and the chain name to obtain a second hash value. The temporary block chain may be used for data obtaining transmission, the chain name may be obtained according to the creation time and the name of the first target data node, a specific obtaining manner is not limited, and all the first target data nodes in the temporary block chain may be obtained according to the chain name.
As described in step S5, the index of the judicial evidence is obtained, and the index and the second hash value are assigned to each first key-value pair in the first key-value pair list, so as to obtain a target first key-value pair corresponding to each first target data node. Since a corresponding index is needed in the subsequent data search process, the index needs to be added into the corresponding key value pair together, where the index is unique symbolic information of the judicial evidence, such as the name of the judicial evidence, the serial number of the judicial evidence, and the like, and certainly if the index is a keyword, multiple pieces of related information may appear in the subsequent search process, and at this time, the related personnel needs to manually select the index, which is not limited in this application.
As described in step S6, the corresponding target first key value pair is identified in the corresponding first target sub-chunk chain by each of the first target data nodes. The common identification means that the target first key value is sent to all nodes in the first target sub-block chain so as to facilitate subsequent searching.
As described above in steps S7-S8, when a verification data node triggers a request to verify the judicial evidence, obtaining a corresponding target first key-value pair at the verification data node; the verification data node is any one of the data nodes; and acquiring a first target data node of the temporary block chain in the sub-block chain in which the verification data node is positioned based on the target first key-value pair. The triggering condition is not limited, for example, the triggering may be performed at regular intervals, or the triggering may be performed according to an external condition, the verification data node may be any one data node in the blockchain, or may be a virtual node in the blockchain, and includes a corresponding target first key-value pair, of course, the target first key-value pair may be manually uploaded, for example, if the verification data node is not in the selected first sub-blockchain, the corresponding target first key-value pair may be manually uploaded, so as to find the corresponding first target sub-blockchain.
As described in the foregoing steps S9-S10, the judicial evidence blocks of each of the remaining first target data nodes are obtained from the temporary block chain through the first target data node, and hash calculation is performed according to the first preset hash algorithm to obtain a third hash value list; and comparing the third hash value list with the first hash value list, and judging whether the judicial evidence is stored perfectly according to a comparison result. It should be noted that the node for acquiring the judicial evidence blocks is the first target data node, but not the verification data node, and the verification data node can complete verification only by acquiring the comparison result, and does not need to acquire the judicial evidence, which means that the authenticity of the data can be verified in real time in the block chain, so that the safety and integrity of the data are improved, and the purpose of data supervision is achieved.
In an embodiment, after the step S10 of comparing the third list of hash values with the first list of hash values and determining whether the storage of the judicial evidence is complete according to the comparison result, the method further includes:
s1101: when the judicial evidence is stored completely and a modification instruction is received, initiating secondary verification to a commonly authenticated data node based on the modification instruction;
s1102: when the secondary verification is passed, acquiring the temporary block chain and acquiring the modification type of the data node in the modification instruction;
s1103: when the modification type is adding a judicial file, uploading the added judicial file to the temporary block chain, dividing the added judicial file into a plurality of judicial evidence blocks to be added by a preset data division method, and updating the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be added to obtain fourth hash values corresponding to the judicial evidence blocks to be added, and adding the fourth hash values into the first hash value list to obtain an updated first hash value list;
s1104: selecting a corresponding number of second target sub-block chains from the remaining obtained sub-block chains according to the judicial evidence blocks to be increased;
s1105: selecting a data node from each first target sub-block chain as a second target data node according to a preset selection rule, storing the judicial evidence blocks in the corresponding second target data nodes respectively, adding the second target data nodes into the temporary block chain, and forming a second key value pair by using a fourth hash value of each judicial evidence block to be added and an ID (identity) of the corresponding second target data node;
s1106: assigning the index and the second hash value to each second key value pair in the updated first key value pair list, so as to obtain a target second key value pair corresponding to each second target data node;
s1107: and identifying the corresponding target second key value in the corresponding second target sub-block chain through each second target data node.
As described in the foregoing steps S1101-S1102, when the judicial evidence is stored perfectly and a modification instruction is received, initiating secondary verification to a commonly authenticated data node based on the modification instruction, and after the secondary verification passes, acquiring the temporary block chain and acquiring a modification type of the data node in the modification instruction. The data nodes which are commonly authenticated are the data nodes which are authenticated before, the secondary verification aims at modifying the judicial evidence, the modification instruction can be instructions for adding, deleting, modifying and the like of the judicial evidence, the evidence is required to be supplemented more or less in the actual case handling process, or the evidence is required to be modified, particularly in the case handling process, so that the judicial evidence in the block chain is required to be modified when the modification is carried out, and different modification instructions correspond to different modification modes.
As described in the foregoing steps S1103-S1107, the modification of the judicial evidence is implemented, that is, the added judicial file is uploaded to the temporary block chain, and is divided into a plurality of judicial evidence blocks to be added by a preset data division method, and the first hash value list is updated. Then, a second target data node is selected and added to the temporary block chain, at this time, the chain name in the temporary block chain needs to be updated, or the chain name may not be increased, but when the temporary block chain is activated, the correspondingly increased second target data node is also activated. So as to facilitate subsequent re-acquisition of forensic evidence.
In an embodiment, after the step S1102 of obtaining the temporary block chain after the secondary verification passes, and obtaining the modification type of the data node in the modification instruction, the method further includes:
s11031: when the modification type is modification of a judicial file, acquiring judicial evidence blocks before modification based on the first hash value list;
s11032: dividing the modified judicial file by a preset data division method to obtain a plurality of judicial evidence blocks to be modified, and updating the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be modified to obtain fifth hash values corresponding to the judicial evidence blocks to be modified, and adding the fifth hash values into the first hash value list to obtain an updated first hash value list;
s11033: forming a third key value pair by the fifth hash value of each judicial evidence block to be modified and the ID of the corresponding third target data node;
s11034 assigning the index and the second hash value to each third key-value pair in the updated first key-value pair list, thereby obtaining a target third key-value pair corresponding to each third target data node;
s11035: and identifying the corresponding target third key value pair in the corresponding third target sub-block chain through each third target data node.
As described in the above steps S11031 to S11035, modification of the judicial evidence is realized, and when the modification type is modification of the judicial file, the judicial evidence block before modification is acquired based on the first hash value list. Here, the method for determining the judicial evidence blocks that need to be modified so as to find the position of the first target data node where the corresponding judicial evidence is located, and then updating the first hash value list includes: and performing hash calculation according to the judicial evidence blocks to be modified to obtain fifth hash values corresponding to the judicial evidence blocks to be modified, and adding the fifth hash values into the first hash value list to obtain an updated first hash value list. Forming a third key value pair by the fifth hash value of each judicial evidence block to be modified and the ID of the corresponding third target data node; assigning the index and the second hash value to each third key-value pair in the updated first key-value pair list, thereby obtaining a target third key-value pair corresponding to each third target data node; and identifying the corresponding target third key value pair in the corresponding third target sub-block chain through each third target data node. The third key value pair is formed for updating the corresponding data record, and the common identification method is the same as the common identification method described above, and is not described herein again.
In an embodiment, after the step S10 of comparing the third list of hash values with the first list of hash values and determining whether the storage of the judicial evidence is complete according to the comparison result, the method further includes:
s1111: the query block chain node receives retrieval data of the judicial evidence queried by the user; the query block chain node is any one block chain node in the block chain;
s1112: checking whether the retrieval data is matched with indexes in a prestored index directory in the inquiry block chain node;
s1113: if so, searching a first target data node corresponding to a temporary block chain corresponding to the index in a sub-block chain where the link points of the query block are located, and initiating a data acquisition request to the temporary block chain based on the first target data node;
s1114: acquiring judicial evidence blocks for transmission from the temporary block chain;
s1115: and integrating each judicial evidence block according to the integration method corresponding to the data segmentation method to obtain the judicial evidence.
As described in the above steps S1111 to S1115, the query block chain node receives the retrieval data of the judicial evidence queried by the user; and querying the block chain node as any data node in the block chain. And checking whether the retrieval data is matched with an index in a prestored index directory or not, if so, searching a first target data node corresponding to a temporary block chain corresponding to the index in a sub-block chain where the link point of the query block is located, and initiating a data acquisition request to the temporary block chain based on the first target data node so as to obtain the temporary block chain. The retrieval initiator can be any block chain link point, certainly, the initiator needs to perform identity identification, a specific identification mode is not limited, when the retrieval data of the judicial evidence is received, the retrieval data can be a keyword or unique symbolic information of the judicial evidence, if the retrieval data is the keyword and the keyword corresponds to a plurality of judicial evidences, the information of the corresponding judicial evidences can be listed to corresponding personnel and selected by the corresponding personnel, and therefore the corresponding temporary block chain is determined.
In an embodiment, after the step S1115 of synthesizing each of the judicial evidence blocks according to the synthesis method corresponding to the data segmentation method to obtain the judicial evidence, the method further includes:
s11161: selecting a plurality of auditing nodes from the block chain link points according to a preset selection method;
s11162: calculating the obtained judicial evidence blocks based on the first preset hash algorithm to obtain a sixth hash value list;
s11163: and sending the sixth hash value list and the first hash value list to the auditing node, and auditing the sixth hash value list by the auditing node based on the first hash value list and sending an auditing result to the query block chain node.
As described in the foregoing steps S111161-S11163, the authenticity of the judicial evidence is verified, that is, a plurality of audit nodes are selected from the block link points according to a preset selection method; calculating the obtained judicial evidence blocks based on the first preset hash algorithm to obtain a sixth hash value list; and sending the sixth hash value list and the first hash value list to the auditing node, and the auditing node audits the sixth hash value list based on the first hash value list and sends the auditing result to the query block chain node. The selection method can be that some audit nodes are randomly selected based on the ID of each block chain node, the selection method is not limited in the application, and the selection method can also be that the selection is performed based on each block chain node, the selection mode of the specific audit node is not limited, only a part of block chain nodes can be selected to be used as the audit nodes, the number of the audit nodes is not too large, otherwise, the calculated amount of data is too large, the waste of resources is caused, the selection method is not too small, otherwise, the audit standard is too low, and generally 5-20 are suitable.
The invention also provides a data supervision device based on the block chain, wherein the block chain comprises a plurality of sub-block chains, each sub-block chain comprises a plurality of data nodes, the block chain is used for storing judicial evidence, the judicial evidence is uploaded by the data nodes and carries corresponding first hash values after the common authentication of the data nodes, the judicial is divided into a plurality of judicial evidence blocks by a preset data division method, and the first hash values of the judicial evidence blocks are obtained by performing hash calculation on the judicial evidence blocks through a first preset hash algorithm to obtain a first hash value of each judicial evidence block to obtain a first hash value list; wherein the data policing means is applied to the block chain, the data policing means comprising:
a first selecting module 10, configured to select, based on the number of judicial evidence blocks, a corresponding number of first target sub-block chains from the multiple sub-block chains;
a second selecting module 20, configured to select a data node from each first target sub-block chain as a first target data node according to a preset selecting rule, store the judicial evidence blocks in the corresponding first target data nodes, and form a first key-value pair by using the first hash value of each judicial evidence block and the ID of the corresponding first target data node, so as to obtain a first key-value pair list;
a building module 30, configured to build a temporary block chain according to the obtained first target data node, and assign a chain name to the temporary block chain by combining creation time and the name of the first target data node;
a calculating module 40, configured to calculate, in the temporary block chain, a second hash value according to the first hash value and the chain name by using a second preset hash algorithm;
a first obtaining module 50, configured to obtain an index of the judicial evidence, and assign the index and the second hash value to each first key-value pair in the first key-value pair list, so as to obtain a target first key-value pair corresponding to each first target data node;
a consensus module 60, configured to perform consensus on the corresponding target first key value pair in the corresponding first target sub-block chain through each first target data node;
a triggering module 70, configured to, when a verification data node triggers a request for verifying the judicial evidence, obtain, at the verification data node, a corresponding target first key-value pair; the verification data node is any one of the data nodes;
a second obtaining module 80, configured to obtain, based on the target first key-value pair, a first target data node of the temporary blockchain in the subchunk chain where the verification data node is located;
a third obtaining module 90, configured to obtain judicial evidence blocks of each of the remaining first target data nodes from the temporary block chain through the first target data node, and perform hash calculation according to the first preset hash algorithm to obtain a third hash value list;
a comparison module 100, configured to compare the third hash value list with the first hash value list, and determine whether the judicial evidence is stored perfectly according to a comparison result.
In one embodiment, the data policing apparatus further comprises:
the secondary verification module is used for initiating secondary verification to the commonly authenticated data node based on the modification instruction when the judicial evidence is completely stored and the modification instruction is received;
a block chain obtaining module, configured to obtain the temporary block chain after the secondary verification passes, and obtain a modification type of the data node in the modification instruction;
an uploading module, configured to upload the added judicial file to the temporary block chain when the modification type is adding a judicial file, divide the added judicial file into a plurality of judicial evidence blocks to be added by using a preset data division method, and update the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be added to obtain fourth hash values corresponding to the judicial evidence blocks to be added, and adding the fourth hash values into the first hash value list to obtain an updated first hash value list;
a second target sub-block chain obtaining module, configured to select, according to the judicial evidence to be added, a corresponding number of second target sub-block chains from the remaining obtained sub-block chains;
a second target data node selection module, configured to select a data node from each first target sub-block chain as a second target data node according to a preset selection rule, store the judicial evidence blocks in corresponding second target data nodes, add the second target data node to the temporary block chain, and combine a fourth hash value of each to-be-added judicial evidence block and an ID of the corresponding second target data node into a third key value pair;
an index assigning module, configured to assign the index and the second hash value to each second key-value pair in the updated first key-value pair list, so as to obtain a target second key-value pair corresponding to each second target data node;
and the target second key value consensus module is used for performing consensus on the corresponding target second key value pairs in the corresponding second target sub-block chains through the second target data nodes.
In one embodiment, the data policing apparatus further includes:
a judicial evidence block acquisition module, configured to, when the modification type is to modify a judicial file, acquire a judicial evidence block before modification based on the first hash value list;
the judicial file segmentation module is used for segmenting the modified judicial file by a preset data segmentation method to obtain a plurality of judicial evidence blocks to be modified and updating the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be modified to obtain fifth hash values corresponding to the judicial evidence blocks to be modified, and adding the fifth hash values into the first hash value list to obtain an updated first hash value list;
the composition module is used for forming a third key value pair by the fifth hash value of each judicial evidence block to be modified and the ID of the corresponding third target data node;
a second key-value pair assigning module, configured to assign the index and the second hash value to each key-value pair in the updated first key-value pair list, so as to obtain a target third key-value pair corresponding to each third target data node;
and the target third key value pair consensus module is configured to perform consensus on the corresponding target third key value pair in the corresponding third target subblock chain through each third target data node.
In one embodiment, the data policing apparatus further includes:
the retrieval data receiving module is used for receiving retrieval data of the judicial evidence queried by the user through the query block chain node; the query block chain node is any one block chain node in the block chain;
the checking module is used for checking whether the retrieval data is matched with indexes in a prestored index catalog in the link points of the query block;
a searching module, configured to search, if the index is matched with the index, a first target data node corresponding to a temporary block chain corresponding to the index in a sub-block chain where the query block chain link point is located, and initiate a data acquisition request to the temporary block chain based on the first target data node;
a transmission judicial evidence blocking acquisition module, configured to acquire a transmitted judicial evidence block from the temporary block chain;
and the comprehensive module is used for synthesizing each judicial evidence block according to the comprehensive method corresponding to the data segmentation method to obtain the judicial evidence.
In one embodiment, the data policing apparatus further includes:
the audit node selection module is used for selecting a plurality of audit nodes from the block chain nodes according to a preset selection method;
the judicial evidence block calculation module is used for calculating the obtained judicial evidence blocks based on the first preset Hash algorithm to obtain a sixth Hash value list;
and the sending module is used for sending the sixth hash value list and the first hash value list to the auditing node, and the auditing node audits the sixth hash value list based on the first hash value list and sends the auditing result to the query block chain node.
The invention has the beneficial effects that: the block chain is divided into a plurality of sub-block chains, corresponding temporary block chains are constructed based on different judicial evidences to store data, the situation that each data node stores the judicial evidences is avoided, meanwhile, in the subsequent verification process, verification can be carried out on any data node, the verification mode is that the corresponding temporary block chain is activated according to the corresponding target first key value, and the judicial evidence blocks are obtained from the rest target data nodes through the corresponding first target data nodes, so that a third hash value list is obtained and compared, and supervision on the judicial evidences stored in the block chain is achieved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware associated with instructions of a computer program, which may be stored on a non-volatile computer-readable storage medium, and when executed, may include processes of the above embodiments of the methods. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims (6)
1. A data supervision method based on a block chain is characterized in that the block chain comprises a plurality of sub-block chains, each sub-block chain comprises a plurality of data nodes, the block chain is used for storing judicial evidence, the judicial evidence is uploaded by the data nodes and carries corresponding first hash values after the common authentication of the data nodes, the judicial evidence is divided into a plurality of judicial evidence sub-blocks through a preset data division method, and the first hash values of the judicial evidence sub-blocks are obtained through carrying out hash calculation on the judicial evidence sub-blocks through a first preset hash algorithm so as to obtain a first hash value list of the judicial evidence sub-blocks; wherein the data policing method is applied to the block chain, the data policing method comprising:
selecting a corresponding number of first target sub-block chains from the plurality of sub-block chains based on the number of judicial evidence blocks;
selecting a data node from each first target sub-block chain as a first target data node according to a preset selection rule, storing the judicial evidence blocks in the corresponding first target data nodes respectively, and forming a first key value pair by the first hash value of each judicial evidence block and the ID of the corresponding first target data node so as to obtain a first key value pair list; each data node forms different temporary block chains, and each data node is provided with one or more temporary block chains; when two data nodes are respectively in different sub-block chains and have no common temporary block chain, the data can not be interacted, and only the data transmission corresponding to judicial evidence can be carried out in the temporary block chain;
constructing a temporary block chain according to the obtained first target data node, and assigning a chain name to the temporary block chain by combining the creation time and the name of the first target data node;
in the temporary block chain, calculating by a second preset hash algorithm according to the first hash value and the chain name to obtain a second hash value;
acquiring an index of the judicial evidence, and assigning the index and a second hash value to each first key-value pair in the first key-value pair list so as to obtain a target first key-value pair corresponding to each first target data node;
identifying the corresponding target first key value in the corresponding first target sub-block chain through each first target data node;
when a verification data node triggers a request for verifying the judicial evidence, acquiring a corresponding target first key-value pair at the verification data node; the verification data node is any one of the data nodes;
acquiring a first target data node of the temporary block chain in the sub-block chain in which the verification data node is positioned based on the target first key value pair;
acquiring judicial evidence blocks of all the other first target data nodes from the temporary block chain through the first target data node, and performing hash calculation according to the first preset hash algorithm to obtain a third hash value list;
comparing the third hash value list with the first hash value list, and judging whether the judicial evidence is stored completely according to a comparison result;
after the step of comparing the third list of hash values with the first list of hash values and determining whether the judicial evidence is stored perfectly according to the comparison result, the method further comprises:
when the judicial evidence is stored completely and a modification instruction is received, initiating secondary verification to a commonly authenticated data node based on the modification instruction;
when the secondary verification is passed, acquiring the temporary block chain and acquiring the modification type of the data node in the modification instruction;
when the modification type is adding judicial files, uploading the added judicial files to the temporary block chain, dividing the added judicial files into a plurality of judicial evidence blocks to be added by a preset data division method, and updating the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be added to obtain fourth hash values corresponding to the judicial evidence blocks to be added, and adding the fourth hash values into the first hash value list to obtain an updated first hash value list;
selecting a corresponding number of second target sub-block chains from the remaining obtained sub-block chains according to the judicial evidence blocks to be increased;
selecting a data node from each first target sub-block chain as a second target data node according to a preset selection rule, storing the judicial evidence blocks in the corresponding second target data nodes respectively, adding the second target data nodes into the temporary block chain, and forming a second key value pair by using a fourth hash value of each judicial evidence block to be added and an ID (identity) of the corresponding second target data node;
assigning the index and the second hash value to each second key-value pair in the updated first key-value pair list, thereby obtaining a target second key-value pair corresponding to each second target data node;
identifying the corresponding target second key value in the corresponding second target sub-block chain through each second target data node;
after the step of obtaining the temporary block chain and obtaining the modification type of the data node in the modification instruction after the secondary verification is passed, the method further includes:
when the modification type is that the judicial file is modified, acquiring judicial evidence blocks before modification based on the first hash value list;
dividing the modified judicial file by a preset data division method to obtain a plurality of judicial evidence blocks to be modified, and updating the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be modified to obtain fifth hash values corresponding to the judicial evidence blocks to be modified, and adding the fifth hash values into the first hash value list to obtain an updated first hash value list;
forming a third key value pair by the fifth hash value of each judicial evidence block to be modified and the ID of the corresponding third target data node;
assigning the index and the second hash value to each third key-value pair in the updated first key-value pair list, thereby obtaining a target third key-value pair corresponding to each third target data node;
and identifying the corresponding target third key value in the corresponding third target sub-block chain through each third target data node.
2. The method as claimed in claim 1, wherein the comparing the third list of hash values with the first list of hash values, and determining whether the forensic evidence is stored completely according to the comparison result further comprises:
the query block chain node receives retrieval data of the judicial evidence queried by the user; the query block chain node is any one block chain node in the block chain;
checking whether the retrieval data is matched with indexes in a prestored index directory in the inquiry block chain node;
if the index is matched with the index, searching a first target data node corresponding to a temporary block chain corresponding to the index in a sub-block chain where the query block chain link point is located, and initiating a data acquisition request to the temporary block chain based on the first target data node;
acquiring a transmitted judicial evidence block from the temporary block chain;
and integrating each judicial evidence block according to the integration method corresponding to the data segmentation method to obtain the judicial evidence.
3. The block chain-based data supervision method according to claim 2, wherein after the step of synthesizing each of the judicial evidence blocks according to the synthesis method corresponding to the data segmentation method to obtain the judicial evidence, the method further comprises:
selecting a plurality of auditing nodes from the block link points according to a preset selection method;
calculating the obtained judicial evidence blocks based on the first preset hash algorithm to obtain a sixth hash value list;
and sending the sixth hash value list and the first hash value list to the auditing node, and the auditing node audits the sixth hash value list based on the first hash value list and sends the auditing result to the query block chain node.
4. A data supervision device based on a block chain is characterized in that the block chain comprises a plurality of sub-block chains, each sub-block chain comprises a plurality of data nodes, the block chain is used for storing judicial evidence, the judicial evidence is uploaded by the data nodes and carries a corresponding first hash value after the common authentication of the data nodes, the judicial evidence is divided into a plurality of judicial evidence blocks by a preset data division method, and the first hash value of each judicial evidence block is obtained by performing hash calculation on each judicial evidence block by a first preset hash algorithm to obtain a first hash value of each judicial evidence block to obtain a first hash value list; wherein the data policing means is applied to the block chain, the data policing means comprising:
a first selecting module, configured to select, based on the number of judicial evidence blocks, a corresponding number of first target sub-block chains from the multiple sub-block chains;
the second selection module is used for selecting a data node from each first target sub-block chain as a first target data node according to a preset selection rule, storing the judicial evidence blocks in the corresponding first target data nodes respectively, and forming a first key value pair by the first hash value of each judicial evidence block and the ID of the corresponding first target data node so as to obtain a first key value pair list; each data node forms a different temporary block chain, and each data node is provided with one or more temporary block chains; when two data nodes are respectively in different sub-block chains and have no common temporary block chain, the data can not be interacted, and only the data transmission corresponding to judicial evidence can be carried out in the temporary block chain;
the building module is used for building a temporary block chain according to the obtained first target data node, and endowing a chain name for the temporary block chain by combining the creation time and the name of the first target data node;
the calculation module is used for calculating in the temporary block chain through a second preset hash algorithm according to the first hash value and the chain name to obtain a second hash value;
a first obtaining module, configured to obtain an index of the judicial evidence, and assign the index and a second hash value to each first key-value pair in the first key-value pair list, so as to obtain a target first key-value pair corresponding to each first target data node;
the consensus module is used for performing consensus on the corresponding target first key value in the corresponding first target sub-block chain through each first target data node;
the trigger module is used for acquiring a corresponding target first key value pair at a verification data node when the verification data node triggers a request for verifying the judicial evidence; the verification data node is any one of the data nodes;
a second obtaining module, configured to obtain, based on the target first key-value pair, a first target data node of the temporary blockchain in the subblock chain in which the verification data node is located;
a third obtaining module, configured to obtain judicial evidence blocks of each of the remaining first target data nodes from the temporary block chain through the first target data node, and perform hash calculation according to the first preset hash algorithm to obtain a third hash value list;
the comparison module is used for comparing the third hash value list with the first hash value list and judging whether the judicial evidence is stored completely according to a comparison result;
the secondary verification module is used for initiating secondary verification to the commonly authenticated data node based on the modification instruction when the judicial evidence is stored well and the modification instruction is received;
a block chain obtaining module, configured to obtain the temporary block chain and obtain a modification type of the data node in the modification instruction after the secondary verification passes;
an uploading module, configured to upload the added judicial file to the temporary block chain when the modification type is adding a judicial file, divide the added judicial file into a plurality of judicial evidence blocks to be added by using a preset data division method, and update the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be added to obtain fourth hash values corresponding to the judicial evidence blocks to be added, and adding the fourth hash values into the first hash value list to obtain an updated first hash value list;
a second target sub-block chain obtaining module, configured to select, according to the judicial evidence to be added, a corresponding number of second target sub-block chains from the remaining obtained sub-block chains;
a second target data node selection module, configured to select a data node from each first target sub-block chain according to a preset selection rule as a second target data node, store the judicial evidence blocks in corresponding second target data nodes respectively, add the second target data node to the temporary block chain, and form a third hash value pair by using a fourth hash value of each judicial evidence block to be added and an ID of the corresponding second target data node;
an index assigning module, configured to assign the index and the second hash value to each second key-value pair in the updated first key-value pair list, so as to obtain a target second key-value pair corresponding to each second target data node;
the target second key value consensus module is used for performing consensus on the corresponding target second key value in the corresponding second target sub-block chain through each second target data node;
a judicial evidence block acquisition module, configured to, when the modification type is to modify a judicial file, acquire a judicial evidence block before modification based on the first hash value list;
the judicial file segmentation module is used for segmenting the modified judicial file by a preset data segmentation method to obtain a plurality of judicial evidence blocks to be modified and updating the first hash value list; the method for updating the first hash value list comprises the following steps: performing hash calculation according to the judicial evidence blocks to be modified to obtain fifth hash values corresponding to the judicial evidence blocks to be modified, and adding the fifth hash values into the first hash value list to obtain an updated first hash value list;
the composition module is used for forming a third key value pair by the fifth hash value of each judicial evidence block to be modified and the ID of the corresponding third target data node;
a second key-value pair assigning module, configured to assign the index and the second hash value to each key-value pair in the updated first key-value pair list, so as to obtain a target third key-value pair corresponding to each third target data node;
and the target third key value pair consensus module is used for performing consensus on the corresponding target third key value pairs in the corresponding third target sub-block chains through each third target data node.
5. The blockchain-based data policing apparatus of claim 4, wherein the data policing apparatus further comprises:
the retrieval data receiving module is used for receiving retrieval data of the judicial evidence queried by the user through the query block chain node; the query block chain node is any one block chain node in the block chain;
the checking module is used for checking whether the retrieval data is matched with indexes in a prestored index catalog in the link points of the query block;
a searching module, configured to search, if the index is matched with the index, a first target data node corresponding to a temporary block chain corresponding to the index in a sub-block chain where the query block chain link point is located, and initiate a data acquisition request to the temporary block chain based on the first target data node;
a transmission judicial evidence blocking acquisition module, configured to acquire a transmitted judicial evidence block from the temporary block chain;
and the comprehensive module is used for synthesizing each judicial evidence block according to the comprehensive method corresponding to the data segmentation method to obtain the judicial evidence.
6. The blockchain-based data policing apparatus of claim 5, wherein the data policing apparatus further comprises:
the audit node selection module is used for selecting a plurality of audit nodes from the block chain link points according to a preset selection method;
the judicial evidence block calculation module is used for calculating the obtained judicial evidence blocks based on the first preset Hash algorithm to obtain a sixth Hash value list;
and the sending module is used for sending the sixth hash value list and the first hash value list to the auditing node, and the auditing node audits the sixth hash value list based on the first hash value list and sends the auditing result to the query block chain node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210477889.7A CN114579581B (en) | 2022-05-05 | 2022-05-05 | Data supervision method and device based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210477889.7A CN114579581B (en) | 2022-05-05 | 2022-05-05 | Data supervision method and device based on block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114579581A CN114579581A (en) | 2022-06-03 |
CN114579581B true CN114579581B (en) | 2022-08-30 |
Family
ID=81778972
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210477889.7A Active CN114579581B (en) | 2022-05-05 | 2022-05-05 | Data supervision method and device based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114579581B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI812510B (en) * | 2022-10-17 | 2023-08-11 | 可立可資安股份有限公司 | Blockchain audit system |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107766453A (en) * | 2017-09-26 | 2018-03-06 | 上海策赢网络科技有限公司 | Data base management method, device and storage medium based on block chain |
CN108647968A (en) * | 2018-05-10 | 2018-10-12 | 阿里巴巴集团控股有限公司 | A kind of block chain data processing method, device, processing equipment and system |
CN109741803A (en) * | 2019-01-14 | 2019-05-10 | 南京大学 | Medical data security cooperation system based on block chain |
CN110135986A (en) * | 2019-04-23 | 2019-08-16 | 武汉大学 | It is a kind of to can search for encrypted file data method based on what block chain intelligence contract was realized |
TW201947446A (en) * | 2018-05-11 | 2019-12-16 | 香港商阿里巴巴集團服務有限公司 | Blockchain-based information supervision method and device |
CN110599163A (en) * | 2019-08-20 | 2019-12-20 | 江苏大学 | Transaction record outsourcing method facing block chain transaction supervision |
CN110879827A (en) * | 2019-10-23 | 2020-03-13 | 联想(北京)有限公司 | Information processing method and device based on block chain network |
CN111475538A (en) * | 2019-01-24 | 2020-07-31 | 北京京东尚科信息技术有限公司 | Data processing method, device and storage medium |
CN112035491A (en) * | 2020-09-30 | 2020-12-04 | 中山大学 | Data storage method based on block chain, electronic integral processing method and system |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10193696B2 (en) * | 2015-06-02 | 2019-01-29 | ALTR Solutions, Inc. | Using a tree structure to segment and distribute records across one or more decentralized, acylic graphs of cryptographic hash pointers |
US10402792B2 (en) * | 2015-08-13 | 2019-09-03 | The Toronto-Dominion Bank | Systems and method for tracking enterprise events using hybrid public-private blockchain ledgers |
JP6900680B2 (en) * | 2017-01-18 | 2021-07-07 | 富士通株式会社 | Blockchain management method, blockchain management program, blockchain management device, and blockchain management system |
EP3799052A1 (en) * | 2019-09-30 | 2021-03-31 | Siemens Healthcare GmbH | Providing and receiving medical data records |
WO2021174499A1 (en) * | 2020-03-05 | 2021-09-10 | 合肥达朴汇联科技有限公司 | Blockchain-based data verification method, apparatus and system |
CN111414649B (en) * | 2020-03-05 | 2023-03-24 | 合肥达朴汇联科技有限公司 | Data verification method and system based on block chain |
CN112699081B (en) * | 2020-10-23 | 2024-01-26 | 中国工商银行股份有限公司 | File self-certification method and device based on blockchain |
CN112989405A (en) * | 2021-02-05 | 2021-06-18 | 武汉北大高科软件股份有限公司 | Trusted storage method, device, equipment and storage medium for data storage certificate |
CN113836568A (en) * | 2021-09-06 | 2021-12-24 | 海南海锐众创科技有限公司 | Electronic evidence judicial identification method |
-
2022
- 2022-05-05 CN CN202210477889.7A patent/CN114579581B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107766453A (en) * | 2017-09-26 | 2018-03-06 | 上海策赢网络科技有限公司 | Data base management method, device and storage medium based on block chain |
CN108647968A (en) * | 2018-05-10 | 2018-10-12 | 阿里巴巴集团控股有限公司 | A kind of block chain data processing method, device, processing equipment and system |
TW201947446A (en) * | 2018-05-11 | 2019-12-16 | 香港商阿里巴巴集團服務有限公司 | Blockchain-based information supervision method and device |
CN109741803A (en) * | 2019-01-14 | 2019-05-10 | 南京大学 | Medical data security cooperation system based on block chain |
CN111475538A (en) * | 2019-01-24 | 2020-07-31 | 北京京东尚科信息技术有限公司 | Data processing method, device and storage medium |
CN110135986A (en) * | 2019-04-23 | 2019-08-16 | 武汉大学 | It is a kind of to can search for encrypted file data method based on what block chain intelligence contract was realized |
CN110599163A (en) * | 2019-08-20 | 2019-12-20 | 江苏大学 | Transaction record outsourcing method facing block chain transaction supervision |
CN110879827A (en) * | 2019-10-23 | 2020-03-13 | 联想(北京)有限公司 | Information processing method and device based on block chain network |
CN112035491A (en) * | 2020-09-30 | 2020-12-04 | 中山大学 | Data storage method based on block chain, electronic integral processing method and system |
Non-Patent Citations (2)
Title |
---|
基于区块链的微认证系统架构;刘越等;《计算机系统应用》;20200615(第06期);全文 * |
基于嵌套Merkle Hash tree区块链的云数据动态审计模型;周坚等;《计算机应用》(第12期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114579581A (en) | 2022-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108965299B (en) | Data access method, access verification equipment and data storage system | |
CN109417479B (en) | Cryptographic logic rewritable block chains | |
CN110633963B (en) | Electronic bill processing method, electronic bill processing device, computer readable storage medium and computer readable storage device | |
CN108710681B (en) | File acquisition method, device, equipment and storage medium | |
CN110597818B (en) | File inquiry method, device, equipment and storage medium based on block chain | |
CN110602116B (en) | Block chain based data verification method, device and computer readable storage medium | |
CN114372296B (en) | Block chain-based user behavior data auditing method and system | |
CN110598478A (en) | Block chain based evidence verification method, device, equipment and storage medium | |
CN114579581B (en) | Data supervision method and device based on block chain | |
CN113326081A (en) | Static resource processing method and device, computer equipment and storage medium | |
CN110866265A (en) | Data storage method, device and storage medium based on block chain | |
CN111597424A (en) | Crawler identification method and device, computer equipment and storage medium | |
CN112380286B (en) | Method, device, equipment and medium for generating data object relation map of database | |
CN112104671B (en) | Interface authorization monitoring method and device, computer equipment and storage medium | |
CN111753334A (en) | Method and device for verifying consistency of data across alliance chains and electronic equipment | |
CN111339141A (en) | Data transmission method, block link node equipment and medium | |
CN113435517A (en) | Abnormal data point output method and device, computer equipment and storage medium | |
CN110598475A (en) | Block chain-based work attribute information acquisition method and device and computer equipment | |
CN114579582B (en) | Resource processing method and device based on block chain | |
CN111817859A (en) | Data sharing method, device, equipment and storage medium based on zero knowledge proof | |
CN110599332A (en) | Block chain-based user intention determination method, device, equipment and storage medium | |
CN112650659B (en) | Buried point setting method and device, computer equipment and storage medium | |
CN110598374A (en) | Block chain-based work registration method, device and computer-readable storage medium | |
CN113112354A (en) | Transaction processing method of block chain network, block chain network and storage medium | |
CN112037055A (en) | Transaction processing method and device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A blockchain based data supervision method and device Granted publication date: 20220830 Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd. Pledgor: WUHAN PKU HIGH-TECH SOFT Co.,Ltd. Registration number: Y2024980009351 |
|
PE01 | Entry into force of the registration of the contract for pledge of patent right |