Hazardous waste package integrity detection early warning method
By combining nonnegative matrix factorization and long short-term memory networks, the problems of accuracy and false alarm rate in traditional leakage detection methods when identifying early weak leakage signals are solved, and efficient early warning for hazardous waste packaging containers is achieved.
Patent Information
- Application Number
- CN202511500577.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-10-21
AI Technical Summary
Traditional leakage detection methods cannot effectively identify early, weak leakage signals and have a high false alarm rate, making it difficult to provide timely warnings for hazardous waste packaging containers.
By employing a nonnegative matrix factorization algorithm combined with spatial smoothing and competitive mutual exclusion constraints, suspicious areas are screened out through multispectral image data processing, and risk trend prediction is performed using a long short-term memory network to generate early warning signals.
It improves the accuracy of identifying early, weak leakage signals, reduces the false alarm rate, and achieves a leap from post-event detection to pre-event warning, ensuring that safety management decisions are made in advance.
Smart Images

Figure CN120976872A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data processing technology, and in particular to a method for detecting and warning of the integrity of hazardous waste packaging. Background Technology
[0002] In the field of industrial safety, the airtightness of hazardous waste packaging containers is of paramount importance. Minor leaks caused by aging, micro-cracks, or corrosion, if not detected in time, can lead to serious environmental pollution and safety accidents.
[0003] Traditional leak detection mainly relies on manual visual inspection and simple instrument testing. However, these two methods have revealed significant limitations in modern large-scale industrial production: manual visual inspection is highly subjective and cannot effectively detect micro-cracks or early signs of leakage that are invisible to the naked eye; while simple instrument testing is more sensitive to large-scale leaks, it has low sensitivity to early signs of leakage, such as trace amounts of material precipitation or the formation of tiny oil films, and is therefore unable to provide effective early warning.
[0004] In related technologies, spectral analysis is used for defect detection. Multispectral imaging captures reflectance data of the packaging surface, and then spectral unmixing algorithms are used to analyze the composition of the substances adhering to the surface. Non-negative matrix factorization (NMF) is a commonly used technique in spectral unmixing, which decomposes mixed spectra into endmember spectra of multiple pure substances and their corresponding abundance matrices. However, traditional NMF algorithms have inherent limitations when applied to the specific scenario of early leakage detection: First, the algorithm lacks consideration of the physical characteristics of leakage, easily misjudging background noise or spectral fluctuations of the material itself as leakage, leading to a high false alarm rate; second, in the early stages of leakage, the spectral signal of the leakage precursor is extremely weak and highly mixed with the background spectrum of the packaging material, making it difficult for traditional NMF algorithms to effectively separate the two, resulting in insufficient ability to identify weak leakage signals. Summary of the Invention
[0005] To address the technical problems of traditional nonnegative matrix factorization algorithms, which lack consideration of the physical characteristics of leakage during spectral unmixing, are prone to misjudging background noise, and struggle to separate the mixed spectra of weak leakage precursors and packaging materials, thus affecting detection accuracy, this invention provides a method for detecting and warning of hazardous waste packaging integrity. This method includes the following steps: Multispectral image data of the surface of hazardous waste packaging containers is collected and preprocessed to obtain reflectance spectral data. The reflectance spectral data is then filtered to locate suspicious areas. Non-negative matrix factorization (NMF) is used to demix the reflectance multispectral data of the suspicious areas, resulting in an abundance map containing both leachate endmembers and container background endmembers. The objective function of the NMF includes a fidelity term to ensure spectral reconstruction accuracy and a regularization term to constrain the spatial distribution of the abundance matrix. The regularization term includes a spatial smoothing constraint based on the total variational sum of the abundance map and a spatial competitive mutual exclusion constraint based on the product of the abundance values of the leachate endmembers and container background endmembers at the same pixel. The abundance map of the leachate endmembers is extracted, and their risk quantification index is calculated to form time-series data reflecting the development of leakage. The time-series data is input into a pre-trained long short-term memory (LSTM) network model for prediction to obtain the future trend of the risk quantification index. A warning signal is generated based on the future trend.
[0006] This invention incorporates the dual constraints of spatial smoothness and spatial competitive mutual exclusion into the objective function, integrating the prior physical knowledge that the leaked material should be spatially continuous and cover the original background into the algorithm model. This enables the invention to effectively suppress interference from background noise and material fluctuations, improving the accuracy of identifying early, weak leak signals and reducing the false alarm rate. Furthermore, this invention utilizes a Long Short-Term Memory (LSTM) network to predict trends in quantified risk indicator time-series data, achieving a leap from post-event detection to pre-event warning. It can issue timely alerts before leaks worsen, providing a lead time for safety management decisions.
[0007] Preferably, the objective function of the nonnegative matrix decomposition satisfies the following relation: ; in, It is the objective function value of the suspicious region; It is the spectral matrix of the suspicious region; It is the endmember matrix of the suspicious region; It is the abundance matrix of the suspicious regions; It is the square of the Frobenius norm; It is the abundance matrix of the suspicious region. The regularization constraint term.
[0008] This invention establishes a mathematical framework for integrating prior physical knowledge into the optimization objective by explicitly adding regularization constraints. This allows the optimization direction of the algorithm to not only pursue the fitting accuracy of the data, but also take into account the physical reality of the understanding, thereby improving the reliability of the spectral unmixing results.
[0009] Preferably, the regularization constraint term satisfies the following relation: ; in, It is the abundance matrix of the suspicious region. Regularization constraints; This is the preset total number of endpoints; It is a total variational operator; It is an abundance matrix The OK; The leakage end-member is in the first Abundance value per pixel, It is an index of the leaked material end-member; The container background terminator is in the first... Abundance values per pixel; It is the index of the container background terminator; , These are the weight coefficients of the first and second terms in the relation, respectively. It represents the total number of pixels within the suspicious area.
[0010] This invention further defines the regularization constraint terms. By using the total variation term and the abundance value product term, the spatial smoothness constraint and the competitive mutual exclusion constraint are transformed into mathematical functions. This combined constraint term, which is designed for the physical characteristics of leakage, can guide the algorithm to separate the leakage area that conforms to the physical laws, ensuring the continuity of the leakage area and clearly defining the boundary between the leakage area and the container background.
[0011] Preferably, the abundance update rule of the leakage endmembers satisfies the following relation: ; in, The updated index is The leakage end element in the first Abundance values per pixel; It is the endmember matrix of the suspicious region. transpose; It is the spectral matrix of the suspicious region; yes and product The Middle line, number Column elements; It is the abundance matrix of the suspicious regions; yes , , product The Middle line, number Column elements; It is a spatial continuity constraint term abundance value The partial derivative of the first The value of each pixel; It is the preset first minute value.
[0012] This invention integrates two constraint terms derived from spatial smoothness and competitive mutual exclusion constraints into the denominator. This ensures that for the abundance of percolation at a pixel to increase, not only must its spectrum resemble percolation itself, but it must also not disrupt the smoothness of the region, and it cannot be forcibly increased at locations where the background abundance is already high. This mechanism ensures that each iteration of the algorithm proceeds in a more physically reasonable direction, avoiding the problem of isolated noise points being misclassified as percolation.
[0013] Preferably, the step of filtering the reflectance spectral data to locate suspicious areas includes: calculating the spectral angle between the reflectance spectral data of each pixel in the image and a preset reference spectrum, and determining pixels with spectral angles greater than a preset angle threshold as suspicious pixels; calculating the spectral first derivative of the suspicious pixels, and comparing its similarity with a pre-stored template of the spectral first derivative of known leaking substances, and recording the area formed by suspicious pixels with similarity higher than a preset similarity threshold as a suspicious area.
[0014] This invention first performs a large-scale preliminary screening using fast spectral angle matching to eliminate most normal background; then, it uses more refined spectral derivative matching to confirm only a small number of suspicious pixels. This coarse-screening plus fine-screening strategy reduces the amount of data that needs to be calculated for NMF in the subsequent process.
[0015] Preferably, the similarity is determined using the Pearson correlation coefficient method.
[0016] Preferably, the method for obtaining the first derivative template of the spectrum is as follows: perform spectral measurement on a known leaking substance to obtain its standard spectrum, and calculate the first derivative of the standard spectrum.
[0017] Preferably, the method for obtaining the preset reference spectrum includes: selecting an uncontaminated background area in the currently acquired multispectral image data, and using the average value of the spectra of all pixels in the background area as the preset reference spectrum.
[0018] Preferably, the risk quantification index includes: the total abundance value of the end-member abundance map of the leakage material, or the area of the largest connected region in the end-member abundance map of the leakage material.
[0019] Preferably, generating an early warning signal based on the future trend includes: generating a Level 1 early warning when the future trend indicates that the risk quantification indicator will continue to increase; and generating a Level 2 early warning when the future trend indicates that the risk quantification indicator will exceed a preset safety threshold.
[0020] The beneficial effects of this invention are as follows: First, this invention obtains suspicious areas by combining spectral angle screening and spectral derivative screening, reducing the amount of data required for subsequent NMF calculations. Next, it decomposes the reflectance spectral data of the suspicious areas using non-negative matrix decomposition. Then, by introducing dual constraints of spatial smoothing and spatial competitive mutual exclusion into the objective function of spectral mixing, it incorporates the prior physical knowledge that the leaked material should be spatially continuous and cover the original background into the algorithm model. This allows the invention to effectively suppress interference from background noise and material fluctuations, improving the accuracy of identifying early, weak leak signals and reducing the false alarm rate. Furthermore, this invention utilizes a Long Short-Term Memory (LSTM) network to predict the trends of quantified risk indicator time-series data, achieving a leap from post-discovery to pre-discovery warning. It can issue timely alerts before the leak problem worsens, providing a lead time for safety management decisions. Attached Figure Description
[0021] Figure 1 A flowchart of a method for detecting and warning the integrity of hazardous waste packaging provided in an embodiment of the present invention. Detailed Implementation
[0022] This invention provides a method for detecting and warning of the integrity of hazardous waste packaging, such as... Figure 1 As shown, the method includes steps S100-S400: Step S100: Collect multispectral image data of the surface of hazardous waste packaging containers and preprocess it to obtain reflectance spectral data.
[0023] It should be noted that this step is the data acquisition foundation for the entire detection and early warning process. By collecting images of the packaging container in multiple discrete bands, the spectral reflectance information of its surface is obtained, providing prerequisite data support for subsequent identification of changes in optical properties caused by leakage precursors.
[0024] In practice, a multispectral camera covering the ultraviolet, visible and near-infrared bands is used to periodically scan and image the surface of the hydraulic oil packaging container. The periodicity is to continuously monitor the dynamic changes in the spectrum of the container surface in order to capture early signs of the adsorption or deposition of leakage precursor substances in a timely manner.
[0025] Furthermore, to eliminate the impact of ambient light variations and dark current noise from the camera sensor itself on data accuracy, the acquired raw light intensity data needs to be corrected to reflectance. This transforms the original multidimensional light intensity data into a standardized reflectance spectral data cube. This data cube uses pixels as the basic unit, and the spectral information of each pixel corresponds to a vector containing reflectance values of several different wavelength bands. This vector is the spectral fingerprint required for subsequent analysis. When the spectral fingerprint of a certain pixel changes, it indicates that the optical properties of the packaging container surface have changed, most likely due to the adsorption or deposition of leakage precursor substances on the surface. This change will serve as a key basis for subsequent feature extraction and risk assessment. How to correct reflectance is a current technology and will not be elaborated upon here.
[0026] Thus, the reflectance spectral data were obtained.
[0027] Step S200: Filter the reflectance spectral data to locate suspicious areas.
[0028] It should be noted that, considering the massive amount of data in the entire multispectral image, directly performing complex spectral unmixing operations is inefficient. Furthermore, leakage precursors typically only appear in localized areas. Therefore, it is necessary to filter out areas with significant spectral differences from the normal background from the entire image, marking them as suspicious areas. This narrows down the scope of subsequent detailed analysis and improves detection efficiency. In this embodiment, a screening strategy combining spectral angle mapping screening and spectral derivative screening is used.
[0029] For spectral angle mapping screening, under normal and clean conditions, the surfaces of the same packaging container or packaging containers from the same batch exhibit macroscopic consistency in material and condition; therefore, the shapes of their spectral reflectance curves should also be highly similar. When trace amounts of leakage precursor substances, such as oil films formed by the condensation of volatile organic compounds or salts produced by acid mist corrosion, adhere to their surfaces, they will alter the spectral response characteristics of that local area, specifically manifested as changes in the shape of the spectral curve. Spectral angle is an effective indicator for measuring the similarity of the shapes of two spectral vectors. It is insensitive to changes in the overall brightness of the spectrum and is suitable for identifying such spectral shape variations caused by changes in material composition.
[0030] Based on the above logic, taking any pixel as the pixel to be detected, the degree of abnormality is determined by calculating the spectral angle between the spectrum of the pixel to be detected and the preset normal background reference spectrum. The spectral angle satisfies the following relationship: ; in, It is the spectral angle between the spectral vector of the pixel to be detected and the preset normal background reference spectral vector, and its value range is... ; It is the spectral vector of the pixel to be detected. ,in For this pixel in the th Reflectivity of each band This represents the total number of spectral bands. It is a preset normal background reference spectral vector; as a preferred implementation, the reference spectrum can be obtained by selecting a confirmed uncontaminated and representative background area in the current image and calculating the average value of the spectrum of all pixels in the area, so as to adapt to changes in current lighting and environment. , They are vectors and The L2 norm is used to normalize the spectral vector to eliminate overall brightness differences caused by uneven illumination or surface angle. It is an inverse cosine function.
[0031] In this relationship, the closer the spectral shape of the pixel to be detected is to the reference spectrum, the more consistent the directions of the two vectors are, and the closer their inner product, after norm normalization, is to 1, thus making the calculated spectral angle more consistent. The closer it is to 0. Conversely, when a pixel is contaminated by the precursor substance, its spectral shape changes, leading to a change in the vector. and The direction deviates. The value increases. Therefore, The value quantifies the difference in spectral shape between the region where the pixel to be detected is located and the normal background.
[0032] By performing the above operation on each pixel in the image, a spectral angle plot can be generated. Analyzing the pixel value histogram of this plot usually reveals two main peaks: one corresponding to a large area of normal background, and the other... The values are concentrated in the main peak of the low-value region because the normal background accounts for a much larger proportion of the image than the local abnormal region, resulting in a large number of pixels with low θ values; the other corresponds to a small number of abnormal regions. The values are distributed in the secondary peak of the high-value region because the abnormal region accounts for a small proportion and the number of pixels with high θ values is small.
[0033] As a preferred implementation, the segmentation threshold used to distinguish between normal and abnormal regions can be set to a value slightly larger than the distribution range of the main peak. For example, the segmentation threshold can be set to the mean of the spectral angle distribution of the normal background region plus three times its standard deviation. All pixels with spectral angles greater than the segmentation threshold will be marked as preliminary suspicious regions and enter the next screening process.
[0034] For spectral derivative screening, after initially identifying suspected regions through spectral angle mapping, this step further refines them. Many common leakage precursors, such as specific solvents, additives, and acidic substances, possess specific chemical bonds in their molecular structures. These chemical bonds generate characteristic absorption within specific wavelength ranges, forming weak absorption valleys in the reflectance spectrum. These absorption valleys may be difficult to detect in the original spectrum due to weak signals or being masked by noise, but in the first derivative curve of the spectrum, they transform into zero-crossing or peak-valley features, thus being effectively amplified and identified. Based on the above logic, this step performs the following operations on each pixel within the initially suspected region: First, extract the complete spectral vector of the pixel to be detected. As input, the first derivative of this spectral vector is then calculated to generate a new first-derivative spectrum that amplifies the absorption characteristics. This process calculates reflectance. Along the spectral dimension band number The rate of change.
[0035] Preferably, the central difference method is used for calculation: ; in, It is the first The pixel in the first The first-order spectral derivative values for each band; It is the first The pixel in the first Reflectivity of each band; It is the spectral band number; It is the band increment, usually taken as 1.
[0036] This invention utilizes all wavebands By performing this calculation, we can obtain the value belonging to the th A complete first-order derivative spectral vector of pixels. First derivative spectral vector Each value in the curve reflects the original spectral curve. The intensity of the upward or downward trend in the corresponding wave band.
[0037] The first derivative spectrum of the pixel to be detected is calculated. Then, it is matched with the first derivative spectral templates of known leaking substances, such as specific VOCs, acid mist, oil film, etc., which are pre-stored in the spectral fingerprint database. This spectral fingerprint database is constructed by experimentally measuring and storing the first derivative spectra of known leaking substances.
[0038] As a feasible implementation method, the similarity matching here is performed by calculating the Pearson correlation coefficient. To achieve this, the calculated correlation coefficient With a preset similarity threshold A comparison is made. As a preferred implementation, a similarity threshold is used. Can be set to ;when Below When the morphological difference between the spectrum of the pixel to be detected and the template spectrum is large, it is considered that it may be caused by other types of noise or non-target substances, and is judged as a non-target anomaly; when When the value is above this threshold, the spectral derivative features of the pixel to be detected are considered to be highly matched with the fingerprint features of known leaking substances. For example, the threshold is set... Set as It can balance the sensitivity and specificity of detection, effectively eliminate the interference of background noise, and ensure reliable identification of target leakage precursors.
[0039] Ultimately, all similarities Greater than the threshold The pixels to be detected are identified as highly suspicious pixels, and the area formed by these highly suspicious pixels is the finally selected suspicious area. Through the above two steps of screening, the amount of data that needs to be processed is reduced while ensuring the detection rate.
[0040] Step S300: The reflectance multispectral data of the suspected region is subjected to spectral unmixing using non-negative matrix factorization to obtain an abundance map containing endmembers of leakage material and container background. The objective function of the non-negative matrix factorization includes a fidelity term to ensure the accuracy of spectral reconstruction and a regularization term to constrain the spatial distribution of the abundance matrix.
[0041] It should be noted that the spectral signals in the suspected areas identified through screening are typically a linear mixture of the spectral characteristics of multiple substances, i.e., endmembers. Endmembers refer to single substances with pure spectral characteristics, such as pure packaging container substrate materials, pure adsorbed leakage precursor substances, or pure airborne dust. In order to accurately quantify the abundance of leakage precursor substances, i.e., the concentration or coverage of the substances, the mixed spectrum must be decomposed into pure endmember spectra and their corresponding abundances.
[0042] Nonnegative matrix factorization (NMF) is a commonly used spectral decomposition technique. This algorithm decomposes a complex mixed spectral matrix into the product of two nonnegative matrices, corresponding to the pure endmember spectral matrix and abundance matrix, respectively. The decomposition process adheres to the physical nature of nonnegativity in spectral signals, avoiding meaningless negative coefficients and possessing natural adaptability in processing multi-component mixed spectra. However, traditional NMF algorithms have limitations when applied to leakage detection scenarios. They only aim to minimize the error between the mixed spectrum and the reconstructed spectrum after decomposition, without considering the physical characteristics of the leakage process. This can easily lead to the endmember abundance distribution obtained from the decomposition not conforming to the spatial distribution pattern of leakage, such as the appearance of discrete, discontinuous high-abundance regions, failing to reflect the true leakage situation. Therefore, this invention optimizes the objective function and update rule of traditional nonnegative matrix factorization.
[0043] Using nonnegative matrix factorization, the mixed spectral matrix of the screened suspicious regions is decomposed into an abundance matrix and an endmember matrix, achieving spectral unmixing. The decomposition formula satisfies the following relationship: ; in, It is the spectral matrix of the suspicious region; It is the abundance matrix of the suspicious regions; This is the endmember matrix of the suspicious region. The specific decomposition process is existing technology and will not be elaborated here.
[0044] Specifically, an NMF objective function with dual spatial constraints is constructed, corresponding to the spatial sparsity and spatial continuity of leakage, respectively. This invention adds a regularization term after the reconstruction error term in traditional NMF. This regularization term constrains solutions that do not conform to the physical characteristics of leakage, thereby guiding the decomposition results towards the physical reality and making the decomposition results more consistent with the actual spatial distribution and material composition of leakage.
[0045] Based on the above logic, the improved objective function satisfies the following relation: ; in, The objective function value for the suspicious region represents the overall optimization objective of spectral unmixing. The algorithm's goal is to find the objective function value for the suspicious region. The smallest endmember matrix and abundance matrix; It is the spectral matrix of the suspicious region, with dimensions of , It is the number of spectral bands. It represents the total number of pixels within the suspicious area; It is the endmember matrix of the suspicious region, with dimension 1. , This is the preset total number of endpoints; This is the abundance matrix of the suspicious regions, with dimensions of . ; It is the square of the Frobenius norm; It is the abundance matrix of the suspicious region. The regularization constraint term is used to embed the physical characteristics of leakage, and the specific calculation method is detailed below.
[0046] In this relation, the first term This is the data fidelity item, used to ensure the reconstruction accuracy of spectral data while maintaining the basic decomposition capability of the NMF algorithm. (Second item) This is the regularization term introduced in this invention. By applying dual constraints, the decomposition results are more reasonable at the physical level, which can effectively avoid the large-area fuzzy solutions or isolated false points that may be generated by the traditional NMF method, which do not conform to the physical process of leakage spreading from a local point source.
[0047] It should be noted that leakage, as a fluid diffusion process, should result in a contaminated area that is continuous and smooth in space, rather than isolated, randomly distributed noisy spots. At any physical point, when leakage occurs, it will inevitably cover or replace the original packaging container. This means that the abundance of the leakage and the container background are mutually exclusive and cannot coexist in large quantities at the same time.
[0048] Based on this, the constraint terms of the abundance matrix of the suspicious region satisfy the following relation: ; in, It is the abundance matrix of the suspicious region. Regularization constraints; This is the preset total number of endpoints; It is a total variation operator that acts on the abundance map of a single endmember to calculate the L1 norm of its gradient, which is used to measure the smoothness of the abundance map. The smoother the abundance map, the lower its total variation value. It is an abundance matrix The Line, it constitutes the first Abundance map of endmembers throughout the suspected region; The leakage end-member is in the first Abundance value per pixel, It is an index of the leaked material end-member; The container background terminator is in the first... Abundance values per pixel; It is the index of the container background terminator; , These are the weight coefficients of the first and second terms of the relation, respectively. It represents the total number of pixels within the suspicious area.
[0049] In this relation, the first term The first term is the spatial continuity constraint. By minimizing the total variation sum of all endmember abundance maps, it promotes a smoother and more continuous spatial distribution of the abundance of each generated substance, effectively suppressing the generation of isolated noise points. The second term... This invention introduces a competitive mutual exclusion constraint term. By minimizing the competitive mutual exclusion term, each pair of... The product approaches zero, which means that at any pixel point A clear choice must be made between the leaked material and the container background. Fuzzy solutions with high abundance of both cannot be tolerated. Therefore, the physical phenomenon of the leak covering the background is transformed into a mathematical constraint, so that the boundary of the leaked area in the unmixing result has a clearer physical meaning.
[0050] It should be noted that the weighting coefficients and The values of these two parameters need to be balanced between data fidelity, spatial smoothness, and material repulsion.
[0051] Specifically, the weighting coefficient It controls the strength of the spatial continuity constraint, if Setting the weight coefficient too high may cause the abundance map to become overly smoothed, blurring the fine boundaries of leakage regions; setting it too low will result in insufficient constraint and an inability to effectively suppress isolated noise points. This determines the strength of the competitive mutual exclusion constraint. Setting the value too high may force the differentiation between the leakage material and the background in the early stages of decomposition, affecting the stable convergence of the algorithm; setting it too low will fail to effectively achieve the mutual exclusion of the two endmember abundances, resulting in unclear physical meaning of the decomposition results.
[0052] As a preferred implementation method, and The specific value can be determined through cross-validation.
[0053] For example, on a sample dataset containing known leakage cases, multiple groups were systematically tested using methods such as grid search. Combine and select the set of parameters that optimizes the unmixing result as the final settings. In cases where a large number of prior samples are lacking for training, settings can also be made based on experience. For example, to ensure the stability of the algorithm while effectively applying constraints, The preferred range can be set to to ,and The preferred range can be set to to This setup allows for a good balance between spectral reconstruction accuracy and the rationality of physical constraints. Methods such as grid search are existing technologies and will not be elaborated upon here.
[0054] Thus, the optimized objective function has been obtained.
[0055] It should be noted that, in order to solve the objective function containing dual constraints, this invention employs a multiplicative update rule for the abundance matrix. Iterative optimization is performed, a method derived from the gradient descent idea, by adjusting the objective function... For elements in the abundance matrix The gradient is split and a multiplicative iterative form with non-negativity is constructed, thereby driving the objective function to converge toward the minimum while ensuring that the abundance value is non-negative.
[0056] Specifically, the update rules of this invention consist of two parts: update rules for the abundance of leakage endmembers and container background endmembers, which will be described separately below.
[0057] The goal of updating the abundance of leachate is to integrate the mathematical precision of spectral unmixing with the physical laws of leakage diffusion. On one hand, it uses the similarity between the leachate endmembers and the pixel spectra to ensure that abundance growth always relies on the true spectral signal. On the other hand, it forms an iterative framework through three key constraints: it retains standard spectral reconstruction terms to ensure the mathematical accuracy of unmixing, adds smoothness constraints to force a continuous distribution of leachate abundance, aligning with the spatial characteristics of leakage as fluid diffusion, and introduces mutual exclusion constraints to achieve the inverse relationship between the abundance of leachate and the container background, conforming to the physical logic of leachate covering the background. In this process, a multiplicative iterative approach is used to ensure the non-negativity of abundance and iterative convergence. Ultimately, it specifically addresses the problems that traditional NMF easily encounters in leakage detection, such as discrete false points and ambiguous solutions with high abundance, which violate physical principles. This ensures that the unmixing results meet both spectral accuracy requirements and match actual leakage scenarios.
[0058] Based on the above logic, the update rule for the abundance of leachate satisfies the following relation: ; in, The updated index is The leakage end element in the first Abundance values per pixel; In the current iteration step, the index is The leakage end element in the first Abundance values per pixel; It is the endmember matrix of the suspicious region. transpose; It is the spectral matrix of the suspicious region; yes and product The Middle line, number The element in the column, this item measures the end-member spectrum of the leakage material compared to the first element. The similarity of the spectra of individual pixels; It is the abundance matrix of the suspicious regions; yes , , product The Middle line, number The element in the column, which represents the reconstruction of the original spectrum based on the current solution, is the denominator term in the traditional NMF update rule; It is a spatial continuity constraint term abundance value The partial derivative of the first The value of each pixel, this item is quantized. The effect of changes on the smoothness of the entire leakage abundance map; Is the index as The container background endmember in the first Abundance values per pixel; , These are the weight coefficients for the spatial continuity constraint term and the competitive mutual exclusion constraint term, respectively. It is a preset first tiny value used to prevent the denominator from being 0. It can be set to 0.001 or adjusted as needed.
[0059] This relationship sets three thresholds for the increase in the abundance of leachate: First, the molecular... The spectral characteristics of the pixel itself must match the spectral fingerprint of the leak; this is the basis for growth. Secondly, the denominator... The terms constitute a smoothness constraint, if The growth of this derivative will disrupt the local smoothness of the abundance map, causing it to increase and thus increasing the denominator, thereby inhibiting its growth; the denominator contains... The terms constitute a competitive constraint within the same pixel. Above, if the abundance of the container background If the value is already high, this term will become a significant constraint, increasing the denominator and thus suppressing the abundance of leachate. Growth.
[0060] Similarly, the update rule for the container background abundance also follows symmetric logic, and its update is competitively suppressed by the abundance of leachate.
[0061] Based on the above logic, the update rule for the container background abundance satisfies the following relation: ; in, The updated index is The container background endmember in the first Abundance values per pixel; In the current iteration step, the index is The container background endmember in the first Abundance values per pixel; It is the endmember matrix of the suspicious region. transpose; It is the spectral matrix of the suspicious region; yes and product The Middle line, number The element of the column, which measures the relationship between the container background endmember spectrum and the first element. The similarity of the spectra of individual pixels; It is the abundance matrix of the suspicious regions; yes , , product The Middle line, number The element in the column, which represents the reconstruction of the original spectrum based on the current solution, is the denominator term in the traditional NMF update rule; It is a spatial continuity constraint term abundance value The partial derivative of the first The value of each pixel, this item is quantized. The effect of changes on the smoothness of the entire container background abundance map; Is the index as The leakage end element in the first Abundance values per pixel; , These are the weight coefficients for the spatial continuity constraint term and the competitive mutual exclusion constraint term, respectively. It is a preset second tiny value used to prevent the denominator from being 0. It can be set to 0.001 or adjusted as needed.
[0062] In this relation, the denominator contains... The term constitutes a competitive penalty for the increase in container background abundance, when the abundance of leachate... At higher levels, the increase in packaging abundance will be suppressed.
[0063] In summary, through the two symmetrical multiplicative update rules with dual constraints, this invention constructs a dynamic iterative system in which the abundance of the seepage material and the container background at each pixel competes and restricts each other in each iteration. This update mechanism ensures that the abundance map obtained after the algorithm converges is not only spatially continuous and smooth, but also clearly mutually exclusive in terms of material composition, thereby restoring the physical reality of the seepage covering the background.
[0064] By iteratively calculating the above update rules, until the abundance matrix is obtained... Once convergence is achieved, the final abundance map containing information about the leakage material can be obtained.
[0065] Step S400: Extract the abundance map of the endmembers of the leaked material and calculate its risk quantification index to form time series data reflecting the development of the leak; input the time series data into a pre-trained long short-term memory network model for prediction to obtain the future trend of the risk quantification index; generate an early warning signal based on the future trend.
[0066] It should be noted that the abundance value obtained from a single detection only reflects the static pollution status at the current moment, while leakage is a dynamic process, and its real risk lies in the continuous increase of the polluted area or concentration. Therefore, this step performs time-series analysis on the abundance data of the leakage material obtained at consecutive time points to determine its development trend, thereby upgrading from static detection to dynamic early warning.
[0067] In practice, after each detection process from step S100 to step S300 is completed, the abundance matrix obtained at the end is... From this, an abundance map representing the leakage material is extracted. Subsequently, key indicators from this abundance map are calculated as the risk quantification value at the current moment.
[0068] As a preferred implementation, the key indicator can be selected as the total abundance value or the area of the largest connected region. The total abundance value is the sum of the abundance values of all pixels in the abundance map, reflecting the total volume or area of pollution; the area of the largest connected region reflects the size of the largest single pollution area.
[0069] The risk quantification values calculated for each period are stored chronologically in a time-series database, forming a time series reflecting the leakage development process. This time series is then input into a pre-trained Long Short-Term Memory (LSTM) network model. LSTM is a recurrent neural network adept at learning and predicting long-term dependencies in time series. By training on a large amount of real or simulated leakage development data, this model can accurately capture various growth patterns of leakage, from nothing to something, and from slow to fast. The LSTM model receives a sequence of risk quantification values over a past period, such as the past 24 hours, as input and outputs predictions of risk quantification values for one or more future periods, such as the next 1-2 hours. LSTM models are existing technology and will not be elaborated upon further here.
[0070] Finally, based on the LSTM prediction results, a tiered early warning strategy is implemented: Level 1 Warning: When the model predicts that the future risk quantification value will show a continuous and stable upward trend, even if the current value is still below the warning line, the system will mark the container as a potential risk point and highlight it on the monitoring interface to prompt managers to pay attention.
[0071] Level 2 Early Warning: When the model predicts that the future risk quantification value will exceed the preset safety threshold, the system immediately triggers a high-level alarm and also pushes it to relevant safety management personnel so that they can take timely intervention measures. The setting of the safety threshold can be comprehensively determined based on historical safety data, the physicochemical properties of specific hazardous waste such as volatilization rate and corrosivity level, or relevant safety production management regulations. For example, for highly volatile organic solvents, the safety threshold can be set to a lower value to ensure that an early warning is triggered at the initial stage of leakage.
[0072] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for detecting and warning of the integrity of hazardous waste packaging, characterized in that, Including the following steps: Multispectral image data of the surface of hazardous waste packaging containers were collected and preprocessed to obtain reflectance spectral data; The reflectance spectral data is filtered to locate suspicious areas; Non-negative matrix factorization is used to perform spectral unmixing on the reflectance multispectral data of the suspected region to obtain an abundance map containing endmembers of leakage material and container background. The objective function of the non-negative matrix factorization includes a fidelity term to ensure the accuracy of spectral reconstruction and a regularization term to constrain the spatial distribution of the abundance matrix. The regularization terms include: a spatial smoothing constraint term based on the total variation sum of the abundance map, and a spatial competitive mutual exclusion constraint term based on the product of the abundance values of the exudate endmember and the container background endmember at the same pixel. The abundance map of the endmembers of the leaked material is extracted, and its risk quantification index is calculated to form time series data reflecting the development of the leak; the time series data is input into a pre-trained long short-term memory network model for prediction to obtain the future trend of the risk quantification index; and an early warning signal is generated based on the future trend.
2. The method for detecting and warning of the integrity of hazardous waste packaging according to claim 1, characterized in that, The objective function of the nonnegative matrix decomposition satisfies the following relation: ; in, It is the objective function value of the suspicious region; It is the spectral matrix of the suspicious region; It is the endmember matrix of the suspicious region; It is the abundance matrix of the suspicious regions; It is the square of the Frobenius norm; It is the abundance matrix of the suspicious region. The regularization constraint term.
3. The method for detecting and warning of the integrity of hazardous waste packaging according to claim 2, characterized in that, The regularization constraint term satisfies the following relation: ; in, It is the abundance matrix of the suspicious region. Regularization constraints; This is the preset total number of endpoints; It is a total variational operator; It is an abundance matrix The OK; The leakage end-member is in the first Abundance value per pixel, It is an index of the leaked material end-member; The container background terminator is in the first... Abundance values per pixel; It is the index of the container background terminator; , These are the weight coefficients of the first and second terms in the relation, respectively. It represents the total number of pixels within the suspicious area.
4. The method for detecting and warning of the integrity of hazardous waste packaging according to claim 3, characterized in that, The abundance update rule for the leaked material endmembers satisfies the following relation: ; in, The updated index is The leakage end element in the first Abundance values per pixel; It is the endmember matrix of the suspicious region. transpose; It is the spectral matrix of the suspicious region; yes and product The Middle line, number Column elements; It is the abundance matrix of the suspicious regions; yes , , product The Middle line, number Column elements; It is a spatial continuity constraint term abundance value The partial derivative of the first The value of each pixel; It is the preset first minute value.
5. The method for detecting and warning of the integrity of hazardous waste packaging according to claim 1, characterized in that, The process of filtering the reflectance spectral data to locate suspicious areas includes: Calculate the spectral angle between the reflectance spectral data of each pixel in the image and the preset reference spectrum, and determine the pixels with spectral angles greater than the preset angle threshold as suspicious pixels; Calculate the first spectral derivative of suspicious pixels and compare its similarity with the first spectral derivative template of known leaking substances that are pre-stored. Regions formed by suspicious pixels with similarity higher than a preset similarity threshold are recorded as suspicious regions.
6. The method for detecting and warning of the integrity of hazardous waste packaging according to claim 5, characterized in that, The similarity is calculated using the Pearson correlation coefficient method.
7. The method for detecting and warning of the integrity of hazardous waste packaging according to claim 5, characterized in that, The method for obtaining the first-order derivative template of the spectrum is as follows: The standard spectrum of a known leaking substance is obtained by performing spectral measurements, and the first derivative of the standard spectrum is calculated.
8. The method for detecting and warning of the integrity of hazardous waste packaging according to claim 5, characterized in that, The method for obtaining the preset reference spectrum includes: In the currently acquired multispectral image data, a pollution-free background area is selected, and the average value of the spectrum of all pixels in the background area is used as a preset reference spectrum.
9. The method for detecting and warning of the integrity of hazardous waste packaging according to claim 1, characterized in that, The risk quantification indicators include: The total abundance value of the endmember abundance map of the leakage material, or the area of the largest connected region in the endmember abundance map of the leakage material.
10. The method for detecting and warning of the integrity of hazardous waste packaging according to claim 1, characterized in that, Generating early warning signals based on the aforementioned future trends includes: A Level 1 warning is generated when the future trend indicates that the risk quantification indicators will continue to rise. When the future trend indicates that the risk quantification indicator will exceed the preset safety threshold, a level 2 warning is generated.
Citation Information
Patent Citations
High-spectrum image demixing method based on end-member constraint non-negative matrix decomposition
CN105809105A
Spectral unmixing scheme based on abundance sparse and endmember orthogonal constraint NMF(Non-negative Matrix Factorization)
CN109085131A
Water quality monitoring system and method based on hyperspectral imaging
CN116165148A
House leakage identification method and system based on hyperspectrum and imaging technology
CN119023173A
Ground feature unmixing method and system based on same-platform hyperspectral and high-score information fusion
CN119580084A