Method for optimizing bag making process based on real-time vision measurement
By installing visual acquisition components and deep reinforcement learning algorithms on the bag-making machine, abnormalities in the bag-making process can be identified and automatically adjusted in real time, solving the problem that the equipment is difficult to perceive in real time and improving the stability and consistency of production quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUXI XIONGYING TECH CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-06-05
AI Technical Summary
Existing bag-making equipment struggles to achieve real-time perception and dynamic response to the state of materials and equipment during production, leading to batches of defective products. In particular, it is difficult to capture transient anomalies such as slight wrinkling of the film and microscopic fluctuations in heat-sealing temperature when operating at high speeds.
By installing vision acquisition components at the unwinding and heat-sealing stations of the bag-making machine, images are captured in real time and enhanced. Combined with deep reinforcement learning algorithms, an anomaly recognition model is constructed to identify and associate anomalies in equipment components, and generate correction instructions for automatic adjustment.
It enables real-time anomaly identification and automatic correction in the bag-making process, improving the efficiency and accuracy of troubleshooting, ensuring production stability and yield, and reducing downtime and material loss.
Smart Images

Figure CN122143414A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual recognition technology, specifically to a method for optimizing bag-making processes based on real-time visual measurement. Background Technology
[0002] With the explosive growth of emerging markets such as e-commerce logistics, fresh food delivery, and ready-to-eat meals, higher demands are being placed on packaging bags. Bag-making processes are facing stricter requirements for dimensional accuracy, sealing strength, and appearance consistency. Consumers are increasingly focused on the exquisite appearance, ease of use, and sustainable environmental performance of products, prompting packaging to develop towards functionality, personalization, and high-end features. This increases the complexity of bag-making processes and poses a core challenge to the ability to precisely control the production process. The maturity and cost reduction of next-generation information technology have made industrial upgrading possible. Machine vision technology has moved from the laboratory to the industrial field. Its high resolution, non-contact, and high-speed processing characteristics make it an ideal tool for online quality inspection.
[0003] Currently, although mainstream bag-making equipment has achieved automated continuous production, its process control still relies heavily on preset parameters and periodic manual sampling. It is difficult to achieve real-time perception and dynamic response to the material and equipment status during production. Anomaly detection is often delayed, resulting in batches of defective products. Especially under high-speed operation, traditional electromechanical sensors are unable to fully capture transient anomalies such as slight wrinkling of the film, micro-fluctuations in heat sealing temperature, and minor surface defects. There is a lack of intelligent diagnostic mechanisms that automatically associate quality anomaly characteristics with specific equipment components. Summary of the Invention
[0004] (a) Technical problems to be solved In view of the above-mentioned shortcomings of the existing technology, the present invention provides a bag making process optimization method based on real-time visual measurement, which can effectively solve the problems of the existing technology.
[0005] (II) Technical Solution To achieve the above objectives, the present invention provides the following technical solution: This invention discloses a method for optimizing bag-making processes based on real-time visual measurement, comprising the following steps: Step 1: Install vision acquisition components at the unwinding mechanism and heat sealing device station of the bag making machine to capture continuous image sequences of the conveyed material in real time, and link with the supplementary lighting device to eliminate image blur caused by motion; Step 2: Enhance the acquired images to identify the positional offset of the material edge in the unwinding process, the height deviation of the sealing line in the heat sealing process, and the defects such as bubbles or stains on the material surface. Compare the identification results with the preset standard process parameter library to generate dimensional offset values, height deviation values, and surface defect density values. Step 3: When the dimensional deviation value exceeds the first set threshold, mark it as an abnormal unwinding tension and associate it with the unwinding roller pressure control unit; when the height deviation value exceeds the second set threshold or the surface defect density value exceeds the third set threshold, mark it as an abnormal heat sealing and associate it with the heat sealing knife temperature control mechanism and pressure actuator; establish a correspondence table between abnormal features and equipment components; Step 4: Construct an anomaly recognition model using a deep reinforcement learning algorithm. Pre-train the model with historical anomaly feature data and corresponding equipment fault records. Input the real-time acquired size offset value, height deviation value and surface defect density value into the trained model and output the anomaly risk score of each associated equipment component. The score range is 0 to 1. Step 5: When the abnormal risk score is greater than the preset risk threshold, the corresponding equipment component is determined to be an actual abnormal component. Based on several operating setting parameters associated with the actual abnormal component, the abnormal feature type is defined and a correction weight coefficient is assigned: size abnormalities are assigned the highest weight, height abnormalities are assigned a medium weight, and surface defects are assigned a basic weight; the sum of all weight coefficients is 1. Step 6: Generate unwinding correction instructions and heat sealing correction instructions based on the abnormal feature type and correction weight coefficient: Calculate the tension torque compensation value when unwinding is abnormal. This value is positively correlated with the weight coefficient and dimensional offset. Step 7: Write the correction command into the control system of the bag making machine via the industrial bus. After execution, re-acquire the image data from Step 1 to verify the adjustment effect. When executing the correction command, add an additional compensation amount that is proportional to the rate of change of the abnormal risk score. Step 8: Stop the correction when the abnormal risk score drops below the safety threshold.
[0006] Furthermore, the visual acquisition components in step 1 include a high-speed line scan camera and an infrared array camera; the high-speed line scan camera is used to capture the edge deformation of the material at the unwinding station, and the infrared array camera is used to monitor the temperature distribution in the sealing area at the heat sealing station.
[0007] Furthermore, the process for identifying the material edge position offset in step 2, the unwinding process, is as follows: In the continuous image sequence acquired at the unwinding station, random noise is eliminated by Gaussian filtering, and the edge contour lines on the left and right sides of the material are extracted by an edge detection operator. The extracted contour line is compared with the preset standard edge baseline at the pixel level. The average pixel distance difference between the two sides and the baseline is calculated. Then, the difference is multiplied by the pre-calibrated pixel and physical size conversion coefficient to obtain the actual position offset of the material edge.
[0008] Furthermore, the process for identifying the height deviation of the sealing line in step 2, the heat sealing process, is as follows: At the heat sealing station, two-dimensional images and three-dimensional depth information of the sealing area are obtained through structured light projection or binocular vision methods. Locate the center line of the sealing line in the two-dimensional image, and extract a series of height sampling points along the center line in the three-dimensional depth information; Calculate the average height of these sampling points, and then calculate the difference between this average height and the preset standard sealing height. The result is the height deviation value of the sealing line. For the surface condition of the material, surface images are acquired under uniform illumination and brightness normalization is performed to eliminate the influence of uneven illumination. The process of identifying surface defects in materials is as follows: the image is binarized using a threshold segmentation method to identify the bright closed areas that are suspected to be bubbles; By calculating the roundness, area, and grayscale gradient difference between the region and surrounding pixels, a comprehensive judgment is made as to whether it is a bubble defect, and the number of bubbles per unit area and the total area are counted. Convert the image to HSV or Lab color space, and segment out abnormal areas that have a significant color difference from the background color of the material by setting a threshold range in the saturation channel or chromatic aberration channel; By combining the texture features of the area, stains are distinguished from normal printed patterns, and the area ratio of the stained area is finally calculated as the defect density value.
[0009] Furthermore, the construction process of the anomaly detection model in step 4 includes the following steps: Step 41: Construct a dual-channel neural network architecture that includes a perception layer, a decision layer, and an output layer. The perception layer receives real-time data on material edge size deviation, sealing height deviation, and surface defect density. The decision layer extracts the temporal correlation of abnormal features through a long short-term memory network module and combines it with an attention mechanism module to distinguish the influence weights of different equipment components. Step 42: In the pre-training stage, a training set is constructed using historical production process data, and the network parameters are optimized in two stages: the first stage takes minimizing the error in identifying abnormal features as the supervised learning objective, and the second stage introduces equipment failure records as reward signals for reinforcement learning tuning. Step 43: The trained model has the ability to predict abnormal risk scores. It can output dynamic risk parameters of each related component of the unwinding roller, heat sealing knife and pressure actuator based on the input multi-dimensional real-time feature data. The risk parameter value range is mapped to a continuous interval of 0 to 1 after normalization.
[0010] Furthermore, the formula for calculating the abnormal risk score of each associated equipment component in step 4 is as follows: ; In the formula, Representing the An anomaly risk score for each associated equipment component, with a value range of (0,1). This represents the activation function, used to map the output to a probability range. This represents the total number of input features, including size offset values, height deviation values, and surface defect density values. Representing the The input feature for the th input feature The weight coefficients of each device component are obtained through deep reinforcement learning training. Representing the Normalized values of each input feature, Representative of features The nonlinear transformation function is used to extract higher-order features. Representing the Bias terms for each device component.
[0011] Furthermore, the operating settings parameters in step 5 include: the unwinding component, which relates to the unwinding tension setting value and the response speed of the correction cylinder; and the heat sealing component, which relates to the heat sealing temperature, pressure, and duration.
[0012] Furthermore, the definition of the abnormal feature type in step 5 is determined based on the combination of operating setting parameters associated with the actual abnormal component, including the following types: Dimensional deviation type anomaly: When the abnormal part is the unwinding part, and the unwinding tension setting value or the operating parameter of the correction cylinder response speed deviates from the standard range, it is judged as a dimensional deviation type anomaly. Heat seal height type anomaly: When the abnormal component is a heat seal component, and the operating parameters of heat seal temperature or heat seal duration deviate from the standard range, it is judged as a heat seal height type anomaly; Surface quality type anomaly: When the abnormal component is a heat-sealing component and the operating parameters of the heat-sealing pressure deviate from the standard range, it is judged as a surface quality type anomaly; Composite anomaly: When multiple operating settings parameters deviate from the standard range simultaneously, it is determined to be a composite anomaly, and its anomaly characteristic type is determined by the parameter type with the greatest degree of deviation.
[0013] Furthermore, the unwinding correction command in step 6 calculates the tension torque compensation value when an unwinding anomaly occurs. This value is positively correlated with the weighting coefficient and the dimensional offset. The heat sealing correction command calculates the temperature compensation value and the pressure compensation value when a heat sealing anomaly occurs. The temperature compensation value is positively correlated with the weighting coefficient and the height deviation. The pressure compensation value is positively correlated with the weighting coefficient and the square root of the surface defect density.
[0014] Furthermore, in step 7, when executing the correction command, the difference between the abnormal risk score of the current cycle and the previous cycle is calculated in real time to obtain the risk score change rate; the change rate is combined with a preset proportional gain coefficient to obtain a real-time dynamic compensation value; the dynamic compensation value is superimposed with the static correction command generated in step 6 to form the final control command output to the bag making machine control system.
[0015] (III) Beneficial Effects Compared with the known prior art, the technical solution provided by this invention has the following beneficial effects: 1. By collecting comprehensive image data of materials in key processes such as unwinding and heat sealing in real time, abnormal features of unwinding and heat sealing are identified. Through a pre-trained anomaly recognition model, visual features are deeply correlated with specific process components, and quantitative anomaly risk parameters are output. This allows the specific responsible component to be identified before the anomaly causes substantial scrap, greatly improving the efficiency and accuracy of troubleshooting and avoiding the huge time and material losses caused by downtime of the entire line and blind debugging.
[0016] 2. By introducing a dynamic decision-making mechanism with corrective weights, the system intelligently assesses the adjustment priority and magnitude of various related operational settings parameters based on the severity of abnormal risk parameters. Through weight-based calculations, quantitative operational correction parameters are generated and automatically issued for execution, enabling the machine to have self-optimization capabilities. This allows it to continuously respond to fluctuations in material characteristics, environmental changes, or gradual wear and tear of equipment, ensuring that the process is always in the optimal state and improving the consistency and yield of bag-making products. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0018] Figure 1 This is a schematic diagram of the overall process of the present invention; Figure 2 This is a flowchart illustrating the construction process of the anomaly recognition model in this invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] The present invention will be further described below with reference to embodiments.
[0021] The bag-making process optimization method based on real-time visual measurement in this embodiment, such as Figures 1-2 As shown, it includes the following steps: Step 1: Install vision acquisition components at the unwinding mechanism and heat sealing station of the bag making machine to capture continuous image sequences of the conveyed material in real time, and link with the supplementary lighting device to eliminate image blur caused by motion; the vision acquisition components include a high-speed line scan camera and an infrared array camera; the high-speed line scan camera is used to capture the edge deformation of the material at the unwinding station, and the infrared array camera is used to monitor the temperature distribution of the sealing area at the heat sealing station.
[0022] Step 2: Enhance the acquired images to identify the positional offset of the material edge in the unwinding process, the height deviation of the sealing line in the heat sealing process, and the defects such as bubbles or stains on the material surface. Compare the identification results with the preset standard process parameter library to generate dimensional offset values, height deviation values, and surface defect density values. The process for identifying the offset of the material edge position during the unwinding process is as follows: In the continuous image sequence acquired at the unwinding station, random noise is eliminated by Gaussian filtering, and the edge contour lines on the left and right sides of the material are extracted by an edge detection operator. The extracted contour line is compared with the preset standard edge baseline at the pixel level. The average pixel distance difference between the two sides and the baseline is calculated. Then, it is multiplied by the pre-calibrated pixel and physical size conversion coefficient to obtain the actual position offset of the material edge. The process for identifying the height deviation of the sealing line in the heat sealing process is as follows: At the heat sealing station, two-dimensional images and three-dimensional depth information of the sealing area are obtained through structured light projection or binocular vision methods. Locate the center line of the sealing line in the two-dimensional image, and extract a series of height sampling points along the center line in the three-dimensional depth information; Calculate the average height of these sampling points, and then calculate the difference between this average height and the preset standard sealing height. The result is the height deviation value of the sealing line. For the surface condition of the material, surface images are acquired under uniform illumination and brightness normalization is performed to eliminate the influence of uneven illumination. The process of identifying surface defects in materials is as follows: the image is binarized using a threshold segmentation method to identify the bright closed areas that are suspected to be bubbles; By calculating the roundness, area, and grayscale gradient difference between the region and surrounding pixels, a comprehensive judgment is made as to whether it is a bubble defect, and the number of bubbles per unit area and the total area are counted. Convert the image to HSV or Lab color space, and segment out abnormal areas that have a significant color difference from the background color of the material by setting a threshold range in the saturation channel or chromatic aberration channel; By combining the texture features of the area, stains are distinguished from normal printed patterns, and the area ratio of the stained area is finally calculated as the defect density value.
[0023] Step 3: When the dimensional deviation value exceeds the first set threshold, it is marked as an abnormal unwinding tension and associated with the unwinding roller pressure control unit. When the height deviation value exceeds the second set threshold or the surface defect density value exceeds the third set threshold, it is marked as a heat sealing abnormality and associated with the heat sealing knife temperature control mechanism and pressure actuator. Establish a correspondence table between abnormal features and equipment components.
[0024] Step 4: Construct an anomaly recognition model using a deep reinforcement learning algorithm. Pre-train the model with historical anomaly feature data and corresponding equipment fault records. Input the real-time acquired size offset value, height deviation value, and surface defect density value into the trained model and output the anomaly risk score of each associated equipment component. The score ranges from 0 to 1.
[0025] Step 5: When the abnormal risk score is greater than the preset risk threshold, the corresponding equipment component is determined to be an actual abnormal component. Based on several operating setting parameters associated with the actual abnormal component, the abnormal feature type is defined, and correction weight coefficients are assigned: size abnormalities are assigned the highest weight, height abnormalities are assigned a medium weight, and surface defects are assigned a basic weight; the sum of all weight coefficients is 1; the operating setting parameters include: unwinding components, involving unwinding tension setting value and correction cylinder response speed; heat sealing components, involving heat sealing temperature, pressure, and duration; The definition of abnormal feature types is based on the combination of operating setting parameters associated with the actual abnormal component, and includes the following types: Dimensional deviation type anomaly: When the abnormal part is the unwinding part, and the unwinding tension setting value or the operating parameter of the correction cylinder response speed deviates from the standard range, it is judged as a dimensional deviation type anomaly. Heat seal height type anomaly: When the abnormal component is a heat seal component, and the operating parameters of heat seal temperature or heat seal duration deviate from the standard range, it is judged as a heat seal height type anomaly; Surface quality type anomaly: When the abnormal component is a heat-sealing component and the operating parameters of the heat-sealing pressure deviate from the standard range, it is judged as a surface quality type anomaly; Composite anomaly: When multiple operating settings parameters deviate from the standard range simultaneously, it is determined to be a composite anomaly, and its anomaly characteristic type is determined by the parameter type with the greatest degree of deviation.
[0026] Step 6: Generate unwinding correction instructions and heat sealing correction instructions based on the abnormal feature type and correction weight coefficient: Calculate the tension torque compensation value when unwinding is abnormal. This value is positively correlated with the weight coefficient and dimensional offset. The unwinding correction command calculates the tension torque compensation value when an unwinding anomaly occurs. This value is positively correlated with the weighting coefficient and the dimensional offset. The heat sealing correction command calculates the temperature compensation value and the pressure compensation value when a heat sealing anomaly occurs. The temperature compensation value is positively correlated with the weighting coefficient and the height deviation. The pressure compensation value is positively correlated with the weighting coefficient and the square root of the surface defect density. The calculation process for the unwinding and correction command is as follows: The direction of basic adjustment is determined based on the identified type of dimensional offset. Positive offset corresponds to increasing the tension torque, while negative offset corresponds to decreasing the tension torque. The basic compensation strength value is obtained by combining the normalized absolute value of the size offset with the correction weight coefficient assigned to it. Based on the current operating speed of the equipment and the material characteristics parameters, the basic compensation strength value is converted into an actual torque adjustment amount that can be written into the tension controller, and a structured control instruction containing the adjustment amount, execution priority and effective time is generated. The calculation process for the heat sealing correction command is as follows: For temperature compensation, the type of height deviation is determined. If the sealing is too high, the temperature is reduced; if the sealing is too low, the temperature is increased. Then, the absolute value of the height deviation, the correction weight coefficient assigned to it, and the preset temperature sensitivity coefficient of the heat sealing material are multiplied to calculate the initial temperature adjustment value. Finally, the real-time temperature of the heat sealing knife and the target temperature difference are combined for fine-tuning to generate the final temperature setting command. For pressure compensation, the pressure adjustment direction is determined based on the surface defect density value. An increase in defect density corresponds to an increase in pressure. Then, the square root of the surface defect density value, the correction weight coefficient assigned to it, and the material thickness compensation factor are multiplied to obtain the pressure adjustment benchmark value. The sealing width and the maximum allowable pressure of the equipment are combined for amplitude limiting processing to generate a pressure setting value instruction.
[0027] Step 7: Write the correction command into the control system of the bag making machine via the industrial bus. After execution, re-acquire the image data from Step 1 to verify the adjustment effect. When executing the correction command, calculate the difference between the abnormal risk score of the current cycle and the previous cycle in real time to obtain the risk score change rate. Combine the change rate with the preset proportional gain coefficient to obtain the real-time dynamic compensation value. Superimpose this dynamic compensation value with the static correction command generated in Step 6 to form the final control command output to the control system of the bag making machine. The proportional gain coefficient is pre-calibrated according to the equipment response characteristics to ensure that the compensation amount can quickly suppress the abnormal deterioration and avoid system overshoot oscillation.
[0028] Step 8: Stop the correction when the abnormal risk score drops below the safety threshold.
[0029] Compared with existing technologies, by integrating machine vision and reinforcement learning, this method can not only identify abnormal features in real time and accurately, but also assess risks, locate faulty components, and dynamically generate weighted correction parameters through intelligent models. This upgrades traditional discrete manual intervention into a full-process, adaptive, and systematic process optimization, improving production stability, quality consistency, and equipment utilization.
[0030] At other levels, this embodiment also provides a process for constructing an anomaly recognition model, such as... Figure 2 As shown, it includes the following steps: Step 41: Construct a dual-channel neural network architecture that includes a perception layer, a decision layer, and an output layer. The perception layer receives real-time data on material edge size deviation, sealing height deviation, and surface defect density. The decision layer extracts the temporal correlation of abnormal features through a long short-term memory network module and combines it with an attention mechanism module to distinguish the influence weights of different equipment components. Step 42: In the pre-training stage, a training set is constructed using historical production process data, and the network parameters are optimized in two stages: the first stage takes minimizing the error in identifying abnormal features as the supervised learning objective, and the second stage introduces equipment failure records as reward signals for reinforcement learning tuning. Step 43: The trained model has the ability to predict abnormal risk scores. It can output dynamic risk parameters of each related component of the unwinding roller, heat sealing knife and pressure actuator based on the input multi-dimensional real-time feature data. The risk parameter value range is mapped to a continuous interval of 0 to 1 after normalization.
[0031] The formula for calculating the abnormal risk score of each associated equipment component is as follows: ; In the formula, Representing the An anomaly risk score for each associated equipment component, with a value range of (0,1). This represents the activation function, used to map the output to a probability range. This represents the total number of input features, including size offset values, height deviation values, and surface defect density values. Representing the The input feature for the th input feature The weight coefficients of each device component are obtained through deep reinforcement learning training. Representing the Normalized values of each input feature, Representative of features The nonlinear transformation function is used to extract higher-order features. Representing the Bias terms for individual device components; The above formula can not only comprehensively process multi-dimensional features such as size, height, and surface, but also automatically mine the correlation between these features and equipment components. It overcomes the limitations of traditional methods that rely on a single threshold or simple linear summation, improves the depth and accuracy of risk assessment, and adaptively learns the optimal decision from historical data rather than relying on fixed rules. The weight coefficients obtained from the training intuitively reflect the degree of influence of different features on the risk of specific components, providing a quantifiable explanatory basis for the root cause analysis of anomalies.
[0032] In summary, this invention comprehensively monitors the edge size, height, and surface condition of materials by deploying vision acquisition components at multiple workstations, extracts abnormal features of unwinding and heat sealing in real time, and inputs them into an intelligent model based on reinforcement learning pre-training. This not only improves the accuracy and foresight of anomaly judgment, but also enables precise tracing of complex process problems. A corrective weighting mechanism based on dynamic risk parameters is introduced, which can intelligently allocate adjustment intensity according to the severity of anomalies and automatically generate and issue correction parameters. This not only greatly improves the pertinence and response speed of process adjustments and effectively reduces scrap rate and downtime, but also enables the model to self-iterate and evolve through continuous data feedback, providing intelligent support for the continuous stability and optimization of bag making process.
[0033] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention 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 will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for optimizing bag-making process based on real-time visual measurement, characterized in that, Includes the following steps: Step 1: Install vision acquisition components at the unwinding mechanism and heat sealing device station of the bag making machine to capture continuous image sequences of the conveyed material in real time; Step 2: Based on the image acquisition, identify the positional offset of the material edge in the unwinding process, the height deviation of the sealing line in the heat sealing process, and the surface defects of the material. Compare the identification results with the preset standard process parameter library to generate size offset value, height deviation value, and surface defect density value. Step 3: When the dimensional deviation value exceeds the first set threshold, it is marked as abnormal unwinding tension and associated with the unwinding roller pressure control unit. When the height deviation value exceeds the second set threshold or the surface defect density value exceeds the third set threshold, it is marked as abnormal heat sealing and associated with the heat sealing knife temperature control mechanism and pressure actuator. Step 4: Construct an anomaly recognition model using a deep reinforcement learning algorithm. Input the real-time acquired size offset values, height deviation values, and surface defect density values into the trained model, and output the anomaly risk score for each associated equipment component. Step 5: When the abnormal risk score is greater than the preset risk threshold, the corresponding equipment component is determined to be an actual abnormal component. The abnormal feature type is defined according to several operating setting parameters associated with the actual abnormal component, and a correction weight coefficient is assigned. Step 6: Generate unwinding correction instructions and heat sealing correction instructions based on the anomaly characteristic type and correction weight coefficient; Step 7: Write the correction command into the control system of the bag making machine via the industrial bus. After execution, re-acquire the image data from Step 1 to verify the adjustment effect. Step 8: Stop the correction when the abnormal risk score drops below the safety threshold.
2. The bag-making process optimization method based on real-time visual measurement according to claim 1, characterized in that, The visual acquisition components in step 1 include a high-speed line scan camera and an infrared array camera; the high-speed line scan camera is used to capture the edge deformation of the material at the unwinding station, and the infrared array camera is used to monitor the temperature distribution in the sealing area at the heat sealing station.
3. The bag-making process optimization method based on real-time visual measurement according to claim 1, characterized in that, The process for identifying the material edge position offset in step 2, the unwinding process, is as follows: In the continuous image sequence acquired at the unwinding station, random noise is eliminated by Gaussian filtering, and the edge contour lines on the left and right sides of the material are extracted by an edge detection operator. The extracted contour line is compared with the preset standard edge baseline at the pixel level. The average pixel distance difference between the two sides and the baseline is calculated. Combined with the pre-calibrated pixel and physical size conversion coefficient, the actual position offset of the material edge is obtained.
4. The bag-making process optimization method based on real-time visual measurement according to claim 1, characterized in that, The process for identifying the height deviation of the sealing line in step 2 of the heat sealing process is as follows: At the heat sealing station, two-dimensional images and three-dimensional depth information of the sealing area are obtained through structured light projection. Locate the center line of the sealing line in the two-dimensional image, and extract a series of height sampling points along the center line in the three-dimensional depth information; Calculate the average height of these sampling points, and then calculate the difference between this average height and the preset standard sealing height. The result is the height deviation value of the sealing line. For the surface condition of the material, surface images are acquired under uniform illumination and brightness normalization is performed to eliminate the influence of uneven illumination. The process of identifying surface defects in materials is as follows: the image is binarized using a threshold segmentation method to identify the bright closed areas that are suspected to be bubbles; By calculating the roundness, area, and grayscale gradient difference between the region and surrounding pixels, a comprehensive judgment is made as to whether it is a bubble defect, and the number of bubbles per unit area and the total area are counted. The image is converted to HSV, and abnormal areas with significant color differences from the material background color are segmented by setting a threshold range in the saturation channel. By combining the texture features of the area, stains are distinguished from normal printed patterns, and the area ratio of the stained area is finally calculated as the defect density value.
5. The bag-making process optimization method based on real-time visual measurement according to claim 1, characterized in that, The construction process of the anomaly detection model in step 4 includes the following steps: Step 41: Construct a dual-channel neural network architecture that includes a perception layer, a decision layer, and an output layer. The perception layer receives real-time data on material edge size deviation, sealing height deviation, and surface defect density. The decision layer extracts the temporal correlation of abnormal features through a long short-term memory network module and combines it with an attention mechanism module to distinguish the influence weights of different equipment components. Step 42: In the pre-training stage, a training set is constructed using historical production process data, and the network parameters are optimized in two stages: the first stage takes minimizing the error in identifying abnormal features as the supervised learning objective, and the second stage introduces equipment failure records as reward signals for reinforcement learning tuning. Step 43: The trained model outputs dynamic risk parameters of each associated component of the unwinding roller, heat sealing knife, and pressure actuator based on the input multidimensional real-time feature data. The risk parameter values are normalized and mapped to a continuous range of 0 to 1.
6. The bag-making process optimization method based on real-time visual measurement according to claim 1, characterized in that, The formula for calculating the abnormal risk score of each associated equipment component in step 4 is as follows: ; In the formula, Representing the Anomaly risk score for each associated equipment component, Represents the activation function. Represents the total number of input features. Representing the The input feature for the th _th The weighting coefficient of each equipment component Representing the Normalized values of each input feature. Representative of features The nonlinear transformation function, Representing the Bias terms for each device component.
7. The bag-making process optimization method based on real-time visual measurement according to claim 1, characterized in that, The operating settings parameters in step 5 include: the unwinding component, which involves the unwinding tension setting value and the response speed of the correction cylinder; and the heat sealing component, which involves the heat sealing temperature, pressure, and duration.
8. The bag-making process optimization method based on real-time visual measurement according to claim 1, characterized in that, The definition of the abnormal feature type in step 5 is based on the combination of operating setting parameters associated with the actual abnormal component, and includes the following types: Dimensional deviation type anomaly: When the abnormal part is the unwinding part, and the unwinding tension setting value or the operating parameter of the correction cylinder response speed deviates from the standard range, it is judged as a dimensional deviation type anomaly. Heat seal height type anomaly: When the abnormal component is a heat seal component, and the operating parameters of heat seal temperature or heat seal duration deviate from the standard range, it is judged as a heat seal height type anomaly; Surface quality type anomaly: When the abnormal component is a heat-sealing component and the operating parameters of the heat-sealing pressure deviate from the standard range, it is judged as a surface quality type anomaly; Composite anomaly: When multiple operating settings parameters deviate from the standard range simultaneously, it is determined to be a composite anomaly, and its anomaly characteristic type is determined by the parameter type with the greatest degree of deviation.
9. The bag-making process optimization method based on real-time visual measurement according to claim 1, characterized in that, The unwinding correction command in step 6 calculates the tension torque compensation value when the unwinding is abnormal. This value is positively correlated with the weighting coefficient and the dimensional offset. The heat sealing correction command calculates the temperature compensation value and the pressure compensation value when the heat sealing is abnormal. The temperature compensation value is positively correlated with the weighting coefficient and the height deviation. The pressure compensation value is positively correlated with the weighting coefficient and the square root of the surface defect density.
10. The bag-making process optimization method based on real-time visual measurement according to claim 1, characterized in that, In step 7, when executing the correction command, the difference between the abnormal risk score of the current cycle and the previous cycle is calculated in real time to obtain the risk score change rate; the change rate is combined with the preset proportional gain coefficient to obtain the real-time dynamic compensation value; the dynamic compensation value is superimposed with the static correction command generated in step 6 to form the final control command output to the bag making machine control system.