A bagged water packaging intelligent detection system based on robot AI vision

By constructing an intelligent inspection system based on robot AI vision, the problems of strong subjectivity, low efficiency and insufficient accuracy in traditional bagged water inspection methods have been solved. This system enables high-precision bagged water packaging inspection and automated sorting, and improves the robustness and traceability of the inspection system.

CN121544575BActive Publication Date: 2026-07-21SHENZHEN JIUDA LIGHT IND MASCH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN JIUDA LIGHT IND MASCH CO LTD
Filing Date
2025-11-25
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional bagged water testing methods are highly subjective, inefficient, and difficult to achieve full inspection. They also struggle to achieve high-precision quality identification under complex packaging conditions, lack adaptive control mechanisms, fail to achieve real-time coupling and traceability of test results, and are difficult to identify rare defects.

Method used

An intelligent inspection system based on robot AI vision is constructed. Through optical reconstruction control, geometric normalization processing, task enhancement, defect discrimination modeling, self-learning optimization, and graded decision analysis, combined with robot execution and traceability modules, intelligent inspection of the entire process of bagged water packaging is realized.

Benefits of technology

It improves imaging stability and detection accuracy, enables highly sensitive identification of rare defects, enhances the automation level and quality traceability of the production line, and forms a full-process intelligent control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121544575B_ABST
    Figure CN121544575B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on robot AI vision's bagged water packaging intelligent detection system, it is related to packaging detection and intelligent manufacturing technical field.The system includes: optical reconstruction control module, geometric normalization processing module, task enhancement construction module, defect discrimination modeling module, self-learning optimization module, grade decision analysis module and robot execution and traceability module, each module realizes optical imaging correction, feature enhancement, defect identification, self-learning optimization and grade determination in turn, drive robot to complete sorting and traceability, and construct the intelligent detection and quality management integrated system of bagged water packaging.Through the collaborative design of optical self-consistent imaging, energy-driven multi-task self-learning detection and robot closed-loop traceability control, high-precision detection, intelligent sorting and full-process traceable automatic quality control of bagged water packaging are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of packaging inspection and intelligent manufacturing technology, specifically to an intelligent inspection system for bagged water packaging based on robot AI vision. Background Technology

[0002] In the production process of bagged drinking water, the integrity of the packaging, the quality of the sealing, and the accuracy of the label batch code directly affect the product's safety and market compliance. Traditional methods for testing the quality of bagged water mainly rely on manual sampling and fixed optical inspection equipment. Manual inspection suffers from strong subjectivity, low efficiency, and difficulty in achieving full inspection; while fixed optical inspection methods typically use a single-view imaging structure, making it difficult to reliably identify factors such as reflection interference from the bag surface, liquid level refraction, uneven sealing, and differences in label printing. When the bag material is relatively soft or highly transparent, specular reflection and internal light scattering can cause brightness distortion and blurred boundaries in the inspection image, making it difficult for traditional threshold or template matching algorithms to accurately distinguish anomalies.

[0003] As drinking water production lines become increasingly intelligent and high-speed, single optical inspection can no longer meet the high-precision quality identification requirements under complex packaging conditions. While multispectral imaging and polarization detection can improve reflection issues to some extent, they still require frequent manual parameter adjustments under different production batches and ambient light variations, lacking an adaptive control mechanism. Furthermore, defect types exhibit diverse characteristics, such as low liquid levels, incomplete sealing, and blurred batch codes. Rare defects are extremely few in number, making it difficult for traditional supervised learning models to form stable classification boundaries, leading to decreased detection sensitivity.

[0004] In production automation, existing inspection results mostly drive sorting mechanisms through signal triggering, failing to achieve real-time coupling between inspection information and mechanical execution, and lacking a unified traceability system for inspection records and execution actions. Inspection configurations, lighting conditions, and geometric calibration information for different production batches are often not recorded in a structured manner, making it impossible for subsequent analysis and maintenance to reverse-verify or dynamically correct quality anomalies. Furthermore, the lack of energy characteristic-driven discrimination logic and self-learning optimization mechanisms makes it difficult for the inspection system to maintain stable inspection performance when faced with new samples or changes in anomaly distribution.

[0005] Therefore, there is an urgent need to construct an intelligent inspection system that integrates reconfigurable optical imaging, geometric normalization correction, energy-driven discrimination, self-learning optimization, and robotic collaborative execution. This system achieves visual consistency of the bag through multi-spectral optical modulation, eliminates multi-view differences through geometric mapping correction, and enhances the detection features of liquid level, sealing, and batch codes through energy field modeling. Simultaneously, it combines self-learning algorithms to enhance sensitivity to rare defects and adaptively update the model, and uses robotic execution units to achieve closed-loop linkage of detection, sorting, and traceability information. This type of system can achieve intelligent inspection of the entire process of bagged water packaging on high-speed production lines, providing highly robust and scalable technical support for intelligent manufacturing and quality traceability. Summary of the Invention

[0006] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide an intelligent inspection system for bagged water packaging based on robot AI vision, so as to solve the above-mentioned technical problems.

[0007] To achieve the above objectives, the present invention provides the following technical solution: an intelligent inspection system for bagged water packaging based on robot AI vision, comprising: The optical reconstruction control module constructs a reconfigurable illumination and multi-spectral imaging structure. By adjusting the illumination intensity, polarization angle, and exposure time, it forms an illumination-camera self-consistent reference, establishes consistent control over the optical state of the bagged water surface reflection, liquid surface refraction, and batch code area, and generates optical reference data. The geometric normalization processing module performs spatial geometric normalization based on optical reference data and multi-view synchronously acquired images. It establishes a spatial unfolding mapping based on the deformation law of the packaging material film and the structural characteristics of the sealing tape to generate standardized inspection images. The task enhancement module enhances three types of tasks—liquid level, sealing, and batch code—based on standardized detection images, forming an enhanced liquid level view, a detailed sealing view, and a comparative batch code view. It constructs a multi-scale feature layer through spectral response, near-infrared reflection, and surface texture differences to generate task feature data. The defect discrimination modeling module establishes the defect discrimination energy relationship based on task feature data, and generates identification results for liquid level deviation, sealing abnormality and batch code clarity defects, outputting discrimination information including defect type and severity level; The self-learning optimization module constructs a prototype metric relationship based on the energy difference between normal and abnormal samples, forms a rare defect sensitization mechanism, performs adaptive updates to the detection model, and generates optimized discrimination results. The grade decision analysis module constructs a comprehensive decision index based on the optimized discrimination results, combines grade thresholds and uncertainty constraints to perform quality grade judgment, and generates qualified, warning and unqualified grade information. The robot execution and traceability module generates sorting plans and grasping trajectories based on grade information, realizes automatic diversion and positioning of qualified and unqualified products, records optical reference, geometric mapping, detection results and sorting action information, and forms a detection data archive.

[0008] The present invention is further configured such that the implementation of the optical reconstruction control includes: Perform spectral and polarization channel initialization, acquire parallel and cross-polarized image signals of each spectral band in the calibration plate area, construct the mirror residual baseline through light intensity difference, and form reflection difference data; Exposure time and illumination intensity are jointly tuned based on reflection difference data. Brightness homogeneity constraints are constructed in the batch code reference area and the neighborhood of the sealing strip. Stable exposure and illumination reference parameters are obtained by minimizing the joint index of brightness deviation and mirror residual. Based on the obtained parameters, the polarization angle is finely adjusted. Images are acquired in the selected spectral band according to the angle sequence. The mirror suppression angle is determined according to the principle of minimizing gradient perturbation, thus forming a polarization setting that suppresses reflection and maintains boundary sharpness. Structured lighting phase adjustment is performed based on the sealing tape path. By constraining gradient continuity and texture smoothness, a lighting phase that can keep the sealing texture uniform is selected, and a phase setting that enhances the sealing details is generated. The optimal spectral bands are selected for the three detection tasks of liquid level, sealing and batch code. Polarization demixing is performed on the images of each spectral band to generate liquid level observation base plane, sealing observation base plane and batch code observation base plane, forming a multi-task optical response set. Exposure parameters, illumination intensity, polarization angle, illumination phase, and three types of observation datums are converged to form an optical self-consistent reference, constructing an optical configuration data and reference image set.

[0009] The present invention is further configured such that the geometry normalization processing module includes: Based on optical configuration data, reference image set and multi-view synchronously acquired images, a spatiotemporal mapping relationship is established. Through epipolar consistency constraints and time micro-bias correction between multiple views, temporal alignment parameters and projection operators are obtained to form a synchronous view set under a unified time scale. Based on the deformation law of packaging film and the structural characteristics of sealing tape, a non-rigid unfolding mapping from physical space to reference plane is constructed. The mapping relationship is solved by surface isometry constraints, curvature continuity constraints and geometric anchor point constraints to generate an unfolding function describing the deformation of film surface. The synchronous view is mapped to the reference plane through the corresponding projection operator and non-rigid unfolding mapping, and the images from different perspectives are fused in the same coordinate domain to form a unified primary standardized detection image through exponential consistency constraints. Gradient consistency and contour continuity constraints are established in the overlapping area of ​​the primary standardized detection image, and cross-viewpoint stitching and boundary consistency correction are performed to generate a standardized detection image with viewpoint consistency and temporal synchronization.

[0010] The present invention is further configured such that forming the enhanced liquid level view, the sealing detail view, and the batch code comparison view includes: The standardized detection image is decomposed according to spectral channels, the energy response difference under different spectral bands is calculated, and a spectral band energy mapping based on gray-level deviation is established to form an energy response set for multi-task enhancement. A liquid level energy model is constructed within the liquid level detection area based on the vertical light intensity gradient and liquid refraction characteristics. The liquid level boundary response is enhanced by exponential gradient integration to generate an enhanced liquid level view. A sealing energy model is constructed within the sealing zone by combining the near-infrared reflection channel. Based on the spatial second-order conduction characteristics, the details of weld lines and microcracks are enhanced to generate a sealing detail view. Within the batch code area, a batch code energy model is constructed based on the difference in character ink density and reflection. Character contour and blurred area features are extracted through gradient distribution constraints to generate a batch code comparison view.

[0011] The present invention is further configured such that the construction of the multi-scale feature layer to generate task feature data includes: A multi-scale feature overlay relationship is established based on three types of feature views: liquid level, sealing, and batch code. A comprehensive feature field with consistent scale is constructed through directional gradient response to achieve scale unification among task features. Energy consistency constraints are constructed on the comprehensive feature field, and energy normalization is performed based on the local light intensity reference field to form a feature metric with balanced energy distribution among tasks. By combining the energy normalization results, the three types of feature views are jointly mapped to form a unified feature set of liquid level enhancement features, sealing detail features and batch code comparison features, thus generating task feature data.

[0012] The present invention is further configured such that the defect discrimination modeling module includes: Based on task characteristic data, a discriminative energy relationship is established. By exponentially integrating the vertical gradient change in the liquid level area, the second-order structural change in the sealing area, and the edge intensity change in the batch code area, liquid level deviation energy, sealing anomaly energy, and batch code clarity energy are formed. Based on three types of discriminative energy, a typified evidence set is constructed. Evidence association is established through the multiplicative coupling of the amplification term of the energy of this type and the deviation term of the energy of the other type, forming typified discriminative evidence of liquid level, sealing and batch code; A self-learning penalty relationship is constructed based on the difference between the energy of normal samples and the energy of rare samples. An exponential penalty factor is formed by the attenuation term of the distance between normal samples and the sensitization term of the distance between rare samples, thereby generating defect sensitization parameters. Based on typified discrimination evidence and defect sensitization parameters, a comprehensive indicator is formed. Threshold judgment is performed on liquid level deviation, sealing abnormality and batch code clarity defects. The defect type and severity level are divided according to the distribution range of the indicator in the preset threshold group.

[0013] The present invention is further configured such that the implementation of the self-learning optimization includes: Based on the discrimination energy of normal and abnormal samples within the detection period, an energy difference relationship is established. An energy difference field between samples is constructed through an exponential bias mapping, forming an energy distance set representing the energy distribution difference. Based on the energy difference field, energy prototypes are generated in the normal sample domain and the abnormal sample domain respectively. The normal prototype energy and the rare prototype energy are formed by exponential weighted integration. The prototype energy reflects the stable region and the abrupt region of energy distribution, and the prototype parameter set is generated. The learning weight factor is updated based on the deviation between the current sample energy and the prototype energy. The learning weight factor is adjusted by the stable term of normal prototype difference and the enhancement term of rare prototype difference, forming an adaptively updated set of weight factors. The energy for judging liquid level, sealing and batch code is corrected based on the updated learning weight factor. The corrected energy is then comprehensively mapped according to the task coupling relationship to form an optimized judgment result.

[0014] The present invention is further configured such that the hierarchical decision analysis module includes: A comprehensive decision-making indication relationship is established based on the optimized liquid level correction energy, sealing correction energy and batch code correction energy. The task-level indication is formed by the multiplicative coupling of the exponential amplification term of this type of energy and the deviation term of the heterogeneous energy. The global decision-making indication is constructed by the product of the three types of task-level indications. A global indicator trajectory is generated within the controlled disturbance trajectory range. The upper bound of uncertainty is calculated based on the exponential deviation relationship between the indicator and the trajectory sample, forming an upper bound metric for determining stability. Candidate defect types are determined based on the maximum value of the task-level indicator. The indicator corresponding to the candidate type is then filtered according to a preset threshold group, and the distribution range of the indicator is divided into first-level, second-level, and third-level intervals. The grade results are constrained by combining the upper bound of uncertainty measurement. When the upper bound of uncertainty is below the threshold, the original grade result is maintained. When the upper bound of uncertainty exceeds the threshold, the review status is marked. According to the grade range, the results are marked as qualified, warning and unqualified grade information respectively to form the final quality grade judgment result.

[0015] The present invention is further configured such that generating sorting plans and grasping trajectories based on grade information to achieve automatic sorting and positioning of qualified and unqualified products includes: Based on standardized detection images and grade information, a spatial mapping relationship from the reference plane to the mechanical base is established. A unified coordinate system is generated through hand-eye calibration mapping and conveyor surface geometric mapping, and the graspable area within the detection area is mapped into a set of candidate poses. Within the detection area, a graspable potential field is constructed based on the bag boundary and the distribution characteristics of the contents. The graspable potential energy distribution is formed by the boundary inner distance, the content gradient and the level partitioning indicator. The candidate pose set is weighted and corrected to form a graspable weighted pose set. By combining the motion trajectory of the robot body with the scene ranging data, the obstacle potential energy relationship is established. The obstacle avoidance constraint potential energy is formed by the minimum distance deviation between the trajectory and the obstacle point, which describes the safe distance constraint between the end effector motion path of the robot arm and the obstacle space. Based on the set of grabbable weighted poses, the joint optimization relationship between the end pose and the trajectory path is solved. The optimal grab trajectory and end pose are determined by constructing an exponential joint cost function through obstacle avoidance potential energy, velocity smoothing term, height constraint term and grabbable potential energy term.

[0016] The present invention is further configured such that the recording of optical reference, geometric mapping, detection results, and sorting action information to form a detection data archive includes: An execution gating factor is constructed based on the level uncertainty metric and the vacuum channel health. The trajectory execution speed is adjusted through the exponential deviation relationship. The optimal trajectory is speed-scaled to form feasible execution instructions. Based on the grade information and the set of storage locations, a sorting cost relationship is established. An allocation cost function is generated by the deviation between the transport coordinates and the storage location coordinates and the deviation of the storage location congestion. The target storage location with the lowest cost is selected from the set of storage locations of the corresponding grade, and the delivery posture is solved to minimize the landing point deviation. The optical configuration, geometric mapping, grasping trajectory, execution parameters, sorting location information and grade results are combined to form a traceability fingerprint set. This set is encoded and an exponential verification identifier is generated to form a traceable detection data archive, which supports production records and remote operation and maintenance processes.

[0017] This invention provides an intelligent inspection system for bagged water packaging based on robot AI vision. The system employs an optical reconstruction control module to construct a reconfigurable illumination and multi-spectral imaging structure. By adjusting illumination intensity, polarization angle, and exposure time, an illumination-camera self-consistent reference is established, enabling consistent control of the optical states of the bagged water surface reflection, liquid surface refraction, and batch code area, generating optical reference data. A geometric normalization processing module performs spatial geometric normalization based on the optical reference data and multi-view synchronously acquired images. It establishes a spatial unfolding mapping based on the deformation law of the packaging material film and the structural characteristics of the sealing strip, generating standardized inspection images. A task enhancement construction module enhances three types of tasks—liquid level, sealing, and batch code—based on the standardized inspection images, forming an enhanced liquid level view, a detailed sealing view, and a batch code comparison view. Multi-scale feature layers are constructed through spectral response, near-infrared reflection, and surface texture differences, generating task feature data. The defect discrimination modeling module establishes defect discrimination energy relationships based on task feature data, generating identification results for defects such as liquid level deviation, sealing anomalies, and batch code clarity, and outputs discrimination information including defect type and severity level. The self-learning optimization module constructs a prototype metric relationship based on the energy difference between normal and abnormal samples, forming a rare defect sensitization mechanism, adaptively updating the detection model, and generating optimized discrimination results. The grade decision analysis module constructs comprehensive decision indicators based on the optimized discrimination results, combines grade thresholds and uncertainty constraints to perform quality grade judgment, and generates qualified, warning, and unqualified grade information. The robot execution and traceability module generates sorting plans and grasping trajectories based on grade information, achieving automatic diversion and positioning of qualified and unqualified products, recording optical references, geometric mappings, detection results, and sorting action information to form a detection data archive. The beneficial effects include: 1. Improved optical self-consistency and imaging stability: By constructing an optical reconstruction system for reconfigurable illumination and multi-spectral imaging, adaptive control of the optical state of the bagged water surface reflection, liquid surface refraction and batch code area is achieved, which significantly improves the imaging consistency and detection stability under different packaging materials and ambient light conditions. 2. Multi-task fusion and self-learning detection enhancement: Through the collaborative processing mechanism of geometric normalization, task enhancement, energy discrimination and self-learning optimization, multi-task feature fusion and dynamic sensitivity enhancement of liquid level, sealing and batch code are formed to realize high-sensitivity identification of rare defects and adaptive updating of detection model, thereby improving the detection accuracy and robustness of the system. 3. Intelligent sorting and traceability closed-loop control: Through a closed-loop structure of hierarchical decision-making and robot execution traceability, the detection judgment results and sorting execution actions are linked in real time to generate traceable detection data archives. This establishes a full-process intelligent control system from optical acquisition and judgment decision-making to automatic sorting, enhancing the automation level and quality traceability of the production line.

[0018] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 The flowchart illustrates an intelligent inspection system for bagged water packaging based on robot AI vision, as an exemplary embodiment of the present invention. Detailed Implementation

[0020] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0021] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0022] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0023] Example 1: An intelligent inspection system for bagged water packaging based on robot AI vision, such as Figure 1 As shown, it includes: The optical reconstruction control module constructs a reconfigurable illumination and multi-spectral imaging structure. By adjusting the illumination intensity, polarization angle, and exposure time, it forms an illumination-camera self-consistent reference, establishes consistent control over the optical state of the bagged water surface reflection, liquid surface refraction, and batch code area, and generates optical reference data. The geometric normalization processing module performs spatial geometric normalization based on optical reference data and multi-view synchronously acquired images. It establishes a spatial unfolding mapping based on the deformation law of the packaging material film and the structural characteristics of the sealing tape to generate standardized inspection images. The task enhancement module enhances three types of tasks—liquid level, sealing, and batch code—based on standardized detection images, forming an enhanced liquid level view, a detailed sealing view, and a comparative batch code view. It constructs a multi-scale feature layer through spectral response, near-infrared reflection, and surface texture differences to generate task feature data. The defect discrimination modeling module establishes the defect discrimination energy relationship based on task feature data, and generates identification results for liquid level deviation, sealing abnormality and batch code clarity defects, outputting discrimination information including defect type and severity level; The self-learning optimization module constructs a prototype metric relationship based on the energy difference between normal and abnormal samples, forms a rare defect sensitization mechanism, performs adaptive updates to the detection model, and generates optimized discrimination results. The grade decision analysis module constructs a comprehensive decision index based on the optimized discrimination results, combines grade thresholds and uncertainty constraints to perform quality grade judgment, and generates qualified, warning and unqualified grade information. The robot execution and traceability module generates sorting plans and grasping trajectories based on grade information, realizes automatic diversion and positioning of qualified and unqualified products, records optical reference, geometric mapping, detection results and sorting action information, and forms a detection data archive.

[0024] The present invention is further configured such that the implementation of the optical reconstruction control includes: The process involves initializing the spectral bands and polarization channels, acquiring parallel and cross-polarized image signals for each spectral band in the calibration plate area, and constructing a specular residual baseline based on light intensity differences to generate reflection difference data. Specifically, under constant ambient light conditions, the calibration plate is placed at the reference position on the transport surface, and two sets of images are acquired sequentially according to the preset spectral bands, representing parallel polarization and cross-polarization, respectively. For each spectral band, the absolute value of the grayscale difference between the two sets of images is calculated pixel-by-pixel within the calibration area to obtain a pixel-level specular difference map. Subsequently, this map is exponentially weighted and accumulated pixel-by-pixel, with the weights increasing rapidly as the grayscale difference increases. The accumulated result yields the specular residual baseline for that spectral band. After completing the residual calculation for all spectral bands, a set of calibrated reflection difference data is obtained. Exposure time and illumination intensity are jointly tuned based on reflection difference data. A brightness homogeneity constraint is constructed in the reference area of ​​the batch code and the neighborhood of the sealing strip. Stable exposure and illumination reference parameters are obtained by minimizing the joint index of brightness deviation and specular residual. Specifically, with the polarization device fixed at the initial angle, a reference area and a neighborhood area corresponding to the batch code and sealing strip are selected. Discrete search tables are constructed from the two dimensions of exposure time and illumination intensity. For each set of parameters in the search table, an image is acquired, and the absolute value of the grayscale deviation from the target brightness template is calculated pixel by pixel within the reference area. The values ​​are then exponentially weighted and accumulated to obtain a brightness consistency measure. Simultaneously, the specular residual baseline obtained in step one is called, and the specular difference maps at the same location are exponentially weighted and accumulated to obtain a specular suppression measure. The two measures are multiplied to form a joint index. The parameter group with the smallest joint index is selected from the entire search table as the stable exposure and illumination reference parameters. If the image corresponding to the minimum value is saturated or too dark in the reference area, it is automatically discarded, and the parameter corresponding to the second smallest value is selected until saturation is eliminated and grayscale distribution is complete. Based on the obtained parameters, the polarization angle is fine-tuned. Images are acquired in the selected spectral band according to the angle sequence. The mirror suppression angle is determined according to the principle of minimizing gradient perturbation, forming a polarization setting that suppresses reflection and maintains boundary sharpness. Specifically, based on the obtained stable exposure and illumination reference parameters, a fixed spectral band is used as the reference spectral band, and a discrete sequence of polarization angles is set for angle scanning. For each angle, images are acquired, and the absolute values ​​of the first-order gradients in the horizontal and vertical directions are calculated pixel by pixel in the full-frame area. The maximum value of the gradients in the two directions is taken to form a gradient perturbation map. Then, the map is exponentially weighted and accumulated to obtain the perturbation measure of the angle. The perturbation measure is multiplied by the mirror residual baseline of the corresponding spectral band to obtain the angle evaluation value. The angle with the smallest evaluation value is selected as the mirror suppression angle. If the rate of change of the evaluation value between two adjacent angles is too high, an intermediate angle is inserted between the two for a second scan until the evaluation value curve is smooth and the minimum position is stable. Structured illumination phase adjustment is performed based on the sealing strip path. By constraining gradient continuity and texture smoothness, an illumination phase that maintains uniform sealing texture is selected, generating a phase setting that enhances sealing details. Specifically, structured illumination is enabled and a phase discrete sequence is set for scanning. For each phase image, the absolute value of the first-order gradient along the path tangent is calculated pixel by pixel in the neighborhood of the sealing strip path and exponentially weighted to obtain a gradient continuity metric. Simultaneously, the absolute value of the second-order difference is calculated in the same neighborhood and exponentially weighted to obtain a texture smoothness metric. The reciprocal of the continuity metric plus one is multiplied by the smoothness metric to obtain the phase evaluation value. The phase with the smallest evaluation value is selected as the sealing detail phase setting. If there are strong scattering points in the sealing neighborhood that cause an abnormal increase in the second-order difference, an upper quantile truncation is applied in this local area to ensure that the evaluation value is not overly sensitive to isolated anomalies. The optimal spectral bands are selected for the three detection tasks: liquid level, sealing, and batch code. Polarization demixing is performed on the images of each spectral band to generate liquid level observation base plane, sealing observation base plane, and batch code observation base plane, forming a multi-task optical response set. Specifically, for the three tasks of liquid level, sealing, and batch code, selections are made from the candidate spectral band set. For each candidate spectral segment, cross-polarized and parallel-polarized images are acquired, and the linear combination of the two is calculated pixel by pixel to suppress specular components and retain diffuse reflection components. The coefficients are determined by scanning a small-range discrete table: in the liquid level region, the exponentially weighted sum of the vertical gradient is the priority index; in the sealing region, the exponentially weighted sum of the second difference is the priority index; in the batch code region, the exponentially weighted sum of the character edge gradient and the contrast residual is the priority index. For the three types of tasks, the spectral segment with the smallest priority index and the corresponding linear combination coefficient are selected to obtain the liquid level observation base, sealing observation base, and batch code observation base. If the indices of different spectral segments are close, the spectral segment with higher repeatability in adjacent batches is selected first. Repeatability is evaluated offline by replacing the stability score table in the measurement with the variance of the index of historical batches. Exposure parameters, illumination intensity, polarization angle, illumination phase, and three types of observation datums are converged to form an optical self-consistent benchmark, constructing an optical configuration data and benchmark image set. Specifically, exposure time, illumination intensity, polarization angle, illumination phase, and the three types of observation datums are converged into a reusable optical configuration and benchmark image set. The above-mentioned metrics are dimensionless to make them comparable on a uniform scale. The total quality score is generated in the following order: the brightness consistency metric, specular suppression metric, gradient perturbation metric, and phase evaluation value are multiplied sequentially to obtain the basic optical quality score; then the priority indicators of the three types of observation datums are multiplied sequentially to obtain the task quality score; finally, the product of the basic optical quality score and the task quality score is used as the total score. If the total score is lower than the first threshold of the predetermined threshold group, the current configuration is directly fixed as the optical self-consistent benchmark. If it is between the first and second thresholds, only a local fine-tuning scan is performed on the polarization angle and phase near the current optimal value, and the above evaluation is repeated. If it is higher than the second threshold, the process reverts to step two to expand the search range of exposure and illumination and readjust. The threshold group includes the first and second thresholds, which are determined by the quality score distribution of historical batches and are set using the quantile truncation method to avoid extreme samples affecting the fixed configuration. The configuration and the three types of observation base planes are defined together as the optical configuration data and benchmark image set, and recorded in the traceability file for reuse and comparison in subsequent batches.

[0025] The present invention is further configured such that the geometry normalization processing module includes: A spatiotemporal mapping relationship is established based on optical configuration data, a reference image set, and synchronously acquired images from multiple perspectives. Temporal alignment parameters and projection operators are obtained through epipolar consistency constraints and temporal micro-bias corrections between multiple perspectives, forming a synchronized view set at a unified time scale. Specifically, under a fixed optical configuration, a sequence of images is synchronously acquired from multiple fixed perspectives. First, in the overlapping region of each pair of perspectives, grayscale change curves are extracted along the epipolar direction, and a one-dimensional gradient sequence is obtained using the difference between adjacent pixels. Then, a small temporal offset scan is performed on adjacent frames of the same scene along the time axis. The absolute value of the point-by-point difference between the epipolar gradient sequences corresponding to the two perspectives is calculated for each offset, and an exponentially weighted cumulative score is obtained for the entire epipolar line. The cumulative scores of all epipolar lines are multiplicatively aggregated to obtain a global consistency index at that time offset. The time offset with the smallest index is selected from the discrete offset table as the temporal alignment parameter. Subsequently, standard targets and workstation markers are used to establish the projection relationship from each viewpoint to the reference plane. The convergence is determined by the exponential weighted accumulation of the corner reprojection error until the error no longer decreases after three consecutive iterations, at which point the projection operator is solidified, and the output is a multi-view synchronous view set at a unified time scale. Based on the deformation characteristics of packaging films and the structural features of sealing strips, a non-rigid unfolding mapping from physical space to a reference plane is constructed. Surface isometry constraints, curvature continuity constraints, and geometric anchor point constraints are used to jointly solve the mapping relationship, generating an unfolding function describing the film surface deformation. Specifically, for potential undulations, wrinkles, and slight stretching of the packaging film, three types of constraints are used to jointly solve the non-rigid mapping from the physical surface to the reference plane. The first type of constraint is area stability: the image is divided into several small blocks, and the area change ratio of each block before and after mapping is statistically analyzed. The change ratio is required to be as close to a unit value as possible, and the deviation is exponentially amplified and accumulated to form an area constraint score. The second type of constraint is curvature continuity: along the center path of the sealing strip and its neighborhood, the second-order rate of change of grayscale along the path is calculated. The second-order rate of change of the corresponding path after mapping is required to not show abrupt changes. Similarly, the deviation is exponentially amplified and accumulated to form a curvature constraint score. The third type of constraint is geometric anchor point consistency: Feature points that can be repeatedly located, such as bag corners, intersections of folded lines, and positioning holes, are selected. The deviation between the target position and the mapped position of these points on the reference plane is required to be as small as possible. The deviation is then exponentially amplified and accumulated to form the anchor point constraint score. The three types of scores are combined multiplicatively, and an iterative solver updates the parameters round by round starting from the initial mapping. In each round, it is checked whether the scores of the three types are continuously decreasing. The iteration stops when the decrease is less than a preset proportion for several consecutive rounds, or when the total score drops below a threshold, resulting in the final non-rigid expansion function. The synchronized views are mapped to the reference plane using corresponding projection operators and non-rigid unfolding mapping. Images from different perspectives are fused in the same coordinate domain, forming a unified primary normalized detection image through exponential consistency constraints. Specifically, each view in the synchronized view set is first mapped to the reference plane according to its extrinsic parameters, and then compensated using a non-rigid unfolding function to obtain multiple unfolded images located on the same plane. To form a single primary normalized image, a consistency-driven fusion strategy is adopted: starting from a blank canvas on the reference plane, the values ​​of all unfolded images at that pixel position are collected, the absolute deviations between these values ​​and the current canvas pixel values ​​are calculated, and the deviations are amplified exponentially and accumulated to form the cost at that pixel position. Two updates are alternately performed on all pixels: the first step fixes the canvas and evaluates the cost of each view; the second step selects the view value that causes the fastest cost reduction at each pixel position to replace the current canvas value, while suppressing updates for pixels with excessively large changes. This process is repeated several times until the total cost of the entire image decreases to a stable level, at which point the update stops, resulting in the primary normalized image. Gradient consistency and contour continuity constraints are established in the overlapping region of the primary normalized detection image. Cross-view stitching and boundary consistency correction are performed to generate a normalized detection image with view consistency and temporal synchronization. Specifically, between the primary normalized image and each unfolded image, all overlapping regions of the views are extracted, and two types of consistency constraints are established one by one. The first type is gradient consistency: the gradient is calculated along the main and secondary directions of the overlapping zone, and the gradient difference between the primary normalized image and each unfolded image at the same position is exponentially amplified and accumulated as the gradient inconsistency score of the overlapping zone; for local regions with scores higher than the threshold, linear correction of local gain and bias is used to rapidly reduce the gradient difference. The second type is contour continuity: significant boundaries are extracted within the overlapping zone and fitted as continuous curves. The curve shape differences between the primary normalized image and each unfolded image are compared, and the regions with large differences are locally resampled and re-interpolated to keep the curve direction smooth at the stitching point. The two types of constraints mentioned above are executed iteratively in blocks: each round first performs gradient consistency correction, then contour continuity correction, and then re-evaluates residual differences; when the residual decreases by a preset proportion for several consecutive rounds or the residuals of all overlapping bands are below the threshold, the stitching ends. Finally, consistency backfilling is performed once in the boundary region of the entire image to ensure a natural transition of the reference plane boundary, and the final standardized detection image is output.

[0026] The present invention is further configured such that forming the enhanced liquid level view, the sealing detail view, and the batch code comparison view includes: The standardized detection image is decomposed by spectral channel, and the energy response differences under different spectral bands are calculated. A spectral energy mapping based on gray-level deviation is established to form an energy response set for multi-task enhancement. Specifically, after the standardized detection image is fixed, multiple preset spectral channels are sequentially activated for acquisition. For each channel, the corresponding brightness reference template is first loaded, and the gray-level deviation from the template is calculated pixel by pixel across the entire image. The deviation is fed into a nonlinear amplification stage with increasing weights, so that the greater the deviation, the higher the weight. Then, it is accumulated within a sliding window with a side length of several pixels to obtain the energy response map of that channel. After completing all channels, based on the peak position and stability score of the channel response, an energy response set for three types of tasks is generated, where liquid level is biased towards visible channels or short-wave near-infrared, sealing is biased towards near-infrared, and batch code is biased towards visible high-contrast channels. Within the liquid level detection area, a liquid level energy model is constructed based on the vertical light intensity gradient and liquid refraction characteristics. An exponential gradient integral is used to enhance the liquid level boundary response, generating an enhanced liquid level view. Specifically, within the liquid level detection area, the system scans column by column along the vertical direction. For each column, the intensity of grayscale changes between adjacent pixels is first calculated to obtain a gradient curve that varies with height. Then, the cumulative response is calculated from top to bottom on this curve using a fixed-length window; the closer the window is to the candidate liquid level position, the more likely it is to show a sudden increase. To suppress local noise, a threshold group is set for the response growth rate of consecutive windows in each column. Only when the growth rate continuously exceeds the lower limit of the threshold group without triggering the upper limit is it marked as a candidate liquid level band. Subsequently, connectivity checks are performed between columns, eliminating segments that are too short or have excessively large curvature abrupt changes. The retained segments are refined using the response ratio of adjacent rows as the refinement criterion; the closer the response ratio is to one, the more stable the position. Connect the stable positions of each column and apply enhancement gain within a certain number of pixels above and below them to form a liquid level enhancement view; apply a suppression coefficient to the non-candidate regions of the enhancement view to keep the responses of the upper and lower liquid and gas phase regions separable; Within the sealing zone, a sealing energy model is constructed using a near-infrared reflection channel. Based on the spatial second-order conduction characteristics, weld and microcrack details are enhanced to generate a sealing detail view. Specifically, within the sealing zone, the energy response map of the near-infrared channel is prioritized. Equidistant sampling bands are established horizontally along the sealing direction. Two levels of measurement are applied to each sampling band: the first level measures the first-order intensity variation, highlighting the brightness fluctuations of the hot-melt texture; the second level measures the rate of change between adjacent intensity variations, highlighting the weld rhythm and sharp transitions of microcracks. The two levels of measurement are gated sequentially; only sections where the first-level measurement exceeds the lower limit but not the upper limit are evaluated in the second level. Subsequently, periodic consistency is checked across the entire sealing zone: a fixed-length sliding window statistically analyzes the discrete distribution of texture peak-valley spacing. If the distribution is concentrated in a single or few spacings, it is considered a rhythmic stability region. A higher detail preservation gain is assigned to stable regions, while an anomaly indication gain is assigned to unstable regions. To avoid misjudgments caused by material stretching, boundary buffer zones are introduced at the sealing ends and transition points to reduce measurement sensitivity. Mapping the above gain distribution back to the pixel level yields a detailed view of the seal, where continuous weld lines exhibit a balanced high response, while microcracks and poor weld lines exhibit localized high-response spots. Within the batch code area, a batch code energy model is constructed based on the differences in character ink density and reflection. Character contour and blurred area features are extracted using gradient distribution constraints to generate a batch code comparison view. Specifically, within the batch code area, character row bands and character column bands are first located based on the layout template. For each character row band, the increase / decrease in grayscale intensity is calculated along the row direction to form an intensity change curve. Pairs of steep edges appearing in the rising and falling segments of the curve are identified, and the area between these edges is marked as a candidate character body. The contrast difference between the candidate area and the background is calculated; if the contrast difference is below the lower limit of the threshold group, it is marked as a blurred area. To mitigate the breaks caused by uneven ink distribution, narrowband connectivity repair is used: a connected band only one to two pixels wide is set on each side of each candidate character. If continuous edge fragments exist within the two side bands and are within a limited distance from the main body, they are incorporated into the main body. For areas with ghosting, the intensity change phase difference of the intersecting rows is used for filtering, eliminating duplicate edges with the same phase. Finally, the high-contrast subject is presented with a higher gain, the blurred area is presented with an abnormal gain, and the background is suppressed with a lower coefficient to generate a batch code comparison view.

[0027] The present invention is further configured such that the construction of the multi-scale feature layer to generate task feature data includes: A multi-scale feature overlay relationship is established based on three feature views: liquid level, sealing, and batch code. A comprehensive feature field with consistent scale is constructed through directional gradient responses to achieve scale uniformity among task features. Specifically, a multi-level pyramid, from fine to coarse, is established based on the enhanced liquid level view, the detailed sealing view, and the comparative batch code view. Each level is obtained through downsampling and mild smoothing, with the smoothing intensity increasing with the level. For each level, directional gradient responses are extracted according to the main task direction: liquid level is mainly vertical, sealing is mainly horizontal, and batch codes consider both horizontal and vertical directions. Within the same scale, the three types of directional responses are respectively subjected to threshold gating: responses below the first threshold are set to zero, responses between the first and second thresholds are boosted by a gradual growth curve, and responses above the second threshold are suppressed by a gradual saturation curve to avoid peak dominance. Subsequently, pixel-by-pixel competition and cooperation are performed within this scale: when the response of a certain task at a pixel position is significantly higher than the other two types, it is marked as the dominant task; when the three types of responses are similar, they are marked as cooperative regions. Strong response preservation is applied to the dominant regions, and a balancing boost is applied to the cooperative regions. After completing all scales, a backtracking fusion process is performed from coarse to fine: the dominant and cooperative labels determined at the coarser scales are used as priors, while only minor rewriting is allowed at the finer scales to ensure stable transmission of structure and texture. This results in a comprehensive feature field with a uniform metric across the entire image. Energy consistency constraints are constructed on the comprehensive feature field, and energy normalization is performed based on the local light intensity reference field to form a feature metric for balanced energy distribution among tasks. Specifically, to address the local imbalance in the comprehensive feature field, energy consistency constraints are constructed in units of small windows. First, the entire map is divided into non-overlapping small grid blocks. For each grid block, the response distribution positions of the three tasks within that block are statistically analyzed (using a combination of quantile positions and extreme value constraints, independent of mean or variance), obtaining the local energy reference for that block. Then, the responses of the three types of tasks are normalized and mapped within the same grid block: if a task's overall response is low within the block, it is increased along a monotonic curve without changing the local ranking; if it is high, it is compressed along a monotonic curve; if abnormal peaks appear at both ends of the distribution, soft truncation is performed on the peak region before mapping. To avoid discontinuities between blocks, a buffered transition process is performed on the common boundary of adjacent grids: the mapping curves of the two grids within the edge band are smoothly spliced ​​according to distance weights, keeping the cross-block response changes slow. After normalization, the responses of the three types of tasks are constrained to a comparable interval, forming a characteristic metric for balanced energy distribution among tasks. By combining the energy normalization results, a joint mapping is performed on the three types of feature views to form a unified feature set of liquid level enhancement features, sealing detail features, and batch code comparison features, generating task feature data. Specifically, after normalization, a joint mapping is performed on the three types of views to generate the final feature set. First, the corresponding values ​​of the three types of normalized responses and the comprehensive feature field are collected at each pixel position, and a pixel-by-pixel mapping rule is established: when the liquid level is dominant at this position and the comprehensive feature field displays in the same direction, the liquid level response is recorded as a liquid level feature; when the sealing is dominant at this position and the rhythm detection is in a stable region, the sealing response is recorded as a sealing feature; when the batch code is dominant at this position and the edges appear in pairs, the batch code response is recorded as a batch code feature; when collaboration occurs, tasks are stacked according to the prior order, which is set by the scenario (e.g., sealing stability first, then liquid level, then batch code), and during the stacking process, tasks added later are only allowed to take effect in uncovered low-confidence regions. A spatial consistency check is then performed: for the feature map of each task, isolated points and single-pixel spikes are removed within a small connected region, and narrow gaps are repaired according to narrow-band rules. Finally, intensity capping is applied to the features of the three types of tasks to prevent local abnormal regions from being over-amplified in subsequent discrimination. Liquid level features, sealing features, and batch code features are packaged into a unified feature set.

[0028] The present invention is further configured such that the defect discrimination modeling module includes: Based on task feature data, a discriminative energy relationship is established. By performing exponential integration on the vertical gradient change in the liquid level area, the second-order structural change in the sealing area, and the edge intensity change in the batch code area, liquid level deviation energy, sealing anomaly energy, and batch code clarity energy are formed. Specifically, the corresponding discriminative energy is calculated based on the three types of feature maps: liquid level, sealing, and batch code. The calculation of liquid level deviation energy is performed column-wise: the absolute magnitude of the difference between adjacent pixels is calculated along the vertical direction to obtain a gradient curve that varies with height; the gradient intensity is accumulated from top to bottom on each curve using a sliding window of fixed length, while the distance deviation from the nominal liquid level height is recorded. The accumulated result is amplified by a nonlinear factor that increases rapidly with the increase of deviation to obtain the liquid level energy of that column. Then, all columns are summed to obtain the total liquid level energy. The calculation of sealing anomaly energy is performed according to the sealing direction: the intensity is approximated by a second difference in the horizontal direction to obtain a structural change sequence that is more sensitive to weld undulations and microcracks; these change values ​​are accumulated along the direction using a fixed-length window within the sealing zone, and a rapidly increasing nonlinear weight is applied to the deviation part with the material stability zone as a reference, and the total sealing energy is obtained by summing. The calculation of batch code clarity energy is performed simultaneously in the character row zone and character column zone: the edge intensity is extracted first, then the contrast difference and stroke continuity are statistically analyzed between the positions where the edges appear in pairs, an amplification factor is applied to the insufficient contrast and edge breakage, and finally, the total batch code energy is accumulated within all character grids. After the three types of energy are obtained, an energy triplet is formed for subsequent judgments. A typified evidence set is constructed based on three types of discriminative energy. Evidence correlation is established through the multiplicative coupling of the amplification term of the energy of the current type and the deviation term of the energy of the opposite type, forming typified discriminative evidence for liquid level, sealing, and batch code. Specifically, corresponding typified evidence is constructed according to the three types of discriminative energy. For any type, the energy of the current type is first amplified through a rapidly increasing monotonically nonlinear mapping. Then, the deviation of the other two types of energy relative to the reference constant is introduced as a suppression or corroboration term: when the energy of the opposite type is close to the reference constant, only weak suppression is provided; when there is a significant deviation, strong suppression or strong corroboration is provided. The three terms are coupled multiplicatively to obtain three typified evidence curves, representing the evidence strength of liquid level, sealing, and batch code, respectively. This coupling process remains consistent batch by batch, allowing anomalies from different sources to be compared on the same scale. A self-learning penalty relationship is constructed based on the difference between the energy of normal samples and the energy of rare samples. An exponential penalty factor is formed by combining a decay term for the distance to normal samples and a sensitization term for the distance to rare samples, generating a defect sensitization parameter. Specifically, to enhance sensitivity to rare defects, two sets of reference energies are introduced: normal sample prototypes and rare sample prototypes. First, normal prototypes are offline solidified in historical qualified batches according to the typical distribution of the three energy types. Then, rare prototypes are solidified in labeled rare samples or synthetic samples. During online detection, the distance metric between the current three energy types and the normal prototype is calculated; the smaller the distance, the weaker the penalty. Simultaneously, the distance metric between the current energy type and all rare prototypes is calculated; the smaller the distance, the stronger the sensitization. These two are combined into a monotonically increasing penalty factor: in regions close to normal prototypes, this factor approaches a unit value; in regions close to any rare prototype, this factor increases significantly. Subsequently, this factor is multiplied one by one by the three typified pieces of evidence to obtain the sensitized evidence strength, which is used to amplify the distinguishability of rare defects and suppress normal perturbations. A comprehensive indicator is generated based on typified discriminative evidence and defect sensitization parameters. Threshold judgments are performed on defects such as liquid level deviation, sealing abnormalities, and batch code clarity. The defect type and severity level are classified according to the distribution range of the indicator within a preset threshold group. Specifically, the maximum values ​​of the three sensitized pieces of evidence are compared, and the category corresponding to the largest value is taken as the candidate type; simultaneously, the evidence strength of this category is used as the comprehensive indicator. To determine the severity level, a threshold group consisting of two levels is set: when the comprehensive indicator does not exceed the first threshold, it is classified as Level 1; when it is between the first and second thresholds, it is classified as Level 2; and when it exceeds the second threshold, it is classified as Level 3. If the system provides an uncertainty metric, an additional constraint is added after the above judgment: when the uncertainty is higher than a preset threshold, the sample is marked as requiring review, and the original judgment result is retained for review. Finally, the candidate type and severity level are output.

[0029] The present invention is further configured such that the implementation of the self-learning optimization includes: An energy difference relationship is established based on the discriminant energy of normal and abnormal samples within a detection cycle. An energy difference field between samples is constructed through an exponential deviation mapping, forming an energy distance set representing the energy distribution difference. Specifically, within a complete detection cycle, sets of samples labeled as normal and those labeled as abnormal are collected, and the discriminant energies for liquid level, sealing, and batch code are read respectively. For any two samples, the absolute deviation of the three energy types is first calculated separately. Then, the three deviations are fed into the same monotonically increasing nonlinear amplification curve, so that smaller deviations are slightly amplified and larger deviations are rapidly amplified. Subsequently, the three amplification results are synthesized multiplicatively to obtain the energy distance between the sample pair. This process iterates through all sample pairs within the cycle, generating an energy distance set describing the overall distribution difference. Simultaneously, the sum of the distances between each sample and all other samples is accumulated and used as a dispersion index for that sample in the energy space. Energy prototypes are generated in both the normal and abnormal sample domains based on the energy difference field. Exponential weighted integration is used to form normal prototype energy and rare prototype energy. The prototype energy reflects the stable and abrupt regions of energy distribution, generating a prototype parameter set. Specifically, based on the energy distance set, two types of prototypes are generated in the normal and abnormal domains respectively. First, in the normal domain, samples with the lowest dispersion are included sequentially from low to high. For each included sample, its three energy types are multiplied by a non-linear weight that starts slowly and then accelerates. This multiplication is then performed within a fixed-size neighborhood to gradually form a stable energy profile. Accumulation stops when the incremental contribution falls below the lower limit of the threshold group and persists for several times, solidifying it into a normal prototype. Then, in the abnormal domain, starting with the sample with the highest dispersion and high labeling confidence, a rare prototype is generated using the same process as in the normal domain. However, a steeper growth segment is set in the weight curve for the high deviation interval, making the prototype more sensitive to energy abrupt changes. Finally, a set of normal prototype parameters and a set of rare prototype parameters are obtained, and their effective range and update timestamp are recorded as the benchmark for online updates; The learning weight factor is updated based on the deviation between the current sample energy and the prototype energy. The learning weight factor is adjusted by combining the stabilizing term of the normal prototype difference and the enhancing term of the rare prototype difference, forming an adaptively updated set of weight factors. Specifically, when a new sample enters the discrimination process, its three-class discrimination energy is read, and deviations are evaluated against the normal prototype and the rare prototype, respectively. For the normal prototype, a penalty curve is used, gradually increasing in intensity: only minor adjustments are made in the insufficient deviation range, and moderate adjustments are made in the gradually increasing deviation range. For the rare prototype, a steeper initial sensitivity enhancement curve is used, rapidly amplifying once it enters the approach range. The outputs of the two curves are multiplicatively combined into a learning weight factor, with upper and lower limits set to prevent over-amplification or over-suppression. This weight factor takes effect at the channel granularity, corresponding to the liquid level channel, sealing channel, and batch code channel, respectively. The trajectory of the weight factor over time is recorded. If a single-channel weight factor continuously increases within a series of samples, a fine-tuning process is triggered, expanding the effective range of the prototype or updating the prototype timestamp to improve adaptability to new distributions. The energy for distinguishing liquid level, sealing, and batch codes is corrected based on the updated learning weight factors. The corrected energy is then comprehensively mapped according to the task coupling relationship to form an optimized discrimination result. Specifically, the learning weight factors are mapped to the three types of discrimination energy in the current sample. The mapping is achieved using monotonically amplified or monotonically scaled methods: when the weight factor is close to the unit value, only a very small adjustment is made; when the weight factor is higher than the unit value, the energy is amplified along a set curve; when the weight factor is lower than the unit value, the energy is scaled along a set curve. The three types of corrected energy are synthesized into a comprehensive indicator in a predetermined coupling order: the channel related to the main risk is placed first, followed by the superposition of the inhibition or corroboration terms of the other channels; the synthesis process maintains a multiplicative structure within the sample to avoid linear cancellation. After obtaining the comprehensive indicator, it enters the threshold group judgment: if the comprehensive indicator does not exceed the first threshold, it is marked as Level 1; if it is between the first and second thresholds, it is marked as Level 2; if it exceeds the second threshold, it is marked as Level 3. If the system has an uncertainty metric, an additional stability screening is performed after the threshold group determination: when the uncertainty exceeds the set threshold, a verification mark is added to the sample and the current level result is retained. The final optimized discrimination result is output, and the corrected energy, learning weight factor, and level result of this sample are written to the traceability record.

[0030] The present invention is further configured such that the hierarchical decision analysis module includes: A comprehensive decision-making indication relationship is established based on the optimized liquid level correction energy, sealing correction energy, and batch code correction energy. A task-level indication is formed through the multiplicative coupling of the exponential amplification term of this type of energy and the deviation term of the dissimilar energy. A global decision-making indication is then constructed by multiplying the three types of task-level indications. Specifically, after self-learning optimization, the liquid level correction energy, sealing correction energy, and batch code correction energy are read separately. For any task, the correction energy for this task is first fed into a monotonically increasing nonlinear amplification curve, allowing for a slow increase in low and medium intensity and a rapid increase in high intensity. Then, the deviation of the other two correction energies relative to their respective reference constants is calculated; smaller deviations result in weaker suppression, while larger deviations result in stronger suppression. The amplification term and the two deviation suppressions are coupled multiplicatively to obtain the indication for this task. After the three types of tasks are completed sequentially, a global indication is generated through multiplicative coupling, serving as the core metric for stability assessment and level selection. To avoid extreme anomalies dominating, an upper limit cap and a lower limit start / stop range are set: indications below the start / stop lower limit do not participate in subsequent multiplication, while indications above the upper limit are compressed before coupling. A global indicator trajectory is generated within the controlled perturbation trajectory range. An upper bound on the uncertainty is calculated based on the exponential deviation relationship between the indicator and the trajectory samples, forming an upper bound metric for determining stability. Specifically, a set of controlled perturbation trajectories is established around the current sample. The perturbation objects include illumination intensity, exposure time, polarization angle, small geometric registration micro-offset, and temperature scaling factors for three types of energy correction. Each perturbation is assigned a value at discrete points with a small amplitude, and the global indicator is recalculated one by one, forming an indicator trajectory that progresses with the perturbation. The deviation from the original global indicator is then calculated on the trajectory: smaller deviations are assigned lower weights, and larger deviations are assigned higher weights. This deviation is accumulated sequentially according to the trajectory to obtain a single upper bound on the uncertainty. To suppress the influence of individual anomalous perturbations, soft truncation is applied to the extreme points at both ends of the trajectory, retaining only the accumulated contribution of the intermediate stable interval. When the trajectory density is insufficient, the perturbation points are automatically expanded and re-evaluated until the trajectory coverage meets the minimum length requirement. Candidate defect types are determined based on the maximum value of the task-level indicator. The indicator values ​​corresponding to each candidate type are then filtered according to a preset threshold group, dividing the indicator distribution range into first-level, second-level, and third-level intervals. Specifically, the largest value among the three types of task indicator values ​​is selected as the candidate type, and its task indicator value is used as the basis for level determination. The level threshold group is offline fixed from the statistical results of historical stable batches, and a two-level boundary is set using a quantile truncation method. The determination process is executed according to interval filtering: when the task indicator value does not exceed the first boundary, it is classified into the first-level interval; when it is between the two level boundaries, it is classified into the second-level interval; and when it exceeds the second boundary, it is classified into the third-level interval. If the difference between the candidate type and the second largest indicator value is too small, it is recorded as a proximity competition situation, and competition pair information is attached to the traceability file for review and reference. Constraints are applied to the grade results using an upper bound measurement of uncertainty. When the upper bound of uncertainty is below a threshold, the original grade result is maintained. When the upper bound of uncertainty exceeds the threshold, a review status is indicated. Based on the grade range, the results are labeled as qualified, warning, and unqualified, forming the final quality grade judgment result. Specifically, the associated constraints between the upper bound of uncertainty and the grade threshold are read. When the upper bound of uncertainty is not higher than the constraint threshold, the grade obtained in step three is maintained. When the upper bound of uncertainty exceeds the constraint threshold, a review mark is added to the sample, and a priority queue for low-speed handling and manual sampling is triggered in the execution and traceability process. Level 1 is mapped to qualified, Level 2 to warning, and Level 3 to unqualified. The type label, grade label, global indicator, upper bound of uncertainty, competition pair information, and timestamp are written simultaneously to complete the generation and archiving of the final quality grade judgment result.

[0031] The present invention is further configured such that generating sorting plans and grasping trajectories based on grade information to achieve automatic sorting and positioning of qualified and unqualified products includes: Based on standardized inspection images and grade information, a spatial mapping relationship from the reference plane to the mechanical base is established. A unified coordinate system is generated through hand-eye calibration mapping and conveyor surface geometric mapping, mapping the graspable area within the inspection area into a set of candidate poses. Specifically, under the triggering of the production line cycle, standardized inspection images and corresponding grade information are read. First, the geometric alignment from the camera to the conveyor surface is completed: the hand-eye calibration results are called to convert the pixel coordinates on the reference plane point by point into the conveyor surface coordinates; then, based on the installation geometry of the conveyor mechanism, the conveyor surface coordinates are uniformly converted to the mechanical base coordinates. Based on this unified coordinate system, graspable connected regions are extracted from the inspection images: including the bag body, the stable grasping strip adjacent to the sealing strip, and the restricted areas that avoid batch codes and openings. A set of candidate points is generated for each connected region according to a fixed grid step size, and each candidate point is associated with a nominal grasping height and a standard end pose. Then, a rapid accessibility screening is performed: the candidate points are sent to the inverse kinematics solver, and if any joint goes out of bounds or the pose exceeds the end flange limit, the candidate point is eliminated; the remaining candidate points form a set of candidate poses and proceed to the next step. Within the detection area, a graspable potential field is constructed based on the bag boundary and content distribution characteristics. A graspable potential energy distribution is formed through boundary inner distance, content gradient, and grade zoning indicators. A weighted correction is applied to the candidate pose set to form a weighted graspable pose set. Specifically, under a unified coordinate system, three types of factors are evaluated for each candidate point and weighted accordingly. The first type is boundary safety: the minimum inner distance from the candidate point to the outer contour of the bag and the sealing edge is calculated; the greater the distance, the safer the point. If the inner distance is below the lower limit, the candidate point is directly rejected. The second type is content stability: the filling distribution estimated by vision or external sensors is read, and the intensity variation is statistically analyzed within a local window. Moderate variations receive higher scores, while drastic or extremely low variations receive lower scores to avoid liquid surface surging and empty areas. The third type is grade indication: based on grade information, non-conforming and warning areas are given higher priority, while conforming areas are given lower priority. If the production line strategy requires priority removal of non-conforming products, the weight in this type of area is multiplied. The three scores are multiplied after a monotonically nonlinear mapping to obtain a comprehensive weight. The candidate set is then sorted from high to low according to the comprehensive weight. A refinement check is performed on the top-ranked candidates: denser micro-candidates are generated in their neighborhoods, and the candidates are moved slightly along the main force direction of the bag. The candidate with the highest comprehensive weight is selected to replace the original candidate, resulting in a weighted candidate pose set. By combining the robot's motion trajectory with scene ranging data, an obstacle potential energy relationship is established. The obstacle avoidance constraint potential energy is formed by the minimum distance deviation between the trajectory and the obstacle point, describing the safe distance constraint between the robot arm's end effector path and the obstacle space. Specifically, a 3D ranging point cloud of the current workstation is acquired using laser or structured light, and fused with the current positions of each joint of the robot arm to form a dynamic scene. An initial straight-line trajectory from the current position to the candidate point is constructed for each weighted candidate, and several path points are uniformly sampled on the trajectory. At each path point, the minimum distance to surrounding obstacles, conveying devices, adjacent bags, and safety fences is calculated and compared with the safe distance baseline; the smaller the distance, the higher the penalty. The penalty is accumulated along the trajectory to obtain an obstacle avoidance potential energy score. If the score exceeds the upper limit, it indicates that the straight-line path is not feasible, and a local detour is attempted for the candidate: several intermediate control points are inserted near the high-risk area, and the control points are slightly moved along a combination of normal and tangential directions. The accumulated penalty is re-evaluated, and the set of control points with the minimum penalty is selected as the detour skeleton for the candidate. The above evaluation is repeated for all candidates, and the corresponding obstacle avoidance potential energy scores and detour skeletons are recorded to provide initial values ​​and constraints for joint optimization. Based on a set of graspable weighted poses, the joint optimization relationship between the end-effector attitude and trajectory path is solved. An exponential joint cost function is constructed using obstacle avoidance potential energy, velocity smoothing term, height constraint term, and graspability potential energy term to determine the optimal grasping trajectory and end-effector attitude. Specifically, weighted candidates and their bypass skeletons are used as initial solutions, while simultaneously optimizing the end-effector attitude and time-parameterized trajectory. The optimization objective consists of four parts: the obstacle avoidance term penalizes path points approaching risk; the velocity smoothing term penalizes abrupt velocity changes in adjacent time steps; the height constraint term penalizes deviations of the grasping height from the nominal height; and the graspability term encourages convergence near candidates with higher overall weights. To improve solution stability, a phased strategy is adopted: the first phase optimizes only the path shape and attitude direction, causing the obstacle avoidance and graspability terms to decrease rapidly; the second phase optimizes the time allocation based on the results of the first phase, balancing the velocity smoothing and height constraint terms. At the end of each phase, a reachability and joint constraint check is performed; if constraints or singular attitudes occur, additional control points are automatically inserted near the feasible solution of the previous step, or the axis angle of the end-effector attitude is adjusted, and the solution is solved again. When the decrease in the overall objective between two iterations is less than the convergence threshold, or when the maximum number of iterations is reached, the optimal grasping trajectory and end pose corresponding to that candidate are output. If multiple candidates yield feasible solutions, the one with the smallest overall objective is selected first. When the difference between the optimal and the second-best is less than the stability threshold, the second-best is retained as a backup trajectory for rapid switching during the execution phase when uncertainty increases.

[0032] The present invention is further configured such that the recording of optical reference, geometric mapping, detection results, and sorting action information to form a detection data archive includes: An execution gating factor is constructed based on the uncertainty metric of the grade and the health of the vacuum channel. The trajectory execution speed is adjusted through an exponential deviation relationship, and the optimal trajectory is speed-scaled to form feasible execution instructions. Specifically, after obtaining the uncertainty metric for grade determination and the health of the end-stage vacuum channel, deviation assessments are performed against the corresponding benchmark values. The deviation assessment uses a monotonically increasing non-linear curve: when the deviation is in the green zone, only a very weak adjustment occurs; when it enters the yellow zone, the adjustment intensity is increased at an accelerated rate according to the deviation magnitude; when it enters the red zone, the adjustment intensity is drastically increased and a safety deceleration flag is triggered. The two assessment results are multiplied by sequential gating: first, the uncertainty metric is judged; if it is in the yellow zone or higher, then the vacuum health assessment is introduced; if the uncertainty is still in the green zone, only minor corrections are made based on the vacuum health. The resulting gating result is mapped to a speed scaling factor, and upper and lower limits are applied to ensure that the scaling factor does not exceed the equipment's permissible range. The velocity curve of the optimal capture trajectory is then scaled globally using the scaling factor, while linkage constraints are applied to acceleration and jerk to prevent peak overshoot after scaling. If acceleration peaks still exist after verification, intermediate control points are automatically inserted near the peaks, and time slices are reallocated to ensure the velocity curve meets the controller's smoothness requirements throughout. Finally, a feasible execution instruction is generated, and a timestamp, two deviation values ​​for gating, the velocity scaling factor, and a safe deceleration flag are written simultaneously as subsequent traceability fields. Based on the grade information and the set of storage locations, a sorting cost relationship is established. An allocation cost function is generated by the deviation between the transport coordinates and the storage location coordinates, and the storage location congestion deviation. The target storage location with the lowest cost is selected from the corresponding grade's storage location set, and the delivery posture is calculated to minimize the landing point deviation. Specifically, based on the grade information, two parts of the cost are calculated for each storage location in the corresponding storage location set. The first part is the spatial deviation from the transport coordinates to the storage location coordinates: based on the path length, plus penalties for the number of turns and the turning radius; the shorter the path and the fewer the turns, the lower the cost; when the path needs to cross other zones, a cross-zone penalty is added. The second part is the storage location congestion deviation: the ratio of the recent inbound frequency, the number of items in place, and the available space for that storage location is statistically analyzed; the higher the ratio, the higher the cost; when the congestion exceeds the upper limit, it is directly marked as unselectable. The two parts of the cost are sequentially gating and combined: congestion assessment is only activated when the spatial deviation is below a threshold; if the spatial deviation is above the threshold, the storage location is directly eliminated. The lowest-scoring location among all candidates is selected as the target storage location. The deployment posture is then determined: based on the release height, end effector direction, and bag flexibility parameters, a landing point mapping table established from offline experiments is used. The entry closest to the current parameters is found in the mapping table to obtain the initial posture. The initial posture is then used in the deployment simulation to calculate the deviation between the expected landing point and the target landing point. If the deviation is still higher than the allowable value, small perturbations are made along the three free variables of the end effector posture. The simulation is repeated after each perturbation, and the direction with the fastest deviation decrease is selected for iterative updates. If the decrease is insufficient for several consecutive iterations, the perturbation step size is reduced and the search continues. Iteration continues until the deviation meets the allowable value or the step limit is reached. Finally, the target storage location and deployment posture are fixed, and the path length, cross-area marker, congestion score, expected landing point deviation, and number of iterations are recorded, before entering the archiving stage. The optical configuration, geometric mapping, grasping trajectory, execution parameters, sorting location information, and grade results are combined to form a traceability fingerprint set. This set is encoded and an exponential verification identifier is generated to form a traceable detection data archive, supporting production records and remote operation and maintenance processes. Specifically, around a single grasping and deployment cycle, the following information is collected and solidified in a fixed field order: optical configuration snapshot (illumination intensity, polarization angle, exposure sequence, illumination phase, spectral band selection), geometric mapping version and timestamp, verification summary of standardized detection images, index location of task enhancement results, discrimination energy and grade label, uncertainty measure and threshold group number, execution gating and velocity scale factor, key point sequence and velocity curve of the optimal trajectory, target storage location and deployment posture, post-deployment visual verification results (e.g., enabled), equipment and workstation identification codes, and operation shift and batch information. The above fields are serialized into a data stream that only increments and does not change, and then divided into continuous fragments of fixed size. For each fragment, two encoding steps are performed sequentially: the first step is rolling differential accumulation, where the differences between adjacent data units within the fragment are fed into a nonlinear amplifier and accumulated to obtain a fragment digest; the second step is digest linking, where the current fragment digest is irreversibly combined with the previous fragment digest to generate a chained digest. After all fragment processing is complete, a final check is performed on the entire data segment to generate a check identifier: the final check uses multi-round accumulation, with each round sliding a window across the data stream at different step sizes. Within the window, the differences between data units are nonlinearly superimposed, with rising segment enhancement and falling segment suppression. Finally, the outputs of each round are aggregated into a single check identifier. After check completion, the serialized data, chained digest, and final check identifier are written to archive storage, and a lightweight index record is published on the message bus. The index includes a timestamp, workstation identifier, batch number, and type level for easy subsequent retrieval. After archiving is completed, initiate an integrity inspection task: randomly select a number of files within a set time period, recalculate the chain summary and the total checksum and compare them. If any inconsistency is found, trigger read-only protection and alarm, and write the link information of the abnormal record into the maintenance day.

[0033] It should be noted that the specific operation methods of each module and unit in the intelligent inspection system for bagged water based on robot AI vision provided in the above embodiments have been described in detail in the system embodiments and will not be repeated here. In practical applications, the intelligent inspection system for bagged water based on robot AI vision provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above, and this is not a limitation here.

[0034] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An intelligent inspection system for bagged water packaging based on robot AI vision, characterized in that, include: The optical reconstruction control module constructs a reconfigurable illumination and multi-spectral imaging structure. By adjusting the illumination intensity, polarization angle, and exposure time, it forms an illumination-camera self-consistent reference, establishes consistent control over the optical state of the bagged water surface reflection, liquid surface refraction, and batch code area, and generates optical reference data. The geometric normalization processing module performs spatial geometric normalization based on optical reference data and multi-view synchronously acquired images. It establishes a spatial unfolding mapping based on the deformation law of the packaging material film and the structural characteristics of the sealing tape to generate standardized inspection images. The task enhancement module enhances three types of tasks—liquid level, sealing, and batch code—based on standardized detection images, forming an enhanced liquid level view, a detailed sealing view, and a comparative batch code view. It constructs a multi-scale feature layer through spectral response, near-infrared reflection, and surface texture differences to generate task feature data. The defect discrimination modeling module establishes defect discrimination energy relationships based on task feature data, generating identification results for liquid level deviation, sealing anomaly, and batch code clarity defects, and outputs discrimination information including defect type and severity level. Based on the task feature data, the module establishes discrimination energy relationships by exponentially integrating the vertical gradient changes in the liquid level area, the second-order structure changes in the sealing area, and the edge intensity changes in the batch code area, generating liquid level deviation energy, sealing anomaly energy, and batch code clarity energy. Based on three types of discriminative energy, a typified evidence set is constructed. Evidence association is established through the multiplicative coupling of the amplification term of this type of energy and the deviation term of the other type of energy, forming typified discriminative evidence of liquid level, sealing and batch code; A self-learning penalty relationship is constructed based on the difference between the energy of normal samples and the energy of rare samples. An exponential penalty factor is formed by the attenuation term of the distance between normal samples and the sensitization term of the distance between rare samples, thereby generating defect sensitization parameters. Based on typified discrimination evidence and defect sensitization parameters, a comprehensive indicator is formed. Threshold judgment is performed on liquid level deviation, sealing abnormality and batch code clarity defects. The defect type and severity level are divided according to the distribution range of the indicator in the preset threshold group. The self-learning optimization module constructs a prototype metric relationship based on the energy difference between normal and abnormal samples, forming a rare defect sensitization mechanism, and performs adaptive updates to the detection model to generate optimized discrimination results. It establishes an energy difference relationship based on the discrimination energy of normal and abnormal samples within the detection period, and constructs an energy difference field between samples through an exponential deviation mapping to form an energy distance set representing the energy distribution difference. Based on the energy difference field, energy prototypes are generated in the normal sample domain and the abnormal sample domain respectively. The normal prototype energy and the rare prototype energy are formed by exponential weighted integration. The prototype energy reflects the stable region and the abrupt region of energy distribution, and the prototype parameter set is generated. The learning weight factor is updated based on the deviation between the current sample energy and the prototype energy. The learning weight factor is adjusted by the stable term of normal prototype difference and the enhancement term of rare prototype difference, forming an adaptively updated set of weight factors. The energy for judging liquid level, sealing and batch code is corrected based on the updated learning weight factor. The corrected energy is then comprehensively mapped according to the task coupling relationship to form an optimized judgment result. The grade decision analysis module constructs a comprehensive decision index based on the optimized discrimination results, combines grade thresholds and uncertainty constraints to perform quality grade judgment, and generates qualified, warning and unqualified grade information. The robot execution and traceability module generates sorting plans and grasping trajectories based on grade information, realizes automatic sorting and positioning of qualified and unqualified products, records optical reference, geometric mapping, detection results and sorting action information, and forms a detection data archive.

2. The intelligent inspection system for bagged water packaging based on robot AI vision according to claim 1, characterized in that, The implementation of optical reconstruction control includes: Perform spectral and polarization channel initialization, acquire parallel and cross-polarized image signals of each spectral band in the calibration plate area, construct the mirror residual baseline through light intensity difference, and form reflection difference data; Exposure time and illumination intensity are jointly tuned based on reflection difference data. Brightness homogeneity constraints are constructed in the batch code reference area and the neighborhood of the sealing strip. Stable exposure and illumination reference parameters are obtained by minimizing the joint index of brightness deviation and mirror residual. Based on the obtained parameters, the polarization angle is finely adjusted. Images are acquired in the selected spectral band according to the angle sequence. The mirror suppression angle is determined according to the principle of minimizing gradient perturbation, thus forming a polarization setting that suppresses reflection and maintains boundary sharpness. Structured lighting phase adjustment is performed based on the sealing tape path. By constraining gradient continuity and texture smoothness, a lighting phase that can keep the sealing texture uniform is selected, and a phase setting that enhances the sealing details is generated. The optimal spectral bands are selected for the three detection tasks of liquid level, sealing and batch code. Polarization demixing is performed on the images of each spectral band to generate liquid level observation base plane, sealing observation base plane and batch code observation base plane, forming a multi-task optical response set. Exposure parameters, illumination intensity, polarization angle, illumination phase, and three types of observation datums are converged to form an optical self-consistent reference, constructing an optical configuration data and reference image set.

3. The intelligent inspection system for bagged water packaging based on robot AI vision according to claim 2, characterized in that, The geometry normalization processing module includes: Based on optical configuration data, reference image set and multi-view synchronously acquired images, a spatiotemporal mapping relationship is established. Through epipolar consistency constraints and time micro-bias correction between multiple views, temporal alignment parameters and projection operators are obtained to form a synchronous view set under a unified time scale. Based on the deformation law of packaging film and the structural characteristics of sealing tape, a non-rigid unfolding mapping from physical space to reference plane is constructed. The mapping relationship is solved by surface isometry constraints, curvature continuity constraints and geometric anchor point constraints to generate an unfolding function describing the deformation of film surface. The synchronous view is mapped to the reference plane through the corresponding projection operator and non-rigid unfolding mapping, and the images from various perspectives are fused in the same coordinate domain to form a unified primary standardized detection image through exponential consistency constraints. Gradient consistency and contour continuity constraints are established in the overlapping area of ​​the primary standardized detection image, and cross-viewpoint stitching and boundary consistency correction are performed to generate a standardized detection image with viewpoint consistency and temporal synchronization.

4. The intelligent inspection system for bagged water packaging based on robot AI vision according to claim 1, characterized in that, The formation of enhanced liquid level view, seal detail view, and batch code comparison view includes: The standardized detection image is decomposed according to spectral channels, the energy response difference under different spectral bands is calculated, and a spectral band energy mapping based on gray-level deviation is established to form an energy response set for multi-task enhancement. A liquid level energy model is constructed within the liquid level detection area based on the vertical light intensity gradient and liquid refraction characteristics. The liquid level boundary response is enhanced by exponential gradient integration to generate an enhanced liquid level view. A sealing energy model is constructed within the sealing zone by combining the near-infrared reflection channel. Based on the spatial second-order conduction characteristics, the details of weld lines and microcracks are enhanced to generate a sealing detail view. Within the batch code area, a batch code energy model is constructed based on the difference in character ink density and reflection. Character contour and blurred area features are extracted through gradient distribution constraints to generate a batch code comparison view.

5. The intelligent inspection system for bagged water packaging based on robot AI vision according to claim 4, characterized in that, Constructing multi-scale feature layers to generate task feature data includes: A multi-scale feature overlay relationship is established based on three types of feature views: liquid level, sealing, and batch code. A comprehensive feature field with consistent scale is constructed through directional gradient response to achieve scale unification among task features. Energy consistency constraints are constructed on the comprehensive feature field, and energy normalization is performed based on the local light intensity reference field to form a feature metric with balanced energy distribution among tasks. By combining the energy normalization results, the three types of feature views are jointly mapped to form a unified feature set of liquid level enhancement features, sealing detail features and batch code comparison features, thus generating task feature data.

6. The intelligent inspection system for bagged water packaging based on robot AI vision according to claim 1, characterized in that, The hierarchical decision analysis module includes: A comprehensive decision-making indication relationship is established based on the optimized liquid level correction energy, sealing correction energy and batch code correction energy. The task-level indication is formed by the multiplicative coupling of the exponential amplification term of this type of energy and the deviation term of the heterogeneous energy. The global decision-making indication is constructed by the product of the three types of task-level indications. A global indicator trajectory is generated within the controlled disturbance trajectory range. The upper bound of uncertainty is calculated based on the exponential deviation relationship between the indicator and the trajectory sample, forming an upper bound metric for determining stability. Candidate defect types are determined based on the maximum value of the task-level indicator. The indicator corresponding to the candidate type is then filtered according to a preset threshold group, and the distribution range of the indicator is divided into first-level, second-level, and third-level intervals. The grade results are constrained by combining the upper bound of uncertainty measurement. When the upper bound of uncertainty is below the threshold, the original grade result is maintained. When the upper bound of uncertainty exceeds the threshold, the review status is marked. According to the grade range, the results are marked as qualified, warning and unqualified grade information respectively to form the final quality grade judgment result.

7. The intelligent inspection system for bagged water packaging based on robot AI vision according to claim 1, characterized in that, Based on the grade information, a sorting plan and grasping trajectory are generated to achieve automatic sorting and positioning of qualified and unqualified products, including: Based on standardized detection images and grade information, a spatial mapping relationship from the reference plane to the mechanical base is established. A unified coordinate system is generated through hand-eye calibration mapping and conveyor surface geometric mapping, and the graspable area within the detection area is mapped into a set of candidate poses. Within the detection area, a graspable potential field is constructed based on the bag boundary and the distribution characteristics of the contents. The graspable potential energy distribution is formed by the boundary inner distance, the content gradient and the level partitioning indicator. The candidate pose set is weighted and corrected to form a graspable weighted pose set. By combining the motion trajectory of the robot body with the scene ranging data, the obstacle potential energy relationship is established. The obstacle avoidance constraint potential energy is formed by the minimum distance deviation between the trajectory and the obstacle point, which describes the safe distance constraint between the end effector motion path of the robot arm and the obstacle space. Based on the set of grabbable weighted poses, the joint optimization relationship between the end pose and the trajectory path is solved. The optimal grab trajectory and end pose are determined by constructing an exponential joint cost function through obstacle avoidance potential energy, velocity smoothing term, height constraint term and grabbable potential energy term.

8. The intelligent inspection system for bagged water packaging based on robot AI vision according to claim 7, characterized in that, Record optical references, geometric mappings, detection results, and sorting action information to form a detection data archive, including: An execution gating factor is constructed based on the level uncertainty metric and the vacuum channel health. The trajectory execution speed is adjusted through the exponential deviation relationship. The optimal trajectory is speed-scaled to form feasible execution instructions. Based on the grade information and the set of storage locations, a sorting cost relationship is established. An allocation cost function is generated by the deviation between the transport coordinates and the storage location coordinates and the deviation of the storage location congestion. The target storage location with the lowest cost is selected from the set of storage locations of the corresponding grade, and the delivery posture is solved to minimize the landing point deviation. The optical configuration, geometric mapping, grasping trajectory, execution parameters, sorting location information and grade results are combined to form a traceability fingerprint set. This set is encoded and an exponential verification identifier is generated to form a traceable detection data archive, which supports production records and remote operation and maintenance processes.