Label printing method, system, device and storage medium based on pre-packaged goods

CN118651503BActive Publication Date: 2026-10-20BEIJING EGGPLANT BEAN NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411037871.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2026-10-20
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

[0003]类似的现有技术有公开号为CN112990209A的中国专利申请,提出一种标签检测装置和相应的标签检测方法,标签检测装置包括:服务器,平台,其在服务器的控制下允许标签纸在其自身中行走;以及采集部,其设置在平台中,并在服务器的控制下获取在平台中行走的标签纸的标签图像,服务器对从采集部接收的标签图像进行图像识别以提取实际标签数据,并且将实际标签数据与存储的理论标签数据进行比较,但是,该专利申请并没有根据标签图像检测标签的外观缺陷

Benefits of technology

[0016]与现有技术相比,本发明的有益效果至少如下所述:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118651503B_ABST
    Figure CN118651503B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of image processing, and particularly relates to a label printing method, system and device based on pre-packaged goods and a storage medium, the method comprising the following steps: S1, a label paper preparation module prepares label paper, and sends label paper error information to a control module if the label paper is found to be unqualified; S2, a label printing module determines a printing mode according to an advertisement picture, and prints a label containing the advertisement picture, and sends label error information to the control module if the label is found to be unqualified; and S3, a label sticking processing module performs label stripping processing, a goods preparation module checks whether the goods packaging is complete, and sends goods error information to the control module if the goods packaging is found to be incomplete, and the label sticking processing module determines a label sticking position and performs label sticking processing if the goods packaging is found to be complete. The application can conveniently generate a comparison label picture compared with a label picture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and specifically relates to a label printing method, system, device, and storage medium for pre-packaged goods. Background Technology

[0002] Product advertising labels can quickly convey key product information and are often used to attract people's attention, thereby increasing sales. Therefore, the printing quality of product advertising labels should be strictly guaranteed when printing them.

[0003] A similar prior art is Chinese patent application CN112990209A, which proposes a label detection device and a corresponding label detection method. The label detection device includes: a server, a platform that allows label paper to move within itself under the control of the server; and a collection unit that is set in the platform and acquires label images of the label paper moving within the platform under the control of the server. The server performs image recognition on the label images received from the collection unit to extract actual label data and compares the actual label data with stored theoretical label data. However, this patent application does not detect label appearance defects based on label images. Furthermore, a similar prior art exists in Chinese patent application CN113537301A, which discloses a defect detection method for bottle labels based on template adaptive matching. The method includes the following steps: segmenting the target label according to coordinate attributes to form multiple label bodies; creating corresponding detection templates for the multiple label bodies; preprocessing the acquired bottle image to form a label image, the preprocessing including bottle label segmentation, position correction, and coordinate recording; using a detection function to call the detection template to perform corresponding detection on the label image, and outputting the detection results. This method can detect defects in the appearance of bottle labels. However, this patent application suffers from the technical problem of difficulty in generating a comparison image of the label image. Summary of the Invention

[0004] This invention generates an advertising image containing the advertisement, and simultaneously photographs the printed labels to obtain label images. It then automatically generates a comparison label image based on the advertising image. By comparing the original label image with the comparison label image, the quality of the printed labels can be checked. This invention aims to generate highly accurate comparison label images simply and quickly.

[0005] To achieve the aforementioned objectives, this invention provides a label printing method for pre-packaged goods, which mainly includes the following steps: S1. The control module sends a start printing command to the label preparation module, and the label preparation module prepares the label and checks the prepared label. If the label is found to be unqualified, the label preparation module sends a label error message to the control module. S2. The label printing module determines the printing mode based on the advertising image and prints the label containing the advertising image. The label printing module also checks the printed label. If the label is found to be unqualified, the label printing module sends a label error message to the control module. S3. The labeling module performs label peeling, and the product preparation module checks whether the product packaging is intact. If it is incomplete, the product preparation module sends a product error message to the control module. If it is intact, the labeling module determines the labeling position according to the size of the product packaging and performs labeling according to the labeling position. In step S2, the label printing module inspects the printed labels, including the following steps: S21. The label printing module automatically generates an advertising image containing the advertising screen, and at the same time, the label printing module takes a picture of the printed label to obtain the label image; S22. The label printing module determines the comparison label image corresponding to the advertising image based on the advertising image in its own image database. S23. The label printing module compares the image elements in the label image at the same position with the image elements in the comparison label image, and calculates the difference between the image element values ​​of the two. If the difference is greater than the preset difference threshold, the image element in the label image corresponding to the difference is regarded as the problem image element. S24. If the total number of problematic image elements is greater than a preset total number threshold, the label printing module determines that the printed label is unqualified.

[0006] As a preferred embodiment of the present invention, the label printing module stores several standard advertising images and standard label images corresponding to the several standard advertising images in an image database. The standard label image refers to the label image corresponding to a label that has been judged as qualified in the past, and the standard advertising image refers to the advertising image corresponding to the label image corresponding to the label that has been judged as qualified in the past.

[0007] As a preferred embodiment of the present invention, the label printing module further determines several central image elements, extracts standard advertising image areas of a preset size centered on each central image element from the standard advertising image, and also extracts standard label image areas of a preset size centered on each central image element from the standard label image corresponding to the standard advertising image. The label printing module stores the standard advertising image areas and the corresponding standard label image areas in the image database.

[0008] As a preferred embodiment of the present invention, step S22 includes the following steps: S221. The label printing module extracts an advertising image area of ​​a preset size centered on any one image element from the advertising image; S222. The label printing module calculates the similarity value between the advertising image area and all standard advertising image areas in the image database, sorts the different similarity values ​​in descending order, and selects the different standard advertising image areas corresponding to the first preset similarity value in the sorted order. S223. For each standard advertising image area, the label printing module determines the standard label image area corresponding to the standard advertising image area, and the label printing module determines whether all the captured advertising image areas can correspond to the whole advertising image. If not, it jumps to S221. S224. The label printing module generates comparison label images using different standard label image regions corresponding to all the captured advertising image regions.

[0009] As a preferred embodiment of the present invention, the label printing module calculates the image element values ​​of the image elements in the comparison label image using the following formula:

[0010] in, The image element value of the image element. This represents the total number of standard label image regions corresponding to each image element. For the image element corresponding to the first Image element values ​​of corresponding image elements in a standard label image area. For the image element corresponding to the first The same degree value corresponding to each standard label image area.

[0011] As a preferred embodiment of the present invention, the label printing module calculates the degree of similarity between the advertising image area and the standard advertising image area in the database, including the following steps: S2221. The label printing module selects several image element combinations consisting of two different image elements from the advertising image area and stores the several image element combinations. At the same time, the label printing module also selects several image element combinations from the standard advertising image area in the same way and stores the several image element combinations. S2222. Regarding each combination of image elements stored for the advertising image area, the label printing module calculates the difference between the image element values ​​of two image elements in the image element combination, sets a first value and a second value based on the difference, connects all the first values ​​to form a first representative value of the advertising image area, connects all the second values ​​to form a second representative value of the advertising image area, and the label printing module obtains the first representative value and the second representative value of the standard advertising image area using the same method. S2223. The label printing module divides the image element combination of the first preset second number stored for the advertising image area into a first category, and divides the other image element combination stored for the advertising image area into a second category. At the same time, the label printing module divides the image element combination of the first preset second number stored for the standard advertising image area into a third category, and divides the other image element combination stored for the standard advertising image area into a fourth category. S2224. For image element combinations in the first and third categories, the label printing module calculates a first similarity value based on the first representative value of the advertising image area and the first representative value of the standard advertising image area. For image element combinations in the second and fourth categories, the label printing module calculates a second similarity value based on the second representative value of the advertising image area and the second representative value of the standard advertising image area. The label printing module also calculates the sum of the first and second similarity values ​​as the similarity value.

[0012] As a preferred embodiment of the present invention, the data length of the first value and the second value is one bit.

[0013] The present invention also provides a label printing system for pre-packaged goods, comprising the following modules: The control module is used to send a start printing command to the label preparation module and to receive error messages from the label preparation module, the label printing module, and the product preparation module. The label preparation module is used to prepare labels and check the prepared labels. If a label is found to be unqualified, it sends a label error message to the control module. The label printing module is used to determine the printing mode based on the advertising image, print labels containing the advertising image, and check the printed labels. If a label is found to be unqualified, it sends a label error message to the control module. The product preparation module is used to check whether the product packaging is intact. If it is incomplete, it sends a product error message to the control module. The labeling module is used for peeling off labels and, when the product packaging is intact, determining the labeling position based on the size of the product packaging and then applying the label accordingly.

[0014] The present invention also provides an apparatus including a memory and a processor, the memory being used to store a computer program, and the processor being used to implement the method described in any one of the foregoing when executing the computer program.

[0015] The present invention also provides a storage medium storing program instructions, wherein the program instructions, when executed, control the device where the storage medium is located to perform any of the methods described above.

[0016] Compared with the prior art, the beneficial effects of the present invention are at least as follows: In this invention, the label preparation module first prepares and inspects the prepared labels. If a label is found to be substandard, it sends an error message to the control module. Next, the label printing module determines the printing mode based on the advertising image and prints labels containing the advertising image. It also obtains both the advertising image and the label image, generates a comparison label image based on the advertising image, and checks the printed labels by comparing the label image with the comparison label image. If a label is found to be substandard, it sends an error message to the control module. Finally, the labeling processing module performs label removal. The product preparation module checks the integrity of the product packaging. If the packaging is incomplete, the product preparation module sends a product error message to the control module. If the packaging is complete, the labeling processing module determines the labeling position based on the dimensions of the product packaging and applies the label accordingly. This invention allows for the simple and quick generation of a comparison label image from an advertising image, with high accuracy, resulting in accurate label inspection results. Attached Figure Description

[0017] Figure 1 This is a flowchart of the label printing method for pre-packaged goods according to the present invention; Figure 2 This is a flowchart illustrating the process of inspecting printed labels according to the present invention. Figure 3This is a structural diagram of the label printing system for pre-packaged goods according to the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0019] This invention provides, for example Figure 1 and Figure 2 The label printing method for pre-packaged goods shown is applied to a label printing system for pre-packaged goods. The printing method is mainly implemented by performing the following steps: S1. The control module sends a start printing command to the label preparation module, and the label preparation module prepares the labels and checks the prepared labels. If the label is found to be unqualified, the label preparation module sends a label error message to the control module. S2. The label printing module determines the printing mode based on the advertising image and prints the label containing the advertising image. The label printing module also checks the printed labels. If a label is found to be unqualified, the label printing module sends a label error message to the control module. S3. The labeling module performs the label peeling process, and the product preparation module checks whether the product packaging is intact. If it is incomplete, the product preparation module sends a product error message to the control module. If it is intact, the labeling module determines the labeling position according to the size of the product packaging and performs the labeling process according to the labeling position.

[0020] Specifically, steps S1 to S3 describe the main process of printing labels. In step S1, when labels need to be printed, the control module sends a start printing command to the label preparation module. The label preparation module prepares the labels. When the overall advertising image is light-colored, a glossy label is prepared; when the overall advertising image is dark-colored, a matte label is prepared. The prepared labels are inspected for defects such as stains, wrinkles, and loss of adhesive. If a label is found to be unqualified, the label preparation module sends an error message to the control module. Otherwise, the process continues to step S2. In step S2, the label printing module determines the printing mode based on the advertising image. This process involves printing labels containing advertising images. It's important to note that the label printing module checks the printed labels. If a label is deemed unqualified, it is discarded, ensuring only qualified labels are retained. The label printing module sends a label error message to the control module; otherwise, it proceeds to step S3. In step S3, the labeling module performs label peeling. The product preparation module checks the integrity of the product packaging. If incomplete, it sends a product error message to the control module. Otherwise, the labeling module determines the labeling position based on the packaging dimensions, centering the label in the packaging and applying it accordingly.

[0021] Furthermore, in step S2, the label printing module inspects the printed labels, including the following steps: S21. The label printing module automatically generates an advertising image containing the advertising screen, and at the same time, the label printing module takes a picture of the printed label to obtain the label image. S22. The label printing module determines the corresponding comparison label image based on the advertising image in its own image database. S23. The label printing module compares the image elements in the label image at the same position with the image elements in the comparison label image, and calculates the difference between the image element values ​​of the two. If the difference is greater than the preset difference threshold, the image element in the label image corresponding to the difference is regarded as the problem image element. S24. If the total number of problematic image elements exceeds the preset total number threshold, the label printing module determines that the printed label is unqualified.

[0022] Specifically, this section describes the steps for inspecting the printed labels. In step S21, the label printing module automatically generates an advertising image containing the advertising scene. This image can be generated using data such as CAD data used during the design of the advertising scene. The label printing module also takes a picture of the printed label to obtain the label image. In step S22, the label printing module determines the comparison label image corresponding to the advertising image from its own image database. The detailed process will be described below. In step S23, the label printing module compares the image elements in the label image and the comparison label image at the same position in the two image coordinate systems, calculating the difference between their image element values. If the difference is greater than a difference threshold, the image element in the label image corresponding to the difference is considered a problem image element. In step S24, the label printing module determines whether the total number of problem image elements is greater than a total number threshold. If so, the printed label is deemed unqualified. It should be noted that the resolution of the different images mentioned in this embodiment is the same.

[0023] Furthermore, the label printing module stores several standard advertising images and standard label images corresponding to the several standard advertising images into the image database. The standard label image refers to the label image corresponding to the printed label that has been judged as qualified in the past, and the standard advertising image refers to the advertising image corresponding to the label image corresponding to the printed label that has been judged as qualified in the past. Furthermore, the label printing module also identifies several central image elements, extracts standard advertising image areas of preset size centered on each central image element from the standard advertising image, and also extracts standard label image areas of preset size centered on each central image element from the standard label image corresponding to the standard advertising image. The label printing module then stores the standard advertising image areas and the corresponding standard label image areas in the image database.

[0024] Specifically, the label printing module stores combinations of multiple standard advertising images and standard label images in its own image database. The standard advertising image is the advertising image corresponding to a label image that has historically been deemed qualified for printing. The standard label image is the label image corresponding to a label that has historically been deemed qualified for printing. Furthermore, the label printing module also stores combinations of multiple standard advertising image regions and standard label image regions in its own image database. Here's how these combinations are generated: First, several central image elements with the same position are simultaneously determined in both the standard advertising image and its corresponding standard label image. Here, "position" refers to the image element's location in the image coordinate system. Second, standard advertising image regions of a certain size, centered on each central image element, are extracted from the standard advertising image. Similarly, standard label image regions of a certain size, centered on each central image element, are extracted from the standard label image. Finally, the standard advertising image regions and standard label image regions corresponding to the central image elements with the same position are combined. It's important to note that each of the multiple standard advertising image regions and standard label image regions corresponding to several central image elements can encompass the entirety of both the standard advertising image and the standard label image.

[0025] Furthermore, step S22 also includes the following steps: S221. The label printing module extracts a pre-sized area of ​​the advertisement image centered on any one of the image elements from the advertisement image. S222. The label printing module calculates the similarity value between the advertising image area and all standard advertising image areas in the image database, sorts the different similarity values ​​in descending order, and selects the different standard advertising image areas corresponding to the first preset similarity value in the sorted order. S223. For each standard advertising image area, the label printing module determines the standard label image area corresponding to the standard advertising image area, and the label printing module judges whether all the captured advertising image areas can correspond to the whole advertising image. If not, it jumps to S221. S224. The label printing module generates comparison label images using different standard label image areas corresponding to all the captured advertising image areas.

[0026] Specifically, the detailed process of step S22 is described here. In step S221, an advertising image region of a certain size, centered on any image element, is extracted from the advertising image. The size of the advertising image region is the same as the size of the standard advertising image region and the standard label image region. In step S222, the similarity value between the advertising image region and all standard advertising image regions in the image database is calculated. The calculation method will be described below. Different similarity values ​​are sorted in descending order, and the different standard advertising image regions corresponding to the first similarity value in the sorted list are selected. Different standard advertising image regions are all quite similar to the advertising image region. In step S223, for each standard advertising image region, the corresponding standard advertising image region is determined. Standard label image areas are used to correspond one advertising image area to multiple standard label image areas. Then, it's determined whether all the cropped advertising image areas correspond to the entire advertising image. If not, proceed to S221 to continue cropping advertising image areas of a certain size centered on other image elements. If yes, continue to step S224. In step S224, a large number of standard label image areas corresponding to all the cropped advertising image areas are used to generate comparison label images. For ease of understanding, for example, advertising image area A corresponds to standard label image areas A to D. Advertising image area A is located in the upper left corner of the image. Therefore, superimposing standard label image areas A to D will yield the upper left corner area of ​​the comparison label image. This method allows for simple and quick generation of comparison label images with the original label image, while also achieving high accuracy.

[0027] Further, in step S224, the label printing module calculates the image element values ​​of the image elements in the comparison label image using the following formula:

[0028] in, The image element value of the image element. This represents the total number of standard label image regions corresponding to each image element. For the image element corresponding to the first Image element values ​​of corresponding image elements in a standard label image area. For the image element corresponding to the first The same degree value corresponding to each standard label image area.

[0029] Specifically, as described above, each image element in the comparison label image corresponds to an image element at the same position in multiple standard label image regions. Here, "position" refers to the image element's location in the image coordinate system. The image element value for each image element in the comparison label image can be calculated using the formula described above. The image element value representing an image element in the comparison label image. This represents the total number of standard label image regions corresponding to this image element. For the first corresponding image element The image element value of the corresponding image element in the standard label image area, and the position of the corresponding image element is the same as the position of this image element. This represents the first corresponding image element. The similarity values ​​corresponding to the standard label image regions are calculated using the above formula to determine the image element value of each image element in the comparison label image, thus ensuring the accuracy of the generated comparison label image.

[0030] Furthermore, in step S222, the label printing module calculates the similarity value between the advertising image area and the standard advertising image area in the database, and also includes the following steps: S2221. The label printing module selects several image element combinations consisting of two different image elements from the advertising image area and stores the several image element combinations. At the same time, the label printing module also selects several image element combinations from the standard advertising image area in the same way and stores the several image element combinations. S2222. For each combination of image elements stored for the advertising image area, the label printing module calculates the difference between the image element values ​​of two image elements in the combination, sets a first value and a second value based on the difference, connects all the first values ​​to form the first representative value of the advertising image area, connects all the second values ​​to form the second representative value of the advertising image area, and the label printing module obtains the first representative value and the second representative value of the standard advertising image area in the same way. S2223. The label printing module divides the image element combination of the first preset second number stored for the advertising image area into the first category, and divides the other image element combination stored for the advertising image area into the second category. At the same time, the label printing module divides the image element combination of the first preset second number stored for the standard advertising image area into the third category, and divides the other image element combination stored for the standard advertising image area into the fourth category. S2224. For the combination of image elements in the first and third categories, the label printing module calculates a first similarity value based on the first representative value of the advertising image area and the first representative value of the standard advertising image area. For the combination of image elements in the second and fourth categories, the label printing module calculates a second similarity value based on the second representative value of the advertising image area and the second representative value of the standard advertising image area. The label printing module also calculates the sum of the first similarity value and the second similarity value as the similarity value. Furthermore, the data length of the first and second values ​​is one bit.

[0031] Specifically, this section describes how to calculate the similarity value between an advertising image region and a standard advertising image region. In step S2221, several image element combinations are selected from the advertising image region, each combination consisting of two different image elements. These selected image element combinations are stored sequentially. Similarly, several identical image element combinations are selected from the standard advertising image region in the same order and stored sequentially. Here, "sameness" means that the positions of the two image elements in the two image element combinations are the same. In step S2222, for each image element combination stored in the advertising image region, the image element similarity value between the two image elements in the combination is calculated. For example, regarding the difference in element values, a first value and a second value are set based on the difference. Specifically, the difference is first compared to a difference threshold 1. If the difference is greater than threshold 1, the first value is set to 1; otherwise, it is set to 0. Then, the absolute value of the difference is compared to a difference threshold 2. If the difference is greater than threshold 2, the second value is set to 1; otherwise, it is set to 0. The difference thresholds 1 and 2 can be set according to the actual application scenario and are not specifically limited. After performing the above processing on each combination of image elements, connecting all the first values ​​forms the first representative value of the advertising image area, and connecting all the second values ​​forms the second representative value of the advertising image area. The order in which the above processing is performed on different combinations of image elements is the same as the order in which different combinations of image elements are stored. Similarly, the first representative value and the second representative value of the standard advertising image area can be obtained. In step S2223, the first and second number of image element combinations stored for the advertising image area are classified into the first category, and the other image element combinations stored for the advertising image area are classified into the second category. Similarly, the first and second number of image element combinations stored for the standard advertising image area are classified into the third category, and the other image element combinations stored for the standard advertising image area are classified into the fourth category. In step S2224, for the image element combinations in the first and third categories, based on the first value of the advertising image area... The first similarity value is calculated based on the first representative value of the advertising image region and the first representative value of the standard advertising image region. Specifically, this involves calculating the distance between the second most significant digit of the first representative value of the advertising image region and the second most significant digit of the first representative value of the standard advertising image region. For example, the Euclidean distance formula can be used. The reciprocal of this distance is then taken as the first similarity value. For combinations of image elements in the second and fourth categories, a second similarity value is calculated based on the second representative value of the advertising image region and the second representative value of the standard advertising image region. Specifically, this involves calculating the distance between all the least significant digits of the second representative value of the advertising image region and all the least significant digits of the second representative value of the standard advertising image region.The lower digits refer to all values ​​except the second digit in the higher digits. The reciprocal of the distance is then used as the second similarity value. Finally, the sum of the first and second similarity values ​​is calculated as the overall similarity score. This method allows for accurate calculation of the similarity score.

[0032] According to another aspect of the embodiments of the present invention, reference is made to... Figure 3 As shown, a label printing system based on pre-packaged goods is also provided, including a control module, a label preparation module, a label printing module, a goods preparation module, and a labeling processing module, to implement the label printing method based on pre-packaged goods described above.

[0033] The functions of each module are as follows: The control module is used to send a start printing command to the label preparation module and to receive error messages from the label preparation module, the label printing module, and the product preparation module. The label preparation module is used to prepare labels and check the prepared labels. If a label is found to be unqualified, it sends a label error message to the control module. The label printing module is used to determine the printing mode based on the advertising image, print labels containing the advertising image, and check the printed labels. If a label is found to be unqualified, it sends a label error message to the control module. The product preparation module is used to check whether the product packaging is intact. If it is incomplete, it sends a product error message to the control module. The labeling module is used for peeling off labels and, when the product packaging is intact, determining the labeling position based on the size of the product packaging and then applying the label accordingly.

[0034] According to another aspect of the present invention, an apparatus is also provided, including a memory and a processor, the memory being used to store a computer program, and the processor being used to implement the method of any one of the above when executing the computer program.

[0035] According to another aspect of the present invention, a storage medium is also provided, which stores program instructions, wherein the program instructions, when executed, control the device where the storage medium is located to perform any of the methods described above.

[0036] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0037] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0038] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0039] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

[0040] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A label printing method for pre-packaged goods, applied to a label printing system for pre-packaged goods, the system comprising a control module, a label preparation module, a label printing module, a goods preparation module, and a labeling processing module, characterized in that... The method includes the following steps: S1. The control module sends a start printing command to the label preparation module, and the label preparation module prepares the label and checks the prepared label. If the label is found to be unqualified, the label preparation module sends a label error message to the control module. S2. The label printing module determines the printing mode based on the advertising image and prints labels containing the advertising image. The label printing module also checks the printed labels. If a label is found to be unqualified, the label printing module sends a label error message to the control module. The label printing module stores several standard advertising images and corresponding standard label images in an image database. A standard label image refers to a label image corresponding to a historically qualified printed label, and a standard advertising image refers to an advertising image corresponding to a label image that was historically qualified. The label printing module also determines several central image elements and extracts a standard advertising image area of ​​a preset size centered on each central image element from the standard advertising images. Simultaneously, it extracts a standard label image area of ​​a preset size centered on each central image element from the corresponding standard label images. The label printing module stores the standard advertising image areas and the corresponding standard label image areas in the image database. S3. The labeling module performs label peeling, and the product preparation module checks whether the product packaging is intact. If it is incomplete, the product preparation module sends a product error message to the control module. If it is intact, the labeling module determines the labeling position according to the size of the product packaging and performs labeling according to the labeling position. In step S2, the label printing module inspects the printed labels, including the following steps: S21. The label printing module automatically generates an advertising image containing the advertising screen, and at the same time, the label printing module takes a picture of the printed label to obtain the label image; S22. The label printing module determines the comparison label image corresponding to the advertising image based on the advertising image in its own image database. S22 includes the following steps: S221. The label printing module extracts an advertising image area of ​​a preset size centered on any one image element from the advertising image; S222. The label printing module calculates the similarity value between the advertising image area and all standard advertising image areas in the image database, sorts the different similarity values ​​in descending order, and selects the different standard advertising image areas corresponding to the first preset similarity value in the sorted order. The different standard advertising image areas are all quite similar to the advertising image area. S223. For each standard advertising image area, the label printing module determines the standard label image area corresponding to the standard advertising image area, and the label printing module determines whether all the captured advertising image areas can correspond to the whole advertising image. If not, it jumps to S221. S224. The label printing module generates comparison label images using different standard label image regions corresponding to all the captured advertising image regions; S23. The label printing module compares the image elements in the label image at the same position with the image elements in the comparison label image, and calculates the difference between the image element values ​​of the two. If the difference is greater than the preset difference threshold, the image element in the label image corresponding to the difference is regarded as the problem image element. S24. If the total number of problematic image elements is greater than a preset total number threshold, the label printing module determines that the printed label is unqualified.

2. The method according to claim 1, characterized in that, In step S224, the label printing module calculates the image element values ​​of the image elements in the comparison label image using the following formula: ; in, The image element value of the image element. This represents the total number of standard label image regions corresponding to each image element. For the image element corresponding to the first Image element values ​​of corresponding image elements in a standard label image area. For the image element corresponding to the first The similarity values ​​corresponding to the standard label image regions are calculated using the above formula to determine the image element value of each image element in the comparison label image, thus ensuring the accuracy of the generated comparison label image.

3. The method according to claim 1, characterized in that, In step S222, the label printing module calculates the similarity value between the advertising image area and the standard advertising image area in the database, including the following steps: S2221. The label printing module selects several image element combinations consisting of two different image elements from the advertising image area and stores the several image element combinations. At the same time, the label printing module also selects several image element combinations from the standard advertising image area in the same way and stores the several image element combinations. S2222. Regarding each combination of image elements stored for the advertising image area, the label printing module calculates the difference between the image element values ​​of two image elements in the image element combination, sets a first value and a second value based on the difference, connects all the first values ​​to form a first representative value of the advertising image area, connects all the second values ​​to form a second representative value of the advertising image area, and the label printing module obtains the first representative value and the second representative value of the standard advertising image area using the same method. S2223. The label printing module divides the image element combination of the first preset second number stored for the advertising image area into a first category, and divides the other image element combination stored for the advertising image area into a second category. At the same time, the label printing module divides the image element combination of the first preset second number stored for the standard advertising image area into a third category, and divides the other image element combination stored for the standard advertising image area into a fourth category. S2224. For image element combinations in the first and third categories, the label printing module calculates a first similarity value based on the first representative value of the advertising image area and the first representative value of the standard advertising image area. For image element combinations in the second and fourth categories, the label printing module calculates a second similarity value based on the second representative value of the advertising image area and the second representative value of the standard advertising image area. The label printing module also calculates the sum of the first and second similarity values ​​as the similarity value.

4. The method according to claim 3, characterized in that, The data length of the first and second values ​​is one bit.

5. A device, characterized in that, The system includes a memory and a processor, the memory being used to store a computer program, and the processor being used to implement the method as described in any one of claims 1 to 4 when executing the computer program.

6. A storage medium, characterized in that, The storage medium stores program instructions, wherein when the program instructions are executed, they control the device where the storage medium is located to perform the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Label detection device and label detection method

    CN112990209A

  • Defect detection method for adaptively matching bottle body label based on template

    CN113537301A

  • Label data processing system

    CN112292687A

  • Intelligent label pasting device for logistics packaging

    CN113879655A