A machine vision-based two-dimensional code re-identification detection method

By analyzing inkjet pressure, electrostatic intensity, and equipment vibration data during the coding process, the coding risk characterization value is calculated, and duplicate code areas are identified and warned. This solves the problem of duplicate code defects in QR codes during high-speed printing, and achieves efficient duplicate code detection and uniqueness guarantee.

CN122379176APending Publication Date: 2026-07-14CHANGCHUN JIXING PRINTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGCHUN JIXING PRINTING CO LTD
Filing Date
2026-04-14
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In printing and packaging production lines, when variable QR codes are continuously printed on high-speed roll materials at speeds of tens to hundreds of meters per minute, duplicate codes are easily generated due to reasons such as abnormal data sources, printhead drive disorders, ink malfunctions, or electrostatic interference, causing the QR codes to lose their uniqueness.

Method used

By acquiring inkjet pressure, electrostatic intensity, and vibration data of the inkjet printing equipment during the coding process, corresponding time-domain curves are constructed, the influence coefficients of pressure, electrostatics, and vibration are analyzed, coding risk characterization values ​​are calculated, areas with strong abnormal tendencies for duplicate codes are located, and combined with illumination uniformity and duplicate code detection synchronization values, the coding duplicate status is determined, and alarms or duplicate code content is executed.

Benefits of technology

It enables real-time identification and early warning of duplicate codes, reduces the duplicate code rate, ensures the uniqueness and recognition speed of QR codes, and improves the accuracy and robustness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122379176A_ABST
    Figure CN122379176A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, in particular to a two-dimensional code re-encoding recognition detection method based on machine vision. The method comprises the following steps: acquiring ink jet pressure, electrostatic intensity and vibration data of a code spraying device in a code spraying process; analyzing an ink jet pressure fluctuation time domain curve to determine a pressure influence coefficient; analyzing an electrostatic intensity fluctuation time domain curve to determine an electrostatic influence coefficient; analyzing a vibration time domain curve to determine a vibration influence coefficient; calculating a code spraying risk characteristic value; determining an abnormal tendency of the code spraying process; locating a re-encoding area with a strong abnormal tendency; comparing real-time material winding speed in the code spraying process with a preset shooting speed to determine a re-encoding detection synchronization value; analyzing code spraying environment data to determine illumination uniformity; combining the code spraying risk characteristic value to calculate a re-encoding specific characteristic value; determining a code spraying re-encoding state; and executing alarm output and / or removing re-encoding content. The application comprehensively analyzes the code spraying process and the detection process, recognizes code spraying re-encoding, and guarantees the consistency of two-dimensional codes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method for identifying and detecting duplicate QR codes based on machine vision. Background Technology

[0002] QR codes are a method of recording data symbols using black and white alternating patterns of specific geometric shapes distributed according to certain rules in a two-dimensional plane. With the acceleration of the digitalization process in manufacturing, variable QR code technology with one code per item has been widely used in many industries such as drug traceability, food packaging, electronic product identification, and logistics labels. Printing and packaging companies use inkjet printing equipment to continuously print variable QR codes on high-speed roll materials, giving each product a unique digital identity. Currently, QR code duplicate detection mainly relies on manual sampling, fixed barcode scanners, database-based visual inspection systems, and deep learning-based anti-duplicate code methods. Manual sampling is inefficient, has a high miss rate, and cannot cover all products; fixed barcode scanners are slow and can only compare adjacent codes, not perform global historical code database comparisons; database-based visual inspection systems can achieve high-speed online detection, but they heavily rely on pre-set inkjet data files and cannot independently detect duplicate codes in the data source itself, and the decoding success rate of damaged or distorted QR codes drops significantly; while deep learning-based anti-duplicate code methods do not rely on external data files, their algorithms are complex and computationally expensive, making it difficult to meet the real-time requirements of high-speed roll-to-roll production lines.

[0003] Chinese Patent Publication No. CN113283263A discloses a method for verifying QR code errors, omissions, and duplicate codes. This method includes a QR code generator, a QR code decoding algorithm, and an image similarity comparison algorithm. The QR code generator converts data documents into QR code images. The QR code decoding algorithm decodes the generated QR code images to obtain the data. This invention provides a method for verifying QR code errors, omissions, and duplicate codes before mass printing. It includes QR code decoding and image similarity comparison. Compared to other verification methods, the method used in this invention can more accurately identify data quality problems, and because the verification is performed before printing, it can effectively avoid product scrapping or rework.

[0004] Chinese Patent Publication No. CN109685185A discloses a method for anti-counterfeiting QR codes with double-overlapping and complementary identification. This method divides two QR code images into two complementary parts, and generates two pseudo-code images based on the size, dimensions, and shape of the second part of each QR code image. The two pseudo-code images and the two pseudo-QR code images generated from the first part of each QR code image are printed on two key-plate sheets. The two pseudo-QR code images are then overlaid on the QR code image area of ​​the printed material using two different metameritic inks. Under visible light, the first pseudo-QR code image appears on the QR code image area of ​​the printed material, and under infrared light, the second pseudo-QR code image appears on the QR code image area of ​​the printed material. By using the images on the two key-plate sheets, information from the two QR code images can be obtained, which can be used to identify whether the printed material is counterfeit or infringing.

[0005] However, the existing technology still has the following problems: In the printing and packaging production line, variable QR codes are continuously printed on high-speed roll material at a speed of tens to hundreds of meters per minute. During the printing process, due to reasons such as abnormal data source, printhead drive disorder, ink failure or static interference, duplicate codes are easily generated, causing the QR code to lose its uniqueness. Summary of the Invention

[0006] To address this issue, the present invention provides a machine vision-based method for identifying and detecting duplicate QR codes. This method aims to solve the problem that in printing and packaging production lines, variable QR codes are continuously printed on high-speed roll materials at speeds of tens to hundreds of meters per minute. During the printing process, due to reasons such as abnormal data sources, printhead drive malfunctions, ink failures, or electrostatic interference, duplicate codes are easily generated, causing the QR codes to lose their uniqueness.

[0007] To achieve the above objectives, the present invention provides a machine vision-based method for identifying and detecting duplicate QR codes, comprising: Acquire inkjet pressure, electrostatic intensity, and vibration data of the inkjet printing equipment during the coding process, and construct time-domain curves of inkjet pressure fluctuation, electrostatic intensity fluctuation, and vibration relative to time. The time-domain curve of inkjet pressure fluctuation is analyzed to determine the pressure influence coefficient, the time-domain curve of electrostatic intensity fluctuation is analyzed to determine the electrostatic influence coefficient, and the time-domain curve of vibration is analyzed to determine the vibration influence coefficient. Based on the pressure influence coefficient, the electrostatic influence coefficient, and the vibration influence coefficient, the inkjet printing risk characterization value is calculated to determine the abnormal tendency of the inkjet printing process and locate the duplicate code area with strong abnormal tendency. For areas with strong anomaly tendency and duplicate codes, the real-time roll speed and preset shooting speed during the inkjet printing process are compared to determine the duplicate code detection synchronization value. The inkjet printing environment data is analyzed to determine the illumination uniformity. Combined with the inkjet printing risk characterization value, the duplicate code specific feature value is calculated to determine the inkjet printing duplicate code status. In response to the presence of duplicate inkjet codes, an alarm is output and / or the duplicate code content is removed, and the duplicate code information is recorded in the traceability database.

[0008] Furthermore, the process of determining the pressure influence coefficient includes, Statistical analysis was performed on the time-domain curve of the inkjet pressure fluctuation to extract the pressure fluctuation amplitude sequence and the pressure fluctuation frequency sequence. The root mean square value of the pressure fluctuation amplitude sequence is determined to be the pressure fluctuation intensity. The proportion of frequencies exceeding a preset frequency threshold in the pressure fluctuation frequency sequence is determined as the abnormal fluctuation frequency proportion. The product of the pressure fluctuation intensity and the proportion of the abnormal fluctuation frequency is determined as the pressure influence coefficient.

[0009] Furthermore, the process of determining the electrostatic influence coefficient includes, Feature extraction is performed on the electrostatic intensity fluctuation time-domain curve to determine the peak sequence of electrostatic accumulation and the frequency of electrostatic release events; The percentage of peaks exceeding a preset electrostatic threshold in the electrostatic accumulation peak sequence is defined as the percentage of excessive electrostatic accumulation. The number of times an electrostatic discharge event is triggered per unit time is defined as the electrostatic discharge frequency. The product of the percentage of accumulated static electricity exceeding the standard and the electrostatic discharge frequency is determined to be the electrostatic influence coefficient.

[0010] Furthermore, the process of determining the vibration influence coefficient includes, The vibration time-domain curve is transformed in the frequency domain to extract the root mean square value of vibration acceleration and the peak value of vibration acceleration. The ratio of the root mean square value of the vibration acceleration to the preset vibration reference value is determined as the vibration intensity factor; The percentage of time during which the peak vibration acceleration exceeds a preset vibration threshold is defined as the vibration exceedance factor. The product of the vibration intensity factor and the vibration exceedance factor is determined to be the vibration influence coefficient.

[0011] Furthermore, the process of calculating the inkjet coding risk characterization value includes, The ratio of the pressure influence coefficient to the reference pressure influence coefficient is determined as the pressure influence factor; The ratio of the electrostatic influence coefficient to the reference electrostatic influence coefficient is determined as the electrostatic influence factor; The ratio of the vibration influence coefficient to the reference vibration influence coefficient is determined as the vibration influence factor; The weighted sum of the pressure influence factor, the electrostatic influence factor, and the vibration influence factor is determined to be the inkjet coding risk characterization value.

[0012] Furthermore, the process of determining abnormal tendencies in the coding process and locating regions of duplicate codes with strong abnormal tendencies includes, where, If the inkjet printing risk characterization value is greater than the inkjet printing risk characterization value threshold, then the abnormal tendency of the inkjet printing process is determined to be a strong abnormal tendency, and the duplicate code area of ​​the strong abnormal tendency is located. If the inkjet printing risk characterization value is less than or equal to the inkjet printing risk characterization value threshold, then the abnormal tendency of the inkjet printing process is determined to be a weak abnormal tendency.

[0013] Furthermore, the process of determining the duplicate code detection synchronization value includes, The ratio of the real-time roll speed to the preset shooting speed is determined as the theoretical shooting interval; Obtain the actual positional spacing of the QR code in two consecutive frames of images actually captured by the camera; The ratio of the actual position spacing to the theoretical shooting spacing is determined as the duplicate code detection synchronization value; The theoretical shooting distance refers to the roll material movement distance corresponding to each frame captured by the camera.

[0014] Furthermore, the process of determining the uniformity of illumination includes, Multiple measuring points are selected on the standard target surface within the detection field of view, and the illuminance value of each measuring point is measured to obtain the illuminance sequence. Determine the average illuminance value of the illuminance sequence, and extract the minimum illuminance value in the illuminance sequence; The ratio of the minimum illuminance value to the average illuminance value is defined as the light uniformity.

[0015] Furthermore, the process of calculating the unique feature value of the duplicate code includes, The ratio of the duplicate code detection synchronization value to the benchmark duplicate code detection synchronization value is determined as the synchronization influence factor; The ratio of the illumination uniformity to the reference illumination uniformity is determined as the uniformity influence factor; The ratio of the inkjet coding risk characterization value to the benchmark inkjet coding risk characterization value is determined as the risk impact factor; The weighted sum of the synchronous influence factor, the uniform influence factor, and the risk influence factor is determined to be the unique characteristic value of the duplicate code.

[0016] Furthermore, the determination of the duplicate coding status, wherein, If the unique characteristic value of the duplicate code is greater than the threshold value of the unique characteristic value of the duplicate code, then the state of duplicate code is determined to be that duplicate code exists. If the unique characteristic value of the duplicate code is less than or equal to the threshold value of the unique characteristic value of the duplicate code, then the duplicate code status is determined to be that there is no duplicate code in the inkjet printing.

[0017] Compared with existing technologies, this invention acquires inkjet pressure, electrostatic intensity, and vibration data of the inkjet printing equipment during the coding process. It analyzes the time-domain curve of inkjet pressure fluctuations to determine the pressure influence coefficient, analyzes the time-domain curve of electrostatic intensity fluctuations to determine the electrostatic influence coefficient, analyzes the time-domain curve of vibration to determine the vibration influence coefficient, calculates the coding risk characterization value, identifies abnormal tendencies in the coding process, locates areas with strong abnormal tendencies for duplicate codes, compares the real-time roll speed and preset shooting speed during the coding process to determine the duplicate code detection synchronization value, analyzes coding environment data to determine illumination uniformity, and calculates the unique characteristic value of duplicate codes based on the aforementioned coding risk characterization value to determine the coding duplicate status, and executes alarm output and / or removes duplicate code content. This invention, through comprehensive analysis of the coding and detection processes, identifies duplicate codes and ensures the consistency of QR codes.

[0018] In particular, analyzing the inkjet pressure during the coding process provides a data foundation for subsequent calculation of coding risk characterization values. In practice, the stability of inkjet pressure determines the ejection behavior of ink droplets within the printhead and the normal execution of the printing control logic. When the inkjet pressure fluctuates drastically, the pressure shock may cause the feedback signal of the printhead drive circuit to become disordered, resulting in the printing command, which should have been triggered once, being triggered multiple times in a short period of time. This leads to the repeated printing of the same QR code content on the same product surface or adjacent products, directly causing duplicate code defects. Previous duplicate code detection methods generally overlooked this issue. Real-time monitoring of inkjet pressure and reliance solely on post-processing image comparison to detect duplicate codes result in passively accepting existing duplicate code defects, failing to provide early warnings before or in the early stages of duplicate code occurrence. Therefore, this invention considers real-time acquisition of inkjet pressure during the coding process, combined with subsequent electrostatic intensity and vibration data of the coding equipment, to calculate a coding risk characterization value. This identifies abnormal tendencies in the coding process, locates areas with strong abnormal tendencies for duplicate codes, and conducts targeted in-depth analysis of areas where duplicate codes may occur, thereby reducing the duplicate code rate, improving the duplicate code recognition speed, and ensuring the uniqueness of QR codes.

[0019] In particular, analyzing the electrostatic intensity during the coding process provides a data foundation for subsequent calculation of coding risk characterization values. In reality, the substrate generates a large amount of static charge through friction with the rollers during high-speed roll movement. When the electrostatic intensity exceeds a certain threshold, the accumulated static charge can cause electromagnetic interference to the photoelectric trigger sensor of the coding machine through air discharge or contact discharge, resulting in the sensor outputting false trigger pulses. This causes the coding machine to misidentify the same product as multiple products when they pass by, thus repeatedly printing the same QR code content and directly generating consecutive duplicate codes. In addition, electrostatic discharge may also couple with... When the signal reaches the encoder signal line, it causes distortion or loss of the encoder pulse signal, resulting in errors in the inkjet printer's perception of the roll material speed and position. Consequently, multiple printing commands are executed within a single printing window, indirectly leading to duplicate code defects. Based on this, the present invention considers introducing electrostatic intensity when analyzing abnormal tendencies in the inkjet printing process. This is combined with inkjet pressure and vibration data of the inkjet printing equipment to calculate the inkjet printing risk characterization value. This provides a data basis for subsequently classifying abnormal tendencies in the inkjet printing process, providing early warning and locating high-risk production line sections, thereby reducing the duplicate code rate, improving the duplicate code recognition rate, and ensuring the uniqueness of QR codes.

[0020] In particular, analyzing the vibration data of the inkjet printing equipment during the inkjet printing process provides a data foundation for subsequent calculation of inkjet printing risk characterization values. In reality, inkjet printing equipment generates mechanical vibrations when running at high speeds. If this vibration directly acts on the photoelectric trigger sensor or encoder of the inkjet printer, it will cause the originally stable trigger signal to jitter or spike pulses, leading the inkjet controller to misjudge the number of times a product has passed through, and perform multiple printings on the same product, thus directly generating consecutive duplicate codes. At the same time, vibration causes the printhead to shift its instantaneous position relative to the substrate. When the shift is close to the normal printing spacing, the QR code of the subsequent product may be printed in a position that overlaps with or is very close to that of the previous product. In visual inspection, this will also appear as duplicate or misaligned codes, resulting in duplicate codes in the QR code. When QR codes lose their uniqueness, existing technologies often use random sampling to identify duplicate codes. However, this vibration is often continuous or intermittent, and the resulting duplicate codes are random and short-lived, making them almost impossible to detect with conventional random sampling or low-speed offline detection. It is understandable that the three influencing factors are independent yet may be coupled and superimposed. An anomaly in a single factor may not immediately cause duplicate codes, but when multiple factors deviate from the normal range simultaneously, the probability of duplicate codes will increase sharply. Based on this, this invention considers the comprehensive analysis of inkjet pressure, electrostatic intensity, and vibration data of the coding equipment to identify the risk of duplicate codes in the coding process from multiple influencing factors, classify abnormal tendencies, and provide data basis for subsequent targeted analysis, thereby reducing the duplicate code rate, improving the duplicate code recognition speed, and ensuring the uniqueness of QR codes.

[0021] In particular, for areas with strong anomaly tendencies and duplicate codes, specific characteristic values ​​of duplicate codes are calculated by combining the duplicate code detection synchronization value, illumination uniformity, and inkjet printing risk characterization value to determine the duplicate code status. In practice, when the roll material speed is too fast or the shooting speed is mismatched, the QR code image captured by the camera may be stretched, compressed, or shifted in position, leading to a decrease in decoding confidence. Originally identifiable duplicate codes may be missed or misjudged. More seriously, poor synchronization will amplify the abnormal consequences shown by the inkjet printing risk characterization value. For example, when pressure fluctuations already exist, synchronization deviation will cause the same duplicate code to appear in different frames. Different forms of illumination further interfere with the comparison logic. At this time, uneven illumination will reduce the contrast and signal-to-noise ratio of the QR code image, making it difficult for the decoding algorithm to accurately extract the code words. Especially for QR codes with blurred edges caused by abnormal inkjet pressure, uneven illumination will exacerbate the decoding failure rate, thus making it impossible to effectively verify the high-risk areas indicated by the inkjet risk characterization value. Based on this, this invention considers only targeting the duplicate code areas with strong abnormal tendencies, using the duplicate code detection synchronization value and illumination uniformity as weighted correction factors to conduct in-depth analysis of the inkjet risk characterization value, thereby improving the accuracy and robustness of duplicate code judgment. Attached Figure Description

[0022] Figure 1 This is a schematic diagram illustrating the steps of a machine vision-based QR code duplicate code recognition and detection method according to an embodiment of the invention. Figure 2 A logic block diagram for determining abnormal tendencies in the inkjet printing process and locating duplicate code regions with strong abnormal tendencies in an embodiment of the invention. Figure 3 This is a logic block diagram for determining the duplicate coding status in an embodiment of the invention. Detailed Implementation

[0023] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0024] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0025] Please see Figure 1 The diagram illustrates the steps of a machine vision-based QR code duplicate code recognition and detection method according to an embodiment of the invention. The machine vision-based QR code duplicate code recognition and detection method of the present invention includes: Step S1: Obtain the inkjet pressure, electrostatic intensity, and vibration data of the inkjet printing equipment during the coding process, and construct the time-domain curves of inkjet pressure fluctuation, electrostatic intensity fluctuation, and vibration relative to time.

[0026] Specifically, there is no limitation on the method of collecting inkjet pressure. For example, in implementation, pressure sensors can be installed in series in the ink path system of the inkjet printer for real-time collection. Of course, those skilled in the art can also use other methods to collect the data, as long as the required data is obtained. This will not be elaborated further.

[0027] Specifically, there are no restrictions on the method of collecting electrostatic intensity. For example, in practice, a non-contact electrostatic tester can be used, with its probe installed above the path of the substrate before it passes through the coding station for measurement. Of course, those skilled in the art can also use other methods to collect the data, as long as the required data is obtained. This will not be elaborated further.

[0028] Specifically, there are no restrictions on the method of collecting vibration data of the inkjet printer. For example, in practice, a piezoelectric accelerometer or a MEMS accelerometer can be used. The sensor can be fixedly installed in key positions such as the inkjet printer head bracket, conveyor belt support structure, or inkjet printer cabinet for measurement. Preferably, in order to more directly reflect the instantaneous vibration state of the printhead at the moment of printing, the sensor is placed on the inkjet printer head bracket. Of course, those skilled in the art can also use other methods to collect data, as long as the required data is obtained. This will not be elaborated further.

[0029] Please continue reading. Figure 1 As shown, in step S2, the inkjet pressure fluctuation time-domain curve is analyzed to determine the pressure influence coefficient, the electrostatic intensity fluctuation time-domain curve is analyzed to determine the electrostatic influence coefficient, the vibration time-domain curve is analyzed to determine the vibration influence coefficient, and the inkjet printing risk characterization value is calculated based on the pressure influence coefficient, the electrostatic influence coefficient, and the vibration influence coefficient to determine the abnormal tendency of the inkjet printing process and locate the duplicate code area with strong abnormal tendency.

[0030] Specifically, the process of determining the pressure influence coefficient includes, Statistical analysis was performed on the time-domain curve of the inkjet pressure fluctuation to extract the pressure fluctuation amplitude sequence and the pressure fluctuation frequency sequence. The root mean square value of the pressure fluctuation amplitude sequence is determined to be the pressure fluctuation intensity. The proportion of frequencies exceeding a preset frequency threshold in the pressure fluctuation frequency sequence is determined as the abnormal fluctuation frequency proportion. The product of the pressure fluctuation intensity and the proportion of the abnormal fluctuation frequency is determined as the pressure influence coefficient.

[0031] Specifically, the preset frequency threshold is calculated in advance. The historical pressure fluctuation frequency of the inkjet printer under several standard operating conditions is obtained in advance, and 1.3 times the average of each historical pressure fluctuation frequency is determined as the preset frequency threshold. It can be understood that in the field of inkjet control, 1.3 times is often used as a benchmark for judging significant deviations, to distinguish between normal fluctuations and abnormal high-frequency fluctuations, and to avoid false triggering caused by normal frequency fluctuations.

[0032] Specifically, standard operating conditions can be obtained from the coding operation parameters recorded in the construction manual. Those skilled in the art can also use other methods, as long as the required data is obtained, which will not be elaborated here.

[0033] Specifically, by analyzing the inkjet pressure during the coding process, a data foundation is provided for subsequent calculation of coding risk characterization values. In practice, the stability of inkjet pressure determines the ejection behavior of ink droplets within the printhead and the normal execution of the printing control logic. When the inkjet pressure fluctuates drastically, the pressure shock may cause the feedback signal of the printhead drive circuit to become disordered, resulting in the printing command, which should have been triggered once, being triggered multiple times in a short period of time. This leads to the repeated printing of the same QR code content on the same product surface or adjacent products, directly causing duplicate code defects. Previous duplicate code detection methods generally... Ignoring real-time monitoring of inkjet pressure and relying solely on post-processing image comparison to detect duplicate codes leads to passively accepting existing duplicate code defects without providing early warnings before or in the early stages of occurrence. Therefore, this invention considers real-time acquisition of inkjet pressure during the coding process, combined with subsequent electrostatic intensity and vibration data of the coding equipment, to calculate a coding risk characterization value. This identifies abnormal tendencies in the coding process, locates areas with strong abnormal tendencies for duplicate codes, and conducts targeted in-depth analysis of areas where duplicate codes may occur. This reduces the duplicate code rate, improves the duplicate code recognition speed, and ensures the uniqueness of QR codes.

[0034] Specifically, the process of determining the electrostatic influence coefficient includes, Feature extraction is performed on the electrostatic intensity fluctuation time-domain curve to determine the peak sequence of electrostatic accumulation and the frequency of electrostatic release events; The percentage of peaks exceeding a preset electrostatic threshold in the electrostatic accumulation peak sequence is defined as the percentage of excessive electrostatic accumulation. The number of times an electrostatic discharge event is triggered per unit time is defined as the electrostatic discharge frequency. The product of the percentage of accumulated static electricity exceeding the standard and the electrostatic discharge frequency is determined to be the electrostatic influence coefficient.

[0035] Specifically, the method for determining electrostatic discharge events is as follows: Slope analysis was performed on the time-domain curve of electrostatic intensity fluctuation to monitor the rate of decrease of electrostatic intensity per unit time. When the electrostatic discharge intensity decreases between two consecutive sampling points and exceeds the preset discharge threshold, for example, when the voltage drops by more than 500V within 10ms, an electrostatic discharge event is determined to have occurred. Of course, the value of the decrease is determined according to the actual situation.

[0036] Specifically, the preset electrostatic threshold is calculated in advance. The time-domain curve of the electrostatic intensity of the inkjet printer running continuously for 1 hour under standard working conditions without duplicate codes is obtained in advance, and the arithmetic mean of the electrostatic intensity of this curve is calculated as the preset electrostatic threshold.

[0037] Specifically, by analyzing the electrostatic intensity during the coding process, a data foundation is provided for subsequent calculation of coding risk characterization values. In reality, the substrate generates a large amount of static charge through friction with the rollers during high-speed roll movement. When the electrostatic intensity exceeds a certain threshold, the accumulated static charge can cause electromagnetic interference to the photoelectric trigger sensor of the coding machine through air discharge or contact discharge. This results in the sensor outputting false trigger pulses, causing the coding machine to misidentify the same product as multiple products when they pass by, thus repeatedly printing the same QR code content and directly generating consecutive duplicate codes. In addition, electrostatic discharge may also couple with... When the signal is mixed into the encoder signal line, it causes distortion or loss of the encoder pulse signal, which leads to errors in the inkjet printer's perception of the roll speed and position. This results in multiple printing commands being executed within a single printing window, indirectly causing duplicate code defects. Based on this, the present invention considers introducing electrostatic intensity when analyzing abnormal tendencies in the inkjet printing process. This is combined with inkjet pressure and vibration data of the inkjet printing equipment to calculate the inkjet printing risk characterization value. This provides a data basis for subsequently classifying abnormal tendencies in the inkjet printing process, providing early warning and locating high-risk production line sections, thereby reducing the duplicate code rate, improving the duplicate code recognition rate, and ensuring the uniqueness of the QR code.

[0038] Specifically, the process of determining the vibration influence coefficient includes, The vibration time-domain curve is transformed in the frequency domain to extract the root mean square value of vibration acceleration and the peak value of vibration acceleration. The ratio of the root mean square value of the vibration acceleration to the preset vibration reference value is determined as the vibration intensity factor; The percentage of time during which the peak vibration acceleration exceeds a preset vibration threshold is defined as the vibration exceedance factor. The product of the vibration intensity factor and the vibration exceedance factor is determined to be the vibration influence coefficient.

[0039] Specifically, the preset vibration reference value is the root mean square value of the vibration acceleration measured by the inkjet printer under stable no-load operation.

[0040] Specifically, the preset vibration threshold is calculated in advance. The historical vibration peak values ​​of the inkjet printer under several standard operating conditions are obtained in advance, and the statistical upper limit of each historical vibration peak value is determined as the preset vibration threshold.

[0041] Specifically, the method for determining the percentage of time exceeding the limit is as follows: The cumulative duration during which the peak vibration acceleration exceeds the preset vibration threshold within a preset time period is recorded. Calculate the ratio of the cumulative duration to the preset time period. The preset time period is the total monitoring duration corresponding to the acquisition of vibration time-domain curves.

[0042] Specifically, by analyzing the vibration data of the inkjet printing equipment during the inkjet printing process, a data foundation is provided for subsequent calculation of inkjet printing risk characterization values. In reality, inkjet printing equipment generates mechanical vibrations when running at high speeds. If this vibration directly acts on the photoelectric trigger sensor or encoder of the inkjet printer, it will cause the originally stable trigger signal to jitter or spike pulses, leading the inkjet controller to misjudge the number of times a product has passed through, and perform multiple printings on the same product, thus directly generating consecutive duplicate codes. At the same time, vibration causes the printhead to shift its instantaneous position relative to the substrate. When the shift is close to the normal printing spacing, the QR code of the subsequent product may be printed in a position that overlaps with or is very close to that of the previous product. In visual inspection, this will also appear as duplicate or misaligned codes, leading to... When QR codes lose their uniqueness, existing technologies often use random sampling to identify duplicate codes. However, this vibration is often continuous or intermittent, and the resulting duplicate codes are random and short-lived. Conventional random sampling or low-speed offline detection can hardly capture them. It is understandable that the three influencing factors are independent of each other but may be coupled and superimposed. An abnormality of a single factor may not immediately cause duplicate codes, but when multiple factors deviate from the normal range at the same time, the probability of duplicate codes will increase sharply. Based on this, this invention considers the comprehensive analysis of inkjet pressure, electrostatic intensity, and vibration data of the coding equipment to identify the risk of duplicate codes in the coding process from multiple influencing factors, classify abnormal tendencies, provide data basis for subsequent targeted analysis, thereby reducing the duplicate code rate, improving the duplicate code recognition speed, and ensuring the uniqueness of QR codes.

[0043] Specifically, the process of calculating the inkjet printing risk characterization value includes, The ratio of the pressure influence coefficient to the reference pressure influence coefficient is determined as the pressure influence factor; The ratio of the electrostatic influence coefficient to the reference electrostatic influence coefficient is determined as the electrostatic influence factor; The ratio of the vibration influence coefficient to the reference vibration influence coefficient is determined as the vibration influence factor; The weighted sum of the pressure influence factor, the electrostatic influence factor, and the vibration influence factor is determined to be the inkjet coding risk characterization value.

[0044] Understandably, before performing the calculations, the pressure, electrostatic, and vibration influencing factors were normalized to improve the dimensional consistency and comparability among the various influencing factors.

[0045] Specifically, the baseline pressure influence coefficient is calculated in advance. The historical pressure influence coefficients of the inkjet printer under several standard operating conditions are obtained in advance, and the average value of each historical pressure influence coefficient is determined as the baseline pressure influence coefficient.

[0046] Specifically, the baseline electrostatic influence coefficient is calculated in advance. The historical electrostatic influence coefficients of the inkjet printer under several standard operating conditions are obtained in advance, and the average value of each historical electrostatic influence coefficient is determined as the baseline electrostatic influence coefficient.

[0047] Specifically, the baseline vibration influence coefficient is calculated in advance. The historical vibration influence coefficients of the inkjet printer under several standard operating conditions are obtained in advance, and the average value of each historical vibration influence coefficient is determined as the baseline vibration influence coefficient.

[0048] Specifically, the sum of the weighting coefficients of the pressure influence factor, electrostatic influence factor, and vibration influence factor is 1. When configuring the weights, considering that the mechanical vibration of the equipment has a relatively higher interference effect on the accuracy of ink droplet landing during the coding process, the weighting coefficients of the pressure influence factor and electrostatic influence factor are both determined to be 0.3, and the weighting coefficient of the vibration influence factor is 0.4.

[0049] Please see Figure 2 The diagram shown is a logic block diagram illustrating the determination of abnormal tendencies in the inkjet printing process and the location of duplicate code regions with strong abnormal tendencies, according to an embodiment of the invention. Specifically, it involves determining abnormal tendencies in the inkjet printing process and locating duplicate code regions with strong abnormal tendencies, wherein... If the inkjet printing risk characterization value is greater than the inkjet printing risk characterization value threshold, then the abnormal tendency of the inkjet printing process is determined to be a strong abnormal tendency, and the duplicate code area of ​​the strong abnormal tendency is located. If the inkjet printing risk characterization value is less than or equal to the inkjet printing risk characterization value threshold, then the abnormal tendency of the inkjet printing process is determined to be a weak abnormal tendency.

[0050] Specifically, the inkjet printing risk characterization threshold is a boundary for determining the strength of the abnormal tendency in the inkjet printing process. It is calculated in advance by obtaining the historical inkjet printing risk characterization values ​​of the inkjet printing equipment under several standard working conditions. The product of the mean of each historical inkjet printing risk characterization value and the risk accuracy is determined as the inkjet printing risk characterization threshold. The risk accuracy is determined within the interval [0,1]. In practice, in order to improve the sensitivity of abnormal identification, the risk accuracy is determined to be 0.9.

[0051] Please continue reading. Figure 1As shown, in step S3, for areas with strong anomaly tendency and duplicate codes, the real-time roll speed and preset shooting speed during the inkjet printing process are compared to determine the duplicate code detection synchronization value, the inkjet printing environment data is analyzed to determine the illumination uniformity, and the duplicate code specific feature value is calculated in combination with the inkjet printing risk characterization value to determine the inkjet printing duplicate code status.

[0052] Specifically, the process of determining the synchronization value for duplicate code detection includes, The ratio of the real-time roll speed to the preset shooting speed is determined as the theoretical shooting interval; Obtain the actual positional spacing of the QR code in two consecutive frames of images actually captured by the camera; The ratio of the actual position spacing to the theoretical shooting spacing is determined as the duplicate code detection synchronization value; The theoretical shooting distance refers to the roll material movement distance corresponding to each frame captured by the camera.

[0053] Specifically, there is no limitation on the method for acquiring the real-time roll speed. For example, in implementation, the roll linear speed can be obtained in real time through a rotary encoder installed on the roll traction roller. Of course, those skilled in the art can also determine the method according to the actual situation, as long as the required data can be obtained. This will not be elaborated further. Specifically, the method for determining the actual positional spacing is as follows: Identify the pixel coordinates of the same QR code in two consecutive frames of images; Based on the pre-calibrated camera pixel equivalent, the pixel coordinate position difference is converted into the actual position spacing in physical space.

[0054] Specifically, the process of determining illumination uniformity includes, Multiple measuring points are selected on the standard target surface within the detection field of view, and the illuminance value of each measuring point is measured to obtain the illuminance sequence. Determine the average illuminance value of the illuminance sequence, and extract the minimum illuminance value in the illuminance sequence; The ratio of the minimum illuminance value to the average illuminance value is defined as the light uniformity.

[0055] Specifically, the detection field of view is the actual imaging range of the roll surface area captured by the camera at the QR code inkjet printing position. The standard target is a planar target with uniform diffuse reflection characteristics, which is used to provide a consistent reflection reference within the detection field of view, thereby accurately reflecting the incident light illuminance distribution.

[0056] Specifically, the process of calculating the unique eigenvalues ​​of duplicate codes includes, The ratio of the duplicate code detection synchronization value to the benchmark duplicate code detection synchronization value is determined as the synchronization influence factor; The ratio of the illumination uniformity to the reference illumination uniformity is determined as the uniformity influence factor; The ratio of the inkjet coding risk characterization value to the benchmark inkjet coding risk characterization value is determined as the risk impact factor; The weighted sum of the synchronous influence factor, the uniform influence factor, and the risk influence factor is determined to be the unique characteristic value of the duplicate code.

[0057] Specifically, the baseline duplicate code detection synchronization value is calculated in advance. The historical duplicate code detection synchronization values ​​of the inkjet printer under several standard working conditions are obtained in advance, and the average value of each historical duplicate code detection synchronization value is determined as the baseline duplicate code detection synchronization value.

[0058] Specifically, the baseline illumination uniformity is calculated in advance. The historical illumination uniformity of the inkjet printer under several standard operating conditions is obtained in advance, and the average of each historical illumination uniformity is determined as the baseline illumination uniformity.

[0059] Specifically, the baseline inkjet printing risk characterization values ​​are the inkjet printing risk characterization values ​​corresponding to the baseline pressure influence coefficient, the baseline electrostatic influence coefficient, and the baseline vibration influence coefficient.

[0060] Specifically, the sum of the weight coefficients of the synchronous impact factor, the uniform impact factor, and the risk impact factor is 1. When configuring the weights, considering that the inkjet coding risk characterization value has a stronger comprehensive predictive ability for the occurrence of duplicate codes, the weight coefficients of the synchronous impact factor and the uniform impact factor are both determined to be 0.3, and the weight coefficient of the risk impact factor is 0.4.

[0061] Specifically, for areas with strong anomaly tendencies and duplicate codes, a unique characteristic value for duplicate codes is calculated by combining the duplicate code detection synchronization value, illumination uniformity, and inkjet printing risk characterization value to determine the duplicate code status. In practice, when the roll material speed is too fast or the shooting speed is mismatched, the QR code image captured by the camera may be stretched, compressed, or shifted in position, leading to a decrease in decoding confidence. Originally identifiable duplicate codes may be missed or misjudged. More seriously, poor synchronization can amplify the abnormal consequences shown by the inkjet printing risk characterization value. For example, when pressure fluctuations already exist, synchronization deviations can cause the same duplicate code to appear in different frames. Different forms of illumination further interfere with the comparison logic. At this time, uneven illumination will reduce the contrast and signal-to-noise ratio of the QR code image, making it difficult for the decoding algorithm to accurately extract the code characters. Especially for QR codes with blurred edges caused by abnormal inkjet pressure, uneven illumination will exacerbate the decoding failure rate, thus making it impossible to effectively verify the high-risk areas indicated by the inkjet risk characterization value. Based on this, this invention considers only targeting the duplicate code areas with strong abnormal tendencies, using the duplicate code detection synchronization value and illumination uniformity as weighted correction factors to conduct in-depth analysis of the inkjet risk characterization value, thereby improving the accuracy and robustness of duplicate code judgment.

[0062] Please see Figure 3The diagram shown is a logic block diagram for determining the duplicate coding state according to an embodiment of the invention. Specifically, determining the duplicate coding state, wherein... If the unique characteristic value of the duplicate code is greater than the threshold value of the unique characteristic value of the duplicate code, then the state of duplicate code is determined to be that duplicate code exists. If the unique characteristic value of the duplicate code is less than or equal to the threshold value of the unique characteristic value of the duplicate code, then the duplicate code status is determined to be that there is no duplicate code in the inkjet printing.

[0063] Specifically, the unique feature value threshold for duplicate codes represents a boundary for the existence of duplicate codes in inkjet printing. It is calculated in advance by obtaining the historical unique feature values ​​of duplicate codes of the inkjet printing equipment under several standard operating conditions. The product of the mean of each historical unique feature value and the unique precision is determined as the unique feature value threshold for duplicate codes. The unique precision is selected within the interval [0,1]. In practice, in order to ensure the balance between the sensitivity of duplicate code detection and the suppression of false triggering, the unique precision is determined to be 0.9.

[0064] Step S4: In response to the presence of duplicate inkjet codes, execute alarm output and / or remove duplicate code content, and record the duplicate code information to the traceability database.

[0065] Specifically, the alarm signal can be one or more of the following: audible and visual alarm signal, display prompt signal, and remote communication signal. As long as it achieves the alarm effect, it is acceptable. This will not be elaborated further.

[0066] Specifically, the traceability database is used to store traceability information associated with duplicate code events. There are no restrictions on how the traceability database is constructed. For example, the traceability database can be a relational database on a local industrial control computer or a distributed database on a cloud server, as long as it can meet the storage and query requirements of traceability information. This will not be elaborated further.

[0067] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

[0068] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., 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 method for identifying and detecting duplicate QR codes based on machine vision, characterized in that, include: Acquire inkjet pressure, electrostatic intensity, and vibration data of the inkjet printing equipment during the coding process, and construct time-domain curves of inkjet pressure fluctuation, electrostatic intensity fluctuation, and vibration relative to time. The time-domain curve of inkjet pressure fluctuation is analyzed to determine the pressure influence coefficient, the time-domain curve of electrostatic intensity fluctuation is analyzed to determine the electrostatic influence coefficient, and the time-domain curve of vibration is analyzed to determine the vibration influence coefficient. Based on the pressure influence coefficient, the electrostatic influence coefficient, and the vibration influence coefficient, the inkjet printing risk characterization value is calculated to determine the abnormal tendency of the inkjet printing process and locate the duplicate code area with strong abnormal tendency. For areas with strong anomaly tendency and duplicate codes, the real-time roll speed and preset shooting speed during the inkjet printing process are compared to determine the duplicate code detection synchronization value. The inkjet printing environment data is analyzed to determine the illumination uniformity. Combined with the inkjet printing risk characterization value, the duplicate code specific feature value is calculated to determine the inkjet printing duplicate code status. In response to the presence of duplicate inkjet codes, an alarm is output and / or the duplicate code content is removed, and the duplicate code information is recorded in the traceability database.

2. The machine vision-based QR code duplicate code recognition and detection method according to claim 1, characterized in that, The process of determining the pressure influence coefficient includes: Statistical analysis was performed on the time-domain curve of the inkjet pressure fluctuation to extract the pressure fluctuation amplitude sequence and the pressure fluctuation frequency sequence. The root mean square value of the pressure fluctuation amplitude sequence is determined to be the pressure fluctuation intensity. The proportion of frequencies exceeding a preset frequency threshold in the pressure fluctuation frequency sequence is determined as the abnormal fluctuation frequency proportion. The product of the pressure fluctuation intensity and the proportion of the abnormal fluctuation frequency is determined as the pressure influence coefficient.

3. The machine vision-based QR code duplicate code recognition and detection method according to claim 1, characterized in that, The process of determining the electrostatic influence coefficient includes, Feature extraction is performed on the electrostatic intensity fluctuation time-domain curve to determine the peak sequence of electrostatic accumulation and the frequency of electrostatic release events; The percentage of peaks exceeding a preset electrostatic threshold in the electrostatic accumulation peak sequence is defined as the percentage of excessive electrostatic accumulation. The number of times an electrostatic discharge event is triggered per unit time is defined as the electrostatic discharge frequency. The product of the percentage of accumulated static electricity exceeding the standard and the electrostatic discharge frequency is determined to be the electrostatic influence coefficient.

4. The machine vision-based QR code duplicate code recognition and detection method according to claim 1, characterized in that, The process of determining the vibration influence coefficient includes, The vibration time-domain curve is transformed in the frequency domain to extract the root mean square value of vibration acceleration and the peak value of vibration acceleration. The ratio of the root mean square value of the vibration acceleration to the preset vibration reference value is determined as the vibration intensity factor; The percentage of time during which the peak vibration acceleration exceeds a preset vibration threshold is defined as the vibration exceedance factor. The product of the vibration intensity factor and the vibration exceedance factor is determined to be the vibration influence coefficient.

5. The machine vision-based QR code duplicate code recognition and detection method according to claim 1, characterized in that, The process of calculating the inkjet coding risk characterization value includes, The ratio of the pressure influence coefficient to the reference pressure influence coefficient is determined as the pressure influence factor; The ratio of the electrostatic influence coefficient to the reference electrostatic influence coefficient is determined as the electrostatic influence factor; The ratio of the vibration influence coefficient to the reference vibration influence coefficient is determined as the vibration influence factor; The weighted sum of the pressure influence factor, the electrostatic influence factor, and the vibration influence factor is determined to be the inkjet coding risk characterization value.

6. The machine vision-based QR code duplicate code recognition and detection method according to claim 1, characterized in that, The process of determining abnormal tendencies in the inkjet printing process and locating regions of duplicate codes with strong abnormal tendencies is described below. If the inkjet printing risk characterization value is greater than the inkjet printing risk characterization value threshold, then the abnormal tendency of the inkjet printing process is determined to be a strong abnormal tendency, and the duplicate code area of ​​the strong abnormal tendency is located. If the inkjet printing risk characterization value is less than or equal to the inkjet printing risk characterization value threshold, then the abnormal tendency of the inkjet printing process is determined to be a weak abnormal tendency.

7. The machine vision-based QR code duplicate code recognition and detection method according to claim 1, characterized in that, The process of determining the duplicate code detection synchronization value includes: The ratio of the real-time roll speed to the preset shooting speed is determined as the theoretical shooting interval; Obtain the actual positional spacing of the QR code in two consecutive frames of images actually captured by the camera; The ratio of the actual position spacing to the theoretical shooting spacing is determined as the duplicate code detection synchronization value; The theoretical shooting distance refers to the roll material movement distance corresponding to each frame captured by the camera.

8. The machine vision-based QR code duplicate code recognition and detection method according to claim 1, characterized in that, The process of determining the uniformity of illumination includes, Multiple measuring points are selected on the standard target surface within the detection field of view, and the illuminance value of each measuring point is measured to obtain the illuminance sequence. Determine the average illuminance value of the illuminance sequence, and extract the minimum illuminance value in the illuminance sequence; The ratio of the minimum illuminance value to the average illuminance value is defined as the light uniformity.

9. The machine vision-based QR code duplicate code recognition and detection method according to claim 1, characterized in that, The process of calculating the unique feature value of the duplicate code includes: The ratio of the duplicate code detection synchronization value to the benchmark duplicate code detection synchronization value is determined as the synchronization influence factor; The ratio of the illumination uniformity to the reference illumination uniformity is determined as the uniformity influence factor; The ratio of the inkjet coding risk characterization value to the benchmark inkjet coding risk characterization value is determined as the risk impact factor; The weighted sum of the synchronous influence factor, the uniform influence factor, and the risk influence factor is determined to be the unique characteristic value of the duplicate code.

10. The machine vision-based QR code duplicate code recognition and detection method according to claim 1, characterized in that, The determination of duplicate coding status, wherein... If the unique characteristic value of the duplicate code is greater than the threshold value of the unique characteristic value of the duplicate code, then the state of duplicate code is determined to be that duplicate code exists. If the unique characteristic value of the duplicate code is less than or equal to the threshold value of the unique characteristic value of the duplicate code, then the duplicate code status is determined to be that there is no duplicate code in the inkjet printing.

Citation Information

Patent Citations

  • A double-code overlapping double-complementation identification two-dimensional code anti-counterfeiting method

    CN109685185A

  • Verification method for error code, missing code and repeated code of two-dimensional code

    CN113283263A