Label printing method, system and equipment based on pre-packaged commodity and storage medium

By generating advertising images and automatically generating comparison label images, and using image element difference calculations, the problem of difficulty in detecting label appearance defects in the existing technology is solved, and efficient evaluation and improvement of label printing quality are achieved.

CN118651503AActive Publication Date: 2024-09-17BEIJING EGGPLANT BEAN NETWORK TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology is difficult to generate accurate comparison images when detecting appearance defects of labels, which affects the evaluation of label printing quality.

Method used

By generating advertising images and automatically generating comparison label images, the difference calculation of image elements is used to check whether the printed labels are qualified, and the historical label image database is combined to improve the comparison accuracy.

Benefits of technology

It realizes simple, fast and accurate label image comparison, ensures the accuracy of printing quality evaluation, and improves the pass rate of label printing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118651503A
    Figure CN118651503A
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and particularly relates to a label printing method, system and device based on pre-packaged commodities and a storage medium, and the method comprises the steps that S1, a label paper preparation module prepares label paper, and sends label paper error reporting information to a control module under the condition that the label paper is checked to be unqualified; s2, the label printing module determines a printing mode according to the advertisement picture, prints a label containing the advertisement picture, and sends label error reporting information to the control module under the condition that the label is checked to be unqualified; and S3, the labeling processing module carries out label stripping processing, the commodity preparation module checks whether a commodity package is complete or not, if not, commodity error reporting information is sent to the control module, and if yes, the labeling processing module determines a labeling position and carries out labeling processing. According to the method and the device, the comparison label picture which is compared with the label picture can be conveniently generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and in particular relates to a label printing method, system, device and storage medium based on pre-packaged goods. Background Art

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

[0003] A similar prior art is a Chinese patent application with publication number CN112990209A, which proposes a label detection device and a corresponding label detection method. The label detection device includes: a server, a platform, which allows label paper to move in itself under the control of the server; and a collection unit, which is arranged in the platform and obtains label images of label paper moving in the platform under the control of the server. The server performs image recognition on the label image received from the collection unit to extract actual label data, and compares the actual label data with the stored theoretical label data. However, this patent application does not detect the appearance defects of the label based on the label image. In addition, similar prior art includes a Chinese patent application with publication number CN113537301A, which discloses a defect detection method for bottle labels based on template adaptive matching, including the steps of: segmenting the target label according to coordinate attributes to form multiple label bodies, and making corresponding detection templates for the multiple label bodies; preprocessing the collected bottle image to form a label image, the preprocessing includes segmentation of the bottle label, position correction and coordinate recording; using the detection function to call the detection template to detect the corresponding label image, output the detection result, and can detect the appearance defects of the bottle label, etc. However, there is a technical problem in this patent application that it is difficult to generate a comparison image of the label image. Summary of the invention

[0004] The present invention generates an advertisement picture including an advertisement screen, and simultaneously photographs a printed label to obtain a label picture, and automatically generates a comparison label picture corresponding to the advertisement picture according to the advertisement picture, thereby checking whether the printed label is qualified by comparing the label picture with the comparison label picture. The present invention aims to simply and quickly generate a comparison label picture with high accuracy.

[0005] In order to achieve the above-mentioned object of the invention, the present invention provides the following label printing method based on pre-packaged goods, which mainly includes the following steps:

[0006] S1, the control module sends a start printing command to the label paper preparation module, and the label paper preparation module prepares the label paper and checks the prepared label paper. If the label paper is found to be unqualified, the label paper preparation module sends a label paper error message to the control module;

[0007] S2, the label printing module determines the printing mode according to the advertising picture, and prints the label containing the advertising picture, and the label printing module checks the printed label, and when the label is found to be unqualified, the label printing module sends label error information to the control module;

[0008] S3, the labeling processing module performs label stripping processing, and the commodity preparation module checks whether the commodity packaging is complete. If it is incomplete, the commodity preparation module sends commodity error information to the control module. If it is complete, the labeling processing module determines the labeling position according to the size of the commodity packaging, and performs labeling processing according to the labeling position;

[0009] In S2, the label printing module checks the printed label, including the following steps:

[0010] S21, the label printing module automatically generates an advertisement picture including an advertisement screen, and at the same time, the label printing module takes a photo of the printed label to obtain a label picture;

[0011] S22, the label printing module determines, in its own image database, a comparison label image corresponding to the advertisement image based on the advertisement image;

[0012] S23, the label printing module compares the image element in the label image at the same position with the image element in the comparison label image, and calculates the difference between the image element values ​​of the two. When the difference is greater than a preset difference threshold, the image element in the label image corresponding to the difference is regarded as a problem image element;

[0013] S24. When 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.

[0014] As a preferred technical solution of the present invention, the label printing module stores a number of standard advertising pictures and standard label pictures corresponding to the number of standard advertising pictures in a picture database, wherein a standard label picture refers to a label picture corresponding to a printed label that has been historically judged to be qualified, and a standard advertising picture refers to an advertising picture corresponding to a label picture corresponding to a printed label that has been historically judged to be qualified.

[0015] As a preferred technical solution of the present invention, the label printing module also determines a number of central image elements, and respectively cuts out standard advertising image areas of preset sizes centered on each central image element from the standard advertising image, and also respectively cuts out standard label image areas of preset sizes centered on each central image element from the standard label image corresponding to the standard advertising image, and the label printing module stores the standard advertising image areas and the corresponding standard label image areas in the image database accordingly.

[0016] As a preferred technical solution of the present invention, S22 comprises the following steps:

[0017] S221, the label printing module intercepts an advertisement picture area of ​​a preset size centered on any image element in the advertisement picture;

[0018] S222, the label printing module calculates the degree of identity between the advertisement image area and all the standard advertisement image areas in the image database, sorts the different degree of identity values ​​in descending order, and selects the different standard advertisement image areas corresponding to the first number of degree of identity values ​​that are ranked first;

[0019] S223, for each standard advertisement image area, the label printing module determines a standard label image area corresponding to the standard advertisement image area, and the label printing module determines whether all the intercepted advertisement image areas can correspond to the entire advertisement image, and if not, jumps to S221;

[0020] S224: The label printing module generates a comparison label image using different standard label image areas corresponding to all intercepted advertisement image areas.

[0021] As a preferred technical solution of the present invention, the label printing module calculates the image element value of the image element in the comparison label image by the following formula:

[0022]

[0023] in, is the image element value of the image element, is the total number of standard label image areas corresponding to the image elements, is the image element corresponding to The image element values ​​of the corresponding image elements in the standard label image regions, is the image element corresponding to The same degree values ​​corresponding to the standard label image areas.

[0024] As a preferred technical solution of the present invention, the label printing module calculates the degree of similarity between the advertisement image area and the standard advertisement image area in the database, including the following steps:

[0025] S2221, the label printing module selects a plurality of image element combinations consisting of two different image elements from the advertisement image area, and stores the plurality of image element combinations; at the same time, the label printing module also selects a plurality of image element combinations from the standard advertisement image area by the same method, and stores the plurality of image element combinations;

[0026] S2222, for each image element combination stored in 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 by the same method;

[0027] S2223, the label printing module classifies the image element combinations before the preset second number stored in the advertising image area into the first category, and classifies the other image element combinations stored in the advertising image area into the second category, and at the same time, the label printing module classifies the image element combinations before the preset second number stored in the standard advertising image area into the third category, and classifies the other image element combinations stored in the standard advertising image area into the fourth category;

[0028] S2224. For the image element combinations in the first category and the third category, the label printing module calculates a first degree of 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 image element combinations in the second category and the fourth category, the label printing module calculates a second degree of 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 calculates the sum of the first degree of similarity value and the second degree of similarity value as the degree of similarity value.

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

[0030] The present invention also provides a label printing system based on pre-packaged goods, comprising the following modules:

[0031] The control module is used to send a start printing command to the label preparation module, and receive error messages sent by the label preparation module, the label printing module, and the product preparation module;

[0032] The label preparation module is used to prepare the label and check the prepared label. If the label is found to be unqualified, a label error message is sent to the control module.

[0033] The label printing module is used to determine the printing mode according to the advertising picture, print the label containing the advertising picture, and check the printed label. If the label is found to be unqualified, the label error information is sent to the control module;

[0034] The product preparation module is used to check whether the product packaging is complete. If it is incomplete, it sends a product error message to the control module;

[0035] The labeling processing module is used to perform label stripping processing, and when the product packaging is complete, determine the labeling position according to the size of the product packaging, and perform labeling processing according to the labeling position.

[0036] The present invention also provides a device, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement any one of the above-mentioned methods when executing the computer program.

[0037] The present invention also provides a storage medium, wherein the storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute any one of the above methods.

[0038] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0039] In the present invention, first, the label preparation module prepares the label and checks the prepared label. If the label is found to be unqualified, the label error message is sent to the control module. Secondly, the label printing module determines the printing mode according to the advertising screen, and prints the label containing the advertising screen. It also obtains the advertising picture and the label picture, generates a comparison label picture according to the advertising picture, and checks the printed label by comparing the label picture with the comparison label picture. If the label is found to be unqualified, the label error message is sent to the control module. Finally, the label processing module performs the label stripping process. The product preparation module checks whether the product packaging is complete. If it is incomplete, the product preparation module sends the product error message to the control module. If it is complete, the label processing module determines the labeling position according to the size of the product packaging, and performs the labeling process according to the labeling position. Through the present invention, the comparison label picture for comparison with the label picture can be simply and quickly generated from the advertising picture, and the accuracy of the comparison label picture is also relatively high, so that an accurate inspection result of the label can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a flow chart of the label printing method based on pre-packaged goods of the present invention;

[0041] Figure 2 A flow chart of checking a printed label according to the present invention;

[0042] Figure 3 The figure is a structural diagram of the label printing system based on pre-packaged goods of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0044] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.

[0045] The present invention provides Figure 1 and Figure 2 The label printing method based on pre-packaged goods shown is applied to a label printing system based on pre-packaged goods. The printing method is mainly implemented by executing the following steps:

[0046] 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;

[0047] S2, the label printing module determines the printing mode according to the advertisement picture, and prints the label containing the advertisement picture, and the label printing module 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;

[0048] S3, the labeling processing module performs label peeling processing, and the product preparation module checks whether the product packaging is complete. If it is incomplete, the product preparation module sends a product error message to the control module. If it is complete, the labeling processing module determines the labeling position according to the size of the product packaging and performs labeling processing according to the labeling position.

[0049] Specifically, the main process of printing labels is introduced through steps S1 to S3. In step S1, when it is necessary to print labels, the control module sends a start printing command to the label preparation module, and the label preparation module prepares the label. When the overall advertising picture is light-colored, glossy label is prepared; when the overall advertising picture is dark, matte label is prepared. The prepared label is checked to see if it is stained, wrinkled, or has adhesive failure. If the label is found to be unqualified, the label preparation module sends a label error message to the control module. Otherwise, continue to step S2. In step S2, the label printing module determines the printing mode according to the advertising picture. Thereby, the label containing the advertising picture is printed. It should be noted that the label printing module checks the printed label. If the label is found to be unqualified, the unqualified label is discarded, so that only qualified printed labels are retained. The label printing module sends a label error message to the control module. Otherwise, continue with step S3. In step S3, the labeling processing module performs label peeling processing. The product preparation module checks whether the product packaging is complete. If it is incomplete, the product preparation module sends a product error message to the control module. Otherwise, the labeling processing module determines the labeling position according to the size of the product packaging, so that the label is located in the center of the product packaging, and performs labeling processing according to the labeling position.

[0050] Furthermore, in step S2, the label printing module checks the printed label, including the following steps:

[0051] S21, the label printing module automatically generates an advertisement picture including an advertisement picture, and at the same time, the label printing module takes a photo of the printed label to obtain the label picture;

[0052] S22, the label printing module determines, in its own image database, a comparison label image corresponding to the advertisement image based on the advertisement image;

[0053] S23, the label printing module compares the image element in the label image at the same position with the image element in the comparison label image, and calculates the difference between the image element values ​​of the two. When the difference is greater than a preset difference threshold, the image element in the label image corresponding to the difference is regarded as a problem image element;

[0054] S24. When 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.

[0055] Specifically, the steps of checking the printed label are introduced here. In step S21, the label printing module automatically generates an advertising picture including the advertising picture. The advertising picture can be generated by using, for example, CAD data when designing the advertising picture. The label printing module also takes a photo of the printed label to obtain the label picture. In step S22, the label printing module determines the comparison label picture corresponding to the advertising picture from its own picture database. The detailed process will be described below. In step S23, the label printing module compares the image elements in the label picture and the image elements in the comparison label picture at the same position in the two picture coordinate systems according to the picture coordinate systems of the label picture and the comparison label picture, and calculates the difference between the image element values ​​of the two. If the difference is greater than the difference threshold, the image element in the label picture corresponding to the difference is regarded as a problem image element. In step S24, the label printing module determines whether the total number of problem image elements is greater than the total number threshold. If so, the printed label is determined to be unqualified. It should be noted that the resolutions of the different pictures mentioned in this embodiment are the same.

[0056] Further, the label printing module stores a number of standard advertising pictures and standard label pictures respectively corresponding to the number of standard advertising pictures in the picture database, wherein the standard label pictures refer to label pictures corresponding to printed labels that have been determined to be qualified in history, and the standard advertising pictures refer to advertising pictures corresponding to label pictures corresponding to printed labels that have been determined to be qualified in history;

[0057] Furthermore, the label printing module also determines a number of central image elements, and respectively cuts out standard advertising image areas of preset sizes centered on each central image element from the standard advertising image, and also respectively cuts out standard label image areas of preset sizes centered on each central image element from the standard label image corresponding to the standard advertising image, and the label printing module stores the standard advertising image areas and the corresponding standard label image areas in the image database accordingly.

[0058] Specifically, the label printing module stores a combination of multiple standard advertising images and standard label images in its own image database. The standard advertising image is an advertising image corresponding to a label image corresponding to a printed label that has been historically determined to be qualified. The standard label image is a label image corresponding to a printed label that has been historically determined to be qualified. In addition, the label printing module also stores a combination of multiple standard advertising image areas and standard label image areas in its own image database. Here, it is introduced how the combination of multiple standard advertising image areas and standard label image areas is generated. First, several central image elements with the same position are simultaneously determined in the standard advertising image and the standard label image corresponding to the standard advertising image. The position here refers to the position of the image element in the image coordinate system. Secondly, standard advertising image areas of a certain size centered on each central image element are respectively intercepted from the standard advertising image. At the same time, standard label image areas of a certain size centered on each central image element are respectively intercepted from the standard label image. Finally, the standard advertising image area and the standard label image area corresponding to the central image element with the same position are taken as a combination. It should be noted that the multiple standard advertising image areas and the multiple standard label image areas corresponding to the multiple central image elements can respectively cover the entirety of the standard advertising image and the standard label image.

[0059] Furthermore, step S22 also includes the following steps:

[0060] S221, the label printing module intercepts an advertisement picture area of ​​a preset size centered on any image element in the advertisement picture;

[0061] S222, the label printing module calculates the degree of identity between the advertisement image area and all the standard advertisement image areas in the image database, sorts the different degree of identity values ​​in descending order, and selects the different standard advertisement image areas corresponding to the first number of degree of identity values ​​that are ranked first;

[0062] S223, for each standard advertisement image area, the label printing module determines a standard label image area corresponding to the standard advertisement image area, and the label printing module determines whether all intercepted advertisement image areas can correspond to the entire advertisement image, and if not, jumps to S221;

[0063] S224: The label printing module generates a comparison label image using different standard label image areas corresponding to all the captured advertisement image areas.

[0064] Specifically, the detailed process of step S22 is introduced here. In step S221, an advertising image area of ​​a certain size centered on any image element is intercepted in the advertising image. The size of the advertising image area is the same as the size of the standard advertising image area and the standard label image area. In step S222, the sameness value between the advertising image area and all the standard advertising image areas in the image database is calculated. The calculation method will be described below. Different sameness values ​​are sorted in order from large to small, and different standard advertising image areas corresponding to the first sameness value of the sorted number are selected. Different standard advertising image areas are relatively similar to the advertising image area. In step S223, for each standard advertising image area, the corresponding standard advertising image area is determined. Standard label image area, so that one advertising image area corresponds to multiple standard label image areas, and then determine whether all the intercepted advertising image areas can correspond to the entire advertising image. If not, jump to S221 and continue to intercept 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 intercepted advertising image areas are used to generate a comparison label image. For ease of understanding, for example, advertising image area A corresponds to standard label image area A to standard label image area D, and advertising image area A is located in the upper left corner of the image. Then, by superimposing standard label image area A to standard label image area D, the upper left corner area of ​​the comparison label image can be obtained. Through the above method, a comparison label image for comparison with the label image can be generated simply and quickly, and the accuracy of the comparison label image is high.

[0065] Furthermore, in step S224, the label printing module calculates the image element value of the image element in the comparison label image by the following formula:

[0066]

[0067] in, is the image element value of the image element, is the total number of standard label image areas corresponding to the image elements, is the image element corresponding to The image element values ​​of the corresponding image elements in the standard label image regions, is the image element corresponding to The same degree values ​​corresponding to the standard label image areas.

[0068] Specifically, according to the above content, it can be known that each image element in the comparison label image corresponds to the image element at the same position in multiple standard label image areas. The position here refers to the position of the image element in the image coordinate system. The image element value of each image element in the comparison label image can be calculated by the above formula. Represents the image element value of an image element in the comparison label image, Represents the total number of standard label image areas corresponding to this image element, The image element corresponds to The image element value of the corresponding image element in the standard label image area, the position of the corresponding image element is the same as the position of this image element, Represents the image element corresponding to The same degree value corresponding to the standard label image area is calculated by the above formula to calculate the image element value of each image element in the comparison label image, which can ensure the accuracy of the generated comparison label image.

[0069] Furthermore, in step S222, the label printing module calculates the degree of similarity between the advertisement image area and the standard advertisement image area in the database, and further includes the following steps:

[0070] S2221, the label printing module selects a plurality of image element combinations consisting of two different image elements from the advertisement image area, and stores the plurality of image element combinations. At the same time, the label printing module also selects a plurality of image element combinations from the standard advertisement image area by the same method, and stores the plurality of image element combinations.

[0071] S2222: For each image element combination stored in 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 through the same method;

[0072] S2223, the label printing module classifies the image element combinations before the preset second number stored in the advertising image area into the first category, and classifies the other image element combinations stored in the advertising image area into the second category, and at the same time, the label printing module classifies the image element combinations before the preset second number stored in the standard advertising image area into the third category, and classifies the other image element combinations stored in the standard advertising image area into the fourth category;

[0073] S2224: For the image element combinations in the first category and the third category, the label printing module calculates a first identical degree value based on the first representative value of the advertisement image area and the first representative value of the standard advertisement image area; for the image element combinations in the second category and the fourth category, the label printing module calculates a second identical degree value based on the second representative value of the advertisement image area and the second representative value of the standard advertisement image area, and the label printing module calculates the sum of the first identical degree value and the second identical degree value as the identical degree value;

[0074] Furthermore, the data length of the first value and the second value is one bit.

[0075] Specifically, this article introduces how to calculate the degree of similarity between an advertising picture area and a standard advertising picture area. In step S2221, a plurality of image element combinations are selected from the advertising picture area, each image element combination is composed of two different image elements, and the selected plurality of image element combinations are stored in sequence. Similarly, a plurality of identical image element combinations are selected from the standard advertising picture area in the same order, and the selected plurality of image element combinations are stored in sequence. The same here means that the positions of the two image elements contained in the two image element combinations correspond to each other. In step S2222, for each image element combination stored for the advertising picture area, the image of the two image elements in the image element combination is calculated. The difference of the image element values ​​is used to set the first value and the second value based on the difference. Specifically, the difference is first compared with the difference threshold 1. If the difference is greater than the difference threshold 1, the first value is set to 1, otherwise, the first value is set to 0. Then, the absolute value of the difference is compared with the difference threshold 2. If the difference is greater than the difference threshold 2, the second value is set to 1, otherwise, the second value is set to 0. The difference threshold 1 and the difference threshold 2 can be set in actual application scenarios without specific restrictions. After the above processing is performed on each image element combination, connecting all the first values ​​can form a first representative value of the advertising image area, and connecting all the second values ​​can form a second representative value of the advertising image area. The order of performing the above processing on different image element combinations is the same as the order of storing different image element combinations. Similarly, the first representative value and the second representative value of the standard advertising picture area can be obtained. In step S2223, the first two numbers of image element combinations stored for the advertising picture area are divided into the first category, and the other image element combinations stored for the advertising picture area are divided into the second category. Similarly, the first two numbers of image element combinations stored for the standard advertising picture area are divided into the third category, and the other image element combinations stored for the standard advertising picture area are divided into the fourth category. In step S2224, for the image element combinations in the first category and the third category, based on the first The first sameness value is calculated based on the representative value and the first representative value of the standard advertising image area. The specific method is to calculate the distance between the value of the second number of the high digit of the first representative value of the advertising image area and the value of the second number of the high digit of the first representative value of the standard advertising image area. For example, the Euclidean distance calculation formula can be used, and then the reciprocal of the distance is used as the first sameness value. For the image element combinations in the second category and the fourth category, the second sameness value is calculated based on the second representative value of the advertising image area and the second representative value of the standard advertising image area. The specific method is to calculate the distance between all the values ​​of the low digits of the second representative value of the advertising image area and all the values ​​of the low digits of the second representative value of the standard advertising image area.All the values ​​of the lower digit refer to all the values ​​except the value of the second number of the higher digit. Then the reciprocal of the distance is used as the second similarity value. Finally, the sum of the first similarity value and the second similarity value is calculated as the similarity value. Through the above method, the similarity value can be accurately calculated.

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

[0077] The functions of each module are as follows:

[0078] The control module is used to send a start printing command to the label preparation module, and receive error messages sent by the label preparation module, the label printing module, and the product preparation module;

[0079] The label preparation module is used to prepare the label and check the prepared label. If the label is found to be unqualified, a label error message is sent to the control module.

[0080] The label printing module is used to determine the printing mode according to the advertising picture, print the label containing the advertising picture, and check the printed label. If the label is found to be unqualified, the label error information is sent to the control module;

[0081] The product preparation module is used to check whether the product packaging is complete. If it is incomplete, it sends a product error message to the control module;

[0082] The labeling processing module is used to perform label stripping processing, and when the product packaging is complete, determine the labeling position according to the size of the product packaging, and perform labeling processing according to the labeling position.

[0083] According to another aspect of an embodiment of the present invention, there is further provided a device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement any one of the above methods when executing the computer program.

[0084] According to another aspect of an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores program instructions, wherein when the program instructions are executed, a device where the storage medium is located is controlled to execute any one of the above methods.

[0085] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0086] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may 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. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0087] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned 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.

[0088] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0089] The above are only preferred embodiments of the present invention and are 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 in the protection scope of the present invention.

Claims

1. A label printing method based on pre-packaged goods, applied to a label printing system based on pre-packaged goods, the system comprising a control module, a label preparation module, a label printing module, a commodity preparation module, and a label processing module, characterized in that: The method comprises the following steps: S1, the control module sends a start printing command to the label paper preparation module, and the label paper preparation module prepares the label paper and checks the prepared label paper. If the label paper is found to be unqualified, the label paper preparation module sends a label paper error message to the control module; S2, the label printing module determines the printing mode according to the advertising picture, and prints the label containing the advertising picture, and the label printing module checks the printed label, and when the label is found to be unqualified, the label printing module sends label error information to the control module; S3, the labeling processing module performs label stripping processing, and the commodity preparation module checks whether the commodity packaging is complete. If it is incomplete, the commodity preparation module sends commodity error information to the control module. If it is complete, the labeling processing module determines the labeling position according to the size of the commodity packaging, and performs labeling processing according to the labeling position; In S2, the label printing module checks the printed label, including the following steps: S21, the label printing module automatically generates an advertising picture including an advertising picture, and at the same time, the label printing module takes a photo of the printed label to obtain a label picture; S22, the label printing module determines, in its own image database, a comparison label image corresponding to the advertisement image based on the advertisement image; S23, the label printing module compares the image element in the label image at the same position with the image element in the comparison label image, and calculates the difference between the image element values ​​of the two. When the difference is greater than a preset difference threshold, the image element in the label image corresponding to the difference is regarded as a problem image element; S24. When 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 The label printing module stores several standard advertising pictures and standard label pictures corresponding to the several standard advertising pictures in a picture database, wherein the standard label pictures refer to label pictures corresponding to printed labels that have been historically judged to be qualified, and the standard advertising pictures refer to advertising pictures corresponding to label pictures corresponding to printed labels that have been historically judged to be qualified.

3. The method according to claim 2, characterized in that The label printing module also determines a number of central image elements, and respectively cuts out standard advertising image areas of preset sizes centered on each central image element from the standard advertising image, and also simultaneously cuts out standard label image areas of preset sizes centered on each central image element from the standard label image corresponding to the standard advertising image, and the label printing module stores the standard advertising image areas and the corresponding standard label image areas in the image database accordingly.

4. The method according to claim 3, characterized in that The S22 comprises the following steps: S221, the label printing module intercepts an advertisement picture area of ​​a preset size centered on any image element in the advertisement picture; S222, the label printing module calculates the degree of identity between the advertisement image area and all the standard advertisement image areas in the image database, sorts the different degree of identity values ​​in descending order, and selects the different standard advertisement image areas corresponding to the first number of degree of identity values ​​that are ranked first; S223, for each standard advertisement image area, the label printing module determines a standard label image area corresponding to the standard advertisement image area, and the label printing module determines whether all the intercepted advertisement image areas can correspond to the entire advertisement image, and if not, jumps to S221; S224: The label printing module generates a comparison label image using different standard label image areas corresponding to all intercepted advertisement image areas.

5. The method according to claim 4, characterized in that In S224, the label printing module calculates the image element value of the image element in the comparison label image by the following formula: in, is the image element value of the image element, is the total number of standard label image areas corresponding to the image elements, is the image element corresponding to The image element values ​​of the corresponding image elements in the standard label image regions, is the image element corresponding to The same degree values ​​corresponding to the standard label image areas.

6. The method according to claim 4, characterized in that In S222, the label printing module calculates the degree of similarity between the advertisement image area and the standard advertisement image area in the database, including the following steps: S2221, the label printing module selects a plurality of image element combinations consisting of two different image elements from the advertisement image area, and stores the plurality of image element combinations; at the same time, the label printing module also selects a plurality of image element combinations from the standard advertisement image area by the same method, and stores the plurality of image element combinations; S2222, for each image element combination stored in 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 by the same method; S2223, the label printing module classifies the image element combinations before the preset second number stored in the advertising image area into the first category, and classifies the other image element combinations stored in the advertising image area into the second category, and at the same time, the label printing module classifies the image element combinations before the preset second number stored in the standard advertising image area into the third category, and classifies the other image element combinations stored in the standard advertising image area into the fourth category; S2224. For the image element combinations in the first category and the third category, the label printing module calculates a first degree of 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 image element combinations in the second category and the fourth category, the label printing module calculates a second degree of 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 calculates the sum of the first degree of similarity value and the second degree of similarity value as the degree of similarity value.

7. The method according to claim 6, characterized in that The data length of the first value and the second value is one bit.

8. A label printing system based on pre-packaged goods, used to implement the method according to any one of claims 1 to 7, characterized in that: Includes the following modules: The control module is used to send a start printing command to the label preparation module, and receive error messages sent by the label preparation module, the label printing module, and the product preparation module; The label preparation module is used to prepare the label and check the prepared label. If the label is found to be unqualified, a label error message is sent to the control module. The label printing module is used to determine the printing mode according to the advertising picture, print the label containing the advertising picture, and check the printed label. If the label is found to be unqualified, the label error information is sent to the control module; The product preparation module is used to check whether the product packaging is complete. If it is incomplete, it sends a product error message to the control module; The labeling processing module is used to perform label stripping processing, and when the product packaging is complete, determine the labeling position according to the size of the product packaging, and perform labeling processing according to the labeling position.

9. A device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement the method according to any one of claims 1 to 7 when executing the computer program.

10. A storage medium, characterized in that: The storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Full-automatic online labeling machine and labeling method

    CN108820426A

  • Labeling condition detecting method and device based on image recognition and labeling control system based on image recognition

    CN109606880A

  • Data recommendation method and device, computer equipment and storage medium

    CN111738800A

  • Label data processing system

    CN112292687A

  • Intelligent label pasting device for logistics packaging

    CN113879655A