Multi-channel sensing spectrogram fusion method for gas identification
By tensorizing and adaptive multi-scale decomposition of multi-channel sensor signals, decoupling and weighted fusion of features, the problem of low gas identification accuracy of multi-channel sensor arrays in complex environments is solved, and efficient gas type identification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-07
AI Technical Summary
Multi-channel sensor arrays struggle to effectively analyze multiple coupled information in complex environments, resulting in low gas identification accuracy. Existing signal processing methods are unable to separate gas discrimination features from useless information such as concentration interference and environmental noise, and traditional feature fusion methods cannot dynamically match the contribution of features at different scales.
By tensorizing the raw response signals from multiple gas sensors, adaptive multi-scale decomposition is performed to generate subband tensors, and feature decoupling is carried out. Subsequently, cross-scale weighted fusion and classification decision are performed, and support vector machines are used for gas type identification.
It improves the accuracy and reliability of gas identification, solves the problems of feature loss and limited fusion capability in traditional methods, and enhances the identification accuracy and robustness in complex scenarios.
Smart Images

Figure CN121808534A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology, and in particular relates to a multi-channel sensor spectrum fusion method for gas identification. Background Technology
[0002] Gas identification technology has indispensable applications in environmental monitoring, industrial safety early warning, medical diagnosis, and food preservation. Its core requirement is to accurately identify gas types based on gas response signals acquired by sensors. As the complexity of detection scenarios increases, single gas sensors, due to their limited response spectrum information and weak anti-interference capabilities, are insufficient to meet the identification needs of multi-component mixed gases or complex environments. Multi-channel gas sensor arrays have emerged to address this need. These arrays simultaneously acquire gas response signals from multiple different types of sensors, providing richer sensor spectrum information and laying the foundation for improved identification accuracy. This has become the mainstream technology in the field of gas identification.
[0003] However, multi-channel sensor spectral data is characterized by high dimensionality, wide dynamic range, and multiple coupled information including sensor heterogeneity, temporal dynamics, and environmental interference, making efficient parsing difficult with traditional signal processing methods. For example, existing signal processing techniques often use matrix representations of multi-channel signals, which easily loses high-order correlations between sensors, time, and response values, resulting in incomplete feature representation. Furthermore, in multi-scale feature extraction, wavelet transform methods with fixed wavelet basis functions and decomposition depths are typically used, which cannot adaptively adjust parameters according to the dynamic response characteristics of different gases, easily leading to the omission of key scale features or redundant decomposition. In addition, feature decoupling often relies on simple filtering or matrix factorization techniques with single constraints, making it difficult to effectively separate gas discrimination features from useless information such as concentration interference and environmental noise. Moreover, feature fusion often uses direct splicing or fixed weighting, failing to dynamically allocate weights based on the contribution of each scale feature to the recognition task, thus limiting the discriminative power of the fused features. Summary of the Invention
[0004] Therefore, it is necessary to provide a multi-channel sensor spectrum fusion method for gas identification to address the above-mentioned technical problems, aiming to improve the accuracy of gas identification and enhance the adaptability of feature extraction and fusion.
[0005] In a first aspect, this application provides a multi-channel sensor spectrum fusion method for gas identification, including:
[0006] The original response signals are acquired from multiple gas sensors, and tensor quantization is performed on each original response signal to obtain a three-dimensional original tensor. The three-dimensional original tensor is then subjected to adaptive multi-scale decomposition to generate multiple sub-band tensors.
[0007] Each subband tensor is subjected to feature decoupling processing to generate a discriminative feature tensor of the corresponding scale;
[0008] Cross-scale weighted fusion processing is performed on the discriminative feature tensors at each scale to generate a fused feature vector; the fused feature vector is then used for classification decision processing to output gas type identifiers.
[0009] In one embodiment, the original three-dimensional tensor is subjected to adaptive multi-scale decomposition to generate multiple sub-band tensors, including:
[0010] The temporal gradient of the original three-dimensional tensor in the time dimension is calculated. The extrema are extracted and the distribution is statistically processed. The corresponding extrema and distribution features are combined to construct the extrema distribution features of the temporal gradient.
[0011] Based on the distribution characteristics of temporal gradient extrema, the optimal wavelet basis function is selected from a pre-set wavelet basis function library;
[0012] Calculate the frequency domain energy entropy of the original three-dimensional tensor, and determine the decomposition depth based on a preset entropy threshold.
[0013] The time dimension of the original three-dimensional tensor is decomposed by wavelet packet decomposition using the optimal wavelet basis function, generating subband tensors with the same number of decomposition depths.
[0014] In one embodiment, feature decoupling processing is performed on each subband tensor to generate a discriminative feature tensor of the corresponding scale, including:
[0015] Perform nonnegative tensor decomposition on each subband tensor to obtain the sensor factor matrix, time factor matrix and feature factor matrix corresponding to each subband tensor;
[0016] Based on the preset gas type identification requirements, a set of sparse constraint optimization processes are applied to the sensor factor matrix corresponding to each sub-band tensor to obtain the discrimination factor matrix corresponding to each sub-band tensor.
[0017] Tensor reconstruction is performed on the discriminant factor matrix, time factor matrix, and feature factor matrix corresponding to each subband tensor to generate the discriminant feature tensor of the scale corresponding to each subband tensor.
[0018] In one embodiment, the discriminative feature tensors at each scale are subjected to cross-scale weighted fusion processing to generate a fused feature vector, including:
[0019] Max pooling is performed on each discriminative feature tensor along the time dimension to generate scale feature vectors corresponding to each scale.
[0020] The feature vectors at each scale are input into an attention network containing fully connected layers and learnable vectors to obtain the weight values corresponding to each scale; the weight values corresponding to each scale are obtained through the following steps:
[0021] By mapping the feature vectors at each scale through a fully connected layer, the hidden layer feature vectors corresponding to each scale are obtained.
[0022] Calculate the dot product of each hidden layer feature vector and the learnable vector to obtain the unnormalized weight values corresponding to each scale;
[0023] The unnormalized weight values are normalized using the Softmax function to obtain the weight values corresponding to each scale.
[0024] The corresponding scale feature vectors are weighted and summed according to each weight value to generate a fused feature vector.
[0025] In one embodiment, the fused feature vector is subjected to classification decision processing to output a gas type identifier, including:
[0026] The fused feature vectors are input into a pre-trained support vector machine (SVM) classifier, which outputs gas type identifiers. The SVM classifier includes a radial basis function kernel, multiple trained support vectors, and a decision function. The gas type identifiers are obtained through the following steps:
[0027] The similarity between the fused feature vector and each training support vector is calculated using the radial basis kernel function.
[0028] The classification decision value is obtained by weighted summation of the similarities.
[0029] The classification decision value is judged and processed by the decision function, and the gas type identifier is output.
[0030] In one embodiment, based on the preset gas type identification discrimination requirements, a set of sparse constraint optimization processes are applied to the sensor factor matrices corresponding to each sub-band tensor to obtain the discrimination factor matrices corresponding to each sub-band tensor, including:
[0031] For each subband tensor corresponding to the sensor factor matrix, and in combination with the preset gas type identification discrimination requirements, a non-negative tensor decomposition optimization objective containing a group sparse regularization term is constructed.
[0032] The objective of nonnegative tensor decomposition optimization is solved by alternating direction multiplier method, which sparsifies the column vectors of sensor factor matrix, resulting in a sparsified sensor factor matrix.
[0033] The L2 norm of each column vector of the sparsified sensor factor matrix is calculated to obtain the L2 norm of each column vector.
[0034] Filter the column vectors of the sparsed sensor factor matrix whose L2 norm is greater than a preset threshold to obtain the filtered column vectors. Arrange the filtered column vectors in their original order to construct the discriminant factor matrix corresponding to the subband tensor.
[0035] In one embodiment, the elements of the subband tensor are obtained using the following decomposition formula:
[0036]
[0037]
[0038] in, For the first The first scale, the first The sensor channel, the first Elements of the subband tensor at each time step, and , For decomposition depth, , For the number of sensors, , The original time step, For three-dimensional primitive tensors The Middle The sensor channel, the first The original response signal at each time step, For the first The optimal wavelet basis function at the scale, and satisfying , For the mother wavelet function, For the first The first scale The sensor and the first The channel correlation weights of each sensor are obtained by normalization using the Softmax function, cov For the first The and the first The covariance of the original signals from each sensor channel. This represents the variance of the covariance of each sensor channel.
[0039] Secondly, this application also provides a multi-channel sensor spectrum fusion device for gas identification, comprising:
[0040] The signal acquisition and multi-scale decomposition module is used to acquire the corresponding raw response signals from multiple gas sensors, perform tensor quantization on each raw response signal to obtain a three-dimensional raw tensor, and perform adaptive multi-scale decomposition on the three-dimensional raw tensor to generate multiple sub-band tensors.
[0041] The subband tensor feature decoupling module is used to perform feature decoupling processing on each subband tensor separately, generating a discriminative feature tensor of the corresponding scale;
[0042] The feature fusion and classification decision module is used to perform cross-scale weighted fusion processing on the discriminative feature tensors at various scales to generate a fused feature vector; and to perform classification decision processing on the fused feature vector to output gas type identifiers.
[0043] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the first aspect.
[0044] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the first aspect.
[0045] The aforementioned multi-channel sensor spectrum fusion method for gas identification firstly constructs a three-dimensional original tensor by tensorizing the original response signals acquired from multiple gas sensors. This solves the problem of lost high-order correlations between sensors, time, and response values in traditional matrix representations, improving the completeness of sensor spectrum information and the foundation for feature representation. Secondly, the three-dimensional original tensor undergoes adaptive multi-scale decomposition to generate multiple sub-band tensors. This solves the problem of missing or redundant decomposition of key scale features due to traditional fixed wavelet basis functions and decomposition depths, improving the targeting and effectiveness of multi-scale dynamic response feature extraction. Furthermore, each sub-band tensor is decoupled to generate a corresponding scale-specific discriminative feature tensor. This solves the problem of traditional methods struggling to separate the coupling between gas discriminative features and useless information such as concentration interference and environmental noise, improving feature purity and discriminative directionality. Further, the discriminative feature tensors at each scale undergo cross-scale weighted fusion processing. This solves the deficiency of traditional simple splicing or fixed-weight fusion methods in dynamically matching the contribution of features at each scale, strengthening the aggregation effect and discriminative ability of effective features. Finally, the fused feature vector is processed for classification decision-making to output gas type identifiers, which solves the problems of low recognition accuracy and poor robustness caused by insufficient feature quality in the existing technology, and improves the accuracy and reliability of gas recognition in complex scenarios. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 A flowchart of a multi-channel sensor spectrum fusion method for gas identification is provided as an exemplary embodiment of the present invention;
[0048] Figure 2 A flowchart of a method for feature decoupling of subband tensors is provided as an exemplary embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram of a multi-channel sensor spectrum fusion device for gas identification, provided as an exemplary embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] In one embodiment, such as Figure 1 As shown, a multi-channel sensor spectrum fusion method for gas identification is provided. This embodiment illustrates the method's application to a terminal. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0052] S101: Acquire the corresponding raw response signals from multiple gas sensors, perform tensor quantization on each raw response signal to obtain a three-dimensional raw tensor; perform adaptive multi-scale decomposition on the three-dimensional raw tensor to generate multiple sub-band tensors.
[0053] Specifically, multiple gas sensors can form a sensor array, and each gas sensor has differentiated response characteristics for different gas components or concentrations. This allows for the simultaneous acquisition of multi-dimensional response data under the target gas environment, providing a data foundation for subsequent multi-channel information fusion. Furthermore, traditional signal processing typically uses a two-dimensional matrix to represent multi-channel time-series signals, only reflecting the relationship between the sensor and time dimensions. This easily loses the higher-order coupling relationships between sensor heterogeneity, temporal dynamics, and response values, resulting in incomplete feature representation. Therefore, tensor quantization can be performed on each raw response signal. The time-series response signal of each gas sensor is treated as an independent channel dimension, the time sampling point as the time dimension, and the response value as the signal amplitude dimension, constructing a three-dimensional raw tensor. This tensor can completely preserve the three-dimensional correlation information between the sensor, time, and response value, providing comprehensive information support for subsequent multi-scale feature extraction and decoupling. Furthermore, since the response signals of gas sensors contain dynamic characteristics at different time scales, including both instantaneous features with rapid responses and slow-changing steady-state features, and the response characteristics of different gases are often distributed within a specific scale range, traditional multi-scale analysis methods with fixed decomposition parameters cannot adapt to the differences in response characteristics of different gases, and are prone to problems such as omission of key scale features or redundant decomposition. Therefore, by performing adaptive multi-scale decomposition processing on the three-dimensional original tensor, the decomposition strategy can be automatically matched according to the signal characteristics of the three-dimensional original tensor. For example, the wavelet basis function and decomposition depth can be automatically adjusted according to the dynamic characteristics of the gas response signal, decomposing the original signal into multiple sub-band tensors of different scales. Each sub-band tensor corresponds to a type of dynamic response feature, thereby achieving accurate decomposition of multi-scale information of the gas response and laying the foundation for subsequent targeted feature decoupling.
[0054] S102: Perform feature decoupling processing on each subband tensor to generate a discriminative feature tensor of the corresponding scale.
[0055] Specifically, since each subband tensor contains not only discriminative features directly related to the gas type, but also interference information such as gas concentration changes, ambient temperature and humidity fluctuations, and sensor noise, this useless information is coupled with the discriminative features, severely affecting the accuracy of subsequent identification. Therefore, by performing feature decoupling processing on each subband tensor separately, features related to gas type discrimination can be separated from the complex subband tensor, and information irrelevant to concentration interference and environmental noise can be removed, generating a discriminative feature tensor of the corresponding scale. This feature vector can effectively reflect the essential characteristics of the gas response signal. For example, the subband tensor can be mathematically modeled, assuming it can be represented as a linear combination of the discriminative feature tensor and the interference feature tensor. Subsequently, the discriminative feature tensor can be solved using optimization algorithms such as alternating least squares or gradient descent, so that it can restore the original subband tensor to the greatest extent while satisfying certain constraints (such as sparsity or non-negativity).
[0056] S103: Perform cross-scale weighted fusion processing on the discriminative feature tensors at each scale to generate a fused feature vector; perform classification decision processing on the fused feature vector to output gas type identifiers.
[0057] Specifically, discriminant feature tensors at different scales correspond to different dynamic characteristics of gas responses, and their contributions to the recognition task vary. However, traditional fusion methods often use direct concatenation or fixed weighting, which cannot dynamically adapt to the actual contribution value of features at each scale, thus limiting the discriminative ability of the fused features. Cross-scale weighted fusion, on the other hand, can assign adaptive weights to features at different scales based on the feature quality and recognition contribution of each discriminant feature tensor. This allows key scale features with a greater impact on the recognition result to receive higher weights, and then generates a fused feature vector through weighted summation. This fused vector aggregates effective discriminant features at various scales, avoiding the limitations of single-scale features while strengthening the dominant role of key features and improving the overall discriminative ability of the features. After the fused feature vector is generated, it can be processed for classification decision-making, outputting gas type identifiers. Various machine learning algorithms, such as Support Vector Machines (SVM), neural networks, or decision trees, can be used in the classification decision-making process. These algorithms can learn the relationship between the features and categories of known gas samples to build a classification model, thereby classifying and recognizing the fused feature vectors of unknown gas samples. For example, during the model training phase, a large number of labeled gas samples can be used to train the classification model, enabling it to accurately identify the characteristic patterns of different gas types. During the testing phase, by inputting the fused feature vector into the trained classification model, the corresponding gas type identifier can be output, thus completing the gas identification task.
[0058] The aforementioned method first acquires raw response signals from multiple gas sensors and performs tensor quantization to overcome the shortcomings of traditional methods that easily lose high-order correlations in matrix representation, effectively preserving the complex relationships between sensors, time, and response values. Second, it performs adaptive multi-scale decomposition on the three-dimensional raw tensor to generate multiple sub-band tensors, overcoming the problem of missing or redundant decomposition of key scale features caused by fixed wavelet basis functions and decomposition depth, thus improving the flexibility and adaptability of feature extraction. By decoupling features from each sub-band tensor, discriminative feature tensors of corresponding scales are generated, effectively separating gas discriminative features from useless information such as concentration interference and environmental noise, improving feature discrimination capability. Finally, cross-scale weighted fusion processing is performed on the discriminative feature tensors of each scale to generate a fused feature vector, which is then used for classification decision processing to output gas type identifiers. This solves the problem of limited discriminative capability of fused features caused by fixed weighting or simple concatenation in traditional methods, significantly improving the accuracy and reliability of gas identification.
[0059] In one embodiment, an adaptive multi-scale decomposition process is performed on the original three-dimensional tensor to generate multiple sub-band tensors, including:
[0060] The temporal gradient of the original three-dimensional tensor in the time dimension is calculated. The extrema are extracted and the distribution is statistically processed. The corresponding extrema and distribution features are combined to construct the extrema distribution features of the temporal gradient.
[0061] Based on the distribution characteristics of temporal gradient extrema, the optimal wavelet basis function is selected from a pre-set wavelet basis function library;
[0062] Calculate the frequency domain energy entropy of the original three-dimensional tensor, and determine the decomposition depth based on a preset entropy threshold.
[0063] The time dimension of the original three-dimensional tensor is decomposed by wavelet packet decomposition using the optimal wavelet basis function, generating subband tensors with the same number of decomposition depths.
[0064] Specifically, assuming a three-dimensional primitive tensor The dimension is ( For the number of sensors, (where the time step is the time dimension), where the time dimension reflects the dynamic interaction between the gas and the sensor, such as the rapid signal rise during adsorption and the slow decline during desorption, and the temporal gradient characterizes the rate of change of this process. For example, the temporal gradient can be calculated for the time step signal of each sensor channel, i.e. ,in , For sensor channel index, , This serves as the time step index. Subsequently, the maxima and minima (corresponding to key inflection points in the response process) of the temporal gradient sequence for each channel can be extracted, and the numerical distribution characteristics of these extrema, such as mean, variance, and quartiles, can be statistically analyzed. By integrating the extrema sets and distribution statistics of each sensor channel, the temporal gradient extrema distribution characteristics can be obtained. These characteristics quantify the dynamic change patterns of the signal, which is the core basis for subsequent matching of the time-domain characteristics of wavelet basis functions.
[0065] Specifically, different wavelet basis functions, such as the sym series and db series, differ in their time-domain support length, number of extrema, and distribution, adapting to signals with different dynamic modes. For example, the time-domain waveform of the sym5 basis function better matches the rapid fluctuation characteristics of gas response. Illustratively, a preset wavelet basis function library can contain various commonly used wavelet bases. By calculating the time-domain characteristics of each basis function in the library, such as the number of extrema within the support length and the variance of the extrema distribution, and the cosine similarity (the degree of matching between these characteristics and the time-series gradient extrema distribution characteristics), the basis function with the highest matching degree can be selected as the optimal wavelet basis at the j-th scale. It satisfies the scaling relationship. , Using the mother wavelet function as the transform relationship, this transformation ensures the energy normalization of the wavelet basis at different scales, avoiding signal amplitude distortion during decomposition. Furthermore, since the frequency domain energy entropy reflects the uniformity of signal distribution in the frequency domain, a decomposition depth that is too shallow will miss high-frequency details, while one that is too deep will introduce redundant decomposition. Therefore, the decomposition depth can be determined by calculating the frequency domain energy entropy of the original three-dimensional tensor and based on a preset entropy threshold. For example, first...
[0066] The frequency domain spectrum is obtained by performing a Fourier transform on the original three-dimensional tensor. The energy percentage of each frequency component is then calculated based on this spectrum. Calculate the frequency domain energy entropy ,in The energy percentage for each frequency component For frequency cable
[0067] The entropy value is compared with a preset entropy threshold. In comparison, if This indicates that the signal's frequency domain distribution is dispersed and contains multi-scale information, thus increasing the decomposition depth. Until the entropy value falls below the threshold, the final determination is made. This ensures that the decomposed subband tensor covers the main frequency domain information of the signal while avoiding redundancy.
[0068] Specifically, during wavelet packet decomposition of the time dimension of the original three-dimensional tensor using the optimal wavelet basis function, the channel correlations of multiple sensors can be fused to improve the discriminative power of the subband tensor. The subband tensor elements at the j-th scale, c-th sensor channel, and t-th time step can be calculated using the following formula:
[0069]
[0070] in, For the first The first scale, the first The sensor channel, the first Elements of the subband tensor at each time step, and , For decomposition depth, , For the number of sensors, , The original time step, It is the displacement form of the optimal wavelet basis at the j-th scale. The time step interval at this scale. For three-dimensional primitive tensors The Middle The sensor channel, the first The original response signal at each time step, For the first The first scale The sensor and the first The channel correlation weights of each sensor can be obtained by normalization using the Softmax function:
[0071]
[0072] Among them, cov For the first The and the first The covariance of the original signals from each sensor channel. and To correspond to the cth, respectively Complete time series of each sensor channel The variance of the covariance for each sensor channel is used to normalize the covariance values and avoid excessive numerical differences affecting the weight distribution. Through the above decomposition, for the j-th scale, all sensor channels... Time step t corresponds to By combining the elements of the subband tensor, a 3D subband tensor corresponding to the j-th scale can be obtained. When the decomposition depth is L, L subband tensors can be obtained. Each subband tensor retains the dynamic features of the corresponding scale in the time dimension and integrates the correlation information of multiple sensors, providing a high information density input for subsequent feature decoupling.
[0073] In one embodiment, such as Figure 2 As shown, feature decoupling is performed on each subband tensor to generate a discriminative feature tensor of the corresponding scale, including:
[0074] S201: Perform non-negative tensor decomposition on each subband tensor to obtain the sensor factor matrix, time factor matrix and feature factor matrix corresponding to each subband tensor;
[0075] S202: Based on the preset gas type identification discrimination requirements, apply a set of sparse constraint optimization processes to the sensor factor matrix corresponding to each sub-band tensor to obtain the discrimination factor matrix corresponding to each sub-band tensor;
[0076] S203: Perform tensor reconstruction processing on the discriminant factor matrix, time factor matrix and feature factor matrix corresponding to each subband tensor to generate the discriminant feature tensor of the scale corresponding to each subband tensor.
[0077] Specifically, we can first perform nonnegative tensor decomposition on each subband tensor. Each subband tensor... The dimension is (in For the first Time step at this scale The tensor represents the feature dimension. Its three-dimensional information corresponds to the sensor channel, temporal dynamics, and signal characteristics, respectively, but the coupling relationship among these three makes it impossible to directly distinguish the effective components. Furthermore, since the sensor response amplitude, temporal dynamic intensity, and feature signal quantity are all non-negative physical quantities, non-negative tensor decomposition can be used to decompose this tensor into a product of three non-negative factor matrices, satisfying... ,in For the sensor factor matrix ( (The number of factors is preset, and each column corresponds to the feature contribution weight of a sensor group). This is a time factor matrix (each column corresponds to the dynamic change pattern of the time dimension). This is a feature factor matrix (each column corresponds to a feature component of the signal). Furthermore, optimal decomposition can be achieved by minimizing the reconstruction error in the form of the Frobenius norm. This decomposition process can split the three-dimensional coupling information of the subband tensor into three independent-dimensional factor matrices, providing an operable object for subsequent targeted interference removal.
[0078] Furthermore, based on the preset gas type identification requirements, a set of sparse constraints can be applied to the sensor factor matrix corresponding to each sub-band tensor for optimization. The preset gas type identification requirements explicitly require retaining sensor response components strongly correlated with the gas type, while the sensor factor matrix... In this context, some columns correspond to the contributions of invalid interference such as environmental temperature and humidity fluctuations and sensor circuit noise; these are redundant groups that have no discriminative value for gas identification. Group sparsity constraints can then be applied to… The columns (each corresponding to a factor of a sensor group) are used to construct an optimization objective including a regularization term, thus forming a constraint group. Based on this optimization objective, the L2 norm of the columns corresponding to the redundant groups will approach 0 during the optimization process, achieving group-level sparsity and retaining only the columns that contribute to gas type discrimination. This represents the discriminant factor matrix corresponding to each sub-band tensor, containing only the feature contributions from the effective sensor groups. Finally, tensor reconstruction processing is performed on the discriminant factor matrix, time factor matrix, and feature factor matrix corresponding to each sub-band tensor. This allows the discriminant factor matrix to be reconstructed according to the rules of tensor multiplication. Compared with the original time factor matrix eigenfactor matrix Recombined, we get ,Should This is the discriminative feature tensor at the corresponding scale. This reconstruction process can retain the effective dynamic patterns in the time dimension and the useful components in the feature dimension, while replacing them with purified sensor discriminative factors, thereby decoupling the discriminative features from the interference information. The final generated discriminative feature tensor contains only multi-dimensional information related to the gas type, providing high-quality feature input for subsequent cross-scale fusion, which can effectively improve the accuracy and robustness of subsequent recognition tasks.
[0079] In one embodiment, based on the preset gas type identification discrimination requirements, a set of sparse constraint optimization processes are applied to the sensor factor matrices corresponding to each sub-band tensor to obtain the discrimination factor matrices corresponding to each sub-band tensor, including:
[0080] For each subband tensor corresponding to the sensor factor matrix, and in combination with the preset gas type identification discrimination requirements, a non-negative tensor decomposition optimization objective containing a group sparse regularization term is constructed.
[0081] The objective of nonnegative tensor decomposition optimization is solved by alternating direction multiplier method, which sparsifies the column vectors of sensor factor matrix, resulting in a sparsified sensor factor matrix.
[0082] The L2 norm of each column vector of the sparsified sensor factor matrix is calculated to obtain the L2 norm of each column vector.
[0083] Filter the column vectors of the sparsed sensor factor matrix whose L2 norm is greater than a preset threshold to obtain the filtered column vectors. Arrange the filtered column vectors in their original order to construct the discriminant factor matrix corresponding to the subband tensor.
[0084] Specifically, based on the reconstruction error of nonnegative tensor decomposition, a group sparse regularization term can be introduced to construct the optimization objective of nonnegative tensor decomposition. This optimization objective can be:
[0085]
[0086] in, For the sensor factor matrix, , These are time and feature factor matrices, respectively. The regularization coefficient is determined by the pre-defined stringency of the discrimination requirements. for No. The L2 norm of the column (corresponding to the group sparsity constraint term). By using this objective, while ensuring the accuracy of subband tensor reconstruction, the norm of redundant columns can be compressed through regularization terms, achieving targeted optimization that preserves effective columns and sparsifies redundant columns. Furthermore, since this optimization problem includes nonnegativity constraints and group sparsity constraints, direct solution has high computational complexity and is prone to getting trapped in local optima. The Alternating Direction Multiplier Method (ADMM), by decomposing the original problem into multiple subproblems and solving them iteratively, can balance computational efficiency and optimal solution. Therefore, the Alternating Direction Multiplier Method (ADMM) can be used to solve this optimization objective. For example, first introduce auxiliary variables... The original problem is transformed into:
[0087]
[0088] in, This is the penalty parameter. Then, three steps are executed alternately, first fixing... Solve , , The non-negative least squares subproblem is used to ensure the non-negativity of the factor matrix. Secondly, the fixed... Solve The L2 norm regularization subproblem allows for sparsification of column vectors through a shrinkage operator. Finally, the dual variable is updated to ensure iterative convergence. This iterative process continues until the reconstruction error and sparsity satisfy a preset convergence condition, such as the change in the objective function value between two consecutive iterations being less than [a certain value]. At that time, the final result was This is the sparsed sensor factor matrix.
[0089] Specifically, since the L2 norm is a quantitative indicator of the contribution strength of column vectors, and the norm of redundant columns is much smaller than that of effective columns, the L2 norm of each column vector in the sparsified sensor factor matrix can be calculated and filtered to separate the two. For example, for the sparsified... Each column Calculate its L2 norm ( (Number of sensors). Then, the norm of each column is compared with a preset threshold. Comparison. Among them, the preset threshold... Based on statistical analysis of experimental data, we can take 1 / 5 of the mean of the effective column norms, and then filter out those with norms greater than 1 / 5. The column vectors are used as effective components. Finally, the filtered column vectors are arranged in their original order to ensure dimensionality matching between the discriminant factor matrix and the time and feature factor matrices, thus constructing the discriminant factor matrix corresponding to the subband tensor. Through the above set of sparsity constraints and filtering, redundant components unrelated to gas recognition are eliminated from the sensor factor matrix. The resulting discriminant factor matrix retains only sensor group features that clearly contribute to gas type identification, providing high-quality sensor dimension input for the subsequent reconstruction of the discriminant feature tensor. This effectively improves the discriminative directionality of the features while avoiding interference from redundant components in subsequent fusion and recognition.
[0090] In one embodiment, the discriminative feature tensors at each scale are subjected to cross-scale weighted fusion processing to generate a fused feature vector, including:
[0091] Max pooling is performed on each discriminative feature tensor along the time dimension to generate scale feature vectors corresponding to each scale.
[0092] The feature vectors at each scale are input into an attention network containing fully connected layers and learnable vectors to obtain the weight values corresponding to each scale; the weight values corresponding to each scale are obtained through the following steps:
[0093] By mapping the feature vectors at each scale through a fully connected layer, the hidden layer feature vectors corresponding to each scale are obtained.
[0094] Calculate the dot product of each hidden layer feature vector and the learnable vector to obtain the unnormalized weight values corresponding to each scale;
[0095] The unnormalized weight values are normalized using the Softmax function to obtain the weight values corresponding to each scale.
[0096] The corresponding scale feature vectors are weighted and summed according to each weight value to generate a fused feature vector.
[0097] Specifically, each discriminative feature tensor The dimension is , For the number of sensors, Let D be the time step and D be the feature dimension. The time dimension contains the dynamic response sequence at that scale. However, subsequent fusion requires converting the three-dimensional tensor into a vector form with a unified dimension. This can be achieved by performing max pooling along the time dimension on each discriminative feature tensor. For example, for each sensor channel and each feature dimension's time step sequence, the maximum value is selected as the representation value for that dimension. , For sensor channel index, Indexing the feature dimensions ultimately generates scaled feature vectors. (After flattening into a one-dimensional vector, the dimension is...) This approach preserves the most significant response features in the time dimension, such as the peak response during gas adsorption, while compressing redundant information in the time dimension, providing a unified feature input for cross-scale fusion. Subsequently, feature vectors from each scale can be input into an attention network containing fully connected layers and learnable vectors to quantify the discriminative importance of features at each scale. The fully connected layers can map scale feature vectors to a high-dimensional latent space based on the ReLU activation function to capture more complex feature relationships, obtaining the latent feature vectors corresponding to each scale.
[0098] Furthermore, by calculating the dot product between the hidden layer feature vector and the learnable vector, unnormalized weight values can be obtained. The learnable vector is a core parameter of the attention network, which learns feature patterns that "discriminate importance" through training. The result of the dot product operation quantifies the degree of matching between the hidden layer feature vector and the "importance pattern"; that is, the higher the matching degree, the larger the value of the dot product result, and the stronger the discriminative contribution of the corresponding scale feature. To ensure that the weight values satisfy the normalization constraint (weight sum equal to 1), the unnormalized weight values for all scales can be processed using the Softmax function to obtain the weight values corresponding to each scale. The magnitude of this weight value directly reflects the contribution of the feature at that scale to gas recognition. Finally, the scale feature vectors are weighted and summed according to the weight values to generate a fused feature vector. This fused feature vector aggregates effective discriminative information from multiple scales, avoiding the limitations of single-scale features and improving the comprehensive discriminative ability of features, providing high-quality feature input for subsequent classification decisions.
[0099] In one embodiment, the fused feature vector is used for classification decision processing to output a gas type identifier, including:
[0100] The fused feature vectors are input into a pre-trained support vector machine (SVM) classifier, which outputs gas type identifiers. The SVM classifier includes a radial basis function kernel, multiple trained support vectors, and a decision function. The gas type identifiers are obtained through the following steps:
[0101] The similarity between the fused feature vector and each training support vector is calculated using the radial basis kernel function.
[0102] The classification decision value is obtained by weighted summation of the similarities.
[0103] The classification decision value is judged and processed by the decision function, and the gas type identifier is output.
[0104] Specifically, Support Vector Machines (SVMs) exhibit strong generalization ability in scenarios with small samples and high-dimensional features. Furthermore, compared to introducing a linear kernel, the introduction of a Radial Basis Function (RBF) kernel can map the original features to a higher-dimensional latent space, thereby fitting the complex nonlinear relationship between gas features and species. The pre-training process of the SVM classifier can be completed based on labeled gas sample features, and after training, multiple training support vectors are obtained. These training support vectors are the sample features that play a crucial role in the classification boundary, forming the core discrimination benchmark of the classifier. After inputting the fused feature vector into the pre-trained SVM classifier, the similarity between the fused feature vector and each training support vector can be calculated using the RBF kernel. The RBF kernel can take the form of:
[0105]
[0106] in, To fuse feature vectors, For the first One training support vector The kernel function parameters are determined through optimization during the pre-training process and are used to control the rate of similarity decay. The value is the squared Euclidean distance between the two. The closer the output value of this kernel function is to 1, the more similar the fused feature vector is to the gas species corresponding to the training support vector; the closer it is to 0, the greater the difference. Then, a weighted sum of the similarities is performed to obtain the classification decision value. That is, the classification decision value of the support vector machine is obtained by weighting the similarity with the coefficients of the trained support vectors. For example, ,in, For the classification decision values of the support vector machine, To the number of training support vectors, To train the class labels for support vectors, These are the support vector coefficients obtained from pre-training, and the support vectors that only contribute to the classification boundary. Non-zero, This is the classification bias term. This classification decision value directly reflects the degree to which the fused feature belongs to its category.
[0107] Specifically, the final classification decision value is determined by a decision function to output a gas type identifier. For a binary classification scenario, the decision function is `sign`. The output corresponds to the labels of two gas types. For multi-class scenarios, a one-to-many strategy can be adopted, comparing the decision values of multiple binary support vector machines and selecting the category with the largest decision value as the output. Through this process, the discriminative information of high-dimensional fusion features can be transformed into clear gas type labels. Furthermore, the kernel function and support vector mechanism of the support vector machine ensure accurate classification based on the effective information of the fusion features, even in complex scenarios with multi-component mixing and environmental interference.
[0108] Based on the same inventive concept, this application also provides a multi-channel sensor spectrum fusion device for gas identification, which implements the multi-channel sensor spectrum fusion method for gas identification described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of a multi-channel sensor spectrum fusion device for gas identification provided below can be found in the limitations of the multi-channel sensor spectrum fusion method for gas identification described above, and will not be repeated here.
[0109] In one exemplary embodiment, such as Figure 3 As shown, a multi-channel sensor spectrum fusion device for gas identification is provided, comprising:
[0110] The signal acquisition and multi-scale decomposition module 301 is used to acquire the corresponding raw response signals from multiple gas sensors, perform tensor quantization construction processing on each raw response signal to obtain a three-dimensional raw tensor, and perform adaptive multi-scale decomposition processing on the three-dimensional raw tensor to generate multiple sub-band tensors.
[0111] The subband tensor feature decoupling module 302 is used to perform feature decoupling processing on each subband tensor separately to generate a discriminative feature tensor of the corresponding scale.
[0112] The feature fusion and classification decision module 303 is used to perform cross-scale weighted fusion processing on the discriminative feature tensors at each scale to generate a fused feature vector; and to perform classification decision processing on the fused feature vector to output the gas type identifier.
[0113] In one exemplary embodiment, the present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the multi-channel sensor spectrum fusion method for gas identification according to this application. A multi-core processor is preferred to improve the system's parallel processing capability. The memory provides sufficient temporary storage space to support program execution and data processing. The memory capacity should be large enough to accommodate large amounts of data and computational tasks.
[0114] In one exemplary embodiment, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of a multi-channel sensor spectrum fusion method for gas identification according to the present application. The computer-readable storage medium may include: read-only memory, random access memory (RAM), solid-state drive (SSD), or optical disk, etc.
[0115] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A multi-channel sensor spectrum fusion method for gas identification, characterized in that, The method includes: The corresponding raw response signals are acquired from multiple gas sensors, and tensor quantization is performed on each raw response signal to obtain a three-dimensional raw tensor. The three-dimensional raw tensor is then subjected to adaptive multi-scale decomposition to generate multiple sub-band tensors. Each subband tensor is subjected to feature decoupling processing to generate a discriminative feature tensor of the corresponding scale; Cross-scale weighted fusion processing is performed on the discriminative feature tensors of each scale to generate a fused feature vector; the fused feature vector is then processed for classification decision-making to output a gas type identifier.
2. The method according to claim 1, characterized in that, The adaptive multi-scale decomposition process of the original three-dimensional tensor to generate multiple sub-band tensors includes: The temporal gradient of the three-dimensional original tensor in the time dimension is calculated, and the extremum extraction and distribution statistics of the temporal gradient are performed respectively. The corresponding extremum and distribution features are obtained and combined to construct the extremum distribution features of the temporal gradient. Based on the temporal gradient extreme value distribution characteristics, the optimal wavelet basis function is selected from the preset wavelet basis function library; Calculate the frequency domain energy entropy of the original three-dimensional tensor, and determine the decomposition depth based on a preset entropy threshold. The time dimension of the original three-dimensional tensor is decomposed using the optimal wavelet basis function to generate the sub-band tensor with the same number of decomposition depths.
3. The method according to claim 1, characterized in that, The step of performing feature decoupling processing on each of the sub-band tensors to generate a discriminative feature tensor of the corresponding scale includes: Perform nonnegative tensor decomposition on each subband tensor to obtain the sensor factor matrix, time factor matrix and feature factor matrix corresponding to each subband tensor; Based on the preset gas type identification requirements, a set of sparse constraint optimization processes are applied to the sensor factor matrix corresponding to each sub-band tensor to obtain the discrimination factor matrix corresponding to each sub-band tensor. Tensor reconstruction processing is performed on the discriminant factor matrix, the time factor matrix, and the feature factor matrix corresponding to each sub-band tensor to generate a discriminant feature tensor corresponding to the scale of each sub-band tensor.
4. The method according to claim 1, characterized in that, The process of performing cross-scale weighted fusion processing on the discriminative feature tensors of each scale to generate a fused feature vector includes: Each discriminative feature tensor is subjected to max pooling along the time dimension to generate scale feature vectors corresponding to each scale. The feature vectors at each scale are input into an attention network containing fully connected layers and learnable vectors to obtain the weight values corresponding to each scale; wherein the weight values corresponding to each scale are obtained through the following steps: The fully connected layer is used to map the feature vectors of each scale to obtain the hidden layer feature vectors corresponding to each scale. Calculate the dot product of each hidden layer feature vector and the learnable vector to obtain the unnormalized weight value corresponding to each scale; The unnormalized weight values are normalized using the Softmax function to obtain the weight values corresponding to each scale. The corresponding scale feature vectors are weighted and summed according to the weight values to generate the fused feature vector.
5. The method according to claim 1, characterized in that, The classification decision processing of the fused feature vector, outputting a gas type identifier, includes: The fused feature vector is input into a pre-trained support vector machine (SVM) classifier, which outputs the gas type identifier. The SVM classifier includes a radial basis function kernel, multiple trained support vectors, and a decision function. The gas type identifier is obtained through the following steps: The similarity between the fused feature vector and each of the training support vectors is calculated using the radial basis kernel function. The weighted summation of the aforementioned similarities yields the classification decision value. The classification decision value is judged and processed by the decision function, and the gas type identifier is output.
6. The method according to claim 3, characterized in that, The step of applying a set of sparse constraint optimization processes to the sensor factor matrix corresponding to each sub-band tensor according to the preset gas type identification discrimination requirements, to obtain the discrimination factor matrix corresponding to each sub-band tensor, includes: For each subband tensor corresponding to the sensor factor matrix, and in conjunction with the discrimination requirements for the preset gas type identification, a non-negative tensor decomposition optimization objective containing a group of sparse regularization terms is constructed. The non-negative tensor decomposition optimization objective is solved by alternating direction multiplier method, which sparsifies the column vectors of the sensor factor matrix, resulting in a sparsified sensor factor matrix. The L2 norm of each column vector of the sparsified sensor factor matrix is calculated to obtain the L2 norm of each column vector. Filter the column vectors of the sparsed sensor factor matrix whose L2 norm is greater than a preset threshold to obtain the filtered column vectors. Arrange the filtered column vectors in their original order to construct the discriminant factor matrix corresponding to the subband tensor.
7. The method according to claim 2, characterized in that, The elements of the subband tensor are obtained using the following decomposition formula: in, For the first The first scale, the first The sensor channel, the first The elements of the subband tensor at each time step, and , For decomposition depth, , For the number of sensors, , The original time step, For the three-dimensional primitive tensor The Middle The sensor channel, the first The original response signal at each time step, For the first The optimal wavelet basis function at the specified scale, and satisfying , For the mother wavelet function, For the first The first scale The sensor and the first The channel correlation weights of each sensor are obtained by normalization using the Softmax function, cov For the first The and the first The covariance of the original signals from each sensor channel. The variance of the covariance for each sensor channel.
8. A multi-channel sensor spectrum fusion device for gas identification, characterized in that, The device includes: The signal acquisition and multi-scale decomposition module is used to acquire corresponding raw response signals from multiple gas sensors, perform tensor quantization construction processing on each raw response signal to obtain a three-dimensional raw tensor, and perform adaptive multi-scale decomposition processing on the three-dimensional raw tensor to generate multiple sub-band tensors. The subband tensor feature decoupling module is used to perform feature decoupling processing on each of the subband tensors to generate a discriminative feature tensor of the corresponding scale. The feature fusion and classification decision module is used to perform cross-scale weighted fusion processing on the discriminative feature tensors of each scale to generate a fused feature vector; and to perform classification decision processing on the fused feature vector to output a gas type identifier.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.