CN112104749A - Block chain-based bar code label life cycle management method and device - Google Patents

Block chain-based bar code label life cycle management method and device Download PDF

Info

Publication number
CN112104749A
CN112104749A CN202011239303.0A CN202011239303A CN112104749A CN 112104749 A CN112104749 A CN 112104749A CN 202011239303 A CN202011239303 A CN 202011239303A CN 112104749 A CN112104749 A CN 112104749A
Authority
CN
China
Prior art keywords
transaction
block chain
life cycle
bar code
code label
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.)
Granted
Application number
CN202011239303.0A
Other languages
Chinese (zh)
Other versions
CN112104749B (en
Inventor
顾惠波
岳晓兰
王帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Jiaguwen Chaojima Technology Co ltd
Original Assignee
Zhejiang Jiaguwen Chaojima Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Jiaguwen Chaojima Technology Co ltd filed Critical Zhejiang Jiaguwen Chaojima Technology Co ltd
Priority to CN202011239303.0A priority Critical patent/CN112104749B/en
Publication of CN112104749A publication Critical patent/CN112104749A/en
Application granted granted Critical
Publication of CN112104749B publication Critical patent/CN112104749B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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/321Cryptographic 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 a third party or a trusted authority
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a block chain-based bar code label life cycle management method and a block chain-based bar code label life cycle management device, wherein the block chain-based bar code label life cycle management method comprises the following steps: the method comprises the steps of acquiring an operation notification event aiming at the current life cycle stage of a bar code label, constructing an operation transaction according to the operation notification event, issuing commonly identified operation information related to the operation transaction to a blockchain for evidence storage according to the operation transaction, and generating the operation notification event related to the next life cycle stage of the bar code label according to the current life cycle stage of the bar code label related to the operation transaction if the operation information is stored on the blockchain.

Description

Block chain-based bar code label life cycle management method and device
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a barcode tag life cycle management method and apparatus based on blockchain.
Background
The block chain technology, also called distributed ledger technology, is an emerging technology in which several computing devices participate in "accounting" together, and a complete distributed database is maintained together. The blockchain technology has been widely used in many fields due to its characteristics of decentralization, transparency, participation of each computing device in database records, and rapid data synchronization between computing devices.
In the related technology, the barcode label is used for identifying the digital identity of each product by generating a barcode label for each product, one object is one code, the multi-dimensional functions of anti-counterfeiting, source tracing, anti-channel conflict, marketing and the like of the products are realized based on the barcode label, the life cycle of the barcode label comprises application, verification, code generation, downloading, decryption, printing, transportation, signing and activation, and the main bodies in the industry chain comprise enterprises, coders, auditors, code generation systems, printing factories and users purchasing the products with the barcode label.
At present, an effective solution is not provided aiming at the problem that the authority of a main body in an industrial chain is difficult to be clear under the condition that a bar code label is abnormal in the related technology.
Disclosure of Invention
The embodiment of the application provides a barcode tag life cycle management method and device based on a block chain, so as to solve at least the problem that the authority of a main body in an industrial chain is difficult to be clear under the condition that a barcode tag is abnormal in the related technology.
In a first aspect, an embodiment of the present application provides a barcode tag life cycle management method based on a block chain, which is applied to a block chain node, and the method includes:
acquiring an operation notification event aiming at the current life cycle stage of the bar code label, and constructing an operation transaction according to the operation notification event;
issuing the identified operation information related to the operation transaction to a block chain for storing a certificate according to the operation transaction;
and if the operation information is stored on the block chain, generating an operation notification event related to the next life cycle stage of the bar code label according to the current life cycle stage of the bar code label related to the operation transaction.
In some embodiments, before issuing the identified operation information related to the operation transaction to a blockchain for certification according to the operation transaction, the method further includes:
verifying a transaction address of the operational transaction;
and if the transaction address is matched with the preset address of the block chain node, issuing the identified operation information related to the operation transaction to the block chain for evidence storage according to the operation transaction.
In some embodiments, if the obtained operation notification event includes contract signing-related information for the barcode tag, the identified operation information related to the operation transaction includes a hash value obtained by hash conversion of contract data and a path index stored in the contract data.
In some embodiments, if the current life cycle phase is the life cycle phase of executing a code packet request for the barcode tag:
the operational notification event associated with the next life cycle phase of the barcode label includes a code packet request public key.
In some of these embodiments, the method further comprises:
and if an operation notification event containing the code packet request public key is acquired, encrypting the download index aiming at the bar code label based on the code packet request public key to generate a ciphertext corresponding to the download index, wherein the operation notification event related to the next life cycle stage of the bar code label contains the ciphertext.
In some embodiments, if an operation notification event including the ciphertext is acquired, decrypting the ciphertext according to a preset private key to acquire a download index, and downloading a code packet for the barcode tag according to the download index;
after downloading the code packet aiming at the bar code label, constructing a downloading transaction, and publishing the commonly recognized downloading information related to the downloading transaction to the block chain for storing evidence according to the downloading transaction;
after printing aiming at the bar code label is completed, constructing a printing transaction, and publishing the identified printing information related to the printing transaction to the blockchain for storing the certificate according to the printing transaction;
after the delivery of the barcode label is completed, a delivery transaction is constructed, and the commonly recognized delivery information related to the delivery transaction is published to the blockchain for storage according to the delivery transaction.
In some embodiments, after the receiving of the bar code label is completed, a receiving transaction is constructed, and the receiving information which is identified commonly and is related to the receiving transaction is published to the blockchain for storing according to the receiving transaction;
and constructing an activation transaction aiming at the bar code label, and publishing the identified activation information related to the activation transaction to the blockchain for deposit according to the activation transaction.
In a second aspect, an embodiment of the present application provides a barcode tag life cycle management apparatus based on a blockchain, which is applied to a blockchain node, and the apparatus includes: constructing an operation transaction module, a release module and a generation module;
the operation transaction establishing module is used for acquiring an operation notification event aiming at the current life cycle stage of the bar code label and establishing operation transaction according to the operation notification event;
the issuing module is used for issuing the identified operation information related to the operation transaction to a block chain for evidence storage according to the operation transaction;
and the generating module is used for generating an operation notification event related to the next life cycle stage of the bar code label according to the current life cycle stage of the bar code label related to the operation transaction if the operation information is stored in the block chain.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the block chain based barcode tag lifecycle management method according to the first aspect.
In a fourth aspect, the present application 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 barcode tag lifecycle management method as described in the first aspect above.
Compared with the related art, the barcode tag life cycle management method based on the blockchain provided by the embodiment of the application includes the steps of acquiring an operation notification event aiming at the current life cycle stage of the barcode tag, constructing an operation transaction according to the operation notification event, issuing the commonly identified operation information related to the operation transaction to the blockchain for evidence storage according to the operation transaction, if the operation information is verified on the blockchain, generating the operation notification event related to the next life cycle stage of the barcode tag according to the current life cycle stage of the barcode tag related to the operation transaction, solving the problem that the authority of the main body in an industrial chain is difficult to be clear under the condition that the barcode tag is abnormal in the related art, realizing interaction among different main bodies through an event mechanism based on the blockchain, and realizing non-tampering based on the blockchain, The traceable characteristic can help enterprises to self-verify and clear.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram of creating an intelligent contract according to an embodiment of the present application;
FIG. 2 is a schematic diagram of invoking an intelligent contract according to an embodiment of the present application;
FIG. 3 is a first flowchart of a block chain-based barcode tag lifecycle management method according to an embodiment of the present application;
FIG. 4 is a flowchart II of a barcode tag lifecycle management method based on a blockchain according to an embodiment of the present application;
FIG. 5 is a flowchart of a method of operation involving a printing factory in a block chain based barcode label lifecycle management method according to an embodiment of the present application;
FIG. 6 is a flowchart of a method of operation involving an enterprise in a method of barcode tag lifecycle management based on blockchains according to an embodiment of the present application;
fig. 7 is a block diagram of a block chain-based barcode tag lifecycle management apparatus according to an embodiment of the present application;
fig. 8 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
Blockchains are generally divided into three types: public chain (Public block chain), Private chain (Private block chain), and federation chain (Consortium block chain), in addition to which there are various types of associations, such as Private chain + federation chain, federation chain + Public chain, and other combinations.
The most decentralized is the public chain represented by bitcoin and ether house, the participant who joins the public chain can read the data record on the chain, participate in transaction, compete for the accounting right of the new block, and the like, and each participant (i.e. node) can freely join and leave the network and perform related operations. Private chaining, in contrast, where the network's write rights are controlled by an organization or institution and the data read rights are specified by the organization, the private chaining may simply be a weakly centralized system with strict restrictions on participating nodes, and this type of blockchain is more suitable for use within a particular institution. The alliance chain is a block chain between a public chain and a private chain, and can realize partial decentralization, each node in the alliance chain usually has a corresponding entity mechanism or organization, and participants join the network through authorization and form a benefit-related alliance to jointly maintain the operation of the block chain.
The intelligent contracts on the blockchain are contracts which can be triggered to be executed by transactions on a blockchain system, and the intelligent contracts can be defined by the form of codes. Taking an ether house as an example, a user is supported to create and call some complex logics in an ether house network, which is the biggest challenge of the ether house in distinguishing from a bitcoin block chain technology. The intelligent contracts issued and called by users in the etherhouses are run on the virtual machines, and actually the virtual machines directly run virtual machine codes (virtual machine byte codes, hereinafter referred to as "byte codes"), and the intelligent contracts deployed on the block chains can be in the form of byte codes.
As shown in fig. 1, after Bob sends a Transaction (Transaction) containing information for creating an intelligent contract to the ethernet network, the virtual machine of node 1 may execute the Transaction and generate a corresponding contract instance, in fig. 1, "0 x6f8 …" represents the address of the contract, the data field of the Transaction may store byte codes, and the to field of the Transaction is an empty account; after the agreement is achieved between the nodes through the consensus mechanism, the contract is successfully created, and the subsequent user can call the contract.
After the contract is created, a contract account corresponding to the intelligent contract appears on the blockchain and has a specific address, and the contract code and the account storage are stored in the contract account. The behavior of the intelligent contract is controlled by the contract code, while the account storage of the intelligent contract preserves the state of the contract, in other words, the intelligent contract causes a virtual account to be generated on the blockchain that contains the contract code and the account storage.
As mentioned above, the data field containing the transaction that created the smart contract holds what may be the bytecode for the smart contract, which is made up of a series of bytes, each of which may identify an operation. Based on the multiple considerations of development efficiency, readability and the like, a developer can select a high-level language to write intelligent contract codes instead of directly writing byte codes. For example, in a high-level language such as Solidity, Serpent, LLL, etc., for the intelligent contract code written in the high-level language, it can be compiled by a compiler to generate a bytecode that can be deployed on a blockchain.
Taking the Solidity language as an example, the contract written by the method is similar to the class in the object-oriented programming language, and various members including state variables, functions, function modifiers, events and the like can be declared in one contract. A state variable is a value permanently stored in the account storage of a smart contract that is used to save the state of the contract.
Generally, when an intelligent contract is deployed in a blockchain, the storage state corresponding to the state variable in the contract code of the intelligent contract is plaintext, and anyone can see the state without setting and capability of privacy protection.
As shown in fig. 2, still taking the ethernet lane as an example, after Bob sends a transaction containing the information of invoking the intelligent contract to the ethernet lane network, the virtual machine of node 1 may execute the transaction and generate the corresponding contract instance. The from field of the transaction in fig. 2 is the address of the account from which the intelligent contract was initiated, the "0 x …" in the to field represents the address of the intelligent contract that was invoked, the value field is the value in the etherhouse in the tai-currency, and the data field of the transaction holds the method and parameters for invoking the intelligent contract. After invoking the smart contract, the value of value may change, and a subsequent participant may view the current value of value through a blockchain node (e.g., node 6 in fig. 2).
The intelligent contracts can be independently executed at each node in the blockchain network in a specified mode, all execution records and data are stored on the blockchain, and therefore when the transaction is completed, transaction certificates which cannot be tampered and cannot be lost are stored on the blockchain.
In the embodiment of the application, the barcode label can be a one-dimensional barcode or a two-dimensional barcode. The bar code label is used for generating a bar code label for each product to identify the digital identity of the product, so that one object and one code are realized. The life cycle of the bar code label comprises application, verification, code generation, downloading, decryption, printing, transportation, signing and activation, and the main body in the industry chain comprises an enterprise requiring codes, a code generation worker, a verifier, a code generation system, a printing factory and a user purchasing bar code label products. In an embodiment of the present application, the life cycle of the barcode tag may be sequentially:
the enterprise side and the code generation side sign a contract, the code generation side issues contract information related to the contract to the block chain for certificate storage, a code generation order is generated according to the contract information after certificate storage, order information related to the code generation order is issued to the block chain for certificate storage, and an auditing event is generated after certificate storage;
the auditor side monitors the audit event, executes the audit operation, issues the audit information related to the audit to the block chain for storing the certificate, and generates a code event after storing the certificate;
the code generation system side monitors a code generation event, executes code generation operation, issues code generation information related to the code generation to a block chain for storing a certificate, and generates a printing event after storing the certificate;
the printing factory monitors a printing event, executes code packet request operation, issues code packet request information related to a code packet request to a block chain for storing a certificate, generates a code packet request event after the certificate is stored, and the code packet request event comprises a code packet request public key;
the code generation system side monitors a code packet request event, executes code packet request processing operation, and comprises the steps of obtaining a code packet request public key, encrypting a download link and a decryption key by using the public key to generate a ciphertext, issuing code packet request processing information related to code packet request processing to a block chain for evidence storage, generating a code packet download event after the evidence is stored, wherein the code packet download event comprises the ciphertext;
monitoring a code package downloading event by a printing factory, executing code package downloading operation, including acquiring a ciphertext, decrypting by using a private key corresponding to a public key to acquire a downloading link and a decryption key, downloading a code package through the downloading link, decrypting the code package through the decryption key, and issuing downloading information related to code package downloading to a block chain for storing a certificate; the decrypted code packet comprises printing information, such as printing quantity and printing type, and the printing information is issued to the block chain for storing the certificate; after printing is finished by a printing factory, carrying out delivery operation, including express delivery of the produced bar code label to an enterprise, and issuing delivery information related to delivery to a block chain for storage;
the enterprise side receives the bar code label, executes the goods receiving operation and issues the goods receiving information related to the goods receiving to the block chain for storing the certificate; when the enterprise uses the bar code label, activating operation is required to be executed, and activating information related to activation is issued to the block chain for storing the certificate;
a user side purchases a product with a bar code label, executes code scanning operation, and can display related certificate of the bar code label when executing the code scanning operation, so that the user can know the whole life cycle of the bar code label in detail, and code scanning information related to code scanning is issued to a block chain for certificate storage; it should be noted that the operation information related to the operation transaction to be commonly recognized may include time information of the execution of the operation transaction, and the like.
The embodiment provides a barcode tag life cycle management method based on a block chain, which is applied to a block chain node, and fig. 3 is a first flowchart of the barcode tag life cycle management method based on the block chain according to the embodiment of the present application, and as shown in fig. 3, the flowchart includes the following steps:
step S301, acquiring an operation notification event aiming at the current life cycle stage of the barcode label, and constructing an operation transaction according to the operation notification event;
it should be noted that the operation notification event in the current life cycle stage of the barcode label may be any one of an audit notification event, a code generation notification event, a printing notification event, a code package request notification event, a code package download notification event, and the like; the operation transaction may be any one of an audit operation related to an audit notification event, a code generation operation related to a code generation notification event, a printing operation related to a print notification event, a code package request operation related to a code package request notification event, a download code package request operation related to a download code package notification event, and the like.
Step S302, issuing the operation information which is identified commonly and is related to the operation transaction to a block chain for storing evidence according to the operation transaction;
the operation information related to the operation transaction may be any one of an audit result related to an audit operation, code generation information related to a code generation operation, and the like.
Step S303, if the operation information is stored in the block chain, generating an operation notification event related to the next life cycle stage of the bar code label according to the current life cycle stage of the bar code label related to the operation transaction;
for example, if the current life cycle stage of the barcode label is an auditing operation stage of an auditor, an operation notification event related to the next life cycle stage of the barcode label is generated, and the operation notification event is a code generation operation event;
it should be noted that, in one case, the operation processing may be performed on the operation of the barcode label on line by the party related to the barcode label, and then the operation information (which may be understood as the operation result) generated by the processing is issued to the blockchain for storage. In this case, after receiving the operation transaction for the barcode label, the block link point may issue the operation information of the identified operation transaction to the block link for deposit in response to the operation transaction;
in another case, the operation processing may be performed on the barcode label by deploying an intelligent contract on the blockchain, which is illustrated by taking the blockchain as an example of a federation chain, and the members of the federation chain may deploy an intelligent contract on the federation chain for performing operation processing on the barcode label and declare the barcode label processing logic in the intelligent contract. After the development of the intelligent contract is completed, the members of the federation chain can issue the intelligent contract to the federation chain through the node devices in the federation chain, and the intelligent contract is collected to the distributed database of the federation chain after the intelligent contract is identified by the member node devices specified by the part in the federation chain (for example, a plurality of authority node devices specified in the federation chain). Subsequently, the user may submit a transaction (transaction) to the intelligent contract included in the federation chain through the access node device to initiate a contract invocation for the intelligent contract, triggering execution of relevant business logic on the federation chain. Based on the deployment of the intelligent contract, the operation transaction is a transaction (including the address of the invoked intelligent contract) for invoking the intelligent contract, the operation information aiming at the barcode label related to the operation transaction, and the operation information (which can be understood as an operation result) generated by invoking the intelligent contract and executing operation processing aiming at the barcode label; after receiving the operation transaction aiming at the bar code label, the blockchain node calls a bar code label processing logic declared in an intelligent contract issued on the blockchain, executes operation processing on the bar code label, and issues operation information generated by executing the operation processing on the bar code label to the blockchain for storage;
through the above steps S301 to S302, based on the barcode tag life cycle stage, after the operation transaction is completed by the front party, the operation information related to the operation transaction is issued to the blockchain for evidence storage, and generating an operation notification event related to the next life cycle stage of the bar code label under the condition that the operation information is stored on the blockchain, so as to ensure that the operation information related to the operation transaction is successfully stored on the blockchain in the front, furthermore, when the bar code label is abnormal, the responsibility party is confirmed according to the deposit certificate on the block chain based on the non-falsification of the block chain, the problem that the authority of the main body in the industrial chain is difficult to be clear under the condition that the bar code label is abnormal in the related technology is solved, interaction among different main bodies is realized through an event mechanism based on the block chain, and self-certification clearing of enterprises can be helped based on the non-tampering and traceable characteristics of the block chain.
In some embodiments, fig. 4 is a flowchart of a second method for managing a life cycle of a barcode tag based on a blockchain according to an embodiment of the present application, where as shown in fig. 4, before issuing operation information related to an operation transaction, which is identified by a consensus, to the blockchain for verification, the method includes the following steps:
step S401, verifying the transaction address of the operation transaction; if the transaction address is matched with the preset address of the block chain link point, issuing the identified operation information related to the operation transaction to the block chain for storing the certificate according to the operation transaction;
the preset address is written in the intelligent contract, and before a certain party issues operation information related to operation transaction to the block chain for evidence storage, the intelligent contract performs authority verification, namely the transaction address of the operation transaction is matched with the preset address, so that whether the party has authority is determined, and the reliability of the block chain evidence storage is further ensured.
In some embodiments, if the acquired operation notification event includes contract signing related information for the barcode tag, the agreed operation information related to the operation transaction includes a hash value obtained by hash conversion of the contract data and a path index stored in the contract data;
for example, in the application stage of the barcode label, after a contract for the barcode label is made between an enterprise side and a barcode generator side, the node corresponding to the barcode generator side processes the identical data by using a hash algorithm, and issues the generated hash value and a path index of a storage location of the contract data to a blockchain for storage, wherein the contract data may be a carrier carrying contract content, such as an image related to the contract, and the path index stored in the contract data may be understood as a path stored in the image related to the contract.
In some embodiments, if the current life cycle phase is the life cycle phase of executing the code packet request for the barcode label; the operation notification event related to the next life cycle stage of the bar code label comprises a code packet request public key;
the code packet requests a public key, namely the public key, which is a non-secret half of a key pair used together with the private key, and if the public key is used for encrypting data, the private key is required to be used for decryption; after monitoring the printing notification event, the printing factory related to the bar code label executes the code packet request transaction, the operation information related to the operation transaction is the code packet request information, the code packet request event is generated after the code packet request information is stored and verified on the block chain, and the code packet request event comprises a public key, so that the related party at the next life cycle stage of the bar code label can generate a ciphertext according to the public key, and the printing factory decrypts the content behind the ciphertext according to the private key, so as to ensure the safety of information transmission between the printing factory and the printing factory.
In some embodiments, if an operation notification event containing a code packet request public key is acquired, encrypting a download index for a barcode tag based on the code packet request public key to generate a ciphertext corresponding to the download index, wherein the operation notification event related to the next life cycle stage of the barcode tag contains the ciphertext;
it should be noted that the download index of the barcode label can be encrypted through the public key, and in order to further ensure the security, the code packet of the barcode label can be encrypted; wherein, the code packet contains printing information, such as printing quantity and printing type; it can be understood that the download index of the barcode label is the download index of the code packet, and the code packet corresponds to the decryption key, so that after the code packet is downloaded through the download index, the code packet can be opened according to the decryption key, and further, both the download index and the decryption key can be encrypted through the public key to generate the ciphertext of the download index and the decryption key, so as to improve the security of the data related to the code packet.
In some embodiments, fig. 5 is a flowchart of an operation method related to a printing factory in a barcode label life cycle management method based on a blockchain according to an embodiment of the present application, as shown in fig. 5, the method includes the following steps;
step S501, if an operation notification event containing a cipher text is acquired, decrypting the cipher text according to a preset private key to acquire a download index, and downloading a code packet for the bar code label according to the download index;
for example, after an operation notification event containing a ciphertext is obtained, the ciphertext is obtained and decrypted by using the private key corresponding to the public key to obtain a download link and a decryption key, and a code packet is downloaded through the download link and decrypted by using the decryption key;
step S502, after downloading the code packet aiming at the bar code label, constructing a downloading transaction, and publishing the commonly recognized downloading information related to the downloading transaction to a block chain for storing evidence according to the downloading transaction;
step S503, after printing aiming at the bar code label is completed, a printing transaction is constructed, and the identified printing information related to the printing transaction is published to the block chain for storing evidence according to the printing transaction;
step S504, after the barcode label is conveyed, a delivery transaction is constructed, and the identified delivery information related to the delivery transaction is published to the blockchain for evidence storage according to the delivery transaction.
Through the steps S501 to S504, after the printing factory monitors the code package downloading event, each time an operation transaction is executed, the operation information related to the operation transaction is issued to the blockchain for storing the certificate, such as the download information, the printing information, and the shipping information, so that each operation information certificate related to the printing factory is stored on the blockchain, and the life cycle record of the barcode label on the blockchain is complete, thereby facilitating the later-stage tracing.
In some embodiments, fig. 6 is a flowchart of an operation method involving an enterprise side in a barcode tag lifecycle management method based on a blockchain according to an embodiment of the present application, as shown in fig. 6, the method includes the following steps;
step S601, after receiving the bar code label is completed, a receiving transaction is constructed, and the receiving information which is identified in common and is related to the receiving transaction is published to a block chain for storage according to the receiving transaction;
step S602, constructing an activation transaction aiming at the bar code label, and publishing the identified activation information related to the activation transaction to a block chain for storing evidence according to the activation transaction;
for example, the enterprise side receives the bar code label, executes the receiving operation, and issues the receiving information related to the receiving to the block chain for storing the certificate; when the enterprise uses the bar code label, activating operation is executed, and activating information related to activation is issued to the block chain for storing the certificate;
through the steps S601 to S602, when the enterprise side completes receiving the barcode tag, each time an operation transaction is executed, the operation information related to the operation transaction is issued to the blockchain for storing certificates, such as the receiving information and the activation information, so that each operation information certificate related to the enterprise side is stored on the blockchain, and the record of the life cycle of the barcode tag related to the enterprise side on the blockchain is complete, thereby facilitating the later-stage tracing.
In some embodiments, the user side purchases a product with a barcode tag, performs a code scanning operation, and displays the relevant certificate of the barcode tag when performing the code scanning operation, so that the user can know the whole life cycle of the barcode tag in detail, and issue the code scanning information related to the code scanning to the blockchain for certificate storage.
It should be noted that the steps illustrated in the above-described flow diagrams or in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order different than here.
The embodiment also provides a barcode tag life cycle management device based on the block chain, which is used for implementing the foregoing embodiments and preferred embodiments, and the description of which is already given is omitted. As used hereinafter, the terms "module," "unit," "subunit," and the like may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 7 is a block diagram of a block chain-based barcode tag lifecycle management apparatus according to an embodiment of the present application, and as shown in fig. 7, the apparatus includes: an operation transaction module 71, a publishing module 72 and a generating module 73 are constructed;
the operation transaction construction module 71 is configured to acquire an operation notification event for the current life cycle stage of the barcode tag, and construct an operation transaction according to the operation notification event;
the issuing module 72 is configured to issue the identified operation information related to the operation transaction to the blockchain for storing the certificate according to the operation transaction;
and the generating module 73 is configured to generate an operation notification event related to a next life cycle stage of the barcode label according to the current life cycle stage of the barcode label related to the operation transaction if the operation information is stored in the blockchain.
In some embodiments, the construction operation transaction module 71, the issuing module 72, and the generating module 73 are further configured to implement the steps in the barcode tag life cycle management method based on the block chain provided in each embodiment, and are not described herein again.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a block chain based barcode tag lifecycle management method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
In an embodiment, fig. 8 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application, and as shown in fig. 8, there is provided a computer device, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a block chain based barcode tag lifecycle management method.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the steps in the barcode tag lifecycle management method based on the blockchain provided in the above embodiments.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and the computer program is executed by a processor to implement the steps in the block chain based barcode tag lifecycle management method provided in the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A barcode label life cycle management method based on a block chain is applied to a block chain node, and is characterized by comprising the following steps:
acquiring an operation notification event aiming at the current life cycle stage of the bar code label, and constructing an operation transaction according to the operation notification event;
issuing the identified operation information related to the operation transaction to a block chain for storing a certificate according to the operation transaction;
and if the operation information is stored on the block chain, generating an operation notification event related to the next life cycle stage of the bar code label according to the current life cycle stage of the bar code label related to the operation transaction.
2. The barcode tag lifecycle management method of claim 1, wherein before issuing the identified operational information related to the operational transaction to a blockchain for storage according to the operational transaction, the method further comprises:
verifying a transaction address of the operational transaction;
and if the transaction address is matched with the preset address of the block chain node, issuing the identified operation information related to the operation transaction to the block chain for evidence storage according to the operation transaction.
3. The barcode tag lifecycle management method of claim 1, wherein if the obtained operation notification event includes contract-signing related information for the barcode tag, the agreed operation information related to the operation transaction includes a hash value obtained by hash-converting contract data and a path index stored in the contract data.
4. The barcode tag lifecycle management method of claim 1, wherein if the current lifecycle stage is the lifecycle stage that executes a code packet request for the barcode tag:
the operational notification event associated with the next life cycle phase of the barcode label includes a code packet request public key.
5. The barcode tag lifecycle management method of claim 4, further comprising:
and if an operation notification event containing the code packet request public key is acquired, encrypting the download index aiming at the bar code label based on the code packet request public key to generate a ciphertext corresponding to the download index, wherein the operation notification event related to the next life cycle stage of the bar code label contains the ciphertext.
6. The barcode label life cycle management method of claim 5,
if the operation notification event containing the ciphertext is acquired, decrypting the ciphertext according to a preset private key to acquire a download index, and downloading the code packet aiming at the bar code label according to the download index;
after downloading the code packet aiming at the bar code label, constructing a downloading transaction, and publishing the commonly recognized downloading information related to the downloading transaction to the block chain for storing evidence according to the downloading transaction;
after printing aiming at the bar code label is completed, constructing a printing transaction, and publishing the identified printing information related to the printing transaction to the blockchain for storing the certificate according to the printing transaction;
after the delivery of the barcode label is completed, a delivery transaction is constructed, and the commonly recognized delivery information related to the delivery transaction is published to the blockchain for storage according to the delivery transaction.
7. The barcode tag life cycle management method of claim 6,
after receiving the bar code label is completed, a receiving transaction is constructed, and the receiving information which is identified in common and is related to the receiving transaction is published to the block chain for storage according to the receiving transaction;
and constructing an activation transaction aiming at the bar code label, and publishing the identified activation information related to the activation transaction to the blockchain for deposit according to the activation transaction.
8. A barcode label life cycle management device based on a block chain is applied to a block chain node, and is characterized by comprising: constructing an operation transaction module, a release module and a generation module;
the operation transaction establishing module is used for acquiring an operation notification event aiming at the current life cycle stage of the bar code label and establishing operation transaction according to the operation notification event;
the issuing module is used for issuing the identified operation information related to the operation transaction to a block chain for evidence storage according to the operation transaction;
and the generating module is used for generating an operation notification event related to the next life cycle stage of the bar code label according to the current life cycle stage of the bar code label related to the operation transaction if the operation information is stored in the block chain.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the blockchain-based barcode tag lifecycle management method of any one of claims 1 to 7.
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 barcode tag lifecycle management method according to any one of claims 1 to 7.
CN202011239303.0A 2020-11-09 2020-11-09 Block chain-based bar code label life cycle management method and device Active CN112104749B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011239303.0A CN112104749B (en) 2020-11-09 2020-11-09 Block chain-based bar code label life cycle management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011239303.0A CN112104749B (en) 2020-11-09 2020-11-09 Block chain-based bar code label life cycle management method and device

Publications (2)

Publication Number Publication Date
CN112104749A true CN112104749A (en) 2020-12-18
CN112104749B CN112104749B (en) 2021-02-05

Family

ID=73785168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011239303.0A Active CN112104749B (en) 2020-11-09 2020-11-09 Block chain-based bar code label life cycle management method and device

Country Status (1)

Country Link
CN (1) CN112104749B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12073336B2 (en) 2021-12-29 2024-08-27 Micro Focus Llc Inventory tracking using blockchain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10162968B1 (en) * 2017-11-30 2018-12-25 Mocana Corporation System and method for securely updating a registered device using a development system and a release management system operated by an update provider and an update publisher
CN109272418A (en) * 2018-09-19 2019-01-25 中链科技有限公司 Product manufacturing data sharing method and device based on block chain
CN110287732A (en) * 2019-05-15 2019-09-27 杭州趣链科技有限公司 One kind depositing card method based on block chain electronic contract
CN110473095A (en) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 Bill state method for pushing and device, electronic equipment, storage medium based on block chain
CN111226199A (en) * 2019-08-27 2020-06-02 阿里巴巴集团控股有限公司 System and method for blockchain based notification
CN111325547A (en) * 2020-02-10 2020-06-23 北京工业大学 Block chain-based digital object full-life-cycle management method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10162968B1 (en) * 2017-11-30 2018-12-25 Mocana Corporation System and method for securely updating a registered device using a development system and a release management system operated by an update provider and an update publisher
CN109272418A (en) * 2018-09-19 2019-01-25 中链科技有限公司 Product manufacturing data sharing method and device based on block chain
CN110287732A (en) * 2019-05-15 2019-09-27 杭州趣链科技有限公司 One kind depositing card method based on block chain electronic contract
CN110473095A (en) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 Bill state method for pushing and device, electronic equipment, storage medium based on block chain
CN111226199A (en) * 2019-08-27 2020-06-02 阿里巴巴集团控股有限公司 System and method for blockchain based notification
CN111325547A (en) * 2020-02-10 2020-06-23 北京工业大学 Block chain-based digital object full-life-cycle management method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12073336B2 (en) 2021-12-29 2024-08-27 Micro Focus Llc Inventory tracking using blockchain

Also Published As

Publication number Publication date
CN112104749B (en) 2021-02-05

Similar Documents

Publication Publication Date Title
US20230254168A1 (en) System and method for controlling asset-related actions via a block chain
CN111445333B (en) Block generation method, device, computer equipment and storage medium
US20240005310A1 (en) Implementing logic gate functionality using a blockchain
KR102373685B1 (en) Operating system for blockchain IOT devices
CN112003858B (en) Block chain-based platform docking method, electronic device and storage medium
Möser et al. Bitcoin covenants
US20190149337A1 (en) Implementing logic gate functionality using a blockchain
CN113114476B (en) Privacy evidence storing method and device based on contract
Kumar et al. Combating counterfeit drugs: A quantitative analysis on cracking down the fake drug industry by using blockchain technology
CN111241557B (en) Service request method and device based on block chain
Hu et al. Hierarchical interactions between ethereum smart contracts across testnets
CN111127021B (en) Service request method and device based on block chain
CN111770198A (en) Information sharing method, device and equipment
CN109933987A (en) For the key generation method of block chain network, endorsement method, storage medium, calculate equipment
CN111274597B (en) Data processing method and device
CN113010861A (en) Identity verification method and system in financing transaction based on block chain
Yi et al. Blockchain Foundations and Applications
CN112104749B (en) Block chain-based bar code label life cycle management method and device
CN114331437A (en) Block chain-based digital seal using method and device
CN114202426B (en) Block chain-based insurance application method, system and medium for electronic insurance function contract
Liu A hybrid blockchain-based event ticketing system
CN110249358A (en) High value material is exported based on 1 evidences of title of ring
CN113761496A (en) Identity verification method and device based on block chain and electronic equipment
CN118381792A (en) Block chain-based data processing method, device, equipment and medium
CN117909961A (en) Program release method and device based on financial software supply chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and device for barcode label lifecycle management based on blockchain

Effective date of registration: 20221102

Granted publication date: 20210205

Pledgee: Hangzhou United Rural Commercial Bank Limited by Share Ltd. Baoshan Branch

Pledgor: ZHEJIANG JIAGUWEN CHAOJIMA TECHNOLOGY CO.,LTD.

Registration number: Y2022980020385