Image processing-based food printing quality detection method
By employing multimodal image fusion technology and deep learning algorithms, the problems of multidimensional feature capture and safety risk prevention in food printing quality inspection have been solved. This has enabled comprehensive detection and closed-loop control of the printing appearance and potential risks, thereby improving the quality and safety level of food printing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 武汉膳印科技有限公司
- Filing Date
- 2025-09-16
- Publication Date
- 2026-04-24
AI Technical Summary
Existing food printing quality testing technologies mainly rely on single-modal detection, which makes it difficult to fully capture the multidimensional characteristics of printing quality. They lack systematic multimodal fusion methods, cannot proactively prevent potential safety risks, and the detection data has not formed a systematic knowledge accumulation, leading to the repeated occurrence of the same problems.
Visible light cameras, infrared thermal imagers, and ultraviolet fluorescence imaging devices are used to acquire multimodal images. Through noise reduction and spatial alignment processing, fusion weights are generated and multimodal feature fusion is performed. Combined with deep learning and image processing algorithms, the appearance characteristics and potential safety risks of printed products are fully captured, and closed-loop control is formed by adjusting process parameters.
It enables comprehensive detection of printed appearance quality and potential safety risks, improves detection accuracy and recall rate, can promptly identify potential safety risks, establishes a quality management system from passive detection to proactive prevention, and significantly improves the quality stability and safety reliability of food printing.
Smart Images

Figure CN121120601B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method for detecting the printing quality of a food printing machine based on image processing. Background Technology
[0002] Food printing technology is an important means of food decoration and personalization. With increasing consumer demands for food appearance and safety, quality inspection of food printing has become a crucial link in the food production industry. Traditional food printing quality inspection mainly relies on manual visual inspection, where inspectors directly observe the color, clarity, and integrity of the print to judge its quality. With technological advancements, single-modal machine vision systems are increasingly being applied to food printing inspection. These systems use visible light cameras to capture the printed pattern and analyze color deviations and shape defects through image processing algorithms. Some advanced manufacturers have begun using infrared detection technology to monitor the temperature distribution of the print or ultraviolet fluorescence technology to detect the distribution of specific components. However, these technologies are usually applied independently, lacking a systematic multimodal fusion approach.
[0003] However, existing food printing quality inspection technologies have significant shortcomings. Single-modal detection methods struggle to comprehensively capture the multidimensional characteristics of printing quality. Visible light detection can only identify surface defects and cannot detect potential safety risks; infrared detection cannot accurately distinguish color deviations; and ultraviolet fluorescence detection also has limitations. Secondly, most existing detection technologies are passive, only able to identify problems but not proactively prevent them, lacking a closed-loop control mechanism from detection results to process parameter adjustments. Furthermore, detection data is usually stored in isolation, failing to form a systematic knowledge accumulation, leading to the recurrence of the same problems. Most importantly, existing technologies primarily focus on appearance quality, paying insufficient attention to potential food safety risks. For example, insufficient curing of printing materials may lead to the migration of harmful substances, and traditional methods struggle to detect such "potential defects" in a timely manner, posing food safety hazards. Summary of the Invention
[0004] This application provides a method for inspecting the printing quality of food printing machines based on image processing. It can simultaneously assess the appearance quality and potential safety risks of the printed product, and achieve closed-loop quality control through intelligent process regulation, thereby improving the overall quality and safety level of food printing. The method addresses the effective fusion of three image modalities: visible light, infrared thermography, and ultraviolet fluorescence. It establishes a mapping mechanism from image features to quality assessment, designs a dynamic adjustment strategy for process parameters based on quality assessment results, and constructs a systematic quality prevention and control system, achieving a technological shift from passive detection to proactive prevention.
[0005] This application provides a method for detecting the printing quality of a food printing machine based on image processing. The method includes: acquiring images of the food printing process using a visible light camera, an infrared thermal imager, and an ultraviolet fluorescence imaging device; performing noise reduction and spatial alignment processing on the acquired three modal images to obtain multimodal image data; generating fusion weights based on the multimodal image data; fusing the multimodal features to obtain a comprehensive feature representation; extracting printing area information based on the comprehensive feature representation; comparing it with a standard template to detect common defects and safety risks, resulting in a multi-level defect marking map and a food printing safety risk coordinate map; generating a printing quality score and safety warning information based on the multi-level defect marking map and the food printing safety risk coordinate map; adjusting the printing materials and process parameters based on the quality score and safety warning information to obtain process control instructions; and formulating printing quality prevention and control rules based on the process control instructions and historical detection data.
[0006] The technical solution provided in this application acquires multimodal images of food printing using a visible light camera, an infrared thermal imager, and an ultraviolet fluorescence imaging device, and performs noise reduction and spatial alignment processing to obtain multidimensional data that comprehensively reflects the characteristics of the printing. This overcomes the limitations of limited information in single-modal images and achieves comprehensive capture of the appearance features and potential safety risks of the printing. Based on the multimodal image data, fusion weights are generated and multimodal features are fused, fully utilizing the advantages of deep learning and image processing algorithms in different data feature extractions. This allows the fused comprehensive feature representation to simultaneously contain visual, thermal, and chemical multidimensional information, significantly improving the richness and discriminative power of the feature representation. Printing area information is extracted based on the fused features and compared with a standard template, enabling the identification of common defects and safety risks. The dual detection, especially through cross-validation of infrared thermal anomalies and ultraviolet fluorescence anomalies, can uncover potential safety risks that are difficult to detect using traditional methods, such as the risk of harmful substance migration due to insufficient material curing or the risk of allergens caused by abnormal pigment distribution. Based on multi-level defect marking maps and safety risk coordinate maps, printing quality scores and safety warning information are generated, realizing the quantitative expression of quality assessment and risk warning, and providing accurate data basis for subsequent process adjustments. The printing materials and process parameters are adjusted in real time according to the quality scores and safety warning information, forming a closed-loop control from detection to regulation, and realizing timely correction of quality problems. Through systematic analysis of process control instructions and historical detection data, printing quality prevention and control rules are formulated, and a quality management system from passive detection to proactive prevention is established. In the entire solution, artificial intelligence algorithms, especially deep learning feature extraction networks, dynamic weight generation networks, and multi-scale segmentation networks, played a crucial role. These algorithms not only improved the accuracy of feature extraction but also achieved intelligent complementarity between modalities through adaptive weight allocation in the feature fusion stage. In precise segmentation of the printing area and defect detection, deep feature learning enhanced detection accuracy and recall. In safety risk assessment, graph neural networks captured complex multimodal correlation patterns. In process parameter adjustment, deep reinforcement learning achieved adaptive optimization of printing parameters. This gave the entire detection method intelligent, adaptive, and predictive technical characteristics, significantly improving the quality stability and safety reliability of food printing, reducing quality fluctuations and potential safety risks, and providing a comprehensive quality control solution for the food printing industry. Attached Figure Description
[0007] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1This is a schematic diagram of an embodiment of the image processing-based food printing machine printing quality detection method in this application. Detailed Implementation
[0009] This application provides a method for detecting the printing quality of a food printing machine based on image processing. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0010] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the image processing-based food printing machine printing quality detection method in this application includes:
[0011] Step S101: Images of food printing are acquired using a visible light camera, an infrared thermal imager, and an ultraviolet fluorescence imaging device. The acquired images of the three modalities are then subjected to noise reduction and spatial alignment processing to obtain multimodal image data.
[0012] Step S102: Based on the multimodal image data, generate fusion weights, perform fusion processing on the multimodal features, and obtain a comprehensive feature representation;
[0013] Step S103: Based on the comprehensive feature representation, extract the printing area information, compare it with the standard template, detect common defects and safety risks, and obtain a multi-level defect marking map and a food printing safety risk coordinate map;
[0014] Step S104: Generate printing quality score and safety warning information based on the multi-level defect marking map and food printing safety risk coordinate map;
[0015] Step S105: Based on the quality fraction and safety warning information, adjust the printing materials and process parameters to obtain process control instructions;
[0016] Step S106: Based on process control instructions and historical inspection data, formulate printing quality prevention and control rules.
[0017] Specifically, a visible light camera captures the color and texture features of the printed food surface, an infrared thermal imager records the temperature distribution of the printed surface, and an ultraviolet fluorescence imaging device acquires the specific fluorescence response of the printed material. The acquired raw images undergo noise reduction processing. For the visible light images, adaptive nonlocal mean filtering is applied. Specifically, within a large search window, weight coefficients are calculated for each similar window, and the filtering intensity is adaptively allocated based on pixel block similarity, thus preserving image edge details while effectively suppressing noise. For the infrared thermal images, a wavelet thresholding method is used, decomposing the image into multiple levels. Soft thresholding is applied to high-frequency coefficients, while low-frequency coefficients remain unchanged. This method effectively eliminates random fluctuations in thermal imaging while preserving the true boundaries of temperature changes. For the ultraviolet fluorescence images, Gaussian filtering is used to remove noise, and a convolution kernel of appropriate size is used for smoothing, effectively suppressing random noise in fluorescence imaging. Subsequently, spatial alignment is performed, extracting feature points and their descriptors from the three modalities. Feature points are matched using the nearest neighbor and second nearest neighbor ratio test. The optimal homography matrix is iteratively calculated using the RANSAC algorithm, which describes the perspective transformation relationship between different images. The algorithm calculates the transformation model by repeatedly and randomly selecting the minimum set of points, examines the fit of the remaining points to this model, and selects the model with the most inlier support as the transformation matrix. This transformation matrix precisely aligns the infrared thermal feature map and fluorescence feature map to the visible light image coordinate system, ensuring that the information from the three modalities corresponds accurately in spatial location. Quality metrics for each modality are calculated: signal-to-noise ratio (SNR) is calculated as the ratio of signal to noise, sharpness is evaluated using gradient energy, and information entropy is calculated using the probability distribution of grayscale values. Based on these metrics, a modal reliability matrix is constructed, recording the reliability score of each modality at each location in the image. The reliability matrix is normalized to obtain a weight map, which ensures that the sum of the weights of the three modalities is one at every location in the image.
[0018] Feature extraction employs a multi-scale convolutional structure to extract feature representations at different levels. Multimodal features are weighted and fused according to a weight map; at each spatial location, the three modal features are summed according to their corresponding weights to form an initial fused feature. A residual connection mechanism is used to add the original features to the fused feature, enhancing the complementarity of cross-modal information. An attention gating mechanism adaptively adjusts the importance of feature channels, highlighting the contribution of key feature channels and suppressing the influence of noisy channels, resulting in a comprehensive feature representation.
[0019] Printed area analysis and defect detection utilizes multi-scale gradient histograms to extract edge information and combines contour tracking algorithms to extract printed area boundaries. The printed area is segmented into different color blocks through hierarchical clustering in color space, and internal texture structure is identified using texture direction consistency analysis, constructing a multi-level printed area feature map. This map is non-rigidly registered and compared with a standard template library. The degree of local deformation is calculated using deformation fields, and color deviation is quantified using color difference vectors to form a spatial distribution of printing quality deviations. Morphological feature analysis is performed on areas exceeding thresholds, including opening and closing operations, connected component labeling, and region attribute measurement, to identify and classify printing process defects. Color distortion is measured using color space distance, edge blurring is evaluated using gradient amplitude change rate, ink discontinuity is detected through continuity analysis, and pattern misalignment is calculated using positional deviation vectors. Simultaneously, by combining infrared thermal anomaly areas and ultraviolet fluorescence anomaly response points, material thermal stability issues and potential chemical reaction risks are analyzed, generating a food printing safety risk coordinate map.
[0020] In the quality assessment phase, defects are classified and statistically analyzed, calculating the quantity, area, and severity of each type of defect to generate a defect distribution feature vector. Spatial cluster analysis is performed on the risk coordinates to identify concentrated risk areas and diffusion trends, forming a safety risk feature vector. The parameters in the defect feature vector are mapped to the quality evaluation system to construct a visual quality scoring curve, and the printing quality score is obtained through integration. Based on the characteristics of the safety risk feature vector, safety warning information containing risk level, description, and handling suggestions is generated.
[0021] In the process optimization phase, the quality score is compared and analyzed with preset thresholds to determine the direction for quality improvement; the risk types and distribution characteristics in safety warning information are analyzed to identify physicochemical causes. Based on the quality data, the adjustment amount of printing pigment ratio and the correction value of printing pressure are derived, constructing a material formulation correction matrix; based on safety handling strategies, process parameters are mapped and transformed to generate a process parameter correction matrix. The two matrices are integrated and conflicts between parameters are eliminated to form process control instructions that include adjustment timing, sequence, and magnitude.
[0022] During the establishment of the prevention and control system, process control instructions are correlated and compared with historical records to extract parameter adjustment experience and construct a parameter-quality mapping knowledge base. The relationship between quality fluctuation patterns and process changes is analyzed to form a risk warning feature set. A compatibility matrix between food substrates and printing materials is established to generate a printing formula guide. Safety risk levels and monitoring frequencies are classified, and tiered monitoring schemes are formulated. A quality traceability chain is established, and a control point table is constructed. This is transformed into prevention and control rules that include warning thresholds, detection frequencies, and handling procedures.
[0023] For example, when a problem is detected with the surface printing on a chocolate chip cookie, the system collects and processes the complete image data. Analysis reveals areas with blurred edges and pale colors, abnormal distribution of high-temperature areas in the infrared thermogram, and enhanced fluorescence in the pigment areas in the ultraviolet fluorescence image. After comprehensive analysis, the system marks the blurred-edge areas and unstable pigment areas, calculates the quality score, and issues a safety risk warning. Based on the analysis results, the system generates specific process control instructions, including adjustments for temperature, pressure, and pigment concentration. Through continuous data accumulation, the system gradually optimizes preventative control rules for different food types, establishing a complete quality control closed loop.
[0024] In this embodiment, multimodal image acquisition of food printing is performed using a visible light camera, an infrared thermal imager, and an ultraviolet fluorescence imaging device, followed by noise reduction and spatial alignment processing. This yields multidimensional data comprehensively reflecting the printing characteristics, overcoming the limitations of limited information in single-modal images and achieving a comprehensive capture of printing appearance features and potential safety risks. Based on the multimodal image data, fusion weights are generated and multimodal features are fused, fully leveraging the advantages of deep learning and image processing algorithms in different data feature extractions. This ensures that the fused comprehensive feature representation simultaneously includes visual, thermal, and chemical multidimensional information, significantly improving the richness and discriminative power of the feature representation. Printing area information is extracted based on the fused features and compared with a standard template, enabling the identification of common defects and safety risks. Dual detection, particularly through cross-validation of infrared thermal anomalies and ultraviolet fluorescence anomalies, can uncover potential safety risks that are difficult to detect using traditional methods, such as the risk of harmful substance migration due to insufficient material curing or the risk of allergens caused by abnormal pigment distribution. Based on multi-level defect marking maps and safety risk coordinate maps, printing quality scores and safety warning information are generated, enabling quantitative expression of quality assessment and risk warning, providing precise data for subsequent process adjustments. Printing materials and process parameters are adjusted in real time based on quality scores and safety warning information, forming a closed-loop control system from detection to regulation, enabling timely correction of quality problems. Through systematic analysis of process control instructions and historical detection data, printing quality prevention and control rules are formulated, establishing a quality management system from passive detection to proactive prevention. In the entire solution, artificial intelligence algorithms, especially deep learning feature extraction networks, dynamic weight generation networks, and multi-scale segmentation networks, played a crucial role. These algorithms not only improved the accuracy of feature extraction but also achieved intelligent complementarity between modalities through adaptive weight allocation in the feature fusion stage. In precise segmentation of the printing area and defect detection, deep feature learning enhanced detection accuracy and recall. In safety risk assessment, graph neural networks captured complex multimodal correlation patterns. In process parameter adjustment, deep reinforcement learning achieved adaptive optimization of printing parameters. This gave the entire detection method intelligent, adaptive, and predictive technical characteristics, significantly improving the quality stability and safety reliability of food printing, reducing quality fluctuations and potential safety risks, and providing a comprehensive quality control solution for the food printing industry.
[0025] In one specific embodiment, the process of performing step S101 may specifically include the following steps:
[0026] (1) Use a high-precision mid-infrared array sensor to scan the heat distribution on the food printing surface and record the thermal field change image;
[0027] (2) The surface material of food printing is excited by a specific wavelength ultraviolet light source, and the characteristic band fluorescence signal is captured by a filter system to form a fluorescence distribution image;
[0028] (3) Perform nonlocal mean filtering on the original color image using a large-size search window and similar window parameters to suppress nonlinear noise and generate an edge-preserving color map;
[0029] (4) Multi-layer wavelet decomposition and soft thresholding are applied to thermal field change images to separate thermal signals from background fluctuations and construct temperature analysis diagrams;
[0030] (5) The fluorescence distribution image is smoothed using a Gaussian kernel of appropriate size and standard deviation to preserve the trend of fluorescence intensity change and form a characteristic fluorescence map;
[0031] (6) The correspondence between images is extracted by the RANSAC algorithm based on SIFT feature points, the homography matrix is calculated, and the edge-preserving color map, temperature analysis map and feature fluorescence map are precisely aligned to a unified coordinate system to construct multimodal image data containing visual, thermal and chemical properties.
[0032] Specifically, a high-precision mid-infrared array sensor scans the thermal distribution of food printing surfaces in a non-contact manner. This sensor contains an array of microbolometer elements with a temperature sensitivity of 0.05°C. By measuring the intensity of infrared radiation emitted from the food printing surface, it converts thermal energy into an electrical signal, which is then amplified and digitized to form a thermal field change image. This imaging method can accurately present the heat conduction during the printing process, showing the thermal interaction characteristics between the ink curing degree and the food matrix, helping to identify areas of uneven curing or potential thermal damage. A specific wavelength of ultraviolet light (typically 365nm) irradiates the food printing surface, exciting fluorescent substances in the printing material. Different food printing pigments emit fluorescence of specific wavelengths under ultraviolet excitation. A filter system selectively captures fluorescence signals in the 400-550nm band, filtering out interference from the excitation source and ambient light, thus forming a fluorescence distribution image. This image can reveal pigment distribution and chemical activity characteristics invisible to the naked eye.
[0033] The original color image is processed using a nonlocal mean filtering algorithm. Unlike traditional local filters, this algorithm searches for regions similar to the current pixel block (typically 7×7 pixels) within a large search window (usually 21×21 pixels), calculates similarity, and assigns weights accordingly. Weight allocation follows the principle that higher similarity results in higher weights, and pixel values are reconstructed through weighted averaging. This method is particularly suitable for suppressing nonlinear noise (such as random impulse noise and texture noise) in food printing images. Its nonlocal characteristics also effectively preserve edge information, generating an edge-preserving color map. The thermal image undergoes multi-level wavelet decomposition (typically 4 levels), using discrete wavelet transform to decompose the image into low-frequency approximation components and high-frequency detail components. The high-frequency components mainly contain noise and detail information. Soft thresholding is applied to these components, setting coefficients below the threshold to zero and subtracting the threshold value from coefficients above it, effectively suppressing background thermal fluctuations while preserving actual temperature changes. Low-frequency components remain unchanged to retain the basic structure of the thermal field. After reconstruction using inverse wavelet transform, a clear temperature analysis map is obtained, presenting the true temperature distribution characteristics of food printing.
[0034] The fluorescence distribution image was processed using Gaussian filtering. A convolution kernel (typically 5×5) was constructed using a two-dimensional Gaussian function, with a standard deviation set to 1.5, and the image was then convolved. The weight distribution of the Gaussian kernel follows a normal distribution, with the highest weight at the center and decreasing outwards. This smoothing characteristic is particularly suitable for processing random noise in fluorescence images while preserving the trend of fluorescence intensity changes and boundary information. The resulting characteristic fluorescence map clearly shows the fluorescence response characteristics of the printed material.
[0035] Multimodal image alignment was achieved using SIFT feature point detection and the RANSAC algorithm. The SIFT (Scale Invariant Feature Transform) algorithm extracted feature points and their descriptors from three processed images. For each image, the algorithm detected extreme points, determined keypoint locations and scales, assigned orientations, and calculated a 128-dimensional feature descriptor. Then, feature point matching pairs were searched across different modalities, with reliable matches selected using the nearest neighbor and second nearest neighbor ratio method. The RANSAC (Random Sample Consensus) algorithm repeatedly randomly sampled the minimum set of samples, calculated the homography matrix, evaluated the number of inliers, and selected the transformation model with the most inlier support. Accurate alignment of edge-preserving color maps, temperature analysis maps, and feature fluorescence maps was achieved, constructing multimodal image data in a unified coordinate system, laying the foundation for subsequent comprehensive feature extraction and defect detection.
[0036] Taking the detection of chocolate pattern printing on cookie surfaces as an example, three modal imaging methods were used to image the cookie surface in practical applications. Infrared imaging showed the temperature difference between the chocolate and the cookie substrate, recording the heat distribution during the curing process. Ultraviolet imaging revealed the distribution of pigments in the chocolate, with some substandard pigments exhibiting unique fluorescence characteristics. After denoising the three images individually, approximately 200 feature points were extracted using the SIFT algorithm, and about 80 reliable matching points were retained after matching and screening. The transformation matrix was calculated using the RANSAC algorithm, aligning the three modal images to a unified coordinate system. The aligned multimodal image data clearly showed that some areas exhibited both temperature and fluorescence anomalies. Comprehensive analysis revealed that the curing temperature of this batch of chocolate printing was too high, leading to localized pigment decomposition, which not only affected the visual effect but also potentially posed a safety risk. Subsequently, corresponding process adjustment suggestions were generated based on this data.
[0037] In one specific embodiment, the process of performing step S102 may specifically include the following steps:
[0038] (1) Perform feature extraction on multimodal image data to obtain visible light features, infrared thermal features and ultraviolet fluorescence features;
[0039] (2) Calculate the quality parameters of multimodal images based on signal-to-noise ratio, sharpness, and information entropy, and construct the modal reliability matrix;
[0040] (3) The spatial importance of different modal features is evaluated by the modal reliability matrix, and a weight mapping diagram is generated;
[0041] (4) The visible light features, infrared thermal features and ultraviolet fluorescence features are weighted using a weighted mapping diagram to form the initial fusion features;
[0042] (5) Applying the residual connection mechanism to the initial fused features enhances the complementarity of cross-modal information and generates enhanced features;
[0043] (6) The channel importance of the enhanced features is adjusted by the attention gating mechanism to highlight the key feature channels and obtain the comprehensive feature representation.
[0044] Specifically, feature extraction is performed on multimodal image data. For visible light images, a convolutional neural network is used to extract color, texture, and edge features to form visible light features; for infrared thermal images, thermal gradient analysis is used to extract temperature distribution and heat conduction features to form infrared thermal features; and for ultraviolet fluorescence images, fluorescence intensity analysis is used to extract fluorescence distribution and chemical activity features to form ultraviolet fluorescence features. These three features each describe different dimensions of the physicochemical properties of food printing, collectively constituting a comprehensive characterization of printing quality.
[0045] The quality parameters of multimodal images are calculated based on signal-to-noise ratio, sharpness, and information entropy, and a modal reliability matrix is constructed. The specific calculation formula is as follows:
[0046]
[0047] in, This represents the reliability value of the k-th modality at pixel coordinates (x, y). Indicates the signal-to-noise ratio. Indicates sharpness, Represents information entropy. , , These are the corresponding weighting coefficients, satisfying... + + = 1. In food printing quality inspection, the signal-to-noise ratio (SNR) is calculated as the ratio of signal intensity to background noise intensity within a local area; sharpness is calculated as the sum of squares of image gradients within a local area; and information entropy is calculated as the uncertainty of pixel grayscale value distribution within a local area. The spatial importance of different modal features is evaluated using a modal reliability matrix, generating a weighted mapping map. The weight of each modality at each pixel location is obtained through normalized modal reliability values, ensuring that the sum of the weights of the three modalities at each spatial location is 1. In food printing inspection, this step can automatically adjust the fusion weights of each modality in different regions based on image quality. For example, at the edge of a biscuit pattern, the weight of visible light features is automatically increased; in areas of temperature anomalies, the weight of infrared thermal features is automatically increased; and in areas of pigment anomalies, the weight of ultraviolet fluorescence features is automatically increased.
[0048] The three modalities are weighted using a weighted map to form an initial fused feature. The weighted map serves as the weight coefficients for feature fusion, and a weighted average is used to fuse features from different modalities into a unified feature representation. This weighted fusion method can adaptively integrate multimodal information based on image quality at different spatial locations. In cookie print detection, this step assigns higher weights to visible light features in edge regions, infrared features in temperature anomaly regions, and ultraviolet features in fluorescence anomaly regions, forming an adaptive fusion for features from different regions.
[0049] Applying residual join mechanisms to initial fusion features enhances cross-modal information complementarity, generating enhanced features. Residual joins directly add the original modal features to the initial fusion features, preventing the loss of useful information during fusion, especially for features that are significant in one modality but not in others. For example, in the detection of printed patterns on icing cookies, ultraviolet fluorescence features may capture subtle anomalous distributions of food coloring; residual joins ensure that this crucial information is not weakened during fusion. The residual join mechanism assigns a different contribution coefficient to each modal feature and then adds it to the initial fusion features, effectively enhancing the complementarity of cross-modal information.
[0050] Attention gating adjusts the channel importance of enhanced features, highlighting key feature channels to obtain a comprehensive feature representation. The attention gating mechanism calculates the importance score for each feature channel and then weights the feature channels based on these scores. The importance of a feature channel is calculated using global average pooling and nonlinear transformation, reflecting its contribution to print quality detection. This attention gating mechanism automatically identifies and strengthens the most useful feature channels for defect detection, suppressing irrelevant or redundant channels and improving the specificity of the feature representation. In food print quality inspection, such as chocolate pattern printing, certain channels characterizing edge sharpness are crucial for detecting pattern breakage defects; the attention mechanism automatically increases the weight of these channels.
[0051] Taking fruit pattern printing on biscuit surfaces as an example, multimodal image acquisition is followed by feature extraction to obtain visible light features, infrared thermal features, and ultraviolet fluorescence features. For each pixel location, the signal-to-noise ratio, sharpness, and information entropy of the three modalities are calculated. For instance, in the pattern edge region, the visible light image has high sharpness and rich information entropy; in areas with uneven ink curing, the infrared thermal image shows a prominent signal-to-noise ratio; and in areas with pigment abnormalities, the ultraviolet fluorescence image exhibits a unique information entropy distribution. Based on these quality parameters, a modal reliability matrix is constructed, and a weighted mapping map is generated through normalization, enabling the most reliable modal information to be adaptively emphasized in different regions. Subsequently, weighted fusion is used to form initial fused features, residual connections are applied to retain the unique information of each modality, and attention gating is used to highlight key feature channels, thereby accurately identifying color distortion, temperature anomalies, and potential pigment safety risks in the printing process.
[0052] In one specific embodiment, the process of executing step S103 may specifically include the following steps:
[0053] (1) The boundary of the printed area is extracted from the comprehensive feature representation by combining multi-scale gradient histogram and contour tracking to generate an accurate printed contour description map;
[0054] (2) Using color space hierarchical clustering and texture direction consistency analysis, the internal area of the precise printing outline description map is finely segmented to identify color transition zones, pattern boundaries and ink diffusion areas, and to construct a multi-level printing area feature mapping.
[0055] (3) Non-rigid registration and comparison of the multi-level printing area feature mapping with the printing standard template library related to food type, calculate the local deformation field and color difference vector, and form the spatial distribution of printing quality deviation;
[0056] (4) For areas in the spatial distribution of printing quality deviation that exceed the threshold, perform morphological feature analysis and connected region marking to identify four types of printing process defects: color distortion, edge blurring, ink delamination, and pattern misalignment, and generate a multi-level defect marking map with defect type attributes.
[0057] (5) Combining infrared thermal anomaly regions and ultraviolet fluorescence anomaly response points, the thermal stability of materials and potential chemical reaction risks are analyzed through cross-validation, and a safety risk assessment matrix for printing materials is established.
[0058] (6) Based on the safety risk assessment matrix of printing materials, quantify the degree of harm, diffusion trend and potential impact of each risk point, and generate a food printing safety risk coordinate map containing spatial coordinates, risk type and warning level.
[0059] Specifically, a method combining multi-scale gradient histograms and contour tracking is used to extract the boundaries of the printed area from the comprehensive feature representation. In this process, the multi-scale gradient histogram (MGH) effectively captures the edge features of the printed area by calculating the directional statistics of the image gradient at different scales. In practice, Sobel gradients are calculated at multiple scales for the comprehensive feature representation image. Then, a histogram is constructed for the gradient direction at each scale, assigning different weights to different scales: higher weights for smaller scales to preserve details, and lower weights for larger scales to preserve the overall structure. After obtaining the gradient-salient regions, the contour tracking algorithm is applied to these regions. An improved active contour model is used to find the printed boundary by minimizing the energy function. The energy function includes image gradient terms, contour smoothing terms, and region consistency terms. By combining these constraints, the printed boundary is accurately located, generating an accurate printed contour description map.
[0060] This study utilizes hierarchical clustering in color space and texture orientation consistency analysis to finely segment the internal region of a precise printed outline description image. Hierarchical clustering in color space involves performing hierarchical clustering in multiple color spaces (RGB, HSV, Lab), classifying pixels into different levels of categories based on color distance. In food printed images, hierarchical clustering refines the clustering results progressively from global to local. Initially, the printed area is divided into main color blocks at the global level, followed by more detailed clustering within each main color block to subdivide color transition zones. Texture orientation consistency analysis calculates texture orientation features within local regions, using an improved Gabor filter bank to extract texture features at different directions and scales. By calculating the consistency metric of texture orientation within local regions, it identifies regions of abrupt changes in texture orientation, which typically correspond to pattern boundaries or ink diffusion areas. By integrating the color clustering and texture orientation analysis results, a multi-layered feature map of the printed area is constructed, incorporating information from four levels: color layer, texture layer, boundary layer, and diffusion layer.
[0061] The multi-layered printing area feature mapping is non-rigidly registered and compared with a standard printing template library related to food types. The local deformation field and color difference vector are calculated to form the spatial distribution of printing quality deviation. The non-rigid registration uses a B-spline transformation model, describing local deformation through a control point grid. The deformation field description formula is:
[0062]
[0063] in, Indicates position The deformation vector at that location, This represents the coefficient vector of the i-th control point. This indicates the position of the i-th control point. Describes cubic B-spline basis functions. Here, N_c represents the spline scale parameter, and N_c represents the total number of control points. The control point coefficients are optimized. This minimizes the difference between the feature mapping of the printed area to be detected and the standard template. Simultaneously, the color difference vector is calculated. :
[0064]
[0065] in, , and Representing positions respectively The differences in brightness, red-green axis, and blue-yellow axis within the Lab color space are considered. Combined with the local deformation field and color difference vector, a spatial distribution matrix of printing quality deviation is formed. :
[0066]
[0067] in, and These are the weighting coefficients for deformation field intensity and color difference, respectively. The spatial distribution of printing quality deviation constructed in this way can comprehensively reflect the degree of deviation of the printing from the standard template in terms of shape and color.
[0068] For regions exceeding a threshold in the spatial distribution of printing quality deviations, morphological feature analysis and connected component labeling are performed to identify printing process defects. A deviation threshold is set, and the quality deviation distribution is binarized into potential defect regions. Then, morphological opening and closing operations are applied to remove noise and smooth boundaries, and connected component analysis is used to separate and label different defect regions. Morphological features, including area, perimeter, roundness, rectangularity, and directionality, are extracted for each labeled region. These features are combined with color difference and texture features to construct a defect feature vector. A trained classifier categorizes defect regions into four types of printing process defects: color distortion, edge blurring, ink discontinuity, and pattern misalignment, generating a multi-level defect labeling map with defect type attributes. Combining infrared thermal anomaly regions and ultraviolet fluorescence anomaly response points, cross-validation analysis is used to analyze material thermal stability issues and potential chemical reaction risks. Infrared thermal anomaly regions are detected by analyzing temperature distribution patterns in infrared thermal images, identifying areas of abnormal temperature increases or decreases. These areas may indicate abnormal heat conduction in the printing material or exothermic / endothermic chemical reactions. Anomaly response points in ultraviolet fluorescence images are identified by analyzing regions with abnormal fluorescence intensity, potentially containing specific chemical substances. Spatial registration is used to overlay information from two types of anomalies, calculating their spatial correlation. If a region exhibits both thermal and fluorescence anomalies, its risk level is significantly increased. A safety risk assessment matrix for printing materials is constructed, with elements containing information on risk type, risk intensity, and risk credibility. Based on this matrix, the hazard level, diffusion trend, and potential impact of each risk point are quantified. Hazard level is calculated by the deviation of outliers from normal values; diffusion trend is predicted through gradient characteristics and time-series analysis of region boundaries; and potential impact is assessed based on a knowledge base linking risk type and food category. A food printing safety risk coordinate map is generated, containing precise spatial coordinates of risk points, risk type classification, and warning level markings.
[0069] Taking the quality inspection of chocolate chip cookie surface printing as an example, the butterfly-shaped chocolate chip print outline is extracted from the fused feature map using multi-scale gradient histograms and contour tracking, with pixel-level accuracy. Subsequently, color space hierarchical clustering is used to divide the print interior into a dark brown main area, a light brown transition area, and a boundary diffusion area. Texture direction consistency analysis identifies the directional distribution characteristics of the butterfly wing texture. The extracted multi-layered print area feature maps are non-rigidly registered and compared with standard butterfly print templates stored in the template library. The calculated local deformation field shows a 0.8mm deformation deviation in the upper right wing area, while color difference vector analysis shows a significant color fading in the left wing area, with a color difference vector value reaching 12.5, exceeding the acceptable threshold. Through morphological feature analysis and connected region marking, the system identified color distortion in the left wing area and slight ink delamination in the upper right wing. In addition, an abnormal temperature increase of 2.3°C was found at the delamination site in the upper right wing in infrared thermography, and the same area showed abnormal fluorescence intensity in ultraviolet fluorescence imaging. Cross-validation indicated that there might be an ink stability problem at this point. The system marked it as a medium-risk level and suggested adjusting the printing pressure and temperature parameters for the upper right wing area.
[0070] In one specific embodiment, the process of executing step S104 may specifically include the following steps:
[0071] (1) Classify and statistically analyze the defect markers, calculate the number, area and severity of each type of defect, and generate a defect distribution feature vector;
[0072] (2) Perform spatial clustering analysis on the risk coordinates to identify risk concentration areas and risk diffusion trends, and form a safety risk feature vector;
[0073] (3) The color shift, edge blur, pattern breakage and misalignment parameters in the defect distribution feature vector are weighted and mapped with the printing quality evaluation system to construct a visual quality scoring curve;
[0074] (4) Based on the thermal anomaly intensity, fluorescence anomaly type and distribution range of the safety risk feature vector, and combined with the safety standard thresholds of different food categories, a graded safety risk index is generated;
[0075] (5) The printing quality score, which reflects the overall aesthetic quality of the print, is obtained by integral calculation of the visual quality scoring curve;
[0076] (6) Based on the spatial distribution characteristics and temporal evolution trend of the graded safety risk index, generate safety early warning information that includes risk level, risk description and handling suggestions.
[0077] Specifically, the defect markings are classified and statistically analyzed, and various defects in the multi-level defect marking map are systematically counted and measured. The process involves independently statistically analyzing four types of defects: color distortion, edge blurring, ink breaks, and pattern misalignment, extracting the quantity, area, and severity characteristics of each type. Quantity characteristics are obtained through connected component analysis, counting each defect label; area characteristics are calculated by pixel accumulation, counting the total number of pixels covered by each defect type; severity characteristics are calculated based on the contrast difference between the defect area and the normal area. For color distortion defects, severity is quantified by the color difference value; for edge blurring defects, it is quantified by the attenuation of the edge gradient intensity; for ink breaks, it is quantified by the width and continuity of the broken area; and for pattern misalignment defects, it is quantified by the misalignment distance and angular deviation. These features are organized into a unified defect distribution feature vector, including the quantity ratio, area ratio, and average severity of each defect type, forming a comprehensive multi-dimensional indicator set reflecting printing quality. Spatial clustering analysis is performed on the food printing safety risk coordinate map, using the density-based spatial clustering algorithm DBSCAN to identify the distribution patterns of risk points. The DBSCAN algorithm, by setting two parameters—neighborhood radius and minimum number of points—classifies risk points into three categories: core points, boundary points, and noise points, effectively identifying risk clusters of arbitrary shapes. For each identified risk cluster, its spatial features are extracted, including center coordinates, coverage area, density distribution, and shape characteristics. Simultaneously, by analyzing the density gradient of risk points, the direction and trend of risk diffusion are identified, constructing a risk diffusion vector field. A comprehensive analysis of risk clusters and diffusion trends extracts risk type distribution characteristics, risk intensity distribution characteristics, and risk evolution trend characteristics, forming a safety risk feature vector, providing a data foundation for subsequent safety risk assessments.
[0078] In constructing a visual quality scoring curve by weighted mapping of quality indicators from the defect distribution feature vector to the printing quality evaluation system, the evaluation dimensions of printing quality are determined, including four dimensions: color accuracy, edge sharpness, pattern integrity, and positional accuracy. For each dimension, corresponding evaluation indicators and weight coefficients are set: color accuracy is associated with color shift defect features, edge sharpness with edge blurring defect features, pattern integrity with pattern breakage defect features, and positional accuracy with pattern misalignment defect features. The defect features are converted into quality scores using a weighted mapping function, constructing a quality scoring function for the four dimensions. For each dimension, a quality scoring curve is generated based on the severity and distribution range of the defect features. The curve shape reflects the non-linear impact of defects on quality; minor defects have a small impact on quality, while severe defects lead to a sharp drop in quality score. Combining the quality scoring curves of the four dimensions yields a comprehensive evaluation curve that fully reflects the visual quality of the printing.
[0079] The process of generating a graded safety risk index based on safety risk feature vectors involves comparing and analyzing information such as the intensity of thermal anomalies, the type of fluorescence anomalies, and the distribution range of the safety risk feature vectors with food safety standards. The intensity of thermal anomalies is calculated using temperature deviations in abnormal areas of infrared thermal images; the type of fluorescence anomalies is determined by classification of fluorescence feature spectra in ultraviolet fluorescence images; and the distribution range is quantified by the spatial coverage characteristics of the abnormal areas. For different food categories, the system pre-sets corresponding safety standard threshold matrices, including warning thresholds for various risk indicators. The risk features are compared with the safety standard thresholds to calculate a risk degree coefficient, which classifies the risk into four levels: safe (Level 0), slightly risky (Level 1), moderately risky (Level 2), and severely risky (Level 3). For complex risks, a risk superposition model is used to calculate the comprehensive risk level. This results in a graded safety risk index, which quantifies the safety risk level of food stamping in numerical form.
[0080] The process of calculating the print quality score by integrating the visual quality scoring curve integrates multi-dimensional quality evaluation information into a single numerical index. Specifically, the visual quality scoring curve is integrated over the entire print area, with the calculation formula considering the ratio of the area under the curve to the total print area. During integration, the print area is divided into grids, and each grid cell is assigned a weight based on the height of the local quality curve. Important visual areas or the main print area are given higher weights, while edge or secondary areas are given lower weights. The print quality score obtained through weighted integration ranges from 0 to 100 points, where 100 points represents perfect print with no defects; above 70 points represents good print with minor defects; 40 to 70 points represents acceptable print with obvious but acceptable defects; and below 40 points represents unacceptable print with serious defects. The quality score serves as a quantitative representation of the overall aesthetic quality of the print. The process of generating safety warning information based on the graded safety risk index analyzes the spatial distribution characteristics of the risk index, identifying risk concentration areas and risk type distribution patterns. Through time-series data analysis, the evolution trend of the risk index is tracked to predict the development direction of potential risks. Based on risk level, risk type, and risk trend, the system queries a pre-defined risk-response strategy database to obtain targeted handling suggestions. Safety warning information comprises four parts: risk level classification, detailed risk description, risk impact assessment, and handling suggestions. Risk level classification is directly derived from the graded safety risk index; the risk description includes the risk type, distribution location, and characteristic manifestations; the risk impact assessment analyzes the potential impact of the risk on food safety; and the handling suggestions provide specific risk mitigation measures. For different risk levels, the system generates warning information of varying urgency: Level 3 risk triggers a red warning, requiring immediate production stoppage and handling; Level 2 risk triggers a yellow warning, recommending prompt adjustment of process parameters; and Level 1 risk triggers a blue warning, prompting attention to monitoring relevant parameters. Warning information is presented in a standard format for easy understanding and appropriate action by operators.
[0081] Taking the strawberry pattern printing on a cookie surface as an example, the system detected three color-faded defects in the left area, accounting for 8% of the total printed area, with an average color difference of 10.5; one edge-blurred defect in the central area, accounting for 3% of the area, with an edge gradient decrease of 65%; and two ink delamination defects in the lower right corner, accounting for 5% of the area, with an average delamination width of 0.7 mm. No pattern misalignment defects were detected. Simultaneously, the system detected an abnormal temperature increase of 1.8°C in the ink delamination area in the lower right corner, and ultraviolet fluorescence images showed a moderate-intensity abnormal fluorescence reaction in the same area. Spatial clustering analysis identified these two risk points as the same risk cluster area, with a diffusion trend pointing to the right. Mapping the defect distribution feature vector to the quality evaluation system, the color accuracy score was 85, the edge clarity score was 92, the pattern integrity score was 78, and the positional accuracy score was 100. Through weighted integral calculation, the printing quality score was 87, belonging to the good printing level. Risk analysis indicates that the combination of thermal and fluorescence anomalies in the lower right corner suggests a potential issue of incomplete ink curing, with a risk level of 2 (medium risk). The system generates a yellow warning, recommending increasing the curing temperature or extending the curing time, and closely monitoring subsequent products to ensure the printing material is fully cured to prevent potential chemical migration risks.
[0082] In one specific embodiment, the process of executing step S105 may specifically include the following steps:
[0083] (1) Compare and analyze the quality score with the preset printing quality threshold to determine the direction of quality improvement and generate quality adjustment demand indicators;
[0084] (2) Analyze the risk types and distribution characteristics in the safety early warning information, identify the physical and chemical causes of potential safety hazards, and formulate safety handling strategies;
[0085] (3) Based on the color offset data and pattern edge blur in the quality adjustment requirements index, derive the printing pigment ratio adjustment amount and printing pressure correction value, and construct the material formula correction matrix;
[0086] (4) Based on the safety handling strategy, the printing temperature, dwell time and curing parameters are mapped and transformed to determine the process flow adjustment scheme and generate the process parameter correction matrix;
[0087] (5) Integrate and optimize the material formulation correction matrix and the process parameter correction matrix to eliminate conflicts between parameters and establish a collaborative control scheme;
[0088] (6) Generate process control instructions that include adjustment timing, adjustment sequence and adjustment range through collaborative control scheme.
[0089] Specifically, a printing quality threshold system is established, including four levels: Excellent (90-100 points), Good (80-90 points), Acceptable (60-80 points), and Unacceptable (below 60 points). Each level is further subdivided into threshold standards for multiple quality dimensions, such as color accuracy, edge sharpness, pattern integrity, and positional accuracy. During comparative analysis, the actual printing quality score is compared level by level with these thresholds to determine the current printing quality level. Further analysis of the gap between the score of each dimension and its corresponding threshold identifies the quality dimensions most in need of improvement. By calculating the standard deviation, the improvement priority of each dimension is quantified, assigning higher priority to dimensions with larger deviations from the threshold and lower priority to dimensions with smaller deviations. Based on the priority and degree of deviation, a quality adjustment requirement index is generated, which includes the specific quality parameters to be adjusted, the direction of adjustment, and the expected adjustment range. Analyzing the risk types and distribution characteristics in safety warning information is the foundation for forming a safety handling strategy. Safety warning information typically categorizes risks into three main types: physical risks (e.g., material detachment), chemical risks (e.g., migration of hazardous substances), and microbiological risks (e.g., mold growth), each further subdivided into various specific risk types. The analysis process identifies and classifies the risk types within the warning information, then analyzes their spatial distribution and temporal evolution characteristics. By querying the printing material safety knowledge base, risk types are linked to possible physicochemical causes. For example, the simultaneous appearance of infrared thermal anomalies and ultraviolet fluorescence anomalies in edge areas is associated with the risk of hazardous substance migration due to insufficient curing of the printing material; thermal anomalies in areas of color mutation are associated with pigment chemical stability issues. Based on these physicochemical causes, targeted safety treatment strategies are developed, including material adjustment strategies and process adjustment strategies. Material adjustment strategies focus on adjusting the chemical composition of the printing material, while process adjustment strategies focus on altering the physical conditions during the printing process. The two work synergistically to eliminate potential safety hazards.
[0090] Based on the color shift data and pattern edge blurring in the quality adjustment requirements, deriving the printing pigment ratio adjustment amount and printing pressure correction value, and constructing the material formulation correction matrix, is a complex data processing process. A model is established to describe the mapping relationship between the color shift vector and the pigment ratio adjustment amount in the Lab color space.
[0091]
[0092] in, This represents a vector indicating the amount of pigment ratio adjustment, including the percentage adjustment for each pigment component; This represents the color offset vector, measured in the Lab color space; This represents a linear mapping matrix that reflects the linear effect of changes in color components on pigment requirements. Represents the quadratic coefficient matrix to capture nonlinear color adjustment effects; This represents the basic adjustment vector, taking into account the inherent biases of the equipment characteristics. Simultaneously, a model is established to model the relationship between pattern edge ambiguity and printing pressure:
[0093]
[0094] in, This represents a vector of printing pressure correction values, which includes the pressure adjustment amount for different areas. The pattern edge ambiguity vector is represented and measured through gradient analysis. Represents the linear influence coefficient matrix; This represents the quadratic influence coefficient matrix; This represents the base pressure adjustment vector. Based on the adjustment amounts calculated from these two models, a material formulation correction matrix is constructed. This matrix describes the adjustments needed to the material formulation and pressure parameters to improve printing quality.
[0095] Based on safety handling strategies, a mapping transformation is performed between printing temperature, dwell time, and curing parameters. When determining process adjustment schemes, a correlation model between risk types and process parameters needs to be established. For each type of safety risk, the key process parameters affecting that risk are analyzed. For example, the risk of insufficient curing is mainly related to curing temperature and time, while the risk of pigment stability is closely related to printing temperature and dwell time. By querying the process parameter optimization knowledge base, the optimal range and adjustment principles for each parameter are obtained. Based on the severity and type of risk, the adjustment amount for each process parameter is calculated, while considering the inter-parameter constraints. For example, increasing the curing temperature requires a corresponding reduction in curing time to prevent over-baking. The calculated parameter adjustment amounts are integrated into a process parameter correction matrix. The matrix elements contain the adjustment amount for each process parameter and the mutual influence coefficients between parameters, providing comprehensive data support for subsequent process adjustments.
[0096] Integrating and optimizing the material formulation correction matrix and the process parameter correction matrix to eliminate conflicts between parameters and establish a synergistic control scheme is a key step in solving the problem of multi-parameter adjustment coordination. The integration process expands the two matrices into a unified parameter adjustment matrix of the same dimension, containing all parameters that need adjustment. Then, conflicts between parameters are detected. Conflicts typically manifest as a negative impact of adjusting one parameter on the adjustment of another; for example, increasing pigment concentration may lead to a need to extend curing time. For detected conflicts, a multi-objective optimization algorithm is used to find a balance point. The algorithm weights different objectives (quality improvement and risk elimination) based on predefined weight coefficients to generate a comprehensively optimal parameter adjustment scheme. During the optimization process, there is an inverse relationship between the quality improvement objective and the risk elimination objective, requiring the determination of a reasonable weight allocation based on specific circumstances. Through iterative optimization, a synergistic control scheme that can both improve printing quality and eliminate safety risks is formed.
[0097] Generating process control instructions through collaborative control schemes is the process of transforming theoretical optimization results into practical operational guidance. Process control instructions contain three core elements: adjustment timing, adjustment sequence, and adjustment magnitude. Adjustment timing is categorized into three types: immediate adjustment, inter-batch adjustment, and planned adjustment, determined based on the urgency of risk and production plan. The adjustment sequence is based on the dependencies between parameters and their degree of impact on the effect; generally, basic parameters are adjusted before derived parameters, and material formulations are adjusted before process conditions. The adjustment magnitude is determined based on parameter sensitivity and equipment adjustment precision; sensitive parameters are adjusted gradually in small increments, while non-sensitive parameters can be adjusted in one step. Process control instructions are presented in a structured format, containing information on five aspects: the operation object, operation content, operation time, operation method, and expected result, facilitating operator understanding and execution. Furthermore, process control instructions also include methods for verifying the effects of adjustments, enabling timely evaluation of the adjustment effects and necessary corrections.
[0098] In one specific embodiment, the process of executing step S106 may specifically include the following steps:
[0099] (1) The process control instructions are compared with the historical control records to extract effective parameter adjustment experience and construct a parameter-quality mapping knowledge base;
[0100] (2) Analyze the relationship between quality fluctuation patterns and process changes in historical testing data, identify key influencing factors and potential risk points, and form a risk warning feature set;
[0101] (3) Based on the material compatibility data in the parameter-quality mapping knowledge base, establish the compatibility matrix between different food substrates and printing materials, and generate a food type-oriented printing formula guide;
[0102] (4) Based on the risk warning feature set, classify the food printing safety risk level and monitoring frequency, and formulate a graded monitoring plan;
[0103] (5) Through cross-analysis of the printing formula guidelines and the graded monitoring scheme, establish a quality traceability chain for the entire process of food printing and construct a table of key control points for printing quality;
[0104] (6) Transform the key control point table of printing quality into printing quality prevention and control rules that include preset early warning thresholds, regular inspection frequency and emergency handling procedures.
[0105] Specifically, historical process control instruction data is extracted from the production management system, including adjustment time, adjustment parameters, adjustment range, and adjustment reasons. Simultaneously, printing quality inspection results for the corresponding time periods are obtained. Outliers and incomplete records are removed through data cleaning, establishing data pairs between parameter adjustments and quality changes. Time series analysis is used to calculate the changes in quality indicators before and after each parameter adjustment, evaluating the effectiveness of the adjustments. For effective parameter adjustment experiences, the correlation between adjustment direction, adjustment range, and quality improvement is extracted to form parameter adjustment rules. These rules are then clustered and categorized to construct a parameter-quality mapping knowledge base. This knowledge base records the influence patterns and degrees of different process parameters on printing quality, providing data support and experience reference for future parameter adjustments.
[0106] Analyzing the relationship between quality fluctuation patterns and process changes in historical inspection data is crucial for identifying key influencing factors and potential risk points. This process involves time-series analysis of historical quality inspection data to identify periodic fluctuations, abrupt changes, and trend changes in quality indicators. These quality fluctuation points are then time-aligned with concurrent process parameter changes to identify correlations between process changes and quality fluctuations. Association rule mining algorithms are employed to discover potential association rules between process parameter combinations and quality problems from a large amount of historical data. Simultaneously, anomaly detection algorithms are applied to identify anomalous process parameter combinations in historical data, which are typically associated with serious quality issues. Through systematic analysis of the discovered association rules and anomaly patterns, the most significant key factors affecting printing quality and the most likely potential risk points to cause problems are identified. This information is integrated into a risk warning feature set to provide a basis for subsequent risk prevention.
[0107] Establishing a compatibility matrix between different food substrates and printing materials, based on material compatibility data in the parameter-quality mapping knowledge base, is crucial for generating food-type-oriented printing formulation guidelines. This process categorizes food substrates based on attributes such as composition, structure, surface properties, and processing technology, classifying foods into multiple categories, such as pastries, biscuits, and candies. Simultaneously, printing materials are systematically classified, including different types of pigments, adhesives, solvents, and additives. Based on historical data from the parameter-quality mapping knowledge base, the compatibility performance of each food substrate with various printing materials is analyzed, with evaluation indicators including adhesion strength, color reproduction, stability, and safety. Through data analysis, a compatibility score is assigned to each pair of food substrate-printing material combinations, constructing a complete compatibility matrix. Based on this matrix, optimal printing material formulation combinations are developed for different types of food, including main pigment types, pigment concentration ranges, adhesive selection, and additive dosages, forming food-type-oriented printing formulation guidelines.
[0108] The process of classifying food printing safety risk levels and monitoring frequencies based on risk warning feature sets involves multi-level risk assessment and hierarchical management. Risk characteristics in the risk warning feature set are systematically classified into three categories based on their nature: process risk, material risk, and environmental risk. For each category of risk characteristics, its severity and frequency of occurrence are assessed. Using a risk matrix method, the combination of severity and frequency of occurrence is mapped to four risk levels: low risk (Level 1), medium risk (Level 2), high risk (Level 3), and severe risk (Level 4). Corresponding monitoring frequency standards are set for different risk levels: Level 1 risks use routine monitoring, such as sampling per batch; Level 2 risks use intensive monitoring, such as sampling every hour; Level 3 risks use intensive monitoring, such as sampling every 15 minutes; and Level 4 risks use real-time monitoring, continuously monitoring key parameters. The monitoring plan is further refined based on the characteristics of the food type and production scale, including the selection of sampling points, sampling quantity, and testing items, forming a complete hierarchical monitoring plan.
[0109] Establishing a full-process quality traceability chain for food printing, through cross-analysis of printing formulation guidelines and tiered monitoring schemes, requires streamlining the complete printing production process, including raw material preparation, printing material formulation, printing operation, curing treatment, and quality inspection. For each stage, key quality parameters and control standards are determined based on the printing formulation guidelines, while the risk monitoring focus and intensity are determined based on the tiered monitoring scheme. Integrating this information, a mapping relationship of "parameter-quality impact-risk association-monitoring requirements" is established for each key parameter in each stage, forming a quality traceability chain spanning the entire process. By analyzing the connections between each stage in the quality traceability chain, the key nodes with the most significant quality control effects are identified. These nodes are typically those where parameter changes have the greatest impact on quality or where risks occur most frequently. These key nodes are compiled into a critical control point table for printing quality, clearly defining the location, control parameters, control standards, and monitoring methods for each control point.
[0110] The process of transforming the Critical Control Points (CCP) table for printing quality into preventive control rules requires setting corresponding early warning thresholds, monitoring frequencies, and emergency response procedures for each CCP. Early warning thresholds are set as a multi-level system based on historical data analysis and quality standard requirements, including three levels: Attention, Warning, and Emergency, each corresponding to different degrees of parameter deviation. Monitoring frequencies are determined based on risk level and parameter importance, with more frequent monitoring for important parameters and high-risk points. Emergency response procedures are standardized steps pre-defined according to different early warning levels and problem types, including immediate action measures, adjustment plans, and verification methods. This information is integrated into a structured preventive control rule document, containing four parts: control point description, early warning conditions, monitoring arrangements, and handling plans, forming a complete preventive control system for printing quality.
[0111] Taking the production of fruit pattern printing on cake surfaces as an example, analysis of historical records revealed that when the curing temperature was adjusted from 160°C to 170°C, color stability improved by 15%. However, when the temperature exceeded 180°C, excessive color fading occurred. This experience was extracted as a temperature-color stability mapping rule and stored in the parameter-quality knowledge base. Analysis of historical quality fluctuation data revealed that when the ambient humidity exceeded 65% and the viscosity of the printing material was below the standard value, the clarity of the printing edges decreased significantly. This combination was identified as a potential risk point and included in the risk warning feature set. Based on material compatibility data, it was found that natural fruit juice-based pigments are most suitable for the surface of cream cakes, while oil-soluble pigments are more suitable for chocolate cakes. Based on this, a food-pigment compatibility matrix was constructed. Based on the risk warning feature set, abnormal pigment viscosity was classified as a level 2 risk, requiring testing every 30 minutes. Through cross-analysis, the pigment concentration and viscosity in the printing material preparation process were identified as key control points, and corresponding prevention and control rules were formulated: when the pigment concentration deviates from the standard value by 5%, a warning level alert is triggered, and each batch must be inspected; when it deviates by 10%, a warning level alert is triggered, and the formula is adjusted immediately; when it deviates by 15%, an emergency level alert is triggered, production is stopped, and equipment and raw materials are thoroughly inspected.
[0112] In one specific embodiment, the process of classifying the safety risk level and monitoring frequency of food stampings based on a risk warning feature set may specifically include the following steps:
[0113] (1) Group the risk indicators in the risk warning feature set by cluster analysis, identify the common features of different risk patterns, and construct a risk feature spectrum;
[0114] (2) Based on the intensity and frequency of occurrence of the features in the risk feature spectrum, risk factors are scored to generate a risk influence matrix;
[0115] (3) Compare and analyze the risk impact matrix with the national food safety standards, establish a four-level risk level classification standard, and form a stamp safety risk level table;
[0116] (4) Based on the safety risk level table of stamping, and combined with the shelf life characteristics of different food types, set the corresponding monitoring time interval and sampling ratio, and generate a monitoring frequency guidance table;
[0117] (5) Based on the relationship between the monitoring frequency guideline and the production batch size, design a stratified sampling strategy and a testing intensity plan, and construct a risk monitoring flowchart;
[0118] (6) Integrate the stamping safety risk level table, monitoring frequency guide table and risk monitoring flowchart to form a graded monitoring scheme for different risk types.
[0119] Specifically, a hierarchical clustering algorithm is used to classify risk indicators, calculate the similarity matrix between each indicator, and assess similarity based on the indicator's performance characteristics and impact mechanisms. Then, bottom-up hierarchical clustering is performed, gradually merging indicators with high similarity to form a hierarchical structure of risk indicators. By appropriately setting truncation thresholds, risk indicators are divided into three major groups: physical risks, chemical risks, and process risks. Within each group, common features are further identified, and typical manifestations of risk patterns are extracted, such as fault patterns and misalignment patterns in physical risks, pigment migration patterns and oxidation patterns in chemical risks, and temperature anomaly patterns and time shift patterns in process risks. These common features are systematically organized into a hierarchical risk feature spectrum, clearly demonstrating the correlation and characteristic differences between different risk types.
[0120] For each risk factor, its characteristic strength score is calculated. Characteristic strength is assessed based on multi-dimensional indicators such as the severity, scope of impact, and duration of the risk. Simultaneously, the frequency of occurrence of risk factors is evaluated, statistically analyzing the probability of risk events based on historical data. Characteristic strength and frequency are used as two-dimensional coordinates to construct a risk scoring space, with each risk factor corresponding to a coordinate point in this space. By setting threshold lines, the risk space is divided into multiple regions, forming a risk influence matrix. Regions with high characteristic strength and high frequency in the matrix represent the most severe risks, requiring priority control; regions with low characteristic strength and low frequency represent acceptable risks, which can be routinely monitored. This matrix visually displays the relative influence of each risk factor, providing a basis for risk level classification.
[0121] Relevant national food safety standards and regulations were collected, including standards for the use of food additives, standards for food contact materials, and specifications for food printing processes. Then, the risk factors in the risk impact matrix were compared with these standards to assess the extent to which the risk factors exceeded the standard limits and the potential consequences. Based on the comparison results, a four-level risk classification standard was established: Level 1 risk (low risk) refers to risks that meet the standard and have low impact; Level 2 risk (medium risk) refers to risks that are close to the upper limit of the standard or have moderate impact; Level 3 risk (high risk) refers to risks that slightly exceed the standard or have significant impact; and Level 4 risk (severe risk) refers to risks that significantly exceed the standard or have extremely high impact. These risk levels and corresponding judgment criteria were compiled into a printing safety risk level table, providing a clear grading basis for risk management.
[0122] The process of generating a monitoring frequency guideline involves setting monitoring intervals and sampling ratios based on a safety risk level table for printed food products. This process analyzes the shelf-life characteristics of different food types, categorizing foods into three types: short shelf-life (e.g., fresh milk cakes), medium shelf-life (e.g., boxed biscuits), and long shelf-life (e.g., hard candies). For different risk levels and combinations of food shelf-life, corresponding monitoring intervals are set: shorter intervals for short-shelf-life foods and even shorter intervals for high-risk products. Simultaneously, sampling ratios for different combinations are determined, with higher sampling ratios for high-risk and short-shelf-life products. These monitoring parameters are then compiled into a standardized monitoring frequency guideline, clearly listing the specific monitoring intervals and sampling ratios for each risk level and food type combination, providing intuitive guidance for production monitoring.
[0123] Designing a sampling strategy based on the relationship between monitoring frequency guidelines and production batch size is the foundation for constructing a risk monitoring flowchart. For production batches of different sizes, a stratified sampling method is employed to ensure representativeness and statistical significance. Small-batch production (such as customized products) uses a high sampling rate but simplified testing items; large-batch production (such as standard products) uses tiered sampling, initially inspecting a small number of samples, increasing the sampling quantity if anomalies are found. Simultaneously, the testing intensity is determined based on the risk level: low-risk areas use rapid screening methods, while high-risk areas apply comprehensive and in-depth testing techniques. These sampling and testing strategies are integrated into a flowchart, clearly illustrating the complete process from sample selection and testing operations to result interpretation, facilitating operator adherence.
[0124] Integrating the printing safety risk level table, monitoring frequency guideline, and risk monitoring flowchart are steps in developing a tiered monitoring plan. This process clarifies the key monitoring targets, methods, frequencies, and anomaly handling procedures for different risk types. For example, for pigment migration risk, the focus is on monitoring the printing area and food contact surfaces, using ultraviolet fluorescence detection, monitoring at frequencies determined by the risk level, and implementing the corresponding handling procedures when anomalies are detected. The tiered monitoring plan adopts a matrix structure, with different risk types horizontally and monitoring elements vertically, forming a comprehensive and systematic monitoring system covering all types of risks to ensure the safety and quality stability of food printing.
[0125] Taking the holiday-themed printed patterns on chocolate surfaces as an example, cluster analysis grouped pigment stability risk, temperature control risk, and material compatibility risk into a highly correlated group, which collectively affect the color performance and safety of the print. Risk factor scoring showed that pigment stability was of moderate intensity and occurred frequently, placing it in the medium-to-high risk area of the risk influence matrix. According to national food additive usage standards, this risk falls under level 2 (medium risk). Considering the medium shelf life of chocolate, a 7-day monitoring interval and a 5% sampling rate were set for this risk. Given the medium-sized production batches (5000 pieces per batch), a three-stage sampling strategy was adopted: initial inspection of 10 pieces, increasing to 50 pieces if abnormalities are found, and full batch inspection upon discovery of a clear problem. The resulting monitoring plan clearly stipulates: a special test for pigment stability will be conducted every Tuesday, using both standard color chart comparison and ultraviolet analysis. Upon discovery of abnormalities, traceability investigations and batch isolation measures will be immediately initiated to ensure product safety.
[0126] In one specific embodiment, the process of performing a cross-analysis step using the printing formulation guideline and the grading monitoring scheme may specifically include the following steps:
[0127] (1) Extract food types and raw material pretreatment processes from the printing formula guidelines, extract risk detection points and detection cycles from the graded monitoring scheme, and generate a process-risk mapping diagram;
[0128] (2) For the key process nodes in the process-risk mapping diagram, establish a process quality transfer model, identify the transfer rules of quality characteristics in the production chain, and form a printing quality transfer chain;
[0129] (3) Set up quality data collection points at each link of the printing quality transfer chain, collect process data including material parameters, environmental parameters and equipment parameters, and establish a multi-dimensional quality monitoring database;
[0130] (4) Based on the degree of influence of each parameter in the multidimensional quality monitoring database on the printing quality, mark the key influencing parameters and quality sensitive points, and construct a parameter-defect correlation network;
[0131] (5) Based on the parameter-defect correlation network, from raw material entry, printing preparation, printing operation, post-processing curing to quality inspection, key control links are identified and a full-process traceability path for printing quality is drawn.
[0132] (6) Integrate the traceability path and quality sensitive points of the entire printing quality process, extract the core control items and control limits, and construct a table of key control points for printing quality.
[0133] Specifically, the food classification information in the printing formulation guidelines was analyzed, including types such as hard biscuits, soft pastries, and chocolate products, and the raw material pretreatment requirements for each type of food were extracted, such as surface degreasing and pre-coating of the base layer. Simultaneously, the locations and cycles of detection points corresponding to each risk level were extracted from the graded monitoring scheme. A two-dimensional matrix was constructed, with the horizontal axis representing production process nodes and the vertical axis representing risk types. The location and frequency of each risk detection point were marked in the matrix, forming an intuitive process-risk mapping diagram. This mapping diagram clearly shows the risk distribution characteristics and detection priorities in different production stages, providing a systematic risk view for subsequent quality control. Establishing a process quality transfer model for key process nodes in the process-risk mapping diagram is a crucial step in forming the printing quality transfer chain. This process identifies key process nodes in the production process, typically including raw material acceptance, material preparation, printing operation, and curing treatment. For each node, its input and output quality characteristics were analyzed to determine the conversion relationship of quality characteristics within the node. For example, pigment purity (input characteristic) is converted to color accuracy (output characteristic) through the preparation process, and printing pressure (input characteristic) is converted to edge sharpness (output characteristic) through the printing operation. Then, the quality transfer relationship between adjacent nodes is analyzed, including how the output characteristics of the previous node become the input characteristics of the next node, and the quality changes that may occur during the transfer process. By connecting the transfer relationships of each node, a complete printing quality transfer chain is formed, which describes the complete transfer path and conversion mechanism of quality characteristics from raw materials to finished products.
[0134] Based on the quality transfer chain structure, data collection points are set up at key nodes to collect three types of core parameters: material parameters (such as pigment concentration, viscosity, and pH value), environmental parameters (such as temperature, humidity, and airflow velocity), and equipment parameters (such as printing pressure, curing temperature, and conveyor speed). For each collection point, the collection frequency and method are set. Important parameters are collected in real time using automated sensors, while secondary parameters are recorded manually periodically. After standardization, the collected data is imported into a structured database to establish multi-dimensional data records including timestamps, parameter types, parameter values, and related processes. This database comprehensively records quality-related data throughout the printing production process through the correlations and temporal characteristics between parameters, providing data support for quality analysis and control.
[0135] Identifying key influencing parameters and quality-sensitive points based on the impact of various parameters in the multidimensional quality monitoring database on printing quality is a crucial step in constructing a parameter-defect correlation network. This process employs data mining and statistical analysis methods to analyze the correlation between each parameter and printing quality indicators. Through correlation analysis, regression analysis, and principal component analysis, the influence of each parameter on different quality indicators is quantified. Parameters with significant influence are marked as key influencing parameters, and points where parameter changes have a particularly high impact on quality are marked as quality-sensitive points. Based on these analytical results, a parameter-defect correlation network is constructed. Network nodes include various process parameters and common defect types, and the connections between nodes represent the association between parameters and defects, with connection strength reflecting the degree of influence. This network visually demonstrates how parameter changes lead to different types of defects, providing a theoretical basis for defect prevention and quality control.
[0136] By analyzing the node connectivity characteristics in the interconnected network, parameter nodes that significantly impact various defects are identified. These nodes typically correspond to critical control points in the production process. A systematic evaluation of each major stage in the production process (raw material intake, printing preparation, printing operation, post-processing curing, and quality inspection) is conducted, and critical control points are determined based on parameter influence and stage importance. The logical relationships and quality transfer paths between these critical stages are then analyzed to form a complete quality traceability chain. This traceability path clearly demonstrates how quality issues can be traced back to the responsible stage and original parameters, providing a systematic pathmap for rapid location and source tracing of quality problems. The locations of quality-sensitive points are marked in the traceability path; these points are typically nodes with high quality fluctuation risk or where parameter changes significantly impact quality. For each critical control point, control items are extracted, including the specific parameters and quality characteristics that need to be controlled. Control limits for each control item are then determined, including target values, upper limits, and lower limits, based on historical data analysis and quality requirements. This information is compiled into a standardized critical control point table, listing the control point location, control items, control limits, monitoring methods, and anomaly handling measures. This control point table serves as the core document for printing quality control, guiding quality monitoring and control activities throughout the production process to ensure the quality stability of printed products. Taking holiday pattern printing on biscuits as an example, the pretreatment process requiring light degreasing of the biscuit surface was extracted from the printing formulation guide, and the risk detection requirements for each batch of pigment mixing were extracted from the grading monitoring scheme. Integrating this information into a process-risk mapping diagram clearly shows that pigment mixing is a high-risk point. Analysis using a process quality transfer model revealed that pigment purity affects color saturation through the mixing process, and printing pressure affects edge sharpness through the printing operation, forming a quality transfer chain. Data collection points were set at key stages to collect parameters such as pigment concentration, ambient humidity, and printing temperature. Data analysis showed that the correlation coefficient between printing temperature and color stability reached 0.85, marking it as a key influencing parameter. The traceability path showed that color fading issues could be directly traced back to curing temperature control and pigment selection. The critical control point table clearly stipulates that the pigment concentration in the pigment mixing process should be controlled at 5±0.2%, and the printing operation pressure should be controlled at 65±5 N / m². The curing temperature is controlled at 170±5°C, providing a precise quality control guide for production.
[0137] In one specific embodiment, the process of determining the key control steps from each stage of raw material intake, printing preparation, printing operation, post-processing curing to quality inspection by executing a parameter-defect correlation network can specifically include the following steps:
[0138] (1) Perform raw material-side analysis on the parameter-defect correlation network, extract key control variables from three dimensions: printing material source, composition specifications and pretreatment method, and generate raw material quality traceability point set;
[0139] (2) For the parameter-defect correlation network nodes in the printing preparation process, extract the relationship diagram between ink mixing ratio, viscosity control and preheating temperature, and construct a table of key parameters for printing preparation process;
[0140] (3) Extract the correspondence between the four core process parameters of printing pressure, speed, angle and temperature and defects from the printing operation link of the parameter-defect correlation network to form the printing operation control parameter matrix;
[0141] (4) Based on the post-processing curing data in the parameter-defect correlation network, analyze the influence of curing temperature, time and humidity on printing fastness, and establish a set of post-processing quality control points;
[0142] (5) Based on the quality inspection data in the parameter-defect correlation network, determine the best testing time and location, extract key technical indicators for quality inspection, and form a set of quality verification points;
[0143] (6) By integrating and connecting the raw material quality traceability point set, the key parameter table of printing preparation process, the printing operation control parameter matrix, the post-processing quality control point set and the quality verification point set, the full-process traceability path of printing quality is drawn.
[0144] Specifically, this study conducts an in-depth analysis from three dimensions: the source of printing materials, their composition and specifications, and pretreatment methods, identifying raw material parameters that significantly impact printing quality. In terms of material source, the study analyzes the influence of factors such as supplier qualifications, batch stability, and storage conditions on printing quality. Regarding composition and specifications, it analyzes the impact of pigment purity, binder composition, and additive content on printing performance. In terms of pretreatment methods, it analyzes the impact of processes such as degreasing, priming, and preheating on material adhesion. Through data mining techniques, the study extracts the correlation patterns between these factors and printing defects from historical production records, identifying the most critical control variables, such as pigment purity not less than 98%, binder viscosity within the range of 800-1000 mPa·s, and pretreatment temperature controlled at 40±2°C. These key control variables and their control limits are compiled into a raw material quality traceability point set, providing clear standards and traceability basis for raw material quality control.
[0145] Key parameters were extracted from the parameter-defect correlation network nodes in the printing preparation stage, based on three core parameters: ink mixing ratio, viscosity control, and preheating temperature. By analyzing historical production data, correlation patterns between these three parameters and common defects (such as uneven color and blurred edges) were extracted, and a parameter-defect relationship diagram was created to visually demonstrate how parameter changes affect defect occurrence. For example, when the ink mixing ratio deviates from the standard value by more than 5%, color deviation increases significantly; when the viscosity is 15% lower than the standard value, the risk of edge diffusion increases dramatically; and excessively low preheating temperature leads to insufficient ink flow, affecting printing uniformity. Based on these correlation patterns, the optimal operating range and control precision requirements for each parameter were determined, forming a key parameter table for the printing preparation process. This table includes parameter names, standard values, allowable deviations, influencing indicators, and adjustment suggestions, providing precise process guidance for the printing preparation process.
[0146] Extracting the correspondence between core process parameters and defects from the parameter-defect correlation network of the printing operation is a crucial step in forming the printing operation control parameter matrix. This step focuses on four core process parameters: printing pressure, speed, angle, and temperature. Through data analysis, the degree and pattern of each parameter's influence on different types of defects are clarified. For example, excessive printing pressure leads to pattern deformation, while insufficient pressure leads to incomplete transfer; excessive printing speed leads to loss of detail, while excessive speed reduces production efficiency; skewed printing angle leads to pattern misalignment; excessively high printing temperature leads to color changes, while excessively low temperature leads to poor adhesion. These correspondences between parameters and various defects are organized into a matrix, where rows represent process parameters, columns represent defect types, and matrix elements represent the degree of influence (strong, medium, weak). This matrix representation clearly shows the correspondence between parameter adjustments and defect control, providing intuitive guidance for parameter setting and adjustment in the printing process. Furthermore, the influence of three key parameters—curing temperature, time, and ambient humidity—on printing fastness is analyzed. Through experimental design or analysis of historical data, the impact of these three parameters under different combinations of values on printing fastness (typically evaluated through abrasion resistance, water resistance, and adhesion tests) is studied. Analysis results show a positive correlation between curing temperature and print fastness, but exceeding the critical temperature leads to color changes; curing time has a logarithmic relationship with print fastness, with a significant initial impact that gradually stabilizes; excessively high ambient humidity prolongs curing time and reduces print fastness. Based on these patterns, the optimal parameter combination and control range were determined, forming a set of post-processing quality control points to provide precise parameter control guidance for the curing process and ensure the long-term stability of the printing.
[0147] The optimal inspection plan is determined based on quality inspection data from the parameter-defect correlation network. This process analyzes the timing and difficulty of detection for various defects to determine the optimal inspection time; for example, some defects are visible immediately after printing, while others may require curing to fully manifest. Then, the optimal inspection location is determined, typically selecting areas with high defect incidence or quality sensitivity, such as pattern edges, color transition zones, or stress areas. Based on defect characteristics and inspection requirements, key technical indicators for quality inspection are extracted, such as color difference, edge sharpness, adhesion firmness, and pattern integrity, and corresponding inspection methods and judgment criteria are determined. These inspection timings, locations, indicators, and methods are compiled into a quality verification point set, providing a systematic guidance for quality monitoring and product quality verification during the production process.
[0148] By integrating and connecting raw material quality traceability point sets, key parameter tables for printing preparation processes, printing operation control parameter matrices, post-processing quality control point sets, and quality verification point sets, a complete traceability path for the entire printing quality process is drawn. This is achieved by clarifying the logical connections and quality transfer relationships between each set, such as how raw material quality affects the printing preparation process, how printing preparation parameters affect the printing operation, and so on. Then, following the production process sequence, the key control points in each set are connected to form a complete quality traceability link. This link clearly shows how quality problems can be traced step-by-step to upstream responsible links and root parameters. To improve traceability efficiency, particularly critical nodes and typical traceability paths for common problems are marked in the link to facilitate rapid identification of the problem source. The resulting complete printing quality traceability path serves as a core tool for quality management, supporting the rapid identification and systematic resolution of quality problems, and improving the quality stability and problem response speed of food printing production.
[0149] Taking the floral pattern printing on the surface of cookies as an example, raw material analysis revealed that pigment purity, adhesive type, and pretreatment temperature are key control variables. In particular, the purity of natural pigments needs to be maintained above 98% to prevent color distortion. Analysis of the printing preparation stage showed that ink viscosity is closely related to color uniformity, and the printing effect is optimal when controlled within the range of 900±50 mPa·s. Analysis of the printing operation stage revealed that printing pressure is highly correlated with edge sharpness; on the cookie surface, it should be maintained at a certain pressure. The angular deviation should not exceed 1°. Post-treatment curing analysis shows that the highest adhesion is achieved when the curing temperature is maintained at 165°C for 18 minutes, and the humidity needs to be controlled below 45%. Quality inspection determined that 15 minutes after curing is the optimal time for testing. The color difference should not exceed △E=3.5, and the edge sharpness should not be lower than the standard value of 85%, as determined by the standard color chart. Integrating these control points, a complete traceability path is constructed. For example, if a color fading problem is found, the traceability can be reversed: first check the curing temperature record, then verify the printing temperature, then check the pigment concentration ratio, tracing back to the purity of the raw material pigment and batch information, achieving precise location and effective solution of the problem.
[0150] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for detecting the printing quality of a food printing machine based on image processing, characterized in that, The image processing-based food printing machine printing quality detection method includes: Images of food prints were acquired using a visible light camera, an infrared thermal imager, and an ultraviolet fluorescence imaging device. Noise reduction and spatial alignment were performed on the acquired images of the three modalities to obtain multimodal image data. Based on the multimodal image data, fusion weights are generated, and the multimodal features are fused to obtain a comprehensive feature representation. Based on the comprehensive feature representation, printing area information is extracted, compared with standard templates, and routine defects and safety risks are detected to obtain a multi-level defect marking map and a food printing safety risk coordinate map. This includes: extracting the printing area boundary from the comprehensive feature representation using a combination of multi-scale gradient histograms and contour tracking to generate a precise printing contour description map; using color space hierarchical clustering and texture direction consistency analysis to finely segment the internal region of the precise printing contour description map, identifying color transition zones, pattern boundaries, and ink diffusion areas, and constructing a multi-level printing area feature mapping; and performing non-rigid registration and comparison of the multi-level printing area feature mapping with a food type-related printing standard template library to calculate local deformation. Field and color difference vectors form the spatial distribution of printing quality deviation. For areas exceeding the threshold in the spatial distribution of printing quality deviation, morphological feature analysis and connected region marking are performed to identify four types of printing process defects: color distortion, edge blurring, ink discontinuity, and pattern misalignment, generating a multi-level defect marking map with defect type attributes. Combining infrared thermal anomaly areas and ultraviolet fluorescence anomaly response points, material thermal stability issues and potential chemical reaction risks are analyzed through cross-validation to establish a printing material safety risk assessment matrix. Based on the printing material safety risk assessment matrix, the degree of hazard, diffusion trend, and potential impact of each risk point are quantified to generate a food printing safety risk coordinate map containing spatial coordinates, risk type, and warning level. Based on the multi-level defect marking map and the food printing safety risk coordinate map, print quality score and safety warning information are generated. Based on the quality fraction and safety warning information, the printing materials and process parameters are adjusted to obtain process control instructions; Based on the aforementioned process control instructions and historical testing data, print quality prevention and control rules are formulated.
2. The method for detecting the printing quality of a food printing machine based on image processing according to claim 1, characterized in that, The process involves acquiring images of food prints using a visible light camera, an infrared thermal imager, and an ultraviolet fluorescence imaging device. Noise reduction and spatial alignment are then performed on the acquired images of the three modalities to obtain multimodal image data, including: A high-precision mid-infrared array sensor was used to scan the heat distribution on the printed surface of food and record images of thermal field changes. The surface material of food printing is excited by a specific wavelength of ultraviolet light source, and the characteristic band fluorescence signal is captured by a filter system to form a fluorescence distribution image. The original color image is subjected to nonlocal mean filtering with a large search window and similar window parameters to suppress nonlinear noise and generate an edge-preserving color map. Multi-layer wavelet decomposition and soft thresholding are applied to thermal field change images to separate thermal signals from background fluctuations and construct temperature analysis maps. The fluorescence distribution image was smoothed using a Gaussian kernel of appropriate size and standard deviation to preserve the trend of fluorescence intensity changes and form a characteristic fluorescence map. By extracting the correspondence between images using the RANSAC algorithm based on SIFT feature points and calculating the homography matrix, the edge-preserving color map, temperature analysis map, and feature fluorescence map are precisely aligned to a unified coordinate system, thus constructing multimodal image data containing visual, thermal, and chemical properties.
3. The method for detecting the printing quality of a food printing machine based on image processing according to claim 1, characterized in that, The step of generating fusion weights based on the multimodal image data and fusing the multimodal features to obtain a comprehensive feature representation includes: Feature extraction is performed on the multimodal image data to obtain visible light features, infrared thermal features, and ultraviolet fluorescence features; The quality parameters of multimodal images are calculated based on signal-to-noise ratio, sharpness, and information entropy, and a modal reliability matrix is constructed. The spatial importance of different modal features is evaluated using the modal reliability matrix, and a weighted mapping diagram is generated. The visible light features, infrared thermal features, and ultraviolet fluorescence features are weighted using the weighted mapping diagram to form an initial fused feature. The residual connection mechanism is applied to the initial fused features to enhance cross-modal information complementarity and generate enhanced features; By adjusting the channel importance of the enhanced features through an attention gating mechanism, key feature channels are highlighted to obtain a comprehensive feature representation.
4. The method for detecting the printing quality of a food printing machine based on image processing according to claim 1, characterized in that, The step of generating printing quality scores and safety warning information based on the multi-level defect marking map and the food printing safety risk coordinate map includes: The multi-level defect marking map is classified and statistically analyzed to calculate the number, area and severity of each type of defect, and to generate a defect distribution feature vector. Spatial cluster analysis was performed on the food printing safety risk coordinate map to identify risk concentration areas and risk diffusion trends, forming a safety risk feature vector; The color shift, edge blur, pattern breakage and misalignment parameters in the defect distribution feature vector are weighted and mapped with the printing quality evaluation system to construct a visual quality scoring curve. Based on the thermal anomaly intensity, fluorescence anomaly type and distribution range of the aforementioned safety risk feature vector, and combined with the safety standard thresholds for different food categories, a graded safety risk index is generated. The print quality score, which reflects the overall aesthetic quality of the print, is obtained by integral calculation of the visual quality scoring curve. Based on the spatial distribution characteristics and temporal evolution trend of the graded safety risk index, safety early warning information containing risk level, risk description and handling suggestions is generated.
5. The method for detecting the printing quality of a food printing machine based on image processing according to claim 1, characterized in that, The step of adjusting the printing material and process parameters based on the quality fraction and safety warning information to obtain process control instructions includes: The quality score is compared and analyzed with the preset printing quality threshold to determine the direction of quality improvement and generate quality adjustment requirement indicators. Analyze the risk types and distribution characteristics in the safety warning information, identify the physical and chemical causes of potential safety hazards, and formulate safety handling strategies; Based on the color shift data and pattern edge blur in the quality adjustment requirement index, the adjustment amount of printing pigment ratio and the correction value of printing pressure are derived, and a material formula correction matrix is constructed. Based on the aforementioned safety handling strategy, the printing temperature, dwell time, and curing parameters are mapped and transformed to determine the process flow adjustment scheme and generate a process parameter correction matrix. The material formulation correction matrix and the process parameter correction matrix are integrated and optimized to eliminate conflicts between parameters and establish a collaborative control scheme. The aforementioned collaborative control scheme generates process control instructions that include adjustment timing, adjustment sequence, and adjustment magnitude.
6. The method for detecting the printing quality of a food printing machine based on image processing according to claim 1, characterized in that, The process of formulating printing quality prevention and control rules based on the process control instructions and historical inspection data includes: The process control instructions are compared with historical control records to extract effective parameter adjustment experience and construct a parameter-quality mapping knowledge base. Analyze the relationship between quality fluctuation patterns and process changes in the historical testing data, identify key influencing factors and potential risk points, and form a risk warning feature set; Based on the material compatibility data in the parameter-quality mapping knowledge base, an adaptation matrix for different food substrates and printing materials is established to generate a food type-oriented printing formulation guide. Based on the aforementioned risk warning feature set, food printing safety risk levels and monitoring frequencies are classified, and a graded monitoring scheme is formulated. By cross-analyzing the printing formula guidelines and the graded monitoring scheme, a quality traceability chain for the entire food printing process is established, and a table of key control points for printing quality is constructed. The table of key control points for printing quality is transformed into printing quality prevention and control rules that include preset early warning thresholds, regular inspection frequencies, and emergency handling procedures.
7. The method for detecting the printing quality of a food printing machine based on image processing according to claim 6, characterized in that, Based on the aforementioned risk warning feature set, the process of classifying food printing safety risk levels and monitoring frequencies, and formulating a tiered monitoring scheme includes: Cluster analysis is used to group the risk indicators in the risk warning feature set, identify the common features of different risk patterns, and construct a risk feature spectrum. Based on the feature intensity and frequency of occurrence in the aforementioned risk feature spectrum, risk factor scoring is performed to generate a risk influence matrix; By comparing and analyzing the aforementioned risk impact matrix with national food safety standards, a four-level risk level classification standard was established, resulting in a stamp safety risk level table. Based on the aforementioned safety risk level table for printed products, and combined with the shelf-life characteristics of different food types, corresponding monitoring time intervals and sampling ratios are set to generate a monitoring frequency guidance table. Based on the relationship between the monitoring frequency guideline and the production batch size, a stratified sampling strategy and a testing intensity scheme are designed, and a risk monitoring flowchart is constructed. By integrating the printing safety risk level table, the monitoring frequency guideline, and the risk monitoring flowchart, a graded monitoring scheme is formed for different risk types.
8. The method for detecting the printing quality of a food printing machine based on image processing according to claim 6, characterized in that, The process involves cross-analysis of the printing formula guidelines and the tiered monitoring scheme to establish a quality traceability chain for the entire food printing process and to construct a table of key control points for printing quality, including: The food type and raw material pretreatment process are extracted from the printed formula guide, and the risk detection points and detection cycle are extracted from the graded monitoring scheme to generate a process-risk mapping diagram. For the key process nodes in the process-risk mapping diagram, a process quality transfer model is established to identify the transfer rules of quality characteristics in the production chain and form a printing quality transfer chain. Quality data collection points are set up at each link of the printing quality transfer chain to collect process data including material parameters, environmental parameters and equipment parameters, and to establish a multi-dimensional quality monitoring database. Based on the degree of influence of each parameter in the multidimensional quality monitoring database on the printing quality, key influencing parameters and quality-sensitive points are marked, and a parameter-defect correlation network is constructed. Based on the parameter-defect correlation network, key control links are identified and a full-process traceability path for printing quality is drawn from each stage, from raw material entry, printing preparation, printing operation, post-processing and curing to quality inspection. By integrating the entire process traceability path of printing quality with the quality-sensitive points, core control items and control limits are extracted, and a table of key control points for printing quality is constructed.
9. The method for detecting the printing quality of a food printing machine based on image processing according to claim 8, characterized in that, Based on the parameter-defect correlation network, key control points are identified at each stage from raw material intake, printing preparation, printing operation, post-treatment curing to quality inspection, and a full-process traceability path for printing quality is drawn, including: Raw material-side analysis was performed on the parameter-defect correlation network to extract key control variables from three dimensions: the source of printing materials, composition specifications, and pretreatment methods, and to generate a raw material quality traceability point set. For the parameter-defect correlation network nodes in the printing preparation stage, the relationship diagram between ink mixing ratio, viscosity control and preheating temperature is extracted, and a table of key parameters for the printing preparation process is constructed. From the printing operation process of the parameter-defect correlation network, the correspondence between four core process parameters—printing pressure, speed, angle, and temperature—and defects is extracted to form a printing operation control parameter matrix. Based on the post-processing curing data in the parameter-defect correlation network, the influence of curing temperature, time, and humidity on printing fastness is analyzed, and a set of post-processing quality control points is established. Based on the quality inspection data in the parameter-defect correlation network, the optimal testing time and location are determined, key technical indicators for quality inspection are extracted, and a set of quality verification points is formed. By integrating and connecting the raw material quality traceability point set, the key parameter table of the printing preparation process, the printing operation control parameter matrix, the post-processing quality control point set, and the quality verification point set, a traceability path for the entire printing quality process is drawn.
Citation Information
Patent Citations
Printed cloth surface defect intelligent identification method based on multi-modal data
CN119672484A