CN-122022145-A - Packaging two-dimensional code management and control method, device, equipment and medium
Abstract
The invention provides a method, a device, equipment and a medium for managing and controlling a packaged two-dimensional code, and relates to the technical field of computers, wherein the method comprises the steps of responding to an activation request of a target two-dimensional code, and inquiring state information of the target two-dimensional code in a database; under the condition that the target two-dimensional code is determined to be in a state to be activated based on the state information, the state information of the target two-dimensional code in the database is updated to be in an activated state, and an approval use instruction is sent to the production enterprise side; and generating an abnormal alarm instruction under the condition that the target two-dimensional code is not in the state to be activated based on the state information. The full-link closed loop control process from the source supplier to the production line is constructed through the combined package supply end and the production enterprise end, so that the potential safety hazards that the two-dimension code is possibly copied, leaked and illegally stolen after leaving a factory and before activation are fundamentally solved, and the control safety of the full life cycle of the two-dimension code is improved.
Inventors
- GUO YONGFEI
- ZHENG JIONG
- LI XIAOYAN
- WANG MIN
- YAN LINGCHUN
- LIU ZHIQIANG
Assignees
- 内蒙古蒙牛乳业(集团)股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260123
Claims (10)
- 1. The two-dimensional code management and control method for the package is characterized by comprising the following steps of: Inquiring state information of a target two-dimensional code in a database in response to an activation request of the target two-dimensional code, wherein the activation request of the target two-dimensional code is generated after a production enterprise terminal collects two-dimensional code information on a to-be-used package when the to-be-used package of a target batch is put into a production line; updating the state information of the target two-dimensional code in the database to an activated state under the condition that the target two-dimensional code is determined to be in the to-be-activated state based on the state information, and sending an approval use instruction to the production enterprise side; the construction process of the database comprises the following steps: receiving a plurality of two-dimensional code data acquired by a package supply end in the package coding process of the target batch; And verifying the two-dimensional code data, marking the two-dimensional code data passing the verification as a state to be activated, and constructing the database based on the marked two-dimensional code data.
- 2. The method for two-dimensional code management and control of a package according to claim 1, further comprising, before the verifying the two-dimensional code data: acquiring a first moment when the package supply end executes coding operation in the package coding process of the target batch, and a second moment when the production enterprise end puts the packages to be used of the target batch into a production line, and determining a time interval between the first moment and the second moment; Acquiring physical distance information of the package supply end and the production enterprise end, and determining logistics time based on the physical distance information and the logistics speed; And determining that the difference value between the logistics time consumption and the time interval is smaller than a preset interval threshold value.
- 3. The method for two-dimensional code management and control of a package according to claim 1, wherein the receiving package supply end further comprises, before the plurality of two-dimensional code data collected in the process of the package coding of the target lot: Responding to a connection request of a package supply end, and verifying identity information of the package supply end; after the authentication of the packaging supply end is confirmed to pass, an encryption transmission channel is established based on the session key, and the encryption transmission channel is used for transmitting the two-dimensional code data.
- 4. The method for two-dimensional code management and control of packaging according to claim 3, wherein the two-dimensional code data is obtained by digitally signing the packaging data based on the batch identifier received by the encryption transmission channel and encrypting the obtained signature data based on a public key; the packing data is obtained by packing the original two-dimension codes acquired in the packing coding process of the target batch and the hash value of the original two-dimension codes.
- 5. The method for two-dimensional code management and control of a package according to claim 4, wherein the verifying the two-dimensional code data comprises: decrypting the two-dimensional code data based on a private key to obtain decrypted data, wherein the private key corresponds to the public key; And verifying the decrypted data based on the batch identification of the target batch, analyzing the packaged data from the decrypted data after the verification passes, and executing a verification process based on the original two-dimensional code separated from the packaged data and the hash value of the original two-dimensional code.
- 6. The method of two-dimensional code management and control of a package of claim 1, further comprising: Determining the number of the two-dimensional codes in the to-be-activated state in the database; Determining the number of finished inventory at the production enterprise end based on the number of the two-dimensional codes; And determining production progress information of the target batch based on the number of finished inventory and the total order quantity of the target batch.
- 7. Two-dimensional code management and control device of packing, its characterized in that includes: the system comprises a query module, a database, a storage module and a storage module, wherein the query module is used for responding to an activation request of a target two-dimension code and querying state information of the target two-dimension code in the database; The management and control module is used for updating the state information of the target two-dimensional code in the database into an activated state when the target two-dimensional code is determined to be in the state to be activated based on the state information, and sending an approval use instruction to the production enterprise side; the construction process of the database comprises the following steps: receiving a plurality of two-dimensional code data acquired by a package supply end in the package coding process of the target batch; And verifying the two-dimensional code data, marking the two-dimensional code data passing the verification as a state to be activated, and constructing the database based on the marked two-dimensional code data.
- 8. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the packaged two-dimensional code management method of any one of claims 1 to 6 when the computer program is executed by the processor.
- 9. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the packaged two-dimensional code management method of any of claims 1 to 6.
- 10. A computer program product comprising a computer program which, when executed by a processor, implements the two-dimensional code management method of packaging as claimed in any one of claims 1 to 6.
Description
Packaging two-dimensional code management and control method, device, equipment and medium Technical Field The invention relates to the technical field of computers, in particular to a method, a device, equipment and a medium for managing and controlling a two-dimensional code of a package. Background The current food industry widely applies a one-object one-code technology to realize the functions of product tracing, anti-counterfeiting and the like, but the prior art focuses on a code scanning verification link of a terminal consumer, and lacks source management and control of an upstream package supply link. In the existing method, after a two-dimension code is printed at a package supply end, due to lack of source management and control of an upstream package supply link, the risk that the two-dimension code can be leaked in advance and illegally stolen exists, and then counterfeit products are caused to flow into the market. How to improve the safety of the package source to the two-dimension code management and control of the package supply end is an important issue to be solved in the industry. Disclosure of Invention The invention provides a two-dimensional code management and control method, device, equipment and medium for packaging, which are used for improving the safety of a packaging source on two-dimensional code management and control of a packaging supply end. The invention provides a two-dimensional code management and control method for packaging, which comprises the following steps: Inquiring state information of a target two-dimensional code in a database in response to an activation request of the target two-dimensional code, wherein the activation request of the target two-dimensional code is generated after a production enterprise terminal collects two-dimensional code information on a to-be-used package when the to-be-used package of a target batch is put into a production line; updating the state information of the target two-dimensional code in the database to an activated state under the condition that the target two-dimensional code is determined to be in the to-be-activated state based on the state information, and sending an approval use instruction to the production enterprise side; the construction process of the database comprises the following steps: receiving a plurality of two-dimensional code data acquired by a package supply end in the package coding process of the target batch; And verifying the two-dimensional code data, marking the two-dimensional code data passing the verification as a state to be activated, and constructing the database based on the marked two-dimensional code data. According to the two-dimensional code management and control method for the package provided by the invention, before the two-dimensional code data are verified, the method further comprises the following steps: acquiring a first moment when the package supply end executes coding operation in the package coding process of the target batch, and a second moment when the production enterprise end puts the packages to be used of the target batch into a production line, and determining a time interval between the first moment and the second moment; Acquiring physical distance information of the package supply end and the production enterprise end, and determining logistics time based on the physical distance information and the logistics speed; And determining that the difference value between the logistics time consumption and the time interval is smaller than a preset interval threshold value. According to the two-dimensional code management and control method for packaging provided by the invention, before receiving a plurality of two-dimensional code data acquired in the packaging coding process of the target batch, the receiving package supply end further comprises: Responding to a connection request of a package supply end, and verifying identity information of the package supply end; after the authentication of the packaging supply end is confirmed to pass, an encryption transmission channel is established based on the session key, and the encryption transmission channel is used for transmitting the two-dimensional code data. According to the two-dimensional code management and control method for packaging, the two-dimensional code data are obtained by digitally signing packaging data based on the batch identification received by the encryption transmission channel and encrypting the obtained signature data based on the public key; the packing data is obtained by packing the original two-dimension codes acquired in the packing coding process of the target batch and the hash value of the original two-dimension codes. According to the two-dimensional code management and control method for packaging provided by the invention, the two-dimensional code data is verified, and the method comprises the following steps: decrypting the two-dimensional code data based on a private key to obtain