Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present application provides a method, a system and a system for block chain forensics.
In a first aspect, the present application provides a method for verifying a blockchain, including:
acquiring the certificate storing data uploaded by a user, wherein the certificate storing data comprises: file characteristic information of the certificate storage file;
the evidence storing data is linked to a user evidence storing block chain, so that the user evidence storing block chain generates a block corresponding to the evidence storing data, and the user evidence storing block chain generates block characteristic information of the block;
and determining that the evidence storage data is successful in evidence storage according to the block characteristic information.
Optionally, as in the foregoing method, the method further includes:
after the user evidence storage block chain synchronizes the block characteristic information to an evidence verification block chain, acquiring a transaction code corresponding to the block characteristic information generated by the evidence verification block chain;
correlating the transaction code and the block characteristic information.
Optionally, as in the foregoing method, after determining that the evidence of the evidence data is successfully deposited according to the block feature information, the method further includes:
generating a deposit code corresponding to the deposit data;
correlating the deposit certificate code, the transaction code and the block characteristic information to generate deposit certificate record information;
and sending the deposit certificate code to the user.
Optionally, as in the foregoing method, the uplink of the credential data to the user credential block chain includes:
acquiring signature data of the user;
judging the validity of the user according to the signature data;
and when the legality of the user meets a preset requirement, the certificate storing data is linked to the user certificate storing block chain.
In a second aspect, the present application provides a method for forensics of a blockchain, including:
receiving a document to be verified and certificate storing record information sent by a user, wherein the certificate storing record information is obtained by inquiring the certificate storing code;
and verifying the certificate storing file to be verified according to the certificate storing record information.
Alternatively, the method may, as previously described,
the certificate storage record information comprises: block characteristic information and transaction codes;
the verifying the document to be verified according to the certificate storage record information comprises the following steps:
according to a preset corresponding relation, inquiring to obtain related block characteristic information corresponding to the transaction code;
verifying the block characteristic information according to the related block characteristic information to obtain a first verification result;
inquiring file characteristic information corresponding to the transaction code;
verifying the document to be verified and stored with the certificate according to the document characteristic information to obtain a second verification result;
and when the first verification result and the second verification result are verified to pass, judging that the to-be-verified and stored document is verified to pass.
In a third aspect, the present application provides a device for storing a block chain certificate, including:
the acquisition module is used for acquiring the certificate storage data uploaded by the user, and the certificate storage data comprises: file characteristic information of the certificate storage file;
the uplink module is used for uplink the certificate storing data to a user certificate storing block chain so that the user certificate storing block chain generates a block corresponding to the certificate storing data, and the user certificate storing block chain generates block characteristic information of the block;
and the determining module is used for determining that the evidence storing data succeeds in storing the evidence according to the block characteristic information.
In a fourth aspect, the present application provides a blockchain forensics device, comprising:
the receiving module is used for receiving the to-be-verified certificate-storing file and the certificate-storing record information sent by the user; the certificate storing record information comprises a certificate storing code; the certificate storing record information is obtained by inquiring the certificate storing code;
and the verification module is used for verifying the to-be-verified certificate-deposited file according to the certificate-deposited recording information.
In a fifth aspect, the present application provides a blockchain system, including the blockchain forensics device as described above and the blockchain forensics device as described above.
In a sixth aspect, the present application provides an electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor, when executing the computer program, is configured to implement the method according to any of the preceding claims.
In a seventh aspect, the present application provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions that cause the computer to perform the method according to any one of the preceding claims.
The embodiment of the application provides a block chain evidence storing method, an evidence obtaining method and an evidence obtaining system; the block chain evidence storage method comprises the following steps: acquiring the certificate storing data uploaded by a user, wherein the certificate storing data comprises: file characteristic information and user information of the certificate storing file; the evidence storing data is linked to a user evidence storing block chain, so that the user evidence storing block chain generates a block corresponding to the evidence storing data, and the user evidence storing block chain generates block characteristic information of the block; and determining that the evidence storage data is successful in evidence storage according to the block characteristic information. By the method in the embodiment, the device for realizing the method only stores the file characteristic information of the certificate-storing file without storing the certificate-storing file per se; the certificate storing file is always stored at the user side, so that the data security of the certificate storing file can be ensured, the certificate storing file is prevented from being tampered, and the privacy of the user is effectively guaranteed; meanwhile, the system for realizing the method in the embodiment does not need to store certificate files, so that the storage load of the system can be greatly reduced, and the cost of related hardware is reduced.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 some embodiments of the present application, but not all 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.
Fig. 1 is a block chain evidence storing method according to an embodiment of the present application, including the following steps S1 to S3:
s1, obtaining certificate storage data uploaded by a user, wherein the certificate storage data comprises: and storing file characteristic information of the certificate file.
Specifically, the evidence storage data may be an electronic document used as evidence obtained by scanning a document whose original is paper; or the evidence files in the formats of documents, pictures, videos and the like directly generated by a computer; the file characteristic information may be information for characterizing uniqueness of file content, that is, when the file content changes, the file characteristic information also changes, optionally, one of the optional file characteristic information may be a file Hash (file Hash value); further, the evidence storing data may further include: user information; the user information may be information characterizing the uniqueness of the user, such as signature data, a unique ID (e.g., identification card information, account), and the like. In specific implementation, when the file feature information of the certificate storage file is sent, the token (token) in which the user information is stored may be carried, so that the device implementing the embodiment obtains the user sending the file feature information.
And S2, linking the certificate storing data to a user certificate storing block chain so that the user certificate storing block chain generates a block corresponding to the certificate storing data, and the user certificate storing block chain generates block characteristic information of the block.
Specifically, the user authentication block chain is generally located at the local end in the same way as the system for implementing the method of the embodiment; so as to conveniently realize the chaining of the certificate storing data; optionally, before uplink, the certificate storing data is processed to be converted into data corresponding to the block chain; the certificate storing block chain can store user information, then generates a corresponding block head according to the user information, and writes file characteristic information into a block; and finally, generating a block Hash of the block, and taking the block Hash as the block characteristic information of the block. Generally, after receiving user information of a new user, a corresponding block is generated to store file feature information of the user.
And S3, determining that the certificate storing data succeeds in storing the certificate according to the block characteristic information.
Specifically, after receiving the block feature information sent by the user evidence storage block chain, the system implementing the method of the embodiment may determine that the evidence storage of the entire data is completed. Optionally, the relevant information of successful certificate storage may be sent to the user through a mail, a communication interface, or the like, so that the user can timely know that the certificate storage of the whole data is completed. The device for implementing the method of the embodiment can store both the block characteristic information and the file characteristic information so as to verify the file characteristic information at a later stage.
By the method in the embodiment, only the file characteristic information of the certificate-storing file can be stored in the device for realizing the method in the embodiment, and the certificate-storing file itself does not need to be stored; the certificate storing file is always stored at the user side, so that the data security of the certificate storing file can be ensured, the certificate storing file is prevented from being tampered, and the privacy of the user is effectively guaranteed; meanwhile, the system for realizing the method in the embodiment does not need to store certificate files, so that the storage load of the system can be greatly reduced, and the cost of related hardware is reduced.
As shown in fig. 2, in some embodiments, the method further includes steps S4 and S5 as follows:
and S4, after the user certificate storage block chain synchronizes the block characteristic information to the evidence verification block chain, acquiring a transaction code corresponding to the evidence verification block chain generation block characteristic information.
And S5, correlating the transaction codes and the block characteristic information, and establishing a corresponding relation.
Specifically, the evidence check blockchain may be a blockchain (legal chain) established by a unit or department with notarization capability, such as a court; for the evidence verification block chain, the user's evidence storage block chain is in one transaction when performing information synchronization with the user's evidence storage block chain, and each transaction corresponds to the block characteristic information, so the transaction code of each transaction also corresponds to the block characteristic information one by one. Optionally, the transaction code may be generated according to information such as time or sequence of transactions.
Further, the user information, the transaction code and the block feature information may be associated with each other, and the implementation method of the association may be: and correspondingly storing the user information, the transaction codes and the block characteristic information in a data table so as to verify the certificate storing file stored at the user side when the user needs to maintain the right at the later stage.
Optionally, as in the foregoing method, after the determining that the evidence storage of the evidence storage data is successful according to the block feature information, the method further includes the following steps S6 to S8:
and S6, generating a certificate storing code corresponding to the certificate storing data.
And S7, correlating the deposit certificate code, the transaction code and the block characteristic information to generate deposit certificate record information.
And S8, sending the deposit certificate code to a user.
Specifically, the evidence storing code is a code corresponding to the whole process or step of storing the evidence according to the steps in steps S1 to S3; therefore, each time when a user performs the certificate storage in the device for implementing the method of the embodiment, and after the user succeeds, a certificate storage code corresponding to the certificate storage data is generated.
Further, the deposit certificate code, the user information, the transaction code and the block characteristic information can be associated with each other, and the implementation method of the association can be as follows: correspondingly storing the deposit certificate code, the user information, the transaction code and the block characteristic information in a data table to enable the information to have unique corresponding relation, and generating each deposit certificate record information comprising a group of mutually corresponding deposit certificate codes, user information, transaction codes and block characteristic information.
By sending the evidence storing code to the user, the user can call the evidence storing record information in the device for realizing the method of the embodiment when the user performs the maintenance right for a certain evidence storing file, so that the evidence checking block chain can check the uploaded evidence storing file through the unique corresponding relation between the evidence storing record information, and whether the file uploaded by the user is consistent with the evidence storing file stored at that time is judged.
In some embodiments, as the method described above, the step S2 of linking the credential data to the user credential blockchain includes the following steps S21 to S23:
and S21, acquiring signature data of the user.
And S22, judging the legality of the user according to the signature data.
And S23, when the legality of the user meets the preset requirement, linking the certificate storing data to a user certificate storing block chain.
Specifically, the signature data is data used for determining that the stored data is uploaded by the user, but not illegally uploaded by others. Optionally, one of the signature data may be login information of the user, and is used to determine whether the user is a login account.
The step S22 of determining the validity of the signature data may be to determine whether the login account exists, and the method of determining the validity is consistent with the type of the signature data, which may be performed in other manners besides the alternatives listed in this embodiment.
The legality of the data meeting the preset requirement is generally legal for the user, and when the file is legal, the data can be linked up with the certificate storing data, so that the data can be effectively prevented from being tampered or illegally uploaded by others.
As shown in fig. 3, according to another aspect of the present application, there is also provided a method for evidence collection of a blockchain, which is applied to an evidence check blockchain (method chain), and includes the following steps a1 and a 2:
a1, receiving a document to be verified and certificate storing record information sent by a user, wherein the certificate storing record information is obtained by inquiring the certificate storing code; the certificate storing record information comprises a certificate storing code;
receiving a document to be verified and evidence storing record information sent by a user, wherein the evidence storing record information can be the right-maintaining information which needs to be verified and obtained by the user through evidence storing code inquiry, and after the right-maintaining information is selected, determining the record information used for verifying the document to be verified according to the right-maintaining information, and each evidence storing record information has the only corresponding evidence storing document.
Specifically, one of the optional implementation methods may be:
the user selects right information that needs to be subjected to right maintenance in the device I implementing the method corresponding to steps S1 to S3. And the device I generates the certificate storing record information corresponding to the right maintaining information and sends the certificate storing record information to the user.
The user uploads the to-be-verified certificate-storing file and the certificate-storing record information stored in the user side to the evidence verification block chain for implementing the method of the embodiment for right maintenance.
And step A2, verifying the document to be verified according to the certificate storage record information.
Specifically, the certificate-storing file is not really stored but only the file characteristic information is stored by adopting the relevant methods in the steps S1 to S3, and the certificate-storing file is stored at the user side; therefore, when the user maintains the right, the user is prevented from uploading edited files or other files and needing to verify the files to be verified and stored in the user side; to judge whether it is consistent with the file which is stored with the certificate before. In the method of the embodiment: firstly, receiving a document to be verified and certificate storing record information sent by a user; generally, the certificate storage record information is history information corresponding to the right information selected by the user, and under a normal condition, when the certificate storage file to be verified is subjected to certificate storage, the history record generated by execution of each certificate storage step is consistent with the certificate storage record information. And the document to be verified comprises: and storing the certificate document and the user information.
Since the certificate storage record information is uniquely corresponding to the certificate storage data, the step a2 can be verified according to the certificate storage record information, that is, the certificate storage file to be verified is verified according to the history record information, rather than comparing the consistency of the two files in the prior art.
As shown in fig. 4, in some embodiments, the credentialing information comprises, as the aforementioned method: block feature information and transaction codes.
Step a2, verifying the document to be verified according to the document storage record information to obtain a corresponding verification result, including the following steps a21 to a 25:
and step A21, inquiring to obtain the related block characteristic information corresponding to the transaction codes according to the preset corresponding relation.
Specifically, the related block feature information is: according to the corresponding relation, the block characteristic information corresponding to the transaction code; since the evidence verification blockchain, the device I for implementing the methods corresponding to steps S1 to S3, and the user certification storing blockchain belong to two different systems, neither the certification storing record information nor the certification storing file to be verified is necessarily authentic, for example: the possibility that data in the device I and data uploaded by a user are tampered exists, so that the data need to be verified; the step is used for verifying the data in the device I; further, since in the foregoing embodiments: step S4, after the user authentication block chain synchronizes the block characteristic information to the evidence verification block chain, acquiring a transaction code corresponding to the evidence verification block chain generation block characteristic information; step S5 correlates the transaction code and the block feature information to each other and establishes a corresponding relationship. Therefore, under the condition that the transaction code exists, the transaction code can be matched to obtain the associated block characteristic information uniquely corresponding to the transaction code.
And step A22, verifying the block characteristic information according to the related block characteristic information to obtain a first verification result.
Specifically, the block feature information is verified according to the related block feature information, and in general, the block feature information is a block Hash, so that the consistency of the character strings can be verified; and, when the two agree, the first verification result may be a pass or a success.
And step A23, inquiring file characteristic information corresponding to the transaction codes.
Specifically, for the same reason as that of step a21, since step S5 correlates the user information, the transaction code, and the tile feature information with each other. Therefore, the file characteristic information corresponding to the transaction code can be inquired according to the transaction code. In implementation, the device I may query the transaction code to obtain the corresponding file feature information.
And step A24, verifying the document to be verified and stored with the certificate according to the document characteristic information to obtain a second verification result.
Specifically, since the file characteristic information is obtained according to the certificate-storing file (generally, the file Hash), the file Hash of the certificate-storing file to be verified can be obtained first, and then the verification is performed through the file characteristic information and the file Hash of the certificate-storing file to be verified, so as to obtain a second verification result; and, when the two agree, the first verification result may be a pass or a success.
And A25, when the first verification result and the second verification result are verified to pass, judging that the to-be-verified and stored document is verified to pass.
Specifically, when the first verification result and the second verification result both pass the verification, it is determined that the data of the device I and the data uploaded by the user both pass the verification, and it is determined that the authentication of the authentication-subject file passes. Therefore, the document to be verified and stored uploaded by the user can be verified through the block characteristic information (block Hash) and the document characteristic information (document Hash) of the original document, and the evidence can be effectively guaranteed to be legal.
In some embodiments, as the aforementioned method, after receiving the to-be-verified certificate-deposited file and the certificate-deposited record information sent by the user, the method further includes steps A3 and a4 as follows:
and A3, generating a forensics number corresponding to the right maintaining information.
And A4, sending the number for obtaining evidence to the user.
Specifically, a forensics number corresponding to the right-maintaining information is generated, that is, a number corresponding to each right-maintaining behavior can be generated by the method in this embodiment for the representation; and sending the forensics number to the user so that the user can record and inquire according to the forensics number.
As shown in fig. 5, according to another aspect of the present application, there is provided a blockchain evidence storing device, including:
the obtaining module 11 is configured to obtain credential storage data uploaded by a user, where the credential storage data includes: file characteristic information of the deposit certificate file and user information.
The uplink module 12 is configured to uplink the credential data to the user credential block chain, so that the user credential block chain generates a block corresponding to the credential data, and the user credential block chain generates block feature information of the block.
And the determining module 13 is configured to determine that the evidence storage data succeeds in storing the evidence according to the block feature information.
Specifically, the specific process of implementing the functions of each module in the apparatus according to the embodiment of the present invention may refer to the related description in the method embodiment, and is not described herein again.
As shown in fig. 6, according to another aspect of the present application, there is provided a blockchain forensics apparatus including:
the receiving module 21 is configured to receive the document to be verified and the certificate storing record information sent by the user. And after the evidence storage record information is the right maintaining information which needs to be subjected to evidence obtaining and is selected, determining the record information for verifying the evidence storage file to be verified according to the right maintaining information. The certificate storing record information is provided with a certificate storing file which is uniquely corresponding to the certificate storing record information.
And the verification module 22 is configured to verify the document to be verified according to the certificate storage record information, so as to obtain a corresponding verification result.
Specifically, the specific process of implementing the functions of each module in the apparatus according to the embodiment of the present invention may refer to the related description in the method embodiment, and is not described herein again.
According to another aspect of the present application, there is provided a blockchain system, including a blockchain evidence obtaining device as in the previous embodiment and a blockchain evidence obtaining device as before. Optionally, the blockchain system further includes a blockchain (i.e., a user authentication blockchain).
The process of carrying out the user uplink certificate storing operation by the system comprises the following steps:
(1) the user calculates the file Hash of the certificate-storing file and uploads the user information (such as the file name, the file size and other self-defined information) to the certificate-storing system together.
(2) And the certificate storing device processes user-defined data and links the data to the chain.
(3) The chain block Hash is stored by the certificate storing system.
(4) The authentication device returns the user authentication success.
(5) The chain synchronizes the blockwork information, including transaction information, to the legal chain (the forensics device) during the creation of the blockwork (e.g., when the blockwork is packed).
(6) The normal chain transaction ID (transaction code) is called through the deposit certificate system interface and notified to the deposit certificate system.
The flow of case evidence obtaining through the system is as follows:
1) the user selects right information to be right-handed on the credentialing device.
2) The evidence storing device generates the evidence storing record information required by the method chain.
3) And the user uploads the certificate storage record information and the original certificate storage file to a legal link for right maintenance.
4) The method chain checks the validity of the original document (the validity of the evidence is guaranteed by block Hash, user original document Hash and double Hash).
Specifically, the specific process of implementing the functions of each module in the apparatus according to the embodiment of the present invention may refer to the related description in the method embodiment, and is not described herein again.
According to another embodiment of the present application, there is also provided an electronic apparatus including: as shown in fig. 7, the electronic device may include: the system comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to implement the steps of the above-described method embodiments when executing the program stored in the memory 1503.
The bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the steps of the above-described method embodiments.
It is noted that, in this document, 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 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 foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.