CN112308561A - Block chain-based evidence storing method and system, computer equipment and storage medium - Google Patents

Block chain-based evidence storing method and system, computer equipment and storage medium Download PDF

Info

Publication number
CN112308561A
CN112308561A CN202011108348.4A CN202011108348A CN112308561A CN 112308561 A CN112308561 A CN 112308561A CN 202011108348 A CN202011108348 A CN 202011108348A CN 112308561 A CN112308561 A CN 112308561A
Authority
CN
China
Prior art keywords
transaction
data
hash value
value
block chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011108348.4A
Other languages
Chinese (zh)
Inventor
顾惠波
岳晓兰
王帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Jiaguwen Chaojima Technology Co ltd
Original Assignee
Zhejiang Jiaguwen Chaojima Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Jiaguwen Chaojima Technology Co ltd filed Critical Zhejiang Jiaguwen Chaojima Technology Co ltd
Priority to CN202011108348.4A priority Critical patent/CN112308561A/en
Publication of CN112308561A publication Critical patent/CN112308561A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The application relates to a block chain-based evidence storing method, a block chain-based evidence storing system, a computer device and a storage medium. The method comprises the following steps: by receiving the data evidence storage transaction, analyzing the transaction and calling a preset intelligent contract after the transaction is linked, the intelligent contract acquires the evidence storage data in the transaction and takes the hash value of the evidence storage data as a key, the transaction hash value of the data evidence storage transaction as a value to be stored in a state database, and the evidence storage data as a return value to be stored in a transaction body of a block chain, the reliability of data evidence storage is improved.

Description

Block chain-based evidence storing method and system, computer equipment and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method, a system, a computer device, and a storage medium for storing a certificate based on a blockchain.
Background
Most of the existing block chaining certificates adopt chaining of hash values of data, and original data is kept by the block chaining certificates or handed to a third-party data storage and hosting method. This approach is used because the cost of data storage is expensive for the blockchain, and the execution performance of the intelligent contract is affected when the amount of data stored in the state database is too large. However, this method cannot strongly associate the original data with the evidence data, and only the holder of the original data can verify the authenticity of the data, and once the data is lost, the data cannot be retrieved.
Aiming at the problem of poor reliability of data storage in the related technology, no effective solution is provided at present.
Disclosure of Invention
In view of the above, it is necessary to provide a block chain based evidence storing method, system, computer device and storage medium.
In a first aspect, an embodiment of the present application provides a block chain-based evidence storing method, including the following steps:
receiving data deposit transaction, and after the transaction is linked up, analyzing the transaction and calling a preset intelligent contract;
the intelligent contract acquires the evidence storing data in the transaction and takes the hash value of the evidence storing data as a key, the transaction hash value of the data evidence storing transaction is taken as a value to be stored in a state database, and the intelligent contract takes the evidence storing data as a return value and stores the return value in a transaction body of a block chain.
In one embodiment, after the hash value of the certification data is used as a key and the transaction hash value of the data certification transaction is stored as a value in a state database, the method includes:
acquiring a verification hash value, inquiring a state record corresponding to the verification hash value in the state database according to the verification hash value, and acquiring a transaction hash value in the state record;
and performing transaction inquiry according to the transaction hash value to obtain transaction details corresponding to the transaction hash value, wherein the transaction details are used for verifying the deposit evidence data.
In one embodiment, the obtaining the verification hash value includes: and acquiring verification data, and calculating the verification hash value according to the verification data.
In one embodiment, after querying the state database for the state record corresponding to the verification hash value according to the verification hash value, the method further includes: returning a null value if no state record corresponding to the verification hash value exists in the state database.
In one embodiment, the certification data is obtained by compressing or encrypting original data to be certified.
In one embodiment, the storing the hash value of the deposit data as a key and the transaction hash value of the data deposit transaction as a value into a status database includes: the key corresponds to the value one to form a record; and stopping storing the key and the value under the condition that the number of records corresponding to the same key is greater than a preset threshold value.
In a second aspect, an embodiment of the present application further provides a block chain-based deposit evidence system, where the system includes a block chain node, an intelligent contract, and a state database:
the block chain node is used for receiving data deposit transaction, analyzing the transaction after the transaction is linked up, and calling the intelligent contract;
the intelligent contract is used for acquiring the evidence storing data in the transaction and taking the hash value of the evidence storing data as a key, the transaction hash value of the data evidence storing transaction is taken as a value to be stored in the state database, and the evidence storing data is taken as a return value to be stored in a transaction body of the block chain.
In one embodiment, the system further includes a user side, and the intelligent contract is further configured to query, in the state database, a state record corresponding to the verification hash value according to the verification hash value sent by the user side, and obtain a transaction hash value in the state record; and the block chain node is also used for carrying out transaction inquiry according to the transaction hash value to obtain transaction details corresponding to the transaction hash value, and the user side checks the verification data according to the transaction details.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the above block chain-based evidence storage method when executing the computer program.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the above block chain-based evidence storage method.
According to the block chain-based evidence storing method, the block chain-based evidence storing system, the computer equipment and the storage medium, after data evidence storing transaction is received and chain is traded, the transaction is analyzed and the preset intelligent contract is called, the intelligent contract obtains the evidence storing data in the transaction and takes the hash value of the evidence storing data as the key, the transaction hash value of the data evidence storing transaction is taken as the value to be stored in the state database, and the evidence storing data is taken as the return value to be stored in the transaction body of the block chain, so that the reliability of data evidence storing is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a diagram illustrating an application scenario of a blockchain-based evidence preservation method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a blockchain-based credentialing method in accordance with one embodiment of the present invention;
FIG. 3 is a timing diagram illustrating data evidence in a blockchain-based evidence preservation method according to an embodiment of the present invention;
FIG. 4 is a flow diagram of data validation in a blockchain-based attestation method in accordance with one implementation of the invention;
FIG. 5 is a timing diagram illustrating data verification in a blockchain-based data verification method according to an embodiment of the present invention;
FIG. 6 is a timing diagram illustrating data verification in a blockchain-based data verification method according to another embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data evidence computer device based on a blockchain according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
To facilitate understanding of the blockchain network in the storage system of the present application, the blockchain technique employed in the present application is first exemplified. In some embodiments, an electronic device runs the blockchain technique to become a node of the blockchain network, the blockchain platform infrastructure including a presentation layer, an application layer, a service layer, and a blockchain core support module of a blockchain. The display layer is used for displaying system functions so as to achieve user interaction, and each file main body can log in an interface displayed by the corresponding display layer through a system client to access the application layer so as to acquire information resources, wherein the interface comprises a registration interface, an operation execution interface, a query interface, an application management interface, an administrator interface and the like. The application layer is used for displaying specific functions of the block chain network, is an important link of file storage, and can be divided into user management, authority control, directory management and the like according to different functions. The service layer is used for effectively integrating and managing application related functions through the distributed servers, such as user registration, user identity management, encryption and decryption services, distributed book services, intelligent contract services, data management services and the like.
The block chain core support module comprises a data layer, a network layer, a consensus layer and a contract layer. The data layer is used for encapsulating underlying data blocks and related data encryption and time stamping technologies. The network layer encapsulates elements such as a P2P networking mode, a message propagation protocol, a data verification mechanism and the like of the blockchain network system, so that nodes are equal in status and mutually communicated in a flat topological structure, and the characteristics of distribution, autonomy, openness, free access and the like are possessed. Each node in the block chain network can participate in the checking and accounting process of the block data, and the block chain can be recorded only after the block data passes verification of most nodes in the whole network. The decentralized design of the block chain ensures that the file data cannot be tampered and forged. The consensus layer encapsulates a method for rapidly completing consensus in a topological network with highly dispersed decision weights so as to participate in a consensus mechanism of a block chain network. The contract layer encapsulates contract codes with data access strategies, automatically executes corresponding transactions when conditions in the contract codes are triggered, and simultaneously can access corresponding data through corresponding access conditions specified by contract contents. Fig. 1 is an application scenario diagram of a block chain-based evidence preservation method according to an embodiment of the present invention, and the block chain-based evidence preservation method provided in the present application may be used in a block chain based on technology, and may also be applied in the application environment shown in fig. 1. The computer device 12 may run any suitable computing system that enables it to access the blockchain network 10 as a node in the blockchain network 10. The file node 12 has a right to initiate a data verification transaction to the blockchain network 10, so as to perform data verification based on the blockchain network 10 of the present embodiment. The block chain network 10 receives data evidence transaction, and obtains evidence data according to the data evidence transaction, wherein the evidence data is obtained by reversible operation of original data; and taking the hash value of the evidence storing data as a key, and taking the transaction hash value of the data evidence storing transaction as a value to be stored in the state database.
The computer device 12 may be any electronic device, such as a server, a mobile phone, a computer, a tablet computer, and the like. It will be appreciated that the computer device 12, when acting as a node of the blockchain network 10, may communicate with any node on the blockchain network 10. In some embodiments, the blockchain is a blockchain private chain or a blockchain alliance, so that a corresponding principal of the blockchain network 10 node, such as the computer device 12, needs to complete registration on the blockchain platform in advance, acquire a corresponding public key and a corresponding private key, and allow the related services of the file storage to be performed after determining that the identity of the corresponding principal is trusted.
In an embodiment, fig. 2 is a flowchart of a block chain based evidence storing method according to an embodiment of the present invention, and as shown in fig. 2, a block chain based evidence storing method is provided, which is exemplified by applying the method to the block chain network 10 in fig. 1, and includes the following steps:
step S210, the block chain node receives data storage transaction, and after the transaction is linked up, the transaction is analyzed and a preset intelligent contract is called. The evidence storing data is obtained by reversible operation of the original data, and optionally, the evidence storing data can also be the original data. In some embodiments, the user node of the evidence depositor compresses or encrypts original data to be credited to obtain the credentialing data, initiates data credentialing transaction according to the credentialing data, and sends the data credentialing transaction to the block chain node. The original data are encrypted, so that the privacy of the certificate storing data can be improved, and the transmission performance of the certificate storing data can be improved by compressing the original data. The intelligent contract is provided with a preset data evidence storing method which requires the incoming evidence storing data as a parameter, so that after data evidence storing transaction is linked up, the block link point analyzes the transaction, acquires the evidence storing data in the transaction and takes the evidence storing data as an input parameter, and calls the data evidence storing method in the intelligent contract.
Step S220, the intelligent contract acquires the evidence storing data in the transaction and takes the hash value of the evidence storing data as a key, the transaction hash value of the data evidence storing transaction as a value to be stored in the state database, and the intelligent contract returns the evidence storing data as a return value to be stored in the transaction body of the block chain. The account book is an ordered and non-falsifiable State conversion record and comprises a Blockchain (Blockchain) and a World State (World State), wherein the Blockchain stores a non-changeable sequence record, including a configuration record and all transaction records; and maintaining the current state of the ledger in the world state. The world state maintains the current state of a group of business objects, and stores the state in a state database in a KV database mode, wherein each group of data comprises a key and a value. In this step, the Hash value of the certificate-storing data is used as a key, and the transaction Hash value of the data certificate-storing transaction is stored as a value in the state database. The intelligent contract calculates the Hash Value of the evidence data, the Hash of the evidence data and the transaction Hash of the data evidence transaction are respectively used as Key and Value to be stored in a state database, and meanwhile, the intelligent contract returns the evidence data to the block link point as a method return Value, namely the execution result of the intelligent contract, and stores the result in a transaction body.
In an embodiment, fig. 3 is a timing diagram of data evidence in a blockchain-based evidence preservation method according to an embodiment of the present invention, and as shown in fig. 3, the data evidence preservation includes the following processes: the user node, namely the certificate storage initiator, performs reversible operations such as compression, encryption and the like on original data; the user node initiates data evidence transaction to the block chain; after the transaction is successfully linked, analyzing the transaction by using a block chain, and calling a evidence storing method in the intelligent contract; calculating the certificate storage data Hash by the intelligent contract; the intelligent contract takes the certificate storage data Hash as Key and stores the transaction Hash as Value to a state database; the state database returns a storage result to the intelligent contract; the intelligent contract returns the evidence storage data to the block chain; the blockchain returns a transaction receipt to the user node.
In the blockchain architecture, transaction data is stored as part of blockdata on a disk in the form of a file, the blockfile is divided into blocks of a fixed size, and an index is stored in a database. In the execution process of the block chain intelligent contract, only the data in the state database is read, and the execution performance of the intelligent contract is not affected by storing the evidence storing data in the transaction body. The Hash of the certificate storing data is stored in the state database, so that a user can check the certificate storing data very conveniently, namely, the data in the state database is read through an intelligent contract so as to verify whether the certificate storing data exists, and the reliability of data certificate storing is improved.
In some embodiments, the key and the value are in one-to-one correspondence and are regarded as one record, the same key may correspond to different values to form different records, and the storing of the key and the value is stopped when the number of records corresponding to the same key is greater than a preset threshold. Optionally, the preset threshold may be 100, and a value sudden increase corresponding to the same key is likely to result in malicious data transmission in the blockchain network, so that the record writing in the state database is stopped when the record corresponding to the same key is greater than 100, thereby improving the security of the intelligent contract.
In some embodiments, fig. 4 is a flowchart of data verification in a blockchain-based evidence storing method according to an embodiment of the present invention, and after storing a hash value of evidence storing data as a key and a transaction hash value of data evidence storing transaction as a value into a status database, the method further includes the following steps:
step S410, the intelligent contract obtains a verification hash value, inquires a state record corresponding to the verification hash value in a state database according to the verification hash value, and obtains a transaction hash value in the state record. The method comprises the steps that under the condition that a user node needs to carry out data verification, the user node initiates a verification data verification transaction to a block chain, after the block chain analyzes the transaction, a preset data verification method in an intelligent contract is called, the data verification method requires incoming verification data Hash as a parameter, and in the step, the verification data Hash initiated by the user node is indicated as a verification Hash value. In the state database, keys and values are in one-to-one correspondence to form a strip-shaped state record, and one key can correspond to a plurality of state records. The intelligent contract queries all state records corresponding to the verification hash Value in a state database by taking the verification hash Value as a Key, returns the state records to the block chain node, obtains Value in all the state records as a transaction hash Value by the block chain node, and returns the transaction hash Value to the user node.
In step S420, the block nodes perform transaction inquiry according to the transaction hash value to obtain transaction details corresponding to the transaction hash value. After the user node receives the transaction hash value, the user node can start transaction query to the block nodes according to the transaction hash value, the block nodes feed back transaction query results, namely transaction details corresponding to the transaction hash value, to the user node, and intelligent contract execution result fields in the transaction details are deposit evidence data. If the record exists, the Value values of all the records are taken out and returned, and if the record does not exist, a null Value is returned. If the record exists, the user can inquire specific transaction details according to the returned transaction Hash or the transaction Hash list, the intelligent contract return value field in the transaction details is evidence storage data, and the evidence storage data can be used for verifying the authenticity of the data. In some embodiments, in a case that the state record corresponding to the verification hash value does not exist in the state database, a null value is returned, and if the user node receives the null value, it means that the verification data corresponding to the verification hash value is not authentic. The return of the null value enables the user side to receive feedback no matter what the verification result is when the data is verified, and therefore the verification process is more reliable and accurate.
In a specific embodiment, fig. 5 is a timing diagram of data verification in a data verification method based on a blockchain according to an embodiment of the present invention, and as shown in fig. 5, a specific flow of data verification based on a verification hash value includes the following processes: the user node initiates a certificate storing data Hash verification transaction to the block chain; analyzing the transaction by the block link points, and calling an intelligent contract security data Hash verification method; the intelligent contract queries a state database by using the verification Hash as a Key; the state database returns the query result to the intelligent contract, if the state record exists, the intelligent contract returns Value in all the state records to the block chain link point, and if the record does not exist, the intelligent contract returns a null Value to the block chain link point; returning a value to the user node by the block chain node; the user node inquires transaction details from the block chain according to the transaction Hash; the block chain link points return transaction details to the user nodes; and extracting the intelligent contract execution result field from the transaction details by the user node to obtain the evidence storage data, and decompressing, decrypting and the like the evidence storage data to obtain the original data.
When the state database queries data, the value can be quickly obtained through a key, the verification hash value of the data to be verified is used as the input parameter of the intelligent contract through the intelligent contract, the response value is queried in the state database, transaction query is carried out according to the value, data verification is carried out according to transaction details obtained by the transaction query, and the efficiency and the accuracy of data verification are improved.
In some embodiments, during data validation, a validation hash value is calculated from validation data by obtaining the validation data. Specifically, fig. 6 is a timing diagram of data verification in a data evidence storing method based on a block chain according to another specific embodiment of the present invention, and as shown in fig. 6, a specific flow of data verification based on evidence data includes the following processes: the user node sends out verification transaction of the certificate storing data to the block chain node; analyzing the transaction by the block link points, and calling an intelligent contract deposit evidence data verification method; calculating a verification data Hash by the intelligent contract, and using the verification data Hash as a Key to inquire a state database; the state database returns the query result to the intelligent contract, and if the record exists, the intelligent contract returns all the recorded Value values to the block link point; if no record exists, returning a null value to the block link point; and the block chain node returns a recording result to the user node, the user node inquires transaction details from the block chain according to the transaction Hash contained in the inquired recording result, the block chain link points return the transaction details to the user node, the user node extracts an intelligent contract execution result field from the transaction details to obtain the evidence storage data, and the user node decompresses and decrypts the evidence storage data to obtain the original data.
The Hash of the certificate storing data is stored in the state database, so that a user can conveniently check the certificate storing data, namely, the data in the state database is read through an intelligent contract so as to verify whether the certificate storing data exists or not. If the evidence data exists, the intelligent contract returns all the transaction Hash recorded and stored in the state database, the user can inquire the transaction detailed data according to the transaction Hash, and the evidence data can be obtained by extracting the intelligent contract execution result field in the transaction detailed data, so that the risk of losing the evidence data is avoided.
It should be understood that, although the steps in the flowcharts of fig. 2 to 6 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, a block chain based deposit evidence system is provided, which comprises block chain nodes, intelligent contracts and a state database, wherein the block chain nodes are used for receiving data deposit evidence transactions, analyzing the transactions after the transactions are linked, and calling the intelligent contracts; the intelligent contract is used for acquiring evidence data and taking the hash value of the evidence data as a key, the transaction hash value of data evidence transaction as a value to be stored in the state database, and the evidence data as a return value to be stored in a transaction body of the block chain.
In some embodiments, the system further includes a user side, the intelligent contract obtains a verification hash value by analyzing the transaction constructed by the user side through the block link points, and queries a state record corresponding to the verification hash value in the state database according to the verification hash value sent by the user side, so as to obtain the transaction hash value in the state record; and the block chain node is also used for carrying out transaction inquiry according to the transaction hash value to obtain transaction details corresponding to the transaction hash value, and the user side checks the verification data according to the transaction details.
For specific definition of the evidence saving system based on the block chain, reference may be made to the above definition of the evidence saving method based on the block chain, and details are not described here. The modules in the above block chain-based storage and verification system may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In an embodiment, fig. 7 is a schematic structural diagram of a data storage computer device based on a block chain according to an embodiment of the present invention, which provides a computer device, where the computer device may be a terminal, and its internal structural diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a blockchain-based credentialing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
According to the block chain-based deposit certificate system, data deposit certificate transaction is received, after the transaction is linked, the transaction is analyzed and a preset intelligent contract is called, the intelligent contract obtains deposit certificate data in the transaction and takes the hash value of the deposit certificate data as a key, the transaction hash value of the data deposit certificate transaction as a value to be stored in the state database, and the deposit certificate data is stored in a transaction body of the block chain as a return value, so that the reliability of data deposit certificate is improved.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the block chain based attestation method is implemented.
According to the block chain-based evidence storing computer equipment, after data evidence storing transaction is received and chain is linked, the transaction is analyzed and a preset intelligent contract is called, the intelligent contract obtains evidence storing data in the transaction and takes the hash value of the evidence storing data as a key, the transaction hash value of the data evidence storing transaction is taken as a value to be stored in the state database, and the evidence storing data is taken as a return value to be stored in the transaction body of the block chain, so that the reliability of data evidence storing is improved.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the above-described blockchain-based attestation method.
According to the evidence storing computer readable storage medium based on the block chain, after data evidence storing transaction is received and chain is carried out, the transaction is analyzed and a preset intelligent contract is called, the intelligent contract obtains evidence storing data in the transaction and takes the hash value of the evidence storing data as a key, the transaction hash value of the data evidence storing transaction is taken as a value to be stored in the state database, and the evidence storing data is taken as a return value to be stored in the transaction body of the block chain, so that the reliability of data evidence storing is improved.
The intelligent contract deposit evidence method, the system, the computer equipment and the storage medium based on the blockchain can be used in the blockchain based on the Fabric technology and can also be used in other blockchains similar to the Fabric blockchain technology and capable of realizing the intelligent contract deposit evidence method.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. 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 Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A block chain-based evidence storing method is characterized by comprising the following steps:
receiving data deposit transaction, and after the transaction is linked up, analyzing the transaction and calling a preset intelligent contract;
the intelligent contract acquires the evidence storing data in the transaction and takes the hash value of the evidence storing data as a key, the transaction hash value of the data evidence storing transaction is taken as a value to be stored in a state database, and the intelligent contract stores the evidence storing data as a return value in a transaction body of a block chain.
2. The method of claim 1, wherein after storing the hash value of the credentialed data as a key and the transaction hash value of the data credentialed transaction as a value in a status database, the method comprises:
acquiring a verification hash value, inquiring a state record corresponding to the verification hash value in the state database according to the verification hash value, and acquiring the transaction hash value in the state record;
and performing transaction inquiry according to the transaction hash value to obtain transaction details corresponding to the transaction hash value, wherein the transaction details are used for verifying the deposit evidence data.
3. The method of claim 2, wherein obtaining the validation hash value comprises:
and acquiring verification data, and calculating the verification hash value according to the verification data.
4. The method according to any of claims 2 or 3, wherein after querying the state database for the state record corresponding to the validation hash value according to the validation hash value, the method further comprises:
returning a null value if no state record corresponding to the verification hash value exists in the state database.
5. The method according to claim 1, wherein the certificate storing data is obtained by compressing or encrypting original data to be certified.
6. The method of claim 1, wherein storing the hash value of the credentialing data as a key and the transaction hash value of the data credentialing transaction as a value into a status database comprises:
the key corresponds to the value one to form a record;
and stopping storing the key and the value under the condition that the number of records corresponding to the same key is greater than a preset threshold value.
7. A block chain based deposit certificate system, the system comprising block chain nodes, intelligent contracts and a state database:
the block chain node is used for receiving data deposit transaction, analyzing the transaction after the transaction is linked up, and calling the intelligent contract;
the intelligent contract is used for acquiring the evidence storing data in the transaction and taking the hash value of the evidence storing data as a key, the transaction hash value of the data evidence storing transaction is taken as a value to be stored in the state database, and the evidence storing data is taken as a return value to be stored in a transaction body of the block chain.
8. The system of claim 7, further comprising a user side:
the intelligent contract is also used for inquiring a state record corresponding to the verification hash value in the state database according to the verification hash value sent by the user side, and acquiring a transaction hash value in the state record;
and the block chain node is also used for carrying out transaction inquiry according to the transaction hash value to obtain transaction details corresponding to the transaction hash value, and the user side checks the verification data according to the transaction details.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 6 are implemented by the processor when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202011108348.4A 2020-10-16 2020-10-16 Block chain-based evidence storing method and system, computer equipment and storage medium Pending CN112308561A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011108348.4A CN112308561A (en) 2020-10-16 2020-10-16 Block chain-based evidence storing method and system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011108348.4A CN112308561A (en) 2020-10-16 2020-10-16 Block chain-based evidence storing method and system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112308561A true CN112308561A (en) 2021-02-02

Family

ID=74327833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011108348.4A Pending CN112308561A (en) 2020-10-16 2020-10-16 Block chain-based evidence storing method and system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112308561A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112907248A (en) * 2021-03-25 2021-06-04 芝麻链(北京)科技有限公司 Data storage transaction method and transaction system based on block chain
CN113159768A (en) * 2021-04-20 2021-07-23 支付宝(杭州)信息技术有限公司 Transaction certificate storage method, device and equipment
CN113312365A (en) * 2021-05-27 2021-08-27 上海万向区块链股份公司 Method, system, medium and equipment for quickly inquiring intelligent contract data
CN114581243A (en) * 2022-05-09 2022-06-03 南京金宁汇科技有限公司 Multi-channel transaction certificate asynchronous callback processing component library, method and system
CN115017226A (en) * 2021-03-05 2022-09-06 京东科技信息技术有限公司 Data storage method and device, electronic equipment and storage medium
WO2022237588A1 (en) * 2021-05-10 2022-11-17 支付宝(杭州)信息技术有限公司 Blockchain-based data evidence storage method and apparatus, device, and storage medium
CN117472902A (en) * 2023-10-11 2024-01-30 广州新赫信息科技有限公司 Shadow library data link tracing method based on trusted chain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190104793A (en) * 2018-03-02 2019-09-11 주식회사 아이콘루프 Method for generating block chain and verifying integrity in smart contract system
CN110263035A (en) * 2019-05-31 2019-09-20 阿里巴巴集团控股有限公司 Data storage, querying method and device and electronic equipment based on block chain
CN110912937A (en) * 2019-12-23 2020-03-24 杭州中科先进技术研究院有限公司 Block chain-based digital certificate storage platform and certificate storage method
CN111524009A (en) * 2020-04-12 2020-08-11 链农(深圳)信息科技有限公司 Transaction verification method and device for blockchain system and hardware equipment
CN111708825A (en) * 2020-06-11 2020-09-25 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190104793A (en) * 2018-03-02 2019-09-11 주식회사 아이콘루프 Method for generating block chain and verifying integrity in smart contract system
CN110263035A (en) * 2019-05-31 2019-09-20 阿里巴巴集团控股有限公司 Data storage, querying method and device and electronic equipment based on block chain
CN110912937A (en) * 2019-12-23 2020-03-24 杭州中科先进技术研究院有限公司 Block chain-based digital certificate storage platform and certificate storage method
CN111524009A (en) * 2020-04-12 2020-08-11 链农(深圳)信息科技有限公司 Transaction verification method and device for blockchain system and hardware equipment
CN111708825A (en) * 2020-06-11 2020-09-25 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115017226A (en) * 2021-03-05 2022-09-06 京东科技信息技术有限公司 Data storage method and device, electronic equipment and storage medium
CN112907248A (en) * 2021-03-25 2021-06-04 芝麻链(北京)科技有限公司 Data storage transaction method and transaction system based on block chain
CN113159768A (en) * 2021-04-20 2021-07-23 支付宝(杭州)信息技术有限公司 Transaction certificate storage method, device and equipment
WO2022237588A1 (en) * 2021-05-10 2022-11-17 支付宝(杭州)信息技术有限公司 Blockchain-based data evidence storage method and apparatus, device, and storage medium
CN113312365A (en) * 2021-05-27 2021-08-27 上海万向区块链股份公司 Method, system, medium and equipment for quickly inquiring intelligent contract data
CN114581243A (en) * 2022-05-09 2022-06-03 南京金宁汇科技有限公司 Multi-channel transaction certificate asynchronous callback processing component library, method and system
CN114581243B (en) * 2022-05-09 2022-09-23 南京金宁汇科技有限公司 Asynchronous callback processing method and system for multi-channel transaction certificate
CN117472902A (en) * 2023-10-11 2024-01-30 广州新赫信息科技有限公司 Shadow library data link tracing method based on trusted chain

Similar Documents

Publication Publication Date Title
CN112308561A (en) Block chain-based evidence storing method and system, computer equipment and storage medium
CN110493261B (en) Verification code obtaining method based on block chain, client, server and storage medium
CN110365670B (en) Blacklist sharing method and device, computer equipment and storage medium
CN111600908B (en) Data processing method, system, computer device and readable storage medium
CN102170440B (en) Method suitable for safely migrating data between storage clouds
CN103795692B (en) Open authorization method, system and certification authority server
CN108280761B (en) Method and device for distributing increase party, computer equipment and storage medium
CN112003858B (en) Block chain-based platform docking method, electronic device and storage medium
CN110598446A (en) Block chain based test method and device, storage medium and computer equipment
CN110430288B (en) Node access method, node access device, computer equipment and storage medium
CN108830733A (en) A kind of information processing method, block scm cluster and system
CN110543510B (en) Bill data processing method, device, storage medium and computer equipment
CN111506584B (en) Block chain-based service data processing method and device and computer equipment
US9521000B1 (en) Complete forward access sessions
TWI762293B (en) Secure service request processing method and device
US20230079672A1 (en) Cross-chain data transmission method and apparatus, computer device, storage medium, and computer program product
CN111740966A (en) Data processing method based on block chain network and related equipment
CN111597537B (en) Block chain network-based certificate issuing method, related equipment and medium
CN112149077B (en) Supply chain billing method, system and computer equipment based on block chain technology
CN111880919A (en) Data scheduling method, system and computer equipment
CN110611725B (en) Node access method, node access device, computer equipment and storage medium
CN114519197A (en) Data storage architecture and method based on block chain and cloud service
CN115296794A (en) Key management method and device based on block chain
CN115514470B (en) Storage method and system for community correction data security
CN115118434A (en) Key management method and device based on block chain

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