CN112948894A - Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report - Google Patents

Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report Download PDF

Info

Publication number
CN112948894A
CN112948894A CN201911257736.6A CN201911257736A CN112948894A CN 112948894 A CN112948894 A CN 112948894A CN 201911257736 A CN201911257736 A CN 201911257736A CN 112948894 A CN112948894 A CN 112948894A
Authority
CN
China
Prior art keywords
tally
inspection report
signature data
message
certificate
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
CN201911257736.6A
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.)
Cosco Shipping Technology Co Ltd
Original Assignee
Cosco Shipping 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 Cosco Shipping Technology Co Ltd filed Critical Cosco Shipping Technology Co Ltd
Priority to CN201911257736.6A priority Critical patent/CN112948894A/en
Publication of CN112948894A publication Critical patent/CN112948894A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2151Time stamp

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Storage Device Security (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a block chain-based anti-counterfeiting method, a block chain-based anti-counterfeiting device, a block chain-based anti-counterfeiting equipment and a block chain-based anti-counterfeiting medium for a tally inspection report. The method comprises the following steps: in response to the tally check request, generating a tally check report and tally check report signature data; controlling to generate time stamp signature data of the tally inspection report signature data; generating a general secret key, and encrypting the tally inspection report to obtain the ciphertext data of the tally inspection report; encrypting the general key to obtain a first general key ciphertext; storing the cryptograph data of the tally inspection report and obtaining a storage address of the tally inspection report; and generating a first certificate storage message comprising the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the first general key ciphertext, and writing the first certificate storage message into the block chain to obtain the block address of the first certificate storage message. The tally inspection report can be encrypted, so that the safety of the generated tally inspection report is effectively improved, and the integrity of data in the tally inspection report is ensured.

Description

Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report
Technical Field
The embodiment of the invention relates to the field of shipping, in particular to a block chain-based anti-counterfeiting method, a block chain-based anti-counterfeiting device, a block chain-based anti-counterfeiting equipment and a block chain-based anti-counterfeiting medium for a tally inspection report.
Background
In the development of the shipping field, with the increasing quantity of transported goods, the traditional paper-edition goods inspection report is difficult to meet the development requirements of shipping; therefore, the online tally inspection report is generated by delivery, meanwhile, great convenience is brought to cargo management in the shipping process, the current tally inspection report is obtained by on-site evidence collection under the client's entrust, and entrusts a third party to inspect, and finally, a corresponding report is compiled according to a feedback result and stored.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in a traditional storage mode, the condition that information in a tally report is unreal exists, and the links of operations of a tally company, a carrier and a shipper do not have the capability of distinguishing the truth of the tally detection report, so that the generated tally detection report has low safety and is difficult to distinguish the truth.
Disclosure of Invention
The embodiment of the invention provides a block chain-based tally inspection report anti-counterfeiting method, a block chain-based tally inspection report anti-counterfeiting device, a block chain-based tally inspection report anti-counterfeiting equipment and a block chain-based tally inspection report anti-counterfeiting medium, which can generate a tally inspection report with an anti-counterfeiting function and effectively improve the security of the tally inspection report.
In a first aspect, an embodiment of the present invention provides an anti-counterfeiting method for a block chain-based tally inspection report, where the method includes:
in response to a tally check request initiated by a first enterprise, generating a tally check report and tally check report signature data;
if the tally inspection report and the tally inspection report signature data are confirmed to pass the inspection, controlling to generate the time stamp signature data of the tally inspection report signature data;
generating a general key, and encrypting the tally inspection report by adopting the general key to obtain the ciphertext data of the tally inspection report;
encrypting the general secret key by adopting a public key of a first enterprise to obtain a first general secret key ciphertext;
storing the tally inspection report ciphertext data and obtaining a tally inspection report storage address;
and generating a first certificate storage message comprising the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the first general key ciphertext, and writing the first certificate storage message into a block chain to obtain a block address of the first certificate storage message.
In a second aspect, an embodiment of the present invention further provides an anti-counterfeit method for a block chain-based tally inspection report, where the method includes:
inquiring the block chain to obtain a second certificate storing message according to the block address of the second certificate storing message;
and performing anti-counterfeiting verification on the tally inspection report according to the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the second universal key ciphertext in the second certificate storage message.
In a third aspect, an embodiment of the present invention further provides a block chain-based tally inspection report anti-counterfeit device, where the device includes:
the generating module is used for responding to a tally checking request initiated by a first enterprise and generating a tally checking report and tally checking report signature data;
the control module is used for controlling the generation of the timestamp signature data of the tally inspection report signature data if the tally inspection report and the tally inspection report signature data determine that the tally inspection report passes the signature verification;
the encryption module is used for generating a general key and encrypting the tally inspection report by adopting the general key to obtain the ciphertext data of the tally inspection report;
the encryption module is further configured to encrypt the general key by using a public key of a first enterprise to obtain a first general key ciphertext;
the storage module is used for storing the tally inspection report ciphertext data and obtaining a tally inspection report storage address;
the generation module is further configured to generate a first certificate storage message including the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data, and the first general key ciphertext, and write the first certificate storage message into a block chain to obtain a block address of the first certificate storage message.
In a fourth aspect, an embodiment of the present invention further provides a block chain-based tally inspection report anti-counterfeit device, where the device includes:
the query module is used for querying the block chain to obtain a second certificate storing message according to the block address of the second certificate storing message;
and the checking module is used for performing anti-counterfeiting check on the tally inspection report according to the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the second universal key ciphertext in the second certificate storage message.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the block chain-based tally inspection report anti-counterfeiting method according to any one of the embodiments of the present invention.
In a sixth aspect, the present invention 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 block chain-based tally inspection report anti-counterfeit method according to any one of the embodiments of the present invention.
The method comprises the steps of encrypting a generated tally inspection report to obtain a first general ciphertext, storing the tally inspection report ciphertext data, and generating a first certificate storage message according to a tally inspection report storage address, tally inspection report signature data, timestamp signature data and a first general secret key ciphertext; and saving the first evidence storing message into the blockchain. The method and the device can encrypt the tally inspection report, effectively improve the safety of the generated tally inspection report, and ensure the integrity of data in the tally inspection report.
Drawings
Fig. 1 is a schematic flowchart of a block chain-based anti-counterfeiting method for physical inspection report according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a block chain-based anti-counterfeit method for tally inspection reports according to a second embodiment of the present invention;
FIG. 3 is an interaction diagram of block chain based anti-counterfeit check of tally inspection report according to an embodiment of the present invention;
FIG. 4 is an interaction diagram of block chain based anti-counterfeit check of tally inspection report in the second embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a block chain-based tally inspection report anti-counterfeiting device according to a third embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a block chain-based tally inspection report anti-counterfeiting device according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device in a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flowchart of a block chain-based anti-counterfeiting method for physical inspection report according to an embodiment of the present invention. The embodiment can be applied to the situation of performing anti-counterfeiting treatment on the tally inspection report. The method can be executed by a block chain-based tally inspection report anti-counterfeiting device, which can be realized in a hardware and/or software manner and can be configured in electronic equipment. The method specifically comprises the following steps:
and S110, responding to a tally check request initiated by the first enterprise, and generating a tally check report and tally check report signature data.
In this embodiment, in order to ensure the validity of the enterprise initiated by the tally check request, the first enterprise needs to register on the anti-counterfeit platform of the tally check report in advance before initiating the tally check request; referring to fig. 3, the tally inspection report anti-counterfeiting platform can provide management functions such as registration, tally report uploading, tally report querying, downloading, archiving and the like for each enterprise; the enterprise can check the uploaded tally inspection report at any time through the tally inspection report anti-counterfeiting platform, and the visual operation of the tally inspection report anti-counterfeiting platform management function is realized.
The first enterprise registers in the goods inspection report anti-counterfeiting platform, and the method can be specifically executed according to the following steps: firstly, a first enterprise needs to generate a key pair in a local security environment; for example, a key pair satisfying a public key system, that is, a public key and a private key, may be randomly generated in a local security environment by using an OpenSSL (Open Secure Sockets Layer) Open source tool; the public key is stored by the tally inspection report anti-counterfeiting platform, and the private key is stored by the first enterprise. Correspondingly, the inspection detection company inspecting the first enterprise also obtains a key pair meeting the public key system; the first business then submits identity information (i.e., authentication material), which may be, for example, a business license or corporate legal document; the inspection and testing company provides certification. The tally inspection report anti-counterfeiting platform verifies the submitted identity information and the qualification Certificate, and after the verification is passed, a Certificate request file is generated by using the public key of the first enterprise and is submitted to a CA (Certificate Authority) center, the CA center finishes the Certificate issuance, and the digital Certificate is returned to the tally inspection report anti-counterfeiting platform for storage. Where CA is the authority responsible for issuing certificates, authenticating certificates, and managing issued certificates; it makes policies and specific steps to verify and identify the user identity and sign the user certificate to ensure ownership of the certificate holder's identity and public key.
In this embodiment, the checking and detecting company makes a corresponding tally checking report according to a tally checking request initiated by the first enterprise, and when Signature data of the tally checking report is generated, the report may be signed by a private key generated during registration in a local secure environment, and Signature is Sign (SK, R); wherein, Signature is the Signature data of the tally inspection report; SK is a private key generated by a first enterprise in a local security environment; r is a tally inspection report. Combining the tally inspection report and the tally inspection report Signature data, wherein Msg is { R | | Signature }, and submitting the Msg to a tally inspection report anti-counterfeiting platform; and the anti-counterfeiting platform for the tally inspection report checks the Msg. Wherein, the Msg is a string of merged data formed by the data of the tally inspection report and the signature data of the tally inspection report.
Optionally, the tally inspection report anti-counterfeiting platform may perform Signature verification operation on Signature by using a public key reserved in the platform by an inspection and detection company; if the checking is determined to pass according to the tally inspection report and the tally inspection report signature data, executing S120; and if the tally inspection report and the tally inspection report signature data determine that the tally inspection report fails to pass the signature verification, returning a failed signature verification, and prompting to re-verify the signature.
And S120, controlling to generate the time stamp signature data of the tally inspection report signature data.
In this embodiment, since the tally inspection report signature data has no recognition, it is necessary to obtain a signature data with a higher recognition degree; specifically, the tally inspection report anti-counterfeiting platform can obtain timestamp Signature data TSTInfo for Signature by calling a timestamp service interface of a CA center. The time stamp Signature data TSTInfo is used for calling a CA center to process the time data of Signature for the anti-counterfeiting platform of the tally inspection report, and the legality of the Signature data of the tally inspection report can be effectively guaranteed.
And S130, generating a general secret key, and encrypting the tally inspection report by adopting the general secret key to obtain the ciphered text data of the tally inspection report.
In this embodiment, the tally inspection report anti-counterfeiting platform randomly generates a general Key, and encrypts the tally inspection report R with the Key as a Key by using a symmetric encryption algorithm to obtain report ciphertext data R' ═ Encrypt (R, Key). The purpose of the general Key is to decrypt the tally inspection report ciphertext encrypted by the asymmetric Key, and for different enterprise users, when the tally inspection report ciphertext needs to be decrypted, the user only needs to decrypt the tally inspection report ciphertext by using the private Key of the user, and then a uniform Key is taken to decrypt the tally inspection report ciphertext; therefore, the general key chosen here is a symmetric key. If the generated general secret key is an asymmetric secret key, the private key in the asymmetric secret key is required to be shared by all enterprise users authorized to view during decryption, and the security of the tally inspection report is reduced.
S140, the common secret key is encrypted by the public key of the first enterprise to obtain a first common secret key ciphertext.
In this embodiment, in order to ensure the security of the tally inspection report, the public key of the enterprise needs to be used to encrypt the tally inspection report, so that when the enterprise needs to decrypt the tally inspection report in the later period, the unique private key corresponding to the public key is used to decrypt the tally inspection report, thereby effectively realizing the anti-counterfeiting function of the tally inspection report.
S150, storing the encrypted data of the tally inspection report, and obtaining a storage address of the tally inspection report.
In this embodiment, the tally inspection report anti-counterfeiting platform calls the distributed storage service interface to persistently store the tally inspection report ciphertext R' through the intermediate component, and obtains the data storage address URL of the tally inspection report ciphertext in the distributed storage serviceR
And S160, generating a first certificate storage message comprising the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the first general key ciphertext, and writing the first certificate storage message into the block chain to obtain the block address of the first certificate storage message.
In this embodiment, the tally inspection report corresponding to the first deposit evidence message is checked by a plurality of authorized enterprises, and is stored in the block chain, so that the integrity of the recorded data in the tally inspection report can be effectively improved; due to the decentralized nature of the blockchain, it can be ensured that no party can tamper with the data in the tally inspection report. Meanwhile, the block chain has a distributed storage function, the corresponding tally inspection reports of different enterprises can be stored according to the requirements of the different enterprises, and due to the fact that the quantity of the tally inspection reports corresponding to the same enterprise is different, the enterprises can quickly check related data in the tally inspection reports through key decryption by storing the tally inspection reports corresponding to the different enterprises in the block chain in a classified mode, and traceability is high.
Optionally, the method further includes:
obtaining an authorization request from a first enterprise to a second enterprise, wherein the authorization request comprises a second universal key ciphertext; the second universal key cryptogram is determined as follows: inquiring the first evidence storing message from the block chain according to the block address of the first evidence storing message; decrypting a first general key ciphertext in the first certificate storage message by using a private key of a first enterprise to obtain a general key; encrypting the general key by adopting a public key of a second enterprise to obtain a second general key ciphertext;
generating a second certificate storage message comprising a tally inspection report storage address, tally inspection report signature data, timestamp signature data and a second universal key ciphertext, and writing the second certificate storage message into a block chain to obtain a block address of the second certificate storage message;
and sending the block address of the second certificate storing message to the second enterprise, so that the second enterprise performs anti-counterfeiting verification on the tally inspection report according to the second certificate storing message.
In this embodiment, the first universal Key ciphertext in the first certificate-storing message is parsed, and the first universal Key ciphertext Key is decrypted by the private Key of the first enterprise (SK) ═ Decrypt (SK)A,Key’);SKAIs a private key of the first enterprise; key' is the first universal Key cryptogram. The second deposit certificate message Data is transmitted through the middleware componentBSaving the uplink into the blockchain network and saving the blockchain network address TxIDBThe inspection report of the administrative goods is stored in an anti-counterfeiting platform database; the blockchain network address is used for an authorized second enterprise to view the tally inspection report of the first enterprise according to the blockchain network address.
The method comprises the steps of encrypting a generated tally inspection report to obtain a first general ciphertext, storing the tally inspection report ciphertext data, and generating a first certificate storage message according to a tally inspection report storage address, tally inspection report signature data, timestamp signature data and a first general secret key ciphertext; and saving the first evidence storing message into the blockchain. The method and the device can encrypt the tally inspection report, effectively improve the safety of the generated tally inspection report, and ensure the integrity of data in the tally inspection report.
Example two
Fig. 2 is a schematic flow chart of a block chain-based anti-counterfeiting method for physical inspection report according to a second embodiment of the present invention. The embodiment can be applied to the situation of carrying out anti-counterfeiting query on the tally inspection report. The method can be executed by a block chain-based tally inspection report anti-counterfeiting device, which can be realized in a hardware and/or software manner and can be configured in electronic equipment. The method specifically comprises the following steps:
s210, according to the block address of the second authentication information, the second authentication information is obtained by inquiring in the block chain.
In this embodiment, according to the block address of the second certificate storing message sent by the tally inspection report anti-counterfeiting platform, the second certificate storing message corresponding to the block address of the second certificate storing message is searched from the block chain; and the second enterprise can quickly find the tally inspection report which is required to be checked according to the block address of the second certificate storing message. For example, in this embodiment, referring to fig. 4, an authorized second enterprise may log in the mobile application, and securely use the private key SK of the second enterpriseBLoading to a mobile terminal trusted secure storage area; the second enterprise can obtain an authorized certificate storage list from the tally inspection report anti-counterfeiting platform and search corresponding certificate storage information in the certificate storage list according to the block chain address.
S220, performing anti-counterfeiting verification on the tally inspection report according to the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the second universal key ciphertext in the second certificate storage message.
In this embodiment, the second enterprise performs anti-counterfeit verification on the tally inspection report of the first enterprise according to the queried data information corresponding to the second certificate storing message.
Optionally, the verification method may include:
decrypting a second universal key ciphertext in the second certificate storage message by using a private key of a second enterprise to obtain a universal key;
acquiring the cryptograph data of the tally inspection report according to the storage address of the tally inspection report in the second certificate storage message;
decrypting the encrypted data of the tally inspection report by adopting the general key to obtain a original text of the tally inspection report;
verifying the timestamp signature data in the second certificate storage message by adopting a timestamp certificate;
and verifying the tally inspection report signature data in the second certificate storage message to obtain an anti-counterfeiting verification result.
In this embodiment, since the second universal key ciphertext file is obtained by encrypting the public key of the second enterprise, when the second universal key ciphertext file is analyzed, decryption needs to be performed according to the private key corresponding to the public key of the second enterprise to obtain the universal key; key is Decrypt (SK)B,KeyB') to a host; wherein, Key is a general Key; SKBIs a private key of the second enterprise; key (R)B' is a second general key ciphertext file. Acquiring the encrypted data R' of the tally inspection report, and inquiring the storage address URL of the tally inspection report in the second certificate storage message in the distributed storage service interfaceRAnd obtaining corresponding ciphertext data. Since the timestamp certificate provided by the CA records the acknowledged time data of the timestamp signature data in the second certificate-storing message, the timestamp signature data in the second certificate-storing message can be verified through the timestamp certificate provided by the CA center; and after the verification is successful, the second enterprise executes Signature verification operation on the tally inspection report Signature data Signature in the second certificate storage message by using a digital certificate which is hosted by the inspection detection company on the platform, so as to prove the authenticity of the tally inspection report original text R.
According to the embodiment, the timestamp signature data in the second certificate-storing message can be verified according to the timestamp certificate provided by the CA center, the fact that the timestamp signature of the second certificate-storing message is not tampered is proved, and the authenticity of the generation time of the tally inspection report is verified; and the digital certificate of the second enterprise is used for verifying the content integrity of the timestamp signature data in the second certificate storage message, so that whether the original text of the tally inspection report is falsified or not is quickly checked, and the accuracy of the anti-counterfeiting detection of the tally inspection report is effectively improved.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a block chain-based tally inspection report anti-counterfeiting device according to a third embodiment of the present invention. The embodiment can be applied to the situation of performing anti-counterfeiting treatment on the tally inspection report. The device is configured in the electronic equipment, and can realize the block chain-based tally inspection report anti-counterfeiting method in any embodiment of the application. The device specifically comprises the following steps:
a generating module 510, configured to generate a tally inspection report and tally inspection report signature data in response to a tally inspection request initiated by a first enterprise;
a control module 520, configured to control generation of timestamp signature data of the tally inspection report signature data if it is determined that the tally inspection report passes the inspection according to the tally inspection report and the tally inspection report signature data;
the encryption module 530 is configured to generate a general key, and encrypt the tally inspection report by using the general key to obtain tally inspection report ciphertext data;
the encryption module 530 is further configured to encrypt the general key by using a public key of a first enterprise to obtain a first general key ciphertext;
the storage module 550 is configured to store the tally inspection report ciphertext data and obtain a tally inspection report storage address;
the generating module 510 is further configured to generate a first certificate storage message that includes the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data, and the first general key ciphertext, and write the first certificate storage message into a block chain, so as to obtain a block address of the first certificate storage message.
Optionally, on the basis of the device, the tally inspection report signature data is obtained by signing the tally inspection report by using a private key of a verification detector;
the control module 520 is specifically configured to:
and if the public key of the checking detector is adopted, the checking is confirmed to pass according to the tally inspection report and the tally inspection report signature data.
Optionally, on the basis of the above apparatus, the apparatus further includes:
a determining module 550, configured to obtain an authorization request from a first enterprise to a second enterprise, where the authorization request includes a second universal key ciphertext; the second general key ciphertext is determined by: inquiring the first evidence storing message from a block chain according to the block address of the first evidence storing message; decrypting a first general key ciphertext in the first certificate storage message by using a private key of a first enterprise to obtain a general key; encrypting the general key by adopting a public key of a second enterprise to obtain a second general key ciphertext;
the generating module 510 is further configured to generate a second certificate storage message that includes the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data, and the second general key ciphertext, and write the second certificate storage message into a block chain to obtain a block address of the second certificate storage message;
a sending module 560, configured to send the block address of the second certificate storing message to a second enterprise, where the second enterprise performs anti-counterfeit verification on the tally inspection report according to the second certificate storing message.
By the aid of the block chain-based tally inspection report anti-counterfeiting device, the tally inspection report can be encrypted, safety of the generated tally inspection report is effectively improved, and integrity of data in the tally inspection report is guaranteed.
The block chain-based tally inspection report anti-counterfeiting device provided by the embodiment of the invention can execute the block chain-based tally inspection report anti-counterfeiting method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 6 is a schematic structural diagram of a block chain-based tally inspection report anti-counterfeiting device according to a fourth embodiment of the present invention. The embodiment can be applied to the situation of carrying out anti-counterfeiting query on the tally inspection report. The device is configured in the electronic equipment, and can realize the block chain-based tally inspection report anti-counterfeiting method in any embodiment of the application. The device specifically comprises the following steps:
the query module 610 is configured to query the block chain to obtain a second certificate-storing message according to the block address of the second certificate-storing message;
and the checking module 620 is configured to perform anti-counterfeit checking on the tally inspection report according to the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data, and the second general key ciphertext in the second certificate storage message.
Optionally, on the basis of the above apparatus, the apparatus further includes:
a decryption module 630, configured to decrypt the second universal key ciphertext in the second certificate storing message by using a private key of a second enterprise, so as to obtain a universal key;
the obtaining module 640 is configured to obtain the checking report ciphertext data according to the checking report storage address in the second certificate storage message;
the decryption module 630 is further configured to decrypt the tally inspection report ciphertext data by using the general key to obtain a tally inspection report original text;
the verifying module 620 is further configured to verify, by using a timestamp certificate, timestamp signature data in the second certificate storage message;
the verification module 620 is further configured to verify the tally inspection report signature data in the second certificate storage message to obtain an anti-counterfeit verification result.
By the block chain-based tally inspection report anti-counterfeiting device, the timestamp signature data in the second certificate storage message can be verified according to the timestamp certificate provided by the CA center, the timestamp signature of the second certificate storage message is proved to be not tampered, and the authenticity of the time for generating the tally inspection report is verified; and the digital certificate of the second enterprise is used for verifying the content integrity of the timestamp signature data in the second certificate storage message, so that whether the original text of the tally inspection report is falsified or not is quickly checked, and the accuracy of the anti-counterfeiting detection of the tally inspection report is effectively improved.
The block chain-based tally inspection report anti-counterfeiting device provided by the embodiment of the invention can execute the block chain-based tally inspection report anti-counterfeiting method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 7 is a schematic structural diagram of an electronic device in a fifth embodiment of the present invention. As shown in fig. 7, the electronic apparatus includes a processor 710, a memory 720, an input device 730, and an output device 740; the number of the processors 710 in the electronic device may be one or more, and one processor 710 is taken as an example in fig. 7; the processor 710, the memory 720, the input device 730, and the output device 740 in the electronic apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 7.
The memory 720 is a computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the block chain based physical inspection report anti-counterfeiting method in the embodiment of the present invention. The processor 710 executes software programs, instructions and modules stored in the memory 720, so as to execute various functional applications and data processing of the electronic device, that is, implement the block chain-based tally inspection report anti-counterfeiting method.
The memory 720 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 720 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 720 may further include memory located remotely from the processor 710, which may be connected to an electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 730 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device, and may include a keyboard, a mouse, and the like. The output device 740 may include a display device such as a display screen.
EXAMPLE six
The sixth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the block chain-based tally inspection report anti-counterfeit method according to the first embodiment of the present invention. Of course, the embodiment of the present invention provides a computer-readable storage medium, which can perform related operations in the block chain based physical inspection report anti-counterfeit method according to any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. The tally inspection report anti-counterfeiting method based on the block chain is characterized by comprising the following steps:
in response to a tally check request initiated by a first enterprise, generating a tally check report and tally check report signature data;
if the tally inspection report and the tally inspection report signature data are confirmed to pass the inspection, controlling to generate the time stamp signature data of the tally inspection report signature data;
generating a general key, and encrypting the tally inspection report by adopting the general key to obtain the ciphertext data of the tally inspection report;
encrypting the general secret key by adopting a public key of a first enterprise to obtain a first general secret key ciphertext;
storing the tally inspection report ciphertext data and obtaining a tally inspection report storage address;
and generating a first certificate storage message comprising the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the first general key ciphertext, and writing the first certificate storage message into a block chain to obtain a block address of the first certificate storage message.
2. The method of claim 1, wherein the tally inspection report signature data is obtained by signing the tally inspection report with a private key of a verifying detector;
if the tally inspection report and the tally inspection report signature data are determined to pass the inspection, the method comprises the following steps:
and if the public key of the checking detector is adopted, the checking is confirmed to pass according to the tally inspection report and the tally inspection report signature data.
3. The method of claim 1, further comprising:
obtaining an authorization request from a first enterprise to a second enterprise, wherein the authorization request comprises a second universal key ciphertext; the second general key ciphertext is determined by: inquiring the first evidence storing message from a block chain according to the block address of the first evidence storing message; decrypting a first general key ciphertext in the first certificate storage message by using a private key of a first enterprise to obtain a general key; encrypting the general key by adopting a public key of a second enterprise to obtain a second general key ciphertext;
generating a second certificate storage message comprising the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the second universal key ciphertext, and writing the second certificate storage message into a block chain to obtain a block address of the second certificate storage message;
and sending the block address of the second certificate storing message to a second enterprise, so that the second enterprise performs anti-counterfeiting verification on the tally inspection report according to the second certificate storing message.
4. The tally inspection report anti-counterfeiting method based on the block chain is characterized by comprising the following steps:
inquiring the block chain to obtain a second certificate storing message according to the block address of the second certificate storing message;
and performing anti-counterfeiting verification on the tally inspection report according to the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the second universal key ciphertext in the second certificate storage message.
5. The method of claim 4, wherein the checking the tally inspection report for forgery prevention according to the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data, and the second general key ciphertext in the second deposit message comprises:
decrypting a second universal key ciphertext in the second certificate storage message by using a private key of a second enterprise to obtain a universal key;
acquiring the cryptograph data of the tally inspection report according to the storage address of the tally inspection report in the second certificate storage message;
decrypting the encrypted data of the tally inspection report by adopting the general key to obtain a original text of the tally inspection report;
verifying the timestamp signature data in the second certificate storage message by adopting a timestamp certificate;
and verifying the tally inspection report signature data in the second certificate storage message to obtain an anti-counterfeiting verification result.
6. Tally inspection report anti-counterfeiting device based on block chain, which is characterized by comprising:
the generating module is used for responding to a tally checking request initiated by a first enterprise and generating a tally checking report and tally checking report signature data;
the control module is used for controlling the generation of the timestamp signature data of the tally inspection report signature data if the tally inspection report and the tally inspection report signature data determine that the tally inspection report passes the signature verification;
the encryption module is used for generating a general key and encrypting the tally inspection report by adopting the general key to obtain the ciphertext data of the tally inspection report;
the encryption module is further configured to encrypt the general key by using a public key of a first enterprise to obtain a first general key ciphertext;
the storage module is used for storing the tally inspection report ciphertext data and obtaining a tally inspection report storage address;
the generation module is further configured to generate a first certificate storage message including the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data, and the first general key ciphertext, and write the first certificate storage message into a block chain to obtain a block address of the first certificate storage message.
7. Tally inspection report anti-counterfeiting device based on block chain, which is characterized by comprising:
the query module is used for querying the block chain to obtain a second certificate storing message according to the block address of the second certificate storing message;
and the checking module is used for performing anti-counterfeiting check on the tally inspection report according to the tally inspection report storage address, the tally inspection report signature data, the timestamp signature data and the second universal key ciphertext in the second certificate storage message.
8. The apparatus of claim 7, further comprising:
the decryption module is used for decrypting a second universal key ciphertext in the second certificate storage message by adopting a private key of a second enterprise to obtain a universal key;
the acquisition module is used for acquiring the cryptograph data of the tally inspection report according to the storage address of the tally inspection report in the second certificate storage message;
the decryption module is further used for decrypting the tally inspection report ciphertext data by adopting the general key to obtain a tally inspection report original text;
the verification module is further configured to verify the timestamp signature data in the second certificate storage message by using a timestamp certificate;
and the verification module is also used for verifying the tally inspection report signature data in the second certificate storage message to obtain an anti-counterfeiting verification result.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the blockchain based tally inspection report anti-counterfeiting method of any one of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the block chain based physical examination report forgery prevention method according to any one of claims 1 to 5.
CN201911257736.6A 2019-12-10 2019-12-10 Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report Pending CN112948894A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911257736.6A CN112948894A (en) 2019-12-10 2019-12-10 Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911257736.6A CN112948894A (en) 2019-12-10 2019-12-10 Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report

Publications (1)

Publication Number Publication Date
CN112948894A true CN112948894A (en) 2021-06-11

Family

ID=76226128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911257736.6A Pending CN112948894A (en) 2019-12-10 2019-12-10 Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report

Country Status (1)

Country Link
CN (1) CN112948894A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113919011A (en) * 2021-12-08 2022-01-11 石家庄学院 Anti-counterfeiting method of equipment inspection report based on block chain
CN116383859A (en) * 2023-06-06 2023-07-04 四川省建筑科学研究院有限公司 Detection report generation method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107274139A (en) * 2017-07-21 2017-10-20 中链科技有限公司 Warehouse receipt data managing method and computer-readable medium
CN107391944A (en) * 2017-07-27 2017-11-24 北京太云科技有限公司 A kind of electronic health record shared system based on block chain
CN109191144A (en) * 2018-08-03 2019-01-11 食品安全与营养(贵州)信息科技有限公司 A kind of laboratory information business management system and working method based on block chain
CN109587253A (en) * 2018-12-11 2019-04-05 浙江大学 A method of distributed storage is realized to file based on block chain
CN109871709A (en) * 2018-12-20 2019-06-11 顺丰科技有限公司 Block chain private data deposits card method, system and storage medium
CN110061845A (en) * 2019-03-14 2019-07-26 深圳壹账通智能科技有限公司 Block chain data ciphering method, device, computer equipment and storage medium
CN110430039A (en) * 2019-07-19 2019-11-08 瑞纳智能设备股份有限公司 A kind of production management system and method based on block chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107274139A (en) * 2017-07-21 2017-10-20 中链科技有限公司 Warehouse receipt data managing method and computer-readable medium
CN107391944A (en) * 2017-07-27 2017-11-24 北京太云科技有限公司 A kind of electronic health record shared system based on block chain
CN109191144A (en) * 2018-08-03 2019-01-11 食品安全与营养(贵州)信息科技有限公司 A kind of laboratory information business management system and working method based on block chain
CN109587253A (en) * 2018-12-11 2019-04-05 浙江大学 A method of distributed storage is realized to file based on block chain
CN109871709A (en) * 2018-12-20 2019-06-11 顺丰科技有限公司 Block chain private data deposits card method, system and storage medium
CN110061845A (en) * 2019-03-14 2019-07-26 深圳壹账通智能科技有限公司 Block chain data ciphering method, device, computer equipment and storage medium
CN110430039A (en) * 2019-07-19 2019-11-08 瑞纳智能设备股份有限公司 A kind of production management system and method based on block chain

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113919011A (en) * 2021-12-08 2022-01-11 石家庄学院 Anti-counterfeiting method of equipment inspection report based on block chain
CN113919011B (en) * 2021-12-08 2022-03-18 石家庄学院 Anti-counterfeiting method of equipment inspection report based on block chain
CN116383859A (en) * 2023-06-06 2023-07-04 四川省建筑科学研究院有限公司 Detection report generation method and device, electronic equipment and storage medium
CN116383859B (en) * 2023-06-06 2023-08-22 四川省建筑科学研究院有限公司 Detection report generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107566116B (en) Method and apparatus for digital asset weight registration
CN109067801B (en) Identity authentication method, identity authentication device and computer readable medium
CN109274652B (en) Identity information verification system, method and device and computer storage medium
US11757641B2 (en) Decentralized data authentication
CN107742212B (en) Asset verification method, device and system based on block chain
CN110519309B (en) Data transmission method, device, terminal, server and storage medium
US9021255B1 (en) Techniques for multiple independent verifications for digital certificates
US6622247B1 (en) Method for certifying the authenticity of digital objects by an authentication authority and for certifying their compliance by a testing authority
US9900157B2 (en) Object signing within a cloud-based architecture
CN110677376B (en) Authentication method, related device and system and computer readable storage medium
CN109905360B (en) Data verification method and terminal equipment
US20110289318A1 (en) System and Method for Online Digital Signature and Verification
CN101379487A (en) Method and apparatus for generating rights object by means of delegation of authority
CN111651794A (en) Alliance chain-based electronic data management method and device and storage medium
CN110519268B (en) Voting method, device, equipment, system and storage medium based on block chain
US7210034B2 (en) Distributed control of integrity measurement using a trusted fixed token
CN111479265B (en) Information dissemination method and device, computer equipment and storage medium
CN112948894A (en) Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report
CN114172663A (en) Service right confirming method and device based on block chain, storage medium and electronic equipment
CN105873043B (en) Method and system for generating and applying network private key for mobile terminal
CN116881936A (en) Trusted computing method and related equipment
Black et al. Be careful who you trust: Issues with the Public Key Infrastructure
CN115225346A (en) Data deposit system for credit investigation big data field
CN113132109B (en) Electronic deposit certificate management method and device based on block chain and electronic equipment
WO2016172986A1 (en) Data authentication method, device and system, and computer 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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210611

WD01 Invention patent application deemed withdrawn after publication