Code spraying method for automatic checking and error correction
By training a convolutional neural network model, combining spatial attention mechanism and real-time sensor data, the preset dynamic threshold model is used to identify and correct ink coding abnormalities, which solves the problem of missed detection of existing ink coding equipment in complex scenarios, and achieves high-quality ink coding.
Patent Information
- Application Number
- CN202510597514.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing inkjet printing equipment relies on fixed parameters and is difficult to adapt to complex inkjet printing scenarios, resulting in high false detection and missed detection rates, affecting the quality of inkjet printing.
By training the convolutional neural network model, combining the spatial attention mechanism and real-time sensor data, a preset dynamic threshold model is used to identify and correct abnormalities, and a coded error correction data is generated.
It improves the accuracy of inkjet identification and the stability of equipment, reduces false detection and missed inspection, and ensures high-quality inkjet operations.
Smart Images

Figure CN120451121A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of inkjet printing, and in particular to an automatic checking and error-correcting inkjet printing method. Background Art
[0002] Existing inkjet printers often rely on fixed parameters and lack dynamic adaptive adjustment capabilities. This can easily lead to quality issues such as incomplete coding, blurred text, and misaligned coding when the printhead becomes clogged after prolonged operation, when the ink is unevenly supplied due to temperature or viscosity fluctuations, or when the equipment encounters unavoidable vibrations during operation. These poor coding results not only affect the product's appearance but can also lead to misinterpretation and, in the food and pharmaceutical industry, pose safety risks.
[0003] There are significant technical bottlenecks in the current quality control of the coding process. Manual spot checks rely on the visual judgment of quality inspectors, which are limited by the resolution of the naked eye and visual fatigue caused by long hours of work, making it difficult to identify minor coding defects such as slight character line breaks and color deviations. Moreover, the speed of manual inspection is far lower than the production pace of automated production lines. For example, a high-speed food packaging line can complete the coding of hundreds of products per minute, and manual spot checks cannot achieve real-time and comprehensive coverage. Even if some companies try to introduce automated detection equipment, existing technologies only use fixed template matching or simple threshold judgment, and lack adaptability to complex coding scenarios. When the coding content has font changes, position offsets or background interference, the false detection and missed detection rates remain high. Summary of the Invention
[0004] The present invention proposes a coding method with automatic inspection and error correction, which solves the technical problems that existing coding methods rely solely on fixed template matching or simple threshold judgment, are difficult to adapt to complex scenarios, and are prone to false detection and missed detection when facing font changes, position offsets, and background interference, resulting in poor coding effects.
[0005] The present invention provides a coding method for automatic checking and error correction, comprising the following steps:
[0006] Obtain historical coding image sets, historical sensor data sets, real-time coding images, and real-time sensor data sets;
[0007] Using the historical coding image set and the historical sensor data set to train an initial convolutional neural network deep learning model to generate a target image recognition model;
[0008] Using the target image recognition model to use a spatial attention mechanism to perform abnormality recognition on the real-time coding image to generate image recognition data;
[0009] Identify the working state of the nozzle based on the real-time sensor data set to generate nozzle working data;
[0010] A preset dynamic threshold model is used to perform abnormal coding recognition and abnormal error correction on the image recognition data and the printhead working data to generate coding error correction data.
[0011] Optionally, the using the historical coding image set and the historical sensor data set to perform model training on an initial convolutional neural network deep learning model to generate a target image recognition model includes:
[0012] Marking the coding area and defect type of each historical coding image in the historical coding image set to generate initial model training data;
[0013] Normalizing the initial model training data to generate target model training data;
[0014] Divide the target model training data into data according to a preset division method to generate a training set and a test set;
[0015] Encoding the historical sensor data set to generate historical sensor encoded data;
[0016] Performing model training on an initial convolutional neural network deep learning model using the training set and the historical sensor encoding data to generate an initial image recognition model;
[0017] The test set is used to perform model evaluation on the initial image recognition model to generate a target image recognition model.
[0018] Optionally, the using the training set and the historical sensor encoding data to perform model training on an initial convolutional neural network deep learning model to generate an initial image recognition model includes:
[0019] Extracting features from the training images in the training set to generate a target feature map;
[0020] Mapping the target feature map to the corresponding coding category space to generate predicted label data corresponding to the training image;
[0021] Calculate the loss value of the predicted label data and the true label corresponding to the training image to generate a loss value;
[0022] Calculating the gradients of various parameters in the initial convolutional neural network deep learning model using a back propagation algorithm according to the loss value to generate multiple gradient data;
[0023] Using the gradient data to update the initial convolutional neural network deep learning model, generate a target convolutional neural network deep learning model and count the number of training times;
[0024] When the number of training times is less than the preset training threshold, the target convolutional neural network deep learning model is used as a new initial convolutional neural network deep learning model, and the step of performing feature extraction on the training images in the training set to generate a target feature map is skipped and executed;
[0025] When the number of training times is equal to a preset training threshold, the target convolutional neural network deep learning model at the current moment is used as the initial image recognition model.
[0026] Optionally, extracting features from the training images in the training set to generate a target feature map includes:
[0027] Using an improved retinal cortex theory method, respectively performing illumination analysis and correction on the training images in the training set to generate a plurality of illumination-corrected images;
[0028] Using a convolution module to extract features from the illumination correction images to generate an initial feature map;
[0029] Using a depthwise separable convolution module to extract features from the initial feature map to generate an intermediate feature map;
[0030] The intermediate feature maps are respectively fused with the corresponding historical sensor encoding data to generate a target feature map.
[0031] Optionally, the adopting the improved retinal cortex theory method to perform illumination analysis and correction on the training images in the training set respectively to generate a plurality of illumination-corrected images includes:
[0032] filtering the training images in the training set using a low-pass filter to generate filtered images;
[0033] Adaptively adjusting the illumination of the filtered image using an adaptive compensation factor to generate an illumination component;
[0034] performing a difference calculation using a logarithm of the original image corresponding to the illumination component and a logarithm of the illumination component to generate a reflection difference;
[0035] Calculating the sum of the reflection difference and a preset edge enhancement item to generate a reflection component;
[0036] The illumination component and the reflection component are fused to generate an illumination-corrected image.
[0037] Optionally, the extracting features from the initial feature map using a depthwise separable convolution module to generate an intermediate feature map includes:
[0038] Performing a depthwise convolution operation on the initial feature map using adaptive convolution kernels of multiple preset sizes to generate multiple initial convolution feature maps;
[0039] Using a preset convolution kernel to perform point-by-point convolution on the initial convolution feature map to generate multiple intermediate convolution feature maps;
[0040] A weighted summation method is used to fuse all the intermediate convolution feature maps to generate an intermediate feature map.
[0041] Optionally, the real-time sensor data set includes nozzle temperature data, nozzle pressure data, and ink flow data; and the step of identifying the nozzle working state based on the real-time sensor data set and generating the nozzle working data includes:
[0042] Normalizing the nozzle temperature data, the nozzle pressure data, and the ink flow rate data to generate initial temperature data, initial pressure data, and ink flow rate data;
[0043] fusing the initial temperature data, the initial pressure data, and the ink flow rate data to generate sensor fusion data;
[0044] An autoregressive sliding average model is used to identify the state of the nozzles using the sensor fusion data to generate nozzle working data.
[0045] Optionally, the adopting a preset dynamic threshold model to perform abnormal coding recognition and abnormal error correction on the image recognition data and the printhead operation data to generate coding error correction data includes:
[0046] splicing the feature vectors corresponding to the image recognition data and the printhead operation data to generate feature vector fusion data;
[0047] The feature vectors are fused with data to perform data dimensionality reduction and key feature extraction to generate core features;
[0048] Selecting a core threshold corresponding to the core feature from a preset dynamic threshold model;
[0049] Comparing the core threshold with the core feature to generate coding data;
[0050] Abnormal error correction is performed based on the coding data to generate coding error correction data.
[0051] Optionally, the core threshold includes a scoring threshold and a printhead operating threshold; and comparing the core threshold with the core feature to generate the coding data includes:
[0052] Determining whether the character clarity score corresponding to the core feature is less than the score threshold;
[0053] If yes, an abnormality type decision tree is used to identify the coding abnormality type corresponding to the core feature, and generate the first coding data;
[0054] If not, determining whether the nozzle operation data corresponding to the core feature is greater than the nozzle operation threshold;
[0055] If so, a classification neural network is used to identify the coding anomaly type corresponding to the core feature and generate second coding data;
[0056] If not, it is determined that the coding state is normal and the third coding data is produced.
[0057] Optionally, performing abnormal error correction based on the inkjet coding data to generate inkjet coding error correction data includes:
[0058] Selecting corresponding error correction measures from a preset error correction library according to the abnormality type corresponding to the coding data, and generating error correction measure data;
[0059] Perform an error correction operation according to the error correction measure data to generate error correction operation data;
[0060] The preset dynamic threshold model is updated with the response data corresponding to the error correction operation data to generate coding error correction data.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] The present invention trains an initial convolutional neural network deep learning model by collecting historical inkjet image sets and historical sensor data sets, so that the trained target image recognition model can autonomously learn font, position, background and other features in complex scenes, get rid of the limitations of fixed templates, improve image recognition accuracy, and reduce false detection and missed detection in complex scenes. Utilizing the spatial attention mechanism, the target image recognition model focuses on the key areas of inkjet printing, eliminates background interference, accurately analyzes the inkjet printing features under font and position changes, outputs reliable image recognition data, and ensures detection accuracy. The working status of the nozzle is identified through real-time sensor data sets, and nozzle working data is generated to avoid nozzle problems affecting the quality of inkjet printing and ensure stable operation of the equipment. The preset dynamic threshold model adjusts the judgment criteria based on real-time data, flexibly responds to scene changes and nozzle fluctuations, and accurately adjusts the inkjet printing parameters after anomalies are found to correct anomalies and achieve high-quality inkjet printing operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only preferred embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0064] Figure 1 A flowchart of the steps of an automatic checking and error correction inkjet coding method provided in the first embodiment of the present invention;
[0065] Figure 2 This is a flowchart of the steps of an automatic inspection and error correction coding method provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0066] The embodiments of the present invention provide a coding method with automatic checking and error correction, which is used to solve the technical problems that existing coding methods rely only on fixed template matching or simple threshold judgment, are difficult to adapt to complex scenarios, and are prone to false detection and missed detection when facing font changes, position offsets, and background interference, resulting in poor coding effects.
[0067] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0068] See also Figure 1 , Figure 1 This is a flowchart of the steps of an automatic inspection and error correction coding method provided in Example 1 of the present invention.
[0069] Step 101: Acquire a historical inkjet image set, a historical sensor data set, a real-time inkjet image, and a real-time sensor data set.
[0070] In an embodiment of the present invention, the historical inkjet coding data set includes a historical inkjet coding image set and a historical sensor data set. The historical inkjet coding image set can be the inkjet coding images corresponding to each nozzle in different production scenarios, covering products in multiple industries such as food, medicine, and electronic products, including normal inkjet coding images and images with defects such as blurred fonts, position offset, and complex background. The historical sensor data set includes historical nozzle temperature data, historical nozzle pressure data, historical ink flow data, historical nozzle pulse parameter data, historical environmental temperature and humidity data, and historical air quality data. The real-time inkjet coding image is the inkjet coding image corresponding to each nozzle in the current inkjet coding environment. The real-time sensor data set includes nozzle temperature data, nozzle pressure data, ink flow data, nozzle pulse parameter data, environmental temperature and humidity data, and air quality data corresponding to each nozzle in the current inkjet coding environment.
[0071] Step 102: Use the historical inkjet image set and the historical sensor data set to train the initial convolutional neural network deep learning model to generate a target image recognition model.
[0072] In this embodiment of the present invention, by collecting historical inkjet coding datasets and leveraging the powerful feature learning capabilities of convolutional neural networks, an initial convolutional neural network deep learning model automatically extracts diverse feature patterns such as font, position, and background from this massive data set. The resulting trained target image recognition model, freed from the constraints of fixed templates, can flexibly respond to complex and ever-changing inkjet coding scenarios, significantly reducing false detection and missed detection rates due to scene complexity, laying the foundation for accurate inkjet coding recognition.
[0073] Step 103: Use the spatial attention mechanism through the target image recognition model to perform abnormality recognition on the real-time coding image to generate image recognition data.
[0074] In this embodiment of the present invention, a spatial attention mechanism empowers the target image recognition model to focus on key areas. When processing real-time inkjet images, it can precisely locate the area containing the inkjet content while ignoring irrelevant background information. Regardless of font changes or inkjet position shifts, this mechanism focuses on analyzing the core characteristics of the inkjet code, significantly improving the accuracy of anomaly recognition and reducing false detections due to background interference and missed detections caused by font and position changes. This results in more reliable image recognition data and ensures the accuracy of inkjet quality inspection.
[0075] Step 104: Identify the working state of the nozzle based on the real-time sensor data set and generate nozzle working data.
[0076] In this embodiment, by analyzing real-time sensor data sets to identify printhead operating status, potential issues such as printhead blockage, unstable pressure, and abnormal temperature can be promptly detected. The generated printhead operating data provides real-time equipment operation information for the coding process, providing early warning of printhead failures, avoiding degradation of coding quality caused by printhead anomalies, ensuring stable operation of the coding equipment, and improving the reliability and stability of the coding process.
[0077] Step 105: Use a preset dynamic threshold model to perform abnormal coding recognition and error correction on the image recognition data and the printhead operation data to generate coding error correction data.
[0078] The preset dynamic threshold model is based on big data analysis. By collecting a large amount of coding data from different production environments, equipment conditions, and product types, and analyzing the distribution patterns of coding quality parameters (such as dot size, spacing, and color depth), the model dynamically adjusts the judgment threshold based on real-time production conditions.
[0079] In an embodiment of the present invention, a preset dynamic threshold model dynamically adjusts the threshold judgment criteria based on real-time image recognition data and printhead operating data. This model can flexibly respond to changes in factors such as font, position, and background, as well as fluctuations in the printhead's operating status. When an abnormal inkjet print is identified, the model can quickly activate the error correction mechanism and accurately adjust the inkjet parameters, such as printhead pressure, ink flow, and inkjet position, based on the printhead status and image anomalies. This allows for timely correction of the anomaly, effectively resolving the issue of poor inkjet printing in complex scenarios, generating inkjet error correction data, and ultimately achieving high-quality, high-precision inkjet printing.
[0080] In an embodiment of the present invention, an initial convolutional neural network deep learning model is trained by collecting historical inkjet image sets and historical sensor data sets. The trained target image recognition model can autonomously learn features such as font, position, and background in complex scenarios, breaking free from the constraints of fixed templates, improving image recognition accuracy, and reducing false detections and missed detections in complex scenarios. A spatial attention mechanism is utilized to enable the target image recognition model to focus on key inkjet areas, eliminating background interference, accurately analyzing inkjet features under varying fonts and positions, and outputting reliable image recognition data to ensure detection accuracy. The printhead's operating status is identified using real-time sensor data sets, generating printhead operating data to prevent printhead issues from affecting inkjet quality and ensure stable equipment operation. A preset dynamic threshold model adjusts judgment criteria based on real-time data, flexibly responding to scene changes and printhead fluctuations. Upon detection of anomalies, precise adjustments to inkjet parameters are made to correct them, achieving high-quality inkjet printing. This approach addresses the technical issues of existing inkjet printing methods that rely solely on fixed template matching or simple threshold judgment, are difficult to adapt to complex scenarios, and are prone to false detections and missed detections when faced with font changes, position offsets, and background interference, resulting in poor inkjet printing results.
[0081] See also Figure 2 , Figure 2 This is a flowchart of the steps of an automatic inspection and error correction coding method provided in Example 2 of the present invention.
[0082] Step 201: Acquire a historical inkjet image set, a historical sensor data set, a real-time inkjet image, and a real-time sensor data set.
[0083] In the embodiment of the present invention, the specific implementation process of step 201 is similar to that of step 101 and will not be repeated here.
[0084] Step 202: Label the coding area and defect type of each historical coding image in the historical coding image set to generate initial model training data.
[0085] In an embodiment of the present invention, each historical inkjet image in the collected historical inkjet image set is labeled with the inkjet area and defect type, the inkjet area and defect type are clarified, and initial model training data is constructed. The labels can use one-hot encoding to represent different defect categories.
[0086] Step 203: Normalize the initial model training data to generate target model training data.
[0087] In this embodiment of the present invention, data normalization is performed on the initial model training data, mapping image pixel values to the interval [0, 1] to generate target model training data. Furthermore, data augmentation techniques such as random cropping, rotation, and noise addition can be used to expand the target model training data to improve model generalization capabilities.
[0088] Step 204: Divide the target model training data according to a preset division method to generate a training set and a test set.
[0089] In an embodiment of the present invention, the preset partitioning method is stratified random partitioning. Because the inkjet image data contains categorical information such as different defect types and different production scenarios, stratified random partitioning can better ensure the consistency of the data distribution of the training set and the test set. First, the target model training data is stratified according to the category of the inkjet image (such as normal image, image with blurred font, image with position offset, etc.), and the proportion of each category in the data set is calculated. Then, within each category, random sampling is performed according to the same partition ratio (such as 7:3) to form the training set and test set respectively.
[0090] Step 205: Encode the historical sensor data set to generate historical sensor encoded data.
[0091] In an embodiment of the present invention, historical sensor coded data is obtained by encoding the historical sensor data set. The sensor data collected during the coding process (such as temperature sensor and pressure sensor data) differs greatly from the image data in terms of format, dimension, and physical meaning. Image data is a two-dimensional matrix composed of pixels, each pixel containing information such as color; while sensor data is usually a one-dimensional numerical sequence representing physical quantities such as temperature and pressure. Through encoding, the sensor data can be converted into a format that matches the image feature map, facilitating fusion operations in the multimodal fusion module.
[0092] Step 206: Use the training set and historical sensor encoding data to train the initial convolutional neural network deep learning model to generate an initial image recognition model.
[0093] Optionally, step 206 may include the following sub-steps S11-S17:
[0094] S11, extracting features from the training images in the training set to generate a target feature map;
[0095] S12, mapping the target feature map to the corresponding coding category space to generate predicted label data corresponding to the training image;
[0096] S13, calculating the loss value of the predicted label data and the true label corresponding to the training image to generate a loss value;
[0097] S14. Calculate the gradients of various parameters in the initial convolutional neural network deep learning model using a back propagation algorithm according to the loss value to generate multiple gradient data;
[0098] S15. Using gradient data to update the initial convolutional neural network deep learning model, generate a target convolutional neural network deep learning model and count the number of training times;
[0099] S16. When the number of training times is less than a preset training threshold, the target convolutional neural network deep learning model is used as a new initial convolutional neural network deep learning model, and the step of performing feature extraction on the training images in the training set to generate a target feature map is skipped.
[0100] S17. When the number of training times is equal to the preset training threshold, the target convolutional neural network deep learning model at the current moment is used as the initial image recognition model.
[0101] The initial convolutional neural network deep learning model includes an adaptive illumination correction module, a convolution module, a depthwise separable convolution module, and a fully connected layer.
[0102] In an embodiment of the present invention, the training images in the training set are respectively subjected to feature extraction through an improved retinal cortex theory method, a convolution module, and a depth-separable convolution module, and the local features of the image are extracted to obtain a target feature map. After obtaining the target feature map, it is input into the fully connected layer. The fully connected layer maps the feature vector to the coding category space, and obtains the probability value corresponding to each category by calculation. Among them, the coding category space refers to various coding situations that may occur during the coding process, including normal coding categories and abnormal coding categories. For example, if there are 10 different coding categories, the fully connected layer will output a vector of length 10, and each element represents the probability that the training image belongs to the corresponding coding category. Then, the predicted label data is determined based on these probability values. Usually, the category with the largest probability is selected as the predicted label to obtain the predicted label data corresponding to the training image.
[0103] The true label is the correct category information pre-labeled for each training image. By comparing the predicted label data with the true label and calculating the difference between them using the cross-entropy loss function, we can calculate the loss value for each training image. The loss value reflects the gap between the predicted result and the true result. The smaller the loss value, the closer the model's prediction is to the true result, and the better the model performance.
[0104] The backpropagation algorithm is a method for calculating the gradients of neural network parameters. Starting with the loss value, it follows the network's backpropagation path to calculate the partial derivatives of the loss value with respect to each parameter. The vector formed by these partial derivatives is the gradient of that parameter. Therefore, the backpropagation algorithm is used to calculate the gradients of each parameter in the initial convolutional neural network deep learning model based on the loss value, generating multiple gradient data points. By calculating the gradients, we can determine the degree of influence of each parameter on the loss value, thus providing a basis for subsequent parameter updates. The multiple gradient data points generated correspond to various parameters in the initial convolutional neural network deep learning model, such as the convolution kernel weights and bias terms.
[0105] According to the calculated gradient data, the stochastic gradient descent method is used to update the parameters of the initial convolutional neural network deep learning model, obtain the target convolutional neural network deep learning model and count the number of training times.
[0106] If the number of training times is less than the preset training threshold, it means that the convolutional neural network deep learning model has not been fully trained and needs to be trained further. At this point, the current target convolutional neural network deep learning model is used as the new initial convolutional neural network deep learning model. A series of operations such as feature extraction are re-performed on the training images in the training set. The model parameters are further optimized to enable the model to better fit the training data, continuously reduce the loss value, and improve the model's accuracy and generalization ability.
[0107] When the number of training times reaches the preset training threshold, the model has been trained sufficiently and can be used for actual image recognition tasks. Therefore, the current target convolutional neural network deep learning model is used as the initial image recognition model.
[0108] Optionally, step S11 may include the following sub-steps S111-S114:
[0109] S111. Using an improved retinal cortex theory method, respectively perform illumination analysis and correction on the training images in the training set to generate a plurality of illumination-corrected images;
[0110] S112, using a convolution module to extract features from the illumination correction image to generate an initial feature map;
[0111] S113, using a depthwise separable convolution module to extract features from the initial feature map to generate an intermediate feature map;
[0112] S114: Fusing the intermediate feature maps with the corresponding historical sensor encoding data to generate a target feature map.
[0113] In an embodiment of the present invention, in the inkjet coding working environment, the light intensity and angle may change due to factors such as equipment operation and factory lighting, resulting in uneven brightness and reduced contrast of the inkjet coding image, affecting the detection effect. To solve this problem, an adaptive illumination correction module is introduced into the convolutional neural network deep learning model. This module is based on the Retinex theory, an improved retinal cortex theory method, and performs multi-scale decomposition on the input image to separate the illumination component and the reflection component. After equalization processing of the illumination component, it is fused with the reflection component to obtain an illumination-normalized illumination correction image.
[0114] The illumination-corrected image after illumination correction is input into the convolution module, which is composed of multiple convolution layers and pooling layers alternating with each other. The convolution layer performs convolution operation with the illumination-corrected image through the convolution kernel to extract the basic features of the illumination-corrected image, and the pooling layer reduces the dimensionality of the illumination-corrected image to reduce the amount of calculation and obtain the initial feature map. Furthermore, a spatial deformation module (STN) can be connected to the middle layer of the convolution module. It automatically learns the geometric transformation parameters of the illumination-corrected image based on the local features extracted by the convolution module, and performs affine transformation on the illumination-corrected image through the affine transformation formula to correct the image deformation caused by factors such as production line vibration. The affine transformation formula is in, is the feature map after transformation; T is the affine transformation operation; θ is the rotation, translation, scaling and other parameters in the affine transformation; a is the original feature map, that is, the object before transformation.
[0115] The depthwise separable convolution module uses the depthwise convolution formula and the pointwise convolution formula to extract features from the initial feature map and generate an intermediate feature map. Finally, the intermediate feature map is fused with the corresponding historical sensor encoding data to generate the target feature map.
[0116] The depth convolution formula is:
[0117]
[0118] Among them, G i,j,k is the value of the feature map obtained after depth convolution at position (i, j) and the kth channel. In the processing of inkjet images, the value of each channel represents the response degree of the position in a specific feature dimension, and multiple channels together constitute a description of the inkjet image features. i+m,j+n,kRepresents the pixel value of the input feature map (i.e., the initial feature map) at position (i+m,j+n) and the kth channel. Where (i,j) is the coordinate of the output feature map, (m,n) is the offset of the convolution kernel sliding on the input feature map, and k corresponds to different channels of the input feature map. For example, in an RGB image, k can correspond to the red, green, and blue channels respectively. In inkjet image feature extraction, different channels may correspond to different types of feature responses. K m,n,k is the weight value of the depthwise convolution kernel at position (m,n) and the kth channel. M is the width of the depthwise convolution kernel. N is the height of the depthwise convolution kernel.
[0119] The point-by-point convolution formula is:
[0120]
[0121] Among them, H i,j,l Represents the value of the feature map obtained after point-by-point convolution at position (i, j) and the lth channel. i,j,k W is the value of the feature map output by the depth convolution at position (i, j) and the kth channel. It serves as the input of the point-by-point convolution and contains the feature information extracted by the depth convolution. k,l is the weight value of the point-by-point convolution kernel, which is used to map the kth channel of the depthwise convolution output feature map to the lth channel of the point-by-point convolution output feature map. K is the number of channels of the depthwise convolution output feature map. l is the number of channels of the point-by-point convolution output feature map.
[0122] Optionally, step S111 may include the following sub-steps S1111-S1115:
[0123] S1111, filtering the training images in the training set using a low-pass filter to generate filtered images;
[0124] S1112, performing adaptive illumination adjustment on the filtered image using an adaptive compensation factor to generate an illumination component;
[0125] S1113, performing difference calculation using the logarithm of the original image corresponding to the illumination component and the logarithm of the illumination component to generate a reflection difference;
[0126] S1114, calculating the sum of the reflection difference and the preset edge enhancement item to generate a reflection component;
[0127] S1115: Fusing the illumination component and the reflection component to generate an illumination-corrected image.
[0128] In the embodiment of the present invention, the training images in the training set are filtered by low-pass filters to generate filtered images. The formula corresponding to the low-pass filter is F i(x,y)*I(x,y), which means using the low-pass filter F of the i-th scale i (x, y) performs a filtering operation on the original image I(x, y). The function of the low-pass filter is to smooth the image, remove high-frequency details, and retain low-frequency information. The result obtained mainly contains the illumination component information in the image.
[0129] After obtaining the low-pass filtering result, multiply it by the adaptive illumination compensation factor α(x,y), that is, α(x,y)·F i (x,y)*I(x,y). α(x,y) is calculated based on the average brightness of the local area and the entire image. It can adaptively adjust the illumination component after low-pass filtering based on the difference in illumination intensity in different areas of the image, making the estimated illumination component more accurate and better able to adapt to the uneven illumination conditions in the coding environment.
[0130] The reflection difference is calculated by subtracting the logarithm of the original image corresponding to the illumination component from the logarithm of the illumination component. To further highlight useful information in the reflection component, such as the edge features of the inkjet character, an edge enhancement term is added to the reflection component calculation. The reflection component is generated by summing the reflection difference with the preset edge enhancement term. Finally, the illumination component and the reflection component are fused to generate a lighting-corrected image.
[0131] Furthermore, the reflection component expression corresponding to the reflection component is:
[0132]
[0133] Among them, R(x,y) is the result value of the image at the pixel coordinate (x,y) after processing by the improved retinal cortex theory algorithm, that is, the reflection component. This value comprehensively considers factors such as illumination compensation, edge enhancement, and noise suppression. It can more accurately present the target information in the image, such as inkjet characters, while reducing interference such as uneven illumination and noise.
[0134] I(x,y) is the brightness value of the input original inkjet image at the pixel coordinate (x,y), which represents the original lighting information of each pixel in the image.
[0135] N is the number of scales. In the multi-scale Retinex algorithm, which is based on the retinal cortex theory, multiple low-pass filters of different scales are used to process the image. Filters of different scales can capture features of different sizes in the image, allowing for more comprehensive image analysis and processing.
[0136] ω iis the weight of the i-th scale, which is used to adjust the contribution of each scale to the final result. By properly setting the weights of different scales, we can highlight or weaken the information at certain scales according to the specific image characteristics and application requirements to achieve better image enhancement effects.
[0137] F i (x,y) is the low-pass filter of the i-th scale. The low-pass filter is used to smooth the image, remove high-frequency noise, and retain the low-frequency information of the image, such as the illumination component. i (x,y) has different filtering characteristics and can analyze and process images at different scales. i (x,y)*I(x,y) means using the low-pass filter F of the i-th scale i (x,y) performs filtering operation on the original inkjet image I(x,y).
[0138] α(x,y) is the adaptive illumination compensation factor. It dynamically adjusts the filter parameters according to the illumination intensity of the local area to compensate for the uneven illumination problem in the inkjet environment. The specific calculation method is: where μ L (x,y) is the average brightness of the local area centered on pixel (x,y), and μ0 is the average brightness of the entire image. In this way, α(x,y) can adaptively adjust the low-pass filter result based on the lighting conditions of different areas in the image, better correcting the lighting in overly bright or dark areas.
[0139] E(x,y) is the edge strength map calculated using the Sobel operator. The Sobel operator is a commonly used edge detection operator that calculates the horizontal and vertical gradients of an image to obtain edge strength values for each pixel. E(x,y) represents the edge strength information at pixel (x,y) in the image and is used to highlight the edge features of the coded characters.
[0140] β is a weighting factor that adjusts the degree of edge enhancement. It controls the contribution of the edge enhancement term to the overall formula. By adjusting the value of β, the prominence of image edges can be flexibly enhanced or weakened according to actual needs to achieve optimal visual effects and recognition performance.
[0141] Median(·) is a median filter operation. In the formula, median filtering is performed on the low-pass filtered result. This effectively suppresses impulse noise, such as salt and pepper noise, making illumination component estimation more stable, reducing noise interference with image processing results, and improving the algorithm's noise immunity.
[0142] Optionally, step S113 may include the following sub-steps S1131-S1133:
[0143] S1131, using adaptive convolution kernels of multiple preset sizes to perform a depth convolution operation on the initial feature map to generate multiple initial convolution feature maps;
[0144] S1132, using a preset convolution kernel to perform point-by-point convolution on the initial convolution feature map to generate multiple intermediate convolution feature maps;
[0145] S1133. Use a weighted summation method to fuse all intermediate convolution feature maps to generate an intermediate feature map.
[0146] The preset size refers to the size of the convolution kernel set according to the actual feature scale required.
[0147] The preset convolution kernel is usually a 1×1 convolution kernel, which is mainly used to operate on channels.
[0148] In an embodiment of the present invention, depthwise convolution is performed on the initial feature map using multiple convolution kernels of different sizes to extract features of different scales from the initial feature map, thereby obtaining multiple initial convolution feature maps. The depthwise convolution operation is part of depthwise separable convolution. It performs convolution on each channel of the input feature map separately, rather than simultaneously on all channels as in traditional convolution. This significantly reduces the number of parameters and computational complexity. By performing pointwise convolution on the initial convolution feature map using a preset convolution kernel, each position in the initial convolution feature map can be traversed to obtain multiple intermediate convolution feature maps. Because each intermediate convolution feature map is obtained by depthwise and pointwise convolution using convolution kernels of different sizes, it describes the information of the initial feature map from different perspectives and contributes differently to the final feature representation. Therefore, to fully utilize this information, a weighted summation method is used to assign a weight to each intermediate convolution feature map, where the weight reflects the importance of the intermediate convolution feature map. Using this weighted summation method, all intermediate convolution feature maps are fused together to obtain a single intermediate feature map that integrates information from various scales and channels.
[0149] Step 207: Use the test set to perform model evaluation on the initial image recognition model to generate a target image recognition model.
[0150] In an embodiment of the present invention, the images in the test set are subjected to the same preprocessing operation as in the training phase, and the preprocessed test set images are input into the initial image recognition model one by one. The prediction results of the model are compared with the actual annotations of the test set images, and the accuracy, recall rate, precision rate, F1 value (F1-Score) and other evaluation values of the model are calculated. The evaluation values are compared with the corresponding evaluation thresholds respectively. When the evaluation values are all less than the corresponding evaluation thresholds, the initial image recognition model at the current moment is used as the target image recognition model. When any evaluation value is not less than the corresponding evaluation threshold, the execution is jumped to the step of using the training set and historical sensor encoding data to perform model training on the initial convolutional neural network deep learning model to generate the initial image recognition model.
[0151] Step 208: Use the spatial attention mechanism to perform abnormality recognition on the real-time inkjet coding image through the target image recognition model to generate image recognition data.
[0152] In an embodiment of the present invention, the spatial attention mechanism enables the target image recognition model to focus more on important areas of the image related to the inkjet printer, while ignoring irrelevant background information. Real-time inkjet printer images, captured by the inkjet printer during operation, are input into the target image recognition model. The model first processes the input image using the spatial attention mechanism to highlight the features of the inkjet printer area. Then, through a series of operations such as convolution and pooling, it extracts deep-level features of the image. These features may include edge information of the inkjet printer characters, ink concentration distribution, and character spacing. The model then compares and analyzes the extracted features with the features of normal inkjet printer images learned during previous training. If the features of the real-time image differ significantly from the normal features, such as missing characters, ink splatter, or incorrect inkjet printer positioning, the model will determine that the image is abnormal. The model determines the type and severity of the abnormality based on preset thresholds and rules. The model records the abnormality recognition results in the form of image recognition data. This data may include information such as the type of abnormality (such as incorrect characters, ink problems, etc.), the location of the abnormality in the image, and the confidence level of the abnormality (indicating the model's degree of certainty in the judgment result).
[0153] Furthermore, image recognition data can be combined with printhead operating data to identify and correct abnormal coding patterns. It can also be directly output to the coding equipment's control system or other relevant monitoring platforms. Operators can use this data to promptly identify problems during the coding process and take appropriate measures to adjust and repair them, such as adjusting printhead parameters or replacing ink, to ensure coding quality and production efficiency. Furthermore, this data can be stored and analyzed as historical data to evaluate and optimize the performance of the coding equipment, thereby improving the stability and reliability of the entire coding system.
[0154] Step 209: Identify the working state of the nozzle based on the real-time sensor data set and generate nozzle working data.
[0155] Optionally, step 209 may include the following sub-steps S21-S23:
[0156] S21 , normalizing the nozzle temperature data, nozzle pressure data, and ink flow data respectively to generate initial temperature data, initial pressure data, and ink flow data.
[0157] S22: Fusing the initial temperature data, initial pressure data, and ink flow data to generate sensor fusion data.
[0158] S23. Use the autoregressive sliding average model to identify the state of the nozzle based on the sensor fusion data to generate nozzle working data.
[0159] In an embodiment of the present invention, the nozzle temperature data, nozzle pressure data, and ink flow data are normalized to obtain initial temperature data, initial pressure data, and ink flow data. These initial temperature data, initial pressure data, and ink flow data are then fused using a simple weighted summation method to obtain sensor fusion data.
[0160] An autoregressive moving average model uses historical sensor fusion data to estimate the autoregressive and moving average coefficients of the ARMA model, followed by model training and validation. The training and validation process for this model involves dividing the preprocessed historical sensor fusion data into a training set and a validation set. The training set is used to train the ARMA model, adjusting its parameters so that the model accurately describes the patterns in the training data. During training, the model parameters are continuously adjusted to minimize the error between the model's predictions and the actual data in the training set. The trained model is then validated using the validation set to evaluate its performance on unseen data. If the model's error on the validation set is large, this indicates overfitting or underfitting, and the model structure needs to be adjusted or the parameters need to be re-estimated.
[0161] After training and validation, the autoregressive moving average model can be used to identify printhead status based on new sensor fusion data. Real-time sensor fusion data is fed into the model, which predicts and identifies the printhead's status based on learned patterns and parameters. For example, the model can predict the changing trends of parameters such as printhead temperature, pressure, and ink flow, thereby determining whether the printhead is operating normally. If the predicted values deviate significantly from the normal operating range, this may indicate a printhead failure or anomaly. Based on the model's predictions, printhead operating data is generated, including information on the current printhead status, predicted future status, and potential fault warnings.
[0162] Step 210: Use a preset dynamic threshold model to perform abnormal coding recognition and error correction on the image recognition data and the printhead operation data to generate coding error correction data.
[0163] Optionally, step 210 may include the following sub-steps S31-S35:
[0164] S31, splicing the feature vectors corresponding to the image recognition data and the printhead operation data to generate feature vector fusion data;
[0165] S32, fusion data of feature vectors to perform data dimension reduction and key feature extraction to generate core features;
[0166] S33, selecting a core threshold corresponding to the core feature from a preset dynamic threshold model;
[0167] S34, comparing the core threshold with the core feature to generate coding data;
[0168] S35. Perform abnormal error correction based on the inkjet coding data to generate inkjet coding error correction data.
[0169] In an embodiment of the present invention, by concatenating the feature vectors corresponding to the image recognition data and the printhead operating data, the different features contained in the image recognition data and the printhead operating data are combined to form a more comprehensive feature vector fusion data. This is done to comprehensively consider information from both the image and the printhead to more accurately determine the coding performance. Because the feature vector fusion data may contain a large number of features, some of which may be redundant or have little impact on the final coding determination, data dimensionality reduction and key feature extraction are required to improve processing efficiency and accuracy. Data dimensionality reduction can be performed using methods such as principal component analysis (PCA), which uses linear transformations to map high-dimensional data into a low-dimensional space while preserving the key information of the original data as much as possible. In the coding environment, this step can remove noise features that are irrelevant to coding quality, such as subtle background-related variations in the coding image. Key feature extraction selects the most critical features for determining coding quality from the reduced dimensionality data based on the characteristics and requirements of coding. For example, during the coding process, features such as character clarity and printhead pressure stability are crucial for determining coding performance, and these features can be extracted as core features. The preset dynamic threshold model is pre-established based on the coding environment and historical data. It includes threshold ranges corresponding to different core features. During the coding process, fixed template matching or simple threshold judgments are prone to false detections and missed detections due to complex factors such as font changes, positional offsets, and background interference. The dynamic threshold model, on the other hand, adaptively selects appropriate thresholds based on different core features. For example, the character clarity threshold may vary for coding with different fonts, and the acceptable range of positional offset may also vary for coding at different locations.
[0170] Selecting core thresholds corresponding to core features from a preset dynamic threshold model is a process of finding the most appropriate judgment criteria for each core feature based on the current specific coding situation, thereby improving the accuracy of coding judgment. The extracted core features are compared with the selected core thresholds. If the core feature value is within the core threshold range, the coding is normal; if it is outside the range, an anomaly may exist. For example, if the core feature value for character clarity is lower than the corresponding core threshold, it may indicate quality issues such as blurring. If the core feature value for printhead pressure is outside the normal range, it may indicate unstable printhead operation and require adjustment. This comparison generates coding data, which records the comparison results of each key feature and threshold during the coding process, providing a basis for subsequent anomaly correction. Anomaly correction based on coding data involves taking appropriate measures to correct anomalies in the coding process based on the comparison results of the core features and core thresholds.
[0171] Optionally, step S34 may include the following sub-steps S341-S345:
[0172] S341: Determine whether the character clarity score corresponding to the core feature is less than the score threshold. If so, execute step S342; if not, execute step S343.
[0173] S342: Using an abnormality type decision tree to identify the coding abnormality type corresponding to the core feature, and generating first coding data;
[0174] S343, determining whether the nozzle operation data corresponding to the core feature is greater than the nozzle operation threshold, if so, executing step S344, if not, executing step S345;
[0175] S344. Using a classification neural network to identify the type of coding anomaly corresponding to the core feature, and generating second coding data;
[0176] S345: Determine that the coding status is normal and produce the third coding data.
[0177] In an embodiment of the present invention, in a coding environment, character clarity is one of the important indicators for measuring coding quality. First, information related to character clarity is extracted from the core features and scored according to a preset scoring standard. This scoring standard is formulated by comprehensively considering factors such as the characteristics of the coding font, the resolution of the coding, and the acceptable range of character clarity for the human eye. Then, the obtained character clarity score is compared with a pre-set scoring threshold. The scoring threshold is determined based on a large amount of experimental data and actual coding experience. It represents the minimum clarity standard that can ensure acceptable coding quality in the current coding environment. If the character clarity score is less than the scoring threshold, it means that the coding characters may have quality problems such as blurring and incompleteness, and further analysis of the abnormality type is required. At this time, step S342 is executed; if the character clarity score is not less than the scoring threshold, it means that the character clarity is within an acceptable range. Then, it is necessary to check the working status of the printhead and execute step S343.
[0178] When the character clarity score is less than the score threshold, an anomaly type decision tree is used to identify the type of coding anomaly. The anomaly type decision tree is a classification model based on a tree structure, which is constructed based on a large number of historical coding image sets, historical sensor data sets and corresponding anomaly situations. Each node of the decision tree tests a certain attribute in the core features, determines the branch direction based on the test results, and finally reaches the leaf node, which represents different types of coding anomalies. For example, the decision tree may first determine whether the blurred characters are caused by insufficient ink flow or nozzle clogging, and then further subdivide according to other related features to finally determine the specific anomaly type, such as "poor ink supply causes blurred characters" and "partial nozzle clogging causes incomplete characters". In this way, the specific reasons behind the character clarity problem can be more accurately identified, and the first coding data containing the anomaly type information can be generated, providing a clear direction for subsequent error correction measures.
[0179] After confirming that the character clarity is normal, it is necessary to further check the working status of the nozzle. Extract data related to the nozzle operation from the core features, such as the comprehensive characterization values of parameters such as nozzle temperature, pressure, and ink flow. Then compare these nozzle working data with the pre-set nozzle working threshold. The nozzle working threshold is determined based on factors such as the technical specifications of the nozzle, ink characteristics, and coding process requirements. It represents the parameter range for the normal operation of the nozzle. If the nozzle working data is greater than the nozzle working threshold, it means that the working status of the nozzle may be abnormal, and it is necessary to further analyze the abnormality type through the classification neural network, and execute step S344; if the nozzle working data is not greater than the nozzle working threshold, it means that the nozzle is working normally and the overall coding state is good, and execute step S345.
[0180] When the nozzle working data is greater than the nozzle working threshold, a classification neural network is used to identify the type of coding abnormality. The classification neural network is a model based on deep learning. It learns the complex mapping relationship between different abnormality types and core features by training a large amount of labeled nozzle abnormality data. The current core features are input into the trained classification neural network, and the network will calculate according to its internal weights and neuron activation functions, and output the corresponding probability distribution of the coding abnormality type. For example, the probability of the coding abnormality caused by the nozzle temperature being too high may be output as 0.7, and the probability of the coding abnormality caused by unstable ink flow is 0.3, etc. In this way, the specific type of nozzle working abnormality can be identified more accurately, and the second coding data containing detailed abnormality information can be generated so that targeted measures can be taken for adjustment and repair.
[0181] If, after the previous judgment, the character clarity score is not less than the score threshold, and the printhead working data is not greater than the printhead working threshold, then it can be determined that the current coding status is normal. At this time, the third coding data is generated, which mainly records the information of normal coding, such as the various parameters of the current coding, timestamp, etc., as a normal record of the coding process, for subsequent quality traceability and statistical analysis. At the same time, this also shows that in the current coding environment, the coding system can work normally, without false detection or missed detection problems caused by complex scenarios such as font changes, position offset, background interference, etc., and the coding effect meets the quality requirements.
[0182] Optionally, step S35 may include the following sub-steps S351-S353:
[0183] S351. Select corresponding error correction measures from a preset error correction library according to the abnormality type corresponding to the coding data, and generate error correction measure data;
[0184] S352, performing an error correction operation according to the error correction measure data to generate error correction operation data;
[0185] S353: Update the preset dynamic threshold model with the response data corresponding to the error correction operation data to generate coding error correction data.
[0186] In an embodiment of the present invention, in a coding environment, a preset abnormal error correction library is constructed based on a large amount of historical coding data and actual operating experience. This library stores various possible types of coding abnormalities and corresponding error correction measures for each type of abnormality. When the coding data is generated, the data will clearly indicate the type of abnormality that exists in the current coding, such as blurred characters, position offset, abnormal nozzle pressure, etc. The system will perform a matching search in the preset abnormal error correction library based on the corresponding abnormality type in the coding data. For example, if the coding data shows that the blurred characters are caused by insufficient ink flow, the system will select error correction measures for insufficient ink flow from the library, such as adjusting the opening of the ink supply valve, checking whether the ink pipe is blocked, etc., and organize these error correction measures into error correction measure data.
[0187] Based on the generated corrective action data, the system automatically or guides the operator to perform the corresponding corrective action. If the corrective action involves adjusting the opening of the ink supply valve, the system uses control signals to precisely adjust the valve to the appropriate opening to increase ink flow. If the corrective action involves checking for blockage in the ink pipeline, the operator follows prompts to inspect and clean the pipeline. During the corrective action, the system records the specific operation content, operation time, and operating parameters in real time. This information constitutes the corrective action data. For example, the specific value of the valve opening adjustment and the time spent inspecting and cleaning the pipeline are recorded to facilitate subsequent evaluation and analysis of the effectiveness of the corrective action.
[0188] After performing a correction operation, the system collects response data corresponding to the correction operation data. This response data includes information such as improvements in coding quality and changes in printhead operating parameters. For example, after adjusting the ink flow, does character clarity improve or does printhead pressure return to normal? Existing coding methods rely solely on fixed template matching or simple threshold judgments, making them difficult to adapt to complex scenarios. However, a preset dynamic threshold model can adapt to actual conditions. By feeding response data back to the preset dynamic threshold model, the system updates the thresholds in the model. For example, if, after adjusting the ink flow, the originally set ink flow threshold is found to be inappropriate for the new coding environment, the system will adjust the threshold based on the response data to better reflect the actual situation. The updated preset dynamic threshold model can better adapt to complex coding scenarios, reduce false detections and missed detections, and improve coding performance. Finally, the relevant information from the updated model and the final results of the correction operation are integrated to generate coding correction data. This data serves as an important record of the coding process and is used for subsequent quality monitoring and system optimization.
[0189] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A coding method for automatic checking and error correction, characterized in that: The following steps are involved: Obtain historical coding image sets, historical sensor data sets, real-time coding images, and real-time sensor data sets; Using the historical coding image set and the historical sensor data set to train an initial convolutional neural network deep learning model to generate a target image recognition model; Using the target image recognition model to use a spatial attention mechanism to perform abnormality recognition on the real-time coding image to generate image recognition data; Identify the working state of the nozzle based on the real-time sensor data set to generate nozzle working data; A preset dynamic threshold model is used to perform abnormal coding recognition and abnormal error correction on the image recognition data and the printhead working data to generate coding error correction data.
2. The method for automatically checking and correcting inkjet coding according to claim 1, characterized in that: The method of using the historical inkjet image set and the historical sensor data set to perform model training on the initial convolutional neural network deep learning model to generate a target image recognition model includes: Marking the coding area and defect type of each historical coding image in the historical coding image set to generate initial model training data; Normalizing the initial model training data to generate target model training data; Divide the target model training data into data according to a preset division method to generate a training set and a test set; Encoding the historical sensor data set to generate historical sensor encoded data; Performing model training on an initial convolutional neural network deep learning model using the training set and the historical sensor encoding data to generate an initial image recognition model; The test set is used to perform model evaluation on the initial image recognition model to generate a target image recognition model.
3. The automatic checking and error correction inkjet coding method according to claim 2, characterized in that: The step of training an initial convolutional neural network deep learning model using the training set and the historical sensor encoding data to generate an initial image recognition model includes: Extracting features from the training images in the training set to generate a target feature map; Mapping the target feature map to the corresponding coding category space to generate predicted label data corresponding to the training image; Calculate the loss value of the predicted label data and the true label corresponding to the training image to generate a loss value; Calculating the gradients of various parameters in the initial convolutional neural network deep learning model using a back propagation algorithm according to the loss value to generate multiple gradient data; Using the gradient data to update the initial convolutional neural network deep learning model, generate a target convolutional neural network deep learning model and count the number of training times; When the number of training times is less than the preset training threshold, the target convolutional neural network deep learning model is used as a new initial convolutional neural network deep learning model, and the step of performing feature extraction on the training images in the training set to generate a target feature map is skipped and executed; When the number of training times is equal to a preset training threshold, the target convolutional neural network deep learning model at the current moment is used as the initial image recognition model.
4. The method for automatically checking and correcting inkjet coding according to claim 3, characterized in that: The extracting features of the training images in the training set to generate a target feature map includes: Using an improved retinal cortex theory method, respectively performing illumination analysis and correction on the training images in the training set to generate a plurality of illumination-corrected images; Using a convolution module to extract features from the illumination correction images to generate an initial feature map; Using a depthwise separable convolution module to extract features from the initial feature map to generate an intermediate feature map; The intermediate feature maps are respectively fused with the corresponding historical sensor encoding data to generate a target feature map.
5. The method for automatically checking and correcting inkjet coding according to claim 4, characterized in that: The step of using the improved retinal cortex theory method to perform illumination analysis and correction on the training images in the training set to generate a plurality of illumination-corrected images comprises: filtering the training images in the training set using a low-pass filter to generate filtered images; Adaptively adjusting the illumination of the filtered image using an adaptive compensation factor to generate an illumination component; Performing a difference calculation using the logarithm of the original image corresponding to the illumination component and the logarithm of the illumination component to generate a reflection difference; Calculating the sum of the reflection difference and a preset edge enhancement item to generate a reflection component; The illumination component and the reflection component are fused to generate an illumination-corrected image.
6. The method for automatically checking and correcting inkjet coding according to claim 4, characterized in that: The step of extracting features from the initial feature map using a depthwise separable convolution module to generate an intermediate feature map includes: Performing a depthwise convolution operation on the initial feature map using adaptive convolution kernels of multiple preset sizes to generate multiple initial convolution feature maps; Using a preset convolution kernel to perform point-by-point convolution on the initial convolution feature map to generate multiple intermediate convolution feature maps; A weighted summation method is used to fuse all the intermediate convolution feature maps to generate an intermediate feature map.
7. The method for automatically checking and correcting inkjet coding according to claim 1, characterized in that: The real-time sensor data set includes nozzle temperature data, nozzle pressure data and ink flow data; The identifying the working state of the nozzle based on the real-time sensor data set and generating the nozzle working data includes: Normalizing the nozzle temperature data, the nozzle pressure data, and the ink flow rate data to generate initial temperature data, initial pressure data, and ink flow rate data; fusing the initial temperature data, the initial pressure data, and the ink flow rate data to generate sensor fusion data; An autoregressive sliding average model is used to identify the state of the nozzles using the sensor fusion data to generate nozzle working data.
8. The method for automatically checking and correcting inkjet coding according to claim 1, characterized in that: The method of using a preset dynamic threshold model to identify abnormal coding and perform abnormal error correction on the image recognition data and the printhead operation data to generate coding error correction data includes: splicing the feature vectors corresponding to the image recognition data and the printhead operation data to generate feature vector fusion data; The feature vectors are fused with data to perform data dimensionality reduction and key feature extraction to generate core features; Selecting a core threshold corresponding to the core feature from a preset dynamic threshold model; Comparing the core threshold with the core feature to generate coding data; Abnormal error correction is performed based on the coding data to generate coding error correction data.
9. The method for automatically checking and correcting inkjet coding according to claim 8, characterized in that: The core threshold includes a scoring threshold and a nozzle working threshold; and the step of comparing the core threshold with the core feature to generate coding data includes: Determining whether the character clarity score corresponding to the core feature is less than the score threshold; If yes, an abnormality type decision tree is used to identify the coding abnormality type corresponding to the core feature, and generate the first coding data; If not, determining whether the nozzle operation data corresponding to the core feature is greater than the nozzle operation threshold; If so, a classification neural network is used to identify the coding anomaly type corresponding to the core feature and generate second coding data; If not, it is determined that the coding state is normal and the third coding data is produced.
10. The automatic checking and error correction inkjet coding method according to claim 8 or 9, characterized in that: The performing of abnormal error correction based on the coding data to generate coding error correction data includes: Selecting corresponding error correction measures from a preset error correction library according to the abnormality type corresponding to the coding data, and generating error correction measure data; Perform an error correction operation according to the error correction measure data to generate error correction operation data; The preset dynamic threshold model is updated with the response data corresponding to the error correction operation data to generate coding error correction data.
Citation Information
Cited By
Abnormality diagnosis method for label printing equipment based on multi-modal fusion
CN120921815A