Traceable food safety system and method

文档序号:35550 发布日期:2021-09-24 浏览:22次 中文

阅读说明:本技术 一种食品安全可追溯系统及方法 (Traceable food safety system and method ) 是由 童颜 张小虎 于 2020-03-04 设计创作,主要内容包括:本发明属于餐饮技术领域,具体涉及一种食品安全可追溯系统及方法。所述系统包括:数据录入单元,用于录入追溯数据;数据加密单元,用于对追溯数据进行加密,得到加密后的追溯数据;数据解密单元,用于对加密后的追溯数据进行解密;打码装置,用于根据数据解密后得到的追溯数据进行二维码生成,将生成的二维码打印到食品的包装上。实现了对食品从生产到销售的追溯,提升了食品的安全性。(The invention belongs to the technical field of catering, and particularly relates to a food safety traceability system and a food safety traceability method. The system comprises: the data entry unit is used for entering the tracing data; the data encryption unit is used for encrypting the tracing data to obtain the encrypted tracing data; the data decryption unit is used for decrypting the encrypted tracing data; and the code printing device is used for generating the two-dimensional code according to the tracing data obtained after data decryption and printing the generated two-dimensional code on the package of the food. Realizes the tracing from the production to the sale of the food and improves the safety of the food.)

1. A food safety traceability system, the system comprising:

the data entry unit is used for entering the tracing data;

the data encryption unit is used for encrypting the tracing data to obtain the encrypted tracing data;

the data decryption unit is used for decrypting the encrypted tracing data;

and the code printing device is used for generating the two-dimensional code according to the tracing data obtained after data decryption and printing the generated two-dimensional code on the package of the food.

2. The food safety traceability system of claim 1, wherein the data entry unit is signally connected to the data encryption unit, the data encryption unit comprising: a data splitting unit; the data splitting unit is connected with the code conversion unit through signals; the code conversion unit is connected with the flash memory through signals; the device further comprises: an image information input unit; the image information input unit is in signal connection with the picture segmentation unit; the picture segmentation unit is connected with an image binarization unit through signals; the image binarization unit is connected with the flash memory through a signal; the flash memory signal is connected to the cloud end unit; the arithmetic unit is connected with the information conversion unit through signals; the information conversion unit is connected with the data output unit through signals.

3. The food safety traceability system of claim 2, wherein the data splitting unit comprises: a random number generator and a data dividing unit; the random number generator is connected with the data dividing unit in a signal mode and used for generating random dividing data; the data dividing unit is used for dividing the input data according to the dividing data generated by the random number generator.

4. The food safety traceability system of claim 3, wherein the arithmetic unit comprises: a logical AND operation unit, a logical OR operation unit and a logical NOT operation unit; the logical AND operation unit is connected with the logical OR operation unit through signals; the logical OR operation unit is connected with the logical NOT operation unit through signals.

5. The food safety traceability system of claim 4, wherein the information transformation unit comprises: a pixel generation unit and an image composition unit; the pixel generation unit is used for generating corresponding pixel information according to the operation result sent by the operation unit; and the image compounding unit is used for generating corresponding complete image information according to the generation result of the pixel generation unit and sending the generated image information to the data output unit.

6. The food safety traceability system of claim 5, wherein the image binarization unit comprises: a threshold setting module and a binarization module; the threshold setting module is connected with the binarization module through a signal and is used for setting a discrimination threshold when the binarization module carries out binarization processing; and the binarization module is used for carrying out image binarization processing on the image information sent by the image segmentation unit.

7. A food safety traceability method, characterized in that the method performs the following steps:

filling the tracing data of the packaged food through a data entry unit, encrypting the tracing data to obtain a tracing data ciphertext, and sending the tracing data ciphertext to a data decryption unit;

the data decryption unit decrypts the tracing data ciphertext to obtain and store the tracing data, generates a tracing number of the packaged food according to production data in the tracing data, codes the tracing number of the packaged food and the production information abstract together to generate a two-dimensional code picture, and sends the two-dimensional code picture to a coding device;

and the code printing device prints the two-dimensional code picture on the package of the packaged food.

8. The food safety traceability method of claim 7,

the data decryption unit decrypts the trace-back data ciphertext to obtain and store the trace-back data, and the method comprises the following steps:

after the data decryption unit receives a tracing data ciphertext, a signature value and a user side identifier sent by a user side, inquiring an association relation between a pre-stored user side public key, a pre-stored user side PK and the pre-stored user side identifier according to the user side identifier to obtain a user side public key and the pre-stored user side PK;

the data decryption unit verifies the signature value of the tracing data ciphertext by using the public key of the user side, and decrypts the tracing data ciphertext by using the user side PK after the verification is passed to obtain the tracing data;

the data decryption unit compares the enterprise identification in the retroactive data with the enterprise identification corresponding to the user side identification, which is obtained by inquiring the association relationship between the pre-stored user side identification and the enterprise identification, and when the comparison result is consistent, the data decryption unit stores the retroactive data.

Technical Field

The invention belongs to the technical field of catering, and particularly relates to a food safety traceability system and a food safety traceability method.

Background

Food safety is an important source for guaranteeing the health and life safety of the public. In recent years, frequent food safety accidents have attracted wide attention of all social circles, and food safety tracing is increasingly paid more attention by food-related departments and enterprises as a means for guaranteeing food safety.

At present, most of food safety tracing systems are built by food production and processing enterprises, which are not beneficial to data acquisition in a circulation link after food production. Some methods solve the problem of data acquisition in the circulation link, but the safety of data acquisition is not considered, so that a provider of the retroactive data lacks data safety guarantee, and if the safety of the data cannot be guaranteed, the reliability and authority of the retroactive system are difficult to guarantee, and the popularization and application of the retroactive system are also not facilitated.

Disclosure of Invention

In view of this, the main objective of the present invention is to provide a system and a method for tracing food safety, which implement tracing of food from production to sale and improve food safety.

In order to achieve the purpose, the technical scheme of the invention is realized as follows:

a food safety traceability system, the system comprising:

the data entry unit is used for entering the tracing data;

the data encryption unit is used for encrypting the tracing data to obtain the encrypted tracing data;

the data decryption unit is used for decrypting the encrypted tracing data;

and the code printing device is used for generating the two-dimensional code according to the tracing data obtained after data decryption and printing the generated two-dimensional code on the package of the food.

Further, the data entry unit is connected to the data encryption unit through signals, and the data encryption unit includes: a data splitting unit; the data splitting unit is connected with the code conversion unit through signals; the code conversion unit is connected with the flash memory through signals; the device further comprises: an image information input unit; the image information input unit is in signal connection with the picture segmentation unit; the picture segmentation unit is connected with an image binarization unit through signals; the image binarization unit is connected with the flash memory through a signal; the flash memory signal is connected to the cloud end unit; the arithmetic unit is connected with the information conversion unit through signals; the information conversion unit is connected with the data output unit through signals.

Further, the data splitting unit includes: a random number generator and a data dividing unit; the random number generator is connected with the data dividing unit in a signal mode and used for generating random dividing data; the data dividing unit is used for dividing the input data according to the dividing data generated by the random number generator.

Further, the arithmetic unit includes: a logical AND operation unit, a logical OR operation unit and a logical NOT operation unit; the logical AND operation unit is connected with the logical OR operation unit through signals; the logical OR operation unit is connected with the logical NOT operation unit through signals.

Further, the information conversion unit includes: a pixel generation unit and an image composition unit; the pixel generation unit is used for generating corresponding pixel information according to the operation result sent by the operation unit; and the image compounding unit is used for generating corresponding complete image information according to the generation result of the pixel generation unit and sending the generated image information to the data output unit.

Further, the image binarization unit includes: a threshold setting module and a binarization module; the threshold setting module is connected with the binarization module through a signal and is used for setting a discrimination threshold when the binarization module carries out binarization processing; and the binarization module is used for carrying out image binarization processing on the image information sent by the image segmentation unit.

A food safety traceable method, the method performing the steps of:

filling the tracing data of the packaged food through a data entry unit, encrypting the tracing data to obtain a tracing data ciphertext, and sending the tracing data ciphertext to a data decryption unit;

the data decryption unit decrypts the tracing data ciphertext to obtain and store the tracing data, generates a tracing number of the packaged food according to production data in the tracing data, codes the tracing number of the packaged food and the production information abstract together to generate a two-dimensional code picture, and sends the two-dimensional code picture to a coding device;

and the code printing device prints the two-dimensional code picture on the package of the packaged food.

Further, the data decryption unit decrypts the trace-back data ciphertext to obtain and store the trace-back data, and the method includes:

after the data decryption unit receives a tracing data ciphertext, a signature value and a user side identifier sent by a user side, inquiring an association relation between a pre-stored user side public key, a pre-stored user side PK and the pre-stored user side identifier according to the user side identifier to obtain a user side public key and the pre-stored user side PK;

the data decryption unit verifies the signature value of the tracing data ciphertext by using the public key of the user side, and decrypts the tracing data ciphertext by using the user side PK after the verification is passed to obtain the tracing data;

the data decryption unit compares the enterprise identification in the retroactive data with the enterprise identification corresponding to the user side identification, which is obtained by inquiring the association relationship between the pre-stored user side identification and the enterprise identification, and when the comparison result is consistent, the data decryption unit stores the retroactive data.

The food safety traceability system and the method have the following beneficial effects: realizes the tracing from the production to the sale of the food and improves the safety of the food.

Drawings

Fig. 1 is a schematic system structure diagram of the food safety traceability system of the present invention.

Detailed Description

The method of the present invention will be described in further detail below with reference to the accompanying drawings and embodiments of the invention.

As shown in fig. 1, a food safety traceability system, the system comprising:

the data entry unit is used for entering the tracing data;

the data encryption unit is used for encrypting the tracing data to obtain the encrypted tracing data;

the data decryption unit is used for decrypting the encrypted tracing data;

and the code printing device is used for generating the two-dimensional code according to the tracing data obtained after data decryption and printing the generated two-dimensional code on the package of the food.

Further, the data entry unit is connected to the data encryption unit through signals, and the data encryption unit includes: a data splitting unit; the data splitting unit is connected with the code conversion unit through signals; the code conversion unit is connected with the flash memory through signals; the device further comprises: an image information input unit; the image information input unit is in signal connection with the picture segmentation unit; the picture segmentation unit is connected with an image binarization unit through signals; the image binarization unit is connected with the flash memory through a signal; the flash memory signal is connected to the cloud end unit; the arithmetic unit is connected with the information conversion unit through signals; the information conversion unit is connected with the data output unit through signals.

Further, the data splitting unit includes: a random number generator and a data dividing unit; the random number generator is connected with the data dividing unit in a signal mode and used for generating random dividing data; the data dividing unit is used for dividing the input data according to the dividing data generated by the random number generator.

Further, the arithmetic unit includes: a logical AND operation unit, a logical OR operation unit and a logical NOT operation unit; the logical AND operation unit is connected with the logical OR operation unit through signals; the logical OR operation unit is connected with the logical NOT operation unit through signals.

Further, the information conversion unit includes: a pixel generation unit and an image composition unit; the pixel generation unit is used for generating corresponding pixel information according to the operation result sent by the operation unit; and the image compounding unit is used for generating corresponding complete image information according to the generation result of the pixel generation unit and sending the generated image information to the data output unit.

Further, the image binarization unit includes: a threshold setting module and a binarization module; the threshold setting module is connected with the binarization module through a signal and is used for setting a discrimination threshold when the binarization module carries out binarization processing; and the binarization module is used for carrying out image binarization processing on the image information sent by the image segmentation unit.

A food safety traceable method, the method performing the steps of:

filling the tracing data of the packaged food through a data entry unit, encrypting the tracing data to obtain a tracing data ciphertext, and sending the tracing data ciphertext to a data decryption unit;

the data decryption unit decrypts the tracing data ciphertext to obtain and store the tracing data, generates a tracing number of the packaged food according to production data in the tracing data, codes the tracing number of the packaged food and the production information abstract together to generate a two-dimensional code picture, and sends the two-dimensional code picture to a coding device;

and the code printing device prints the two-dimensional code picture on the package of the packaged food.

Further, the data decryption unit decrypts the trace-back data ciphertext to obtain and store the trace-back data, and the method includes:

after the data decryption unit receives a tracing data ciphertext, a signature value and a user side identifier sent by a user side, inquiring an association relation between a pre-stored user side public key, a pre-stored user side PK and the pre-stored user side identifier according to the user side identifier to obtain a user side public key and the pre-stored user side PK;

the data decryption unit verifies the signature value of the tracing data ciphertext by using the public key of the user side, and decrypts the tracing data ciphertext by using the user side PK after the verification is passed to obtain the tracing data;

the data decryption unit compares the enterprise identification in the retroactive data with the enterprise identification corresponding to the user side identification, which is obtained by inquiring the association relationship between the pre-stored user side identification and the enterprise identification, and when the comparison result is consistent, the data decryption unit stores the retroactive data.

It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and related description of the system described above may refer to the corresponding process in the foregoing method embodiments, and will not be described herein again.

It should be noted that, the system provided in the foregoing embodiment is only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the modules or steps in the embodiment of the present invention are further decomposed or combined, for example, the modules in the foregoing embodiment may be combined into one module, or may be further split into multiple sub-modules, so as to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps, and are not to be construed as unduly limiting the present invention.

It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes and related descriptions of the storage device and the processing device described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

Those of skill in the art would appreciate that the various illustrative modules, method steps, and modules described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that programs corresponding to the software modules, method steps may be located in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. To clearly illustrate this interchangeability of electronic hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as electronic hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

The terms "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing or implying a particular order or sequence.

The terms "comprises," "comprising," or any other similar term are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种辅助感统训练的设备及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!