Solid beverage package inquiring and tracing method and system

By using traceability chips and Merkle tree technology in solid beverage packaging, real-time monitoring and abnormal reminder of solid beverage packaging process is achieved, solving the problem of difficulty in timely discovering abnormal packaging process in the existing technology, and improving product quality and production efficiency.

CN119515412AInactive Publication Date: 2025-02-25安徽伟宏食品有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411663168.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to achieve real-time monitoring and abnormal reminder during the packaging process of solid beverages, which leads to difficult to detect abnormal problems during the packaging process in a timely manner, increasing the risk of product quality not meeting standards.

Method used

A detachable traceability chip is used, which contains the main area and the secondary area. The core traceability information and auxiliary traceability information are stored in the main area and the secondary area respectively. Multi-layer checksum adaptive data repair of data is achieved by building Merkle tree and generating root hash values.

Benefits of technology

Real-time monitoring and abnormal alarms during the packaging process of solid beverages are realized. Quality inspectors can promptly detect abnormal problems during the packaging process, improve product quality stability and production efficiency, and reduce product defect rate and recall costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515412A_ABST
    Figure CN119515412A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of solid beverage package information tracing, and discloses a solid beverage package query tracing method and system. The method comprises the following steps: setting a traceability chip main area and a plurality of traceability chip auxiliary areas; constructing a Merkle tree, generating a root hash value, and storing the root hash value in the main area of the tracing chip; after a query request is received, verifying data consistency and an environment state through a multi-layer verification module; and when abnormal data is detected, self-adaptive data recovery is started. The technical problem that in the prior art, data consistency and environment monitoring in the packaging process are insufficient, and especially in the packaging process of solid beverages, effective query and tracing cannot be achieved under the condition that environment conditions are prone to change is solved. According to the method, the core information and the environmental data are combined and a multi-layer verification structure is constructed, so that complete tracing in the packaging process is realized, query tracing of key environmental factors is covered, and the safety of solid beverage products is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of solid beverage packaging information tracing, and in particular relates to a solid beverage packaging query tracing method and system. Background Art

[0002] At present, the traceability of solid beverage products mainly focuses on the basic information records during storage and transportation, while the monitoring and quality traceability of the packaging process are relatively weak. Especially for solid beverage products, environmental conditions such as temperature, humidity, and vibration during the packaging process may directly affect product quality. For example, too high or too low temperature may change the physical properties of solid beverages, too high humidity may cause the product to be damp or the performance of the packaging material to deteriorate, and vibration during the packaging process may cause powder agglomeration or packaging damage, and also cause uneven usage. These problems are usually difficult to discover in real time through traditional traceability methods, thereby increasing the risk of substandard product quality before leaving the factory. In the prior art, although some of them can record the packaging environment, it is difficult to achieve real-time monitoring and abnormal reminders. Quality inspectors cannot promptly discover abnormal problems in the packaging process and take effective measures, which may not only cause some defective products to enter the subsequent links, but also increase the company's costs and the risk of product recalls. Therefore, there is an urgent need for a traceability method that can record and monitor environmental data of the packaging process in real time, so that quality inspectors can discover potential problems in real time in the background, adjust the packaging in time or remove abnormal products, thereby improving the stability of product quality and production efficiency. Summary of the invention

[0003] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to propose a solid beverage packaging query and traceability method, aiming to solve the deficiencies in the prior art in data consistency and storage environment monitoring, especially in the solid beverage packaging process, where environmental conditions are prone to change and the technical problem of being unable to achieve data repair and effective query and traceability.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solution: The present invention provides a solid beverage packaging query and traceability method,

[0005] The solid beverage packaging query and tracing method comprises:

[0006] Step S10: a detachable traceability chip is arranged on the outside of the solid beverage package, wherein the traceability chip includes a traceability chip main area and a plurality of traceability chip sub-areas, and the core traceability information is stored in the traceability chip main area, wherein the core traceability information includes the production date D, the batch number B, and the production line number L; the auxiliary traceability information is stored in the traceability chip sub-area, wherein the auxiliary traceability information includes the temperature information T, the humidity information M, and the vibration information V;

[0007] Step S20: construct a Merkle tree based on the core traceability information and the auxiliary traceability information, generate a root hash value R, and store the root hash value R in the main area of ​​the traceability chip;

[0008] The specific process of constructing a Merkle tree includes:

[0009] Generate a separate hash value for each core traceability information in the main area of ​​the traceability chip, including the hash value H(D) of the production date, the hash value H(B) of the batch number, and the hash value H(L) of the production line number;

[0010] Generate segmented hash values ​​for the auxiliary traceability information in the secondary area of ​​the traceability chip: the hash value H(T) of the temperature data, the hash value H(M) of the humidity data, and the hash value H(V) of the vibration data, and combine the segmented hash values ​​into a complete hash value H(S), where H(S) = H(H(T)+H(M)+H(V));

[0011] The hash value H(D) of the production date, the hash value H(B) of the batch number, the hash value H(L) of the production line number, and the H(S) in each traceability chip sub-area are used as leaf nodes of the Merkle tree;

[0012] Calculate the root hash value R of the root node. The calculation formula is:

[0013]

[0014] Where n is the number of traceability chip sub-regions, j is the jth traceability chip sub-region, H(S j ) is the complete hash value of the jth traceability chip sub-area;

[0015] Step S30: After receiving the query request, perform multi-layer verification on the traceability data:

[0016] First level verification: Verify the consistency of multi-level hash verification auxiliary traceability information;

[0017] The second level of verification: compare and verify the auxiliary traceability information with the set security threshold;

[0018] When the auxiliary traceability information is inconsistent or exceeds the safety range, "abnormal traceability status" is marked in the auxiliary traceability information;

[0019] Step S40: When the mark "abnormal tracing state" is detected during the query process, the adaptive data repair method is started, and the timestamp of the main area of ​​the tracing chip is set to T core , the timestamp set of the traceability chip sub-area is T aux ={t1,t2,...t n}, according to the timestamp of the main area of ​​the traceability chip and the timestamp of the secondary area of ​​the traceability chip, the core traceability information and auxiliary traceability information corresponding to the maximum timestamp are automatically selected for repair, and the repaired traceability data and the auxiliary traceability information are used together to generate a complete query report;

[0020] Among them, t1, t2, ... t n The timestamp information attached to each auxiliary traceability information data segment; the complete query report contains the auxiliary traceability information marked with "abnormal traceability status".

[0021] Preferably, a Merkle tree is constructed according to the core traceability information and the auxiliary traceability information, and a root hash value R is generated, and the root hash value R is stored in the main area of ​​the traceability chip;

[0022] The specific process of constructing a Merkle tree includes:

[0023] Generate a separate hash value for each core traceability information in the main area of ​​the traceability chip, including the hash value H(D) of the production date, the hash value H(B) of the batch number, and the hash value H(L) of the production line number;

[0024] Generate segmented hash values ​​for the auxiliary traceability information in the secondary area of ​​the traceability chip: the hash value H(T) of the temperature data, the hash value H(M) of the humidity data, and the hash value H(V) of the vibration data, and combine the segmented hash values ​​into a complete hash value H(S), where H(S) = H(H(T)+H(M)+H(V));

[0025] The hash value H(D) of the production date, the hash value H(B) of the batch number, the hash value H(L) of the production line number, and the H(S) in each traceability chip sub-area are used as leaf nodes of the Merkle tree;

[0026] Calculate the root hash value R of the root node. The calculation formula is:

[0027]

[0028] Where n is the number of traceability chip sub-regions, j is the jth traceability chip sub-region, H(S j ) is the complete hash value of the j-th traceability chip sub-area.

[0029] Preferably, in step S20, H is a hash operation, and the specific hash algorithm used is SHA-256.

[0030] Preferably, in step S30, the step of verifying the consistency of the multi-level hash verification data includes:

[0031] The overall check code is read from the main area of ​​the traceability chip, and the segmented check code is read from the sub-area of ​​the traceability chip. The root hash value calculation method of step S20 is used to obtain the real-time calculated root hash value R2, and the real-time calculated root hash value R2 is compared with the root hash value R stored in the main area of ​​the traceability chip. If R is not equal to R2, it is determined that the data is inconsistent.

[0032] Preferably, in step S30, the step of comparing and verifying the auxiliary traceability information with a set safety threshold includes:

[0033] Read the temperature information T, humidity information Y and vibration information U in the auxiliary traceability information, and set the temperature threshold T kth , humidity threshold Y kth and the vibration threshold U kth ;

[0034] When T>T kth or Y>Y kth orU>U kth When , it is judged that the auxiliary traceability information exceeds the safety range.

[0035] Preferably, in step S40, the display interface of the query result is a visual tracing chart.

[0036] Preferably, in step S10, the tracing chip sub-area transmits data via Bluetooth low energy consumption.

[0037] The present invention also provides a solid beverage packaging query and tracing system comprising:

[0038] A data storage module is used to set a detachable traceability chip on the outside of the solid beverage package. The traceability chip includes a traceability chip main area and multiple traceability chip sub-areas. The core traceability information is stored in the traceability chip main area. The core traceability information includes production date D, batch number B, and production line number L; the auxiliary traceability information is stored in the traceability chip sub-area. The auxiliary traceability information includes temperature information T, humidity information M, and vibration information V;

[0039] The data verification module is used to construct a Merkle tree based on the core traceability information and the auxiliary traceability information, generate a root hash value R, and store the root hash value R in the main area of ​​the traceability chip;

[0040] The specific process of constructing a Merkle tree includes:

[0041] Generate a separate hash value for each core traceability information in the main area of ​​the traceability chip, including the hash value H(D) of the production date, the hash value H(B) of the batch number, and the hash value H(L) of the production line number;

[0042] Generate segmented hash values ​​for the auxiliary traceability information in the secondary area of ​​the traceability chip: the hash value H(T) of the temperature data, the hash value H(M) of the humidity data, and the hash value H(V) of the vibration data, and combine the segmented hash values ​​into a complete hash value H(S), where H(S) = H(H(T)+H(M)+H(V));

[0043] The hash value H(D) of the production date, the hash value H(B) of the batch number, the hash value H(L) of the production line number, and the H(S) in each traceability chip sub-area are used as leaf nodes of the Merkle tree;

[0044] Calculate the root hash value R of the root node. The calculation formula is:

[0045]

[0046] Where n is the number of traceability chip sub-regions, j is the jth traceability chip sub-region, H(S j ) is the complete hash value of the jth traceability chip sub-area;

[0047] The multi-layer verification module is used to perform multi-layer verification on the traceability data after receiving the query request:

[0048] First level verification: Verify the consistency of multi-level hash verification auxiliary traceability information;

[0049] The second level of verification: compare and verify the auxiliary traceability information with the set security threshold;

[0050] When the auxiliary traceability information is inconsistent or exceeds the safety range, "abnormal traceability status" is marked in the auxiliary traceability information;

[0051] The query processing module is used to start the adaptive data repair method when the mark "abnormal traceability state" is detected during the query process, and the timestamp of the main area of ​​the traceability chip is set to T core , the timestamp set of the traceability chip sub-area is T aux ={t1,t2,...t n}, according to the timestamp of the main area of ​​the traceability chip and the timestamp of the secondary area of ​​the traceability chip, the core traceability information and auxiliary traceability information corresponding to the maximum timestamp are automatically selected for repair, and the repaired traceability data and the auxiliary traceability information are used together to generate a complete query report;

[0052] Among them, t1, t2, ... t n The timestamp information attached to each auxiliary traceability information data segment; the complete query report contains the auxiliary traceability information marked with "abnormal traceability status".

[0053] The present invention also provides a solid beverage packaging query and tracing device, comprising a memory, a processor, and a solid beverage packaging query and tracing program stored in the memory and executable on the processor. When the solid beverage packaging query and tracing program is executed by the processor, the solid beverage packaging query and tracing method is implemented.

[0054] The present invention also provides a computer program product, including a solid beverage packaging query and tracing program, and the solid beverage packaging query and tracing program implements the solid beverage packaging query and tracing method when executed by a processor.

[0055] The beneficial effect of the present invention is that compared with the deficiencies in the prior art in data consistency and environmental monitoring during the packaging process, especially in the packaging process of solid beverages, the technical problem of being unable to achieve effective query and traceability under the condition that the environmental conditions are easy to change. The present invention provides a solid beverage packaging query and traceability method and system, which realizes real-time monitoring and abnormal alarm during the packaging process. The quality inspector can directly obtain the changes in key parameters such as temperature, humidity and vibration in the background, and respond quickly when problems arise, thereby significantly improving the quality control ability in the packaging process. This method not only reduces the defective rate of products, but also reduces the quality risk and recall cost of subsequent processes, providing enterprises with more efficient and intelligent production management tools. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 The figure is a flow chart of a first embodiment of a method for querying and tracing solid beverage packaging according to the present invention.

[0058] Figure 2 The present invention is a schematic diagram of equipment for a solid beverage packaging query and tracing method. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] Embodiment 1: Figure 1, which is a flow chart of a first embodiment of a method for querying and tracing solid beverage packaging of the present invention, provides a first embodiment of a method for querying and tracing solid beverage packaging of the present invention.

[0061] In a first embodiment, the solid beverage packaging query and tracing method includes:

[0062] Step S10: a detachable traceability chip is arranged on the outside of the solid beverage package, wherein the traceability chip includes a traceability chip main area and a plurality of traceability chip sub-areas, and the core traceability information is stored in the traceability chip main area, wherein the core traceability information includes the production date D, the batch number B, and the production line number L; the auxiliary traceability information is stored in the traceability chip sub-area, wherein the auxiliary traceability information includes the temperature information T, the humidity information M, and the vibration information V;

[0063] It should be noted that the traceability chip uses a micro NFC snap-on chip based on RFID technology. It is installed on a corner of the packaging material during the packaging process, removed and stored after the entire packaging process is completed, and the data recorded by the chip is uploaded to the traditional MySQL database for initialization, and then fed back to the starting end of the packaging process for recycling. The temperature information T, humidity information M and vibration information V are collected by sensors at the solid position on the packaging production line, and the sensors are equipped with NFC reading and writing functions.

[0064] It should be noted that the installation and information storage of the traceability chip main area and traceability chip sub-area are completed during the packaging process. The traceability chip main area is given core traceability information such as production date, batch number, production line number, etc. during packaging to ensure the unique identification of each product.

[0065] It should be understood that by recording temperature data, the background can monitor the temperature changes of solid beverages during the packaging process. For example, if the storage temperature of a batch of beverages exceeds the set safety range, such as too high temperature causing dissolution or too low temperature causing changes in physical properties, it can be marked as "abnormal traceability status" when querying traceability, thereby reminding quality inspectors that the product may have quality problems; humidity monitoring can help identify situations where the packaging is damp or too dry. For example, too high humidity may cause damage to the packaging material or moisture absorption of the internal beverage, while too low humidity may affect the powder fluidity of the beverage, providing a reference for quality control; and vibration data can reflect the bumps and impacts during the packaging process. For example, excessive vibration may cause damage to the packaging or agglomeration of the beverage powder, and will also increase the error between the actual net content of the solid beverage and the standard net content. The background can promptly feedback abnormal conditions in the packaging process to the quality inspectors through the vibration information recorded in the secondary area of ​​the traceability chip.

[0066] Step S20: construct a Merkle tree based on the core traceability information and the auxiliary traceability information, generate a root hash value R, and store the root hash value R in the main area of ​​the traceability chip;

[0067] The specific process of constructing a Merkle tree includes:

[0068] Generate a separate hash value for each core traceability information in the main area of ​​the traceability chip, including the hash value H(D) of the production date, the hash value H(B) of the batch number, and the hash value H(L) of the production line number;

[0069] Generate segmented hash values ​​for the auxiliary traceability information in the secondary area of ​​the traceability chip: the hash value H(T) of the temperature data, the hash value H(M) of the humidity data, and the hash value H(V) of the vibration data, and combine the segmented hash values ​​into a complete hash value H(S), where H(S) = H(H(T)+H(M)+H(V));

[0070] The hash value H(D) of the production date, the hash value H(B) of the batch number, the hash value H(L) of the production line number, and the H(S) in each traceability chip sub-area are used as leaf nodes of the Merkle tree;

[0071] Calculate the root hash value R of the root node. The calculation formula is:

[0072]

[0073] Where n is the number of traceability chip sub-regions, j is the jth traceability chip sub-region, H(S j ) is the complete hash value of the jth traceability chip sub-area;

[0074] It should be noted that the Merkle tree construction process in this step is intended to perform multi-level integrity verification on the core traceability information and auxiliary traceability information. By generating hash values ​​for the information stored in the main area of ​​the traceability chip and the secondary area of ​​the traceability chip, and using these hash values ​​as leaf nodes of the Merkle tree, it can be ensured that each traceability information can be verified individually. In addition, the generated root hash value R is stored in the main area of ​​the traceability chip so that global data consistency verification can be performed during query to ensure that all traceability information has not been tampered with.

[0075] It is understandable that by combining the core traceability information and the auxiliary traceability information into a complete hash structure, not only the security of the traceability data is enhanced, but also the background can quickly verify the integrity of any data. The hierarchical structure of the Merkle tree ensures that even if a certain data changes, the root hash value will change accordingly, thus indicating that the data integrity is abnormal.

[0076] For example, if a batch of beverage products generates the following information during the packaging process:

[0077] The production date is "2023-11-15";

[0078] The batch number is "A12345";

[0079] The production line number is "Line1";

[0080] The storage environment monitoring information is temperature T = 20°C, humidity M = 50%, and vibration V = 0.5g;

[0081] When generating the Merkle tree, the hash values ​​H(D), H(B), H(L), H(T), H(M), and H(V) of each information item are calculated in turn, and combined to generate the complete hash value H(S) of each traceability chip sub-area. Finally, all these hash values ​​are combined to generate the root hash value R, which is stored in the traceability chip main area as the unique check code of the overall traceability information, so as to verify the integrity of the data in the subsequent query process.

[0082] Step S30: After receiving the query request, perform multi-layer verification on the traceability data:

[0083] First level verification: Verify the consistency of multi-level hash verification auxiliary traceability information;

[0084] The second level of verification: compare and verify the auxiliary traceability information with the set security threshold;

[0085] When the auxiliary traceability information is inconsistent or exceeds the safety range, "abnormal traceability status" is marked in the auxiliary traceability information;

[0086] It should be noted that the multi-layer verification process of step S30 is divided into two parts: the first layer verification and the second layer verification. The first layer verification verifies the data consistency of the auxiliary traceability information through multi-level hashing to ensure that all data has not been tampered with during the traceability process. The second layer verification compares and verifies the auxiliary traceability information with the set security threshold to determine whether the product is in a safe environment during the packaging process.

[0087] It is understandable that the safety threshold of auxiliary traceability information is mainly used to monitor key environmental parameters of products during packaging, such as temperature, humidity and vibration. If any data is monitored to exceed the set threshold, such as too high temperature or too low humidity, the product will be marked as "abnormal traceability status" to remind quality inspectors that the product may have storage safety risks.

[0088] For example, suppose that during the query process, the temperature data stored in the secondary area of ​​the traceability chip is detected to be 30°C, while the set safety temperature threshold is 25°C. When the temperature exceeds the safety range, the second layer of verification will fail, and the "abnormal traceability status" will be marked in the query result, and a prompt message of abnormal temperature will be displayed. In this way, quality inspectors can promptly learn that the batch of products may have experienced a high temperature environment during the packaging process, thus affecting product quality.

[0089] Step S40: When the mark "abnormal tracing state" is detected during the query process, the adaptive data repair method is started, and the timestamp of the main area of ​​the tracing chip is set to T core , the timestamp set of the traceability chip sub-area is T aux ={t1,t2,...t n}, according to the timestamp of the main area of ​​the traceability chip and the timestamp of the secondary area of ​​the traceability chip, the core traceability information and auxiliary traceability information corresponding to the maximum timestamp are automatically selected for repair, and the repaired traceability data and the auxiliary traceability information are used together to generate a complete query report;

[0090] Among them, t1, t2, ... t n The timestamp information attached to each auxiliary traceability information data segment; the complete query report contains the auxiliary traceability information marked with "abnormal traceability status".

[0091] It should be noted that when a state marked as "abnormal traceability status" is detected during the query process, the adaptive data repair method will automatically start to ensure the integrity and reliability of the traceability data. This method selects the data with the latest timestamp for repair, thereby ensuring that the traceability information closest to the current state is provided without affecting the accuracy of the data.

[0092] It is understandable that during the data repair process, the corresponding core traceability information and auxiliary traceability information will be selected according to the maximum timestamp to fill in the abnormal data. This adaptive data repair mechanism can effectively solve the data inconsistency problem caused by environmental changes or data corruption, and generate a complete query report. The "abnormal traceability status" will be marked in the report, and the possible abnormal reasons will be displayed so that the quality inspectors can know. For example, suppose that the temperature data of a batch of products in the secondary area of ​​the traceability chip is detected to be out of the safe range, which is marked as "abnormal traceability status". When the repair is started, the timestamp of the main area of ​​the traceability chip and the timestamp set of the secondary chip will be checked first. The core traceability information and auxiliary traceability information corresponding to the maximum timestamp will be used to generate a complete traceability report after the repair, and the relevant abnormal information will be marked. In this way, quality inspectors can obtain the latest and most complete traceability information and know the potential risks of the product in the packaging process.

[0093] In addition, the solid beverage packaging query and tracing system provided by the present invention adopts a solid beverage packaging query and tracing method in the above embodiment, which can solve the technical problem of solid beverage packaging query and tracing. Compared with the prior art, the beneficial effects of the solid beverage packaging query and tracing system provided by the present invention are the same as the beneficial effects of the solid beverage packaging query and tracing method provided by the above embodiment, and the other technical features of the solid beverage packaging query and tracing system are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0094] The present invention provides a solid beverage packaging query and traceability device, please refer to Figure 2, a solid beverage packaging query and tracing device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a solid beverage packaging query and tracing method in the above-mentioned embodiment 1. A solid beverage packaging query and tracing device in the embodiment of the present invention may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and solid terminals such as digital TVs, desktop computers, etc. A solid beverage packaging query and tracing device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. A solid beverage packaging query and tracing device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of a solid beverage packaging query and tracing device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow a solid beverage packaging query and traceability device to communicate wirelessly or wired with other devices to exchange data. Although a solid beverage packaging query and traceability device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0095] The present invention also provides a computer program product, including a computer program, which implements the steps of the above-mentioned method for querying and tracing solid beverage packaging when executed by a processor. The computer program product provided by the present invention can solve the technical problem of querying and tracing solid beverage packaging. Compared with the prior art, the beneficial effects of the computer program product provided by the present invention are the same as the beneficial effects of the method for querying and tracing solid beverage packaging provided by the above-mentioned embodiment, which will not be repeated here.

[0096] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present invention are executed.

[0097] It should be understood that the various parts disclosed in the present invention can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0098] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A solid beverage packaging query and traceability method, characterized in that: Methods include: Step S10: a detachable traceability chip is arranged on the outside of the solid beverage package, wherein the traceability chip includes a traceability chip main area and a plurality of traceability chip sub-areas, and the core traceability information is stored in the traceability chip main area, wherein the core traceability information includes the production date D, the batch number B, and the production line number L; the auxiliary traceability information is stored in the traceability chip sub-area, wherein the auxiliary traceability information includes the temperature information T, the humidity information M, and the vibration information V; Step S20: construct a Merkle tree based on the core traceability information and the auxiliary traceability information, generate a root hash value R, and store the root hash value R in the main area of ​​the traceability chip; The specific process of constructing a Merkle tree includes: Generate a separate hash value for each core traceability information in the main area of ​​the traceability chip, including the hash value H(D) of the production date, the hash value H(B) of the batch number, and the hash value H(L) of the production line number; Generate segmented hash values ​​for the auxiliary traceability information in the secondary area of ​​the traceability chip: the hash value H(T) of the temperature data, the hash value H(M) of the humidity data, and the hash value H(V) of the vibration data, and combine the segmented hash values ​​into a complete hash value H(S), where H(S) = H(H(T)+H(M)+H(V)); The hash value H(D) of the production date, the hash value H(B) of the batch number, the hash value H(L) of the production line number, and the H(S) in each traceability chip sub-area are used as leaf nodes of the Merkle tree; Calculate the root hash value R of the root node. The calculation formula is: Where n is the number of traceability chip sub-regions, j is the jth traceability chip sub-region, H(S j ) is the complete hash value of the jth traceability chip sub-area; Step S30: After receiving the query request, perform multi-layer verification on the traceability data: First level verification: Verify the consistency of multi-level hash verification auxiliary traceability information; The second level of verification: compare and verify the auxiliary traceability information with the set security threshold; When the auxiliary traceability information is inconsistent or exceeds the safety range, "abnormal traceability status" is marked in the auxiliary traceability information; Step S40: When the mark "abnormal tracing state" is detected during the query process, the adaptive data repair method is started, and the timestamp of the main area of ​​the tracing chip is set to T core , the timestamp set of the traceability chip sub-area is T aux ={t1,t2,...t n }, according to the timestamp of the main area of ​​the traceability chip and the timestamp of the secondary area of ​​the traceability chip, the core traceability information and auxiliary traceability information corresponding to the maximum timestamp are automatically selected for repair, and the repaired traceability data and the auxiliary traceability information are used together to generate a complete query report; Among them, t1, t2, ... t n The timestamp information attached to each auxiliary traceability information data segment; the complete query report contains the auxiliary traceability information marked with "abnormal traceability status".

2. A solid beverage packaging query and tracing method as claimed in claim 1, characterized in that: In step S10, the auxiliary traceability information is collected by an external sensor and stored in the secondary area of ​​the traceability chip in json data segment format in chronological order, and each auxiliary traceability information data segment is accompanied by timestamp information.

3. A solid beverage packaging query and tracing method as claimed in claim 1, characterized in that: In step S20, H is a hash operation, and the specific hash algorithm used is SHA-256.

4. A solid beverage packaging query and tracing method as claimed in claim 1, characterized in that: In step S30, the step of verifying the consistency of the multi-level hash verification data includes: The overall check code is read from the main area of ​​the traceability chip, and the segmented check code is read from the sub-area of ​​the traceability chip. The root hash value calculation method of step S20 is used to obtain the real-time calculated root hash value R2, and the real-time calculated root hash value R2 is compared with the root hash value R stored in the main area of ​​the traceability chip. If R is not equal to R2, it is determined that the data is inconsistent.

5. A solid beverage packaging query and tracing method as claimed in claim 1, characterized in that: In step S30, the step of comparing and verifying the auxiliary traceability information with the set safety threshold includes: Read the temperature information T, humidity information Y and vibration information U in the auxiliary traceability information, and set the temperature threshold T kth , humidity threshold Y kth and the vibration threshold U ktk ; When T>T kth or Y>Y kth orU>U kth When , it is judged that the auxiliary traceability information exceeds the safety range.

6. A solid beverage packaging query and tracing method as claimed in claim 1, characterized in that: In step S40, the query result display interface is a visual tracing chart.

7. A solid beverage packaging query and tracing method as claimed in claim 1, characterized in that: In step S10, the secondary area of ​​the traceability chip transmits data via Bluetooth low energy.

8. A solid beverage packaging query and traceability system, characterized in that: The solid beverage packaging query and traceability system comprises: A data storage module is used to set a detachable traceability chip on the outside of the solid beverage package. The traceability chip includes a traceability chip main area and multiple traceability chip sub-areas. The core traceability information is stored in the traceability chip main area. The core traceability information includes production date D, batch number B, and production line number L; the auxiliary traceability information is stored in the traceability chip sub-area. The auxiliary traceability information includes temperature information T, humidity information M, and vibration information V; The data verification module is used to construct a Merkle tree based on the core traceability information and the auxiliary traceability information, generate a root hash value R, and store the root hash value R in the main area of ​​the traceability chip; The specific process of constructing a Merkle tree includes: Generate a separate hash value for each core traceability information in the main area of ​​the traceability chip, including the hash value H(D) of the production date, the hash value H(B) of the batch number, and the hash value H(L) of the production line number; Generate segmented hash values ​​for the auxiliary traceability information in the secondary area of ​​the traceability chip: the hash value H(T) of the temperature data, the hash value H(M) of the humidity data, and the hash value H(V) of the vibration data, and combine the segmented hash values ​​into a complete hash value H(S), where H(S) = H(H(T)+H(M)+H(V)); The hash value H(D) of the production date, the hash value H(B) of the batch number, the hash value H(L) of the production line number, and the H(S) in each traceability chip sub-area are used as leaf nodes of the Merkle tree; Calculate the root hash value R of the root node. The calculation formula is: Where n is the number of traceability chip sub-regions, j is the jth traceability chip sub-region, H(S j ) is the complete hash value of the jth traceability chip sub-area; The multi-layer verification module is used to perform multi-layer verification on the traceability data after receiving the query request: First level verification: Verify the consistency of multi-level hash verification auxiliary traceability information; The second level of verification: compare and verify the auxiliary traceability information with the set security threshold; When the auxiliary traceability information is inconsistent or exceeds the safety range, "abnormal traceability status" is marked in the auxiliary traceability information; The query processing module is used to start the adaptive data repair method when the mark "abnormal traceability state" is detected during the query process, and the timestamp of the main area of ​​the traceability chip is set to T core , the timestamp set of the traceability chip sub-area is T aux ={t1,t2,...t n }, according to the timestamp of the main area of ​​the traceability chip and the timestamp of the secondary area of ​​the traceability chip, the core traceability information and auxiliary traceability information corresponding to the maximum timestamp are automatically selected for repair, and the repaired traceability data and the auxiliary traceability information are used together to generate a complete query report; Among them, t1, t2, ... t n The timestamp information attached to each auxiliary traceability information data segment; the complete query report contains the auxiliary traceability information marked with "abnormal traceability status".

9. A solid beverage packaging query and traceability device, characterized in that: The solid beverage packaging query and tracing equipment includes: A memory, a processor, and a solid beverage packaging query and tracing program stored in the memory and executable on the processor, wherein the solid beverage packaging query and tracing program, when executed by the processor, implements the solid beverage packaging query and tracing method described in any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product comprises a solid beverage packaging query and tracing program, and when the solid beverage packaging query and tracing program is executed by a processor, the solid beverage packaging query and tracing method described in any one of claims 1 to 7 is implemented.