CN115085905A - Transaction data evidence checking method, device, equipment and medium based on block chain - Google Patents

Transaction data evidence checking method, device, equipment and medium based on block chain Download PDF

Info

Publication number
CN115085905A
CN115085905A CN202210829180.9A CN202210829180A CN115085905A CN 115085905 A CN115085905 A CN 115085905A CN 202210829180 A CN202210829180 A CN 202210829180A CN 115085905 A CN115085905 A CN 115085905A
Authority
CN
China
Prior art keywords
transaction data
information
hash value
verification
initial transaction
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
CN202210829180.9A
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.)
SAIC GM Wuling Automobile Co Ltd
Original Assignee
SAIC GM Wuling Automobile 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 SAIC GM Wuling Automobile Co Ltd filed Critical SAIC GM Wuling Automobile Co Ltd
Priority to CN202210829180.9A priority Critical patent/CN115085905A/en
Publication of CN115085905A publication Critical patent/CN115085905A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application discloses a transaction data evidence checking method, a device, electronic equipment and a readable storage medium based on a block chain, which relate to the technical field of the block chain, wherein the method comprises the following steps: acquiring initial transaction data, and carrying out hash on first sensitive information in the initial transaction data to generate a storage hash value; when the stored hash value is detected to pass signature verification, uploading the stored hash value and first non-sensitive information in the initial transaction data together as certificate storage information to a block chain; and sending the initial transaction data to a transaction data sharing participant so that the transaction data sharing participant can carry out credibility detection on the initial transaction data according to the evidence storage information. The method and the device solve the technical problem that the transaction data in the prior art is low in reliability.

Description

Transaction data evidence checking method, device, equipment and medium based on block chain
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method, an apparatus, a device, and a medium for checking transaction data certificates based on blockchains.
Background
The industrial chain takes a manufacturing enterprise as a center, attracts upstream and downstream enterprises of the industrial chain, related service industries and the like to join the manufacturing enterprise and the related service industries and the like to form a dynamic alliance, and completes the management of the whole life cycle of products such as purchase, production, sale, service and the like. The construction of the industry chain depends on the share of transaction data among various industries and enterprises, at present, a third-party enterprise platform or an enterprise internal management system is usually adopted to store and manage the transaction data, and the third-party platform or the enterprise internal management system has poor safety performance, so that the transaction data is easy to be tampered, and the authenticity of the data is low, therefore, the transaction data stored in the third-party enterprise platform or the enterprise internal management system is not enough to be used as an effective evidence of both transaction parties, and the credibility of the transaction data is low.
Disclosure of Invention
The application mainly aims to provide a transaction data evidence checking method, a device, equipment and a medium based on a block chain, and aims to solve the technical problem of low reliability of transaction data in the prior art.
In order to achieve the above object, the present application provides a block chain-based transaction data verification method, which is applied to a transaction data sharing platform, and the method includes:
acquiring initial transaction data, and carrying out hash on first sensitive information in the initial transaction data to generate a storage hash value;
when the stored hash value is detected to pass signature verification, uploading the stored hash value and first non-sensitive information in the initial transaction data together as certificate storage information to a block chain;
and sending the initial transaction data to a transaction data sharing participant so that the transaction data sharing participant can carry out credibility detection on the initial transaction data according to the evidence storage information.
Optionally, the blockchain at least includes one blockchain node, and before the step of uploading the stored hash value and the first non-sensitive information in the initial transaction data together as certificate-storing information to the blockchain after detecting that the stored hash value passes signature verification, the method further includes:
when the condition that the block chain node encrypts the storage hash value based on a preset private key is detected, broadcasting the encrypted storage hash value serving as a digital signature to other block chain nodes;
and verifying the digital signature through the other block chain link points according to a preset public key corresponding to the preset private key.
Optionally, the blockchain at least includes one consensus node, and the uploading the stored hash value and the first non-sensitive information in the initial transaction data together as the certificate information to the blockchain includes:
broadcasting the stored hash value and the first non-sensitive information to each consensus node to obtain a consensus node receiving result;
and performing consensus on the receiving results of the consensus nodes to generate a new block containing the storage hash value and the first non-sensitive information.
Optionally, before the step of sending the deposit information to a transaction data sharing participant for data sharing, the method further includes:
determining the target transaction data sharing participant needing data sharing, and authorizing the data access authority of the target transaction data sharing participant to obtain an authorized sharing participant;
and sending the initial transaction data to the authorized sharing participant so that the authorized sharing participant can carry out credibility detection on the initial transaction data according to the evidence storage information.
In order to achieve the above object, the present application provides a transaction data certification and verification method based on a blockchain, which is applied to a transaction data sharing participant, and includes:
receiving the initial transaction data sent by a data sharing platform;
inquiring chain certificate storage information in the certificate storage information and inquiring verification data in the initial transaction data based on a key value in the certificate storage information;
hashing second sensitive information in the verification data to generate a verification hash value, and taking the verification hash value and second non-sensitive information in the verification data together as the downlink verification information;
and comparing the under-link verification information with the on-link evidence storage information, and performing credibility detection on the initial transaction data to obtain a credibility detection result.
Optionally, the step of querying chain certificate information in the certificate information based on a key value in the certificate information, and querying verification data in the initial transaction data includes:
inquiring the evidence storing information based on a key value in the evidence storing information and a preset key value mapping table to obtain the chain evidence storing information corresponding to the key value;
and inquiring the initial transaction data based on a key value in the evidence storing information and a preset key value mapping table to obtain the verification data corresponding to the key value.
Optionally, the on-chain evidence storing information includes the storage hash value and the first non-sensitive information, the off-chain verification information includes the verification hash value and the second non-sensitive information, and the step of performing the reliability detection on the initial transaction data by comparing the off-chain verification information with the on-chain evidence storing information to obtain the reliability detection result includes:
comparing the stored hash value with the verification hash value to obtain a first comparison result;
comparing the first non-sensitive information with the second non-sensitive information to obtain a second comparison result;
and obtaining a reliability detection result according to the first comparison result and the second comparison result.
The present application further provides a block chain-based transaction data verification and inspection device, which is applied to a transaction data sharing platform, and includes:
the system comprises an acquisition and storage hash value module, a storage hash value generation module and a processing module, wherein the acquisition and storage hash value module is used for acquiring initial transaction data, and carrying out hash on first sensitive information in the initial transaction data to generate a storage hash value;
the certificate storing uplink module is used for uploading the stored hash value and first non-sensitive information in the initial transaction data together as certificate storing information to a block chain after the stored hash value is detected to pass signature verification and the stored hash value is detected to pass signature verification;
and the data sharing module is used for sending the initial transaction data to a transaction data sharing participant so that the transaction data sharing participant can carry out credibility detection on the initial transaction data according to the evidence storage information.
The present application further provides an electronic device, the electronic device is an entity device, the electronic device includes: the block chain based transaction data verification method comprises a memory, a processor and a program of the block chain based transaction data verification method stored on the memory and capable of running on the processor, wherein the program of the block chain based transaction data verification method can realize the steps of the block chain based transaction data verification method when being executed by the processor.
The present application also provides a computer-readable storage medium, on which a program for implementing the blockchain-based transaction data certification and inspection method is stored, where the program for implementing the blockchain-based transaction data certification and inspection method, when executed by a processor, implements the steps of the blockchain-based transaction data certification and inspection method as described above.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the above-described blockchain-based transaction data credentialing and validating method.
The application provides a transaction data evidence checking method based on a block chain, which is applied to a transaction data sharing platform and transaction data sharing participants, and is used for acquiring initial transaction data, hashing first sensitive information in the initial transaction data and generating a stored hash value; when the stored hash value is detected to pass signature verification, uploading the stored hash value and first non-sensitive information in the initial transaction data together as certificate storage information to a block chain; and sending the initial transaction data to a transaction data sharing participant so that the transaction data sharing participant can carry out credibility detection on the initial transaction data according to the evidence storage information. The technical defect that the transaction data is easy to tamper due to the fact that the safety performance of a third-party enterprise platform or an enterprise internal management system is low is overcome, the authenticity of the transaction data is improved, and therefore the reliability of the transaction data is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic flowchart illustrating a first embodiment of a transaction data verification method based on a blockchain according to the present invention;
FIG. 2 is a flowchart illustrating a second embodiment of a transaction data verification method based on blockchains according to the present invention;
fig. 3 is a schematic device structure diagram of a hardware operating environment related to the transaction data verification and inspection method based on a blockchain in the embodiment of the present application.
The objectives, features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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.
Example one
At present, a third-party enterprise platform or an enterprise internal management system is usually adopted to store and manage transaction data, and because the security performance of the third-party enterprise platform or the enterprise internal management system is poor, the transaction data is easy to be tampered, and the authenticity of the data is low, the transaction data stored in the third-party enterprise platform or the enterprise internal management system is not enough to be used as an effective credential of both transaction parties, and the credibility of the transaction data is low.
The embodiment of the application provides a block chain-based transaction data evidence checking method, and the first embodiment of the block chain-based transaction data evidence checking method is applied to a transaction data sharing platform.
In this embodiment, it should be noted that the transaction data sharing platform is a platform for performing data sharing on the transaction data sharing participant, and the transaction data sharing platform at least includes one block chain node in the block chain, and may send the initial transaction data to the transaction data sharing participant in a down-chain sharing manner, where the down-chain sharing manner may be paper sharing, mail sharing, and the like, and may upload the certificate storing information to the block chain in an on-chain certificate storing manner, so that the transaction data sharing participant may perform reliability detection on the initial transaction data according to the certificate storing information, and the on-chain certificate storing manner may be content certificate storing, hash certificate, link certificate storing, privacy certificate storing, or the like.
In a first embodiment of the method for checking transaction data based on a blockchain according to the present application, referring to fig. 1, the method is applied to a transaction data sharing platform, and the method for checking transaction data based on a blockchain includes:
step S10, acquiring initial transaction data, and hashing first sensitive information in the initial transaction data to generate a storage hash value;
in this embodiment, it should be noted that the initial transaction data includes the first sensitive information and the first non-sensitive information, the first sensitive information includes first document content information, first signer information, and the like, and the stored hash value includes the first document content hash value and the first signer hash value.
As an example, step S10 includes: and acquiring the initial transaction data, desensitizing sensitive information such as first document content information and first signer information in the initial transaction data, and performing hash processing on the sensitive information such as the first document content information and the first signer information through a hash function to obtain a stored hash value. The hash function has unidirectionality and collision resistance, the unidirectionality determines that the forward calculation efficiency of the hash function is high, and the reverse calculation difficulty is very large, namely the first sensitive information is hashed to obtain the stored hash value, but the first sensitive information is difficult to reversely deduce according to the stored hash value; the collision resistance determines that two different inputs cannot be found, so that the output hash values are consistent, namely any two different input values x and y, so that the output hash values h (x) ═ h (y) are difficult, the characteristics of the hash function effectively prevent data from being tampered, and algorithms of the hash function include a direct addressing method, a numerical analysis method, a square-based mid-taking method, a folding method, a random number method and a remainder-dividing method.
For example, initial transaction data is acquired, a document content a and a signer B in the initial transaction data are desensitized to obtain a desensitized document content a and a desensitized signer B, and a hash calculation is performed on the desensitized document content a and the desensitized signer B to obtain a document content hash value h (a) and a signer hash value h (B).
Step S20, when the stored hash value is detected to pass signature verification, the stored hash value and the first non-sensitive information in the initial transaction data are used as certificate storage information together and uploaded to a block chain;
step S30, sending the initial transaction data to a transaction data sharing participant, so that the transaction data sharing participant can perform reliability detection on the initial transaction data according to the deposit information.
In this embodiment, it should be noted that the first non-sensitive information includes a credential number, a version number, a subscription time, and the like, the credential information includes a credential number, a version number, a timestamp corresponding to the subscription time, a document content hash value, and a signer hash value, the transaction data sharing participant is configured to receive the initial transaction data sent by the transaction data sharing platform, the transaction data sharing participant may be one or more block chain nodes authorized by the transaction data access right in the block chain, and may receive the initial transaction data sent by the transaction data sharing platform in a down-chain sharing manner, where the down-chain sharing manner may be paper sharing and mail sharing, and may query the on-chain credential information in the credential information in a up-chain querying manner, and query verification data in the initial transaction data, therefore, the reliability detection is carried out, and the mode of searching on the chain can be key value searching.
As an example, steps S20 to S30 include: detecting whether the signature of the stored hash value passes verification, and after the verification passes, uploading the signed stored hash value and the signed first non-sensitive information to a block chain to generate certificate storage information, wherein the signature of the stored hash value is a character or a code for encrypting the stored hash value, is used for representing the identity of an issuer and the approval of the issuer to transaction data, can be used by a receiver to verify whether the transaction data is falsified or forged in the transmission process, can check whether the electronic document is falsified or forged in the transmission process, and has the characteristics of message source authentication, non-repudiation and message integrity; and sending the initial transaction data to the transaction data sharing participant in a down-link sharing mode so that the transaction data sharing participant can perform credibility detection on the initial transaction data according to the evidence storage information.
Wherein the block chain at least comprises one block chain node,
before the step of uploading the stored hash value and the first non-sensitive information in the initial transaction data together as certificate-storing information to a block chain after the stored hash value is detected to pass signature verification, the method further includes:
step A10, when detecting that the block chain node encrypts the storage hash value based on a preset private key, broadcasting the encrypted storage hash value to other block chain nodes as a digital signature;
step a20 is to verify the digital signature through the other block chain nodes according to a preset public key corresponding to the preset private key.
In this embodiment, it should be noted that the preset private key is used to encrypt the stored hash value, the preset public key is used to decrypt a signature of the stored hash value, and the digital signature is the encrypted stored hash value.
As an example, step a10 includes: based on the preset private key, the stored hash value is encrypted through the block chain link point to obtain the digital signature, and the digital signature is broadcasted to the block chain for other block chain nodes to verify; based on the preset public key corresponding to the preset private key, the other block chain link points decrypt the signature of the stored hash value to obtain the decrypted stored hash value, hash the first sensitive information in the initial transaction data to obtain a new hash value, compare whether the decrypted stored hash value is consistent with the new hash value, and if so, verify the result.
For example, the block chain node pair encrypts the stored hash value H (c) by the preset private key to obtain a signature Z of the stored hash value, and the other block chain node pairs decrypt the Z by the public key corresponding to the preset private key to obtain the decrypted stored hash value H (c) 1 (C) Hashing the first sensitive information in the initial transaction data again to obtain a new hash value H (c), and taking H 1 (C) And h (c) comparing, if the two are the same, the verification is passed.
Wherein the block chain at least comprises a common node,
the step of uploading the stored hash value and the first non-sensitive information in the initial transaction data together as evidence storage information to a blockchain comprises:
step S21, broadcasting the stored hash value and the first non-sensitive information to each of the consensus nodes to obtain a consensus node receiving result;
step S22, performing consensus on the received result of the consensus node, and generating a new block including the stored hash value and the first non-sensitive information.
In this embodiment, it should be noted that the consensus node is a node that receives transaction information and generates a new block, and the consensus node receiving result is used to characterize a receiving condition of the consensus node for the stored hash value and the first non-sensitive information.
As one example, steps S21 to S22 include: broadcasting the stored hash value and the first non-sensitive information to the consensus node based on a broadcast mechanism in the block chain, where the broadcast mechanism is a mechanism for propagating transaction messages between the consensus nodes, for example, based on the broadcast mechanism, the consensus node a propagates a verified transaction message to a consensus node B in the vicinity of the consensus node a and establishes a connection, and the transaction message can be considered as an uplink only when all the consensus nodes complete verification of the transaction message; packaging the stored hash value and the first non-sensitive information in the transaction data by using a consensus mechanism through the consensus nodes to generate a new block, wherein the consensus mechanism includes PoW (Proof of Work), PoS (Proof of rights and interests), DPOS (deleted Proof of rights and rights mechanism), DAG (direct acyclic graph), PBFT (physical Byzantine Fault probability table), PoA (Proof of rights mechanism), and the consensus mechanism is used to complete verification and confirmation of the stored hash value and the first non-sensitive information through each of the consensus nodes, including data structure verification syntax, workload verification, and block size verification, wherein the data structure verification is to verify whether the new block is correct or not, the data structure of the block comprises a block head, a block abstract and a block main body, the workload certification verification means that the workload required by the new block is obtained, a target difficulty value is preset in the block chain, whether the storage hash value is smaller than the preset target difficulty value is verified, the block size length verification means that whether the block size is within a set range, and after all the common identification nodes are verified, the storage hash value and the first non-sensitive information are uploaded to the block chain.
For example, the data structure of the block F includes the digest of the block F and the body of the block F, and if the block header is absent, it is determined that the data structure verification of the block F fails; presetting a target difficulty value W in a block F, and when the hash value H (F) < W in the block F, judging that the workload certification of the block F passes the verification; setting the block size within 1 million, setting the size of the block F as X million, and judging that the size length verification of the block F is passed when X < 1.
Before the step of sending the deposit evidence information to a transaction data sharing participant for the transaction data sharing participant to perform credibility detection on the initial transaction data, the method further includes:
step S31, determining a target transaction data sharing participant needing data sharing, and authorizing the data access authority of the target transaction data sharing participant to obtain an authorized sharing participant;
step S32, sending the certificate storing information to the authorized sharing participant, so that the authorized sharing participant can perform reliability detection on the initial transaction data.
In this embodiment, it should be noted that the data access right is an access right to the initial transaction data sent by the data sharing platform.
As an example, the steps S31 to S32 include: acquiring a target transaction data sharing participant needing data sharing by receiving a data sharing request sent by the target transaction data sharing participant, authorizing the data access authority of the target transaction data sharing participant to obtain the authorized sharing participant, and establishing a sharing data chain between the authorized sharing participant and the data sharing platform; based on the shared data chain, the data sharing platform sends the initial transaction data to the authorized sharing participant by calling an interface of the shared data chain, so that the authorized sharing participant can perform credibility detection on the initial transaction data.
The embodiment of the application provides a transaction data evidence checking method based on a block chain, which is applied to a transaction data sharing platform to obtain initial transaction data, hash first sensitive information in the initial transaction data and generate a storage hash value; after the stored hash value is detected to pass signature verification, uploading the stored hash value and first non-sensitive information in the initial transaction data to a block chain to generate certificate storing information; and sending the evidence storage information to a transaction data sharing participant so that the transaction data sharing participant can carry out credibility detection on the initial transaction data. The method and the system realize the sharing of the transaction data in the block chain, confirm the identity of the issuer and the source of the transaction data through the digital signature, and improve the authenticity of the transaction data in the sharing process.
Example two
In a second embodiment of the transaction data verification method based on the blockchain, referring to fig. 2, the method is applied to transaction data sharing participants, and the transaction data verification method based on the blockchain includes:
step B10, receiving the initial transaction data sent by the transaction data sharing platform;
step B20, based on the key value in the certificate storing information, inquiring the certificate storing information on the chain in the certificate storing information, and inquiring the verification data in the initial transaction data;
in this embodiment, it should be noted that the initial transaction data is sent by the data transaction platform in a manner of sharing under a chain, the manner of sharing under the chain may be paper sharing, mail sharing, or the like, the key value includes a credential number or a version number, and the preset key value mapping table at least includes a set of key values, the credential information corresponding to the key value, and the initial transaction data corresponding to the key value.
As an example, the initial transaction data sent by the data transaction platform is received, the certificate storing information is queried according to a key value in the certificate storing information, the certificate storing information on the chain is acquired, and the initial transaction data is queried according to the key value in the certificate storing information, so as to acquire the verification data.
The steps of inquiring chain certificate storage information in the certificate storage information and inquiring verification data in the initial transaction data based on the key value in the certificate storage information comprise:
step B21, based on the key value in the certificate-storing information and a preset key value mapping table, inquiring the certificate-storing information to obtain the certificate-storing information on the chain corresponding to the key value;
step B22, based on the key value in the certificate storing information and a preset key value mapping table, querying the initial transaction data to obtain the verification data corresponding to the key value.
In this embodiment, it should be noted that the key includes a credential number or a version number, and the preset key mapping table at least includes a set of keys, the credential information corresponding to the key, and the initial transaction data corresponding to the key.
As an example, based on the credential number or the version number in the credential information, querying in the credential information through the preset key value mapping table to obtain the on-chain credential information corresponding to the credential number or the version number; and inquiring the initial transaction data through the preset key value mapping table based on the certificate number or the version number in the certificate storage information to obtain the verification data corresponding to the certificate number or the version number.
For example, the credential number in the deposit information is 78102741352885, the chain deposit information corresponding to "78102741352885" can be obtained by querying in the deposit information through the preset key value mapping table, and the verification data corresponding to "78102741352885" can be obtained by querying in the initial transaction data.
Step B30, performing hash on second sensitive information in the verification data to generate a verification hash value, and using the verification hash value and second non-sensitive information in the verification data together as downlink verification information;
in this embodiment, it should be noted that the second sensitive information is second document content information, second signer information, and the like in the verification data, and the verification hash value includes the second document content hash value and the second signer hash value.
As an example, step B30 includes: desensitizing sensitive information such as the second document content information and the second signer information in the verification data, and performing hash processing on the sensitive information such as the second document content information and the second signer information through a hash function to obtain a verification hash value.
Step B40, the on-chain certification information includes the storage hash value and the first non-sensitive information, the off-chain verification information includes the verification hash value and the second non-sensitive information,
and comparing the under-chain verification information with the on-chain evidence storage information, and performing credibility detection on the initial transaction data to obtain a credibility detection result.
As an example, step B40 includes: and comparing the down-link verification information with the on-link certificate-storing information, namely comparing the verification hash value with the storage hash value to obtain the first comparison result, comparing the second non-sensitive information with the second non-sensitive information to obtain the second comparison result, and taking the first comparison result and the second comparison result together as the reliability detection result.
The step of comparing the verification information under the chain with the evidence-storing information on the chain to detect the credibility of the initial transaction data to obtain a credibility detection result comprises the following steps:
step B41, comparing the storage hash value with the verification hash value to obtain a first comparison result;
step B42, comparing the first non-sensitive information with the second non-sensitive information to obtain a second comparison result;
step B43, obtaining a reliability detection result according to the first comparison result and the second comparison result;
in this embodiment, it should be noted that the first comparison result is a common consistency comparison result between the stored hash value and the verified hash value, the second comparison result is a common consistency comparison result between the first non-sensitive information and the second non-sensitive information, the reliability detection result includes the first comparison result and the second comparison result, and the aggregating refers to summarizing the on-chain certificate information, the off-chain verification information, and the reliability detection result.
As an example, steps B41 to B43 include: comparing the stored hash value with the verification hash value to obtain a common consistency comparison result of the stored hash value and the verification hash value; comparing the first non-sensitive information with the second non-sensitive information to obtain a common consistency comparison result of the first non-sensitive information and the second non-sensitive information; and taking the first comparison result and the second comparison result together as the reliability detection result.
For example, if the common consistency comparison result of the stored hash value and the verification hash value is consistent, and the common consistency comparison result of the first non-sensitive information and the second non-sensitive information is inconsistent, the reliability detection result is inconsistent, and if one of the first comparison result and the second comparison result is inconsistent, the reliability detection result is inconsistent, and if the first comparison result and the second comparison result are both consistent, the reliability detection result is consistent.
The embodiment of the application provides a transaction data evidence checking method based on a block chain, which comprises the steps of receiving evidence storing information uploaded to the block chain by a data sharing platform, inquiring the evidence storing information on the chain in the evidence storing information based on a key value in the evidence storing information, and inquiring verification data in initial transaction data; performing hash on second sensitive information in the verification data to generate a verification hash value, and taking the verification hash value and second non-sensitive information in the verification data together as the downlink verification information; and comparing the down-link verification information with the on-link evidence storage information, and performing credibility detection on the initial transaction data to obtain a credibility detection result. The technical defect that the transaction data is easy to tamper due to the fact that the safety performance of a third-party enterprise platform or an enterprise internal management system is low is overcome, the authenticity of the transaction data is improved, and therefore the reliability of the transaction data is improved.
The embodiment of the present application further provides a device for checking transaction data evidence based on a block chain, where the device for checking transaction data evidence based on a block chain is applied to a transaction data sharing platform, and the device for checking transaction data evidence based on a block chain includes:
the system comprises an acquisition and storage hash value module, a storage hash value generation module and a processing module, wherein the acquisition and storage hash value module is used for acquiring initial transaction data, and carrying out hash on first sensitive information in the initial transaction data to generate a storage hash value;
the certificate storing and chaining module is used for uploading the stored hash value and the first non-sensitive information in the initial transaction data to a block chain to generate certificate storing information after the stored hash value is detected to pass signature verification;
and the data sharing module is used for sending the initial transaction data to a transaction data sharing participant so that the transaction data sharing participant can carry out credibility detection on the initial transaction data according to the evidence storage information.
Optionally, the certificate-storing uplink module is further configured to:
when the condition that the block chain node encrypts the storage hash value based on a preset private key is detected, broadcasting the encrypted storage hash value serving as a digital signature to other block chain nodes;
and verifying the digital signature through the other block chain link points according to a preset public key corresponding to the preset private key.
Optionally, the certificate-storing uplink module is further configured to:
broadcasting the stored hash value and the first non-sensitive information to each consensus node to obtain a consensus node receiving result;
and performing consensus on the receiving results of the consensus nodes to generate a new block containing the storage hash value and the first non-sensitive information.
Optionally, the data sharing module is further configured to:
acquiring the target transaction data sharing participant needing data sharing, and authorizing the data access authority of the target transaction data sharing participant to obtain an authorized sharing participant;
and sending the initial transaction data to the authorized sharing participant so that the authorized sharing participant can carry out credibility detection on the initial transaction data according to the evidence storage information.
The embodiment of the present application further provides a device for checking transaction data evidence based on a blockchain, where the device for checking transaction data evidence based on a blockchain is applied to a transaction data sharing participant, and the device for checking transaction data evidence based on a blockchain includes:
the receiving module is used for receiving the evidence storing information uploaded to the block chain by the data sharing platform;
the inquiry module inquires chain certificate storage information in the certificate storage information and inquires verification data in the initial transaction data based on a key value in the certificate storage information;
the verification module is used for carrying out Hash on second sensitive information in the verification data to generate a verification Hash value, and the verification Hash value and the second non-sensitive information in the verification data are jointly used as the downlink verification information;
and the module for generating a reliability detection result compares the under-chain verification information with the on-chain evidence storage information, and performs reliability detection on the initial transaction data to obtain a reliability detection result.
Optionally, the query module is further configured to:
inquiring the evidence storing information based on a key value in the evidence storing information and a preset key value mapping table to obtain the chain evidence storing information corresponding to the key value;
and inquiring the initial transaction data based on a key value in the evidence storing information and a preset key value mapping table to obtain the verification data corresponding to the key value.
Optionally, the verification module is further configured to:
comparing the stored hash value with the verification hash value to obtain a first comparison result;
comparing the first non-sensitive information with the second non-sensitive information to obtain a second comparison result;
and obtaining a reliability detection result according to the first comparison result and the second comparison result.
The transaction data evidence checking device based on the block chain provided by the invention adopts the transaction data evidence checking method based on the block chain in the embodiment, so that the technical problem of low reliability of the transaction data is solved. Compared with the prior art, the beneficial effects of the transaction data evidence checking device based on the block chain provided by the embodiment of the invention are the same as those of the transaction data evidence checking method based on the block chain provided by the embodiment, and other technical characteristics of the transaction data evidence checking device based on the block chain are the same as those disclosed by the embodiment method, which is not repeated herein.
An embodiment of the present invention provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for verifying transaction data based on blockchain in the first embodiment.
Referring now to FIG. 3, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device may include a processing means (e.g., a central processing unit, a graphic processor, etc.) that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) or a program loaded from a storage means into a Random Access Memory (RAM). In the RAM, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device, the ROM, and the RAM are connected to each other by a bus. An input/output (I/O) interface is also connected to the bus.
Generally, the following systems may be connected to the I/O interface: input devices including, for example, touch screens, touch pads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, and the like; output devices including, for example, Liquid Crystal Displays (LCDs), speakers, vibrators, and the like; storage devices including, for example, magnetic tape, hard disk, etc.; and a communication device. The communication means may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While the figures illustrate an electronic device with various systems, it is to be understood that not all illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means, or installed from a storage means, or installed from a ROM. The computer program, when executed by a processing device, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
The electronic device provided by the invention adopts the transaction data evidence checking method based on the block chain in the embodiment, so that the technical problem of low credibility of the transaction data is solved. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the invention are the same as the beneficial effects of the transaction data evidence verification and inspection method based on the block chain provided by the embodiment, and other technical features of the electronic device are the same as those disclosed by the embodiment method, which are not repeated herein.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the foregoing description of embodiments, the particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present invention, and shall cover the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
The embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, where the computer-readable program instructions are used to execute the method for checking transaction data based on blockchain in the first embodiment.
The computer readable storage medium provided by the embodiments of the present invention may be, for example, a USB flash disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or any combination thereof. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present embodiment, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer-readable storage medium may be embodied in an electronic device; or may be separate and not incorporated into the electronic device.
The computer readable storage medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring initial transaction data, and carrying out hash on sensitive information in the initial transaction data to generate a storage hash value; when the stored hash value and the first non-sensitive information in the initial transaction data are detected to pass signature verification, uploading the stored hash value and the first non-sensitive information to a block chain to obtain certificate storing information; inquiring chain certificate storage information in the certificate storage information and inquiring verification data in the initial transaction data based on a key value in the certificate storage information; hashing sensitive information in the verification data to generate a verification hash value, and taking the verification hash value and second non-sensitive information in the verification data together as the verification information under the link; and comparing the down-link verification information with the on-link evidence storage information, and performing credibility detection on the initial transaction data to obtain a credibility detection result.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the names of the modules do not in some cases constitute a limitation of the unit itself.
The computer-readable storage medium provided by the invention stores the computer-readable program instruction for executing the transaction data verification and inspection method based on the block chain, and solves the technical problem of low credibility of the transaction data. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present invention are the same as the beneficial effects of the transaction data evidence verification method based on the block chain provided by the above embodiment, and are not described herein again.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the above-described blockchain-based transaction data credentialing and validating method.
The computer program product provided by the application solves the technical problem of low credibility of transaction data. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present invention are the same as the beneficial effects of the transaction data evidence verification method based on the block chain provided by the above embodiment, and are not described herein again.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all equivalent structures or equivalent processes, which are directly or indirectly applied to other related technical fields, and which are not limited by the present application, are also included in the scope of the present application.

Claims (10)

1. A transaction data evidence checking method based on a block chain is applied to a transaction data sharing platform and comprises the following steps:
acquiring initial transaction data, and carrying out hash on first sensitive information in the initial transaction data to generate a storage hash value;
when the stored hash value is detected to pass signature verification, uploading the stored hash value and first non-sensitive information in the initial transaction data together as certificate storage information to a block chain;
and sending the initial transaction data to a transaction data sharing participant so that the transaction data sharing participant can carry out credibility detection on the initial transaction data according to the evidence storage information.
2. The method for validating transaction data based on blockchain as claimed in claim 1, wherein the blockchain includes at least one blockchain node, and before the step of uploading the stored hash value and the first non-sensitive information in the initial transaction data together as the validation information to the blockchain after detecting that the stored hash value passes the signature verification, the method further comprises:
when the condition that the block chain node encrypts the storage hash value based on a preset private key is detected, broadcasting the encrypted storage hash value serving as a digital signature to other block chain nodes;
and verifying the digital signature through the chain link points of the other blocks according to a preset public key corresponding to the preset private key.
3. The method for validating and checking transaction data based on blockchain as claimed in claim 1, wherein the blockchain includes at least one common identification node, and the step of uploading the stored hash value and the first non-sensitive information in the initial transaction data together as the validation information to the blockchain includes:
broadcasting the stored hash value and the first non-sensitive information to each consensus node to obtain a consensus node receiving result;
and performing consensus on the received result of the consensus node, and generating a new block containing the storage hash value and the first non-sensitive information.
4. The method for validating and checking transaction data based on blockchain as claimed in claim 1, wherein before the step of sending the initial transaction data to a transaction data sharing participant for the transaction data sharing participant to perform the credibility detection on the initial transaction data according to the validation information, the method further comprises:
determining a target transaction data sharing participant needing data sharing, and authorizing the data access authority of the target transaction data sharing participant to obtain an authorized sharing participant;
and sending the initial transaction data to the authorized sharing participants so that the authorized sharing participants can perform credibility detection on the initial transaction data according to the evidence storing information.
5. A transaction data verification and examination method based on a blockchain is applied to transaction data sharing participants, and comprises the following steps:
receiving initial transaction data sent by a transaction data sharing platform;
inquiring chain certificate storage information in the certificate storage information and inquiring verification data in the initial transaction data based on a key value in the certificate storage information;
performing hash on second sensitive information in the verification data to generate a verification hash value, and taking the verification hash value and second non-sensitive information in the verification data together as the downlink verification information;
and comparing the down-link verification information with the on-link evidence storage information, and performing credibility detection on the initial transaction data to obtain a credibility detection result.
6. The method for checking transaction data certificate of claim 5, wherein the step of inquiring certificate information on the chain in the certificate information based on the key value in the certificate information and inquiring the verification data in the initial transaction data comprises:
inquiring the evidence storing information based on a key value in the evidence storing information and a preset key value mapping table to obtain the chain evidence storing information corresponding to the key value;
and inquiring the initial transaction data based on a key value in the evidence storing information and a preset key value mapping table to obtain the verification data corresponding to the key value.
7. The method as claimed in claim 5, wherein the verification information includes a storage hash value and first non-sensitive information, the verification information includes the verification hash value and second non-sensitive information, and the step of comparing the verification information with the verification information to perform the reliability detection on the initial transaction data to obtain the reliability detection result includes:
comparing the stored hash value with the verification hash value to obtain a first comparison result;
comparing the first non-sensitive information with the second non-sensitive information to obtain a second comparison result;
and obtaining a reliability detection result according to the first comparison result and the second comparison result.
8. The device for checking the transaction data deposit certificate based on the blockchain is applied to a transaction data sharing platform and comprises the following components:
the system comprises an acquisition and storage hash value module, a storage hash value generation module and a processing module, wherein the acquisition and storage hash value module is used for acquiring initial transaction data, and carrying out hash on first sensitive information in the initial transaction data to generate a storage hash value;
the certificate storing uplink module is used for uploading the stored hash value and first non-sensitive information in the initial transaction data to a block chain together as certificate storing information after the stored hash value is detected to pass signature verification;
and the data sharing module is used for sending the initial transaction data to a transaction data sharing participant so as to enable the transaction data sharing participant to carry out credibility detection on the initial transaction data according to the evidence storage information.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the blockchain based transaction data validation method of any one of claims 1 to 7.
10. A computer-readable storage medium, wherein the computer-readable storage medium stores thereon a program for implementing a blockchain-based transaction data verification method, and the program for implementing the blockchain-based transaction data verification method is executed by a processor to implement the steps of the blockchain-based transaction data verification method according to any one of claims 1 to 7.
CN202210829180.9A 2022-07-15 2022-07-15 Transaction data evidence checking method, device, equipment and medium based on block chain Pending CN115085905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210829180.9A CN115085905A (en) 2022-07-15 2022-07-15 Transaction data evidence checking method, device, equipment and medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210829180.9A CN115085905A (en) 2022-07-15 2022-07-15 Transaction data evidence checking method, device, equipment and medium based on block chain

Publications (1)

Publication Number Publication Date
CN115085905A true CN115085905A (en) 2022-09-20

Family

ID=83259937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210829180.9A Pending CN115085905A (en) 2022-07-15 2022-07-15 Transaction data evidence checking method, device, equipment and medium based on block chain

Country Status (1)

Country Link
CN (1) CN115085905A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115664678A (en) * 2022-10-27 2023-01-31 成都质数斯达克科技有限公司 Block chain based trusted data verification method, device, equipment and storage medium
CN116150234A (en) * 2023-04-20 2023-05-23 中国信息通信研究院 Block chain-based data certification method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115664678A (en) * 2022-10-27 2023-01-31 成都质数斯达克科技有限公司 Block chain based trusted data verification method, device, equipment and storage medium
CN116150234A (en) * 2023-04-20 2023-05-23 中国信息通信研究院 Block chain-based data certification method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN109067801B (en) Identity authentication method, identity authentication device and computer readable medium
CN107231351B (en) Electronic certificate management method and related equipment
CN108933667B (en) Management method and management system of public key certificate based on block chain
CN115085905A (en) Transaction data evidence checking method, device, equipment and medium based on block chain
CN109905360B (en) Data verification method and terminal equipment
CN109635572B (en) Contract signing method and device based on block chain and terminal equipment
CN111798209A (en) Engineering project management method based on block chain, electronic equipment and storage medium
CN108923925B (en) Data storage method and device applied to block chain
CN111651794A (en) Alliance chain-based electronic data management method and device and storage medium
CN110597836B (en) Information inquiry request response method and device based on block chain network
CN109981680B (en) Access control implementation method and device, computer equipment and storage medium
WO2017050147A1 (en) Information registration and authentication method and device
CN114201781A (en) Block chain-based storage verification method and device, computer equipment and medium
CN113610526A (en) Data trust method and device, electronic equipment and storage medium
CN111476652A (en) Data processing method and device based on block chain, terminal and storage medium
CN114444134A (en) Data use authorization method, system and device
CN112380287B (en) Distributed credible statement generation method, system, equipment and storage medium
CN115296807B (en) Key generation method, device and equipment for preventing industrial control network viruses
CN115589298B (en) Method, device, system, equipment and medium for verifying information of block chain
CN109818965B (en) Personal identity verification device and method
CN112948894A (en) Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report
CN113127818A (en) Block chain-based data authorization method and device and readable storage medium
CN114499893B (en) Bidding file encryption and evidence storage method and system based on block chain
CN112910641B (en) Verification method and device for cross-link transaction supervision, relay link node and medium
CN115242471A (en) Information transmission method and device, electronic equipment and computer 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