Incineration residue classification method and system based on image recognition
By using multispectral image processing and feature evolution analysis, the problem of capturing texture differences and regional correlations in the classification of incineration residues was solved, achieving higher classification accuracy and reliability.
Patent Information
- Application Number
- CN202511871950.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-01-13
AI Technical Summary
Existing technologies struggle to effectively capture subtle differences in texture and spatial distribution patterns in incineration residue classification, and lack in-depth exploration of the intrinsic relationships between different regions, resulting in insufficient accuracy and reliability of classification results.
By acquiring surface image data of incineration residue samples under multispectral light source illumination, an initial image dataset is constructed and linearly scanned to divide the feature region set, generate an associated feature matrix, and use a pre-trained feature evolution analysis model to mine temporal evolution patterns, construct category decision boundaries, and generate classification results.
It improves the accuracy and reliability of incineration residue classification by constructing precise feature space boundaries through multi-dimensional dynamic features, thereby enhancing the reliability of classification results.
Smart Images

Figure CN121330408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and more specifically, to a method and system for classifying incineration residues based on image recognition. Background Technology
[0002] Accurate classification of incineration residue is a prerequisite for subsequent resource utilization or harmless disposal during the incineration residue treatment process. Image recognition technology is widely used in the classification of incineration residue due to its non-contact and high-efficiency characteristics. In existing technologies, most rely on the acquisition of single-spectral images of residue samples and classify them by extracting color, simple texture, or shape features from the images. However, the surface of incineration residue usually has a complex texture structure and diverse component distribution. Traditional feature extraction methods are difficult to effectively capture subtle differences in texture and spatial distribution patterns. At the same time, existing methods lack in-depth exploration of the inherent relationships between different regions, resulting in insufficient robustness of feature representation. In addition, the classification results of existing technologies are difficult to adapt to the complex situations in actual processing, affecting the accuracy and reliability of classification. Summary of the Invention
[0003] This invention provides a method and system for classifying incineration residues based on image recognition.
[0004] In a first aspect, embodiments of the present invention provide a method for classifying incineration residues based on image recognition. The method includes: acquiring surface image data of incineration residue samples under multispectral light source illumination to construct an initial image dataset, wherein the initial image dataset acquires spatial distribution features of the residue surface through linear scanning; dividing the initial image dataset into regions to generate a set of feature regions, wherein each region unit in the feature region set contains homogeneous texture features; performing cross-regional feature association analysis based on the feature region set to generate an association feature matrix, wherein the association feature matrix contains spatial association relationships; calling a pre-trained feature evolution analysis model to mine the temporal evolution law of the association feature matrix to obtain an evolution feature sequence; constructing a category decision boundary based on the evolution feature sequence to generate an incineration residue classification result, wherein the incineration residue classification result contains a category assignment probability.
[0005] In a second aspect, embodiments of the present invention provide a computer system, comprising: A memory, wherein a computer program is stored; A processor is used to load the computer program to implement the image recognition-based incineration residue classification method as described above.
[0006] The image recognition-based incineration residue classification method provided by this invention acquires surface image data of incineration residue samples under multispectral light source illumination and constructs an initial image dataset. It then uses a linear scanning method to systematically capture the spatial distribution features of the residue surface, effectively avoiding the feature loss problems caused by traditional single-spectral acquisition or random sampling. By dividing the initial image dataset into regions, it generates a set of feature regions containing homogeneous texture features, decomposing the complex residue surface into internally consistent regional units, enabling subsequent feature analysis to focus on texture category representation. Based on the feature region set, it performs cross-regional feature correlation analysis and generates a set of features containing spatial characteristics. The correlation feature matrix, which fully considers the spatial correlation of residue component distribution, expands the feature dimensions. A pre-trained feature evolution analysis model is used to mine the temporal evolution patterns of the correlation feature matrix, obtaining an evolutionary feature sequence. This combines static spatial correlation features with dynamic temporal evolution patterns, effectively capturing the changing trends of residue surface features over time. Based on the evolutionary feature sequence, a category decision boundary is constructed, generating incineration residue classification results containing category assignment probabilities. The use of multi-dimensional dynamic features to construct accurate feature space boundaries enhances the rigor of the classification logic, while the assignment probability output strengthens the reliability of the classification results. In summary, this invention improves the accuracy and reliability of classification results. Attached Figure Description
[0007] Figure 1 This is a flowchart of an image recognition-based incineration residue classification method provided in an embodiment of the present invention.
[0008] Figure 2 This is a schematic diagram of the composition of a computer system provided in an embodiment of the present invention. Detailed Implementation
[0009] Please see Figure 1 , Figure 1 A flowchart illustrating an image recognition-based incineration residue classification method provided in this embodiment of the invention. This method can be executed by a computer system and may include the following steps: Step S100: Obtain surface image data of incineration residue samples under multispectral light source illumination, construct an initial image dataset, and obtain the spatial distribution characteristics of the residue surface through linear scanning.
[0010] Illuminating incineration residue samples with multispectral light sources allows the residue surface to exhibit different reflective properties under different wavelengths of light, thus obtaining richer surface information. Surface image data consists of images of the incineration residue sample surface captured by image acquisition devices (such as cameras). These images contain features such as texture, color, and shape of the residue surface. The initial image dataset is a collection of surface image data from multiple acquired incineration residue samples, used for subsequent analysis and processing. Linear scanning is a method of scanning the residue surface along a specific linear path, such as row-by-row or column-by-column scanning. Linear scanning can systematically acquire the spatial distribution characteristics of the residue surface, that is, the spatial distribution of feature information at various locations on the residue surface.
[0011] For example, an industrial camera equipped with a multispectral light source can be used to acquire surface image data of incineration residue samples. The incineration residue sample is placed on a detection platform, and the illumination angle and intensity of the multispectral light source are adjusted to ensure uniform illumination of the sample surface. The industrial camera scans and captures images of the sample surface along a preset linear scanning path, obtaining one surface image data per scan. The surface image data from multiple samples are collected and organized to construct an initial image dataset. For example, for a batch of different types of incineration residue samples, each sample is sequentially scanned and captured linearly, and the resulting image data is stored in a database to form the initial image dataset.
[0012] Step S200: Divide the initial image dataset into regions to generate a set of feature regions, where each region unit in the feature region set contains homogeneous texture features.
[0013] Region partitioning involves dividing an initial image dataset into multiple distinct regions according to specific rules and methods, allowing for individual analysis and processing of each region later. A feature region set is a collection of these partitioned region units, each possessing certain characteristics. Each region unit contains homogeneous texture features, meaning the texture features within that region exhibit similarity and consistency. Homogeneous texture features refer to the similar distribution and variation patterns of texture characteristics such as color, grayscale, and orientation within a given region, reflecting the texture properties of that region.
[0014] As one implementation method, step S200 can be specifically implemented as the following steps S210~S260: Step S210: Perform multispectral channel separation on the initial image dataset to obtain single-channel image sequences corresponding to different wavelength light sources. Each channel in the single-channel image sequence retains the reflection characteristics of the residue surface at the corresponding wavelength.
[0015] Multispectral channel separation involves separating multispectral images from an initial image dataset according to different wavelength channels, decomposing a single multispectral image into multiple single-channel images. A multispectral image is captured under illumination by light of multiple different wavelengths; each wavelength channel corresponds to a specific wavelength, thus containing image information from multiple different wavelengths. A single-channel image sequence is a sequence composed of these separated single-channel images. Each single-channel image contains only image information from its corresponding wavelength, preserving the reflectivity of the residue surface at that wavelength. Reflectivity refers to the ability and manner in which a residue surface reflects light of different wavelengths. Different residue materials may exhibit different reflectivity at different wavelengths. By preserving the reflectivity at corresponding wavelengths, the material composition and characteristics of the residue can be analyzed more accurately.
[0016] Step S220: Perform inter-channel correlation analysis on the single-channel image sequence, calculate the correlation degree of channel gray values, generate a channel correlation degree matrix, and select multiple channels with correlation that meet the preset conditions to form a target channel combination based on the channel correlation degree matrix.
[0017] Inter-channel correlation analysis analyzes the correlation between different channels in a single-channel image sequence, studying the degree of association between image information at different wavelengths. Channel grayscale value is the grayscale value of each pixel in a single-channel image, reflecting the brightness information of that pixel. Correlation degree is the degree of correlation between grayscale values of different channels; calculating the correlation degree measures the similarity and association between different channels. Each element in the channel correlation degree matrix represents the correlation degree between two channels, and the matrix visually displays the relationship between different channels. Preset conditions are pre-defined criteria used to filter channels; for example, a correlation degree threshold can be set, and only channels with a correlation degree greater than this threshold are considered to meet the criteria. The target channel combination is a set of channels composed of multiple channels whose correlation meets the preset conditions, used for subsequent image fusion and feature extraction.
[0018] When performing inter-channel correlation analysis, statistical analysis methods can be used, such as calculating the correlation coefficient, to measure the correlation between channel grayscale values. For example, two channels of image data can be selected from a single-channel image sequence, and each channel's image data can be expanded into a one-dimensional vector, that is, the grayscale values of each pixel in the image can be arranged sequentially into a vector. Then, the correlation coefficient between these two vectors can be calculated using the correlation coefficient calculation formula; this correlation coefficient represents the correlation between the two channels. Repeating the above steps, the correlation between all channel pairs is calculated, and the calculated correlation values are filled into the channel correlation matrix. Based on the generated channel correlation matrix, multiple channels with correlations meeting preset conditions are selected to form a target channel combination. For example, if the preset correlation threshold is 0.8, the channel correlation matrix is traversed to find channel pairs with a correlation greater than 0.8, and these channels are combined to form the target channel combination. By selecting the target channel combination, some weakly correlated channels can be removed, reducing data redundancy and improving the efficiency and accuracy of subsequent processing.
[0019] Step S230: Perform pixel-level fusion of the images in the target channel combination, and generate a fused image using a channel weight allocation method. The channel weight allocation is determined based on the correlation value in the channel correlation matrix.
[0020] Pixel-level fusion is a method of fusing multiple single-channel images from a target channel combination at the pixel level. It involves comprehensively processing the information from each pixel to generate a fused image. The fused image is obtained by fusing multiple single-channel images; it integrates information from multiple channels and can more comprehensively reflect the characteristics of the image. Channel weight allocation assigns a weight value to each channel in the target channel combination to determine the contribution of each channel to the fused image during the fusion process. Channel weight allocation is determined based on the correlation values in the channel correlation matrix. Channels with higher correlation are usually assigned higher weights because the information correlation between these channels is stronger, and their contribution to the fused image is likely to be greater.
[0021] For example, a weighted average method can be used for pixel-level fusion. For example, the weight of each channel can be determined first based on the correlation values in the channel correlation matrix, and then the normalized correlation values can be used as the weights of the corresponding channels. Then, for each pixel in the fused image, the grayscale value of the corresponding pixel in the target channel combination is multiplied by the weight of its respective channel, and the results are summed to obtain the grayscale value of that pixel in the fused image.
[0022] Step S240: Perform adaptive threshold segmentation on the fused image. Determine the segmentation threshold by iteratively calculating the gray-scale mean of different regions and generate a binarized region mask. The binarized region mask is used to mark the location range of potential feature regions.
[0023] Adaptive thresholding segmentation is a method that automatically determines the segmentation threshold based on local image features. It adapts to grayscale variations in different regions of the image, improving segmentation accuracy. The segmentation threshold is a critical value used to classify pixels in an image into different categories. Based on the relationship between the pixel's grayscale value and the segmentation threshold, pixels are divided into foreground (potential feature regions) and background. Iterative calculation gradually approximates the optimal segmentation threshold through repeated calculations. The grayscale mean is the average grayscale value of all pixels within a certain region of the image. Different regions may have different grayscale mean values; by iteratively calculating the grayscale mean values of different regions, a suitable segmentation threshold can be found.
[0024] For example, an iterative thresholding algorithm can be used for adaptive thresholding segmentation. For example, an initial segmentation threshold T0 can be initialized first, using the global grayscale mean of the fused image as the initial threshold. Then, the pixels in the fused image are divided into two categories based on the relationship between their grayscale values and the initial threshold T0, and the grayscale mean values of these two categories are calculated, denoted as μ1 and μ2 respectively. Next, a new segmentation threshold T1 = (μ1 + μ2) / 2 is calculated. T1 and T0 are compared; if |T1 - T0| is less than a preset error threshold, then T1 is considered the final segmentation threshold; otherwise, T1 is used as the new initial threshold, and the above steps are repeated until the convergence condition is met.
[0025] Based on the final segmentation threshold, the fused image is binarized to generate a binarized region mask. For each pixel in the fused image, if its grayscale value is greater than or equal to the segmentation threshold, the corresponding pixel value in the binarized region mask is 1, indicating that the pixel belongs to a latent feature region; otherwise, the corresponding pixel value in the binarized region mask is 0, indicating that the pixel belongs to the background.
[0026] Step S250: Perform preliminary region division on the fused image based on the binarized region mask to obtain an initial region set containing noisy regions. The boundary of each region in the initial region set is determined by the connected components of the mask.
[0027] For example, a connected component labeling algorithm can be used to process a binarized region mask to determine the regions in the fused image. Common connected component labeling algorithms include four-connected component labeling and eight-connected component labeling. Taking the four-connected component labeling algorithm as an example, this algorithm compares each pixel in the binarized region mask with its four adjacent pixels (above, below, left, and right). If the values of adjacent pixels are all 1, they are considered to belong to the same connected component. For example, each pixel in the binarized region mask can be traversed first. For a pixel with a value of 1, if it has not yet been labeled, a new label value is assigned to it, and this label value is propagated to all pixels with a value of 1 that are four-connected to it, until all pixels in the connected component are labeled. This process is repeated until all pixels with a value of 1 in the binarized region mask are labeled.
[0028] Step S260: Perform noise region removal processing on the initial region set, calculate the area ratio and perimeter smoothness of each region, remove region units whose area ratio and perimeter smoothness meet the removal conditions, and generate a feature region set containing homogeneous texture features.
[0029] Area percentage is the proportion of a region's area within the total image area; calculating the area percentage helps determine the region's size. Perimeter smoothness is the smoothness of a region's boundaries, reflecting the region's shape regularity. Removal criteria are pre-defined conditions used to determine whether to remove a specific region. For example, a lower limit for area percentage and an upper limit for perimeter smoothness can be set. If a region's area percentage is less than the lower limit and its perimeter smoothness is greater than the upper limit, the region is considered noise and needs to be removed.
[0030] For example, first calculate the area percentage and perimeter smoothness of each region in the initial region set. When calculating the area percentage, the area of a region can be obtained by counting the number of pixels within that region, and then divided by the area of the entire image. When calculating the perimeter smoothness, various methods can be used, such as calculating the rate of curvature change of the region boundaries or a contour smoothness index. Taking the contour smoothness index as an example, it can be obtained by calculating the ratio of the chord length to the corresponding arc length between adjacent pixels on the region contour; the closer the index value is to 1, the smoother the contour.
[0031] As one implementation method, step S260 can be specifically implemented as the following steps S261~S266: Step S261: Extract the contour of each region unit in the initial region set to obtain a region contour line composed of continuous pixels. The pixel coordinates of the region contour line are arranged in a clockwise direction.
[0032] For example, a boundary tracking algorithm can be used to extract the contour of each region unit in the initial region set. The boundary tracking algorithm can be a chain code-based boundary tracking algorithm or a contour detection operator-based boundary tracking algorithm. Taking a chain code-based boundary tracking algorithm as an example, this algorithm starts from a starting pixel on the boundary of the region unit and tracks adjacent boundary pixels according to certain rules (such as clockwise direction), recording the chain code of each pixel (representing its direction relative to the previous pixel). For example, the pixels of the region unit can be traversed first to find a boundary pixel as the starting point. Then, starting from the starting point, its adjacent pixels are checked in a clockwise direction to find the next boundary pixel and record its chain code. This process is repeated until the starting point is returned, completing the contour extraction of one region unit. For example, for a region unit in the initial region set, the boundary tracking algorithm based on chain code is used to track the adjacent boundary pixels in a clockwise direction, starting from the top left boundary pixel of the region unit, and record the chain code of each pixel. Finally, a region outline composed of continuous pixels is obtained, and the coordinates of these pixels are arranged in a clockwise direction.
[0033] Step S262: Calculate the curvature change rate of the contour based on the region contour line, determine the concavity and convexity features of the contour by the change in the tangent angle between adjacent pixels, and generate a curvature change rate sequence.
[0034] The rate of change of contour curvature is the speed at which the curvature of a region's contour changes at different locations, reflecting the degree and extent of curvature variation. The change in tangent angle is the magnitude of the change in the angle between tangents at adjacent pixels on the region's contour. By calculating the change in the tangent angle between adjacent pixels, the concavity / convexity characteristics of the contour can be determined. Concavity / convexity characteristics refer to the convexity or concavity of the region's contour; areas with a larger rate of change of curvature usually indicate significant concavity / convexity variations in the contour. The sequence of rates of change of curvature is a sequence composed of the rates of change of curvature at various locations on the region's contour, used to describe the overall curvature variation of the contour.
[0035] For example, a discrete curvature calculation method can be used to calculate the rate of change of contour curvature. For each pixel on the region contour line, the tangent direction at that point is approximated by its neighboring pixels, and then the change in the tangent angle between adjacent pixels is calculated. For example, for each pixel Pi on the region contour line, two adjacent pixels Pi-1 and Pi+1 can be selected. Then, the tangent direction at Pi is calculated using the coordinates of these three pixels. For example, the vectors Pi-1Pi and PiPi+1 can be calculated using a vector method, and the angle between these two vectors is calculated using the vector angle formula. This angle is the tangent angle at Pi. Next, the change in the tangent angle between adjacent pixels is calculated, which is the tangent angle at Pi+1 minus the tangent angle at Pi. Finally, the rate of change of curvature is calculated based on the change in the tangent angle. For example, the change in the tangent angle can be divided by the distance between adjacent pixels to obtain the rate of change of curvature.
[0036] Step S263: Identify significant inflection points in the region contour based on the curvature change rate sequence. Significant inflection points are contour points where the curvature change rate exceeds the threshold corresponding to the average curvature change rate of adjacent regions.
[0037] Significant inflection points are points in the contour of a region where the curvature changes significantly. These points indicate a substantial change in the shape of the contour, such as from convex to concave, or vice versa. The average rate of curvature change in adjacent regions is the average of the rate of curvature change of pixels within a certain range around a significant inflection point. Calculating this average rate of curvature change in adjacent regions allows us to understand the normal curvature changes within that region. A threshold is a pre-defined critical value used to determine whether a point is a significant inflection point. When the rate of curvature change of a contour point exceeds the threshold corresponding to the average rate of curvature change in adjacent regions, that contour point is considered a significant inflection point.
[0038] For example, first, the range and threshold of the adjacent region are determined. The range of the adjacent region can be set according to the actual situation; for example, n pixels before and after a significant inflection point can be selected as the adjacent region. Then, for each point in the curvature change rate sequence, the average curvature change rate of its adjacent region is calculated. Specifically, for the i-th point in the curvature change rate sequence, the curvature change rates of the n points before and after it are selected, and the average curvature change rate of these points is calculated and denoted as μi. Next, the curvature change rate ki of the i-th point is compared with μi. If |ki-μi| is greater than the threshold, the i-th point is considered to be a significant inflection point.
[0039] Step S264: Connect the simplified outline polygon of the region formed by the significant inflection point, calculate the pixel deviation value between the simplified outline polygon and the original region outline, and the pixel deviation value is the average position deviation of the corresponding outline point.
[0040] For example, the identified significant inflection points are first connected sequentially according to the arrangement order of the region contour lines to form a simplified contour polygon of the region. Then, the pixel deviation value between the simplified contour polygon and the original region contour line is calculated. The specific steps are as follows: For each pixel on the original region contour line, find the nearest point on the simplified contour polygon, calculate the Euclidean distance between these two points as the position deviation of that pixel. Add up the position deviations of all pixels, and then divide by the total number of pixels to obtain the pixel deviation value.
[0041] As one implementation method, step S264 can be specifically implemented as the following steps S2641~S2646: Step S2641: Sample the region contour line at equal intervals to obtain a fixed number of contour sampling points. The interval distance of the contour sampling points is evenly distributed according to the total length of the region contour line.
[0042] For example, first, the total length of the region contour line is calculated, which can be obtained by accumulating the Euclidean distances between adjacent pixels on the region contour line. Then, based on the pre-set number of sampling points M, the interval distance d = L / M of the contour sampling points is calculated, where L is the total length of the region contour line and M is the number of sampling points. Starting from the starting point of the region contour line, sampling points are selected sequentially according to the interval distance d until M sampling points are selected.
[0043] Step S2642: Calculate the ratio of the chord length to the corresponding arc length between adjacent contour sampling points to generate a contour smoothness index. The closer the contour smoothness index value is to 1, the smoother the contour is.
[0044] Chord length is the straight-line distance between adjacent contour sampling points, i.e., the length of the line segment connecting two adjacent contour sampling points. Arc length is the curve length between two adjacent contour sampling points on the region contour line. The contour smoothness index is obtained by calculating the ratio of the chord length to the corresponding arc length between adjacent contour sampling points. This index is used to measure the smoothness of the region contour. The closer the contour smoothness index value is to 1, the closer the curve between adjacent contour sampling points is to a straight line, i.e., the smoother the contour.
[0045] For example, for each pair of adjacent contour sampling points, the chord length and arc length are calculated respectively. The chord length can be calculated using the Euclidean distance formula, i.e., for adjacent contour sampling points P i and P i+1 Its chord length S i= √((xi+1-xi)²+(yi+1-yi)²), where (x i , y i ) and (x i+1 , y i+1 ) are respectively P i and Pi+1 The coordinates. The arc length can be obtained by accumulating the coordinates of the region outline between P. i and P i+1 The smoothness index is approximated by the Euclidean distance between adjacent pixels. Then, the ratio of chord length to arc length is calculated to obtain the contour smoothness index.
[0046] Step S2643: Cluster the contour sampling points based on the contour smoothness index, and group the sampling points whose smoothness index values are less than the preset clustering threshold into the same smooth segment.
[0047] A smooth segment is a segment composed of a set of contour sampling points obtained by clustering. If the difference in contour smoothness index value of the contour sampling points within the same smooth segment is less than the preset clustering threshold, it indicates that the contours of the regions where these sampling points are located have similar smoothness.
[0048] For example, a threshold-based clustering algorithm can be used to cluster the contour sampling points. For example, the first contour sampling point can be used as an initial smoothing segment. Then, subsequent contour sampling points are traversed sequentially. For each sampling point, the average difference between its contour smoothness index value and the contour smoothness index values of all sampling points within the current smoothing segment is calculated. If this average difference is less than a preset clustering threshold, the sampling point is added to the current smoothing segment; otherwise, the sampling point is used as the starting point of a new smoothing segment. This process is repeated until all contour sampling points are clustered.
[0049] Step S2644: Approximate the contour of each smooth segment using curve fitting to obtain the fitting curve of the smooth segment. The complexity of the fitting curve is dynamically adjusted according to the length of the smooth segment.
[0050] A fitted curve is a curve obtained through curve fitting, which can reflect the contour shape of the smooth segment to a certain extent. The complexity of the fitted curve is dynamically adjusted according to the length of the smooth segment. Generally speaking, the longer the smooth segment, the more complex the fitted curve, for example, a higher-order polynomial curve can be used for fitting; the shorter the smooth segment, the less complex the fitted curve, and a simple straight line or a low-order polynomial curve can be used for fitting.
[0051] For example, a polynomial curve fitting method can be used to approximate the contour of each smooth segment. For instance, the order of the polynomial can be determined first based on the length of the smooth segment. For example, a length threshold can be set; when the length of the smooth segment is less than this threshold, a first-order polynomial (a straight line) is used for fitting; when the length of the smooth segment is greater than this threshold, the order of the polynomial is appropriately increased according to the ratio of the length to the threshold. Then, the coefficients of the polynomial are solved using the least squares method to minimize the error between the fitted curve and the contour sampling points within the smooth segment.
[0052] Step S2645: Extract the endpoints of each fitted curve as vertices of the simplified contour polygon, and connect the vertices according to the arrangement order of the contour lines to form a preliminary simplified contour polygon.
[0053] The endpoints of the fitted curve are its starting and ending points. In each smooth segment of the fitted curve, the endpoints are highly representative, reflecting the boundary position of the smooth segment. The vertices of the simplified contour polygon are key points in its construction. By extracting the endpoints of each fitted curve as the vertices of the simplified contour polygon, the shape characteristics of the original region's contour line can be preserved to some extent. Connecting the vertices according to the arrangement order of the contour lines involves sequentially connecting the endpoints of each fitted curve according to the order of the smooth segments in the region's contour line, forming a preliminary simplified contour polygon.
[0054] For example, for the fitted curve of each smooth segment, the coordinates of its starting and ending points are extracted. For instance, for the fitted curve of a smooth segment y=a0+a1x+a2x... 2 Assume the x-coordinate range of the contour sampling points within the smooth segment is [x min , x max ], x=x min and x=x max Substitute the coordinates of the fitted curve into the equation to obtain the coordinates of the starting and ending points of the fitted curve. Arrange the coordinates of the endpoints of the fitted curve for all smooth segments according to the order of the contour lines, and then connect these endpoints sequentially to form a preliminary simplified contour polygon.
[0055] Step S2646: Calculate the ratio of the area of the preliminary simplified outline polygon to the area of the original region unit. When the ratio is within the range that meets the area ratio requirement, it is determined to be the final simplified outline polygon. Otherwise, readjust the sampling interval and repeat the above steps until the area ratio requirement is met.
[0056] The area of the initially simplified outline polygon can be calculated using polygon area calculation formulas, such as the shoelace formula. The area of the original region unit can be approximated by counting the number of pixels within the region unit. The area ratio is the ratio of the area of the initially simplified outline polygon to the area of the original region unit. This ratio is used to measure how well the initially simplified outline polygon approximates the original region unit. The range that meets the area ratio requirement is a pre-defined interval. When the area ratio is within this interval, the initially simplified outline polygon is considered to approximate the original region unit well, and it is determined as the final simplified outline polygon; otherwise, the sampling interval needs to be readjusted, that is, the interval distance of the outline sampling points needs to be changed, and then steps S2641~S2645 are repeated until the ratio of the area of the obtained initially simplified outline polygon to the area of the original region unit is within the range that meets the area ratio requirement.
[0057] For example, first, the area A of the initially simplified outline polygon is calculated, for example, using the shoelace formula. Then, the number of pixels within the original region unit is counted and used as an approximation of the area of the original region unit. The area ratio R = A / A0 is calculated, where A is the area of the initially simplified outline polygon and A0 is the area of the original region unit.
[0058] Step S265: When the pixel deviation value is less than the preset deviation threshold, retain the region unit corresponding to the simplified outline polygon; otherwise, perform segmented smoothing on the original region outline and regenerate the simplified outline polygon.
[0059] The preset deviation threshold is a pre-set critical value used to determine whether to retain the region unit corresponding to the simplified outline polygon. When the pixel deviation value is less than this threshold, it is considered that the simplified outline polygon can approximate the original region outline well, and the region unit is retained; otherwise, the original region outline needs to be segmented and smoothed. Segmented smoothing involves dividing the original region outline into multiple segments and smoothing each segment to reduce noise and irregularities in the outline. Regenerating the simplified outline polygon involves regenerating the simplified outline polygon again according to steps S261 to S264 after segmented smoothing of the original region outline.
[0060] Step S266: Count the number of region units after contour simplification, calculate the area ratio and perimeter smoothness of each region unit, remove region units whose area ratio and perimeter smoothness meet the removal criteria, and generate an optimized feature region set.
[0061] The simplified region units are those obtained after steps S261-S265. The contours of these units have been simplified, more accurately representing the shape of the original region. Counting the number of region units reveals the number of remaining units after processing. The calculation methods for area proportion and perimeter smoothness are the same as in step S260; that is, area proportion is the ratio of the region unit's area to the entire image area, and perimeter smoothness can be obtained by calculating the curvature change rate of the region contour or contour smoothness index. The removal criteria are pre-set conditions for determining whether to remove a region unit. When both the area proportion and perimeter smoothness of a region unit meet the removal criteria, that region unit is removed from the simplified region unit set. The optimized feature region set is a collection of region units remaining after removing those that do not meet the criteria. These region units contain homogeneous texture features, more accurately reflecting the actual feature regions in the image.
[0062] Step S300: Perform cross-regional feature association analysis based on the feature region set to generate an association feature matrix, which contains spatial association relationships.
[0063] Cross-regional feature association analysis is the process of studying the correlation and interaction of features among different regional units in a feature region set. Through cross-regional feature association analysis, potential relationships and patterns between different regions can be discovered. The association feature matrix is a matrix containing association information between various regional units in the feature region set, including spatial relationships, that is, the spatial relationships between different regional units, such as adjacency and inclusion relationships. By generating the association feature matrix, the results of cross-regional feature association analysis can be represented in matrix form, facilitating subsequent feature evolution analysis and classification decisions.
[0064] In one implementation, step S300 can be implemented as the following steps S310~S360: Step S310: Extract texture features from each region unit in the feature region set to obtain a region texture feature vector containing a gray-level co-occurrence matrix, a local binary pattern, and an oriented gradient histogram. The dimension of the region texture feature vector is dynamically adjusted according to the area of the region unit.
[0065] For example, image processing software and corresponding algorithms can be used to extract texture features from each region unit in the feature region set. Taking the gray-level co-occurrence matrix (GLCM) as an example, the parameters of the GLCM, such as distance and angle, are first determined. Distance represents the distance between pixel pairs, and angle represents the direction between pixel pairs. Then, the GLCM of the region unit is calculated based on these parameters, and feature values such as contrast, correlation, energy, and homogeneity are extracted from the GLCM. For local binary mode (LDM), the image data of the region unit is encoded using LDM to obtain a LDM image. The frequency of different encoded values in the LDM image is counted as LDM features. For histogram of oriented gradients (HOG), the gradient magnitude and direction of the region unit image are first calculated. Then, the image is divided into multiple small regions, and the histogram of the gradient direction in each region is counted. These histograms are combined to obtain the HMG feature. Finally, the GLCM, LDM, and HMG features are combined into a region texture feature vector. The dimension of the region texture feature vector is dynamically adjusted based on the area of the region unit. For example, different dimension values can be set for different area ranges. When the area of a region unit falls within a certain range, the dimension value corresponding to that range is used. The region texture feature vector obtained through texture feature extraction provides accurate texture information for subsequent texture similarity calculations and cross-region feature association analysis.
[0066] Step S320: Calculate the similarity between the texture feature vectors of any two region units, and generate an inter-region texture similarity matrix. The rows and columns of the inter-region texture similarity matrix correspond to the region unit indices in the feature region set, respectively.
[0067] The similarity between texture feature vectors is an indicator that measures the degree of similarity between the texture feature vectors of two region units. By calculating the similarity, we can understand the similarity of texture features between different region units. Common similarity calculation methods include Euclidean distance and cosine similarity. The inter-region texture similarity matrix is a matrix in which each element represents the similarity between the texture feature vectors of two region units. The rows and columns of the matrix correspond to the indices of region units in the feature region set. The inter-region texture similarity matrix can intuitively show the texture similarity relationship between any two region units in the feature region set.
[0068] Step S330: Construct a region association graph based on the texture similarity matrix between regions, where the nodes of the region association graph are region units, and the weight of the edge is the texture similarity value of the corresponding region unit.
[0069] A region association graph is a graph structure used to represent the relationships between regions within a set of feature regions. Nodes in a region association graph are the regions within the feature region set, with each node representing a single region. Edges are line segments connecting two nodes, indicating a relationship between the two regions. The weight of an edge is the texture similarity value of the corresponding region; a larger weight indicates greater texture similarity and a higher degree of association between the two regions.
[0070] For example, a region association graph is constructed based on the inter-region texture similarity matrix. First, the nodes of the region association graph are determined, i.e., each region unit in the feature region set. Then, edges are added to the region association graph based on the element values in the inter-region texture similarity matrix. For each non-zero element in the inter-region texture similarity matrix, an edge is added between the corresponding two nodes in the region association graph, with the weight of the edge being the value of that element.
[0071] Step S340: Divide the region association graph into communities. Use a partitioning algorithm based on association degree optimization to cluster the region units into multiple region communities. Each region community contains region units with texture features whose similarity meets the clustering conditions.
[0072] Community partitioning is the process of dividing nodes in a region association graph into different communities (or clusters). Nodes within each community have high correlations, while nodes between different communities have low correlations. A correlation-optimized partitioning algorithm is one that partitions communities by optimizing the correlations between region units. It can group region units that meet clustering criteria based on information such as texture similarity and spatial relationships into a single community. Clustering criteria are pre-defined conditions used to determine whether region units should be clustered into the same community. For example, a texture similarity threshold can be set; when the texture similarity between two region units exceeds this threshold, they are considered to be clustered into the same community.
[0073] For example, the Louvain algorithm can be used for community partitioning. For instance, each node in the regional association graph can be initialized as a separate community. Then, each node is traversed, attempting to move it to the community of an adjacent node. The change in modularity of the regional association graph before and after the move is calculated. If the modularity increases, the node is moved to the new community. This process is repeated until the modularity of the regional association graph no longer increases. Finally, the partitioned communities are merged and adjusted to obtain the final regional community partitioning result.
[0074] Step S350: Calculate the average texture feature vector within each region community and the texture difference between communities, and generate a community feature descriptor. The community feature descriptor contains the community center coordinates and the average texture feature vector.
[0075] For example, the average texture feature vector within each region community is first calculated. For all region units within a region community, their texture feature vectors are summed, and then divided by the number of region units to obtain the average texture feature vector.
[0076] There are several methods to calculate the texture dissimilarity between communities, such as calculating the Euclidean distance or cosine similarity between the average texture feature vectors of communities in different regions.
[0077] The community center coordinates can be calculated by averaging the centroid coordinates of all regional units within the community. For each regional unit, its centroid coordinates are calculated, then the centroid coordinates of all regional units within the community are summed, and the sum is divided by the number of regional units to obtain the community center coordinates. The community center coordinates are then combined with the average texture feature vector to generate a community feature descriptor. Generating this community feature descriptor provides more comprehensive and accurate community feature information for subsequent calculations of inter-community similarity matrices and cross-regional feature association analysis.
[0078] In one implementation, step S350 can be implemented as steps S351 to S356 as follows: Step S351: Extract the centroid coordinates of each regional unit in the regional community, calculate the mean of the centroid coordinates of all regional units as the center coordinates of the regional community, and take the mean of the horizontal and vertical coordinates of the centroids of each regional unit as the center coordinates.
[0079] For a given region, its centroid coordinates can be obtained by calculating the weighted average of the coordinates of all pixels within that region. Specifically, assuming a region contains multiple pixels, each with corresponding coordinate values, the weighted sum of the x-coordinates of all pixels, divided by the total number of pixels, yields the x-coordinate of the centroid. Similarly, the weighted sum of the y-coordinates of all pixels, divided by the total number of pixels, yields the y-coordinate of the centroid. For example, relevant functions in image processing software can be used to calculate the centroid coordinates of a region. After obtaining the centroid coordinates of each region within a community, the mean of the centroid coordinates of all region units needs to be calculated to determine the center coordinates of the community. This process involves summing the x-coordinates of the centroids of all region units and dividing by the number of region units to obtain the x-coordinate of the community's center; similarly, summing the y-coordinates of the centroids of all region units and dividing by the number of region units yields the y-coordinate of the community's center.
[0080] Step S352: Collect the texture feature vectors of all regional units in the regional community, and perform a weighted average of the texture feature vectors according to the proportion of the area of the regional unit to the total area of the community to generate a weighted average texture feature vector.
[0081] Texture feature vectors are quantitative representations of the texture characteristics of region units, encompassing various texture feature information such as gray-level co-occurrence matrix, local binary patterns, and histograms of oriented gradients. Within a region community, different region units may have different area sizes; larger region units contribute more to the overall texture features of the community, while smaller region units contribute less. Therefore, to more accurately reflect the overall texture features of a region community, a weighted average of the texture feature vectors needs to be applied based on the proportion of region unit area to the total community area.
[0082] First, calculate the area of each region unit within the regional community. This can be done by counting the number of pixels within the region unit. Next, calculate the total area of the regional community, which is the sum of the areas of all region units. Then, for each region unit, calculate the proportion of its area to the total community area. Use this proportion as a weight to weight the texture feature vector of that region unit. Specifically, multiply each element of the texture feature vector of the region unit by its corresponding weight. Finally, sum the weighted texture feature vectors of all region units to obtain a weighted average texture feature vector.
[0083] Step S353: Calculate the similarity between the weighted average texture feature vector and the texture feature vector of each region unit, and select the region units whose similarity meets the core subset conditions to form the core region subset.
[0084] Similarity is a metric that measures the degree of similarity between two texture feature vectors. By calculating the similarity between the weighted average texture feature vector and the texture feature vector of each region unit, we can understand how close the texture features of each region unit are to the overall texture features of the region community. Cosine similarity can be used to measure the similarity between two vectors.
[0085] The core subset criteria are pre-defined standards for selecting core region units. For example, a similarity threshold can be set. When the similarity between the texture feature vector of a region unit and the weighted average texture feature vector is greater than the threshold, the region unit is considered to meet the core subset criteria. For example, the similarity between the weighted average texture feature vector and the texture feature vector of each region unit in the region community is calculated sequentially, and the region units with similarity greater than the threshold are selected to form the core region subset.
[0086] Step S354: Perform principal component analysis on the texture feature vectors of the core region subset, and extract a preset number of principal components as the main texture feature directions of the community. The main texture feature directions correspond to principal component components whose feature values meet the principal component selection criteria.
[0087] The preset number of principal components is determined in advance based on actual needs. Principal components with larger eigenvalues can be selected as the main texture feature directions for the community. Principal component selection criteria are used to determine which principal components can be used as main texture feature directions; for example, principal components with eigenvalues greater than a certain threshold can be selected. By extracting the main texture feature directions, high-dimensional texture feature vectors can be reduced to lower dimensions while retaining the main information of the texture features, reducing data redundancy, and improving the efficiency and accuracy of subsequent analysis.
[0088] Step S355: Combine the center coordinates of the regional community, the weighted average texture feature vector, and the main texture feature direction to generate a community feature descriptor that includes spatial location and texture characteristics.
[0089] A community feature descriptor is a comprehensive description of the features of a region's community, requiring the inclusion of both spatial location and texture characteristics. The center coordinates of the region's community reflect its location in image space, the weighted average texture feature vector embodies the overall texture characteristics of the region's community, and the main texture feature direction further describes the main directions of change in the texture features.
[0090] The center coordinates of a region / community, the weighted average texture feature vector, and the main texture feature direction are combined to form a new feature vector, which is the community feature descriptor. This community feature descriptor can comprehensively represent the characteristics of a region / community, including both its spatial location information and its texture characteristics.
[0091] Step S356: Calculate the similarity between community feature descriptors of communities in different regions, and generate an inter-community similarity matrix. The inter-community similarity matrix is used for weight allocation in subsequent cross-regional feature association analysis.
[0092] Community feature descriptors are comprehensive descriptions of the spatial location and texture characteristics of a regional community. Calculating the similarity between community feature descriptors of different regional communities reveals the degree of similarity and correlation between them. When calculating similarity, a combination of spatial distance and texture similarity can be used. For spatial distance, the Euclidean distance between the center coordinates of two regional communities can be calculated; the smaller the Euclidean distance, the closer the two regional communities are spatially. For texture similarity, methods such as cosine similarity mentioned earlier can be used to calculate the similarity between the weighted average texture feature vectors of two regional communities. By comprehensively considering spatial distance and texture similarity, a comprehensive similarity value is obtained.
[0093] In one implementation, step S356 can be implemented as follows: steps S3561 to S3566: Step S3561: Perform row normalization on the inter-community similarity matrix so that the sum of the elements in each row is 1, to obtain the normalized similarity matrix. The elements in the normalized similarity matrix represent the relative influence weight of the corresponding community on the target community.
[0094] The elements in the inter-community similarity matrix represent the similarity between communities in different regions. However, these similarity values may vary in range and magnitude, and using them directly could affect the accuracy of subsequent analyses. Row normalization is an operation that adjusts the elements in each row of the matrix so that the sum of the elements in each row is 1. Through row normalization, the inter-community similarity matrix can be converted into a normalized similarity matrix, so that each row element represents the relative influence weight of the corresponding community on the target community.
[0095] For each row of the inter-community similarity matrix, calculate the sum of all elements in that row. Then, divide each element of that row by the sum of all elements in that row to obtain the normalized element value. After row normalization, each element in the normalized similarity matrix has a value between 0 and 1, and the sum of the elements in each row is 1.
[0096] Step S3562: Construct a community influence graph based on the normalized similarity matrix, where nodes represent regional communities and the weights of directed edges are the corresponding element values in the normalized similarity matrix.
[0097] When constructing a community influence graph, the nodes of the graph are first determined, i.e., all regional communities. Then, directed edges are added to the graph based on the element values in the normalized similarity matrix. For each non-zero element in the normalized similarity matrix, a directed edge is added between the corresponding two nodes. The direction of the edge can be determined according to the actual situation; for example, it can be specified that it points from a community with a higher similarity value to a community with a lower similarity value, and the weight of the edge is the value of that element. By constructing a community influence graph, the influence relationship network between different regional communities can be visually displayed, providing a visual model for subsequent path mining and calculation of influence weights.
[0098] Step S3563: Perform path mining on the community influence map and extract a set of directed paths of length 2. Each path represents the transmission influence relationship between two communities indirectly connected through an intermediate community.
[0099] Path mining is the process of finding paths in a graph structure that satisfy predetermined conditions. In a community influence graph, a directed path of length 2 consists of three nodes and two directed edges, with the middle node serving as the intermediate community, connecting the starting community and the target community. Each directed path of length 2 represents the transitive influence relationship between two communities indirectly linked through the intermediate community.
[0100] When performing path discovery, graph traversal algorithms such as depth-first search or breadth-first search can be used. Starting from each node, search for directed paths of length 2. Specifically, for a starting node, traverse all its outgoing edges to find the intermediate node, and then, starting from the intermediate node, traverse its outgoing edges to find the target node. If a directed path of length 2 is found, record it.
[0101] Step S3564: Calculate the propagation influence weight for each directed path. The propagation influence weight is the product of the weights of the two directed edges in the path. Generate the propagation influence weight matrix.
[0102] Transient influence weight is an indicator that measures the degree of influence between two communities indirectly connected through an intermediate community. In a directed path of length 2, the transitive influence weight is the product of the weights of the two directed edges in the path. This is because the weight of a directed edge represents the degree of direct influence one community has on another. When indirectly connected through an intermediate community, the degree of transitive influence between the two communities is obtained by accumulating the two direct influences, so the product of the weights of the two directed edges is used to represent the transitive influence weight.
[0103] When calculating the transitive influence weight, for each directed path of length 2, the weights of the two directed edges in the path are obtained, and they are multiplied together to obtain the transitive influence weight. The transitive influence weights of all directed paths of length 2 are then arranged into a matrix, namely the transitive influence weight matrix. The rows and columns of the matrix correspond to different regional communities, and the elements in the matrix represent the transitive influence weight between two communities indirectly connected through an intermediate community. The transitive influence weight matrix provides important information for subsequent comprehensive consideration of direct and indirect connections.
[0104] Step S3565: Add the normalized similarity matrix and the transitive influence weight matrix element by element to obtain the comprehensive similarity matrix. The comprehensive similarity matrix contains the comprehensive correlation relationship between the direct correlation weights and the indirect correlation weights.
[0105] The normalized similarity matrix represents the direct correlation between communities in different regions, while the transitive influence weight matrix represents the degree of transitive influence between two communities indirectly linked through an intermediary community. Adding the normalized similarity matrix and the transitive influence weight matrix element-wise—that is, summing the corresponding elements in the two matrices—results in the comprehensive similarity matrix. Each element in the comprehensive similarity matrix contains both direct and indirect correlation weights, providing a more comprehensive reflection of the overall correlation between communities in different regions.
[0106] Step S3566: Adjust the weight allocation of cross-regional feature association analysis based on the comprehensive similarity matrix, convert the comprehensive similarity matrix into the spatial association relationship part of the association feature matrix, and improve the construction of the association feature matrix.
[0107] Cross-regional feature association analysis requires the reasonable allocation of association weights between different regional communities to accurately reflect their feature relationships. The comprehensive similarity matrix contains a comprehensive association relationship encompassing both direct and indirect association weights. Adjusting the weight allocation for cross-regional feature association analysis based on the comprehensive similarity matrix can make the analysis more comprehensive and accurate. The comprehensive similarity matrix is converted into the spatial association relationship portion of the association feature matrix, meaning that elements from the comprehensive similarity matrix are correspondingly filled into the corresponding positions in the association feature matrix, forming the spatial association relationship representation. Besides the spatial association relationship portion, the association feature matrix may also contain other feature information. Integrating the comprehensive similarity matrix into the association feature matrix improves its construction, enabling it to more comprehensively represent the feature relationships between different regional communities.
[0108] Step S360: Construct a cross-regional spatial relationship table based on community feature descriptors, convert the spatial relationship table into matrix form, and obtain a relationship feature matrix containing spatial relationships.
[0109] Community feature descriptors contain information such as the spatial location and texture characteristics of regional communities, which can be used to construct a cross-regional spatial relationship table. The spatial relationship table records the spatial relationship information between communities in different regions, such as whether two regional communities are adjacent and the distance relationship between them.
[0110] When constructing a spatial association table, the comparison features and association rules are first determined. For example, the distance between regional communities can be calculated based on their center coordinates, and the proximity of two regional communities can be determined based on the distance relationship. This association information is then organized into a table, which is the spatial association table. Next, the spatial association table is converted into a matrix form. The rows and columns of the matrix correspond to different regional communities, and the elements in the matrix represent the spatial association between two regional communities. For example, 0 can represent no association between two regional communities, 1 represents proximity, and other values represent different degrees of association. By converting the spatial association table into a matrix form, an association feature matrix containing spatial associations is obtained, which can be more conveniently used for subsequent feature evolution analysis and classification decisions.
[0111] Step S400: Call the pre-trained feature evolution analysis model to mine the temporal evolution law of the associated feature matrix and obtain the evolution feature sequence.
[0112] Pre-trained feature evolution analysis models are models trained on a large amount of data, enabling them to learn temporal evolution patterns within the data. Association feature matrices contain the feature relationships between different regional communities. By processing these association feature matrices using pre-trained feature evolution analysis models, temporal evolution patterns can be extracted.
[0113] Feature evolution analysis models typically comprise multiple modules, such as a feature fusion layer, a multi-scale perception module, a temporal attention mechanism module, and an evolutionary pattern mining layer. After the associated feature matrix is input into the model, it processes it sequentially, extracting feature information and analyzing the changes in these features over time. The resulting evolutionary feature sequence is a quantitative representation of the temporal evolution of the associated feature matrix, recording the changes in features at different time points and providing crucial information for subsequent classification decisions.
[0114] In one implementation, step S400 can be implemented as the following steps S410~S460: Step S410: Input the associated feature matrix into the feature fusion layer of the feature evolution analysis model, perform association modeling processing in combination with spatial association relationships, and generate a fusion feature vector with spatial consistency constraints.
[0115] Association modeling involves integrating feature information and spatial association information from the association feature matrix using specific algorithms and models to generate a fused feature vector with spatial consistency constraints. The spatial consistency constraint requires the fused feature vector to meet spatial consistency requirements; that is, the features of adjacent regional communities should have similar representations in the fused feature vector.
[0116] For example, the feature fusion layer can employ structures such as fully connected layers or convolutional layers. For the associated feature matrix, it is first input into the neurons of the feature fusion layer, where the neurons perform a weighted summation of the elements in the matrix according to preset weights. Simultaneously, the result of the weighted summation is adjusted based on spatial relationships, allowing features from spatially related regional communities to be better integrated.
[0117] Step S420: The multi-scale perception module of the feature evolution analysis model is used to perform collaborative extraction of local detail features and global context information on the fused feature vector to obtain a multi-scale perception feature set.
[0118] The main function of the multi-scale perception module is to extract feature information at different scales from the fused feature vector, including local detail features and global contextual information. Local detail features can reflect subtle feature changes within a region or community, while global contextual information can provide macroscopic feature information for the entire scene.
[0119] In one implementation, step S420 may specifically include the following steps: Step S421: Input the fused feature vector into the feature segmentation layer of the multi-scale perception module, divide the feature channels of the fused feature vector according to the preset channel segmentation ratio, and generate a dual-path parallel feature stream containing local feature branches and global feature branches.
[0120] The feature segmentation layer is the starting part of the multi-scale perception module. Its function is to divide the feature channels of the fused feature vector into dual-path parallel feature streams. The preset channel segmentation ratio is determined in advance according to actual needs, which determines the distribution ratio of the feature channels of the fused feature vector between local feature branches and global feature branches.
[0121] In the feature segmentation layer, a preset channel segmentation ratio is first determined. For example, the feature channels of the fused feature vector can be divided into local feature branches and global feature branches in a 3:7 ratio. Then, the feature channels of the fused feature vector are segmented according to this ratio. Specifically, the feature channels of the fused feature vector are numbered sequentially, with the first part of the channels assigned to the local feature branch and the second part assigned to the global feature branch. This generates a dual-path parallel feature stream containing local and global feature branches, allowing for independent extraction and processing of local detail features and global contextual information in subsequent steps.
[0122] Step S422: In the local feature branch, a convolution kernel with a preset receptive field range is used to expand the spatial receptive field of the local feature branch, and local detail feature maps at different spatial scales are extracted. The number of channels in the local detail feature map is aligned with the number of channels in the global feature branch.
[0123] The main task of the local feature branch is to extract local detailed features from the fused feature vector. A convolutional kernel with a preset receptive field is a convolutional kernel with a set size and shape, which determines the spatial scope of the convolution operation. By using a convolutional kernel with a preset receptive field to expand the spatial receptive field of the local feature branch, local detailed features at different spatial scales can be extracted.
[0124] During spatial receptive field expansion, the convolutional kernel performs sliding convolution operations on the feature maps of local feature branches. Each convolution operation weights and sums the feature elements within the region covered by the kernel, resulting in a new feature value. By continuously adjusting the kernel size and stride, the extent of the spatial receptive field can be changed, thereby extracting local detail features at different spatial scales. Simultaneously, to ensure smooth subsequent fusion operations, the number of channels in the local detail feature map needs to be aligned with the number of channels in the global feature branch. During the convolution operation, the number of channels in the local detail feature map can be controlled by adjusting the number of convolutional kernels to match the number of channels in the global feature branch.
[0125] Step S423: In the global feature branch, adaptive pooling is performed on the global feature branch to generate a context feature vector with global statistical information, and the spatial dimension of the context feature vector is reconstructed to obtain a global context feature map that matches the size of the local detail feature map.
[0126] The primary goal of the global feature branch is to extract global contextual information from the fused feature vector. Adaptive pooling is a pooling operation that automatically adjusts the pooling window size based on the size of the input feature map. It compresses the feature map of the global feature branch, generating a contextual feature vector with global statistical information. During adaptive pooling, the adaptive pooling layer automatically determines the size and stride of the pooling window based on the size of the feature map of the global feature branch. Through pooling, local information in the feature map is summarized to obtain a contextual feature vector with global statistical information. This contextual feature vector contains macroscopic feature information of the global feature branch, such as mean and maximum values. Then, the spatial dimension of the contextual feature vector is reconstructed to match the size of the local detail feature map. Upsampling or interpolation methods can be used to process the contextual feature vector, converting it from a low-dimensional vector form into a feature map of the same size as the local detail feature map, thus obtaining the global contextual feature map.
[0127] Step S424: Input the local detail feature map and the global context feature map into the feature fusion submodule, generate the fusion weights for each channel based on the channel attention mechanism, and perform cross-scale information fusion processing on the local detail feature map and the global context feature map through weighted fusion operation to generate a multi-level fusion feature map set.
[0128] For example, local detail feature maps and global context feature maps are input into the feature fusion submodule. In the feature fusion submodule, a channel attention mechanism is used to process these two feature maps. For instance, the local detail feature map and the global context feature map are first concatenated along the channel dimension to obtain a concatenated feature map. Then, global average pooling is performed on the concatenated feature map to summarize the feature information of each channel, generating a channel-level statistical feature vector. Next, the statistical feature vector is input into a channel attention network containing fully connected layers, and a channel attention weight vector is generated through nonlinear transformation.
[0129] Based on the channel attention weight vectors, a weighted fusion operation is performed on the local detail feature map and the global context feature map. Each channel element in both the local detail feature map and the global context feature map is multiplied by its corresponding channel attention weight, and then these are summed to obtain the fused feature map. By repeating this process multiple times using different convolutional kernels and parameters, a multi-level fused feature map set is generated. This multi-level fused feature map set contains feature information at different scales and levels, enabling a more comprehensive description of feature variations.
[0130] Step S425: Perform channel normalization on the multi-level fusion feature map set to eliminate the feature distribution differences between features at different scales, and then concatenate the normalized feature maps along the channel dimension to generate a multi-scale perceptual feature set with a unified dimensional representation.
[0131] Channel normalization eliminates feature distribution differences between different scales, making features from different scales comparable at the same scale. In a multi-level fused feature map set, feature maps at different scales may have different feature distributions, such as different means and variances. Channel normalization standardizes the channels of these feature maps, making their mean 0 and variance 1. For example, for each feature map in the multi-level fused feature map set, the mean and variance of each channel are calculated. Then, the mean of each channel is subtracted from the element of each channel, and then divided by the variance of that channel to obtain the normalized channel element. In this way, channel normalization is performed on all feature maps in the multi-level fused feature map set. The normalized feature maps are then concatenated along the channel dimension, that is, all normalized feature maps are sequentially connected along the channel dimension to generate a multi-scale perceptual feature set with a unified dimensional representation.
[0132] Step S426: Evaluate the feature contribution of the multi-scale sensing feature set, retain feature components whose contribution meets the retention conditions, and reduce the interference of redundant features on subsequent temporal evolution pattern mining.
[0133] Feature contribution evaluation assesses the degree to which each feature component in a multi-scale sensing feature set contributes to the overall feature representation. Redundant features are those that do not substantially help in mining temporal evolution patterns and may even interfere with the analysis results. By evaluating the feature contribution of the multi-scale sensing feature set and retaining feature components whose contributions meet the retention criteria, data redundancy can be reduced, improving the accuracy and efficiency of subsequent temporal evolution pattern mining.
[0134] When evaluating feature contribution, the correlation between each feature component and the target variable can be calculated; the higher the correlation, the greater the contribution of the feature component. Alternatively, feature selection algorithms, such as recursive feature elimination algorithms, can be used to determine the final retained features by progressively eliminating feature components with lower contributions.
[0135] Retention criteria are pre-defined standards used to determine whether to retain a certain feature component. For example, a contribution threshold can be set. When the contribution of a feature component is greater than the threshold, the feature component is considered to meet the retention criteria and is retained; otherwise, it is removed.
[0136] Step S430: Perform temporal dependency modeling on the multi-scale perceptual feature set through the temporal attention mechanism module of the feature evolution analysis model to generate an attention weight distribution map in the time dimension.
[0137] The main function of the temporal attention mechanism module is to model the temporal dependencies of multi-scale perceptual feature sets to capture the changing patterns of features over time. Temporal dependency refers to the relationship between features at different points in time; some features may have a more significant impact on subsequent evolution at certain points in time, while having a smaller impact at other points. The temporal attention mechanism module can learn these temporal dependencies and assign different attention weights to features at different points in time.
[0138] In the temporal attention mechanism module, a multi-scale perceptual feature set is first input into the module's neurons. The neurons perform a weighted summation of the elements in the feature set according to preset weights, while simultaneously adjusting the result of the weighted summation based on temporal dimension information. For example, through an attention network, the correlation between features at each time point and features at other time points is calculated, and attention weights are assigned to features at each time point based on the magnitude of the correlation.
[0139] The generated attention weight distribution map along the time dimension is a two-dimensional matrix, where rows represent time points and columns represent feature components. Each element in the matrix represents the attention weight for the corresponding time point and feature component. The larger the attention weight, the greater the influence of the feature at that time point on the overall feature evolution.
[0140] Step S440: Perform weighted aggregation processing on the multi-scale perceptual feature set according to the temporal attention weight distribution map to obtain the temporal enhancement feature vector that strengthens the temporal correlation.
[0141] For example, for each feature component at each time point in the multi-scale perceptual feature set, it is multiplied by the attention weight of the corresponding time point in the temporal attention weight distribution map to obtain a weighted feature component. Then, the weighted feature components of all time points are summed to obtain the temporal enhancement feature vector. Since the attention weight reflects the degree of influence of the feature at each time point on the overall feature evolution, the weighted aggregation process can highlight the features of those time points that have a greater impact on feature evolution, thereby strengthening the temporal correlation.
[0142] Step S450: Call the evolution law mining layer of the feature evolution analysis model to perform trend analysis on the time-series enhanced feature vector, identify the feature change pattern over time, and generate a preliminary evolution feature sequence.
[0143] In the evolutionary pattern mining layer, time series analysis algorithms, such as the Autoregressive Integral Moving Average (ARIMA) model and Long Short-Term Memory (LSTM) networks, can be employed. For example, by inputting time-enhanced feature vectors into the LSTM network of the evolutionary pattern mining layer, the network iteratively calculates based on the input feature vectors, learning the feature's changing patterns over time. By continuously adjusting the network's weights and parameters, the network can accurately predict the feature's values at future time points. Based on the network's output, a preliminary evolutionary feature sequence is generated.
[0144] Step S460: Smooth the preliminary evolutionary feature sequence to obtain an evolutionary feature sequence with a stable evolutionary trend.
[0145] The initial evolutionary feature sequence may be affected by noise or local fluctuations, leading to some instability in the data. Smoothing involves filtering and adjusting the initial evolutionary feature sequence to eliminate the influence of noise and local fluctuations, resulting in a more stable evolutionary trend.
[0146] Methods such as moving average and exponential smoothing can be used. Taking the moving average method as an example, for each data point in the preliminary evolutionary feature sequence, the average of its neighboring data points is calculated as the smoothed value for that data point. For instance, for a preliminary evolutionary feature sequence of length n, a moving window of size k (k < n) is selected. For the i-th data point in the sequence, the average of its preceding k data points and its following k data points (if any) is calculated as the smoothed value for the i-th data point. By continuously moving the window, the entire preliminary evolutionary feature sequence is smoothed. Through smoothing, an evolutionary feature sequence with a stable evolutionary trend is obtained. This evolutionary feature sequence can more accurately reflect the true trend of feature changes over time.
[0147] Step S500: Construct the category decision boundary based on the evolutionary feature sequence and generate the incineration residue classification result, which includes the category assignment probability.
[0148] The category decision boundary is used to distinguish different categories of incineration residue. Constructing the category decision boundary based on evolutionary feature sequences allows us to determine the category to which each evolutionary feature sequence belongs. The category assignment probability is the likelihood that an evolutionary feature sequence belongs to a particular category, reflecting the uncertainty of the classification result.
[0149] When constructing category decision boundaries, it is necessary to consider the feature distribution of the evolutionary feature sequence and the differences between categories. Various classification algorithms can be used, such as support vector machines, decision trees, and neural networks. Taking support vector machines as an example, it is an algorithm that separates data into different categories by finding the optimal classifying hyperplane.
[0150] The evolutionary feature sequences are input data into a support vector machine (SVM) model. The model searches for an optimal classification hyperplane based on the feature distribution of the input data, ensuring that evolutionary feature sequences of different classes are separated as accurately as possible. This classification hyperplane is the class decision boundary. For each evolutionary feature sequence, the probability of it belonging to each class is calculated based on its position relative to the class decision boundary.
[0151] In one implementation, step S500 can be implemented as follows: steps S510 to S560: Step S510: Perform time-series feature enhancement processing on the evolutionary feature sequence. Extract the long-window trend component and short-window change component in the sequence by sliding truncation of multiple window lengths to generate an enhanced time-series feature vector. The enhanced time-series feature vector includes trend stability index and change frequency feature.
[0152] The purpose of temporal feature enhancement processing is to further mine the temporal feature information in the evolutionary feature sequence. By sliding truncation with multiple window lengths, the changes in the sequence can be analyzed at different time scales. The long window trend component reflects the overall change trend of the evolutionary feature sequence over a longer time range, which can reflect the long-term stability of the sequence; while the short window change component reflects the local changes of the sequence over a shorter time, which reflects the frequency of change of the sequence.
[0153] In one implementation, step S500 may specifically include the following steps: Step S511: Set multiple sliding windows with different window lengths to perform multi-scale truncation of the evolutionary feature sequence to obtain a set of subsequences containing different time granularities. The window length of the subsequence set increases according to a preset ratio.
[0154] Multi-scale truncation involves using sliding windows of varying lengths to truncate evolutionary feature sequences, thereby obtaining subsequence information at different time granularities. Sliding windows of different lengths allow observation of changes in evolutionary feature sequences at different time scales; long windows can capture long-term trends, while short windows can capture short-term fluctuations.
[0155] When setting up a sliding window, multiple different window lengths need to be determined, and these window lengths increase in a preset ratio. For example, the preset ratio can be 2, and the initial window length is 5 time points, then the subsequent window lengths can be 10, 20, 40, etc. For the evolutionary feature sequence, a sliding window of each length is used to slide and truncate the sequence. The portion of the evolutionary feature sequence covered by each sliding window is a subsequence.
[0156] Step S512: Perform trend fitting processing on each subsequence, and use a smoothing fitting algorithm to extract the long window trend component of the subsequence. The long window trend component reflects the overall change direction of the feature under the corresponding window length.
[0157] Taking polynomial fitting as an example, for each subsequence, a suitable polynomial order is chosen, such as a second- or third-order polynomial. Using the data points in the subsequence as input, the coefficients of the polynomial are solved using the least squares method, minimizing the error between the polynomial curve and the data points in the subsequence. In this way, the fitted curve for the subsequence is obtained.
[0158] The long-window trend component represents the overall direction of change of the fitted curve within the corresponding window length. It can be represented by the slope or derivative of the fitted curve. If the slope of the fitted curve is positive, it indicates that the feature shows an upward trend within the corresponding window length; if the slope is negative, it indicates a downward trend; if the slope is close to zero, it indicates that the feature is relatively stable.
[0159] Step S513: Calculate the difference between the original evolutionary feature sequence and the long window trend component to obtain the short window change component, which contains detailed change information of the features.
[0160] The short-window variation component reflects the local changes in the evolutionary feature sequence over a short period of time, providing detailed information about the changes in the features. The short-window variation component can be obtained by calculating the difference between the original evolutionary feature sequence and the long-window trend component.
[0161] For example, for each data point in the original evolutionary feature sequence, the difference obtained by subtracting the value of the long-window trend component at the corresponding position is the short-window variation component. The short-window variation component contains the remaining variation information of the feature after removing the long-window trend, which is usually caused by noise, local fluctuations, or short-term sudden events.
[0162] Step S514: Perform sequence morphology analysis on the short window change components, extract change frequency features and amplitude features, and generate change feature vectors. The dimension of the change feature vectors is consistent with the number of sliding windows.
[0163] Sequence morphology analysis involves observing and analyzing sequences of short-window variation components to extract their frequency and amplitude characteristics. Frequency characteristics reflect how frequently the short-window variation components change over time, while amplitude characteristics reflect the magnitude of these changes.
[0164] Several methods can be used for sequence morphology analysis. For frequency characteristics, the number of positive and negative changes in the short-window change component sequence can be calculated; a higher number of changes indicates a higher frequency. For amplitude characteristics, statistics such as the maximum, minimum, or standard deviation of the short-window change component sequence can be calculated; these statistics reflect the magnitude of the change. The extracted frequency and amplitude characteristics are combined to generate a change feature vector. The dimension of the change feature vector is consistent with the number of sliding windows, because each sliding window corresponds to a subsequence with its own frequency and amplitude characteristics.
[0165] Step S515: Perform feature alignment processing on the long window trend components of each window length, and concatenate them in descending order of window length to form a trend feature matrix. The row vectors of the trend feature matrix correspond to the trend parameters of different window lengths.
[0166] For example, interpolation or padding methods can be used for feature alignment. For long-window trend components with shorter window lengths, interpolation can be used to extend them to the same time range as the trend components with longer window lengths. Then, the long-window trend components are concatenated in descending order of window length to form a trend feature matrix. The row vectors of the trend feature matrix correspond to trend parameters of different window lengths, with each row representing a long-window trend component of one window length.
[0167] Step S516: Fuse the trend feature matrix and the change feature vector, and generate an enhanced time series feature vector by splicing the feature channels. The enhanced time series feature vector contains multi-scale trend information and change characteristics.
[0168] The trend feature matrix contains long-window trend components under different window lengths, reflecting the overall changing trend of the evolutionary feature sequence at different time scales. The change feature vector contains the frequency and amplitude characteristics of the short-window change components, reflecting the short-term change characteristics of the features. The trend feature matrix and the change feature vector are concatenated along the channel dimension, that is, each column of the trend feature matrix is sequentially connected to an element of the change feature vector to generate an enhanced time-series feature vector. This enhanced time-series feature vector simultaneously contains multi-scale trend information and change characteristics, enabling a more comprehensive description of the time-series characteristics of the evolutionary feature sequence.
[0169] Step S520: Input the enhanced temporal feature vector into the multi-scale decision boundary construction module, combine the contribution weight of the feature dimension to perform initial boundary partitioning, and generate an initial boundary set containing multiple local decision hyperplanes. Each hyperplane in the initial boundary set corresponds to a dimension combination of the feature space.
[0170] The main function of the multi-scale decision boundary construction module is to construct the category decision boundary based on the reinforcement time-series feature vector. The contribution weight of each feature dimension represents the importance of each feature dimension to the category decision. Different feature dimensions may have different impacts on the classification results, so it is necessary to assign corresponding contribution weights to each feature dimension.
[0171] During the initial boundary partitioning, the contribution weights of the feature dimensions are combined to analyze the reinforcement time-series feature vectors. For each combination of dimensions in the feature space, a decision threshold is determined based on the contribution weights, and the data points in the feature vector are classified into different categories according to this threshold. In this way, multiple local decision hyperplanes are generated. Each local decision hyperplane is a plane in a high-dimensional space that divides the feature space into two regions, each corresponding to a different category.
[0172] The initial boundary set is a collection of these local decision hyperplanes, each corresponding to a combination of one dimension of the feature space. By generating the initial boundary set, the decision boundaries between different categories can be preliminarily determined, providing a foundation for subsequent boundary fusion and optimization.
[0173] Step S530: Calculate the spatial overlap between each local decision hyperplane, determine the boundary fusion priority through the feature density distribution of the overlapping region, generate a boundary fusion order table, and arrange the boundary fusion order table from high to low overlap.
[0174] Spatial overlap is the size of the overlapping portion of two local decision hyperplanes in the feature space, reflecting the degree of similarity between the two hyperplanes. The feature density distribution of the overlapping region is the distribution of feature data points within the overlapping region. Regions with high feature density indicate that the feature data points are more concentrated in that region, and have a greater impact on classification decisions.
[0175] The spatial overlap between local decision hyperplanes can be calculated by measuring the intersection area or volume of the two hyperplanes in the feature space. For the overlapping region, the number and distribution of feature data points are statistically analyzed to obtain the feature density distribution of the overlapping region.
[0176] The boundary fusion priority is determined based on the feature density distribution of overlapping regions. Local decision hyperplanes corresponding to overlapping regions with high feature density have higher fusion priority. These local decision hyperplanes are then arranged in descending order of overlap to generate a boundary fusion order table. This order table provides the operational sequence for subsequent boundary fusion processes. Prioritizing the processing of local decision hyperplanes with high overlap can more effectively optimize the decision boundary and reduce overlap conflicts.
[0177] Step S540: Perform successive fusion processing on the initial boundary set according to the boundary fusion order list, and use the feature space interpolation method to eliminate the overlapping conflicts of adjacent hyperplanes to generate a global decision boundary framework with spatial continuity.
[0178] In one implementation, step S540 may include the following steps: Step S541: Select the two local decision hyperplanes with the highest spatial overlap from the boundary fusion order table as the current fusion objects, and extract the normal vector and intercept parameters of the hyperplanes in the feature space.
[0179] When performing boundary fusion processing, the two local decision hyperplanes with the highest spatial overlap are first selected from the boundary fusion order list as the current fusion objects. This is because hyperplanes with high overlap have more obvious conflicts, and prioritizing their processing can more effectively optimize the decision boundary. For the two selected local decision hyperplanes, their normal vectors and intercept parameters in the feature space need to be extracted. The normal vector is a vector perpendicular to the hyperplane and determines the orientation of the hyperplane. The intercept parameter is the hyperplane's position on the coordinate axis.
[0180] Step S542: Calculate the intersection equation of the two hyperplanes, sample along the intersection direction to generate a set of feature points in the overlapping region, and the sampling density of the feature point set is positively correlated with the spatial overlap.
[0181] Calculating the equation of the intersection line of two hyperplanes determines the equation of the straight line at the intersection of the two hyperplanes in the feature space. Given the equations of the two hyperplanes, the equation of the intersection line can be obtained by solving the system of equations simultaneously. Sampling along the direction of the intersection line generates a set of feature points for the overlapping region, which is used to further analyze the feature distribution in the overlapping region. The sampling density is positively correlated with the spatial overlap; that is, the higher the spatial overlap, the greater the sampling density. This is because regions with high overlap have a greater impact on classification decisions, requiring denser sampling to obtain more accurate feature information. During sampling, the starting point and direction of sampling can be determined based on the intersection line equation, and then feature points are selected along the intersection line direction at certain intervals. These feature points are recorded to form the set of feature points for the overlapping region.
[0182] Step S543: Determine the category of the feature point set, calculate the distance ratio from each feature point to the two hyperplanes, and generate a category classification confidence sequence. The confidence sequence reflects the degree of category ambiguity in the overlapping area.
[0183] The purpose of classifying a set of feature points is to determine which category each feature point belongs to. This can be done by calculating the ratio of the distances from a feature point to two hyperplanes. For a given feature point, calculate its distances to both hyperplanes, and then calculate the ratio of these two distances.
[0184] If the distance from a feature point to one hyperplane is much smaller than its distance to another hyperplane, then the feature point is likely to belong to the category corresponding to the closer hyperplane. If the two distances are relatively close, it indicates that the category of the feature point is somewhat ambiguous. The ratio of the distances from each feature point to the two hyperplanes is calculated to generate a category classification confidence sequence. Each element in the confidence sequence represents the category classification confidence of a feature point; the higher the confidence, the clearer the category classification of the feature point; the lower the confidence, the greater the ambiguity of the category classification.
[0185] Step S544: Construct an interpolation function based on the category attribution confidence sequence, perform smooth transition processing on the decision boundary of the overlapping region, and generate a fusion transition hyperplane. The normal vector direction of the transition hyperplane is between the normal vectors of the two original hyperplanes.
[0186] An interpolation function constructed based on the category classification confidence sequence can smoothly transition the decision boundary within overlapping regions. Specifically, a weight is assigned to each feature point according to the confidence value in the confidence sequence. The larger the weight, the clearer the category classification of the feature point, and the greater its influence on the interpolation function.
[0187] Using these weighted feature points, an interpolation function is constructed using appropriate interpolation methods, such as linear interpolation or spline interpolation. This interpolation function generates new decision boundary points within the overlapping region, making the decision boundary smoother. The normal vector of the generated fusion transition hyperplane lies between the normal vectors of the two original hyperplanes. This ensures that the transition hyperplane naturally connects the two original hyperplanes, maintaining continuity of the decision boundary in the overlapping region.
[0188] The fusion transition hyperplane can eliminate the overlap and conflict between two original hyperplanes, making the decision boundary more reasonable and accurate.
[0189] Step S545: Replace the original two local decision hyperplanes with the fusion transition hyperplane, update the initial boundary set, and recalculate the spatial overlap between the remaining hyperplanes.
[0190] Replacing the original two local decision hyperplanes with the fusion transition hyperplane is to update the initial boundary set, making it more reasonable and accurate. After processing the overlapping regions, the fusion transition hyperplane has eliminated the overlap conflict between the original two local decision hyperplanes, and therefore can be used to replace them.
[0191] After updating the initial boundary set, the spatial overlap between the remaining hyperplanes needs to be recalculated. This is because boundary updates may affect the overlap between other hyperplanes. The method for recalculating spatial overlap is the same as before: determining the overlap by calculating the intersection area or volume of the hyperplanes in the feature space. By recalculating the spatial overlap, a new boundary fusion order table can be obtained, providing the latest information for subsequent boundary fusion processing. This process is repeated until all local decision hyperplanes have been processed, ultimately resulting in a global decision boundary framework with spatial continuity.
[0192] Step S546: Repeat the above fusion process until all hyperplanes in the boundary fusion sequence table have been processed. Combine the final retained hyperplanes with the transition hyperplanes to form a global decision boundary framework, ensuring that the spatial overlap of any adjacent hyperplanes within the framework is lower than the preset fusion threshold.
[0193] Repeating the above fusion process is to gradually eliminate overlapping conflicts between all local decision hyperplanes, making the decision boundaries more complete. After each fusion process, the initial boundary set and boundary fusion order table are updated, and then the two hyperplanes with the highest overlap are selected for fusion processing until all hyperplanes in the boundary fusion order table have been processed.
[0194] The retained hyperplanes are combined with the transition hyperplanes to form a global decision boundary framework. This framework includes all the fused hyperplanes, which together constitute a complete decision boundary system. To ensure the framework's rationality and accuracy, the spatial overlap between any two adjacent hyperplanes within the framework must be below a preset fusion threshold.
[0195] The preset fusion threshold is a pre-set critical value. If the spatial overlap of adjacent hyperplanes is higher than this threshold, it means that the conflict between them still exists and further processing is required.
[0196] Step S550: Perform stability verification on the global decision boundary framework. Calculate the boundary offset using random perturbation feature vectors. If the offset is less than the stability threshold, retain the current boundary structure; otherwise, reconstruct the boundary after readjusting the feature dimension contribution weights.
[0197] Boundary offset is the change in position of the decision boundary after a random perturbation of the feature vector. A small boundary offset indicates that the global decision boundary framework has good stability and can resist a certain degree of noise and perturbation; a large boundary offset indicates that the decision boundary may not be stable enough and needs to be adjusted.
[0198] The stability threshold is a pre-defined critical value. When the boundary offset is less than the stability threshold, the current boundary structure is considered stable and is retained. This indicates that the global decision boundary framework can maintain good classification performance and boundary stability when facing certain random perturbations, and can be reliably applied to practical incineration residue classification tasks.
[0199] If the boundary offset exceeds the stability threshold, it indicates that the current global decision boundary framework is not stable enough and may lead to significant deviations in classification results due to minor changes in the data. In this case, it is necessary to readjust the feature dimension contribution weights. Adjusting the feature dimension contribution weights aims to redistribute the importance of each feature dimension in the classification decision, allowing the decision boundary to more accurately reflect the differences between different categories. Optimization algorithms, such as genetic algorithms and particle swarm optimization, can be used to find more suitable feature dimension contribution weights through iterative search. After readingjusting the feature dimension contribution weights, the boundary needs to be reconstructed. The process of reconstructing the boundary is similar to the previous process of constructing the global decision boundary framework, requiring initial boundary division, calculation of spatial overlap, and boundary fusion. This process of adjustment and reconstruction continues until the boundary offset of the resulting global decision boundary framework is less than the stability threshold.
[0200] Step S560: Based on a stable global decision boundary framework, classify the input evolutionary feature sequence, calculate the distance distribution from the sequence to each decision boundary, and generate incineration residue classification results containing the probability of class classification.
[0201] A stable global decision boundary framework is a reliable decision boundary system determined after stability verification, capable of accurately dividing the feature space of different categories. For an input evolutionary feature sequence, its category assignment needs to be determined based on this global decision boundary framework.
[0202] Category assignment is determined by calculating the distance distribution from the evolutionary feature sequence to each decision boundary. The distance distribution reflects the proximity of the evolutionary feature sequence to each decision boundary. Various distance calculation methods can be used, such as Euclidean distance and Manhattan distance. For each evolutionary feature sequence, its distance to each decision boundary in the global decision boundary framework is calculated. Based on the calculated distance distribution, a classification result for incineration residue containing category assignment probabilities is generated. Specifically, if an evolutionary feature sequence is closer to a certain decision boundary, its probability of belonging to the category corresponding to that decision boundary is higher; conversely, if the distance is greater, the probability of belonging to that category is lower. Probabilistic models, such as Gaussian probability models, can be used to calculate the category assignment probabilities based on the distance distribution. The generated incineration residue classification result contains probability information for each evolutionary feature sequence belonging to different categories, which provides important reference for subsequent incineration residue treatment and utilization.
[0203] It is understood that the various algorithms involved in the above descriptions of the embodiments of the present invention can all be obtained from relevant content in the prior art. To save space, they will not be elaborated on in the embodiments of the present invention. In addition, those skilled in the art can supplement the details based on common knowledge in the art when implementing the solutions of the present invention. For example, they can use normalization to eliminate dimensional conflicts before feature fusion, use interpolation to eliminate dimensional differences, reasonably set thresholds based on historical data, experience or business scenario requirements, train the model based on a general model training method, set the number of layers in the model structure based on actual needs, select activation functions, etc. The present invention will not provide redundant descriptions of overly detailed implementation processes here.
[0204] Please see Figure 2This is a schematic diagram of a computer system provided in an embodiment of the present invention. The computer system includes at least a processor 101, a communication interface 102, and a memory 103. The processor 101, communication interface 102, and memory 103 can be connected via a bus or other means. The processor 101 (or Central Processing Unit, CPU) is the computing and control core of the computer system, capable of parsing various instructions and processing various data within the computer system. The communication interface 102 may optionally include standard wired interfaces or wireless interfaces (such as Wi-Fi, mobile communication interfaces, etc.), and can be used for sending and receiving data under the control of the processor 101; the communication interface 102 can also be used for data transmission and interaction within the computer system. The memory 103 is a memory device in the computer system used to store programs and data. It is understood that the memory 103 here can include the computer system's built-in memory, or it can include extended memory supported by the computer system. The memory 103 provides storage space, which stores the computer system's operating system; this invention does not limit this.
[0205] In one embodiment, the processor 101 executes the image recognition-based incineration residue classification method provided above in the embodiments of the present invention by running a computer program in the memory 103.
Claims
1. An image recognition-based incineration residue classification method, characterized by, The method comprises: acquiring surface image data of the incineration residue sample under illumination of a multi-spectral light source, constructing an initial image data set, and acquiring spatial distribution characteristics of the residue surface through linear scanning; dividing the initial image data set into regions to generate a feature region set, each region unit in the feature region set containing homogeneous texture features; performing cross-region feature correlation analysis based on the feature region set to generate a correlation feature matrix containing spatial correlation relationships; calling a pre-trained feature evolution analysis model to mine the evolution characteristics sequence from the correlation feature matrix; constructing a category decision boundary based on the evolution characteristics sequence to generate an incineration residue classification result containing a category attribution probability.
2. The method of claim 1, wherein, The method comprises: performing multi-spectral channel separation on the initial image data set to obtain a single-channel image sequence corresponding to different wavelength light sources, each channel in the single-channel image sequence retaining the reflection characteristics of the residue surface under the corresponding wavelength; performing inter-channel correlation analysis on the single-channel image sequence to calculate the correlation degree of the channel gray values, generate a channel correlation degree matrix, and select a target channel combination composed of multiple channels with correlation meeting preset conditions based on the channel correlation degree matrix; performing pixel-level fusion on the images in the target channel combination to generate a fused image using a channel weight distribution method, the channel weight distribution being determined based on the correlation degree values in the channel correlation degree matrix; performing adaptive threshold segmentation on the fused image to determine the segmentation threshold value through iterative calculation of the gray mean value of different regions, generate a binary region mask, and use the binary region mask to mark the position range of the potential feature region; performing preliminary region division on the fused image based on the binary region mask to obtain an initial region set containing noise regions, the boundary of each region in the initial region set being determined by the connected domain of the mask; performing noise region elimination processing on the initial region set, calculating the area proportion and perimeter smoothness of each region, removing region units with area proportion meeting the elimination condition and perimeter smoothness meeting the elimination condition, and generating a feature region set containing homogeneous texture features.
3. The method of claim 2, wherein, The method comprises: extracting the contour of each region unit in the initial region set to obtain a region contour line composed of continuous pixel points, the pixel point coordinates of the region contour line being arranged in a clockwise direction; calculating the contour curvature change rate based on the region contour line, determining the convexity features of the contour through the tangent angle change amount of adjacent pixel points, and generating a curvature change rate sequence; According to the curvature change rate sequence, a significant inflection point in the region contour is identified, the significant inflection point being a contour point with a curvature change rate exceeding a threshold corresponding to an average curvature change rate of adjacent regions; A simplified contour polygon of the region is formed by connecting the significant inflection points, and a pixel deviation value of the simplified contour polygon from the original region contour line is calculated, the pixel deviation value being an average position deviation of corresponding contour points; When the pixel deviation value is less than a preset deviation threshold, a region unit corresponding to the simplified contour polygon is retained, otherwise, the original region contour line is subjected to segmented smoothing processing to regenerate the simplified contour polygon; The number of region units after contour simplification processing is counted, the area proportion and the perimeter smoothness of each region unit are calculated, region units with an area proportion meeting a removal condition and a perimeter smoothness meeting a removal condition are removed, and an optimized feature region set is generated.
4. The method of claim 3, wherein, The connecting the significant inflection points to form a simplified contour polygon of the region, and calculating a pixel deviation value of the simplified contour polygon from the original region contour line, the pixel deviation value being an average position deviation of corresponding contour points, comprises: The region contour line is subjected to equal-interval sampling to obtain a fixed number of contour sampling points, and the interval distance of the contour sampling points is uniformly distributed according to the total length of the region contour line; The ratio of the chord length between adjacent contour sampling points to the corresponding arc length is calculated to generate a contour smoothness index, and the closer the contour smoothness index value is to 1, the smoother the contour is; Based on the contour smoothness index, the contour sampling points are clustered, and the sampling points with a smoothness index value difference less than a preset clustering threshold are classified into the same smooth segment; For each smooth segment, a contour approximation is performed in a curve fitting manner to obtain a fitting curve of the smooth segment, and the complexity of the fitting curve is dynamically adjusted according to the length of the smooth segment; The endpoints of each fitting curve are extracted as vertices of a simplified contour polygon, and the vertices are connected in the arrangement order of the contour line to form a preliminary simplified contour polygon; The area ratio of the preliminary simplified contour polygon to the original region unit area is calculated, and when the ratio is within a range meeting an area ratio requirement, the preliminary simplified contour polygon is determined as a final simplified contour polygon, otherwise, the sampling interval is readjusted and the above steps are repeated until the area ratio requirement is met.
5. The method of claim 1, wherein, The cross-region feature correlation analysis based on the feature region set generates a correlation feature matrix, comprising: Texture feature extraction is performed on each region unit in the feature region set to obtain a region texture feature vector containing a gray level co-occurrence matrix, a local binary pattern and a histogram of oriented gradients, and the dimension of the region texture feature vector is dynamically adjusted according to the area of the region unit; The similarity between the texture feature vectors of any two region units is calculated to generate an inter-region texture similarity matrix, and the rows and columns of the inter-region texture similarity matrix correspond to the region unit indexes in the feature region set; A region correlation graph is constructed based on the inter-region texture similarity matrix, wherein the nodes of the region correlation graph are region units, and the weight of the edge is the texture similarity value of the corresponding region units. The region association graph is subjected to community division, and a division algorithm based on association degree optimization is used to group the region units into a plurality of region communities, each region community containing region units with similar texture features meeting clustering conditions; An average texture feature vector inside each region community and a texture difference degree between communities are calculated, and a community feature descriptor is generated, which contains a community center coordinate and an average texture feature vector; A spatial association relationship table across regions is constructed according to the community feature descriptor, the spatial association relationship table is converted into a matrix form, and an association feature matrix containing spatial association relationships is obtained.
6. The method of claim 5, wherein, The calculation of the average texture feature vector inside each region community and the texture difference degree between communities to generate the community feature descriptor includes: The centroid coordinates of each region unit in the region community are extracted, and the mean of the centroid coordinates of all region units is calculated as the center coordinate of the region community, the horizontal and vertical coordinates of the center coordinate being the mean of the horizontal and vertical coordinates of the centroid of each region unit, respectively; The texture feature vectors of all region units in the region community are collected, and the texture feature vectors are weighted and averaged according to the proportion of the area of each region unit in the total area of the community to generate a weighted average texture feature vector; The similarity of the weighted average texture feature vector to the texture feature vector of each region unit is calculated, and region units with a similarity meeting core subset conditions are selected to form a core region subset; Principal component analysis is performed on the texture feature vectors of the core region subset, and a preset number of principal components are extracted as the main texture feature directions of the community, the principal component corresponding to the feature value meeting the principal component screening condition being a principal component component; The community feature descriptor containing spatial position and texture characteristics is generated by combining the center coordinate, the weighted average texture feature vector and the main texture feature direction of the region community; The similarity between the community feature descriptors of different region communities is calculated to generate an inter-community similarity matrix, which is used for weight distribution in subsequent cross-regional feature association analysis.
7. The method of claim 6, wherein, The calculation of the similarity between the community feature descriptors of different region communities to generate the inter-community similarity matrix includes: The inter-community similarity matrix is subjected to row normalization processing, so that the sum of the elements in each row is 1, and a normalized similarity matrix is obtained, the elements in the normalized similarity matrix representing the relative influence weight of the corresponding community on the target community; A community influence graph is constructed based on the normalized similarity matrix, wherein the nodes are region communities, and the weight of the directed edge is the corresponding element value in the normalized similarity matrix; Path mining is performed on the community influence graph, and a set of directed paths with a length of 2 is extracted, each path representing the transmission influence relationship between two communities indirectly associated through an intermediate community; The transmission influence weight of each directed path is calculated, which is the product of the weights of the two directed edges in the path, and a transmission influence weight matrix is generated; The normalized similarity matrix and the transmission influence weight matrix are added element by element to obtain a comprehensive similarity matrix, which contains the comprehensive association relationship of direct association weight and indirect association weight. According to the comprehensive similarity matrix, weight distribution of cross-region feature correlation analysis is adjusted, the comprehensive similarity matrix is converted into a spatial correlation part of the correlation feature matrix, and construction of the correlation feature matrix is improved.
8. The method of claim 1, wherein, The pre-trained feature evolution analysis model is called to perform time sequence evolution rule mining on the correlation feature matrix to obtain an evolution feature sequence, including: The correlation feature matrix is input into a feature fusion layer of the feature evolution analysis model, correlation modeling processing is performed in combination with spatial correlation relationship, and a fusion feature vector with spatial consistency constraint is generated; Local detail features and global context information are cooperatively extracted from the fusion feature vector by a multi-scale perception module of the feature evolution analysis model to obtain a multi-scale perception feature set; A time attention mechanism module of the feature evolution analysis model is used to perform time sequence dependency modeling processing on the multi-scale perception feature set to generate an attention weight distribution graph in the time dimension; The multi-scale perception feature set is weighted and aggregated according to the time attention weight distribution graph to obtain a time sequence enhancement feature vector with enhanced time sequence correlation; The evolution rule mining layer of the feature evolution analysis model is called to perform trend analysis on the time sequence enhancement feature vector, identify the change mode of the feature over time, and generate a preliminary evolution feature sequence; The preliminary evolution feature sequence is smoothed to obtain an evolution feature sequence with a stable evolution trend.
9. The method of claim 8, wherein, The multi-scale perception module of the feature evolution analysis model cooperatively extracts local detail features and global context information from the fusion feature vector to obtain a multi-scale perception feature set, including: The fusion feature vector is input into a feature segmentation layer of the multi-scale perception module, the feature channels of the fusion feature vector are divided according to a preset channel segmentation ratio, and a double-parallel feature stream containing a local feature branch and a global feature branch is generated; In the local feature branch, a convolution kernel with a preset receptive field range is used to perform spatial receptive field expansion processing on the local feature branch to extract local detail feature maps at different spatial scales, and the number of channels of the local detail feature maps is aligned with the number of channels of the global feature branch; In the global feature branch, the global feature branch is adaptively pooled to generate a context feature vector with global statistical information, and the context feature vector is reconstructed in the spatial dimension to obtain a global context feature map matching the size of the local detail feature map; The local detail feature map and the global context feature map are input into a feature fusion sub-module to generate fusion weights for each channel based on a channel attention mechanism, and cross-scale information fusion processing is performed on the local detail feature map and the global context feature map by a weighted fusion operation to generate a multi-level fusion feature mapping set; The multi-level fusion feature mapping set is subjected to channel normalization processing, and the normalized feature mappings are spliced along the channel dimension to generate a multi-scale perception feature set with unified dimension representation; The multi-scale perception feature set is subjected to feature contribution degree evaluation, and feature components with contribution degrees meeting a reservation condition are reserved.
10. A computer system, characterized by The method comprises the following steps: A memory in which a computer program is stored; A processor for loading the computer program to implement the image recognition-based incineration residue classification method according to any one of claims 1-9.