[go: up one dir, main page]

CN115907803A - Tobacco traceability method, device, electronic equipment, storage medium based on block chain - Google Patents

Tobacco traceability method, device, electronic equipment, storage medium based on block chain Download PDF

Info

Publication number
CN115907803A
CN115907803A CN202310189609.7A CN202310189609A CN115907803A CN 115907803 A CN115907803 A CN 115907803A CN 202310189609 A CN202310189609 A CN 202310189609A CN 115907803 A CN115907803 A CN 115907803A
Authority
CN
China
Prior art keywords
target
data
processing
tobacco
information
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
CN202310189609.7A
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.)
China Academy of Information and Communications Technology CAICT
Original Assignee
China Academy of Information and Communications Technology CAICT
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 China Academy of Information and Communications Technology CAICT filed Critical China Academy of Information and Communications Technology CAICT
Priority to CN202310189609.7A priority Critical patent/CN115907803A/en
Publication of CN115907803A publication Critical patent/CN115907803A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本公开实施例公开了一种基于区块链的烟草追溯方法、装置、电子设备、存储介质,其中,方法包括:通过目标烟草产品的追溯标签,获得所述目标烟草产品对应的数据元组;基于所述数据元组中的目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标烟草产品相对应;响应于所述射频识别标签与所述目标烟草产品相对应,基于所述数据元组中的区块链逻辑节点从区块链获得所述目标烟草产品对应的追溯产品数据;基于所述追溯产品数据,确定所述目标烟草产品对应的原料信息和至少一个处理信息。

Figure 202310189609

The embodiment of the present disclosure discloses a blockchain-based tobacco traceability method, device, electronic equipment, and storage medium, wherein the method includes: obtaining the data tuple corresponding to the target tobacco product through the traceability label of the target tobacco product; determining whether the radio frequency identification tag in the data tuple corresponds to the target tobacco product based on the target chip fingerprint in the data tuple; and in response to the radio frequency identification tag corresponding to the target tobacco product, based on the target tobacco product The block chain logic node in the data tuple obtains the traceable product data corresponding to the target tobacco product from the block chain; based on the traceable product data, determine the raw material information and at least one processing information corresponding to the target tobacco product.

Figure 202310189609

Description

基于区块链的烟草追溯方法、装置、电子设备、存储介质Tobacco traceability method, device, electronic equipment, storage medium based on block chain

技术领域technical field

本公开涉及区块链技术,尤其是一种基于区块链的烟草追溯方法、装置、电子设备、存储介质。The present disclosure relates to block chain technology, especially a block chain-based tobacco traceability method, device, electronic equipment, and storage medium.

背景技术Background technique

受全球消费品安全事故的频繁发生引发了消费者的敏感,国民开始越来越重视重要消费品的质量和安全问题,消费者在购买到卷烟后,如何确信卖到的是正品卷烟,以及质量安全将成为一个疑点。建立健全烟草追溯体系,实现卷烟产品可追溯是烟草行业产业升级的必然要求。Affected by the frequent occurrence of global consumer product safety accidents, consumers are becoming more and more concerned about the quality and safety of important consumer products. After purchasing cigarettes, how can consumers be sure that they are selling authentic cigarettes? become a doubt. It is an inevitable requirement for the industrial upgrading of the tobacco industry to establish and improve the tobacco traceability system and realize the traceability of cigarette products.

发明内容Contents of the invention

为了解决上述技术问题,提出了本公开。本公开的实施例提供了一种基于区块链的烟草追溯方法、装置、电子设备、存储介质。In order to solve the above-mentioned technical problems, the present disclosure is proposed. Embodiments of the present disclosure provide a blockchain-based tobacco traceability method, device, electronic device, and storage medium.

根据本公开实施例的一个方面,提供了一种基于区块链的烟草追溯方法,包括:According to an aspect of an embodiment of the present disclosure, a blockchain-based tobacco traceability method is provided, including:

通过目标烟草产品的追溯标签,获得所述目标烟草产品对应的数据元组;Obtain the data tuple corresponding to the target tobacco product through the traceability label of the target tobacco product;

基于所述数据元组中的目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标烟草产品相对应;determining whether a radio frequency identification tag in the data tuple corresponds to the target tobacco product based on the target chip fingerprint in the data tuple;

响应于所述射频识别标签与所述目标烟草产品相对应,基于所述数据元组中的区块链逻辑节点从区块链获得所述目标烟草产品对应的追溯产品数据;In response to the radio frequency identification tag corresponding to the target tobacco product, obtaining traceable product data corresponding to the target tobacco product from the blockchain based on the blockchain logic node in the data tuple;

基于所述追溯产品数据,确定所述目标烟草产品对应的原料信息和至少一个处理信息。Based on the traceable product data, raw material information and at least one processing information corresponding to the target tobacco product are determined.

可选地,所述基于所述数据元组中的目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标烟草产品相对应,包括:Optionally, the determining whether the radio frequency identification tag in the data tuple corresponds to the target tobacco product based on the target chip fingerprint in the data tuple includes:

基于所述目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标芯片指纹相对应;determining whether a radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint;

响应于所述射频识别标签与所述目标芯片指纹相对应,确定所述射频识别标签与所述目标烟草产品相对应。In response to the radio frequency identification tag corresponding to the target chip fingerprint, it is determined that the radio frequency identification tag corresponds to the target tobacco product.

可选地,所述基于所述目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标芯片指纹相对应,包括:Optionally, the determining whether the radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint includes:

通过对所述射频识别标签进行登录验证,获得对应的登录芯片指纹;Obtain the corresponding login chip fingerprint by performing login verification on the radio frequency identification tag;

根据所述登录芯片指纹与所述目标芯片指纹是否匹配,确定所述射频识别标签是否与所述目标芯片指纹相对应。Determine whether the radio frequency identification tag corresponds to the target chip fingerprint according to whether the login chip fingerprint matches the target chip fingerprint.

可选地,所述基于所述数据元组中的区块链逻辑节点从区块链获得所述目标烟草产品对应的追溯产品数据,包括:Optionally, the obtaining traceable product data corresponding to the target tobacco product from the blockchain based on the blockchain logic node in the data tuple includes:

基于所述区块链逻辑节点从所述区块链中存储的映射列表,确定所述区块链逻辑节点对应的区块链物理节点;其中,所述映射列表中保存了多个区块链逻辑节点与多个区块链物理节点之间的对应关系;Based on the mapping list stored by the blockchain logic node from the blockchain, determine the blockchain physical node corresponding to the blockchain logic node; wherein, multiple blockchains are stored in the mapping list Correspondence between logical nodes and multiple blockchain physical nodes;

从所述区块链逻辑节点对应的区块链物理节点中获得所述目标烟草产品对应的追溯产品数据。The traceable product data corresponding to the target tobacco product is obtained from the blockchain physical node corresponding to the blockchain logic node.

可选地,所述基于所述追溯产品数据,确定所述目标烟草产品对应的原料信息和至少一个处理信息,包括:Optionally, determining the raw material information and at least one processing information corresponding to the target tobacco product based on the traceable product data includes:

基于所述追溯产品数据中的原料标识码获得所述目标烟草产品对应的原料信息;Obtain raw material information corresponding to the target tobacco product based on the raw material identification code in the traceable product data;

基于所述追溯产品数据中的至少一个处理标识码获得所述目标烟草产品对应的至少一个处理信息,基于至少一个所述处理信息获得对应的至少一个处理属性信息;其中,所述处理属性信息包括时间信息和/或环境信息。At least one processing information corresponding to the target tobacco product is obtained based on at least one processing identification code in the traceable product data, and at least one corresponding processing attribute information is obtained based on at least one processing information; wherein the processing attribute information includes Time information and/or environment information.

可选地,所述通过目标烟草产品的追溯标签,获得所述目标烟草产品对应的数据元组之前,还包括:Optionally, before obtaining the data tuple corresponding to the target tobacco product through the traceability label of the target tobacco product, it may further include:

将烟草原料按照原料信息分配原料标识码,并将所述原料信息和所述原料标识码上传至所述区块链中进行存储;Assign raw material identification codes to tobacco raw materials according to the raw material information, and upload the raw material information and the raw material identification codes to the block chain for storage;

按照对所述烟草原料进行处理的顺序,为至少一个所述处理信息中每个所述处理信息分配对应的处理标识码;Assigning a corresponding processing identification code to each of the processing information in at least one of the processing information according to the order in which the tobacco raw materials are processed;

将至少一个所述处理信息和至少一个所述处理标识码上传至所述区块链中进行存储。uploading at least one of the processing information and at least one of the processing identification codes to the block chain for storage.

可选地,在将烟草原料按照原料信息分配原料标识码之后,还包括:Optionally, after assigning raw material identification codes to the tobacco raw materials according to the raw material information, it also includes:

基于所述原料标识码生成所述烟草原料对应的芯片指纹。A chip fingerprint corresponding to the tobacco raw material is generated based on the raw material identification code.

可选地,所述将至少一个所述处理信息和至少一个所述处理标识码上传至所述区块链中进行存储之前,还包括:Optionally, before uploading at least one of the processing information and at least one of the processing identification codes to the block chain for storage, it also includes:

基于至少一个所述处理信息获得对应的至少一个所述处理属性信息,将每个所述处理属性信息与对应的所述处理信息关联;Obtaining corresponding at least one processing attribute information based on at least one processing information, and associating each processing attribute information with the corresponding processing information;

所述将至少一个所述处理信息和至少一个所述处理标识码上传至所述区块链中进行存储,包括:The uploading of at least one of the processing information and at least one of the processing identification codes to the block chain for storage includes:

将所述至少一个处理信息、至少一个处理属性信息和至少一个所述处理标识码上传至所述区块链中进行存储。uploading the at least one processing information, at least one processing attribute information and at least one processing identification code to the block chain for storage.

根据本公开实施例的另一方面,提供了一种基于区块链的烟草追溯装置,包括:According to another aspect of the embodiments of the present disclosure, a blockchain-based tobacco traceability device is provided, including:

数据获取模块,用于通过目标烟草产品的追溯标签,获得所述目标烟草产品对应的数据元组;The data acquisition module is used to obtain the data tuple corresponding to the target tobacco product through the traceability label of the target tobacco product;

指纹识别模块,用于基于所述数据元组中的目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标烟草产品相对应;A fingerprint identification module, configured to determine whether the radio frequency identification tag in the data tuple corresponds to the target tobacco product based on the target chip fingerprint in the data tuple;

产品数据模块,用于响应于所述射频识别标签与所述目标烟草产品相对应,基于所述数据元组中的区块链逻辑节点从区块链获得所述目标烟草产品对应的追溯产品数据;A product data module, configured to obtain traceable product data corresponding to the target tobacco product from the blockchain based on the blockchain logic node in the data tuple in response to the radio frequency identification tag corresponding to the target tobacco product ;

信息追溯模块,用于基于所述追溯产品数据,确定所述目标烟草产品对应的原料信息和至少一个处理信息。An information traceability module, configured to determine raw material information and at least one piece of processing information corresponding to the target tobacco product based on the traceable product data.

可选地,所述指纹识别模块,具体用于基于所述目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标芯片指纹相对应;响应于所述射频识别标签与所述目标芯片指纹相对应,确定所述射频识别标签与所述目标烟草产品相对应。Optionally, the fingerprint identification module is specifically configured to determine whether the radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint; Corresponding to the target chip fingerprint, it is determined that the radio frequency identification tag corresponds to the target tobacco product.

可选地,所述指纹识别模块,在基于所述目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标芯片指纹相对应时,具体用于通过对所述射频识别标签进行登录验证,获得对应的登录芯片指纹;根据所述登录芯片指纹与所述目标芯片指纹是否匹配,确定所述射频识别标签是否与所述目标芯片指纹相对应。Optionally, when the fingerprint identification module determines whether the radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint, it is specifically configured to: Login verification, obtaining a corresponding login chip fingerprint; determining whether the radio frequency identification tag corresponds to the target chip fingerprint according to whether the login chip fingerprint matches the target chip fingerprint.

可选地,所述产品数据模块,具体用于基于所述区块链逻辑节点从所述区块链中存储的映射列表,确定所述区块链逻辑节点对应的区块链物理节点;其中,所述映射列表中保存了多个区块链逻辑节点与多个区块链物理节点之间的对应关系;从所述区块链逻辑节点对应的区块链物理节点中获得所述目标烟草产品对应的追溯产品数据。Optionally, the product data module is specifically configured to determine the blockchain physical node corresponding to the blockchain logical node based on the mapping list stored by the blockchain logical node in the blockchain; wherein , the corresponding relationship between multiple blockchain logical nodes and multiple blockchain physical nodes is saved in the mapping list; the target tobacco is obtained from the blockchain physical nodes corresponding to the blockchain logical nodes The traceable product data corresponding to the product.

可选地,所述信息追溯模块,具体用于基于所述追溯产品数据中的原料标识码获得所述目标烟草产品对应的原料信息;基于所述追溯产品数据中的至少一个处理标识码获得所述目标烟草产品对应的至少一个处理信息,基于至少一个所述处理信息获得对应的至少一个处理属性信息;其中,所述处理属性信息包括时间信息和/或环境信息。Optionally, the information traceability module is specifically configured to obtain raw material information corresponding to the target tobacco product based on the raw material identification code in the traceable product data; obtain the raw material information corresponding to the target tobacco product based on at least one processing identification code in the traceable product data. At least one processing information corresponding to the target tobacco product, and at least one corresponding processing attribute information is obtained based on at least one processing information; wherein, the processing attribute information includes time information and/or environment information.

可选地,所述装置还包括:Optionally, the device also includes:

原料标识存储模块,用于将烟草原料按照原料信息分配原料标识码,并将所述原料信息和所述原料标识码上传至所述区块链中进行存储;The raw material identification storage module is used to assign raw material identification codes to tobacco raw materials according to the raw material information, and upload the raw material information and the raw material identification codes to the block chain for storage;

处理标识存储模块,用于按照对所述烟草原料进行处理的顺序,为至少一个所述处理信息中每个所述处理信息分配对应的处理标识码;将至少一个所述处理信息和至少一个所述处理标识码上传至所述区块链中进行存储。The processing identification storage module is used to assign a corresponding processing identification code to each of the processing information in at least one of the processing information according to the order in which the tobacco raw materials are processed; at least one of the processing information and at least one of the processing information The processing identification code is uploaded to the block chain for storage.

可选地,所述装置还包括:Optionally, the device also includes:

指纹生成模块,用于基于所述原料标识码生成所述烟草原料对应的芯片指纹。A fingerprint generating module, configured to generate a chip fingerprint corresponding to the tobacco raw material based on the raw material identification code.

可选地,所述装置还包括:Optionally, the device also includes:

属性信息模块,用于基于至少一个所述处理信息获得对应的至少一个所述处理属性信息,将每个所述处理属性信息与对应的所述处理信息关联;An attribute information module, configured to obtain at least one corresponding processing attribute information based on at least one processing information, and associate each processing attribute information with the corresponding processing information;

所述处理标识存储模块,具体用于将所述至少一个处理信息、至少一个处理属性信息和至少一个所述处理标识码上传至所述区块链中进行存储。The processing identification storage module is specifically configured to upload the at least one processing information, at least one processing attribute information and at least one processing identification code to the block chain for storage.

根据本公开实施例的又一方面,提供了一种电子设备,包括:According to yet another aspect of the embodiments of the present disclosure, an electronic device is provided, including:

存储器,用于存储计算机程序产品;memory for storing computer program products;

处理器,用于执行所述存储器中存储的计算机程序产品,且所述计算机程序产品被执行时,实现上述任一实施例所述的基于区块链的烟草追溯方法。The processor is configured to execute the computer program product stored in the memory, and when the computer program product is executed, implement the blockchain-based tobacco traceability method described in any of the above embodiments.

根据本公开实施例的还一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,该计算机程序指令被处理器执行时,实现上述任一实施例所述的基于区块链的烟草追溯方法。According to still another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the block-based chain of tobacco traceability methods.

基于本公开上述实施例提供的一种基于区块链的烟草追溯方法、装置、电子设备、存储介质,通过目标烟草产品的追溯标签,获得所述目标烟草产品对应的数据元组;基于所述数据元组中的目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标烟草产品相对应;响应于所述射频识别标签与所述目标烟草产品相对应,基于所述数据元组中的区块链逻辑节点从区块链获得所述目标烟草产品对应的追溯产品数据;基于所述追溯产品数据,确定所述目标烟草产品对应的原料信息和至少一个处理信息;本实施例通过追溯标签,解决烟草供应链各个阶段的处理数据的可追溯性,结合射频识别技术与区块链技术完成数据的可信上链,从而保证了烟草供应链数据的真实性和准确性。Based on the blockchain-based tobacco traceability method, device, electronic equipment, and storage medium provided by the above-mentioned embodiments of the present disclosure, the data tuple corresponding to the target tobacco product is obtained through the traceability label of the target tobacco product; based on the determining whether a radio frequency identification tag in the data tuple corresponds to the target tobacco product in response to the target chip fingerprint in the data tuple; responsive to the radio frequency identification tag corresponding to the target tobacco product, based on the data element The block chain logical nodes in the group obtain the traceable product data corresponding to the target tobacco product from the block chain; based on the traceable product data, determine the raw material information and at least one processing information corresponding to the target tobacco product; this embodiment Through the traceability label, the traceability of the processing data at each stage of the tobacco supply chain is solved, and the combination of radio frequency identification technology and blockchain technology completes the credible uploading of the data, thus ensuring the authenticity and accuracy of the tobacco supply chain data.

下面通过附图和实施例,对本公开的技术方案做进一步的详细描述。The technical solution of the present disclosure will be described in further detail below with reference to the drawings and embodiments.

附图说明Description of drawings

构成说明书的一部分的附图描述了本公开的实施例,并且连同描述一起用于解释本公开的原理。参照附图,根据下面的详细描述,可以更加清楚地理解本公开,其中:The accompanying drawings, which constitute a part of this specification, illustrate embodiments of the disclosure and, together with the description, serve to explain principles of the disclosure. The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

图1是本公开一示例性实施例提供的基于区块链的烟草追溯方法的流程示意图;Fig. 1 is a schematic flow diagram of a blockchain-based tobacco traceability method provided by an exemplary embodiment of the present disclosure;

图2是本公开图1所示的实施例中步骤106的一个流程示意图;FIG. 2 is a schematic flowchart of step 106 in the embodiment shown in FIG. 1 of the present disclosure;

图3是本公开图1所示的实施例中步骤108的一个流程示意图;FIG. 3 is a schematic flowchart of step 108 in the embodiment shown in FIG. 1 of the present disclosure;

图4是本公开一示例性实施例提供的基于区块链的烟草追溯装置的结构示意图;Fig. 4 is a schematic structural diagram of a blockchain-based tobacco traceability device provided by an exemplary embodiment of the present disclosure;

图5图示了根据本公开实施例的电子设备的框图。FIG. 5 illustrates a block diagram of an electronic device according to an embodiment of the disclosure.

具体实施方式Detailed ways

下面,将参考附图详细地描述根据本公开的示例实施例。显然,所描述的实施例仅仅是本公开的一部分实施例,而不是本公开的全部实施例,应理解,本公开不受这里描述的示例实施例的限制。Hereinafter, exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Apparently, the described embodiments are only some of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited by the exemplary embodiments described here.

应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。It should be noted that relative arrangements of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

本领域技术人员可以理解,本公开实施例中的“第一”、“第二”等术语仅用于区别不同步骤、设备或模块等,既不代表任何特定技术含义,也不表示它们之间的必然逻辑顺序。Those skilled in the art can understand that terms such as "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc. necessary logical sequence.

还应理解,在本公开实施例中,“多个”可以指两个或两个以上,“至少一个”可以指一个、两个或两个以上。It should also be understood that in the embodiments of the present disclosure, "plurality" may refer to two or more than two, and "at least one" may refer to one, two or more than two.

还应理解,对于本公开实施例中提及的任一部件、数据或结构,在没有明确限定或者在前后文给出相反启示的情况下,一般可以理解为一个或多个。It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more unless there is a clear limitation or a contrary suggestion is given in the context.

另外,本公开中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本公开中字符“/”,一般表示前后关联对象是一种“或”的关系。本公开中所指数据可以包括文本、图像、视频等非结构化数据,也可以是结构化数据。In addition, the term "and/or" in the present disclosure is only an association relationship describing associated objects, indicating that there may be three relationships, for example, A and/or B may indicate: A exists alone, and A and B exist simultaneously , there are three cases of B alone. In addition, the character "/" in the present disclosure generally indicates that the contextual objects are an "or" relationship. The data referred to in this disclosure may include unstructured data such as text, images, and videos, and may also be structured data.

还应理解,本公开对各个实施例的描述着重强调各个实施例之间的不同之处,其相同或相似之处可以相互参考,为了简洁,不再一一赘述。It should also be understood that the description of the various embodiments in the present disclosure emphasizes the differences between the various embodiments, and the same or similar points can be referred to each other, and for the sake of brevity, details are not repeated here.

同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。At the same time, it should be understood that, for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。The following description of at least one exemplary embodiment is merely illustrative in nature and in no way intended as any limitation of the disclosure, its application or uses.

对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。Techniques, methods and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such techniques, methods and devices should be considered part of the description.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that like numerals and letters denote like items in the following figures, therefore, once an item is defined in one figure, it does not require further discussion in subsequent figures.

本公开实施例可以应用于终端设备、计算机系统、服务器等电子设备,其可与众多其它通用或专用计算系统环境或配置一起操作。适于与终端设备、计算机系统、服务器等电子设备一起使用的众所周知的终端设备、计算系统、环境和/或配置的例子包括但不限于:个人计算机系统、服务器计算机系统、瘦客户机、厚客户机、手持或膝上设备、基于微处理器的系统、机顶盒、可编程消费电子产品、网络个人电脑、小型计算机系统、大型计算机系统和包括上述任何系统的分布式云计算技术环境,等等。Embodiments of the present disclosure may be applied to electronic devices such as terminal devices, computer systems, servers, etc., which may operate with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments and/or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick client computers, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the foregoing, among others.

终端设备、计算机系统、服务器等电子设备可以在由计算机系统执行的计算机系统可执行指令(诸如程序模块)的一般语境下描述。通常,程序模块可以包括例程、程序、目标程序、组件、逻辑、数据结构等等,它们执行特定的任务或者实现特定的抽象数据类型。计算机系统/服务器可以在分布式云计算环境中实施,分布式云计算环境中,任务是由通过通信网络链接的远程处理设备执行的。在分布式云计算环境中,程序模块可以位于包括存储设备的本地或远程计算系统存储介质上。Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by the computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc., that perform particular tasks or implement particular abstract data types. The computer system/server can be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computing system storage media including storage devices.

在实现本公开的过程中,发明人发现,现有的烟草可追溯系统往往忽略了影响供应链各个阶段烟草质量的环境因素,按照烟叶生产、烟叶收购、复烤加工、卷烟制造、专卖流通和零售流通等一个或若干个环节内部进行质量追溯,没有建立一个由烟叶生产到最终零售流通的一个全产业链闭环的环境因素的质量追溯。例如囊括烟叶生产、烟叶收购、复烤加工到卷烟制造四个环节,建立的一体化烟叶质量系统,着重追溯过程管理数据。卷烟制造、专卖流动到零售流通三个环节,大多数现有烟草追溯系统仍依赖于集中化的数据库,只有本地数据完成上传数据库,供应链各阶段之间缺乏相互认证机制,形成“信息孤岛”现象。此外,数据上传通常采用手动方式,消费者只能访问有效数据,并且数据的真实性很难得到保障。例如在分拣环节缺乏合理有效的追溯方案,无法快速识别并纠正分拣包装环节出现的多烟、少烟、品牌出错等情况,分拣出错后储配部只能采用人工回看视频逐包排查纠错的方式追回,纠错的过程费时费事。因此,为更大限度地减少烟草纠错追回问题,必须有效收集供应链数据,控制可能威胁烟草质量的供应链环境因素,有必要构建一个烟草可追溯系统,以便获得真实、可靠的可追溯数据,使得烟草供应链对消费者及监管方更加透明。In the process of realizing the present disclosure, the inventors found that the existing tobacco traceability system often ignores the environmental factors that affect the quality of tobacco at each stage of the supply chain. Quality traceability is carried out internally in one or several links such as retail circulation, and a closed-loop quality traceability of environmental factors in the entire industry chain from tobacco leaf production to final retail circulation has not been established. For example, it includes the four links of tobacco leaf production, tobacco leaf procurement, redrying processing, and cigarette manufacturing. The integrated tobacco leaf quality system has been established, focusing on traceability of process management data. Cigarette manufacturing, monopoly flow to retail circulation, most of the existing tobacco traceability systems still rely on centralized databases, only local data is uploaded to the database, and there is a lack of mutual authentication mechanism between various stages of the supply chain, forming an "information island" Phenomenon. In addition, data uploads are usually done manually, consumers can only access valid data, and the authenticity of data is difficult to guarantee. For example, there is no reasonable and effective traceability plan in the sorting process, and it is impossible to quickly identify and correct the situations of excessive smoke, low smoke, and brand errors in the sorting and packaging process. After sorting errors, the storage and distribution department can only manually review the video one by one The method of troubleshooting and correction is recovery, and the process of error correction is time-consuming and laborious. Therefore, in order to minimize the problem of tobacco error correction and recovery, it is necessary to effectively collect supply chain data and control the supply chain environmental factors that may threaten the quality of tobacco. It is necessary to build a tobacco traceability system in order to obtain true and reliable traceability. Data makes the tobacco supply chain more transparent to consumers and regulators.

射频识别(Radio Frequency Identification,RFID)是一种非接触式自动射频识别技术,能有效应对恶劣环境,可以应对快速、高效、非可视的物体识别非常适合视频追溯应用。RFID系统主要由标签、阅读器和应用系统构成,阅读器通过发射特定频率无线电波,当标签进入辐射范围内产生感应电流并激活,标签将自身存储编码信息经内置天线发送出去,阅读器接收到标签信息后传输到应用系统,最后由应用系统完成后续的逻辑判断及相关控制管理操作。Radio Frequency Identification (RFID) is a non-contact automatic radio frequency identification technology, which can effectively cope with harsh environments, and can cope with fast, efficient, non-visual object identification, which is very suitable for video traceability applications. The RFID system is mainly composed of tags, readers and application systems. The reader emits radio waves of a specific frequency. When the tag enters the radiation range, it generates an induced current and activates it. The tag sends out its own stored coded information through the built-in antenna, and the reader receives The label information is then transmitted to the application system, and finally the application system completes subsequent logical judgments and related control and management operations.

示例性方法exemplary method

图1是本公开一示例性实施例提供的基于区块链的烟草追溯方法的流程示意图。本实施例可应用在电子设备上,如图1所示,包括如下步骤:Fig. 1 is a schematic flowchart of a blockchain-based tobacco traceability method provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to electronic equipment, as shown in Figure 1, including the following steps:

步骤102,通过目标烟草产品的追溯标签,获得目标烟草产品对应的数据元组。Step 102, obtain the data tuple corresponding to the target tobacco product through the traceability label of the target tobacco product.

烟草产业链主要分为:烟叶生产(种植、收割、烘烤)、烟叶收购(交售、打包)、复烤加工(复烤储存、复烤打叶、片烟)、卷烟制造(烟丝、组配、制造)、专卖流通(工业存储、工业运输)和零售流通(商业存储、分拣打码、卷烟配送)等环节,直到消费者获取到最终的烟草产品。可选地,本实施例所指目标烟草产品可以是任意处理环节后得到的产品,例如,复烤加工后得到的烟草制品、消费者获取到最终的烟草产品等;追溯标签可以粘贴或印刻在目标烟草产品外包装上;追溯标签与具体的烟草商品相对应;可选地,追溯标签可以为二维码、条形码等任意可以存储信息的标签形式;验证者(例如,用户或检验人员)可以通过专用扫描设备或手机等可对追溯标签进行扫描识别的设备获得数据元组。The tobacco industry chain is mainly divided into: tobacco leaf production (planting, harvesting, baking), tobacco leaf acquisition (delivery, packaging), re-baking processing (re-baking storage, re-baking and threshing, sheet tobacco), cigarette manufacturing (shredded tobacco, packaging dispensing, manufacturing), monopoly circulation (industrial storage, industrial transportation) and retail circulation (commercial storage, sorting and coding, cigarette distribution) and other links, until consumers obtain the final tobacco products. Optionally, the target tobacco product referred to in this embodiment can be a product obtained after any processing link, for example, a tobacco product obtained after re-baking, a final tobacco product obtained by consumers, etc.; the traceability label can be pasted or printed on the on the outer packaging of the target tobacco product; the traceability label corresponds to the specific tobacco product; optionally, the traceability label can be in the form of any label that can store information, such as a QR code or a barcode; the verifier (for example, a user or an inspector) can Obtain data tuples through special scanning equipment or mobile phones and other devices that can scan and identify traceability labels.

步骤104,基于数据元组中的目标芯片指纹确定数据元组中的射频识别标签是否与目标烟草产品相对应。Step 104, determine whether the radio frequency identification tag in the data tuple corresponds to the target tobacco product based on the target chip fingerprint in the data tuple.

芯片指纹(Physical Unclonable Function,PUF)是一种硬件安全技术,是半导体制造过程中自然发生的不可克隆的物理变化,是一种“数字指纹”,可用于作为半导体设备的唯一身份。PUF的一个物理激励信号及其唯一响应信号的对应关系成为激励响应对。每个不同的PUF都拥有完全不同的激励响应对集合,对于攻击者,物理及逻辑上克隆一个PUF是难以实现的。目前主流的PUF技术包括光学PUF、涂层PUF及仲裁器PUF等。其中,仲裁器PUF因所需电路较少可集成到射频识别(RFID)上,符合RFID标签要求。Chip fingerprint (Physical Unclonable Function, PUF) is a hardware security technology, which is an unclonable physical change that occurs naturally in the semiconductor manufacturing process. It is a "digital fingerprint" that can be used as a unique identity for semiconductor devices. The corresponding relationship between a physical excitation signal of PUF and its unique response signal becomes an excitation-response pair. Each different PUF has a completely different set of stimulus-response pairs, and it is difficult for an attacker to physically and logically clone a PUF. The current mainstream PUF technologies include optical PUF, coated PUF and arbiter PUF. Among them, the arbiter PUF can be integrated into radio frequency identification (RFID) due to less required circuits, which meets the requirements of RFID tags.

仲裁PUF由延时电路和仲裁器组成,芯片制造过程中受生产环境差异影响,集成电路传输延时会存在细微差异,利用这些差异保证PUF的物理不可克隆性。一个理想的PUF函数,在同样输入条件下,PUF电路每次输出差异可被忽略;同样输入条件下,不同PUF电路输出差异很大,保证实际使用中被认定为不同标签;无法准确预测PUF的输出;若PUF电路发生变化,对应的激励响应也应发生变化。The arbitration PUF is composed of a delay circuit and an arbitrator. Due to the difference in the production environment during the chip manufacturing process, there will be slight differences in the transmission delay of the integrated circuit. These differences are used to ensure the physical unclonability of the PUF. An ideal PUF function, under the same input conditions, the output difference of each PUF circuit can be ignored; under the same input conditions, the output difference of different PUF circuits is very large, ensuring that it is recognized as a different label in actual use; the PUF cannot be accurately predicted output; if the PUF circuit changes, the corresponding stimulus response should also change.

本实施例通过芯片指纹保证了射频识别标签的真实可控。This embodiment ensures the authenticity and controllability of the radio frequency identification tag through the chip fingerprint.

步骤106,响应于射频识别标签与目标烟草产品相对应,基于数据元组中的区块链逻辑节点从区块链获得目标烟草产品对应的追溯产品数据。Step 106, in response to the radio frequency identification tag corresponding to the target tobacco product, obtain traceable product data corresponding to the target tobacco product from the blockchain based on the blockchain logic node in the data tuple.

本实施例中,通过在区块链中保存目标烟草产品对应的追溯产品数据,确保了追溯产品数据的真实性和准确性。In this embodiment, by saving the traceable product data corresponding to the target tobacco product in the block chain, the authenticity and accuracy of the traceable product data are ensured.

步骤108,基于追溯产品数据,确定目标烟草产品对应的原料信息和至少一个处理信息。Step 108, based on the traceable product data, determine raw material information and at least one piece of processing information corresponding to the target tobacco product.

得到追溯产品数据之后,即可基于该追溯产品数据确定目标烟草产品对应的原料信息(例如,产地、种植、收割、烘烤等信息),以及对应的至少一个处理信息(例如,复烤加工、卷烟制造、运输等信息),即可实现对目标烟草产品的生成加工过程实现追溯;可快速识别并纠正分拣包装环节出现的多烟、少烟、品牌出错等情况。After obtaining the traceable product data, the raw material information corresponding to the target tobacco product (for example, information on origin, planting, harvesting, baking, etc.) and at least one corresponding processing information (for example, rebaking processing, Cigarette manufacturing, transportation and other information) can realize the traceability of the production and processing process of the target tobacco product; can quickly identify and correct the situation of excessive smoke, low smoke, and wrong brand in the sorting and packaging process.

本公开上述实施例提供的一种基于区块链的烟草追溯方法,通过目标烟草产品的追溯标签,获得所述目标烟草产品对应的数据元组;基于所述数据元组中的目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标烟草产品相对应;响应于所述射频识别标签与所述目标烟草产品相对应,基于所述数据元组中的区块链逻辑节点从区块链获得所述目标烟草产品对应的追溯产品数据;基于所述追溯产品数据,确定所述目标烟草产品对应的原料信息和至少一个处理信息;本实施例提出一种基于区块链和射频识别(RFID)技术的烟草供应链追溯模型,通过追溯标签,解决烟草供应链各个阶段的处理数据的可追溯性,结合射频识别技术与区块链技术完成数据的可信上链,从而保证了烟草供应链数据的真实性和准确性。通过建立烟草可信追溯体系可以有效地保证烟草产品质量,提高消费者的信心和满意度。According to the blockchain-based tobacco traceability method provided by the above embodiments of the present disclosure, the data tuple corresponding to the target tobacco product is obtained through the traceability label of the target tobacco product; based on the target chip fingerprint in the data tuple, it is determined whether the radio frequency identification tag in the data tuple corresponds to the target tobacco product; responsive to the radio frequency identification tag corresponding to the target tobacco product, based on the block chain logic node in the data tuple from The block chain obtains the traceable product data corresponding to the target tobacco product; based on the traceable product data, determine the raw material information and at least one processing information corresponding to the target tobacco product; this embodiment proposes a method based on block chain and radio frequency The tobacco supply chain traceability model of identification (RFID) technology solves the traceability of processing data at each stage of the tobacco supply chain through traceability labels, and combines radio frequency identification technology and block chain technology to complete the credible uploading of data, thus ensuring Authenticity and accuracy of tobacco supply chain data. By establishing a trusted tobacco traceability system, the quality of tobacco products can be effectively guaranteed, and consumer confidence and satisfaction can be improved.

在本实施例中,基于区块链和射频识别(RFID)技术建立了烟草供应链可追溯性方法。侧重于烟草供应链各个阶段环境数据的可追溯性,并结合了集中数据库和区块链进行数据存储。各个供应链阶段的批次识别数据存储在集中数据库中,而环境数据存储在区块链中。从而确保了可追溯性数据的真实性和准确性。通过对模型的设计功能梳理与风险分析,验证其可行性。In this example, a tobacco supply chain traceability method is established based on blockchain and radio frequency identification (RFID) technology. It focuses on the traceability of environmental data at each stage of the tobacco supply chain, and combines centralized databases and blockchains for data storage. Lot identification data for various supply chain stages is stored in a centralized database, while environmental data is stored in a blockchain. Thereby ensuring the authenticity and accuracy of the traceability data. Through combing the design function and risk analysis of the model, its feasibility is verified.

在一些可选的实施例中,步骤104可以包括:In some optional embodiments, step 104 may include:

基于目标芯片指纹确定数据元组中的射频识别标签是否与目标芯片指纹相对应;determining whether the radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint;

响应于射频识别标签与目标芯片指纹相对应,确定射频识别标签与目标烟草产品相对应。In response to the radio frequency identification tag corresponding to the target chip fingerprint, it is determined that the radio frequency identification tag corresponds to the target tobacco product.

本实施例中,每个射频识别标签对应唯一的芯片指纹,本实施例通过目标芯片指纹来确定射频识别标签是否被篡改,如果被篡改,那么射频识别标签将与目标芯片指纹对应,保证了射频识别标签的真实可靠;在确定了射频识别标签未被篡改后,即可确定射频识别标签与目标烟草产品相对应。In this embodiment, each radio frequency identification tag corresponds to a unique chip fingerprint. In this embodiment, the target chip fingerprint is used to determine whether the radio frequency identification tag has been tampered with. Authenticity of the identification tag; after determining that the RFID tag has not been tampered with, it can be determined that the RFID tag corresponds to the target tobacco product.

可选地,基于目标芯片指纹确定数据元组中的射频识别标签是否与目标芯片指纹相对应,包括:Optionally, determining whether the radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint includes:

通过对射频识别标签进行登录验证,获得对应的登录芯片指纹;Through the login verification of the radio frequency identification tag, the corresponding login chip fingerprint is obtained;

根据登录芯片指纹与目标芯片指纹是否匹配,确定射频识别标签是否与目标芯片指纹相对应。According to whether the fingerprint of the login chip matches the fingerprint of the target chip, it is determined whether the radio frequency identification tag corresponds to the fingerprint of the target chip.

本实施例中,射频识别标签的登录验证可以是交互式验证,例如,accode等;其中,accode是一种登录验证二维码,用于部分安全门登录,类似于普通二维码,但accode使用交互式验证,并不同于普通二维码的单向数据传输。有一定的防伪性和安全性。通过射频识别标签进行登录验证,可理解为每次上电,会对芯片指纹进行重构,得到登录芯片指纹,当标签内容被篡改后,重构的登录芯片指纹将与目标芯片指纹不一致,此时,射频识别标签与目标芯片指纹不相对应。In this embodiment, the login verification of the radio frequency identification tag can be interactive verification, for example, accode, etc.; wherein, accode is a login verification two-dimensional code, which is used for some security door logins, similar to ordinary two-dimensional codes, but accode uses Interactive verification is different from the one-way data transmission of ordinary QR codes. It has certain anti-counterfeiting and security. The login verification through the radio frequency identification label can be understood as that the chip fingerprint will be reconstructed every time the power is turned on to obtain the login chip fingerprint. When the label content is tampered with, the reconstructed login chip fingerprint will be inconsistent with the target chip fingerprint. , the RFID tag does not correspond to the fingerprint of the target chip.

可选地,当通过射频识别阅读器获得射频识别标签中的数据时,RFID标签用于存储编码数据,每个标签芯片都有唯一的PUF信息。RFID阅读器通过天线获取磁场范围内的标签数据,每个阅读器芯片都有唯一的PUF信息。数据解码后,将采集到的标签数据和标签和阅读器的PUF信息发送到处理设备进行进一步处理。处理设备存储区块链节点,并通过网络将信息传输到区块链。Optionally, when the data in the RFID tag is obtained by the RFID reader, the RFID tag is used to store coded data, and each tag chip has unique PUF information. The RFID reader obtains the tag data within the magnetic field range through the antenna, and each reader chip has unique PUF information. After the data is decoded, the collected tag data and PUF information of the tag and reader are sent to the processing device for further processing. The processing device stores the blockchain nodes and transmits the information to the blockchain through the network.

如图2所示,在上述图1所示实施例的基础上,步骤106可包括如下步骤:As shown in Figure 2, on the basis of the embodiment shown in Figure 1 above, step 106 may include the following steps:

步骤1061,基于区块链逻辑节点从区块链中存储的映射列表,确定区块链逻辑节点对应的区块链物理节点。Step 1061, based on the mapping list stored in the blockchain by the logical node of the blockchain, determine the physical node of the blockchain corresponding to the logical node of the blockchain.

其中,映射列表中保存了多个区块链逻辑节点与多个区块链物理节点之间的对应关系。Wherein, the correspondence between multiple blockchain logical nodes and multiple blockchain physical nodes is stored in the mapping list.

步骤1062,从区块链逻辑节点对应的区块链物理节点中获得目标烟草产品对应的追溯产品数据。Step 1062, obtain traceable product data corresponding to the target tobacco product from the blockchain physical node corresponding to the blockchain logic node.

本实施例中,映射列表中存储了区块链逻辑节点与多个区块链物理节点之间的对应关系,基于该对应关系即可基于区块链逻辑节点查找到对应的物理节点,进而从对应的区块链物理节点中获得对应的追溯产品数据,保证了链上数据的准确性和可追溯性。In this embodiment, the correspondence between blockchain logical nodes and multiple blockchain physical nodes is stored in the mapping list, based on the corresponding relationship, the corresponding physical nodes can be found based on the blockchain logical nodes, and then from The corresponding traceable product data is obtained in the corresponding blockchain physical node, which ensures the accuracy and traceability of the data on the chain.

如图3所示,在上述图1所示实施例的基础上,步骤108可包括如下步骤:As shown in Figure 3, on the basis of the embodiment shown in Figure 1 above, step 108 may include the following steps:

步骤1081,基于追溯产品数据中的原料标识码获得目标烟草产品对应的原料信息。Step 1081, obtain raw material information corresponding to the target tobacco product based on the raw material identification code in the traceable product data.

步骤1082,基于追溯产品数据中的至少一个处理标识码获得目标烟草产品对应的至少一个处理信息,基于至少一个处理信息获得对应的至少一个处理属性信息。Step 1082: Obtain at least one processing information corresponding to the target tobacco product based on at least one processing identification code in the traceable product data, and obtain at least one corresponding processing attribute information based on the at least one processing information.

其中,处理属性信息包括时间信息和/或环境信息。Wherein, the processing attribute information includes time information and/or environment information.

采集输入的环境数据,如温度数据和湿度数据,并将数据、采集对象和RFID标签唯一绑定,形成物理对象标识。Collect the input environmental data, such as temperature data and humidity data, and uniquely bind the data, collected objects and RFID tags to form physical object identification.

本专利基于区块链和RFID技术创建了烟草供应链溯源模型。该模型侧重于烟草供应链各个阶段环境数据的可追溯性,并结合了集中式数据库和区块链进行数据存储。各个供应链阶段的批次识别数据存储在集中式数据库中,而环境数据存储在区块链上。这确保了可追溯性数据的真实性和准确性。This patent creates a tobacco supply chain traceability model based on blockchain and RFID technology. The model focuses on the traceability of environmental data at all stages of the tobacco supply chain, and combines a centralized database and blockchain for data storage. Lot identification data for various supply chain stages is stored in a centralized database, while environmental data is stored on the blockchain. This ensures the authenticity and accuracy of traceability data.

在一些可选的实施例中,在执行步骤102之前,还可以包括:In some optional embodiments, before performing step 102, it may also include:

将烟草原料按照原料信息分配原料标识码,并将原料信息和原料标识码上传至区块链中进行存储;Tobacco raw materials are assigned raw material identification codes according to the raw material information, and the raw material information and raw material identification codes are uploaded to the blockchain for storage;

按照对烟草原料进行处理的顺序,为至少一个处理信息中每个处理信息分配对应的处理标识码;Assigning a corresponding processing identification code to each processing information in the at least one processing information according to the order in which the tobacco raw materials are processed;

将至少一个处理信息和至少一个处理标识码上传至区块链中进行存储。At least one processing information and at least one processing identification code are uploaded to the block chain for storage.

本实施例中,从烟草原料的生产开始,即生成为对应的烟草原料生成对应的原料标识码,以供后续追溯使用,不同的原料信息对应不同的原料标识码,原料信息可以包括但不限于:产地、种植时长、采集时间等;例如:烟草在农业生成阶段贴标,每批烟草贴上RFID标签,每个处理阶段给每批(不同批次的烟草分配不同的处理标识码,这里的批次是指处理批次)分配处理标识码,构建处理标识码后,在最终产品上形成数据元组,并写入追溯标签中;本实施例在构建标识码时,从烟草原料开始,对于相同原料标识码对应的烟草原料每次处理时,都可能再继续细分为多个批次,即,具有相同原料标识码的目标烟草产品,其对应的至少一个处理标识码可能不同,当最后得到烟草成品时,每个独立的烟草成品对应的完整追溯标签中的数据元组都不同。In this embodiment, starting from the production of tobacco raw materials, a corresponding raw material identification code is generated for the corresponding tobacco raw material for subsequent traceability. Different raw material information corresponds to different raw material identification codes. Raw material information may include but is not limited to : Place of origin, planting time, collection time, etc.; For example: Tobacco is labeled during the agricultural production stage, each batch of tobacco is affixed with an RFID tag, and each batch of tobacco is assigned a different processing identification code at each processing stage (different batches of tobacco are assigned different processing identification codes, here Batch refers to the processing batch) to assign a processing identification code. After the processing identification code is constructed, a data tuple is formed on the final product and written into the traceability label; Tobacco raw materials corresponding to the same raw material identification code may be further subdivided into multiple batches each time they are processed, that is, target tobacco products with the same raw material identification code may have at least one corresponding processing identification code that is different. When tobacco products are obtained, the data tuples in the complete traceability label corresponding to each independent tobacco product are different.

例如,一个可选示例中,一批烟草原料对应的原料标识码为LP(lp1);通过两个批次(批次可以为多个,根据实际应用场景确定,该示例中仅以两次为例)实现烟叶采集处理,分别为采集得到的烟草产品确定处理标识码LA(la1)和LA(la2),此时,两个批次的烟草产品对应的数据元组分别为(LP(lp1),LA(la1))和(LP(lp1),LA(la2));继续下一步将处理标识码为LA(la1)的烟草产品分为两个批次(批次可以为多个,根据实际应用场景确定,该示例中仅以两次为例)经过复烤加工处理,分配为复烤加工得到的两批烟草产品确定处理标识码R(r1)和R(r2),此时,两个批次的烟草产品对应的数据元组分别为(LP(lp1),LA(la1),R(r1))和(LP(lp1),LA(la1),R(r2));继续下一步将处理标识码为R(r1)的烟草产品分为两个批次(批次可以为多个,根据实际应用场景确定,该示例中仅以两次为例)经过卷烟制造处理,分配为卷烟制造得到的两批烟草产品确定处理标识码M(m1)和M(m2),此时,两个批次的烟草产品对应的数据元组分别为(LP(lp1),LA(la1),R(r1),M(m1))和(LP(lp1),LA(la1),R(r1),M(m2));继续下一步将处理标识码为M(m1)的烟草产品分为两个批次(批次可以为多个,根据实际应用场景确定,该示例中仅以两次为例)经过运输处理,分配为运输得到的两批烟草产品确定处理标识码T(t1)和T(t2),此时,两个批次的烟草产品对应的数据元组分别为(LP(lp1),LA(la1),R(r1),M(m1),T(t1))和(LP(lp1),LA(la1),R(r1),M(m1),T(t2));继续下一步将处理标识码为T(t1)的烟草产品分为两个批次(批次可以为多个,根据实际应用场景确定,该示例中仅以两次为例)经过零售处理,分配为零售得到的两批烟草产品确定处理标识码C(c1)和C(c2),此时,两个批次的烟草产品对应的数据元组分别为(LP(lp1),LA(la1),R(r1),M(m1),T(t1),C(c1))和(LP(lp1),LA(la1),R(r1),M(m1),T(t1),C(c2));最后,将处理标识码为C(c1)的烟草产品分为两个批次(批次可以为多个,根据实际应用场景确定,该示例中仅以两次为例)经过产品处理,分配不同产品的两批烟草产品确定处理标识码P(p1)和P(p2),此时,两个批次的烟草产品对应的数据元组分别为(LP(lp1),LA(la1),R(r1),M(m1),T(t1),C(c1),P(p1))和(LP(lp1),LA(la1),R(r1),M(m1),T(t1),C(c1),P(p2))。并且,在每次处理完成并分配处理标识码之后,将处理信息和处理标识码上传至区块链中指定节点中,在射频识别标签中存储原料标识码和所有处理标识码;另外,为了从区块链中获得对应的原料信息和处理信息,在数据元组中还可以包括区块链逻辑节点。For example, in an optional example, the raw material identification code corresponding to a batch of tobacco raw materials is LP(lp1); Example) To realize the collection and processing of tobacco leaves, determine the processing identification codes LA(la1) and LA(la2) for the collected tobacco products respectively. At this time, the corresponding data tuples of the two batches of tobacco products are (LP(lp1) , LA(la1)) and (LP(lp1), LA(la2)); Continue to the next step to process the tobacco products with identification code LA(la1) and divide them into two batches (the batches can be multiple, according to the actual The application scenario is determined. In this example, only two times are taken as an example) after rebaking processing, the two batches of tobacco products obtained from rebaking processing are assigned to determine the processing identification codes R(r1) and R(r2). At this time, the two The data tuples corresponding to the batches of tobacco products are (LP(lp1), LA(la1), R(r1)) and (LP(lp1), LA(la1), R(r2)) respectively; the next step will be Tobacco products with processing identification code R(r1) are divided into two batches (there can be multiple batches, determined according to the actual application scenario, this example only takes two batches as an example) after cigarette manufacturing processing, and allocated as cigarette manufacturing The two batches of tobacco products obtained determine the processing identification codes M(m1) and M(m2). At this time, the corresponding data tuples of the two batches of tobacco products are (LP(lp1), LA(la1), R( r1), M(m1)) and (LP(lp1), LA(la1), R(r1), M(m2)); proceed to the next step to divide the tobacco product with the processing identification code M(m1) into two Batches (there can be multiple batches, determined according to the actual application scenario, this example only takes two times as an example) are transported and processed, and the two batches of tobacco products obtained from the transportation are assigned to determine the processing identification codes T(t1) and T( t2), at this time, the data tuples corresponding to the two batches of tobacco products are (LP(lp1), LA(la1), R(r1), M(m1), T(t1)) and (LP( lp1), LA(la1), R(r1), M(m1), T(t2)); continue to the next step and divide the tobacco product of T(t1) into two batches (batches can be Multiple, determined according to the actual application scenario, in this example only two times are taken as an example) after retail processing, and assigned to two batches of tobacco products obtained from retail to determine the processing identification codes C(c1) and C(c2), at this time, the two The data tuples corresponding to batches of tobacco products are (LP(lp1), LA(la1), R(r1), M(m1), T(t1), C(c1)) and (LP(lp1) , LA(la1), R(r1), M(m1), T(t1), C(c2)); finally, divide the tobacco products with processing identification code C(c1) into two batches (batch It can be multiple, determined according to the actual application scenario. In this example, only two times are used as an example) to determine the processing identification codes P(p1) and P(p2) for two batches of tobacco products that have been processed and assigned different products. At this time, The data tuples corresponding to the two batches of tobacco products are (LP(lp1), LA(la1), R(r1), M(m1), T(t1), C(c1), P(p1)) and (LP(lp1), LA(la1), R(r1), M(m1), T(t1), C(c1), P(p2)). And, after each processing is completed and the processing identification code is assigned, the processing information and processing identification code are uploaded to the designated node in the block chain, and the raw material identification code and all processing identification codes are stored in the radio frequency identification tag; The corresponding raw material information and processing information are obtained in the blockchain, and the logical nodes of the blockchain can also be included in the data tuple.

可选地,在将烟草原料按照原料信息分配原料标识码之后,还包括:Optionally, after assigning raw material identification codes to the tobacco raw materials according to the raw material information, it also includes:

基于原料标识码生成烟草原料对应的芯片指纹。A chip fingerprint corresponding to the tobacco raw material is generated based on the raw material identification code.

本实施例通过PUF技术保证RFID标签的唯一性和安全性,以确保标签的物理唯一性。In this embodiment, the uniqueness and security of the RFID tag are guaranteed through the PUF technology, so as to ensure the physical uniqueness of the tag.

可选地,将至少一个处理信息和至少一个处理标识码上传至区块链中进行存储之前,还包括:Optionally, before uploading at least one processing information and at least one processing identification code to the block chain for storage, it also includes:

基于至少一个处理信息获得对应的至少一个处理属性信息,将每个处理属性信息与对应的处理信息关联;Obtaining at least one corresponding processing attribute information based on at least one processing information, and associating each processing attribute information with corresponding processing information;

将至少一个处理信息和至少一个处理标识码上传至区块链中进行存储,包括:Upload at least one processing information and at least one processing identification code to the block chain for storage, including:

将至少一个处理信息、至少一个处理属性信息和至少一个处理标识码上传至区块链中进行存储。At least one processing information, at least one processing attribute information and at least one processing identification code are uploaded to the block chain for storage.

针对现有的烟草可追溯方法中忽略了影响供应链各个处理阶段烟草质量与环境因素之间的关系,本实施例提出将在处理过程中,获得处理属性信息,处理属性信息可以包括但不限于:环境信息(例如,温度数据、湿度数据、压强数据等)、时间数据等;通过将处理属性数据与处理数据和处理标识码共同存入区块链,使环境因素对烟草质量的影响可以在产品追溯时获得,使得烟草供应链对消费者及监管方更加透明;将处理信息、处理属性信息、烟草产品和RFID标签唯一绑定,形成物理对象标识。在存储完成后会将存储信息的区块链逻辑节点发送到追溯标签进行存储。例如,在一些可选示例中,在追溯标签中包括的数据元组包括:{LN(j),(LP(lp),LA(la),R(r),M(m),T(t),C(c),P(p)),PUF, Data};其中,LN(j)表示区块链逻辑节点j;(LP(lp),LA(la),R(r),M(m),T(t),C(c),P(p))是原料标识码和多个处理标识码,为物理对象标识,记录在RFID标签中;PUF表示芯片指纹;Data表示多个处理标识码对应的处理属性信息。In view of the neglect of the relationship between tobacco quality and environmental factors affecting each processing stage of the supply chain in the existing tobacco traceability method, this embodiment proposes to obtain processing attribute information during the processing process, which may include but not limited to : Environmental information (such as temperature data, humidity data, pressure data, etc.), time data, etc.; by storing the processing attribute data together with the processing data and processing identification code in the block chain, the influence of environmental factors on tobacco quality can be in Obtained during product traceability, making the tobacco supply chain more transparent to consumers and regulators; uniquely binding processing information, processing attribute information, tobacco products and RFID tags to form physical object identification. After the storage is completed, the blockchain logic node that stores the information will be sent to the traceability tag for storage. For example, in some optional examples, the data tuples included in the traceback tags include: {LN(j),(LP(lp),LA(la),R(r),M(m),T(t ), C(c), P(p)), PUF, Data}; among them, LN(j) represents blockchain logic node j; (LP(lp), LA(la), R(r), M( m), T(t), C(c), P(p)) are raw material identification codes and multiple processing identification codes, which are physical object identifications and are recorded in RFID tags; PUF represents chip fingerprints; Data represents multiple processing The processing attribute information corresponding to the identification code.

本公开实施例提供的任一种基于区块链的烟草追溯方法可以由任意适当的具有数据处理能力的设备执行,包括但不限于:终端设备和服务器等。或者,本公开实施例提供的任一种基于区块链的烟草追溯方法可以由处理器执行,如处理器通过调用存储器存储的相应指令来执行本公开实施例提及的任一种基于区块链的烟草追溯方法。下文不再赘述。Any blockchain-based tobacco traceability method provided by the embodiments of the present disclosure can be executed by any appropriate device with data processing capabilities, including but not limited to: terminal devices and servers. Alternatively, any of the blockchain-based tobacco traceability methods provided by the embodiments of the present disclosure may be executed by a processor, for example, the processor executes any of the blockchain-based tobacco traceability methods mentioned in the embodiments of the present disclosure by calling the corresponding instructions stored in the memory. chain of tobacco traceability methods. I won't go into details below.

示例性装置Exemplary device

图4是本公开一示例性实施例提供的基于区块链的烟草追溯装置的结构示意图。本实施例提供的装置包括:Fig. 4 is a schematic structural diagram of a blockchain-based tobacco traceability device provided by an exemplary embodiment of the present disclosure. The device provided in this embodiment includes:

数据获取模块41,用于通过目标烟草产品的追溯标签,获得目标烟草产品对应的数据元组。The data acquisition module 41 is configured to obtain the data tuple corresponding to the target tobacco product through the traceability label of the target tobacco product.

指纹识别模块42,用于基于数据元组中的目标芯片指纹确定数据元组中的射频识别标签是否与目标烟草产品相对应。The fingerprint identification module 42 is configured to determine whether the radio frequency identification tag in the data tuple corresponds to the target tobacco product based on the target chip fingerprint in the data tuple.

产品数据模块43,用于响应于射频识别标签与目标烟草产品相对应,基于数据元组中的区块链逻辑节点从区块链获得目标烟草产品对应的追溯产品数据。The product data module 43 is configured to obtain traceable product data corresponding to the target tobacco product from the blockchain based on the blockchain logic node in the data tuple in response to the radio frequency identification tag corresponding to the target tobacco product.

信息追溯模块44,用于基于追溯产品数据,确定目标烟草产品对应的原料信息和至少一个处理信息。The information traceability module 44 is configured to determine raw material information and at least one piece of processing information corresponding to the target tobacco product based on traceable product data.

本公开上述实施例提供的一种基于区块链的烟草追溯装置,通过目标烟草产品的追溯标签,获得所述目标烟草产品对应的数据元组;基于所述数据元组中的目标芯片指纹确定所述数据元组中的射频识别标签是否与所述目标烟草产品相对应;响应于所述射频识别标签与所述目标烟草产品相对应,基于所述数据元组中的区块链逻辑节点从区块链获得所述目标烟草产品对应的追溯产品数据;基于所述追溯产品数据,确定所述目标烟草产品对应的原料信息和至少一个处理信息;本实施例提出一种基于区块链和射频识别(RFID)技术的烟草供应链追溯模型,通过追溯标签,解决烟草供应链各个阶段的处理数据的可追溯性,结合射频识别技术与区块链技术完成数据的可信上链,从而保证了烟草供应链数据的真实性和准确性。通过建立烟草可信追溯体系可以有效地保证烟草产品质量,提高消费者的信心和满意度。According to the blockchain-based tobacco traceability device provided by the above-mentioned embodiments of the present disclosure, the data tuple corresponding to the target tobacco product is obtained through the traceability label of the target tobacco product; based on the target chip fingerprint in the data tuple, the whether the radio frequency identification tag in the data tuple corresponds to the target tobacco product; responsive to the radio frequency identification tag corresponding to the target tobacco product, based on the block chain logic node in the data tuple from The block chain obtains the traceable product data corresponding to the target tobacco product; based on the traceable product data, determine the raw material information and at least one processing information corresponding to the target tobacco product; this embodiment proposes a method based on block chain and radio frequency The tobacco supply chain traceability model of identification (RFID) technology solves the traceability of processing data at each stage of the tobacco supply chain through traceability labels, and combines radio frequency identification technology and block chain technology to complete the credible uploading of data, thus ensuring Authenticity and accuracy of tobacco supply chain data. By establishing a trusted tobacco traceability system, the quality of tobacco products can be effectively guaranteed, and consumer confidence and satisfaction can be improved.

一些可选的实施例中,指纹识别模块42,具体用于基于目标芯片指纹确定数据元组中的射频识别标签是否与目标芯片指纹相对应;响应于射频识别标签与目标芯片指纹相对应,确定射频识别标签与目标烟草产品相对应。In some optional embodiments, the fingerprint identification module 42 is specifically configured to determine whether the radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint; in response to the radio frequency identification tag corresponding to the target chip fingerprint, determine RFID tags correspond to targeted tobacco products.

可选地,指纹识别模块42,在基于目标芯片指纹确定数据元组中的射频识别标签是否与目标芯片指纹相对应时,具体用于通过对射频识别标签进行登录验证,获得对应的登录芯片指纹;根据登录芯片指纹与目标芯片指纹是否匹配,确定射频识别标签是否与目标芯片指纹相对应。Optionally, the fingerprint identification module 42, when determining whether the radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint, is specifically used to obtain the corresponding login chip fingerprint by performing login verification on the radio frequency identification tag ; According to whether the fingerprint of the login chip matches the fingerprint of the target chip, determine whether the RFID tag corresponds to the fingerprint of the target chip.

一些可选的实施例中,产品数据模块43,具体用于基于区块链逻辑节点从区块链中存储的映射列表,确定区块链逻辑节点对应的区块链物理节点;其中,映射列表中保存了多个区块链逻辑节点与多个区块链物理节点之间的对应关系;从区块链逻辑节点对应的区块链物理节点中获得目标烟草产品对应的追溯产品数据。In some optional embodiments, the product data module 43 is specifically configured to determine the blockchain physical node corresponding to the blockchain logical node based on the mapping list stored by the blockchain logical node from the blockchain; wherein, the mapping list The corresponding relationship between multiple blockchain logical nodes and multiple blockchain physical nodes is stored in it; the traceable product data corresponding to the target tobacco product is obtained from the blockchain physical nodes corresponding to the blockchain logical nodes.

可选地,信息追溯模块44,具体用于基于追溯产品数据中的原料标识码获得目标烟草产品对应的原料信息;基于追溯产品数据中的至少一个处理标识码获得目标烟草产品对应的至少一个处理信息,基于至少一个处理信息获得对应的至少一个处理属性信息;其中,处理属性信息包括时间信息和/或环境信息。Optionally, the information traceability module 44 is specifically configured to obtain the raw material information corresponding to the target tobacco product based on the raw material identification code in the traceable product data; obtain at least one process corresponding to the target tobacco product based on at least one process identification code in the traceable product data Information, at least one corresponding processing attribute information is obtained based on at least one processing information; wherein, the processing attribute information includes time information and/or environment information.

在一些可选的实施例中,本实施例提供的装置还可以包括:In some optional embodiments, the device provided in this embodiment may also include:

原料标识存储模块,用于将烟草原料按照原料信息分配原料标识码,并将原料信息和原料标识码上传至区块链中进行存储;The raw material identification storage module is used to assign raw material identification codes to tobacco raw materials according to the raw material information, and upload the raw material information and raw material identification codes to the block chain for storage;

处理标识存储模块,用于按照对烟草原料进行处理的顺序,为至少一个处理信息中每个处理信息分配对应的处理标识码;将至少一个处理信息和至少一个处理标识码上传至区块链中进行存储。The processing identification storage module is used to assign a corresponding processing identification code to each processing information in at least one processing information according to the order in which the tobacco raw materials are processed; upload at least one processing information and at least one processing identification code to the block chain to store.

可选地,本实施例提供的装置还可以包括:Optionally, the device provided in this embodiment may also include:

指纹生成模块,用于基于原料标识码生成烟草原料对应的芯片指纹。The fingerprint generation module is used to generate chip fingerprints corresponding to the tobacco raw material based on the raw material identification code.

可选地,本实施例提供的装置还可以包括:Optionally, the device provided in this embodiment may also include:

属性信息模块,用于基于至少一个处理信息获得对应的至少一个处理属性信息,将每个处理属性信息与对应的处理信息关联;An attribute information module, configured to obtain at least one corresponding processing attribute information based on at least one processing information, and associate each processing attribute information with corresponding processing information;

处理标识存储模块,具体用于将至少一个处理信息、至少一个处理属性信息和至少一个处理标识码上传至区块链中进行存储。The processing identification storage module is specifically used to upload at least one processing information, at least one processing attribute information and at least one processing identification code to the block chain for storage.

烟草供应链追溯体系的参与者主要包括数据提供者、数据验证者和消费者,不同的参与者被赋予不同的访问权限。完整的追溯模型包括区块链系统中的可信数据传输,这对于保证烟草追溯系统的稳定性和敏捷性具有重要意义。The participants in the tobacco supply chain traceability system mainly include data providers, data verifiers and consumers, and different participants are given different access rights. The complete traceability model includes trusted data transmission in the blockchain system, which is of great significance for ensuring the stability and agility of the tobacco traceability system.

针对烟草行业,构建了烟草供应链追溯系统的理论模型,提出了追溯编码规范和关键环境信息采集方法。然后,阐述了基于区块链的烟草供应链追溯系统的追溯编码结构、运行机制和数据传输机制。烟草供应链可信追溯系统可有效解决烟草供应链不同环节、企业、地区之间数据不兼容的问题,使数据流动更加高效透明,帮助供应链企业快速发现质量隐患,帮助第三方当事人监督单位实施监督,维护消费者权益。Aiming at the tobacco industry, a theoretical model of the traceability system of the tobacco supply chain is constructed, and a traceability coding specification and key environmental information collection methods are proposed. Then, the traceability coding structure, operation mechanism and data transmission mechanism of the blockchain-based tobacco supply chain traceability system are expounded. The trusted traceability system of the tobacco supply chain can effectively solve the problem of data incompatibility among different links, enterprises and regions in the tobacco supply chain, make data flow more efficient and transparent, help supply chain enterprises quickly discover quality hidden dangers, and help third-party supervisory units to implement Supervise and protect the rights and interests of consumers.

示例性电子设备Exemplary electronic device

下面,参考图5来描述根据本公开实施例的电子设备。该电子设备可以是第一设备和第二设备中的任一个或两者、或与它们独立的单机设备,该单机设备可以与第一设备和第二设备进行通信,以从它们接收所采集到的输入信号。Hereinafter, an electronic device according to an embodiment of the present disclosure is described with reference to FIG. 5 . The electronic device may be either or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive collected data from them. input signal.

图5图示了根据本公开实施例的电子设备的框图。FIG. 5 illustrates a block diagram of an electronic device according to an embodiment of the disclosure.

如图5所示,电子设备包括一个或多个处理器和存储器。As shown in Figure 5, an electronic device includes one or more processors and memory.

处理器可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其他形式的处理单元,并且可以控制电子设备中的其他组件以执行期望的功能。The processor may be a central processing unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

存储器可以存储一个或多个计算机程序产品,所述存储器可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在所述计算机可读存储介质上可以存储一个或多个计算机程序产品,处理器可以运行所述计算机程序产品,以实现上文所述的本公开的各个实施例的基于区块链的烟草追溯方法以及/或者其他期望的功能。The memory may store one or more computer program products and may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and/or a cache memory (cache). The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, and the like. One or more computer program products can be stored on the computer-readable storage medium, and the processor can run the computer program products to realize the blockchain-based tobacco traceability of various embodiments of the present disclosure described above. method and/or other desired functionality.

在一个示例中,电子装置还可以包括:输入装置和输出装置,这些组件通过总线系统和/或其他形式的连接机构(未示出)互连。In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus system and/or other forms of connection mechanisms (not shown).

此外,该输入装置还可以包括例如键盘、鼠标等等。In addition, the input device may also include, for example, a keyboard, a mouse, and the like.

该输出装置可以向外部输出各种信息,包括确定出的距离信息、方向信息等。该输出装置可以包括例如显示器、扬声器、打印机、以及通信网络及其所连接的远程输出装置等等。The output device can output various information to the outside, including determined distance information, direction information, and the like. The output devices may include, for example, displays, speakers, printers, and communication networks and their connected remote output devices, among others.

当然,为了简化,图5中仅示出了该电子设备中与本公开有关的组件中的一些,省略了诸如总线、输入/输出接口等等的组件。除此之外,根据具体应用情况,电子设备还可以包括任何其他适当的组件。Of course, for simplicity, only some of the components related to the present disclosure in the electronic device are shown in FIG. 5 , and components such as bus, input/output interface, etc. are omitted. In addition, the electronic device may also include any other suitable components according to specific applications.

除了上述方法和设备以外,本公开的实施例还可以是计算机程序产品,其包括计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述部分中描述的根据本公开各种实施例的基于区块链的烟草追溯方法中的步骤。In addition to the methods and devices described above, embodiments of the present disclosure may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the functions described in the foregoing sections of this specification. Steps in the blockchain-based tobacco traceability method of various embodiments of the present disclosure.

所述计算机程序产品可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例操作的程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、C++等,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。The computer program product can be written in any combination of one or more programming languages to execute the program codes for performing the operations of the embodiments of the present disclosure, and the programming languages include object-oriented programming languages, such as Java, C++, etc. , also includes conventional procedural programming languages, such as the "C" language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server to execute.

此外,本公开的实施例还可以是计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述部分中描述的根据本公开各种实施例的基于区块链的烟草追溯方法中的步骤。In addition, the embodiments of the present disclosure may also be a computer-readable storage medium, on which computer program instructions are stored, and the computer program instructions, when executed by a processor, cause the processor to execute the method according to the present invention described in the above part of this specification. Steps in a blockchain-based tobacco traceability method of various embodiments are disclosed.

所述计算机可读存储介质可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以包括但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, but not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

以上结合具体实施例描述了本公开的基本原理,但是,需要指出的是,在本公开中提及的优点、优势、效果等仅是示例而非限制,不能认为这些优点、优势、效果等是本公开的各个实施例必须具备的。另外,上述公开的具体细节仅是为了示例的作用和便于理解的作用,而非限制,上述细节并不限制本公开为必须采用上述具体的细节来实现。The basic principles of the present disclosure have been described above in conjunction with specific embodiments, but it should be pointed out that the advantages, advantages, effects, etc. mentioned in the present disclosure are only examples rather than limitations, and these advantages, advantages, effects, etc. Various embodiments of the present disclosure must have. In addition, the specific details disclosed above are only for the purpose of illustration and understanding, rather than limitation, and the above details do not limit the present disclosure to be implemented by using the above specific details.

本说明书中各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似的部分相互参见即可。对于系统实施例而言,由于其与方法实施例基本对应,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other. As for the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the related parts, please refer to the part of the description of the method embodiment.

本公开中涉及的器件、装置、设备、系统的方框图仅作为例示性的例子并且不意图要求或暗示必须按照方框图示出的方式进行连接、布置、配置。如本领域技术人员将认识到的,可以按任意方式连接、布置、配置这些器件、装置、设备、系统。诸如“包括”、“包含”、“具有”等等的词语是开放性词汇,指“包括但不限于”,且可与其互换使用。这里所使用的词汇“或”和“和”指词汇“和/或”,且可与其互换使用,除非上下文明确指示不是如此。这里所使用的词汇“诸如”指词组“诸如但不限于”,且可与其互换使用。The block diagrams of devices, devices, devices, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, devices, systems may be connected, arranged, configured in any manner. Words such as "including", "comprising", "having" and the like are open-ended words meaning "including but not limited to" and may be used interchangeably therewith. As used herein, the words "or" and "and" refer to the word "and/or" and are used interchangeably therewith, unless the context clearly dictates otherwise. As used herein, the word "such as" refers to the phrase "such as but not limited to" and can be used interchangeably therewith.

可能以许多方式来实现本公开的方法和装置。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本公开的方法和装置。用于所述方法的步骤的上述顺序仅是为了进行说明,本公开的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本公开实施为记录在记录介质中的程序,这些程序包括用于实现根据本公开的方法的机器可读指令。因而,本公开还覆盖存储用于执行根据本公开的方法的程序的记录介质。The methods and apparatus of the present disclosure may be implemented in many ways. For example, the methods and apparatuses of the present disclosure may be implemented by software, hardware, firmware or any combination of software, hardware, and firmware. The above sequence of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the sequence specifically described above unless specifically stated otherwise. Furthermore, in some embodiments, the present disclosure can also be implemented as programs recorded in recording media, the programs including machine-readable instructions for realizing the method according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

还需要指出的是,在本公开的装置、设备和方法中,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本公开的等效方案。It should also be pointed out that, in the devices, equipment and methods of the present disclosure, each component or each step can be decomposed and/or reassembled. These decompositions and/or recombinations should be considered equivalents of the present disclosure.

提供所公开的方面的以上描述以使本领域的任何技术人员能够做出或者使用本公开。对这些方面的各种修改对于本领域技术人员而言是非常显而易见的,并且在此定义的一般原理可以应用于其他方面而不脱离本公开的范围。因此,本公开不意图被限制到在此示出的方面,而是按照与在此公开的原理和新颖的特征一致的最宽范围。The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

为了例示和描述的目的已经给出了以上描述。此外,此描述不意图将本公开的实施例限制到在此公开的形式。尽管以上已经讨论了多个示例方面和实施例,但是本领域技术人员将认识到其某些变型、修改、改变、添加和子组合。The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the disclosed embodiments to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims (11)

1. A tobacco tracing method based on a block chain is characterized by comprising the following steps:
obtaining a data tuple corresponding to a target tobacco product through a tracing label of the target tobacco product;
determining whether a radio frequency identification tag in the data tuple corresponds to the target tobacco product based on a target chip fingerprint in the data tuple;
in response to the radio frequency identification tag corresponding to the target tobacco product, obtaining, from a blockchain, traceback product data corresponding to the target tobacco product based on blockchain logical nodes in the data tuple;
and determining raw material information and at least one piece of processing information corresponding to the target tobacco product based on the traced product data.
2. The method of claim 1, wherein the determining whether the radio frequency identification tag in the data tuple corresponds to the target tobacco product based on the target chip fingerprint in the data tuple comprises:
determining whether a radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint;
in response to the radio frequency identification tag corresponding to the target chip fingerprint, determining that the radio frequency identification tag corresponds to the target tobacco product.
3. The method of claim 2, wherein the determining whether the radio frequency identification tag in the data tuple corresponds to the target chip fingerprint based on the target chip fingerprint comprises:
obtaining a corresponding login chip fingerprint by performing login verification on the radio frequency identification tag;
and determining whether the radio frequency identification tag corresponds to the target chip fingerprint according to whether the login chip fingerprint is matched with the target chip fingerprint.
4. The method of any one of claims 1-3, wherein said obtaining the retroactive product data corresponding to the target tobacco product from the blockchain based on the blockchain logical node in the data tuple comprises:
determining a block chain physical node corresponding to the block chain logical node based on a mapping list stored in the block chain by the block chain logical node; the mapping list stores the corresponding relation between a plurality of block chain logical nodes and a plurality of block chain physical nodes;
and obtaining the tracing product data corresponding to the target tobacco product from the block chain physical node corresponding to the block chain logical node.
5. The method according to any one of claims 1-3, wherein said determining raw material information and at least one processing information corresponding to said target tobacco product based on said retrospective product data comprises:
obtaining raw material information corresponding to the target tobacco product based on the raw material identification code in the traced product data;
obtaining at least one processing information corresponding to the target tobacco product based on at least one processing identification code in the traced product data, and obtaining at least one corresponding processing attribute information based on at least one processing information; wherein the processing attribute information includes time information and/or environment information.
6. The method of claim 5, wherein before obtaining the data tuple corresponding to the target tobacco product through the traceability label of the target tobacco product, the method further comprises:
distributing a raw material identification code for the tobacco raw material according to raw material information, and uploading the raw material information and the raw material identification code to the block chain for storage;
allocating a corresponding processing identification code to each processing information in at least one piece of processing information according to the sequence of processing the tobacco raw materials;
and uploading at least one piece of processing information and at least one piece of processing identification code to the block chain for storage.
7. The method of claim 6, further comprising, after assigning the tobacco material a material identification code according to the material information:
and generating a chip fingerprint corresponding to the tobacco raw material based on the raw material identification code.
8. The method of claim 6, wherein before uploading the at least one piece of processing information and the at least one piece of processing identifier code to the blockchain for storage, the method further comprises:
obtaining corresponding at least one piece of processing attribute information based on at least one piece of processing information, and associating each piece of processing attribute information with the corresponding piece of processing information;
the uploading at least one piece of processing information and at least one piece of processing identification code to the block chain for storage comprises:
and uploading the at least one piece of processing information, the at least one piece of processing attribute information and the at least one processing identification code to the block chain for storage.
9. A tobacco tracking device based on a block chain is characterized by comprising:
the data acquisition module is used for acquiring a data tuple corresponding to a target tobacco product through a tracing label of the target tobacco product;
a fingerprint identification module to determine whether a radio frequency identification tag in the data tuple corresponds to the target tobacco product based on a target chip fingerprint in the data tuple;
a product data module, configured to, in response to the radio frequency identification tag corresponding to the target tobacco product, obtain, from a blockchain, traceback product data corresponding to the target tobacco product based on a blockchain logical node in the data tuple;
and the information tracing module is used for determining the raw material information and at least one piece of processing information corresponding to the target tobacco product based on the traced product data.
10. An electronic device, comprising:
a memory for storing a computer program product;
a processor for executing the computer program product stored in the memory, and when executed, implementing the blockchain-based tobacco traceability method of any one of claims 1 to 8.
11. A computer readable storage medium having computer program instructions stored thereon which, when executed by a processor, implement the blockchain-based tobacco traceability method of any one of claims 1 to 8.
CN202310189609.7A 2023-02-22 2023-02-22 Tobacco traceability method, device, electronic equipment, storage medium based on block chain Pending CN115907803A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310189609.7A CN115907803A (en) 2023-02-22 2023-02-22 Tobacco traceability method, device, electronic equipment, storage medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310189609.7A CN115907803A (en) 2023-02-22 2023-02-22 Tobacco traceability method, device, electronic equipment, storage medium based on block chain

Publications (1)

Publication Number Publication Date
CN115907803A true CN115907803A (en) 2023-04-04

Family

ID=86489972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310189609.7A Pending CN115907803A (en) 2023-02-22 2023-02-22 Tobacco traceability method, device, electronic equipment, storage medium based on block chain

Country Status (1)

Country Link
CN (1) CN115907803A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118211982A (en) * 2024-05-20 2024-06-18 中服金科(山东)信息科技有限公司 Tobacco leaf raw material tracing method and system
CN119862902A (en) * 2025-03-24 2025-04-22 江苏恒达激光图像有限公司 Electronic tag wireless radio frequency intelligent recognition system based on Internet of things

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180284093A1 (en) * 2017-03-29 2018-10-04 Innit International S.C.A. Trusted Food Traceability System and Method and Sensor Network
CN110276423A (en) * 2019-04-20 2019-09-24 苏州因缇格电子科技有限公司 A kind of RFID Verification System for chip finger print of high encryption
CN110288354A (en) * 2019-05-17 2019-09-27 西安立人科技股份有限公司 It is a kind of that realization method and system server, program storage device are traced based on the commodity counterfeit prevention anti-channeling hundred million of block chain and RFID
CN111563753A (en) * 2020-04-29 2020-08-21 程烨 Query method and device for product tracing information, server and storage medium
CN112365273A (en) * 2020-11-20 2021-02-12 王智 Tobacco traceability system
CN115115382A (en) * 2022-06-29 2022-09-27 昆明理工大学 A blockchain-based tobacco product traceability system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180284093A1 (en) * 2017-03-29 2018-10-04 Innit International S.C.A. Trusted Food Traceability System and Method and Sensor Network
CN110276423A (en) * 2019-04-20 2019-09-24 苏州因缇格电子科技有限公司 A kind of RFID Verification System for chip finger print of high encryption
CN110288354A (en) * 2019-05-17 2019-09-27 西安立人科技股份有限公司 It is a kind of that realization method and system server, program storage device are traced based on the commodity counterfeit prevention anti-channeling hundred million of block chain and RFID
CN111563753A (en) * 2020-04-29 2020-08-21 程烨 Query method and device for product tracing information, server and storage medium
CN112365273A (en) * 2020-11-20 2021-02-12 王智 Tobacco traceability system
CN115115382A (en) * 2022-06-29 2022-09-27 昆明理工大学 A blockchain-based tobacco product traceability system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118211982A (en) * 2024-05-20 2024-06-18 中服金科(山东)信息科技有限公司 Tobacco leaf raw material tracing method and system
CN119862902A (en) * 2025-03-24 2025-04-22 江苏恒达激光图像有限公司 Electronic tag wireless radio frequency intelligent recognition system based on Internet of things

Similar Documents

Publication Publication Date Title
EP3262785B1 (en) Tracking unitization occurring in a supply chain
US20260010750A1 (en) Rf tag operating system with iot connector core
US20160164884A1 (en) Cryptographic verification of provenance in a supply chain
US11188969B2 (en) Data-analysis-based validation of product review data and linking to supply chain record data
CN109255622B (en) Traceable anti-fake data storage system
Rizwan et al. An internet of things (IoT) based block chain technology to enhance the quality of supply chain management (SCM)
AU2020203178A1 (en) A Machine Type Communication System or Device for Recording Supply Chain Information on a Distributed Ledger in a Peer to Peer Network
CN113888064B (en) Product quality tracing method, device and equipment in food and beverage industry
CN108694594A (en) Commodity source tracing method and device, electronic equipment based on block chain
US11854020B2 (en) Multi-dimensional approach to anti-counterfeiting across different industries
CN115907803A (en) Tobacco traceability method, device, electronic equipment, storage medium based on block chain
CN114819862A (en) Cold chain logistics traceability service method, system and storage medium
US20230334609A1 (en) Information management method and non-transitory, computer readable, tangible storage medium storing information management program
US20220123939A1 (en) Relational Product Authentication System
CN106339498A (en) Method, device and system for synchronizing data
US12052230B2 (en) Machine learning techniques for object authentication
CN114462733A (en) Order processing method and device based on order management platform and order management platform
Pal et al. The revolutionary role of blockchain technology in the agri-food sector focusing on the food supply chain
CN115941692B (en) Information identification system, equipment and medium based on master-slave block chain storage mode
CN115423486A (en) Blockchain-based vending system and method
CN114741738A (en) Tracing data processing method and device based on block chain, electronic equipment and medium
CN117593023B (en) Commodity tracing method, system, device and medium based on distributed network
CN103279825A (en) Asynchronous integrating system of electronic resume sub system and service system on basis of event
CN113095815B (en) Commodity transaction method and system, storage medium and platform
US20250156864A1 (en) Method and device for commodity anti-counterfeiting and tracing based on blockchain and elastic compute service

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20230404

RJ01 Rejection of invention patent application after publication