Preformed dish tracing method and system
By using hash functions and RSA public key private key mechanism for encryption and digital signatures in each link of the pre-made dish, the problems of unclear traceability and easy data tampering in the existing technology are solved, and clear chain traceability and data are achieved Integrity, immutability and undeniability.
Patent Information
- Application Number
- CN202411680079.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traceability of the prior art in each link of pre-made dishes is not clear enough, and clear chain traceability cannot be carried out, and the traceability data is easily tampered with, and the integrity, non-tamperability and undeniability of the data cannot be guaranteed.
By obtaining relevant information on the production materials, production and processing processes, product testing results, logistics and product sales of each batch of pre-made dishes, and using hash functions and RSA public key private key mechanism for encryption and digital signatures, store them into the relationship Database, ensuring the integrity and immutability of data.
It realizes clear traceability of all links of pre-made dishes, and can conduct clear chain traceability, ensuring the integrity, immutability and undeniability of the traceable data, and improving the credibility of the data.
Smart Images

Figure CN119398800A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of pre-prepared food traceability, and in particular to a pre-prepared food traceability method and system thereof. Background Art
[0002] With the development of society, the pace of society is accelerating, and the speed of cooking is becoming more and more important. Pre-prepared meals are convenient and fast and are gradually being accepted by the public.
[0003] As consumers have higher and higher requirements for food safety, they urgently need to understand the information of each link in the whole process of pre-prepared meals from production to sales, so as to understand the true information and quality of the products and supervise them. On the other hand, once food safety problems occur, specific accountability needs to be pursued from each link in the whole process. Therefore, a method that can trace the whole process of pre-prepared meals is very important.
[0004] However, the existing technology has the problem of unclear traceability of each link of pre-prepared meals, and cannot perform clear chain traceability. In addition, the traceability data is easily tampered with, and the integrity, non-tamperability and non-repudiation of the traceability data cannot be guaranteed. Summary of the invention
[0005] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to provide a method and system for tracing the origin of pre-prepared dishes, aiming to solve the problems that the prior art is not clear enough in tracing the traceability of each link of pre-prepared dishes, cannot perform clear chain traceability, and the traceability data is easily tampered with, and the integrity, non-tamperability and non-repudiation of the traceability data cannot be guaranteed.
[0006] In view of the above problems, the present application provides a method and system for tracing the origin of pre-prepared dishes.
[0007] The first aspect disclosed in the present application provides a method for tracing the origin of a prepared dish, the method comprising the following steps: Obtain relevant information about the production materials of each batch of pre-prepared dishes, and append the current timestamp to the end of all relevant information about the production materials to generate production material information, perform hash processing on the production material information using a hash function to generate a summary of the production material information, encrypt the summary of the production material information using a first RSA private key, generate a digital signature of the production material information, and store the batch number, the production material information, and the digital signature of the production material information in a relational database, wherein the batch number is a unique identification number for each batch of pre-prepared dishes; Obtain relevant information about the production and processing process of each batch of pre-prepared dishes, and add a timestamp of the end time of the production and processing to the end of the relevant information about the production and processing process to generate production and processing information, use a hash function to hash the production and processing information to generate a summary of the production and processing information, use a second RSA private key to encrypt the summary of the production and processing information, generate a digital signature of the production and processing information, and store the batch number, the production and processing information, and the digital signature of the production and processing information in a relational database; Obtain relevant information of the product test results of each batch of pre-prepared dishes, and append a timestamp of the time when the product test was completed to the end of the relevant information of the product test results to generate product test information, perform hash processing on the product test information using a hash function to generate a product test information summary, encrypt the product test information summary using a third RSA private key, generate a product test information digital signature, and store the batch number, product test information, and the product test information digital signature in a relational database; Obtaining relevant information about the logistics and transportation of each batch of pre-prepared dishes, and appending a timestamp of the arrival time of the logistics and transportation to the end of the relevant information about the logistics and transportation, generating logistics and transportation information, performing hash processing on the logistics and transportation information using a hash function, generating a summary of the logistics and transportation information, encrypting the summary of the logistics and transportation information using a fourth RSA private key, generating a digital signature of the logistics and transportation information, and storing the batch number, the logistics and transportation information, and the digital signature of the logistics and transportation information in a relational database; Obtaining relevant information about the product sales of each batch of pre-prepared dishes, and appending a timestamp of the time when the product was sold to the end of the relevant information about the product sales, generating product sales information, performing hash processing on the product sales information using a hash function, generating a product sales information summary, encrypting the product sales information summary using a fifth RSA private key, generating a product sales information digital signature, and storing the batch number, product sales information, and the product sales information digital signature in a relational database; Market supervision and management personnel, investigators or consumers perform query operations from the relational database through the batch number of the current pre-prepared dish to obtain the current pre-prepared dish production raw material information, production and processing information, product inspection information, logistics and transportation information and product sales information, as well as the digital signature of the production raw material information, the digital signature of the production and processing information, the digital signature of the product inspection information, the digital signature of the logistics and transportation information and the digital signature of the product sales information, and decrypt each information digital signature using the RSA public key corresponding to the first RSA private key, the second RSA private key, the third RSA private key, the fourth RSA private key and the fifth RSA private key, respectively, and compare the decryption result with the result of hashing each information using the hash function. If they are completely consistent, it proves that the information has integrity and has not been tampered with. If they are inconsistent, it proves that the information does not have integrity and has been tampered with and cannot be trusted.
[0008] Preferably, the relevant information of all production materials includes the name of the production materials, suppliers, implementation standards and sampling results.
[0009] Preferably, the relevant information of the production and processing process includes the production and processing site, production equipment, production process, health certificates of production personnel, names of additives used, additive dosage and sanitary conditions.
[0010] Preferably, the relevant information of the product test results includes a nutritional ingredient table, a bacterial flora index, heavy metal content, harmful substance content and a qualified rate of the test for this batch.
[0011] Preferably, the relevant information of the logistics transportation includes the transportation starting point, transportation destination, carrier, transportation conditions and packaging integrity.
[0012] Preferably, the relevant information on product sales includes sales channels, distribution units, sales quantities and guide prices.
[0013] Preferably, the length of the first RSA private key, the second RSA private key, the third RSA private key, the fourth RSA private key and the fifth RSA private key and their respective corresponding RSA public keys is greater than 2048 bits.
[0014] The second aspect disclosed in the present application provides a pre-prepared food traceability system, which is used in the above-mentioned pre-prepared food traceability method, and the system includes: A production material module, the production material module is used to obtain relevant information of the production materials of each batch of pre-prepared dishes, and append the timestamp of this moment to the end of all relevant information of the production materials to generate production material information, perform hash processing on the production material information using a hash function to generate a summary of the production material information, encrypt the summary of the production material information using a first RSA private key, generate a digital signature of the production material information, and store the batch number, the production material information and the digital signature of the production material information in a relational database, wherein the batch number is a unique identification number for each batch of pre-prepared dishes; A production and processing module, the production and processing module is used to obtain relevant information of the production and processing process of each batch of pre-prepared dishes, and add a timestamp of the end time of the production and processing to the end of the relevant information of the production and processing process, generate production and processing information, use a hash function to hash the production and processing information, generate a summary of the production and processing information, use a second RSA private key to encrypt the summary of the production and processing information, generate a digital signature of the production and processing information, and store the batch number, the production and processing information and the digital signature of the production and processing information in a relational database; A product detection module, the product detection module is used to obtain relevant information of product detection results of each batch of pre-prepared dishes, and append a timestamp of the time when the product detection is completed to the end of the relevant information of the product detection results, generate product detection information, perform hash processing on the product detection information using a hash function, generate a product detection information summary, encrypt the product detection information summary using a third RSA private key, generate a product detection information digital signature, and store the batch number, product detection information and the product detection information digital signature in a relational database; A logistics and transportation module, the logistics and transportation module is used to obtain relevant information about the logistics and transportation of each batch of pre-prepared dishes, and to add a timestamp of the arrival time of the logistics and transportation to the end of the relevant information about the logistics and transportation, to generate logistics and transportation information, to perform hash processing on the logistics and transportation information using a hash function, to generate a summary of the logistics and transportation information, to encrypt the summary of the logistics and transportation information using a fourth RSA private key, to generate a digital signature of the logistics and transportation information, and to store the batch number, the logistics and transportation information and the digital signature of the logistics and transportation information in a relational database; A product sales module, the product sales module is used to obtain relevant information about the product sales of each batch of pre-prepared dishes, and append a timestamp of the time when the product is sold to the end of the relevant information about the product sales, generate product sales information, perform hash processing on the product sales information using a hash function, generate a product sales information summary, encrypt the product sales information summary using a fifth RSA private key, generate a product sales information digital signature, and store the batch number, product sales information and the product sales information digital signature in a relational database; A traceability module is used for market supervision and management personnel, investigators or consumers to perform query operations from a relational database through the batch number of the current pre-prepared dish, obtain the current pre-prepared dish production raw material information, production and processing information, product inspection information, logistics and transportation information and product sales information, as well as the production raw material information digital signature, the production and processing information digital signature, the product inspection information digital signature, the logistics and transportation information digital signature and the product sales information digital signature, and decrypt each information digital signature using the RSA public key corresponding to the first RSA private key, the second RSA private key, the third RSA private key, the fourth RSA private key and the fifth RSA private key, respectively, and compare the decryption result with the result of hashing each information using a hash function. If they are completely consistent, it proves that the information has integrity and has not been tampered with. If they are inconsistent, it means that the information does not have integrity and has been tampered with and cannot be trusted.
[0015] The beneficial effects of the present invention are: (1) The present invention provides clear traceability of each link of the pre-prepared food and can perform clear chain traceability.
[0016] (2) Through hash processing and RSA public key and private key mechanism, the traceability data can be ensured to be tamper-proof, thus achieving the integrity, non-tamperability and non-repudiation of the traceability data.
[0017] (3) By adding a timestamp, the tampering of traceability data by replaying data is eliminated, further improving the credibility of traceability data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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.
[0019] Figure 1 The present invention is a flowchart of a method for tracing the origin of pre-prepared dishes.
[0020] Figure 2 This is a schematic diagram of the overall structure of a pre-prepared food traceability system.
[0021] Description of reference numerals: relational database 10 . DETAILED DESCRIPTION
[0022] 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.
[0023] like Figure 1 As shown, the embodiment of the present application provides a method for tracing the origin of a pre-prepared dish, the method comprising the following steps: Obtain relevant information about the production materials of each batch of pre-prepared dishes, and append a timestamp of this moment to the end of all relevant information about the production materials to generate production material information, perform hash processing on the production material information using a hash function to generate a summary of the production material information, encrypt the summary of the production material information using a first RSA private key, generate a digital signature of the production material information, and store the batch number, the production material information, and the digital signature of the production material information in a relational database 10, wherein the batch number is a unique identification number for each batch of pre-prepared dishes; Obtain relevant information about the production and processing process of each batch of pre-prepared dishes, and add a timestamp of the end time of the production and processing to the end of the relevant information about the production and processing process to generate production and processing information, use a hash function to hash the production and processing information to generate a summary of the production and processing information, use a second RSA private key to encrypt the summary of the production and processing information, generate a digital signature of the production and processing information, and store the batch number, the production and processing information and the digital signature of the production and processing information in a relational database 10; Obtain relevant information of the product test results of each batch of pre-prepared dishes, and append a timestamp of the time when the product test is completed to the end of the relevant information of the product test results to generate product test information, perform hash processing on the product test information using a hash function to generate a product test information summary, encrypt the product test information summary using a third RSA private key, generate a product test information digital signature, and store the batch number, product test information, and the product test information digital signature in a relational database 10; Obtaining relevant information about the logistics and transportation of each batch of pre-prepared dishes, and appending a timestamp of the arrival time of the logistics and transportation to the end of the relevant information about the logistics and transportation, generating logistics and transportation information, performing hash processing on the logistics and transportation information using a hash function, generating a summary of the logistics and transportation information, encrypting the summary of the logistics and transportation information using a fourth RSA private key, generating a digital signature of the logistics and transportation information, and storing the batch number, the logistics and transportation information, and the digital signature of the logistics and transportation information in a relational database 10; Obtaining relevant information about the product sales of each batch of pre-prepared dishes, and appending a timestamp of the time when the product was sold to the end of the relevant information about the product sales to generate product sales information, performing hash processing on the product sales information using a hash function to generate a product sales information summary, encrypting the product sales information summary using a fifth RSA private key, generating a product sales information digital signature, and storing the batch number, product sales information, and the product sales information digital signature in a relational database 10; Market supervision and management personnel, investigators or consumers perform query operations from the relational database 10 through the batch number of the current pre-prepared dish to obtain the current pre-prepared dish production raw material information, production and processing information, product inspection information, logistics and transportation information and product sales information, as well as the digital signature of the production raw material information, the digital signature of the production and processing information, the digital signature of the product inspection information, the digital signature of the logistics and transportation information and the digital signature of the product sales information, and decrypt each information digital signature using the RSA public key corresponding to the first RSA private key, the second RSA private key, the third RSA private key, the fourth RSA private key and the fifth RSA private key, respectively, and compare the decryption result with the result of hashing each information using the hash function. If they are completely consistent, it proves that the information has integrity and has not been tampered with. If they are inconsistent, it proves that the information does not have integrity and has been tampered with and cannot be trusted.
[0024] Furthermore, the relevant information of all production raw materials includes the name of the production raw materials, suppliers, implementation standards and sampling results.
[0025] Furthermore, the relevant information of the production and processing process includes the production and processing location, production equipment, production process, health certificates of production personnel, names of additives used, additive dosage and sanitary conditions.
[0026] Furthermore, the relevant information of the product test results includes the nutritional composition table, bacterial index, heavy metal content, harmful substance content and the qualified rate of this batch of tests.
[0027] Furthermore, the relevant information of the logistics transportation includes the transportation starting point, transportation destination, carrier, transportation conditions and packaging integrity.
[0028] Furthermore, the relevant information about the product sales includes sales channels, distribution units, sales quantities and guide prices.
[0029] Furthermore, the length of the first RSA private key, the second RSA private key, the third RSA private key, the fourth RSA private key and the fifth RSA private key and their respective corresponding RSA public keys are greater than 2048 bits.
[0030] In summary, the method for tracing the origin of pre-prepared dishes provided in the embodiments of the present application has the following technical effects: (1) The present invention provides clear traceability of each link of the pre-prepared food and can perform clear chain traceability.
[0031] (2) Through hash processing and RSA public key and private key mechanism, the traceability data can be ensured to be tamper-proof, thus achieving the integrity, non-tamperability and non-repudiation of the traceability data.
[0032] (3) By adding a timestamp, the tampering of traceability data by replaying data is eliminated, further improving the credibility of traceability data.
[0033] Based on the same inventive concept as the method for tracing the origin of a pre-prepared dish in the above-mentioned embodiment, Figure 2 As shown, the present application provides a pre-prepared food traceability system, the system comprising: A production material module, the production material module is used to obtain relevant information of the production materials of each batch of pre-prepared dishes, and append the timestamp of this moment to the end of all relevant information of the production materials to generate production material information, perform hash processing on the production material information using a hash function to generate a summary of the production material information, encrypt the summary of the production material information using a first RSA private key, generate a digital signature of the production material information, and store the batch number, the production material information and the digital signature of the production material information in a relational database, wherein the batch number is a unique identification number for each batch of pre-prepared dishes; A production and processing module, the production and processing module is used to obtain relevant information of the production and processing process of each batch of pre-prepared dishes, and add a timestamp of the end time of the production and processing to the end of the relevant information of the production and processing process, generate production and processing information, use a hash function to hash the production and processing information, generate a summary of the production and processing information, use a second RSA private key to encrypt the summary of the production and processing information, generate a digital signature of the production and processing information, and store the batch number, the production and processing information and the digital signature of the production and processing information in a relational database; A product detection module, the product detection module is used to obtain relevant information of product detection results of each batch of pre-prepared dishes, and append a timestamp of the time when the product detection is completed to the end of the relevant information of the product detection results, generate product detection information, perform hash processing on the product detection information using a hash function, generate a product detection information summary, encrypt the product detection information summary using a third RSA private key, generate a product detection information digital signature, and store the batch number, product detection information and the product detection information digital signature in a relational database; A logistics and transportation module, the logistics and transportation module is used to obtain relevant information about the logistics and transportation of each batch of pre-prepared dishes, and to add a timestamp of the arrival time of the logistics and transportation to the end of the relevant information about the logistics and transportation, to generate logistics and transportation information, to perform hash processing on the logistics and transportation information using a hash function, to generate a summary of the logistics and transportation information, to encrypt the summary of the logistics and transportation information using a fourth RSA private key, to generate a digital signature of the logistics and transportation information, and to store the batch number, the logistics and transportation information and the digital signature of the logistics and transportation information in a relational database; A product sales module, the product sales module is used to obtain relevant information about the product sales of each batch of pre-prepared dishes, and append a timestamp of the time when the product is sold to the end of the relevant information about the product sales, generate product sales information, perform hash processing on the product sales information using a hash function, generate a product sales information summary, encrypt the product sales information summary using a fifth RSA private key, generate a product sales information digital signature, and store the batch number, product sales information and the product sales information digital signature in a relational database; A traceability module is used for market supervision and management personnel, investigators or consumers to perform query operations from a relational database through the batch number of the current pre-prepared dish, obtain the current pre-prepared dish production raw material information, production and processing information, product inspection information, logistics and transportation information and product sales information, as well as the production raw material information digital signature, the production and processing information digital signature, the product inspection information digital signature, the logistics and transportation information digital signature and the product sales information digital signature, and decrypt each information digital signature using the RSA public key corresponding to the first RSA private key, the second RSA private key, the third RSA private key, the fourth RSA private key and the fifth RSA private key, respectively, and compare the decryption result with the result of hashing each information using a hash function. If they are completely consistent, it proves that the information has integrity and has not been tampered with. If they are inconsistent, it means that the information does not have integrity and has been tampered with and cannot be trusted.
[0034] Through the above detailed description of a method for tracing the origin of pre-prepared food in this specification, those skilled in the art can clearly understand a system for tracing the origin of pre-prepared food in this embodiment. Since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0035] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0036] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for tracing the origin of pre-prepared dishes, characterized in that: The method comprises the following steps: Obtain relevant information about the production materials of each batch of pre-prepared dishes, and append the current timestamp to the end of all relevant information about the production materials to generate production material information, perform hash processing on the production material information using a hash function to generate a summary of the production material information, encrypt the summary of the production material information using a first RSA private key, generate a digital signature of the production material information, and store the batch number, the production material information, and the digital signature of the production material information in a relational database, wherein the batch number is a unique identification number for each batch of pre-prepared dishes; Obtain relevant information about the production and processing process of each batch of pre-prepared dishes, and add a timestamp of the end time of the production and processing to the end of the relevant information about the production and processing process to generate production and processing information, use a hash function to hash the production and processing information to generate a summary of the production and processing information, use a second RSA private key to encrypt the summary of the production and processing information, generate a digital signature of the production and processing information, and store the batch number, the production and processing information, and the digital signature of the production and processing information in a relational database; Obtain relevant information of the product test results of each batch of pre-prepared dishes, and append a timestamp of the time when the product test was completed to the end of the relevant information of the product test results to generate product test information, perform hash processing on the product test information using a hash function to generate a product test information summary, encrypt the product test information summary using a third RSA private key, generate a product test information digital signature, and store the batch number, product test information, and the product test information digital signature in a relational database; Obtaining relevant information about the logistics and transportation of each batch of pre-prepared dishes, and appending a timestamp of the arrival time of the logistics and transportation to the end of the relevant information about the logistics and transportation, generating logistics and transportation information, performing hash processing on the logistics and transportation information using a hash function, generating a summary of the logistics and transportation information, encrypting the summary of the logistics and transportation information using a fourth RSA private key, generating a digital signature of the logistics and transportation information, and storing the batch number, the logistics and transportation information, and the digital signature of the logistics and transportation information in a relational database; Obtaining relevant information about the product sales of each batch of pre-prepared dishes, and appending a timestamp of the time when the product was sold to the end of the relevant information about the product sales, generating product sales information, performing hash processing on the product sales information using a hash function, generating a product sales information summary, encrypting the product sales information summary using a fifth RSA private key, generating a product sales information digital signature, and storing the batch number, product sales information, and the product sales information digital signature in a relational database; Market supervision and management personnel, investigators or consumers perform query operations from the relational database through the batch number of the current pre-prepared dish to obtain the current pre-prepared dish production raw material information, production and processing information, product inspection information, logistics and transportation information and product sales information, as well as the digital signature of the production raw material information, the digital signature of the production and processing information, the digital signature of the product inspection information, the digital signature of the logistics and transportation information and the digital signature of the product sales information, and decrypt each information digital signature using the RSA public key corresponding to the first RSA private key, the second RSA private key, the third RSA private key, the fourth RSA private key and the fifth RSA private key, respectively, and compare the decryption result with the result of hashing each information using the hash function. If they are completely consistent, it proves that the information has integrity and has not been tampered with. If they are inconsistent, it proves that the information does not have integrity and has been tampered with and cannot be trusted.
2. A method for tracing the origin of a prepared dish according to claim 1, characterized in that: The relevant information of all production raw materials includes the name of the production raw materials, suppliers, implementation standards and sampling results.
3. A method for tracing the origin of prepared dishes according to claim 1, characterized in that: The relevant information of the production and processing process includes the production and processing location, production equipment, production process, health certificates of production personnel, names of additives used, additive dosage and sanitary conditions.
4. A method for tracing the origin of a prepared dish according to claim 1, characterized in that: The relevant information of the product test results includes the nutritional composition table, bacterial index, heavy metal content, harmful substance content and the qualified rate of this batch of tests.
5. A method for tracing the origin of prepared dishes as claimed in claim 1, characterized in that: The relevant information of the logistics transportation includes the transportation starting point, transportation destination, carrier, transportation conditions and packaging integrity.
6. A method for tracing the origin of prepared dishes as claimed in claim 1, characterized in that: The relevant information about the product sales includes sales channels, distribution units, sales quantities and guide prices.
7. A method for tracing the origin of prepared dishes as claimed in claim 1, characterized in that: The length of the first RSA private key, the second RSA private key, the third RSA private key, the fourth RSA private key and the fifth RSA private key and their respective corresponding RSA public keys is greater than 2048 bits.
8. A pre-prepared food traceability system, the system comprising: A production material module, the production material module is used to obtain relevant information of the production materials of each batch of pre-prepared dishes, and append the timestamp of this moment to the end of all relevant information of the production materials to generate production material information, perform hash processing on the production material information using a hash function to generate a summary of the production material information, encrypt the summary of the production material information using a first RSA private key, generate a digital signature of the production material information, and store the batch number, the production material information and the digital signature of the production material information in a relational database, wherein the batch number is a unique identification number for each batch of pre-prepared dishes; A production and processing module, the production and processing module is used to obtain relevant information of the production and processing process of each batch of pre-prepared dishes, and add a timestamp of the end time of the production and processing to the end of the relevant information of the production and processing process, generate production and processing information, use a hash function to hash the production and processing information, generate a summary of the production and processing information, use a second RSA private key to encrypt the summary of the production and processing information, generate a digital signature of the production and processing information, and store the batch number, the production and processing information and the digital signature of the production and processing information in a relational database; A product detection module, the product detection module is used to obtain relevant information of product detection results of each batch of pre-prepared dishes, and append a timestamp of the time when the product detection is completed to the end of the relevant information of the product detection results, generate product detection information, perform hash processing on the product detection information using a hash function, generate a product detection information summary, encrypt the product detection information summary using a third RSA private key, generate a product detection information digital signature, and store the batch number, product detection information and the product detection information digital signature in a relational database; A logistics and transportation module, the logistics and transportation module is used to obtain relevant information about the logistics and transportation of each batch of pre-prepared dishes, and to add a timestamp of the arrival time of the logistics and transportation to the end of the relevant information about the logistics and transportation, to generate logistics and transportation information, to perform hash processing on the logistics and transportation information using a hash function, to generate a summary of the logistics and transportation information, to encrypt the summary of the logistics and transportation information using a fourth RSA private key, to generate a digital signature of the logistics and transportation information, and to store the batch number, the logistics and transportation information and the digital signature of the logistics and transportation information in a relational database; A product sales module, the product sales module is used to obtain relevant information about the product sales of each batch of pre-prepared dishes, and append a timestamp of the time when the product is sold to the end of the relevant information about the product sales, generate product sales information, perform hash processing on the product sales information using a hash function, generate a product sales information summary, encrypt the product sales information summary using a fifth RSA private key, generate a product sales information digital signature, and store the batch number, product sales information and the product sales information digital signature in a relational database; A traceability module is used for market supervision and management personnel, investigators or consumers to perform query operations from a relational database through the batch number of the current pre-prepared dish, obtain the current pre-prepared dish production raw material information, production and processing information, product inspection information, logistics and transportation information and product sales information, as well as the production raw material information digital signature, the production and processing information digital signature, the product inspection information digital signature, the logistics and transportation information digital signature and the product sales information digital signature, and decrypt each information digital signature using the RSA public key corresponding to the first RSA private key, the second RSA private key, the third RSA private key, the fourth RSA private key and the fifth RSA private key, respectively, and compare the decryption result with the result of hashing each information using a hash function. If they are completely consistent, it proves that the information has integrity and has not been tampered with. If they are inconsistent, it means that the information does not have integrity and has been tampered with and cannot be trusted.
Citation Information
Cited By
Premade dish tracing method, system and equipment
CN120851908A