A durian production traceability method, system, storage medium and computer
By generating and encrypting the traceability code of durian in a cloud server, and using the RSA algorithm to construct a public-private key for encryption, the problem of the easy decryption of existing fruit traceability codes is solved, and the security and accuracy of the traceability code are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG BOSHI NETWORK TECHNOLOGY CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-06-23
Smart Images

Figure CN122264801A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fruit production technology, specifically to a method, system, storage medium, and computer for tracing durian production. Background Technology
[0002] In current fruit production processes, product traceability codes are typically used to record production and testing information such as the fruit's origin and quality. This allows customers to verify the authenticity of this information through the traceability code. However, existing traceability codes usually consist of a combination of numbers and letters. For example, letters represent the origin and the production company, while the production date and daily production number represent the product's numerical code. The numbers and letters that make up the traceability code are read, and the coding rules can be directly understood through the code's encoding method. This has led to the emergence of many counterfeit and substandard products on the market. These counterfeit products are encoded using deciphered traceability code encoding rules, making it difficult for consumers to obtain the true production and testing information of the product through the traceability code on the product. Summary of the Invention
[0003] To address the technical problem in existing technologies where the encoding rules of traceability codes are easily deciphered, making it difficult for consumers to obtain accurate production and testing information about products through the traceability codes on the products, this invention provides a method, system, storage medium, and computer for tracing durian production.
[0004] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: A method for tracing durian production includes the following steps: Generate a plaintext traceability code for the durian; The production information, warehousing information, testing information, product barcode, and plaintext traceability code of the durian are stored on a cloud server via the Internet. The plaintext traceability code is associated with the production information, the warehouse entry and exit information, the testing information, and the product barcode in the cloud server; The plaintext traceability code is encrypted in the cloud server to obtain an encrypted traceability code. The encrypted traceability code is obtained from the cloud server via the Internet; The encrypted traceability code is printed on the durian packaging; The encrypted traceability code on the durian packaging is decrypted to obtain the plaintext traceability code; Based on the decrypted plaintext traceability code, query or modify the corresponding production information and / or the inbound / outbound information and / or the detection information and / or the product barcode in the cloud server.
[0005] The beneficial effects of this invention are: by encrypting the traceability code, the encrypted traceability code is completely different from the plaintext traceability code. As long as the encryption rules are not leaked, the encoding rules of the traceability code are not easy to find. Since the traceability code is usually composed of a combination of date and number, the encoding rules of the plaintext traceability code are easy to decipher. Therefore, compared with the traditional plaintext traceability code, the encoding rules of the traceability code deciphering invention are not easy to decipher.
[0006] Based on the above technical solution, the present invention can be further improved as follows.
[0007] Furthermore, when generating the plaintext traceability code for the durian, one durian corresponds to one plaintext traceability code, and the plaintext traceability codes for each durian are different.
[0008] Furthermore, the production information includes at least the product name, place of origin, and production time; the inbound and outbound information includes at least the inbound and outbound location, inbound time, and number of inbound and outbound transactions; and the testing information includes at least the variety, weight, testing images, number of pulp chambers, and pulp yield.
[0009] Furthermore, associating the plaintext traceability code with the production information, the warehouse entry and exit information, the testing information, and the product barcode in the cloud server includes the following steps: Build a data table in the cloud server; The plaintext traceability code is associated with the production information, the warehouse entry and exit information, the testing information, and the product barcode and stored in the same row of the data table.
[0010] Furthermore, the plaintext traceability code is encrypted in the cloud server to obtain encrypted traceability, including the following steps: Construct public and private keys; The plaintext traceability code is encrypted using the private key of the public-private key in the cloud server to obtain the encrypted traceability.
[0011] Furthermore, the public and private keys are constructed using the RSA encryption algorithm.
[0012] Furthermore, the encrypted traceability code on the durian packaging is decrypted to obtain the plaintext traceability code. Specifically, the encrypted traceability code on the durian packaging is decrypted using the public key of the public-private key to obtain the plaintext traceability code.
[0013] To address the aforementioned technical problems, this invention also provides a durian production traceability system, the specific technical details of which are as follows: A durian production traceability system includes: The data generation module is used to generate plaintext traceability codes for durians; The data storage module is used to store the durian's production information, warehousing information, testing information, product barcode, and plaintext traceability code to a cloud server via the Internet; The data association module is used to associate the plaintext traceability code with the production information, the warehouse entry and exit information, the testing information, and the product barcode in the cloud server; and to encrypt the plaintext traceability code in the cloud server to obtain an encrypted traceability code. The data query module is used to obtain the encrypted traceability code from the cloud server via the Internet; wherein the encrypted traceability code is printed on the packaging of the durian; the encrypted traceability code on the packaging of the durian is decrypted to obtain the plaintext traceability code; and the corresponding production information and / or the inbound and outbound information and / or the testing information and / or the product barcode in the cloud server are queried or modified according to the decrypted plaintext traceability code.
[0014] To address the aforementioned technical problems, the present invention also provides a storage medium, the specific technical content of which is as follows: A storage medium storing a computer program or computer instructions, which, when executed by a computer's processor, implements the steps of the durian production traceability method described above.
[0015] To address the aforementioned technical problems, the present invention also provides a computer, the specific technical content of which is as follows: A computer includes a memory and one or more processors, wherein executable code is stored in the memory, and when the one or more processors execute the executable code, the steps of the durian production traceability method described above are implemented. Attached Figure Description
[0016] Figure 1 This is a flowchart of a durian production traceability method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a durian production traceability system according to an embodiment of the present invention. Detailed Implementation
[0017] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0018] like Figure 1 As shown, this embodiment provides a method for tracing durian production, including the following steps: S1. Generate the plaintext traceability code for the durian; When generating the plaintext traceability code for the durian, each durian corresponds to a unique plaintext traceability code. The plaintext traceability code can be encoded as a string consisting of numbers representing the product name, place of origin, date, and serial number, to ensure the uniqueness of each durian's plaintext traceability code.
[0019] S2. Store the durian's production information, warehousing information, testing information, product barcode, and plaintext traceability code to a cloud server via the Internet; The production information includes at least the product name, origin, and production time; the warehousing information includes at least the warehousing location, warehousing time, and number of warehousing entries; and the testing information includes at least the variety, weight, testing images, number of fruit segments, and fruit yield. Testing images may include images of the durian's appearance and CT images (computed tomography scans).
[0020] S3. In the cloud server, associate the plaintext traceability code with the production information, the warehouse entry and exit information, the testing information, and the product barcode; Associating the plaintext traceability code with the production information, the warehouse entry and exit information, the testing information, and the product barcode in the cloud server includes the following steps: Build a data table in the cloud server; The plaintext traceability code is associated with and stored in the same row of the data table along with the production information, the inventory information, the testing information, and the product barcode. For example, the plaintext traceability codes, production information, inventory information, testing information, and product barcodes for different durians can be stored in the same row. When querying other information using the plaintext traceability code, all information for the durian corresponding to the plaintext traceability code can be directly retrieved using a table lookup. The database tables are used to associate the data to facilitate data association queries.
[0021] S4. Encrypt the plaintext traceability code in the cloud server to obtain an encrypted traceability code; Encrypting the plaintext traceability code in the cloud server to obtain encrypted traceability includes the following steps: Generate public and private keys; when generating the public and private keys, the RSA encryption algorithm is used. The RSA algorithm is an asymmetric encryption technology, and its core is based on the mathematical problem of large integer factorization: select two large prime numbers p and q, calculate n = p×q, but it is computationally infeasible to deduce p and q from n in reverse. Key generation: calculate n = p×q and the Euler's totient function φ(n)=(p - 1)(q - 1), select the public key exponent e (1 < e < φ(n) and relatively prime to φ(n)), and the private key exponent d, satisfying e×d ≡ 1 mod φ(n), the public key is (n,e), and the private key is (n,d). The algorithm of using the private key for encryption and the public key for decryption belongs to the category of asymmetric encryption. This encryption mode can prevent the traceability code from being tampered with or replaced, and improve the query accuracy of the traceability code.
[0022] In the cloud server, use the private key of the public and private keys to encrypt the plaintext traceability code to obtain the encrypted traceability code.
[0023] S5. Obtain the encrypted traceability code from the cloud server through the Internet; Durian manufacturers can log in to the cloud server. After the cloud server identifies the identity of the durian manufacturer, it can obtain the encrypted traceability code and the plaintext traceability code from the cloud server. If a consumer logs in to the cloud server, the cloud server cannot display the plaintext traceability code, but only displays information related to durian production and detection, preventing the plaintext traceability code from being leaked by consumers.
[0024] S6. Imprint the encrypted traceability code on the packaging of the durian; Store the encrypted traceability code as a QR code or barcode. The QR code or barcode label will be pasted on the packaging of the durian, and words such as "traceability code" or "number" will be printed on the label to facilitate the identification of the traceability code by consumers, manufacturers, distributors, etc.
[0025] S7. Decrypt the encrypted traceability code on the packaging of the durian to obtain the plaintext traceability code; decrypt the encrypted traceability code on the packaging of the durian to obtain the plaintext traceability code. Specifically, decrypt the encrypted traceability code on the packaging of the durian to obtain the plaintext traceability code. Specifically, use the public key of the public and private keys to decrypt the encrypted traceability code on the packaging of the durian to obtain the plaintext traceability code. Among them, to decrypt the encrypted traceability code, manufacturers, consumers, distributors and other institutions or individuals need to log in to the cloud server, input the encrypted traceability code in the cloud server, and the cloud server identifies the identity of the login person. If the identity of the login person is a manufacturer, the decrypted plaintext traceability code can be obtained or queried; if the identity of the login person is a non-production participating institution such as a consumer or a distributor, the plaintext traceability code cannot be obtained.
[0026] S8. Query or modify the corresponding production information and / or the inbound / outbound information and / or the detection information and / or the product barcode in the cloud server based on the plaintext traceability code obtained by decryption.
[0027] If the login user is a manufacturer, they can query and modify the corresponding production information, inventory information, testing information, and product barcode in the cloud server based on the decrypted plaintext traceability code.
[0028] If the user is a distributor, they can query the corresponding production information, inventory information, testing information, and product barcode in the cloud server after entering the encrypted traceability code. They can also modify the inventory information after entering the encrypted traceability code. In other words, distributors can modify the corresponding inventory information in the cloud server when performing inventory operations on durians after logging into the cloud server.
[0029] If the logged-in user is a consumer, they can enter the encrypted traceability code to query the corresponding production information, testing information, and product barcode in the cloud server. The information about the durian in the cloud service cannot be modified.
[0030] It is important to note that manufacturers and distributors need specific accounts and passwords to log in to the cloud service in order to be recognized by the cloud service; consumers can log in to the cloud server without an account and password to query information about durians.
[0031] This invention encrypts the traceability code, resulting in a completely different traceability code from the plaintext version. As long as the encryption rules are not disclosed, the encoding rules of the traceability code are not easily discovered. Since traceability codes are usually composed of combinations of dates and numbers, the encoding rules of plaintext traceability codes are easily deciphered. Therefore, compared to traditional plaintext traceability codes, the encoding rules of the traceability codes of this invention are not easily deciphered.
[0032] like Figure 2 As shown, in some other embodiments, a durian production traceability system is also provided, including: The data generation module is used to generate plaintext traceability codes for durians; The data storage module is used to store the durian's production information, warehousing information, testing information, product barcode, and plaintext traceability code to a cloud server via the Internet; The data association module is used to associate the plaintext traceability code with the production information, the warehouse entry and exit information, the testing information, and the product barcode in the cloud server; and to encrypt the plaintext traceability code in the cloud server to obtain an encrypted traceability code. The data query module is used to obtain the encrypted traceability code from the cloud server via the Internet; wherein the encrypted traceability code is printed on the packaging of the durian; the encrypted traceability code on the packaging of the durian is decrypted to obtain the plaintext traceability code; and the corresponding production information and / or the inbound and outbound information and / or the testing information and / or the product barcode in the cloud server are queried or modified according to the decrypted plaintext traceability code.
[0033] In some other embodiments, a storage medium is also provided, which stores a computer program or computer instructions that, when executed by a computer's processor, implement the steps of the durian production traceability method described above.
[0034] The storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The storage medium can also be an external storage device of any data processing device, such as a plug-in hard disk, smart memory card, SD card, flash memory card, etc., mounted on the device. Furthermore, the storage medium can include both internal storage units and external storage devices of any data processing device. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0035] In other embodiments, a computer is also provided, including a memory and one or more processors, wherein executable code is stored in the memory, and when the one or more processors execute the executable code, the steps of the durian production traceability method described above are implemented.
[0036] The memory can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or RAM. The memory can also be an external storage device of any data processing device, such as a plug-in hard disk, smart memory card, SD card, flash memory card, etc., mounted on the device. Furthermore, the memory can include both internal storage units and external storage devices of any data processing device. The memory is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0037] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the concept and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for tracing durian production, characterized in that, Includes the following steps: Generate a plaintext traceability code for the durian; The production information, warehousing information, testing information, product barcode, and plaintext traceability code of the durian are stored on a cloud server via the Internet. The plaintext traceability code is associated with the production information, the warehouse entry and exit information, the testing information, and the product barcode in the cloud server; The plaintext traceability code is encrypted in the cloud server to obtain an encrypted traceability code. The encrypted traceability code is obtained from the cloud server via the Internet; The encrypted traceability code is printed on the durian packaging; The encrypted traceability code on the durian packaging is decrypted to obtain the plaintext traceability code; Based on the decrypted plaintext traceability code, query or modify the corresponding production information and / or the inbound / outbound information and / or the detection information and / or the product barcode in the cloud server.
2. The durian production traceability method according to claim 1, characterized in that, When generating the plaintext traceability code for the durian, one durian corresponds to one plaintext traceability code, and the plaintext traceability codes for each durian are different.
3. The durian production traceability method according to claim 1, characterized in that, The production information includes at least the product name, place of origin, and production time; the inbound and outbound information includes at least the inbound and outbound location, inbound time, and number of inbound and outbound transactions; and the testing information includes at least the variety, weight, testing images, number of pulp chambers, and pulp yield.
4. The durian production traceability method according to claim 1, characterized in that, Associating the plaintext traceability code with the production information, the warehouse entry and exit information, the testing information, and the product barcode in the cloud server includes the following steps: Build a data table in the cloud server; The plaintext traceability code is associated with the production information, the warehouse entry and exit information, the testing information, and the product barcode and stored in the same row of the data table.
5. The durian production traceability method according to claim 1, characterized in that, Encrypting the plaintext traceability code in the cloud server to obtain encrypted traceability includes the following steps: Construct public and private keys; The plaintext traceability code is encrypted using the private key of the public-private key in the cloud server to obtain the encrypted traceability.
6. The durian production traceability method according to claim 5, characterized in that, The public and private keys are constructed using the RSA encryption algorithm.
7. The durian production traceability method according to claim 5, characterized in that, The encrypted traceability code on the durian packaging is decrypted to obtain the plaintext traceability code. Specifically, the encrypted traceability code on the durian packaging is decrypted using the public key of the public-private key to obtain the plaintext traceability code.
8. A system employing the durian production traceability method as described in any one of claims 1 to 7, characterized in that, include: The data generation module is used to generate plaintext traceability codes for durians; The data storage module is used to store the durian's production information, warehousing information, testing information, product barcode, and plaintext traceability code to a cloud server via the Internet; The data association module is used to associate the plaintext traceability code with the production information, the warehouse entry and exit information, the testing information, and the product barcode in the cloud server; The plaintext traceability code is encrypted in the cloud server to obtain an encrypted traceability code. A data query module is used to obtain the encrypted traceability code from the cloud server via the Internet; wherein the encrypted traceability code is printed on the packaging of the durian; the encrypted traceability code on the packaging of the durian is decrypted to obtain the plaintext traceability code; Based on the decrypted plaintext traceability code, query or modify the corresponding production information and / or the inbound / outbound information and / or the detection information and / or the product barcode in the cloud server.
9. A storage medium, characterized in that, The storage medium stores a computer program or computer instructions, which, when executed by the computer's processor, implement the steps of the durian production traceability method as described in claims 1 to 7.
10. A computer, characterized in that, The device includes a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they implement the steps of the durian production traceability method as described in claims 1 to 7.