Digital dynamic product quality detection method and system for explosive salt products

By combining multi-angle visual image streams and dynamic weighing, a composite feature matrix of explosive salt products is extracted, and a defect type discrimination rule tree is constructed. This enables accurate quality inspection and automatic rejection of explosive salt products, overcoming the shortcomings of manual visual inspection and static image detection in existing technologies.

CN122265192APending Publication Date: 2026-06-23天天皇宇(安庆)科技发展有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
天天皇宇(安庆)科技发展有限公司
Filing Date
2026-03-20
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In existing technologies, the quality inspection of explosive salt products relies on manual visual inspection and static image detection, which has a high rate of missed detection and false detection. It is difficult to cope with motion blur and changes in lighting during dynamic processes, and lacks the ability to analyze defects in the time dimension, making it difficult for sorting execution mechanisms to intervene accurately.

Method used

Multi-angle visual image stream acquisition is adopted, spatiotemporal registration and dynamic background separation are performed, and a composite feature matrix of frequency domain energy, spatial geometry and temporal motion mode is extracted. A defect type discrimination rule tree is constructed, and the defect type identification and motion trajectory are spatiotemporally fused with a dynamic weighing device to generate a sorting control command sequence, which drives the actuator to reject defective products.

Benefits of technology

It enables precise quality inspection of explosive salt products, reduces the rate of missed and false detections, improves the reliability of the inspection system and the overall efficiency of the production line, and ensures that defective products are automatically rejected at the right time and place.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265192A_ABST
    Figure CN122265192A_ABST
Patent Text Reader

Abstract

The application provides an explosive salt product digital dynamic product quality detection method and system, relates to the technical field of quality detection, and comprises the following steps: collecting multi-angle visual image streams, performing space-time registration and dynamic background separation, identifying and tracking a defect target area, extracting a composite feature matrix of the defect area, performing hierarchical determination by using a defect type discrimination rule tree to identify the defect type, and finally fusing the defect type and the motion trajectory, predicting the position of the defect product, and generating a sorting instruction to drive an executing mechanism to remove. Real-time, automatic and accurate detection and removal of defects in the production process of explosive salt products are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quality inspection technology, and in particular to a digital dynamic product quality inspection method and system for explosive salt products. Background Technology

[0002] In the daily chemical industry, product quality inspection is a crucial step in ensuring safety and compliance during the production of explosive salt products. Current technologies typically rely on manual visual inspection or automated vision inspection systems based on static images. Manual inspection requires operators to continuously observe the product's appearance at the production line. Automated vision inspection systems, on the other hand, generally use industrial cameras to take one or a limited number of photos of the product at a fixed station. Then, using pre-set simple image processing algorithms, such as threshold segmentation or template matching, they identify areas in the image that significantly differ from a standard template and determine them as potential defects.

[0003] However, these conventional practices have significant limitations. Manual visual inspection relies heavily on the experience and concentration of the inspectors, and prolonged repetitive work easily leads to visual fatigue and distraction, resulting in high rates of missed and false detections, especially in capturing minute defects that appear transiently in high-speed motion. On the other hand, automated inspection systems based on static single-frame images struggle to effectively handle interference from motion blur, lighting changes, and the randomness of the product's own posture and angle during dynamic transport of explosive salt products. These systems typically lack the ability to analyze the evolution of defects over time; for example, they cannot distinguish between genuine defects and fleeting shadows or reflections, easily generating false alarms. Furthermore, the static placement of inspection points prevents the system from tracking and predicting the subsequent movement of defective products, making it difficult for the sorting mechanism to intervene at the precise time and spatial location, impacting the accuracy of rejection operations and the overall efficiency of the production line. Summary of the Invention

[0004] This invention provides a digital dynamic product quality inspection method and system for explosive salt products, which can solve the problems in the prior art.

[0005] A first aspect of the present invention provides a digital dynamic product quality testing method for explosive salt products, comprising: Multi-angle visual image streams of explosive salt products on the production line are collected. Spatiotemporal registration of the multi-angle visual image streams is performed to obtain spatiotemporally synchronized image data. Based on adaptive background modeling technology, dynamic background separation is performed on the spatiotemporally synchronized image data to identify pixel clusters in consecutive frames whose gray-level statistical distribution parameters exceed a dynamic threshold. Connectivity analysis is used to aggregate the pixel clusters into independent defect target regions, and the motion trajectory vector of each defect target region is recorded. The independent defect target region is subjected to multi-scale feature decomposition to extract a composite feature matrix including frequency domain energy distribution features, spatial geometric morphology features, and temporal motion pattern features; A defect type discrimination rule tree is constructed. Based on the value range of each feature dimension in the composite feature matrix and the correlation constraint relationship between features, feature matching and judgment are performed sequentially according to the tree-like hierarchical structure. Each judgment node divides the defect sub-category according to the feature threshold range, and the process is progressively advanced until the leaf node outputs the final defect type identifier. The defect type identifier and the motion trajectory vector are spatiotemporally fused to determine the predicted time and spatial location of the defective product arriving at the sorting execution point. Based on the predicted time and spatial location, a sorting control instruction sequence is generated to drive the actuator to complete the rejection of the defective product.

[0006] The method further includes: A dynamic weighing device is set up in the detection area. The dynamic weighing device includes a weighing sensor and a signal acquisition unit. The weighing sensor is arranged on the bearing surface of the conveying path to sense the weight signal of the explosive salt product passing through in real time. The weight signal is acquired by the signal acquisition unit and filtered to remove noise components caused by vibration of the conveying equipment and environmental interference, so as to obtain a purified weight signal. The measured weight value of the explosive salt product is extracted based on the purified weight signal. The measured weight value is compared with the preset standard weight range. When the measured weight value deviates from the standard weight range, a weight anomaly mark is generated. The weight anomaly marker is associated and matched with the defect type identifier to determine whether the defect type identified by visual inspection is consistent with the weight deviation feature. When the theoretical weight deviation corresponding to the defect type identifier matches the actual deviation of the measured weight value, the defect judgment result is confirmed to be valid.

[0007] Spatiotemporal registration is performed on the multi-angle visual image stream to obtain spatiotemporally synchronized image data. Dynamic background separation is then performed on the spatiotemporally synchronized image data based on adaptive background modeling technology to identify pixel clusters in consecutive frames whose grayscale statistical distribution parameters exceed a dynamic threshold, including: The feature point set of each viewpoint image in the multi-angle visual image stream is extracted. The feature point set includes corner features and edge intersection features. The correspondence between feature points between different viewpoint images is calculated. Matching feature point pairs are determined by the gray-level distribution similarity of the feature point neighborhood, and mismatched point pairs with inconsistent geometric positions are eliminated. Based on the matching feature point pairs, the spatial transformation matrix between viewpoints is calculated. The spatial transformation matrix describes the rotation and translation relationships of images from different viewpoints in the three-dimensional spatial coordinate system. The spatial transformation matrix is ​​used to perform coordinate mapping on images from different viewpoints, projecting images from different viewpoints onto a unified three-dimensional spatial coordinate system. A timeline index is established based on the image acquisition timestamp, and the images in the three-dimensional spatial coordinate system are arranged in chronological order to form a spatiotemporal four-dimensional data structure. For each pixel in a continuous frame image, calculate the deviation between the current frame grayscale value and the mean grayscale value of the background. When the absolute value of the deviation exceeds the multiple coefficient of the background grayscale variance, the pixel is determined to be a foreground pixel. Adjacent foreground pixels are aggregated into pixel clusters, and the pixel clusters satisfy the spatial continuity constraint.

[0008] The pixel clusters are aggregated into independent defect target regions using connected component analysis, and the motion trajectory vector of each defect target region is recorded, including: Connectivity detection is performed on the pixel clusters to identify sets of pixels that are interconnected within an eight-neighborhood range. Each set of connected pixels is marked as a connected region. The area and compactness parameter of each connected region are calculated. The compactness parameter represents the ratio of the perimeter of the connected region boundary to the area of ​​the region. Connected regions whose area is greater than the minimum area threshold and whose compactness parameter satisfies the morphological rule constraint are selected. The selected connected regions are determined as independent defect target regions. A unique identifier is assigned to each independent defect target region. The unique identifier is used to track the same defect target in subsequent frame images. In consecutive frame images, the centroid coordinates of defect target regions with the same unique identifier are detected. The displacement of the centroid coordinates of the defect target regions between adjacent frames is calculated. The displacement includes a horizontal displacement component and a vertical displacement component. The displacement is accumulated in time order to form a motion trajectory vector describing the spatial movement path of the defect target regions. Calculate the direction angle and velocity magnitude of the motion trajectory vector, where the direction angle represents the direction of motion of the defective target and the velocity magnitude represents the speed of movement of the defective target.

[0009] A defect type discrimination rule tree is constructed. Based on the value range of each feature dimension in the composite feature matrix and the correlation constraints between features, feature matching and judgment are performed sequentially according to the tree-like hierarchical structure. Each judgment node divides the defect subcategories according to the feature threshold range, progressing layer by layer until the leaf node outputs the final defect type identifier, including: Establish a hierarchical classification structure for defect types, which includes a top-level defect category, a middle-level defect sub-category, and a bottom-level specific defect type; Analyze the correlation and dependency relationships among the frequency domain energy distribution features, spatial geometric morphology features, and temporal motion pattern features in the composite feature matrix, and determine the contribution of feature combinations to the discrimination of defect types; Construct a tree-like discrimination rule tree, wherein the root node of the discrimination rule tree corresponds to the discrimination rule of the top-level defect category, the intermediate-level nodes correspond to the discrimination rule of the middle-level defect subclass, and the leaf nodes correspond to the discrimination identifier of the bottom-level specific defect type; Starting from the root node, traverse the discrimination rule tree, extract the feature dimension value corresponding to the current node in turn, match the feature dimension value with the feature threshold range of the current node, select the child node branch to enter according to the matching result, and proceed layer by layer until the leaf node is reached, and output the final defect type identifier corresponding to the leaf node.

[0010] The method further includes: Configure a first discrimination rule for the root node. The first discrimination rule sets a first feature threshold interval set based on the value range of the frequency domain energy distribution feature. Different first feature threshold intervals correspond to different defect category branches. Configure a second discrimination rule for the intermediate layer node. The second discrimination rule sets a second feature threshold interval set based on the value range of the spatial geometric morphology features, and combines the defect categories already determined by the root node as constraints to limit the effective range of the second feature threshold interval set. A third discrimination rule is configured for the leaf node. The third discrimination rule sets a set of third feature threshold intervals based on the value range of the temporal motion pattern features, and forms a feature combination constraint by combining the discrimination results of the preceding nodes.

[0011] The defect type identifier and the motion trajectory vector are spatiotemporally fused to determine the predicted time and spatial location of the defective product arriving at the sorting execution point. Based on the predicted time and spatial location, a sorting control instruction sequence is generated, including: The physical attribute parameters of the defective product are extracted from the defect type identifier, including the mass distribution characteristics and shape contour characteristics of the defective product; the motion state parameters of the defective product are extracted from the motion trajectory vector, including the current position coordinates, instantaneous velocity vector, and motion acceleration vector. Obtain the fixed spatial coordinates of the sorting execution point in the production line coordinate system, calculate the spatial displacement vector of the defective product from the current position coordinates to the fixed spatial coordinates, and calculate the time interval required for the defective product to move along the direction of the spatial displacement vector to reach the sorting execution point based on the instantaneous velocity vector and the motion acceleration vector. Add the current time to the time interval to obtain the predicted time. Based on the instantaneous velocity vector, the motion acceleration vector, and the time interval, the three-dimensional spatial coordinates of the defective product at the predicted time are calculated, and the three-dimensional spatial coordinates are determined as the predicted spatial position. The pre-defined sorting strategy data table is queried based on the defect type identifier. The sorting strategy data table stores the actuator action parameters corresponding to different defect types. The action parameters include the extension distance and action rate of the actuator. The actuator action parameters corresponding to the defect type identifier are extracted, and the start time of the actuator is calculated by subtracting the response delay time of the actuator from the predicted time.

[0012] A second aspect of the present invention provides a digital dynamic product quality inspection system for explosive salt products, comprising: The image acquisition unit is used to acquire multi-angle visual image streams of explosive salt products on the production line, perform spatiotemporal registration on the multi-angle visual image streams to obtain spatiotemporally synchronized image data, perform dynamic background separation on the spatiotemporally synchronized image data based on adaptive background modeling technology, determine pixel clusters in continuous frame images whose gray-level statistical distribution parameters exceed dynamic thresholds, aggregate the pixel clusters into independent defect target regions using connected component analysis, and record the motion trajectory vector of each defect target region. The image registration unit is used to perform multi-scale feature decomposition on the independent defect target region and extract a composite feature matrix including frequency domain energy distribution features, spatial geometric morphology features and temporal motion pattern features. The background separation unit is used to construct a defect type discrimination rule tree. Based on the value range of each feature dimension in the composite feature matrix and the correlation constraint relationship between features, feature matching and judgment are performed sequentially according to the tree-like hierarchical structure. Each judgment node divides the defect sub-category according to the feature threshold range, and the process is progressively advanced until the leaf node outputs the final defect type identifier. The defect extraction unit is used to perform spatiotemporal fusion of the defect type identifier and the motion trajectory vector to determine the predicted time and spatial position of the defective product arriving at the sorting execution point, and generate a sorting control instruction sequence based on the predicted time and spatial position to drive the actuator to complete the rejection of the defective product.

[0013] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0014] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0015] This method performs multi-scale feature decomposition on the identified independent defect target regions, extracting a composite feature matrix that includes frequency domain energy distribution, spatial geometry, and temporal motion patterns. This process can comprehensively characterize the intrinsic attributes and external manifestations of defects. Frequency domain features reflect their texture and internal structural anomalies, spatial geometric features describe their static attributes such as shape and size, and temporal motion patterns capture their dynamic changes on the production line, laying a multi-dimensional data foundation for accurate classification.

[0016] The constructed defect type discrimination rule tree, based on the value range of each dimension in the composite feature matrix and the correlation constraints between features, performs progressive feature matching and discrimination in a tree-like hierarchical structure. Each discrimination node subclassifies defects according to a preset feature threshold range, with clear logic and high discrimination efficiency, capable of refining the classification layer by layer until the leaf node outputs the final defect type identifier. This structured discrimination method significantly improves the accuracy and interpretability of classification.

[0017] By spatiotemporally fusing defect type identifiers with their motion trajectory vectors, the predicted time and spatial location of defective products arriving at the sorting execution point can be accurately calculated. The sorting control command sequence generated based on this predictive information is forward-looking and accurate, enabling the actuators to prepare in advance and automatically reject defective products at the correct time and location. Attached Figure Description

[0018] Figure 1 A flowchart illustrating the digital dynamic product quality testing method for explosive salt products. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0021] Figure 1A flowchart illustrating the digital dynamic product quality testing method for explosive salt products, as shown below. Figure 1 As shown, the method includes: Multi-angle visual image streams of explosive salt products on the production line are collected. Spatiotemporal registration of the multi-angle visual image streams is performed to obtain spatiotemporally synchronized image data. Based on adaptive background modeling technology, dynamic background separation is performed on the spatiotemporally synchronized image data to identify pixel clusters in consecutive frames whose gray-level statistical distribution parameters exceed a dynamic threshold. Connectivity analysis is used to aggregate the pixel clusters into independent defect target regions, and the motion trajectory vector of each defect target region is recorded. The independent defect target region is subjected to multi-scale feature decomposition to extract a composite feature matrix including frequency domain energy distribution features, spatial geometric morphology features, and temporal motion pattern features; A defect type discrimination rule tree is constructed. Based on the value range of each feature dimension in the composite feature matrix and the correlation constraint relationship between features, feature matching and judgment are performed sequentially according to the tree-like hierarchical structure. Each judgment node divides the defect sub-category according to the feature threshold range, and the process is progressively advanced until the leaf node outputs the final defect type identifier. The defect type identifier and the motion trajectory vector are spatiotemporally fused to determine the predicted time and spatial location of the defective product arriving at the sorting execution point. Based on the predicted time and spatial location, a sorting control instruction sequence is generated to drive the actuator to complete the rejection of the defective product.

[0022] In an optional implementation, the method further includes: A dynamic weighing device is set up in the detection area. The dynamic weighing device includes a weighing sensor and a signal acquisition unit. The weighing sensor is arranged on the bearing surface of the conveying path to sense the weight signal of the explosive salt product passing through in real time. The weight signal is acquired by the signal acquisition unit and filtered to remove noise components caused by vibration of the conveying equipment and environmental interference, so as to obtain a purified weight signal. The measured weight value of the explosive salt product is extracted based on the purified weight signal. The measured weight value is compared with the preset standard weight range. When the measured weight value deviates from the standard weight range, a weight anomaly mark is generated. The weight anomaly marker is associated and matched with the defect type identifier to determine whether the defect type identified by visual inspection is consistent with the weight deviation feature. When the theoretical weight deviation corresponding to the defect type identifier matches the actual deviation of the measured weight value, the defect judgment result is confirmed to be valid.

[0023] Specifically, a dynamic weighing device is installed below the detection area of ​​the conveyor belt. This weighing device uses a high-precision load cell, with the sensor surface in close contact with the bottom of the conveyor belt, enabling it to accurately capture instantaneous weight changes as the product passes through at high speed. The analog voltage signal output by the load cell is converted into a digital signal by a signal acquisition unit, with the acquisition frequency set to 1,000 times per second to ensure that the complete weight curve of the rapidly moving product can be captured.

[0024] Because conveying equipment generates mechanical vibrations during operation, and electromagnetic interference in the environment can also affect the stability of the weighing signal, it is necessary to filter the acquired raw weight signal. The signal acquisition unit incorporates a digital filtering algorithm that eliminates high-frequency noise components using a moving average window method. Specifically, twenty consecutively acquired sampling points are treated as a window, and the arithmetic mean of the data within the window is calculated. This average value is then used as the purified weight signal at that moment. This processing method effectively suppresses random noise while preserving the true characteristics of the product weight.

[0025] After obtaining the purified weight signal, the system extracts the signal peak value as the measured weight value of the product. Each specification of explosive salt product has a corresponding standard weight range, which is determined according to the product design parameters and manufacturing process. The system compares the measured weight value with the standard weight range in real time. When the measured value is lower than the lower limit or higher than the upper limit, a weight anomaly mark is immediately generated, and the degree of anomaly is recorded.

[0026] Next, the system performs a correlation verification between visual inspection and weighing. Based on the defect type identified by visual inspection, the system queries a pre-set defect knowledge base to determine the theoretically expected weight deviation for that defect type. For example, a breakage defect reduces product weight, resulting in a negative theoretical weight deviation; while a foreign object attachment defect increases weight, resulting in a positive theoretical weight deviation. The system calculates the difference between the measured weight and the median standard weight to obtain the actual weight deviation. It then compares the signs of the theoretical and actual weight deviations to ensure they are consistent and within a reasonable error range. When they match, the visual inspection result and the weighing result corroborate each other. At this point, the system confirms the defect determination is valid, and the product is marked as a defective item to be rejected. This dual verification mechanism of visual inspection and weighing effectively reduces the false positive and false negative rates, significantly improving the overall reliability of the inspection system.

[0027] In one optional implementation, the multi-angle visual image stream is spatiotemporally registered to obtain spatiotemporally synchronized image data. Dynamic background separation is then performed on the spatiotemporally synchronized image data based on adaptive background modeling technology to determine pixel clusters in consecutive frame images whose grayscale statistical distribution parameters exceed a dynamic threshold, including: The feature point set of each viewpoint image in the multi-angle visual image stream is extracted. The feature point set includes corner features and edge intersection features. The correspondence between feature points between different viewpoint images is calculated. Matching feature point pairs are determined by the gray-level distribution similarity of the feature point neighborhood, and mismatched point pairs with inconsistent geometric positions are eliminated. Based on the matching feature point pairs, the spatial transformation matrix between viewpoints is calculated. The spatial transformation matrix describes the rotation and translation relationships of images from different viewpoints in the three-dimensional spatial coordinate system. The spatial transformation matrix is ​​used to perform coordinate mapping on images from different viewpoints, projecting images from different viewpoints onto a unified three-dimensional spatial coordinate system. A timeline index is established based on the image acquisition timestamp, and the images in the three-dimensional spatial coordinate system are arranged in chronological order to form a spatiotemporal four-dimensional data structure. For each pixel in a continuous frame image, calculate the deviation between the current frame's grayscale value and the background's average grayscale value. When the absolute value of the deviation exceeds the multiple coefficient of the background grayscale variance, the pixel is determined to be a foreground pixel. Adjacent foreground pixels are grouped into pixel clusters, which satisfy spatial continuity constraints.

[0028] For example, in the production line inspection stage of explosive salt products, the dynamic identification of surface defects requires the establishment of a precise spatiotemporal registration basis. The acquisition device is equipped with three sets of industrial cameras, located above and on both sides of the product conveyor belt, respectively, with each camera synchronously capturing images at a frequency of 50 frames per second. The camera controller ensures that the timestamp error is less than 2 milliseconds through hardware trigger signals.

[0029] Feature point extraction employs an improved Harris corner detection operator, with a response function threshold set to 0.01. This typically yields 200 to 300 effective corner points in a 512×512 pixel image. For edge intersection features, the Canny operator is applied to generate a binary edge map, and the intersection positions of edge curves are detected. The feature point neighborhood is set to a 15×15 pixel window. Normalized cross-correlation coefficients are calculated to evaluate the gray-level distribution similarity; a coefficient greater than 0.85 is considered a matching point pair. The RANSAC algorithm is iterated 1000 times, removing outliers with projection errors exceeding 3 pixels and retaining a set of geometrically consistent inliers.

[0030] The spatial transformation matrix is ​​calculated based on at least 8 pairs of matching feature points, using the least squares method to solve for a 3×4 projection matrix. This matrix contains a rotation matrix R and a translation vector t, where the rotation matrix is ​​expressed as a three-dimensional rotation vector using the Rodriguez formula. The coordinate mapping process transforms the two-dimensional pixel coordinates (u,v) of each viewpoint to the world coordinate system (X,Y,Z), using bilinear interpolation to handle the non-integer coordinate positions after mapping, ensuring image continuity. The origin of the unified coordinate system is set at the intersection of the conveyor belt centerline and the starting end of the detection area.

[0031] The timeline index uses a system clock with microsecond-level precision, assigning a unique timestamp to each image frame. The spatiotemporal four-dimensional data structure is designed in (X, Y, Z, T) format, with a spatial resolution of 0.5 mm per pixel and a temporal resolution of 20 milliseconds. Data storage employs a sliding window mechanism, retaining historical frames within the most recent 3 seconds, satisfying trajectory tracking requirements while controlling memory usage.

[0032] Background modeling employs a Gaussian mixture model, maintaining 3 to 5 Gaussian distributions for each pixel location. During the initialization phase, 50 consecutive frames of background images without products are acquired, and the mean and variance of the grayscale values ​​for each pixel are calculated. Background updates utilize an adaptive learning rate α = 0.005, with new frame pixel values... According to the formula Update the mean, where, This represents the average grayscale value at time t. The multiplier k is set to 2.5, meaning that when... It was determined to be a foreground attraction at that time. This represents the variance at time t.

[0033] Pixel clustering employs an eight-neighbor connectivity determination method, performing a region growing algorithm on the foreground binary image. Starting from the top left corner, the system scans line by line. When an unlabeled foreground point is encountered, a new cluster label is created, and its eight neighboring pixels are recursively checked. Unlabeled neighboring points that meet the foreground criteria are grouped into the same cluster. Noise clusters with an area less than 25 pixels are filtered out, preserving valid defect areas. The centroid coordinates of each pixel cluster are calculated by a weighted average of the coordinates of all pixels within the cluster. The centroid trajectory sampling period is 40 milliseconds, forming location-time series data pairs.

[0034] In one optional implementation, the pixel clusters are aggregated into independent defect target regions using connected component analysis, and the motion trajectory vector of each defect target region is recorded, including: Connectivity detection is performed on the pixel clusters to identify sets of pixels that are interconnected within an eight-neighborhood range. Each set of connected pixels is marked as a connected region. The area and compactness parameter of each connected region are calculated. The compactness parameter represents the ratio of the perimeter of the connected region boundary to the area of ​​the region. Connected regions whose area is greater than the minimum area threshold and whose compactness parameter satisfies the morphological rule constraint are selected. The selected connected regions are determined as independent defect target regions. A unique identifier is assigned to each independent defect target region. The unique identifier is used to track the same defect target in subsequent frame images. In consecutive frame images, the centroid coordinates of defect target regions with the same unique identifier are detected. The displacement of the centroid coordinates of the defect target regions between adjacent frames is calculated. The displacement includes a horizontal displacement component and a vertical displacement component. The displacement is accumulated in time order to form a motion trajectory vector describing the spatial movement path of the defect target regions. Calculate the direction angle and velocity magnitude of the motion trajectory vector, where the direction angle represents the direction of motion of the defective target and the velocity magnitude represents the speed of movement of the defective target.

[0035] For example, after detecting a pixel cluster exceeding a dynamic threshold, an eight-neighbor connectivity detection is performed on each pixel. Specifically, taking the current pixel as the center, it is checked whether the pixels in its eight adjacent positions belong to the same pixel cluster. If the gray values ​​of adjacent pixels also exceed the dynamic threshold and they are directly adjacent in spatial location, these pixels are classified into the same connected component. After completing the full-image connectivity analysis by scanning pixel by pixel, a region growing algorithm or a disjoint-set data structure is used to mark all interconnected pixel sets as independently numbered connected components.

[0036] For each identified connected component, its area is calculated, which is equivalent to counting the total number of pixels contained in that connected component. Simultaneously, the boundary contours of the connected components are extracted, and their perimeters are obtained using chain code tracing algorithms or boundary tracking methods. The compactness parameter is defined as the ratio of the square of the perimeter of the connected component boundary to the area of ​​the region; this parameter reflects the regularity of the region's shape.

[0037] A minimum area threshold of 15 pixels is set to filter out noisy connected components with excessively small areas. Morphological constraints require the compactness parameter to be less than a preset upper limit, which is determined based on the typical defect morphological characteristics of explosive salt products. Connected components retained after double screening are identified as independent defect target regions. The system assigns a unique identifier to each region, consisting of a timestamp and spatial location information. The identifier format is a combination of "time T - X coordinate - Y coordinate".

[0038] In subsequent frame image processing, the spatial distance between the newly detected defect target region and the marked region in the previous frame is calculated. Using the minimum Euclidean distance matching principle, when the distance between the centroid of the new region and the centroid of a marked region is less than a matching threshold, they are determined to be observations of the same defect target at different times, inheriting its unique identifier. The centroid coordinates are obtained by calculating the weighted average of the horizontal and vertical coordinates of all pixels within the connected component, with the weights set to the grayscale values ​​of each pixel.

[0039] Record the centroid coordinates of a defect target in frame t as (x_t, y_t), and the corresponding centroid coordinates in frame t+1 as (x_{t+1}, y_{t+1}). Calculate the horizontal displacement component Δx = x_{t+1} - x_t and the vertical displacement component Δy = y_{t+1} - y_t. Store all displacement components from the detection start time to the current frame in time sequence to form a motion trajectory vector. This vector fully describes the spatial movement path of the defective target on the conveyor belt.

[0040] The motion characteristic parameters of the defect target are calculated based on the motion trajectory vector. The direction angle is calculated using the arctangent function, taking the ratio of the displacement components of two adjacent frames. The angle range is from 0 to 360 degrees, representing the direction of motion of the target relative to the horizontal baseline. The magnitude of velocity is defined as the displacement distance per unit time, calculated using the following formula: Δt is the inter-frame time interval. A sliding window is used to smooth the velocity values ​​of multiple consecutive frames, eliminating instantaneous fluctuations and obtaining a stable estimated velocity value. This velocity value is used for accurate prediction of subsequent sorting times.

[0041] In one optional implementation, a defect type discrimination rule tree is constructed. Based on the value range of each feature dimension in the composite feature matrix and the correlation constraints between features, feature matching and discrimination are performed sequentially according to a tree-like hierarchical structure. Each discrimination node divides defect subcategories according to feature threshold intervals, progressing layer by layer until the leaf node outputs the final defect type identifier, including: Establish a hierarchical classification structure for defect types, which includes a top-level defect category, a middle-level defect sub-category, and a bottom-level specific defect type; Analyze the correlation and dependency relationships among the frequency domain energy distribution features, spatial geometric morphology features, and temporal motion pattern features in the composite feature matrix, and determine the contribution of feature combinations to the discrimination of defect types; Construct a tree-like discrimination rule tree, wherein the root node of the discrimination rule tree corresponds to the discrimination rule of the top-level defect category, the intermediate-level nodes correspond to the discrimination rule of the middle-level defect subclass, and the leaf nodes correspond to the discrimination identifier of the bottom-level specific defect type; Starting from the root node, traverse the discrimination rule tree, extract the feature dimension value corresponding to the current node in turn, match the feature dimension value with the feature threshold range of the current node, select the child node branch to enter according to the matching result, and proceed layer by layer until the leaf node is reached, and output the final defect type identifier corresponding to the leaf node.

[0042] In the practical application of quality inspection for explosive salt products, when establishing a hierarchical classification structure for defect types, surface defects, morphological defects, and structural defects are considered as the top-level defect categories. The surface defect category is further divided into mid-level subcategories such as color abnormalities, spot contamination, and scratches / textures. The color abnormalities subcategory is further subdivided into bottom-level specific defect types such as localized yellowing, overall whitishness, and gradient color difference. The morphological defect category includes subcategories such as dimensional deviations, irregular shapes, and edge damage. The dimensional deviations subcategory can be further refined into specific types such as excessive length, insufficient width, and abnormal thickness. The structural defect category covers subcategories such as internal voids, uneven density, and abnormal crystal distribution.

[0043] When analyzing the correlation and dependency relationships among the features in the composite feature matrix, the energy concentration of the frequency domain energy distribution feature in the high-frequency band is strongly correlated with surface scratch texture. When the proportion of high-frequency energy exceeds 0.35, it usually points to surface texture defects. The aspect ratio parameter in the spatial geometric morphology feature contributes 0.72 to the discrimination of morphological defects, and the roundness parameter has an accuracy of 0.88 for identifying edge damage defects. The velocity fluctuation coefficient in the temporal motion pattern feature reflects the stability of the product during transmission. When this coefficient is greater than 0.15, it is necessary to combine it with spatial features to exclude false defects caused by motion jitter. Through mutual information entropy calculation, the joint discrimination capability of frequency domain features and spatial features is improved by 42% compared to single features, and temporal features, as an auxiliary verification dimension, can reduce the false detection rate by 15%.

[0044] When constructing the tree-like discrimination rule tree, the root node uses the overall variance of the frequency domain energy distribution characteristics as the initial discrimination criterion. A variance value less than 0.08 enters the surface defect branch, a variance value between 0.08 and 0.22 enters the morphological defect branch, and a variance value greater than 0.22 enters the structural defect branch. In the intermediate nodes of the surface defect branch, the mean value of the H component in the color space is used as the discrimination parameter. An H value deviating from the standard value by ±12 is classified as a color abnormality subclass. Leaf nodes are then set under this subclass, and the specific type is determined by the direction and magnitude of the H value deviation. A positive deviation with a magnitude between 12 and 20 outputs a localized yellowing indicator, while a negative deviation with a magnitude exceeding 18 outputs an overall whitish indicator. In the intermediate nodes of the morphological defect branch, the area-to-perimeter ratio is used for discrimination. A ratio below 0.65 indicates an edge damage subclass. The leaf nodes of this subclass distinguish between corner defects and side tears based on the distribution entropy value of the damage location.

[0045] When performing the discrimination rule tree traversal, the overall variance in the frequency domain of the root node in the input composite feature matrix is ​​first extracted. Assuming this value is 0.14, it is compared with the threshold range of the root node before entering the morphological defect branch. In the intermediate layer nodes of the morphological defect branch, the area-to-perimeter ratio feature value is extracted. If this value is 0.58, which is less than the threshold of 0.65, then the edge damage sub-branch is selected. Upon reaching the leaf node layer of the edge damage sub-branch, the entropy value of the damage location distribution is calculated. When the entropy value is 1.32, according to preset rules, the type of edge / corner defect corresponding to an entropy value greater than 1.2 is determined, and the final output defect type is identified as "morphological defect - edge damage - corner defect". Throughout the traversal process, the judgment result of each node is stored in the decision path vector for easy tracing of the discrimination basis. When the feature value of a node is at a fuzzy boundary, auxiliary judgment of adjacent feature dimensions is enabled, and the optimal branch selection is determined through a weighted voting mechanism to ensure classification robustness.

[0046] The method further includes: Configure a first discrimination rule for the root node. The first discrimination rule sets a first feature threshold interval set based on the value range of the frequency domain energy distribution feature. Different first feature threshold intervals correspond to different defect category branches. Configure a second discrimination rule for the intermediate layer node. The second discrimination rule sets a second feature threshold interval set based on the value range of the spatial geometric morphology features, and combines the defect categories already determined by the root node as constraints to limit the effective range of the second feature threshold interval set. A third discrimination rule is configured for the leaf node. The third discrimination rule sets a set of third feature threshold intervals based on the value range of the temporal motion pattern features, and forms a feature combination constraint by combining the discrimination results of the preceding nodes.

[0047] In the construction of the defect type discrimination rule tree, the root node undertakes the primary classification function. Based on the frequency domain energy distribution characteristics, a Fourier transform is performed on the independent defect target region to obtain its spectral energy concentration parameter. After normalizing this parameter to the interval of 0 to 1, a first feature threshold interval set is set. For example, when the energy concentration is less than 0.3, it is classified as a surface roughness defect; the interval between 0.3 and 0.6 corresponds to an edge damage defect; and the interval greater than 0.6 is classified as an internal void defect. Different intervals are directly mapped to the corresponding defect category branches to achieve coarse classification.

[0048] The intermediate layer nodes refine the distinction based on the root node's judgment result. When the root node has determined that the defect belongs to the surface roughness category, the texture directionality parameter and particle distribution uniformity are extracted from the spatial geometric features. When setting the second feature threshold interval set, only the feature value range related to surface roughness is considered. For example, if the texture directionality parameter is in the range of 45 degrees to 135 degrees and the particle distribution uniformity is less than 0.4, it is judged as a striped scratch; if the directionality parameter is distributed in multiple quadrants and the uniformity is between 0.4 and 0.7, it is judged as particle agglomeration. This constraint avoids the geometric features of internal void defects being mistakenly introduced into the surface roughness classification process, ensuring the targeted nature of the threshold interval setting.

[0049] The leaf node performs final type confirmation. Combining the defect categories and subcategories already determined by the preceding nodes, the temporal motion pattern characteristics are analyzed. For strip-shaped scratch defects, the aspect ratio change rate and centroid offset velocity in consecutive frames are extracted, and a third feature threshold interval set is set. When the aspect ratio change rate is less than 0.05 and the centroid offset velocity remains constant, it is determined to be a static scratch; if the aspect ratio fluctuates periodically and the offset velocity exhibits pulse-like jumps, it is determined to be a dynamic trailing scratch. At this point, a feature combination constraint is formed by comprehensively considering the energy distribution characteristics of the root node, the geometric morphology characteristics of the intermediate layer nodes, and the current temporal characteristics. Where w1, w2, and w3 are weighting coefficients, determined through statistical analysis of historical defect samples, F freq F geo F time These are the energy distribution characteristics, the geometric morphology characteristics of the intermediate layer nodes, and the current time series characteristics, respectively.

[0050] In the multi-level discrimination process, each node maintains an independent feature-threshold mapping table. The root node mapping table only contains the correspondence between frequency domain energy distribution features and the three major defect categories. The intermediate layer node mapping tables are expanded into two-dimensional matrices, with row indices representing the category identifiers output by the root node and column indices representing the quantized values ​​of geometric features. The leaf node mapping tables constitute a three-dimensional tensor, with the first two dimensions inheriting the discrimination results from the upper layer, and the third dimension corresponding to the discretized intervals of temporal features. When the composite feature matrix of a defect target is input into the rule tree, the mapping tables at each layer are queried sequentially, gradually narrowing the type range, and finally, a unique defect type identifier code is output at the leaf node.

[0051] To ensure the adaptability of the discrimination rules, new defect samples are continuously collected in actual production, and the distribution deviation of defect types within each feature threshold interval is statistically analyzed. When the misclassification rate in a certain interval exceeds the set threshold, the interval boundary fine-tuning mechanism is automatically triggered, shifting the boundary value by 0.02 to 0.05 units in the direction of the feature mean of the misclassified samples, and updating the corresponding record in the mapping table to ensure that the rule tree is dynamically optimized as the production process fluctuates.

[0052] In one optional implementation, the defect type identifier and the motion trajectory vector are spatiotemporally fused to determine the predicted time and spatial location of the defective product arriving at the sorting execution point. A sorting control instruction sequence is then generated based on the predicted time and spatial location, including: The physical attribute parameters of the defective product are extracted from the defect type identifier. The physical attribute parameters include the mass distribution characteristics and shape contour characteristics of the defective product. The motion state parameters of the defective product are extracted from the motion trajectory vector, and the motion state parameters include the current position coordinates, instantaneous velocity vector, and motion acceleration vector; Obtain the fixed spatial coordinates of the sorting execution point in the production line coordinate system, calculate the spatial displacement vector of the defective product from the current position coordinates to the fixed spatial coordinates, and calculate the time interval required for the defective product to move along the direction of the spatial displacement vector to reach the sorting execution point based on the instantaneous velocity vector and the motion acceleration vector. Add the current time to the time interval to obtain the predicted time. Based on the instantaneous velocity vector, the motion acceleration vector, and the time interval, the three-dimensional spatial coordinates of the defective product at the predicted time are calculated, and the three-dimensional spatial coordinates are determined as the predicted spatial position. The sorting strategy data table is queried according to the defect type identifier. The sorting strategy data table stores the actuator action parameters corresponding to different defect types. The action parameters include the extension distance and action rate of the actuator. Extract the actuator action parameters corresponding to the defect type identifier, and calculate the actuator start time by subtracting the actuator response delay time from the predicted time.

[0053] For example, after identifying the defect type, the system needs to correlate the defect classification results with the product motion state data to achieve precise spatiotemporal positioning and motion control. For each product marked as defective, the system first parses its defect type identifier field to extract the product's physical attribute parameters. The mass distribution characteristics are calculated based on the distribution location of the defect area on the product surface; for example, when defects are concentrated on one side of the product, it will cause a shift in the center of mass. The shape contour characteristics are quantified based on the degree of influence of the defect boundary on the overall outer contour of the product, including the maximum distance of the contour from the standard shape and the distribution density of the deviation points.

[0054] In parallel, the system extracts motion state parameters from the product's motion trajectory vector. The current position coordinates are obtained by converting the pixel coordinates of the centroid of the defect target area in the continuous frame images into three-dimensional coordinates in the production line coordinate system; the instantaneous velocity vector is calculated from the difference between the position coordinates of adjacent frames and normalized by the inter-frame time interval; the motion acceleration vector is obtained from the time derivative of the velocity vector, reflecting the speed change trend of the product during the conveyor belt operation.

[0055] After obtaining the preset fixed spatial coordinates of the sorting execution point in the production line coordinate system, the spatial displacement vector from the current position of the defective product to the execution point is calculated. The three components of this vector correspond to the displacement in the conveyor belt movement direction, the lateral offset direction, and the vertical height direction, respectively. Based on the kinematic model, the relationship between displacement, velocity, and acceleration is used... Where s is the displacement component along the conveyor belt direction, v0 is the projection of the current velocity in that direction, and a is the projection of the acceleration in that direction, the time interval t is obtained by solving for t. Adding the time recorded by the current system clock to the calculated time interval determines the predicted time when the defective product arrives at the sorting execution point.

[0056] Furthermore, by substituting the components of the instantaneous velocity vector and the corresponding components of the motion acceleration vector into the equation of motion, the position components of the product along the three coordinate axes at the predicted moment are calculated. Considering the possible slight vibrations of the conveyor belt or the rotation of the product itself, the system introduces a position correction factor to fine-tune the calculation results based on the statistical deviation of historical trajectory data, ultimately obtaining the three-dimensional coordinate values ​​of the predicted spatial position.

[0057] After determining the spatiotemporal positioning parameters, the system queries the sorting strategy data table based on the defect type identifier. This data table pre-stores the processing solutions for various defects. For example, surface color difference defects require the pneumatic push rod to extend 120 mm at a speed of 300 mm per second; while deformation defects require an extension of 150 mm at a speed of 250 mm per second to handle potential contour irregularities. After extracting the corresponding action parameters, the system subtracts the inherent response delay of the actuator from the predicted time. This delay includes the solenoid valve opening delay, air circuit pressurization time, and mechanical structure inertial response time, typically ranging from 50 to 80 milliseconds. The calculated start time is the precise time to send control commands to the actuator, ensuring that the push rod completes its extension action when the defective product arrives, achieving effective rejection.

[0058] A second aspect of the present invention provides a digital dynamic product quality inspection system for explosive salt products, comprising: The image acquisition unit is used to acquire multi-angle visual image streams of explosive salt products on the production line, perform spatiotemporal registration on the multi-angle visual image streams to obtain spatiotemporally synchronized image data, perform dynamic background separation on the spatiotemporally synchronized image data based on adaptive background modeling technology, determine pixel clusters in continuous frame images whose gray-level statistical distribution parameters exceed dynamic thresholds, aggregate the pixel clusters into independent defect target regions using connected component analysis, and record the motion trajectory vector of each defect target region. The image registration unit is used to perform multi-scale feature decomposition on the independent defect target region and extract a composite feature matrix including frequency domain energy distribution features, spatial geometric morphology features and temporal motion pattern features. The background separation unit is used to construct a defect type discrimination rule tree. Based on the value range of each feature dimension in the composite feature matrix and the correlation constraint relationship between features, feature matching and judgment are performed sequentially according to the tree-like hierarchical structure. Each judgment node divides the defect sub-category according to the feature threshold range, and the process is progressively advanced until the leaf node outputs the final defect type identifier. The defect extraction unit is used to perform spatiotemporal fusion of the defect type identifier and the motion trajectory vector to determine the predicted time and spatial position of the defective product arriving at the sorting execution point, and generate a sorting control instruction sequence based on the predicted time and spatial position to drive the actuator to complete the rejection of the defective product.

[0059] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0060] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0061] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A digital dynamic product quality testing method for explosive salt products, characterized in that, include: Multi-angle visual image streams of explosive salt products on the production line are collected. Spatiotemporal registration of the multi-angle visual image streams is performed to obtain spatiotemporally synchronized image data. Based on adaptive background modeling technology, dynamic background separation is performed on the spatiotemporally synchronized image data to identify pixel clusters in consecutive frames whose gray-level statistical distribution parameters exceed a dynamic threshold. Connectivity analysis is used to aggregate the pixel clusters into independent defect target regions, and the motion trajectory vector of each defect target region is recorded. The independent defect target region is subjected to multi-scale feature decomposition to extract a composite feature matrix including frequency domain energy distribution features, spatial geometric morphology features, and temporal motion pattern features; A defect type discrimination rule tree is constructed. Based on the value range of each feature dimension in the composite feature matrix and the correlation constraint relationship between features, feature matching and judgment are performed sequentially according to the tree-like hierarchical structure. Each judgment node divides the defect sub-category according to the feature threshold range, and the process is progressively advanced until the leaf node outputs the final defect type identifier. The defect type identifier and the motion trajectory vector are spatiotemporally fused to determine the predicted time and spatial location of the defective product arriving at the sorting execution point. Based on the predicted time and spatial location, a sorting control instruction sequence is generated to drive the actuator to complete the rejection of the defective product.

2. The method according to claim 1, characterized in that, The method further includes: A dynamic weighing device is set up in the detection area. The dynamic weighing device includes a weighing sensor and a signal acquisition unit. The weighing sensor is arranged on the bearing surface of the conveying path to sense the weight signal of the explosive salt product passing through in real time. The weight signal is acquired by the signal acquisition unit and filtered to remove noise components caused by vibration of the conveying equipment and environmental interference, so as to obtain a purified weight signal. The measured weight value of the explosive salt product is extracted based on the purified weight signal. The measured weight value is compared with the preset standard weight range. When the measured weight value deviates from the standard weight range, a weight anomaly mark is generated. The weight anomaly marker is associated and matched with the defect type identifier to determine whether the defect type identified by visual inspection is consistent with the weight deviation feature. When the theoretical weight deviation corresponding to the defect type identifier matches the actual deviation of the measured weight value, the defect judgment result is confirmed to be valid.

3. The method according to claim 1, characterized in that, Spatiotemporal registration is performed on the multi-angle visual image stream to obtain spatiotemporally synchronized image data. Dynamic background separation is then performed on the spatiotemporally synchronized image data based on adaptive background modeling technology to identify pixel clusters in consecutive frames whose grayscale statistical distribution parameters exceed a dynamic threshold, including: The feature point set of each viewpoint image in the multi-angle visual image stream is extracted. The feature point set includes corner features and edge intersection features. The correspondence between feature points between different viewpoint images is calculated. Matching feature point pairs are determined by the gray-level distribution similarity of the feature point neighborhood, and mismatched point pairs with inconsistent geometric positions are eliminated. Based on the matching feature point pairs, the spatial transformation matrix between viewpoints is calculated. The spatial transformation matrix describes the rotation and translation relationships of images from different viewpoints in the three-dimensional spatial coordinate system. The spatial transformation matrix is ​​used to perform coordinate mapping on images from different viewpoints, projecting images from different viewpoints onto a unified three-dimensional spatial coordinate system. A timeline index is established based on the image acquisition timestamp, and the images in the three-dimensional spatial coordinate system are arranged in chronological order to form a spatiotemporal four-dimensional data structure. For each pixel in a continuous frame image, calculate the deviation between the current frame grayscale value and the mean grayscale value of the background. When the absolute value of the deviation exceeds the multiple coefficient of the background grayscale variance, the pixel is determined to be a foreground pixel. Adjacent foreground pixels are aggregated into pixel clusters, and the pixel clusters satisfy the spatial continuity constraint.

4. The method according to claim 1, characterized in that, The pixel clusters are aggregated into independent defect target regions using connected component analysis, and the motion trajectory vector of each defect target region is recorded, including: Connectivity detection is performed on the pixel clusters to identify sets of pixels that are interconnected within an eight-neighborhood range. Each set of connected pixels is marked as a connected region. The area and compactness parameter of each connected region are calculated. The compactness parameter represents the ratio of the perimeter of the connected region boundary to the area of ​​the region. Connected regions whose area is greater than the minimum area threshold and whose compactness parameter satisfies the morphological rule constraint are selected. The selected connected regions are determined as independent defect target regions. A unique identifier is assigned to each independent defect target region. The unique identifier is used to track the same defect target in subsequent frame images. In consecutive frame images, the centroid coordinates of defect target regions with the same unique identifier are detected. The displacement of the centroid coordinates of the defect target regions between adjacent frames is calculated. The displacement includes a horizontal displacement component and a vertical displacement component. The displacement is accumulated in time order to form a motion trajectory vector describing the spatial movement path of the defect target regions. Calculate the direction angle and velocity magnitude of the motion trajectory vector, where the direction angle represents the direction of motion of the defective target and the velocity magnitude represents the speed of movement of the defective target.

5. The method according to claim 1, characterized in that, A defect type discrimination rule tree is constructed. Based on the value range of each feature dimension in the composite feature matrix and the correlation constraints between features, feature matching and judgment are performed sequentially according to the tree-like hierarchical structure. Each judgment node divides the defect subcategories according to the feature threshold range, progressing layer by layer until the leaf node outputs the final defect type identifier, including: Establish a hierarchical classification structure for defect types, which includes a top-level defect category, a middle-level defect sub-category, and a bottom-level specific defect type; Analyze the correlation and dependency relationships among the frequency domain energy distribution features, spatial geometric morphology features, and temporal motion pattern features in the composite feature matrix, and determine the contribution of feature combinations to the discrimination of defect types; Construct a tree-like discrimination rule tree, wherein the root node of the discrimination rule tree corresponds to the discrimination rule of the top-level defect category, the intermediate-level nodes correspond to the discrimination rule of the middle-level defect subclass, and the leaf nodes correspond to the discrimination identifier of the bottom-level specific defect type; Starting from the root node, traverse the discrimination rule tree, extract the feature dimension value corresponding to the current node in turn, match the feature dimension value with the feature threshold range of the current node, select the child node branch to enter according to the matching result, and proceed layer by layer until the leaf node is reached, and output the final defect type identifier corresponding to the leaf node.

6. The method according to claim 5, characterized in that, The method further includes: Configure a first discrimination rule for the root node. The first discrimination rule sets a first feature threshold interval set based on the value range of the frequency domain energy distribution feature. Different first feature threshold intervals correspond to different defect category branches. Configure a second discrimination rule for the intermediate layer node. The second discrimination rule sets a second feature threshold interval set based on the value range of the spatial geometric morphology features, and combines the defect categories already determined by the root node as constraints to limit the effective range of the second feature threshold interval set. A third discrimination rule is configured for the leaf node. The third discrimination rule sets a set of third feature threshold intervals based on the value range of the temporal motion pattern features, and forms a feature combination constraint by combining the discrimination results of the preceding nodes.

7. The method according to claim 1, characterized in that, The defect type identifier and the motion trajectory vector are spatiotemporally fused to determine the predicted time and spatial location of the defective product arriving at the sorting execution point. Based on the predicted time and spatial location, a sorting control instruction sequence is generated, including: The physical attribute parameters of the defective product are extracted from the defect type identifier, including the mass distribution characteristics and shape contour characteristics of the defective product; the motion state parameters of the defective product are extracted from the motion trajectory vector, including the current position coordinates, instantaneous velocity vector, and motion acceleration vector. Obtain the fixed spatial coordinates of the sorting execution point in the production line coordinate system, calculate the spatial displacement vector of the defective product from the current position coordinates to the fixed spatial coordinates, and calculate the time interval required for the defective product to move along the direction of the spatial displacement vector to reach the sorting execution point based on the instantaneous velocity vector and the motion acceleration vector. Add the current time to the time interval to obtain the predicted time. Based on the instantaneous velocity vector, the motion acceleration vector, and the time interval, the three-dimensional spatial coordinates of the defective product at the predicted time are calculated, and the three-dimensional spatial coordinates are determined as the predicted spatial position. The pre-defined sorting strategy data table is queried based on the defect type identifier. The sorting strategy data table stores the actuator action parameters corresponding to different defect types. The action parameters include the extension distance and action rate of the actuator. The actuator action parameters corresponding to the defect type identifier are extracted, and the start time of the actuator is calculated by subtracting the response delay time of the actuator from the predicted time.

8. A digital dynamic product quality inspection system for explosive salt products, used to implement the method as described in any one of claims 1-7, characterized in that, include: The image acquisition unit is used to acquire multi-angle visual image streams of explosive salt products on the production line, perform spatiotemporal registration on the multi-angle visual image streams to obtain spatiotemporally synchronized image data, perform dynamic background separation on the spatiotemporally synchronized image data based on adaptive background modeling technology, determine pixel clusters in continuous frame images whose gray-level statistical distribution parameters exceed dynamic thresholds, aggregate the pixel clusters into independent defect target regions using connected component analysis, and record the motion trajectory vector of each defect target region. The image registration unit is used to perform multi-scale feature decomposition on the independent defect target region and extract a composite feature matrix including frequency domain energy distribution features, spatial geometric morphology features and temporal motion pattern features. The background separation unit is used to construct a defect type discrimination rule tree. Based on the value range of each feature dimension in the composite feature matrix and the correlation constraint relationship between features, feature matching and judgment are performed sequentially according to the tree-like hierarchical structure. Each judgment node divides the defect sub-category according to the feature threshold range, and the process is progressively advanced until the leaf node outputs the final defect type identifier. The defect extraction unit is used to perform spatiotemporal fusion of the defect type identifier and the motion trajectory vector to determine the predicted time and spatial position of the defective product arriving at the sorting execution point, and generate a sorting control instruction sequence based on the predicted time and spatial position to drive the actuator to complete the rejection of the defective product.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.