A food additive production management and control system and method based on intelligent scheduling
By incorporating compression algorithms and data blocks into images of food additive packaging, and utilizing scanning terminals for distributed storage and traceability, the problems of easily tampered scheduling records and privacy leaks have been solved, thereby improving data security and confidentiality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU BIOCHE BIO-TECH CO LTD
- Filing Date
- 2025-06-27
- Publication Date
- 2026-07-21
AI Technical Summary
Existing intelligent scheduling information is easily tampered with or lost, and printing scheduling records directly on product packaging poses a risk of corporate privacy leaks. A more secure distributed storage method is needed to ensure the data security and confidentiality of scheduling records.
By integrating scheduling records into product packaging images using compression algorithms, and utilizing scanning terminals for distributed storage and traceability, the scheduling records are hidden within the packaging images through a combination of data blocks and compression algorithms, achieving complete product traceability and data security.
Distributed storage of scheduling records was implemented, which prevented human tampering and privacy leaks, improved the authenticity and data security of scheduling records, and ensured the confidentiality of the production process.
Smart Images

Figure CN120806983B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of additive production technology, specifically to a food additive production control system and method based on intelligent scheduling. Background Technology
[0002] As a key component of the food industry, food additives are increasingly valued by consumers for food safety and quality. This has prompted companies to improve their production management of food additives, ensuring that every product on the market has traceability and tracking records.
[0003] Existing intelligent scheduling information only stores scheduling records in databases or cloud servers. These records are at risk of being tampered with or lost. New distributed storage methods are needed to ensure the data security of scheduling records. Printing scheduling records directly on product packaging poses a risk of corporate privacy leakage. Therefore, designing a confidential distributed storage system to back up scheduling records is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a food additive production control system and method based on intelligent scheduling, which solves the problems mentioned in the background section.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a food additive production control method based on intelligent scheduling, implemented using a database, a printing module, a processing unit, a scanning terminal, a recording module, a product module, a production module, and a personnel module, comprising a printing step and an extraction step, wherein the printing step includes the following steps:
[0006] Step 1: The scheduling unit obtains the scheduling records from the production workshop and uploads them to the processing unit.
[0007] Step 2: The processing unit saves the scheduling record to the database, and at the same time executes a data classification program to obtain data blocks and compression algorithms based on the data length L of the scheduling record;
[0008] Step 3: The processing unit retrieves the packaging image from the database, executes the image fusion program based on the data blocks and compression algorithm to obtain the fused image, and synchronously saves the fused image to the database.
[0009] Step 4: The processing unit transmits the merged image to the printing module for printing;
[0010] The extraction step includes the following steps:
[0011] Step 5: The operator uses a scanning terminal to capture the fused image printed on the product surface to obtain the first image. The scanning terminal uploads the first image to the processing unit via wireless communication. The processing unit compares the first image with the fused images stored in the database to calculate the similarity. The processing unit then sends the data block corresponding to the fused image with the highest similarity and the compression algorithm to the scanning terminal via wireless communication.
[0012] Step 6: The operator uses the scanning terminal to repeatedly take fused images of the product surface from different angles to obtain several first images. The scanning terminal executes an image stitching program to stitch the several first images into a second image. The first image is a partial fused image, and the second image is a complete fused image. Since the complete fused image requires the scanning terminal to continuously take pictures, the amount of data involved is large. If all of it is uploaded to the processing unit, it will increase the computing pressure on the processing unit and the transmission pressure on the upload bandwidth. Therefore, the processing unit sends data blocks and compression algorithms to the scanning terminal, so that the scanning terminal can execute the image stitching program and subsequent image extraction program locally, saving the computing resources of the processing unit and the upload bandwidth of the scanning terminal, while improving the response speed of the program.
[0013] Step 7: The scanning terminal executes an image extraction program based on data blocks and compression algorithms to obtain scheduling records. The extracted scheduling records are all the scheduling records recorded by the scheduling unit in the production process of this product, and the complete traceability of the product can be realized based on the scheduling records.
[0014] Furthermore, the process of the scheduling unit acquiring scheduling records specifically includes the following steps:
[0015] Step 101: The recording module obtains equipment information from the production module, personnel information from the personnel module, and product information from the product module.
[0016] Step 102: The recording module associates equipment information, personnel information, and product information according to the food additive production process;
[0017] Step 103: The recording module records the scheduling behavior of each person, equipment and product in the production workshop in real time, and intelligently modifies the scheduling record according to the scheduling behavior and transmits it to the processing unit.
[0018] Furthermore, the data classification procedure specifically includes the following steps:
[0019] Step 201: The processing unit performs binary encoding on the scheduling record and calculates the length L of the encoded data;
[0020] Step 202: The processing unit matches suitable data blocks and compression algorithms based on the data length L. The compression algorithm includes a compression ratio and a reference number. The data block is the smallest unit of cutting the packaging image, that is, the packaging image is cut into several data blocks of the same size. The compression ratio is the compression proportion of the packaging image. The reference number is the pixel at a fixed position in the data block used to replace the compressed packaging image. The processing unit sequentially saves the binary-encoded scheduling record in the fixed position of the reference number in each data block of the packaging image, and uses the grayscale value of the reference number pixel to record the binary code of the scheduling record. The data is encoded in a binary system to save the scheduling records. The size of the data block depends on the value of the data length L. The larger the value of the data length L, the smaller the data block required and the smaller the compression ratio. This allows more data to be saved within the limited number of pixels in the packaging image. Conversely, the smaller the value of the data length L, the larger the data block required and the larger the compression ratio. This allows more duplicate data or data of adjacent products to be saved in the packaging image. The grayscale value of the pixel at the fixed position of the identifier in each data block ranges from 0 to 255. The grayscale value of the pixel is used to save the scheduling record data.
[0021] Step 203: The processing unit calculates the total data storage amount G of all data blocks. The total storage amount G must meet the condition G≥3L, that is, each packaging image can store at least 3 scheduling records. The 3 scheduling records can be the same scheduling records of its own products or the scheduling records of adjacent products. The processing unit selects the largest data block from the data blocks that meet the conditions. After the data blocks are determined, the compression ratio in the compression algorithm is also determined. The compression ratio is the square of the side length of the data block. Each data block is a square. The processing unit randomly selects a pixel at a fixed position from the data block and records the position of the pixel as an identifier number.
[0022] Step 204: The processing unit saves the data block, compression ratio, and identifier corresponding to the packaging image to the database.
[0023] Furthermore, the image fusion process specifically includes the following steps:
[0024] Step 301: The processing unit retrieves data blocks, compression algorithms, and corresponding packaging images from the database, and the processing unit cuts the packaging images based on the data blocks;
[0025] Step 302: The processing unit retrieves the scheduling record corresponding to the product from the database and performs binary conversion to obtain the first data chain. The processing unit splits the first data chain into individual bytes of the packaging image and stores the individual bytes in each data block from top to bottom. The grayscale value of the pixel at a specified position in the data block is used to save the split first data chain.
[0026] Step 303: The processing unit aggregates all data blocks from the first data chain to obtain a fused image.
[0027] Furthermore, the image stitching process specifically includes the following steps:
[0028] Step 601: The scanning terminal obtains the grayscale value of each edge pixel of the first image;
[0029] Step 602: The scanning terminal repeatedly compares the gray values of the edge pixels of the first image with the gray values of the edge pixels of another first image in reverse. If the gray values of the pixels are different, the comparison continues by shifting the pixel values by one pixel. The difference between the gray values of the pixels is calculated once for each comparison until all the pixels on one side of the first image are compared with the pixels on the other side of the first image.
[0030] Step 603: The scanning terminal selects the image with the smallest grayscale difference in the comparison and stitches it together. The smallest grayscale difference means that the edge pixel similarity between the two first images is the highest, and they are most likely to be adjacent images. Repeating the comparison in reverse can reduce the error when stitching the images. After stitching, the second image is obtained.
[0031] Furthermore, the image extraction procedure specifically includes the following steps:
[0032] Step 701: The scanning terminal compresses the second image based on the compression algorithm to obtain the extracted image. At this time, the gray value of each pixel in the extracted image is a pixel that has saved the reference number of the first data chain at a fixed position.
[0033] Step 702: The scanning terminal extracts each pixel in the image and converts it into grayscale value from top to bottom. The grayscale values are concatenated in pairs to obtain the second data chain. The second data chain is the restored first data chain. The scanning terminal performs reverse binary encoding on the second data chain to obtain the scheduling record.
[0034] Furthermore, when the processing unit randomly selects the reference number of a data block, the processing unit simultaneously obtains other packaging images adjacent to the packaging image. The processing unit calculates the similarity F between adjacent packaging images pixel by pixel. Specifically, it calculates the difference cz between the gray values of pixels at the same position in two packaging images. The processing unit accumulates the difference in gray values to obtain the total difference CZ. The processing unit counts the total number of pixels PIX of the two packaging images. The processing unit calculates the similarity F between adjacent packaging images according to the formula F = 1 - (CZ / PIX) * 100%.
[0035] If the similarity F value between adjacent packaging images exceeds 98%, it means that the two adjacent packaging images are packaging images of the same product. The products corresponding to the two adjacent packaging images may be from the same production batch. If the reference numbers are the same when the scanning terminal obtains the first image, it is easy to cause the extracted scheduling record to be distorted. Therefore, it is necessary to avoid this. The processing unit sets the reference number values of the two adjacent packaging images to be non-adjacent.
[0036] If the similarity F between adjacent packaging images is less than or equal to 98%, it means that the two adjacent packaging images are packaging images of different products, and there is no restriction on the designation of the packaging images.
[0037] Furthermore, after the data block has completely saved the data chain, the processing unit counts the number of data blocks that have completed inputting a single byte, g1, and the number of data blocks that have not completed inputting a single byte, g2.
[0038] If the number of g2 is greater than or equal to three times the number of g1, it means that the packaging image can still store more data chains. The processing unit obtains the data blocks of adjacent packaging images and compares them with the current data block. If the data block sizes of adjacent images are all the same as the current data block size, it means that the adjacent packaging images may be packaging images of the same product. The processing unit saves the data chains corresponding to the adjacent packaging images into the data block that has not yet been entered as a single byte. If a product is lost, the scheduling record of the lost product can be obtained by scanning adjacent products. If the data block sizes of adjacent images are all different from the current data block size, it means that the adjacent packaging images may be packaging images of different products. The processing unit repeatedly writes the data chain into the data block that has been entered as a single byte as a data backup. If the merged image is damaged in the future, the remaining part can still restore the complete scheduling record.
[0039] If the number of g2 is less than three times the number of g1, the processing unit stops writing data to the data chain for data blocks that have not been input as a single byte, thereby reducing the computational pressure on the processing unit.
[0040] A food additive production control system based on intelligent scheduling includes a database, a printing module, a processing unit, a scanning terminal, and a scheduling unit. The scheduling unit includes a recording module, a product module, a production module, and a personnel module. The port of the processing unit establishes bidirectional communication with the port of the database. The output of the processing unit is connected to the input of the printing module. The port of the processing unit establishes bidirectional communication with the port of the scanning terminal via wireless communication. The wireless communication between the scanning terminal and the processing unit is based on LoRa or TD-LTE communication technology. The outputs of the product module, production module, and personnel module are all connected to the input of the recording module. The output of the recording module is connected to the input of the processing unit.
[0041] The scheduling unit is used to record the scheduling records between all production modules, product modules, and personnel modules in the food additive production workshop. Specifically, the recording module obtains equipment information from the production module, personnel information from the personnel module, and product information from the product module. The recording module associates the equipment information, personnel information, and product information according to the food additive production process, and then makes synchronous modifications based on the intelligent scheduling behavior of the production workshop to obtain the scheduling record. The recording module uploads the scheduling record to the processing unit.
[0042] The processing unit transfers the scheduling record to the database for storage. The processing unit selects data blocks and compression algorithms based on the scheduling record. The processing unit splits the scheduling record based on the data blocks and compression algorithms and integrates it with the packaging image to obtain a fused image. The packaging image is an image of food additive packaging or the surface of food packaging. The processing unit transmits the fused image to the printing module, and the printing module prints the fused image.
[0043] Furthermore, the scanning terminal captures partially fused images to obtain a first image. The scanning terminal uploads the first image to the processing unit. The processing unit determines data blocks and a compression algorithm based on the first image. The processing unit then sends the data blocks and compression algorithm back to the scanning terminal. The scanning terminal captures multiple images from different angles and stitches them together to form a complete packaging image, resulting in a second image. Based on the data blocks and compression algorithm, the scanning terminal extracts scheduling records from the second image. By scanning the product packaging image, hidden scheduling records can be directly obtained. Without affecting the product packaging design, the traceability of product scheduling records can be achieved, while ensuring the confidentiality of scheduling records and preventing leakage of scheduling records during the production process.
[0044] The present invention has the following beneficial effects:
[0045] 1. By integrating scheduling records into product packaging images using a compression algorithm, distributed storage of scheduling records can be achieved. Scanning terminals can quickly trace each product, preventing scheduling records from being tampered with and improving the authenticity of scheduling records.
[0046] 2. By using data blocks and compression algorithms, scheduling records are hidden in the packaging images of each product, preventing the leakage of corporate privacy data. At the same time, each product can serve as a backup for the database, which can improve the data security of scheduling records.
[0047] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0048] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a block diagram of a food additive production control system based on intelligent scheduling according to the present invention.
[0050] Figure 2 This is a flowchart illustrating the data block and compression algorithm of the present invention;
[0051] Figure 3 This is a schematic diagram of pixel grayscale value comparison between the first images in step 602 of the present invention. Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] Please see Figures 1-3 This invention provides a technical solution: a food additive production control method based on intelligent scheduling, implemented using a database, a printing module, a processing unit, a scanning terminal, a recording module, a product module, a production module, and a personnel module. The method includes a printing step and an extraction step. The printing step includes the following steps:
[0054] Step 1: The scheduling unit obtains the scheduling records from the production workshop and uploads them to the processing unit.
[0055] Step 2: The processing unit saves the scheduling record to the database, and at the same time executes a data classification program to obtain data blocks and compression algorithms based on the data length L of the scheduling record;
[0056] Step 3: The processing unit retrieves the packaging image from the database, executes the image fusion program based on the data blocks and compression algorithm to obtain the fused image, and synchronously saves the fused image to the database.
[0057] Step 4: The processing unit transmits the merged image to the printing module for printing;
[0058] The extraction process includes the following steps:
[0059] Step 5: The operator uses a scanning terminal to capture the fused image printed on the product surface to obtain the first image. The scanning terminal uploads the first image to the processing unit via wireless communication. The processing unit compares the first image with the fused images stored in the database to calculate the similarity. The processing unit then sends the data block corresponding to the fused image with the highest similarity and the compression algorithm to the scanning terminal via wireless communication.
[0060] Step 6: The operator uses the scanning terminal to repeatedly take fused images of the product surface from different angles to obtain several first images. The scanning terminal executes an image stitching program to stitch the several first images into a second image. The first image is a partial fused image, and the second image is a complete fused image. Since the complete fused image requires the scanning terminal to continuously take pictures, the amount of data involved is large. If all of it is uploaded to the processing unit, it will increase the computing pressure on the processing unit and the transmission pressure on the upload bandwidth. Therefore, the processing unit sends data blocks and compression algorithms to the scanning terminal, so that the scanning terminal can execute the image stitching program and subsequent image extraction program locally, saving the computing resources of the processing unit and the upload bandwidth of the scanning terminal, while improving the response speed of the program.
[0061] Step 7: The scanning terminal executes an image extraction program based on data blocks and compression algorithms to obtain scheduling records. The extracted scheduling records are all the scheduling records recorded by the scheduling unit in the production process of this product, and the complete traceability of the product can be realized based on the scheduling records.
[0062] The specific steps for the scheduling unit to obtain scheduling records include:
[0063] Step 101: The recording module obtains equipment information from the production module, personnel information from the personnel module, and product information from the product module.
[0064] Step 102: The recording module associates equipment information, personnel information, and product information according to the food additive production process;
[0065] Step 103: The recording module records the scheduling behavior of each person, equipment and product in the production workshop in real time, and intelligently modifies the scheduling record according to the scheduling behavior and transmits it to the processing unit.
[0066] The data classification process specifically includes the following steps:
[0067] Step 201: The processing unit performs binary encoding on the scheduling records and calculates the length L of the encoded data. For example, a scheduling record occupies 1024 bytes after encoding, i.e., L = 1024.
[0068] Step 202: The processing unit matches suitable data blocks and compression algorithms based on the data length L. The compression algorithm includes a compression ratio and a reference number. The data block is the smallest unit of cutting the packaging image, that is, the packaging image is cut into several data blocks of the same size. The compression ratio is the compression proportion of the packaging image. The reference number is the pixel at a fixed position in the data block that replaces the compressed packaging image. For example, ... Figure 2 As shown, a1 is a 3x3 data block, and b1 is a 4x4 data block. When compressing data block a1 at a compression ratio of 9:1, pixel a2, with the fixed position (1,1), is used to replace a1. When compressing data block b1 at a compression ratio of 16:1, pixel b2, with the fixed position (3,1), is used to replace b1. The processing unit sequentially saves the binary-encoded scheduling record to the pixels with the fixed positions in each data block of the packaged image, using the grayscale value of the pixel with the fixed position to record the binary code of the scheduling record, thereby realizing the saving of the scheduling record. The size of the data block depends on the value of the data length L. The larger the value of the data length L, the smaller the data block required and the smaller the compression ratio. This allows for the storage of as much data as possible within the limited number of pixels in the packaging image. Conversely, the smaller the value of the data length L, the larger the data block required and the larger the compression ratio. This allows for the storage of as much duplicate data or data of adjacent products as possible in the packaging image. The grayscale value of the pixel at the fixed position of the identifier in each data block ranges from 0 to 255. The grayscale value of the pixel is used to store the scheduling record data. Each data block can store 8 bits of binary data.
[0069] Step 203: The processing unit calculates the total data storage amount G of all data blocks. The total storage amount G must meet the condition G≥3L, that is, each packaging image can store at least 3 scheduling records. The 3 scheduling records can be the same scheduling records of its own products or the scheduling records of adjacent products. The processing unit selects the largest data block from the data blocks that meet the conditions. After the data blocks are determined, the compression ratio in the compression algorithm is also determined. The compression ratio is the square of the side length of the data block. Each data block is a square. The processing unit randomly selects a pixel at a fixed position from the data block and records the position of the pixel as an identifier number.
[0070] Step 204: The processing unit saves the data block, compression ratio, and identifier corresponding to the packaging image to the database.
[0071] The image fusion process specifically includes the following steps:
[0072] Step 301: The processing unit retrieves data blocks, compression algorithms, and corresponding packaging images from the database, and the processing unit cuts the packaging images based on the data blocks;
[0073] Step 302: The processing unit retrieves the scheduling record corresponding to the product from the database and performs binary conversion to obtain the first data chain. The processing unit splits the first data chain into individual bytes of the packaging image and stores the individual bytes in each data block from top to bottom. The grayscale value of the pixel at a specified position in the data block is used to save the split first data chain.
[0074] Step 303: The processing unit aggregates all data blocks from the first data chain to obtain a fused image.
[0075] The image stitching process specifically includes the following steps:
[0076] Step 601: The scanning terminal obtains the grayscale value of each edge pixel of the first image;
[0077] Step 602: As Figure 3 As shown, the scanning terminal repeatedly compares the gray values of the edge pixels of the first image with the gray values of the edge pixels of another first image in reverse. If the gray values of the pixels are different, the comparison continues by shifting the pixel values by one pixel. The difference between the gray values of the pixels is calculated once for each comparison until all the pixels on one side of the first image are compared with the pixels on the other side of the first image.
[0078] Step 603: The scanning terminal selects the image with the smallest grayscale difference in the comparison and stitches it together. The smallest grayscale difference means that the edge pixel similarity between the two first images is the highest, and they are most likely to be adjacent images. Repeating the comparison in reverse can reduce the error when stitching the images. After stitching, the second image is obtained.
[0079] The image extraction process specifically includes the following steps:
[0080] Step 701: The scanning terminal compresses the second image based on the compression algorithm to obtain the extracted image. At this time, the gray value of each pixel in the extracted image is a pixel that has saved the reference number of the first data chain at a fixed position.
[0081] Step 702: The scanning terminal extracts each pixel in the image and converts it into grayscale value from top to bottom. The grayscale values are concatenated in pairs to obtain the second data chain. The second data chain is the restored first data chain. The scanning terminal performs reverse binary encoding on the second data chain to obtain the scheduling record.
[0082] When the processing unit randomly selects the reference number of a data block, it simultaneously acquires other packaging images adjacent to that packaging image. The processing unit calculates the similarity F between adjacent packaging images pixel by pixel. Specifically, it calculates the difference cz between the gray values of pixels at the same position in two packaging images. The processing unit accumulates the difference in gray values to obtain the total difference CZ. The processing unit counts the total number of pixels PIX of the two packaging images. The processing unit calculates the similarity F between adjacent packaging images according to the formula F = 1 - (CZ / PIX) * 100%.
[0083] If the similarity F between adjacent packaging images exceeds 98%, it means that the two adjacent packaging images are packaging images of the same product. The products corresponding to the two adjacent packaging images may be from the same production batch. If the reference numbers are the same when the scanning terminal acquires the first image, it is easy to cause the extracted scheduling record to be distorted. Therefore, it is necessary to avoid this. The processing unit sets that the reference numbers of two adjacent packaging images are not adjacent. For example, if the similarity F between packaging image P1 and packaging image P2 is 99%, and the reference number of the merged image P1 is (1,1), then the reference number of packaging image P2 cannot be (1,2), (2,1) and (2,2). The processing unit removes these reference numbers and randomly selects from the remaining reference numbers.
[0084] If the similarity F between adjacent packaging images is less than or equal to 98%, it means that the two adjacent packaging images are packaging images of different products, and there is no restriction on the designation of the packaging images.
[0085] Among them, after the data block completely saves the data chain, the processing unit counts the number of data blocks that have completed input of a single byte g1 and the number of data blocks that have not been input of a single byte g2;
[0086] If the number of g2 is greater than or equal to three times the number of g1, it means that the packaging image can still store more data chains. The processing unit obtains the data blocks of adjacent packaging images and compares them with the current data block. If the data block sizes of adjacent images are all the same as the current data block size, it means that the adjacent packaging images may be packaging images of the same product. The processing unit saves the data chains corresponding to the adjacent packaging images into the data block that has not yet been entered as a single byte. If a product is lost, the scheduling record of the lost product can be obtained by scanning adjacent products. If the data block sizes of adjacent images are all different from the current data block size, it means that the adjacent packaging images may be packaging images of different products. The processing unit repeatedly writes the data chain into the data block that has been entered as a single byte as a data backup. If the merged image is damaged in the future, the remaining part can still restore the complete scheduling record.
[0087] If the number of g2 is less than three times the number of g1, the processing unit stops writing data to the data chain for data blocks that have not been input as a single byte, thereby reducing the computational pressure on the processing unit.
[0088] A food additive production control system based on intelligent scheduling, such as Figure 1 As shown, it includes a database, a printing module, a processing unit, a scanning terminal, and a scheduling unit. The scheduling unit includes a recording module, a product module, a production module, and a personnel module. The port of the processing unit establishes bidirectional communication with the port of the database. The output of the processing unit is connected to the input of the printing module. The port of the processing unit establishes bidirectional communication with the port of the scanning terminal via wireless communication. The wireless communication between the scanning terminal and the processing unit is based on LoRa or TD-LTE communication technology. The outputs of the product module, the production module, and the personnel module are all connected to the input of the recording module. The output of the recording module is connected to the input of the processing unit.
[0089] The scheduling unit is used to record the scheduling records between all production modules, product modules, and personnel modules in the food additive production workshop. Specifically, the recording module obtains equipment information from the production module, personnel information from the personnel module, and product information from the product module. The recording module associates the equipment information, personnel information, and product information according to the food additive production process, and then makes synchronous modifications based on the intelligent scheduling behavior of the production workshop to obtain the scheduling record. For example, if employee A in the personnel information uses equipment B in the equipment information to produce product C in the product information, the recording module uploads the scheduling record to the processing unit.
[0090] The processing unit transfers the scheduling record to the database for storage. Based on the scheduling record, the processing unit selects data blocks and compression algorithms. Based on the data blocks and compression algorithms, the processing unit splits the scheduling record and integrates it with the packaging image to obtain a fused image. The packaging image is an image of food additive packaging or the surface of food packaging. The processing unit transmits the fused image to the printing module, and the printing module prints the fused image.
[0091] The process involves a scanning terminal capturing and fusing images to obtain a first image. This first image is then uploaded to a processing unit. The processing unit determines data blocks and a compression algorithm based on the first image and sends these data blocks and the compression algorithm back to the scanning terminal. The scanning terminal captures multiple images from different angles and stitches them together to create a complete packaging image, resulting in a second image. Based on the data blocks and compression algorithm, the scanning terminal extracts scheduling records from the second image. By scanning the product packaging image, hidden scheduling records can be directly obtained. This allows for the traceability of product scheduling records without affecting the product packaging design, while also ensuring the confidentiality of the scheduling records and preventing leakage of scheduling records during the production process.
[0092] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for controlling the production of food additives based on intelligent scheduling, characterized in that: The process includes a printing step and an extraction step. The printing step includes the following steps: Step 1: The scheduling unit obtains the scheduling records from the production workshop and uploads them to the processing unit. Step 2: The processing unit saves the scheduling record to the database, and at the same time executes a data classification program to obtain data blocks and compression algorithms based on the data length L of the scheduling record; Step 3: The processing unit retrieves the packaging image from the database, executes the image fusion program according to the data blocks and compression algorithm to obtain the fused image, and synchronously saves the fused image to the database; Step 4: Transfer the merged image to the printing module for printing; The extraction step includes the following steps: Step 5: The operator uses a scanning terminal to capture the fused image printed on the product surface to obtain the first image. The scanning terminal uploads the first image to the processing unit via wireless communication. The processing unit compares the first image with the fused images stored in the database to calculate the similarity. The data block corresponding to the fused image with the highest similarity and the compression algorithm are sent to the scanning terminal via wireless communication. Step 6: The operator uses the scanning terminal to repeatedly take fused images of the product surface from different angles to obtain several first images. The scanning terminal executes an image stitching program to stitch the several first images into a second image. The first image is a partial fused image, and the second image is a complete fused image. Step 7: The scanning terminal executes an image extraction program based on data blocks and compression algorithms to obtain scheduling records; The data classification procedure specifically includes the following steps: Step 201: The processing unit performs binary encoding on the scheduling record and calculates the length L of the encoded data; Step 202: Match appropriate data blocks and compression algorithms according to the data length L. The compression algorithm includes compression ratio and reference number. The packaging image is cut into several data blocks of the same size. The compression ratio is the compression ratio of the packaging image. The reference number is the pixel at a fixed position in the data block used to replace the compressed packaging image. The gray value range of the pixel at the fixed position of the reference number in each data block is 0-255. Step 203: Calculate the total amount of data stored in all data blocks, G, which satisfies the condition G≥3L, that is, each packaging image can store at least 3 scheduling records. Select the largest data block from the data blocks that meet the condition. After the data blocks are determined, the compression ratio in the compression algorithm is also determined. The compression ratio is the square of the side length of the data block. Each data block is a square. Randomly select a pixel at a fixed position from the data block and record the position of the pixel as the reference number. Step 204: Save the data block, compression ratio, and identifier corresponding to the packaging image to the database.
2. The method for controlling the production of food additives based on intelligent scheduling according to claim 1, characterized in that, The process of the scheduling unit obtaining scheduling records includes the following steps: Step 101: The recording module obtains equipment information from the production module, personnel information from the personnel module, and product information from the product module; Step 102: The recording module associates equipment information, personnel information, and product information according to the food additive production process; Step 103: The recording module records the scheduling behavior of each person, equipment and product in the production workshop in real time, and intelligently modifies the scheduling record according to the scheduling behavior and transmits it to the processing unit.
3. The method for controlling the production of food additives based on intelligent scheduling according to claim 1, characterized in that, The image fusion process specifically includes the following steps: Step 301: The processing unit retrieves data blocks, compression algorithms, and corresponding packaging images from the database, and segments the packaging images based on the data blocks; Step 302: Retrieve the scheduling record from the database and perform binary conversion to obtain the first data chain. Split the first data chain into individual bytes and input the packaging image. Store the individual bytes in each data block from top to bottom. Use the grayscale value of the pixel at a specified position in the data block to save the split first data chain. Step 303: Aggregate all data blocks from the first data chain to obtain the fused image.
4. The method for controlling the production of food additives based on intelligent scheduling according to claim 1, characterized in that, The image stitching process specifically includes the following steps: Step 601: The scanning terminal obtains the grayscale value of each edge pixel of the first image; Step 602: Repeatedly compare the gray values of the edge pixels of the first image with the gray values of the edge pixels of the other first image in reverse. If the gray values of the pixels are different, shift one pixel in the reverse direction and continue to compare the gray values of the pixels. Calculate the difference between the gray values of the pixels in each comparison until all the pixels on one side of the first image are compared with the other first image. Step 603: Select the image with the smallest difference in grayscale values from the comparison and stitch them together. After stitching, the second image is obtained.
5. The method for controlling the production of food additives based on intelligent scheduling according to claim 1, characterized in that, The image extraction procedure specifically includes the following steps: Step 701: The scanning terminal compresses the second image based on a compression algorithm to obtain the extracted image; Step 702: Convert each pixel in the extracted image into grayscale value from top to bottom, concatenate the grayscale values in pairs to obtain the second data chain, the second data chain is the restored first data chain, and perform reverse binary encoding on the second data chain to obtain the scheduling record.
6. The method for controlling the production of food additives based on intelligent scheduling according to claim 1, characterized in that, When the processing unit randomly selects the reference number of a data block, it simultaneously acquires other packaging images adjacent to the packaging image, calculates the similarity F between adjacent packaging images pixel by pixel, calculates the difference cz between gray values of pixels at the same position in two packaging images, accumulates the difference of gray values to obtain the total difference CZ, counts the total number of pixels PIX of the two packaging images, and calculates the similarity F between adjacent packaging images according to the formula F=1-(CZ / PIX)*100%. If the similarity F value between adjacent packaging images exceeds 98%, it means that the two adjacent packaging images are packaging images of the same product. If the same reference number is used when the scanning terminal obtains the first image, it is easy to cause the extracted scheduling record to be distorted. Therefore, it is necessary to avoid this by setting the reference number values of the two adjacent packaging images to be non-adjacent. If the similarity F between adjacent packaging images is less than or equal to 98%, there are no restrictions on the designation of the packaging images.
7. The method for controlling the production of food additives based on intelligent scheduling according to claim 3, characterized in that, After the data block is completely saved in the data chain, the processing unit counts the number of data blocks that have completed input of a single byte, g1, and the number of data blocks that have not completed input of a single byte, g2. If the number of g2 is greater than or equal to three times the number of g1, it means that the packaging image can still save more data chains. The data blocks of adjacent packaging images are compared with the current data block. If the data block sizes of adjacent images are all the same as the current data block size, the data chains corresponding to the adjacent packaging images are saved into the data block that has not yet been entered as a single byte. If a product is lost, the scheduling record of the lost product can be obtained by scanning adjacent products. If the data block sizes of adjacent images are all different from the current data block size, the data chain is repeatedly written into the data block that has been entered as a single byte as a data backup. If the merged image is damaged in the future, the remaining part can still restore the complete scheduling record. If the number of g2 is less than three times the number of g1, stop writing data to the data chain to data blocks that have not been written a single byte.
8. A food additive production control system based on intelligent scheduling, characterized in that... A method for controlling the production of food additives based on intelligent scheduling as described in any one of claims 1-7 includes a database, a printing module, a processing unit, a scanning terminal, and a scheduling unit. The scheduling unit includes a recording module, a product module, a production module, and a personnel module. The port of the processing unit establishes bidirectional communication with the port of the database. The output end of the processing unit is connected to the input end of the printing module. The port of the processing unit establishes bidirectional communication with the port of the scanning terminal via wireless communication. The output ends of the product module, the production module, and the personnel module are all connected to the input end of the recording module. The output end of the recording module is connected to the input end of the processing unit. The scheduling unit is used to record the scheduling records between all production modules, product modules and personnel modules in the food additive production workshop. The recording module obtains the equipment information of the production module, the personnel information of the personnel module, and the product information of the product module. It associates the equipment information, personnel information and product information according to the food additive production process, and then makes synchronous modifications based on the intelligent scheduling behavior of the production workshop to obtain the scheduling record. The recording module uploads the scheduling record to the processing unit. The processing unit transfers the scheduling record to the database for storage. The processing unit selects data blocks and compression algorithms based on the scheduling record. The processing unit splits the scheduling record based on the data blocks and compression algorithms and integrates it into the packaged image to obtain a fused image. The processing unit transmits the fused image to the printing module, and the printing module prints the fused image.
9. A food additive production control system based on intelligent scheduling according to claim 8, characterized in that, The scanning terminal captures partially fused images to obtain a first image. The scanning terminal uploads the first image to the processing unit. The processing unit determines data blocks and a compression algorithm based on the first image. The processing unit sends the data blocks and compression algorithm to the scanning terminal. The scanning terminal captures multiple images from different angles and stitches them together to form a complete packaging image to obtain a second image. The scanning terminal extracts scheduling records from the second image based on the data blocks and compression algorithm.