Training method and device of gas concentration monitoring model, equipment and storage medium
By layer downsampling and stacking models to enhance the feature sequence, combined with sequence analysis models, a gas concentration monitoring model is formed, which solves the problem of lack of complex gas concentration monitoring models in the existing technology, and achieves more accurate gas concentration monitoring and environmental adaptability .
Patent Information
- Application Number
- CN202411211694.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The existing technology lacks complex gas concentration monitoring models that integrate fusion gas-related characteristics, and cannot provide real-time and accurate carbon dioxide concentration monitoring. It is difficult to ignore influencing factors in complex environments, which affects the monitoring effect.
By obtaining the training set of gas-related features changes over time, down-sampling layer by layer to obtain feature sequences of different time scales, information enhancement is used using stacking models, potential information is obtained by combining the sequence analysis model, and the prediction model is fused to obtain gas concentration sequences, and through Prediction error correction model parameters are formed to form a gas concentration monitoring model.
The environmental adaptability and prediction accuracy of the model are enhanced, and gas concentration can be monitored more accurately, and a variety of influencing factors are considered, which improves the monitoring effect.
Smart Images

Figure CN119272045A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial forecasting technology, and in particular to a training method, device, equipment and storage medium for a gas concentration monitoring model. Background Art
[0002] In modern industrial production, especially in large industrial facilities such as thermal power plants, gas emissions are an important environmental issue, especially carbon dioxide gas. Controlling and monitoring gas emissions is essential to protecting the environment and is also one of the key factors in ensuring that the setting complies with environmental regulations.
[0003] In the related technologies, taking the monitoring of carbon dioxide gas as an example, the traditional monitoring scheme mainly relies on periodic sampling and analysis, and often cannot provide real-time monitoring functions. In recent years, carbon dioxide sensors based on non-dispersive infrared technology have become a widely used monitoring tool, which can realize real-time monitoring of carbon dioxide in the flue and can operate reliably under harsh environmental conditions. However, non-dispersive infrared technology uses a linear model to convert the output of the sensor so that the sensor output is a carbon dioxide concentration value. This model has a simple structure and is prone to ignoring complex influencing factors, which in turn affects the monitoring effect of the carbon dioxide concentration value.
[0004] Based on the above analysis of the development status of this technical field, the existing technical solutions lack the integration of gas-related features and more complex gas concentration monitoring models. Summary of the invention
[0005] The purpose of the present invention is to provide a training method, device, equipment and storage medium for a gas concentration monitoring model, aiming to solve the above-mentioned problems in the prior art.
[0006] According to a first aspect of an embodiment of the present invention, a method for training a gas concentration monitoring model is provided, comprising:
[0007] Obtain a training set of gas-related features that change over time, downsample the training set layer by layer, and obtain feature sequences at different time scales as the initial set;
[0008] The initial set is input into the first layer of the stacking model, and the information of each feature sequence is enhanced. All the enhanced feature sequences are used as the initial set of the next layer of the stacking model input, and the layer-by-layer iterative enhancement is performed. The feature sequence output from the last layer of the stacking model is used as the final enhanced sequence.
[0009] The potential information of the final enhanced sequence is obtained through the sequence analysis model, and the potential information is fused with the corresponding final enhanced sequence into a key sequence;
[0010] The gas concentration sequence corresponding to each key sequence is obtained by fusing the prediction model, and the results of all gas concentration sequences are fused and activated to obtain the final monitoring result. The prediction error is used as the loss to correct the fusion prediction model parameters to obtain the gas concentration monitoring model.
[0011] According to a second aspect of an embodiment of the present invention, a training device for a gas concentration monitoring model is provided, comprising:
[0012] The downsampling module is used to obtain a training set of gas-related features that change over time, and downsample the training set layer by layer to obtain feature sequences at different time scales as the initial set;
[0013] The multi-scale time decomposition hybrid module is used to input the initial set into the first layer of the stacking model, perform information enhancement on each feature sequence, use all enhanced feature sequences as the initial set of inputs to the next layer of the stacking model, perform layer-by-layer iterative enhancement, and use the feature sequence output from the last layer of the stacking model as the final enhanced sequence;
[0014] The collaborative attention module is used to obtain the latent information of the final enhanced sequence through the sequence analysis model and fuse the latent information with the corresponding final enhanced sequence into a key sequence;
[0015] The fusion prediction module is used to obtain the gas concentration sequence corresponding to each key sequence through the fusion prediction model, fuse the results of all gas concentration sequences and activate them to obtain the final monitoring result, and use the prediction error as the loss to correct the fusion prediction model parameters to obtain the gas concentration monitoring model.
[0016] According to a third aspect of an embodiment of the present invention, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the training method of the gas concentration monitoring model provided in the first aspect of the present disclosure are implemented.
[0017] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a program for implementing information transmission is stored, and when the program is executed by a processor, the steps of the training method of the gas concentration monitoring model provided in the first aspect of the present disclosure are implemented.
[0018] The technical solution provided by the embodiment of the present invention includes the following beneficial effects: incorporating gas-related feature training models to consider the impact of influencing factors on gas concentration, thereby enhancing the environmental adaptability of the model; obtaining feature sequences at different time scales through layer-by-layer downsampling technology, utilizing sequence information in different time zones, training multiple predictors based on key sequences at different time scales, and improving prediction accuracy through data complementarity between scales; using a stacking model to enhance sequence information, and then using a sequence analysis model to mine potential important information, making full use of the feature information training model that incorporates gas-related features.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0021] Figure 1 is a flow chart of a training method for a gas concentration monitoring model according to an embodiment of the present invention;
[0022] Figure 2 is a schematic diagram of a sequence analysis model according to an embodiment of the present invention;
[0023] Figure 3 is a schematic diagram of a gas concentration monitoring model framework according to an embodiment of the present invention;
[0024] Figure 4 is a schematic diagram of a training device for a gas concentration monitoring model according to an embodiment of the present invention;
[0025] Figure 5 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0027] Method Embodiment
[0028] According to an embodiment of the present invention, a method for training a gas concentration monitoring model is provided. Figure 1 It is a flowchart of the method for training a gas concentration monitoring model according to an embodiment of the present invention. As Figure 1 shown, the method for training a gas concentration monitoring model according to an embodiment of the present invention specifically includes:
[0029] In step S110, a training set of gas-related features changing with time is obtained, and the training set is downsampled layer by layer to obtain feature sequences at different time scales as the initial set, which specifically includes:
[0030] In an embodiment of the present invention, the gas-related features, that is, the input variables, include but are not limited to ambient temperature, ambient humidity, atmospheric pressure, and light intensity absorption values in multiple bands, and the output variable is the carbon dioxide concentration. Both the input variables and the output variable are time series;
[0031] Preferably, the training set is a data set that has been pre-processed through data pre-processing such as filling missing values, smoothing and deleting outliers, and normalizing to ensure the reliability and standardization of the data. A test set with the same features can also be obtained to verify the model effect; the form of the time series training set and the monitoring label is is a historical real training set, represents all historical data, P represents the total time of the data set c represents the dimension of the gas-related features, represents the values of c input variables at the p-th moment, 1 ≤ p ≤ P, represents the time series of the output variable;
[0032] For the given training set, N downsampling layers are performed in sequence. According to Formula 1 and Formula 2, the training set X is downsampled by N layers of average pooling to obtain the initial set:
[0033] X 0 = Formula 1;
[0034] X n = AvgPool(X n-1 ), 0 < n ≤ N Formula 2;
[0035] where X represents the training set with the number of gas-related features c in the time dimension p, X n represents the feature sequence of the n-th layer of downsampling, N represents the total number of downsampling layers, AvgPool represents the average pooling layer; X 0 is the feature sequence corresponding to the lowest-level original training set, which contains the finest time variation, X Nis the highest level Nth order feature sequence, which contains the most macroscopic time changes. The original initial set is
[0036] The feature sequence is the change of gas-related features over time. Since there are multiple gas-related features, the representation of the feature sequence is a two-dimensional matrix, and each time node contains multiple features.
[0037] In step S120, the initial set is input into the first layer of the stacking model, and information enhancement is performed on each feature sequence. All enhanced feature sequences are used as the initial set of the next layer of the stacking model input, and layer-by-layer iterative enhancement is performed. The feature sequence output from the last layer of the stacking model is used as the final enhanced sequence, which specifically includes:
[0038] In each layer of the stacked model, the seasonal term sequence and the basic term sequence are extracted from each feature sequence of the initial set by the time series analysis tool. For the lth decomposition hybrid module, the seasonal term sequence and the basic term sequence are extracted from the initial set by the time series decomposition tool based on Formula 5:
[0039]
[0040] in, represents the initial set, represents a set of seasonal term sequences, represents the basic item sequence set, 0<≤L, represents the feature sequence of the nth order of the lth decomposition module, and They are the corresponding seasonal term series and trend term series respectively. TimeSeriesDecomop(·) represents the decomposition function of the time series analysis tool. The decomposition function is used to decompose the feature sequences of different scales. Decompose in sequence, k represents the order of downsampling, 0≤k≤N, and the internal calculation process of the decomposition function is shown in Formula 6 and Formula 7:
[0041]
[0042] Among them, S represents the seasonal item sequence, T represents the basic item sequence, X represents the feature sequence of the initial set, AvgPool represents the average pooling layer, and Padding represents element padding, which is usually filled with 0 to ensure that the input and output have the same height and width, and the subscript l-1 indicates that it is in the lth layer in the stacking model. and c represent the time dimension and the characteristic dimension of the input variable, respectively;
[0043] The seasonal item sequence is multi-scale fused to obtain a mixed seasonal sequence, and the basic item sequence is multi-scale fused to obtain a mixed basic sequence, specifically including:
[0044] The seasonal item sequence is multi-scale fused by formula 3, and the basic item sequence is multi-scale fused by formula 4:
[0045]
[0046] Among them, S, represents the mixed seasonal sequence, S represents the seasonal term sequence, T, represents the mixed basic sequence, T represents the basic term sequence, superscript i and superscript j represent the downsampling order, subscript l represents the l+1th layer in the stacked model, DownMixing represents two linear layers with GELU activation function in the middle, DownMixing reduces the input feature size, UpMixing represents two linear layers with GELU activation function in the middle, UpMixing enlarges the input feature size;
[0047] Although DownMixing and UpMixing are both linear layers, for For example, it needs to be downsampled once more so that its feature size can be comparable to same; and for For example, it is necessary to enlarge its feature size so that its feature size can be same;
[0048] In the process of calculating the mixed seasonal series, i takes values from 0 to N-1. Along the time dimension, its input dimension is Its output dimension is Along the input variable dimension, its input dimension is c and its output dimension is h, that is, starting from the original scale and going downward, the mixed seasonal series of the previous larger time scale is fused with the seasonal item series of the current time scale to promote the flow of information between scales;
[0049] In the process of calculating the mixed basic sequence, j takes values from N to 1. Along the time dimension, its input dimension is Its output dimension is Along the input variable dimension, its input dimension is c and its output dimension is h, that is, starting from the smallest scale, the mixed basic sequence of the previous smaller time scale is fused with the basic item sequence of the current time scale to promote the flow of information between scales;
[0050] The set of mixed seasonal series is The set of mixed basic sequences is
[0051]
[0052] The mixed seasonal sequence and the mixed basic sequence of the corresponding time scale are added to obtain the comprehensive fluctuation sequence, and the comprehensive fluctuation sequence is input into the feedforward neural network for activation. The feedforward neural network is a forward linear layer. The activated sequence is added to the corresponding feature sequence in the initial set of the current layer input for information enhancement. Information enhancement is performed according to Formula 8 and Formula 9:
[0053]
[0054] Among them, FeedForward represents a feedforward neural network, including two linear layers, and a GELU activation function is set between the two linear layers. After enhancement, all feature sequences are used as the initial set of inputs for the next layer of the stacked model, so the subscript on the left side of Formula 8 is l. It is the input of the l+1th decomposition and mixing module;
[0055] The final set of enhanced sequences is That is, the output set of the last layer of the stacked model.
[0056] A stacking model is set to enhance the depth of the network. In an embodiment of the present invention, L layers are stacked, and each layer performs multi-time scale decomposition and mixing, where L is greater than or equal to 1.
[0057] In step S130, the potential information of the final enhanced sequence is obtained through the sequence analysis model, and the potential information is merged with the corresponding final enhanced sequence into a key sequence, which specifically includes:
[0058] Use the Res-TFA temporal analysis model including the temporal attention module TAM and the factor attention module FAM to obtain potential information;
[0059] The temporal attention module is used to assign attention weights to the time dimension of the final enhanced sequence to obtain the temporal potential sequence. The specific process is as follows: for the enhanced sequence of order m 0≤m≤N, TAM for all Attention intensity is calculated at each moment. First, each row vector is max-pooled and average-pooled along the variable factor dimension to obtain two corresponding description vectors. Send the two description vectors into the linear layer respectively, and get V t ' max and V t ' ave After adding, input the sigmoid activation function and get A column vector V of the form ta , column vector Each element in corresponds to the attention strength at different times. Multiply the column vector of attention strength with the value of each row of the final enhanced sequence to obtain the temporal potential sequence
[0060] The factor attention module is used to assign attention weights to the gas-related feature dimensions of the final enhanced sequence to obtain the feature potential sequence. The specific process is as follows: Input FAM, FAM calculates the attention strength for all c input variables, first performs maximum pooling and average pooling on each row vector along the time dimension, and obtains two corresponding description vectors Send the two description vectors into the linear layer respectively, and get V f ' max and V f ' ave After adding, input the sigmoid activation function and get A row vector V of the form fa , the row vector V fa Each element in corresponds to the attention strength of different input variables. Multiply the row vector of attention strength with the value of each column of the final enhanced sequence to obtain the feature potential sequence
[0061]
[0062] Figure 2 is a schematic diagram of a sequence analysis model according to an embodiment of the present invention, such as Figure 2 As shown in the figure, the customized processing logic is demonstrated. For a final enhanced sequence, the temporal attention module TAM focuses on important time points in the sequence, and the factor attention module FAM focuses on important attribute features in the sequence, capturing potential key information points of different dimensions to highlight information that is effective for prediction.
[0063] The time latent series and feature latent sequence Add as the final enhanced sequence The corresponding potential information is then connected to the final enhanced sequence through residual connection Add together to get the m-order key sequence For the set All the final enhanced sequences in are subjected to potential information fusion to obtain a set of key sequences
[0064] In step S140, the gas concentration sequence corresponding to each key sequence is obtained by fusion prediction model, the results of all gas concentration sequences are fused and activated to obtain the final monitoring result, and the prediction error is used as the loss correction fusion prediction model parameter to obtain the gas concentration monitoring model, which specifically includes:
[0065] The key sequence is regressed through a predictor consisting of two linear layers. The predictor corresponding to each key sequence can obtain a size of The monitoring results, that is, the gas concentration sequence, can obtain a corresponding gas concentration prediction value for the input variable characteristic information at each moment; The set includes N time scales, so we can get N time scales of size The monitoring results are added together and input into the two linear layers with GELU activation function in the middle to get the final prediction result.
[0066] Preferably, since the final result is obtained by adding the monitoring results, the prediction result The prediction results of some time nodes may not be accurate enough. If the monitoring results of a key sequence are not accurate enough, it may cause a large error in the overall prediction results. Therefore, when obtaining the prediction results After the sequence is obtained, the adaptive filter is used to correct the sequence The error in .
[0067] Calculate the prediction result according to formula 10 MAE loss with the true result y:
[0068]
[0069] Among them, loss represents MAE loss, Representation sequence The value of y at time q q Represents the value of the sequence y at time q, performs back propagation training and corrects model parameters according to the loss value, and after the correction, a gas concentration monitoring model is formed. The gas concentration monitoring model includes the downsampling processing, stacking model and fusion prediction model in steps S110 to S140. Figure 3 Schematic diagram of the gas concentration monitoring model framework of the embodiment of the present invention, such as Figure 3 As shown, taking the sampling order N=4 at the time scale as an example, the design framework of the gas concentration monitoring model including sampling processing, stacking model and fusion prediction model is demonstrated, and processing at multiple time scales is performed within each sub-module.
[0070] The method further comprises:
[0071] In step S150, the gas concentration monitoring model is used to acquire gas-related characteristics in real time, and a monitoring result of the gas concentration value is obtained according to the gas-related characteristics.
[0072] In summary, for the problems existing in the current situation, the training method of the gas concentration monitoring model of the present invention incorporates gas-related features into the training model to consider the influence of influencing factors on gas concentration, enhancing the environmental adaptability of the model; obtaining feature sequences at different time scales through the layer-by-layer downsampling technique, utilizing sequence information in different time zones, training multiple predictors based on key sequences at different time scales, and complementing data between scales to improve prediction accuracy; using a stacked model to enhance sequence information. In each layer of the stacked model, a seasonal term sequence is extracted to capture periodic fluctuations, and a basic term sequence is extracted to capture long-term overall fluctuations, enabling a full understanding of the fluctuation pattern of data over time. Moreover, multi-scale fusion is performed on the seasonal term sequence and the basic term sequence respectively, combining the adjacent-scale mixed sequence with the fluctuation sequence of the current time scale to effectively promote information flow between scales; using the Res-TFA sequence analysis model to mine potential important information and enhancing the performance of the model when processing time series data and multi-factor data; generally, the training process of the gas concentration monitoring model makes full use of the feature information incorporating gas-related features and trains the model by distinguishing different time scales.
[0073] Device Embodiment
[0074] According to an embodiment of the present invention, there is provided a training device for a gas concentration monitoring model. Figure 4 is a schematic diagram of the training device for the gas concentration monitoring model of the embodiment of the present invention, as Figure 4 shown, the training device for the gas concentration monitoring model according to the embodiment of the present invention specifically includes:
[0075] A downsampling module 40, configured to obtain a training set of gas-related features varying with time, perform layer-by-layer downsampling on the training set to obtain feature sequences at different time scales as an initial set, and specifically configured to:
[0076] According to Formula 1 and Formula 2, perform N-layer downsampling with average pooling on the training set X to obtain the initial set:
[0077] X 0 = Formula 1;
[0078] X n = AvgPool(X n-1 ), 0 < n ≤ N Formula 2;
[0079] wherein, X represents a training set with a time dimension of p and a gas-related feature number of c, X n represents the feature sequence of the nth layer of downsampling, N represents the total number of downsampling layers, and AvgPool represents the average pooling layer.
[0080] The multi-scale time decomposition hybrid module 42 is used to input the initial set into the first layer of the stacking model, perform information enhancement on each feature sequence, use all enhanced feature sequences as the initial set of the next layer of the stacking model input, perform layer-by-layer iterative enhancement, and use the feature sequence output from the last layer of the stacking model as the final enhanced sequence, specifically for:
[0081] In each layer of the stacking model, the seasonal item sequence and the basic item sequence are extracted from each feature sequence of the initial set through the time series analysis tool, and the seasonal item sequence is multi-scale fused to obtain the mixed seasonal sequence, and the basic item sequence is multi-scale fused to obtain the mixed basic sequence;
[0082] The seasonal item sequence is multi-scale fused by formula 3, and the basic item sequence is multi-scale fused by formula 4:
[0083]
[0084] Among them, S, represents the mixed seasonal sequence, S represents the seasonal term sequence, T, represents the mixed basic sequence, T represents the basic term sequence, superscript i and superscript j represent the downsampling order, subscript l represents the l+1th layer in the stacked model, DownMixing represents two linear layers with GELU activation function in the middle, DownMixing reduces the input feature size, UpMixing represents two linear layers with GELU activation function in the middle, UpMixing enlarges the input feature size.
[0085] The mixed seasonal sequence and the mixed basic sequence are added to obtain a comprehensive fluctuation sequence, which is then input into the feedforward neural network for activation. The activated sequence is added to the corresponding feature sequence in the initial set of the current layer input for information enhancement.
[0086] The collaborative attention module 44 is used to obtain the potential information of the final enhanced sequence through the sequence analysis model, and fuse the potential information with the corresponding final enhanced sequence into a key sequence, specifically for:
[0087] The Res-TFA temporal analysis model including the temporal attention module and the factor attention module is used to obtain the latent information, the temporal attention module is used to assign the attention weight to the time dimension of the final enhanced sequence to obtain the temporal latent sequence, and the factor attention module is used to assign the attention weight to the gas-related feature dimension of the final enhanced sequence to obtain the feature latent sequence;
[0088] The temporal latent sequence and the feature latent sequence are added together as the latent information corresponding to the final enhanced sequence.
[0089] The fusion prediction module 46 is used to obtain the gas concentration sequence corresponding to each key sequence through the fusion prediction model, fuse the results of all gas concentration sequences and activate them to obtain the final monitoring result, use the prediction error as the loss to correct the fusion prediction model parameter, and obtain the gas concentration monitoring model, which is specifically used for:
[0090] The device further comprises:
[0091] The application module 48 is used to obtain gas-related characteristics in real time using the gas concentration monitoring model, and obtain monitoring results of the gas concentration value according to the gas-related characteristics.
[0092] In summary, in response to the existing problems, the training device of the gas concentration monitoring model of this invention incorporates a gas-related feature training model to consider the impact of influencing factors on gas concentration, thereby enhancing the environmental adaptability of the model; the feature sequences at different time scales are obtained through layer-by-layer downsampling technology, and the sequence information in different time zones is utilized. Multiple predictors are trained based on key sequences at different time scales, and the data complementarity between scales improves the prediction accuracy; the stacking model is used to enhance the sequence information. In each layer of the stacking model, the seasonal item sequence is extracted to capture periodic fluctuations, and the basic item sequence is extracted to capture long-term overall fluctuations, which can fully understand the fluctuation pattern of the data over time, and the seasonal item sequence and the basic item sequence are multi-scale fused respectively, and the adjacent scale mixed sequence is combined with the fluctuation sequence of the current time scale, which effectively promotes the information flow between scales; the Res-TFA sequence analysis model is used to mine potential important information and enhance the performance of the model in processing time series data and multi-factor data; in general, the training process of the gas concentration monitoring model makes full use of the feature information integrated with gas-related features, and distinguishes training models at different time scales.
[0093] Electronic device embodiment
[0094] Figure 5 Schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device 500 may include at least one processor 510 and a memory 520. The processor 510 may execute instructions stored in the memory 520. The processor 510 is connected to the memory 520 through a data bus. In addition to the memory 520, the processor 510 may also be connected to an input device 530, an output device 540, and a communication device 550 through a data bus.
[0095] The processor 510 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.
[0096] The memory 520 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0097] In the embodiment of the present disclosure, executable instructions are stored in the memory 520, and the processor 510 can read the executable instructions from the memory 520 and execute the instructions to implement all or part of the steps of the training method of the gas concentration monitoring model in any of the above exemplary embodiments.
[0098] Computer Readable Storage Medium Embodiments
[0099] In addition to the above-mentioned methods and devices, an exemplary embodiment of the present disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product, wherein the computer product includes computer program instructions that can be executed by a processor to implement all or part of the steps described in the training method of the gas concentration monitoring model in any of the above-mentioned exemplary embodiments.
[0100] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages and scripting languages (e.g., Python). The program code may be executed entirely on the user computing device, partially on the user computing device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0101] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of readable storage media include: a static random access memory (SRAM) with one or more wires electrically connected, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk, or any suitable combination of the above.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A training method for a gas concentration monitoring model, characterized in that include: A training set of gas-related features changing over time is obtained, and the training set is downsampled layer by layer to obtain feature sequences at different time scales as an initial set; The initial set is input into the first layer of the stacking model, information enhancement is performed on each feature sequence, all the enhanced feature sequences are used as the initial set of the next layer of the stacking model input, layer by layer iterative enhancement is performed, and the feature sequence output from the last layer of the stacking model is used as the final enhanced sequence; Acquire potential information of the final enhanced sequence through a sequence analysis model, and fuse the potential information with the corresponding final enhanced sequence into a key sequence; The gas concentration sequence corresponding to each key sequence is obtained by fusing the prediction model, and the results of all gas concentration sequences are fused and activated to obtain the final monitoring result. The prediction error is used as the loss to correct the fusion prediction model parameters to obtain the gas concentration monitoring model.
2. The method according to claim 1, characterized in that The method further comprises: The gas concentration monitoring model is used to acquire gas-related characteristics in real time, and a monitoring result of a gas concentration value is obtained based on the gas-related characteristics.
3. The method according to claim 1, characterized in that The training set is downsampled layer by layer to obtain feature sequences at different time scales, which specifically include: According to Formula 1 and Formula 2, the training set X is downsampled by N layers of average pooling to obtain the initial set: X 0 =Formula 1; X n = AvgPool(X n-1 ), 0 < n ≤ N Formula 2; Among them, X represents the training set with a time dimension of p and a number of gas-related features of c, X n It represents the feature sequence of the nth downsampling layer, N represents the total number of downsampling layers, and AvgPool represents the average pooling layer.
4. The method according to claim 1, characterized in that: The information enhancement of each feature sequence is performed, and all the enhanced feature sequences are used as the initial set of the next layer input of the stacking model, and the layer-by-layer iterative enhancement is performed specifically including: In each layer of the stacking model, a seasonal item sequence and a basic item sequence are extracted from each feature sequence of the initial set by using a time series analysis tool, and the seasonal item sequence is subjected to multi-scale fusion to obtain a mixed seasonal sequence, and the basic item sequence is subjected to multi-scale fusion to obtain a mixed basic sequence; The mixed seasonal sequence and the mixed basic sequence are added to obtain a comprehensive fluctuation sequence, the comprehensive fluctuation sequence is input into the feedforward neural network for activation, and the activated sequence is added to the corresponding feature sequence in the initial set of the current layer input for information enhancement.
5. The method according to claim 4, characterized in that The performing multi-scale fusion on the seasonal item sequence to obtain a mixed seasonal sequence and the performing multi-scale fusion on the basic item sequence to obtain a mixed basic sequence specifically include: The seasonal item sequence is multi-scale fused by formula 3, and the basic item sequence is multi-scale fused by formula 4: Among them, S, represents the mixed seasonal sequence, S represents the seasonal term sequence, T, represents the mixed basic sequence, T represents the basic term sequence, superscript i and superscript j represent the downsampling order, subscript l represents the l+1th layer in the stacked model, DownMixing represents two linear layers with GELU activation function in the middle, DownMixing reduces the input feature size, UpMixing represents two linear layers with GELU activation function in the middle, UpMixing enlarges the input feature size.
6. The method according to claim 1, characterized in that The method of obtaining the potential information of the final enhanced sequence through the sequence analysis model specifically includes: The Res-TFA temporal analysis model including the temporal attention module and the factor attention module is used to obtain the latent information, the temporal attention module is used to assign the attention weight to the time dimension of the final enhanced sequence to obtain the temporal latent sequence, and the factor attention module is used to assign the attention weight to the gas-related feature dimension of the final enhanced sequence to obtain the feature latent sequence; The temporal latent sequence and the feature latent sequence are added together as the latent information corresponding to the final enhanced sequence.
7. A training device for a gas concentration monitoring model, characterized in that include: A downsampling module is used to obtain a training set of gas-related features that change over time, and downsample the training set layer by layer to obtain feature sequences at different time scales as an initial set; A multi-scale time decomposition hybrid module is used to input the initial set into the first layer of the stacking model, perform information enhancement on each feature sequence, use all enhanced feature sequences as the initial set of inputs to the next layer of the stacking model, perform layer-by-layer iterative enhancement, and use the feature sequence output from the last layer of the stacking model as the final enhanced sequence; A collaborative attention module, used for obtaining latent information of the final enhanced sequence through a sequence analysis model, and fusing the latent information with the corresponding final enhanced sequence into a key sequence; The fusion prediction module is used to obtain the gas concentration sequence corresponding to each key sequence through the fusion prediction model, fuse the results of all gas concentration sequences and activate them to obtain the final monitoring result, and use the prediction error as the loss to correct the fusion prediction model parameters to obtain the gas concentration monitoring model.
8. The device according to claim 7, characterized in that The device further comprises: The application module is used to use the gas concentration monitoring model to obtain gas-related characteristics in real time, and obtain monitoring results of gas concentration values based on the gas-related characteristics.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the training method of the gas concentration monitoring model as described in any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an implementation program for information transmission, and when the program is executed by a processor, the steps of the training method for the gas concentration monitoring model according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for predicting concentration of dissolved gas in transformer oil and medium
CN114418166A
PM2.5 concentration prediction method of LSTM network based on attention mechanism
CN115330082A
PM2.5 full coverage prediction method based on deep neural network
CN116432850A
Toxic gas concentration prediction method based on time attention
CN118298964A
Gas sensing device for sensing one or more gases in a mixture of gases
EP4246137A1