Gas concentration prediction method and device based on efficiency network enhanced weight selection

Through the enhanced weight selection method based on performance network, the problem of large weight selection error in gas concentration prediction is solved, high accuracy and high efficiency of gas concentration prediction are achieved, and it is suitable for gas concentration prediction with different prediction intervals.

CN118468228BActive Publication Date: 2024-09-10TSINGHUA UNIVERSITY
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410917681.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-09-10
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

Existing gas concentration prediction methods have large errors when selecting basic model weights, resulting in inaccurate gas concentration prediction results and difficulty in maintaining high accuracy at different prediction intervals.

Method used

The enhanced weight selection method based on performance network is used to convert the collected gas concentration sequence and prediction results into two-dimensional images. The network structure parameters are balanced and scaled through composite coefficients. Reinforcement learning is used to train the performance network and dynamically adjust the weight of each prediction model. A weighted summation is performed to obtain the final gas concentration prediction.

Benefits of technology

It improves the accuracy and efficiency of gas concentration prediction, reduces the amount of model parameters and calculations, and achieves high-precision prediction at different prediction intervals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118468228B
    Figure CN118468228B
Patent Text Reader

Abstract

The present application provides a gas concentration prediction method and device based on performance network enhanced weight selection, the method comprising: inputting the collected gas concentration sequence into M prediction models for prediction processing to obtain M gas concentration prediction results; converting the collected gas concentration sequence into a two-dimensional image of the gas concentration sequence, and converting the M gas concentration prediction results into M two-dimensional images of gas concentration prediction results, and obtaining a three-dimensional vector according to the two-dimensional image of the gas concentration sequence and the two-dimensional images of the M gas concentration prediction results; inputting the three-dimensional vector into the performance network for processing to obtain the weights of the M prediction models; and performing weighted summation of the M gas concentration prediction results according to the weights of the M prediction models to obtain the final gas concentration prediction result. In this way, accurate weights of the M prediction models are obtained through this method, and accurate gas concentration prediction results are obtained according to the weights of the M prediction models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of gas concentration prediction, and in particular to a gas concentration prediction method and device based on efficiency network enhanced weight selection. Background Art

[0002] The production process of process industries (such as chemical industry, petroleum refining, etc.) is usually located in closed places such as factories and workshops, and a large amount of carbon dioxide, sulfur dioxide and nitrogen oxides will be produced, which will affect human health and the environment. If the exhaust equipment fails and is not discovered in time, it is easy to cause the gas concentration to increase and lead to production safety accidents. Therefore, it is very important to accurately predict typical gases in process industries. The gas concentration data measured by non-dispersive infrared sensors is a typical time series, which is characterized by the chronological distribution and correlation, so the concentration at a future moment can be predicted based on the concentration at a previous moment.

[0003] The prediction accuracy of different gas concentration prediction methods at different prediction intervals shows obvious differences. For example, the recurrent neural network model and Gaussian process model in the neural network series algorithm are suitable for gas concentration prediction at short intervals; the attention model is suitable for gas concentration prediction at long intervals. Moreover, the optimal prediction intervals of different models show large changes with the changes in the time series, and it is difficult to obtain a definite boundary. In addition, the non-stationarity of the gas concentration series makes many assumptions of machine learning difficult to establish. Therefore, the prediction accuracy of a single prediction model is often limited. Ensemble learning has the characteristics of effectively integrating the prediction results of multiple basic models at different intervals, thus showing obvious advantages in improving the prediction accuracy of gas concentration. The core of fully integrating the advantages of multiple basic models is to assign different weight parameters to each basic model at different prediction intervals, and to achieve gas concentration prediction through weighted summation.

[0004] However, the existing methods still have the problem of large weight errors in the selection of each basic model, and the weight parameters of each basic model cannot be accurately obtained, resulting in inaccurate gas concentration prediction results. Therefore, how to accurately determine the weight parameters of each basic model to achieve accurate gas concentration prediction is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the above problems, the embodiments of the present application provide a gas concentration prediction method and device based on efficiency network enhanced weight selection to overcome the above problems or at least partially solve the above problems.

[0006] In a first aspect of an embodiment of the present application, a gas concentration prediction method based on performance network enhanced weight selection is disclosed, the method comprising:

[0007] The collected gas concentration sequence is input into M prediction models for prediction processing to obtain M gas concentration prediction results, where M is a positive integer greater than 1;

[0008] Converting the collected gas concentration sequence into a gas concentration sequence two-dimensional image, and converting the M gas concentration prediction results into M gas concentration prediction result two-dimensional images, and obtaining a three-dimensional vector according to the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images;

[0009] Input the three-dimensional vector into the performance network for processing to obtain weights of M prediction models, wherein the performance network evenly scales network structure parameters from multiple dimensions based on a composite coefficient and is trained by a reinforcement learning method;

[0010] The M gas concentration prediction results are weighted and summed according to the weights of the M prediction models to obtain a final gas concentration prediction result.

[0011] Optionally, the training data of the performance network is obtained by the following steps:

[0012] Obtain sample gas concentration prediction results of M prediction models, as well as the three-dimensional vector at the current moment;

[0013] Inputting the three-dimensional vector at the current moment into the performance network for processing to obtain training weights of M prediction models;

[0014] Performing weighted summation on the sample gas concentration prediction results according to the training weights to obtain a final sample gas concentration prediction result;

[0015] Calculating a reward value according to the difference between the final sample gas concentration prediction result and the actual gas concentration value;

[0016] The three-dimensional vector at the current moment, the three-dimensional vector at the next moment, the training weight, and the reward value are taken as a piece of training data.

[0017] Optionally, the performance network is trained according to the following steps:

[0018] After each piece of training data is generated, the training data is placed in a temporary memory for storage, and the temporary memory is used to store the training data of the performance network;

[0019] Randomly acquiring a plurality of training data from the temporary memory as training samples, and training the performance network according to the training samples;

[0020] According to the above steps, multiple rounds of training are carried out, and when the training end conditions are met, a trained performance network is obtained.

[0021] Optionally, calculating the reward value according to the difference between the final sample gas concentration prediction result and the actual gas concentration value includes:

[0022] Calculate the prediction error of each prediction model according to the sample gas concentration prediction result of each prediction model and the true gas concentration value, and determine the local error according to the prediction error ranking of each prediction model and the number M of prediction models;

[0023] Calculate the symmetric mean absolute percentage error according to the final sample gas concentration prediction result and the true gas concentration value, and determine the overall error according to the position of the symmetric mean absolute percentage error in the quantiles of the prediction errors of the M prediction models and the number M of the prediction models;

[0024] The overall error and the local error are weightedly summed to obtain a reward value.

[0025] Optionally, converting the acquired gas concentration sequence into a gas concentration sequence two-dimensional image includes:

[0026] Normalizing the collected gas concentration sequence to obtain a normalized gas concentration sequence;

[0027] Performing polar coordinate conversion on the normalized gas concentration sequence to obtain a gas concentration sequence represented by polar coordinates, wherein the value at each moment in the gas concentration sequence represented by polar coordinates includes a cosine angle;

[0028] Adding the value of each moment in the gas concentration sequence represented by the polar coordinates to the values ​​of the remaining moments including the value itself, and calculating the cosine value according to the addition result;

[0029] A Gram angular field transformation matrix is ​​constructed according to all cosine values, and each element of the Gram angular field transformation matrix is ​​used as a pixel value of a two-dimensional image to obtain a gas concentration sequence two-dimensional image.

[0030] Optionally, the structural parameters include: number of network layers, network depth and input resolution;

[0031] The composite coefficient is determined by network optimization under the condition of satisfying the structural parameter constraint, and the composite coefficient includes: a first composite coefficient, a second composite coefficient, and a third composite coefficient;

[0032] The structural parameter constraints include:

[0033] The network depth factor is equal to the power exponent of the first compound coefficient;

[0034] The network width factor is equal to the power exponent of the second composite coefficient;

[0035] The input resolution factor is equal to the power of the third composite coefficient;

[0036] The first compound coefficient, the second compound coefficient, and the third compound coefficient are all greater than or equal to 1, and the power exponential product of the first compound coefficient, the second compound coefficient, and the third compound coefficient is a fixed value.

[0037] Optionally, the performance network includes four network modules with the same structure, wherein:

[0038] The input layer of the network module includes: the convolution kernel is The convolutional layer;

[0039] The middle layer of the network module includes: 7 convolutional networks with different sizes of convolution kernels and numbers of layers;

[0040] The output layer of the network module includes: the convolution kernel is Convolutional layers and fully connected layers.

[0041] Optionally, the performance network includes: an action network module, a value network module, a target action network module and a target value network module; randomly obtaining a plurality of training data from the temporary memory as training samples, and training the performance network according to the training samples, including:

[0042] Input the three-dimensional vector at the current moment and the training weight into the value network module to obtain the current action value, and input the three-dimensional vector at the next moment into the target action network module to obtain new training weights of M prediction models;

[0043] The target value network module calculates the target action value according to the new training weight, the three-dimensional vector at the next moment and the reward value;

[0044] According to the error between the action value and the target action value, the network parameters of the value network module are updated to obtain an updated value network module;

[0045] The updated value network module calculates the action value function gradient and the action parameter gradient according to the three-dimensional vector at the current moment and the new training weight;

[0046] According to the action value function gradient and the action parameter gradient, the network parameters of the action network module are updated to obtain an updated action network module;

[0047] After the target time training is performed according to the above steps, the network parameters of the target action network module are updated using the updated value network module, and the network parameters of the target value network module are updated using the updated action network module.

[0048] In a second aspect of the embodiment of the present application, a gas concentration prediction device based on performance network enhanced weight selection is disclosed, the device comprising:

[0049] A processing module, used for inputting the collected gas concentration sequence into M prediction models for prediction processing to obtain M gas concentration prediction results, where M is a positive integer greater than 1;

[0050] a conversion module, used to convert the collected gas concentration sequence into a gas concentration sequence two-dimensional image, and to convert the M gas concentration prediction results into M gas concentration prediction result two-dimensional images, and to obtain a three-dimensional vector according to the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images;

[0051] A weight module, used for inputting the three-dimensional vector into the performance network for processing to obtain weights of M prediction models, wherein the performance network is trained by a reinforcement learning method by evenly scaling network structure parameters from multiple dimensions based on a composite coefficient;

[0052] The result module is used to perform weighted summation on the M gas concentration prediction results according to the weights of the M prediction models to obtain a final gas concentration prediction result.

[0053] A third aspect of an embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the gas concentration prediction method based on efficiency network enhanced weight selection described in the first aspect of the embodiment of the present application are implemented.

[0054] The embodiments of the present application include the following advantages:

[0055] In an embodiment of the present application, the collected gas concentration sequence is input into M prediction models for prediction processing to obtain M gas concentration prediction results; and the collected gas concentration sequence is converted into a gas concentration sequence two-dimensional image, and the M gas concentration prediction results are converted into M gas concentration prediction result two-dimensional images, and a three-dimensional vector is obtained based on the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images; then the three-dimensional vector is input into the performance network for processing to obtain the weights of the M prediction models; finally, the M gas concentration prediction results are weighted and summed according to the weights of the M prediction models to obtain the final gas concentration prediction result.

[0056] Since the performance network evenly scales the network structure parameters (such as network depth, network width, and input resolution) from multiple dimensions based on the composite coefficient and is trained by the reinforcement learning method, the weights of the M prediction models obtained by the performance network can reduce the number of model parameters and the amount of calculation while achieving accuracy indicators similar to those of the existing regression network, so as to obtain accurate gas concentration prediction results based on the weights of the M prediction models. Since the performance network is based on convolutional networks for data processing, and convolutional networks are suitable for processing two-dimensional images, the collected gas concentration sequence and the M gas concentration prediction results are converted into two-dimensional images for processing, which further improves the weight selection accuracy of the performance network. In this way, accurate gas concentration prediction is achieved.

[0057] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0059] Figure 1 It is a flow chart of the steps of a gas concentration prediction method based on efficiency network enhanced weight selection provided by an embodiment of the present application;

[0060] Figure 2 is a schematic diagram of a two-dimensional image conversion method provided in an embodiment of the present application;

[0061] Figure 3 is a schematic diagram of two-dimensional image stitching provided in an embodiment of the present application;

[0062] Figure 4 It is a structural diagram of a network module provided in an embodiment of the present application;

[0063] Figure 5 It is an overall architecture diagram of a gas concentration prediction method based on performance network enhanced weight selection provided in an embodiment of the present application;

[0064] Figure 6 It is a structural schematic diagram of a gas concentration prediction device based on efficiency network enhanced weight selection provided in an embodiment of the present application;

[0065] Figure 7It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0067] In the related art, the weight parameters of the basic model are determined by the following three methods: 1) Assigning the same weight to each basic model. The same weight assignment makes the management and calculation of each basic model simple, but the prediction strength of different basic models varies during the prediction process. This method fails to reflect the differences in the prediction performance of each basic model, thereby limiting its prediction accuracy.

[0068] 2) The weight calculation problem of each basic model is studied as a classification problem, and the weight calculation of each basic model is realized by training the random forest based on the input data features. However, the classification problem can only reflect the relative error of each model, and cannot reflect the change of the absolute error of each model during the prediction process, which makes the granularity of the output weight larger and causes errors.

[0069] 3) The problem of calculating the weights of each basic model is transformed into the problem of finding the optimal strategy in reinforcement learning. The problem of dynamic weight allocation of each basic model is solved by constructing an agent learner, where the model with the higher performance ranking of the agent learner is given a greater weight. This method requires learning and storing all possible action-state tables for each rolling window, which requires learning thousands of separate action-state tables for large-scale problems, and cannot fully utilize the information in time series data. Existing research uses the Deep Deterministic Policy Gradient (DDPG) architecture as the basic architecture to build a concentration prediction model. The action network module, value network module, target action network module, and target value network module in the core components of the DDPG architecture are all constructed using traditional convolutional neural networks. However, traditional convolutional neural networks only change the input resolution, network depth, and network width parameters, and do not consider the impact of the coupled changes of the three factors on the model prediction accuracy. The above problems limit the advantages of the convolutional network itself and reduce the prediction accuracy of the model.

[0070] Therefore, the existing methods still have the problem of large weight errors in realizing the selection of each basic model, and the weight parameters of each basic model cannot be accurately obtained, resulting in inaccurate gas concentration prediction results. To this end, the embodiment of the present application provides a gas concentration prediction method based on the performance network to enhance the weight selection. The method determines the weight of each prediction model based on the performance network. Since the performance network is based on the composite coefficient, the network structure parameters (such as network depth, network width and input resolution) are evenly scaled from multiple dimensions, and are obtained through reinforcement learning training, the performance network can reduce the amount of model parameters and calculations while achieving accuracy indicators similar to those of the existing regression network, and obtain accurate prediction model weights. In addition, the collected gas concentration sequence and each gas concentration prediction result are converted into a two-dimensional image for processing, so that the performance network can better process the input data, further improving the weight selection accuracy of the performance network. In this way, accurate gas concentration prediction is achieved.

[0071] The following is a detailed description of the gas concentration prediction method based on efficiency network enhanced weight selection provided in an embodiment of the present application in conjunction with the accompanying drawings.

[0072] Reference Figure 1 As shown, Figure 1 1 is a flow chart of the steps of a gas concentration prediction method based on performance network enhanced weight selection provided by an embodiment of the present application. Figure 1 As shown, the method may include steps S110 to S140:

[0073] Step S110: input the collected gas concentration sequence into M prediction models for prediction processing to obtain M gas concentration prediction results, where M is a positive integer greater than 1.

[0074] In the embodiment of the present application, the collected gas concentration sequence is a one-dimensional gas concentration sequence, including gas concentration values ​​collected at different time intervals, and the gas concentration sequence can be collected by a non-dispersive infrared sensor. The gas concentration values ​​at different time intervals in the gas concentration sequence show sequence and correlation in time distribution, so the gas concentration at multiple moments in the future can be predicted based on the gas concentration sequence.

[0075] The prediction model is a pre-trained model that can predict gas concentration. In the embodiment of the present application, M prediction models are used to perform prediction processing based on the collected gas concentration sequence, thereby obtaining the concentration prediction results of the M prediction models. In some embodiments, the M prediction models include: a long short-term memory neural network, a gated recurrent network, and a Gaussian mixture model.

[0076] Each gas concentration prediction result is also a one-dimensional gas concentration sequence, and each gas concentration prediction result includes gas concentration prediction values ​​of multiple prediction intervals. For example, the gas concentration prediction result may include a gas concentration prediction value in the next hour, a gas concentration prediction value in the next 2 hours, and a gas concentration prediction value in the next 3 hours.

[0077] In some embodiments, in order to achieve accurate gas concentration prediction, before inputting the collected gas concentration sequence into M prediction models for prediction processing, it also includes: normalizing the collected gas concentration sequence, and inputting the gas concentration sequence obtained after normalization into M prediction models for prediction processing.

[0078] Step S120: converting the collected gas concentration sequence into a gas concentration sequence two-dimensional image, and converting the M gas concentration prediction results into M gas concentration prediction result two-dimensional images, and obtaining a three-dimensional vector based on the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images.

[0079] In the embodiment of the present application, considering that the convolution network is more suitable for processing two-dimensional images, the one-dimensional gas concentration sequence is converted into a two-dimensional image for processing. The conversion of one-dimensional data to a two-dimensional image is realized by the Gram angular field. The Gram angular field obtains a two-dimensional image by calculating the cosine similarity of the values ​​at each moment, so that each point in the image represents the correlation between the moments, thereby giving each pixel point a physical meaning in terms of value. Therefore, the embodiment of the present application selects the Gram angular field as a method for converting one-dimensional data into a two-dimensional image.

[0080] Specifically, the collected gas concentration sequence is converted into a two-dimensional image of the gas concentration sequence (the two-dimensional image size is m×m) through the Gram angle field, and the M gas concentration prediction results are converted into M two-dimensional images of the gas concentration prediction results (i.e., M two-dimensional images with a size of m×m), so that the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images are spliced ​​along the first dimension to obtain a three-dimensional vector with a size of (M+1)×m×m.

[0081] Step S130: Input the three-dimensional vector into the performance network for processing to obtain weights of M prediction models. The performance network evenly scales network structure parameters from multiple dimensions based on the composite coefficient and is trained by a reinforcement learning method.

[0082] In the embodiment of the present application, the performance network outputs a set of prediction model weights of dimension M (i.e., the weights of M prediction models) according to the input three-dimensional vector. In addition, the performance network can dynamically output the weights of different M prediction models in the prediction interval. Since the prediction accuracy of the prediction model at different prediction intervals shows obvious differences, the optimal prediction intervals of different prediction models show large changes with the change of time series. Therefore, the weights of each prediction model at different prediction intervals are dynamically output through this method to ensure the accuracy of the gas concentration prediction results.

[0083] Step S140: performing weighted summation on the M gas concentration prediction results according to the weights of the M prediction models to obtain a final gas concentration prediction result.

[0084] In the embodiment of the present application, the gas concentration prediction result is a sequence of gas concentration prediction values ​​at multiple prediction intervals. Therefore, the weights of the M prediction models dynamically output by the performance network are weighted and summed with the gas concentration prediction values ​​of each prediction model at the corresponding time to obtain the final gas concentration prediction result.

[0085] In the above implementation process, since the performance network evenly scales the network structure parameters (such as network depth, network width and input resolution) from multiple dimensions based on the composite coefficient and is trained by the reinforcement learning method, the weights of the M prediction models obtained by the performance network can reduce the number of model parameters and the amount of calculation while achieving accuracy indicators similar to those of the existing regression network, so as to obtain accurate gas concentration prediction results based on the weights of the M prediction models. Since the performance network is based on convolutional networks for data processing, and convolutional networks are suitable for processing two-dimensional images, the collected gas concentration sequence and the M gas concentration prediction results are converted into two-dimensional images for processing, which further improves the weight selection accuracy of the performance network. In this way, accurate gas concentration prediction is achieved.

[0086] The present application is described in detail below in conjunction with the above-mentioned implementation steps.

[0087] In the embodiment of the present application, the Gram angle field obtains a two-dimensional image by calculating the cosine similarity of the values ​​at each moment, so that each point in the image represents the correlation between the moments, thereby giving each pixel point a numerical physical meaning. Therefore, the embodiment of the present application selects the Gram angle field as a method for converting one-dimensional data into a two-dimensional image. Specifically, the collected gas concentration sequence is converted into a gas concentration sequence two-dimensional image, including steps A1 to A4:

[0088] Step A1: normalizing the collected gas concentration sequence to obtain a normalized gas concentration sequence.

[0089] For example, the collected gas concentration series is expressed as ,in Indicates the data dimension, The value is generally 1, and the time series is normalized to [0, 1]. Specifically, the normalization calculation formula is expressed as:

[0090] ,

[0091] in, represents the ith value in the normalized gas concentration sequence, represents the maximum value in the gas concentration series, Indicates the minimum value in the gas concentration sequence. Each gas concentration value in the collected gas concentration sequence is processed according to the above normalization processing calculation formula, and a normalized gas concentration sequence is obtained based on all the processed results.

[0092] Step A2: performing polar coordinate conversion on the normalized gas concentration sequence to obtain a gas concentration sequence represented by polar coordinates, wherein the value at each moment in the gas concentration sequence represented by polar coordinates includes a cosine angle.

[0093] For example, the values ​​in the gas concentration series expressed in polar coordinates are expressed as:

[0094] ,

[0095] in, represents the cosine angle obtained by the arccosine calculation, is the sequence number corresponding to time i, N is the sequence length, r represents the wavelength mapping radius, represents the normalized gas concentration series.

[0096] Step A3: Add the value at each moment in the gas concentration sequence represented by the polar coordinates to the values ​​at the remaining moments including itself, and calculate the cosine value according to the addition result.

[0097] In the embodiment of the present application, the cosine value calculated by the addition result is used as the value generated after the Ram angle field conversion. Specifically, the cosine value is expressed as:

[0098] ,

[0099] Among them, GAF represents the value generated after Gram angular field conversion (i.e. cosine value), For vector The transposed vector of and They represent the cosine angles corresponding to time i and time j respectively.

[0100] Step A4: construct a Gram angular field transformation matrix according to all cosine values, and use each element of the Gram angular field transformation matrix as a pixel value of a two-dimensional image to obtain a gas concentration sequence two-dimensional image.

[0101] In the embodiment of the present application, the size of the generated two-dimensional image is , the time series length required to generate the two-dimensional image is m, and the Gram angular field transformation matrix G is expressed as:

[0102] ,

[0103] in, represents the cosine angle corresponding to time 1, represents the cosine angle corresponding to time 2, Represents the cosine angle corresponding to time m.

[0104] For example, Figure 2 is a schematic diagram of a two-dimensional image conversion method provided in an embodiment of the present application. Specifically, the collected gas concentration sequence is normalized to obtain a normalized gas concentration sequence ( Figure 2 (a) in the figure is the gas concentration sequence); then the normalized gas concentration sequence is transformed into polar coordinates to obtain the gas concentration sequence represented by polar coordinates. The gas concentration sequence represented by polar coordinates after the transformation is as follows: Figure 2 As shown in (b); finally, the value of each moment in the gas concentration sequence represented by polar coordinates is added to the values ​​of the remaining moments including itself, and the cosine value is calculated based on the addition result. The Gram angular field transformation matrix is ​​constructed based on all the cosine values. Each element of the Gram angular field transformation matrix is ​​used as the pixel value of the two-dimensional image to obtain the two-dimensional image of the gas concentration sequence. Figure 2 (c) in the figure is the final generated two-dimensional image.

[0105] Similarly, according to the above method, the M gas concentration prediction results are converted into M gas concentration prediction result two-dimensional images, and finally the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images are spliced ​​to obtain a three-dimensional vector. Figure 3 As shown, Figure 3 is a schematic diagram of a two-dimensional image stitching provided in an embodiment of the present application. Specifically, the collected gas concentration sequence After M prediction models perform prediction processing respectively, M gas concentration prediction results ; Then, the collected gas concentration sequence and the M gas concentration prediction results are converted into a two-dimensional image (i.e., Gram angle field GAF ​​conversion is performed) to obtain a two-dimensional image of the gas concentration sequence And M gas concentration prediction results 2D image ; Finally, the above two-dimensional images are spliced ​​in the first dimension to obtain a three-dimensional vector of (M+1)×m×m dimensions. It is expressed as:

[0106] ,

[0107] in, Represents a splicing operation; Represents a two-dimensional image of a gas concentration sequence; Represents a two-dimensional image of M gas concentration prediction results.

[0108] In the embodiment of the present application, the core of the efficiency network being able to dynamically output the weights of M prediction models is that the structural parameters of the efficiency network can be dynamically adjusted. Specifically, the structural parameters include: the number of network layers, network depth, and input resolution; the compound coefficient is determined by network optimization under the condition of satisfying the structural parameter constraints, and the compound coefficient includes: the first compound coefficient, the second compound coefficient, and the third compound coefficient;

[0109] The structural parameter constraints include:

[0110] The network depth factor is equal to the power exponent of the first compound coefficient;

[0111] The network width factor is equal to the power exponent of the second composite coefficient;

[0112] The input resolution factor is equal to the power of the third composite coefficient;

[0113] The first compound coefficient, the second compound coefficient, and the third compound coefficient are all greater than or equal to 1, and the power exponential product of the first compound coefficient, the second compound coefficient, and the third compound coefficient is a fixed value.

[0114] For example, the structural parameter constraints are expressed as:

[0115] ,

[0116] in, represents the network depth, Indicates the network width, Indicates the input resolution, represents the network depth factor, represents the network width factor, represents the input resolution factor, represents the power exponent, represents the first composite coefficient, represents the second composite coefficient, represents the third composite coefficient. The first composite coefficient, the second composite coefficient and the third composite coefficient can be determined by grid optimization.

[0117] In the embodiment of the present application, the comprehensive optimization of the three structural parameters of the number of network layers, the depth of the network and the input resolution is crucial to improving the accuracy of the performance network, while the effect of simply increasing the number of network layers or the network depth on improving the model accuracy is limited. If the power product of the number of network layers, the depth of the network and the input resolution meets the above structural parameter constraints, the prediction performance of the constructed performance network will break through the bottleneck of the traditional structure and be significantly improved. For example, when the input image size is When , the network width factor is 1.1 and the network depth factor is 1.2.

[0118] In one embodiment, the performance network includes four network modules with the same structure, wherein: the input layer of the network module includes: the convolution kernel is The middle layer of the network module includes: 7 convolutional networks with different sizes of convolutional kernels and numbers of layers; the output layer of the network module includes: convolutional kernels of Convolutional layers and fully connected layers.

[0119] For example, Figure 4 is a schematic diagram of the structure of a network module provided in an embodiment of the present application, wherein the input layer of the network module includes: a convolution kernel with a dimension of 32 and a The convolution layer; the middle layer includes: 1 layer with a dimension of 16 and a convolution kernel of The convolution layer of 2 layers has a dimension of 24 and the convolution kernel is The convolution layer of the 2nd layer has a dimension of 40 and the convolution kernel is The convolution layer of 3 layers is 80 and the convolution kernel is The convolution layer of 3 layers has a dimension of 112 and the convolution kernel is The convolution layer of 3 layers has a dimension of 192 and the convolution kernel is The convolution layer of 1 layer has a dimension of 320 and the convolution kernel is The convolution layer of the output layer includes: the dimension is 1280 and the convolution kernel is Convolutional layers and fully connected layers.

[0120] In an optional embodiment, the performance network is trained by reinforcement learning, and the training data of the performance network is obtained by the following steps B1 to B5:

[0121] Step B1: Obtain sample gas concentration prediction results of M prediction models, as well as the three-dimensional vector at the current moment.

[0122] In the embodiment of the present application, the sample gas concentration prediction results of M prediction models are obtained according to the sample gas concentration sequence, so as to obtain the three-dimensional vector at the current moment according to the sample gas concentration prediction results of the M prediction models. Specifically, the sample gas concentration sequence is input into the M prediction models for prediction processing to obtain the sample gas concentration prediction results of the M prediction models; thereby, the sample gas concentration prediction results of the M prediction models and the sample gas concentration sequence are converted into a two-dimensional image, and the two-dimensional image of the sample gas concentration prediction results of the M prediction models is spliced ​​with the two-dimensional image of the sample gas concentration sequence to obtain the three-dimensional vector at the current moment.

[0123] Step B2: Input the three-dimensional vector at the current moment into the performance network for processing to obtain the training weights of M prediction models.

[0124] Step B3: performing weighted summation on the sample gas concentration prediction results according to the training weights to obtain a final sample gas concentration prediction result.

[0125] Step B4: Calculate the reward value according to the difference between the final sample gas concentration prediction result and the actual gas concentration value.

[0126] In an embodiment of the present application, a reward is generated based on the difference between the final sample gas concentration prediction result and the actual gas concentration value. If the difference is smaller, it means that the training weights output by the performance network are more accurate and the reward value is larger; if the difference is larger, it means that the training weights output by the performance network are more inaccurate and the reward value is smaller.

[0127] Specifically, the reward value is calculated according to the difference between the final sample gas concentration prediction result and the actual gas concentration value, including steps B4-1 to B4-3:

[0128] Step B4-1: Calculate the prediction error of each prediction model based on the sample gas concentration prediction result of each prediction model and the true gas concentration value, and determine the local error based on the prediction error ranking of each prediction model and the number M of prediction models.

[0129] For example, the local error is expressed as:

[0130] ,

[0131] in, represents the local error, represents the prediction error ranking of each prediction model, and M represents the number of prediction models.

[0132] Step B4-2: Calculate the symmetric mean absolute percentage error based on the final sample gas concentration prediction result and the true gas concentration value, and determine the overall error based on the position of the symmetric mean absolute percentage error in the quantiles of the prediction errors of the M prediction models and the number M of the prediction models.

[0133] For example, the overall error is expressed as:

[0134] ,

[0135] in, represents the overall error, Represents the position of the symmetric mean absolute percentage error in the quantiles of the prediction errors of the M prediction models.

[0136] Step B4-3: Perform weighted summation on the overall error and the local error to obtain a reward value.

[0137] For example, the reward value is expressed as:

[0138] ,

[0139] in, represents the weight coefficient, Represents the reward value at the current moment, represents the local error, Represents the overall error.

[0140] Step B5: Take the three-dimensional vector at the current moment, the three-dimensional vector at the next moment, the training weight, and the reward value as a piece of training data.

[0141] In the embodiment of the present application, a quaternion consisting of a three-dimensional vector at the current moment, a three-dimensional vector at the next moment, the training weight, and the reward value is used as a piece of training data. The three-dimensional vector at the current moment represents the gas concentration value at the current moment, and the three-dimensional vector at the next moment represents the gas concentration value at the next moment.

[0142] In one embodiment, after the training data is obtained in the above manner, the performance network is trained according to the following steps C1 to C3:

[0143] Step C1: After each piece of training data is generated, the training data is placed in a temporary memory for storage. The temporary memory is used to store the training data of the performance network.

[0144] Step C2: randomly obtaining a plurality of training data from the buffer as training samples, and training the performance network according to the training samples.

[0145] Step C3: Perform multiple rounds of training according to the above steps, and obtain a trained performance network when the training end conditions are met.

[0146] In the embodiment of the present application, considering that the generated training data has a time sequence, in order to ensure that the data used in the performance network training are independent of each other, so that the trained performance network has better robustness and generalization ability. Therefore, after each piece of training data is generated, the training data is placed in a temporary register for storage, and each time training is performed, multiple training data are randomly obtained from the temporary register as training samples to train the performance network. After completing a round of training, multiple training data are randomly obtained from the temporary register again to train the performance network until the training end condition is met, and a trained performance network is obtained. Among them, the training end condition can be reaching a preset number of training times, or the performance of the performance network meets the preset requirements.

[0147] In an optional embodiment, the performance network includes: an action network module, a value network module, a target action network module and a target value network module.

[0148] Among them, the action network module, value network module, target action network module and target value network module are network modules with the same structure; and after the training is completed, the weights of M prediction models are dynamically output through the target action network module, and the action network module, value network module and target value network module are used to assist the target action network module to complete the training.

[0149] Specifically, a plurality of training data are randomly obtained from the temporary memory as training samples, and the performance network is trained according to the training samples, including steps C2-1 to C2-6:

[0150] Step C2-1: Input the three-dimensional vector at the current moment and the training weight into the value network module to obtain the current action value, and input the three-dimensional vector at the next moment into the target action network module to obtain new training weights for M prediction models.

[0151] Among them, the three-dimensional vector at the current moment represents the gas concentration value at the current moment , that is, the state at the moment; the three-dimensional vector at the next moment Represents the gas concentration value at the next moment, that is, the state at the next moment. and training weights (i.e. the current action) is input into the value network module for processing to obtain the current action value. In addition, the three-dimensional vector at the next moment Input into the target action network module to obtain new training weights (i.e. new actions) of M prediction models.

[0152] Step C2-2: The target value network module calculates the target action value based on the new training weight, the three-dimensional vector at the next moment and the reward value.

[0153] Specifically, the new training weight and the three-dimensional vector at the next moment Input into the target value network module to get the new action value, and convert the new action value and reward value Calculate together to get the target action value, target action value It can be expressed as:

[0154] ,

[0155] in, represents the discount factor, represents the target value network module, represents the network parameters of the target value network module, represents the target action network module, Represents the network parameters of the action network module.

[0156] Step C2-3: According to the error between the action value and the target action value, the network parameters of the value network module are updated to obtain an updated value network module.

[0157] In the embodiment of the present application, it is hoped that the current action value output in step C2-1 of the value network module is equal to the target action value in step C2-2. Therefore, the network parameters of the value network module are updated based on the error between the action value and the target action value. The goal of updating the value network module is to minimize the error.

[0158] For example, the network parameters of the value network module are expressed as:

[0159] ,

[0160] ,

[0161] in, represents the value network module, represents the target action value, N represents the number of training data taken each time, represents the network parameters of the value network module at time t, represents the network parameters of the value network module at time t+1, express The coefficients when updating, Indicates network parameters The gradient of represents the network parameters of the value network module, Represents the three-dimensional vector at the current moment in the i-th training data, Represents the training weight in the i-th training data.

[0162] Step C2-4: The updated value network module calculates the action value function gradient and the action parameter gradient according to the three-dimensional vector at the current moment and the new training weight.

[0163] Step C2-5: Update the network parameters of the action network module according to the action value function gradient and the action parameter gradient to obtain an updated action network module.

[0164] For example, the action network module updates the goal to maximize , It is expressed as:

[0165] ,

[0166] in, Express expectations, Indicates value, represents the weight, and S represents the gas concentration value at different times.

[0167] The network parameters of the action network module are expressed as:

[0168] ,

[0169] in, represents the network parameters of the action network module at time t+1, represents the network parameters of the action network module at time t, Indicates update The coefficient of Indicates network parameters The gradient of Indicates action The gradient of Represents the three-dimensional vector at time t (current time), represents the value network module, Represents the target-action network module.

[0170] Step C2-6: After performing the target time training according to the above steps, the network parameters of the target action network module are updated using the updated value network module, and the network parameters of the target value network module are updated using the updated action network module.

[0171] In the embodiment of the present application, after the action network module and the value network module are updated for a period of time (i.e., the target time), the updated parameters can be assigned to the target action network module and the target value network module respectively, that is, the network parameters of the target action network module are updated by the updated value network module, and the network parameters of the target value network module are updated by the updated action network module. Specifically expressed as:

[0172] ,

[0173] in, express and The weight coefficient when updating, represents the network parameters of the target value network module, represents the network parameters of the target action network module, represents the network parameters of the value network module, Represents the network parameters of the action network module.

[0174] For example, Figure 5 This is an overall architecture diagram of a gas concentration prediction method based on performance network enhanced weight selection provided by an embodiment of the present application. Specifically, during actual prediction, the collected gas concentration sequence is input into M prediction models for prediction processing to obtain M gas concentration prediction results; the collected gas concentration sequence is converted into a two-dimensional image of the gas concentration sequence, and the M gas concentration prediction results are converted into M two-dimensional images of gas concentration prediction results, and a (M+1)×m×m three-dimensional vector is obtained based on the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images. The three-dimensional vector is input into the performance network for processing to obtain the weights of the M prediction models; the M gas concentration prediction results are weighted and summed according to the weights of the M prediction models to obtain the final gas concentration prediction result.

[0175] When training, first construct training data: obtain the sample gas concentration prediction results of M prediction models and the three-dimensional vector at the current moment; input the three-dimensional vector at the current moment into the performance network for processing to obtain the training weights of the M prediction models; perform weighted summation of the sample gas concentration prediction results according to the training weights to obtain the final sample gas concentration prediction results; calculate the reward value according to the difference between the final sample gas concentration prediction results and the true gas concentration value; finally, use the three-dimensional vector at the current moment, the three-dimensional vector at the next moment, the training weights, and the reward value as a piece of training data. After each piece of training data is generated, put the training data into the temporary register for storage.

[0176] Then, a plurality of training data are randomly obtained from the temporary register as training samples, and the performance network is trained according to the training samples. When training according to the training data, the three-dimensional vector and training weight at the current moment are input into the value network module to obtain the current action value, and the three-dimensional vector at the next moment is input into the target action network module to obtain the new training weights of M prediction models; the target value network module calculates the target action value according to the new training weight, the three-dimensional vector at the next moment and the reward value; according to the error between the action value and the target action value, the network parameters of the value network module are updated to obtain the updated value network module; the updated value network module calculates the action value function gradient and the action parameter gradient according to the three-dimensional vector at the current moment and the new training weight; according to the action value function gradient and the action parameter gradient, the network parameters of the action network module are updated to obtain the updated action network module; after the target time training is performed according to the above steps, the network parameters of the target action network module are updated using the updated value network module, and the network parameters of the target value network module are updated using the updated action network module.

[0177] Since the performance network evenly scales the network structure parameters (such as network depth, network width, and input resolution) from multiple dimensions based on the composite coefficient and is trained by the reinforcement learning method, the weights of the M prediction models obtained by the performance network can reduce the number of model parameters and the amount of calculation while achieving accuracy indicators similar to those of the existing regression network, so as to obtain accurate gas concentration prediction results based on the weights of the M prediction models. Since the performance network is based on convolutional networks for data processing, and convolutional networks are suitable for processing two-dimensional images, the collected gas concentration sequence and the M gas concentration prediction results are converted into two-dimensional images for processing, further improving the weight selection accuracy of the performance network. In this way, accurate gas concentration prediction is achieved.

[0178] The present application also provides a gas concentration prediction device based on performance network enhanced weight selection, referring to Figure 6 As shown, Figure 6 : is a schematic diagram of a gas concentration prediction device based on efficiency network enhanced weight selection provided in an embodiment of the present application, the device comprising:

[0179] The processing module 610 is used to input the collected gas concentration sequence into M prediction models for prediction processing to obtain M gas concentration prediction results, where M is a positive integer greater than 1;

[0180] A conversion module 620, configured to convert the collected gas concentration sequence into a gas concentration sequence two-dimensional image, and convert the M gas concentration prediction results into M gas concentration prediction result two-dimensional images, and obtain a three-dimensional vector according to the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images;

[0181] A weight module 630 is used to input the three-dimensional vector into the performance network for processing to obtain weights of M prediction models. The performance network is trained by a reinforcement learning method by evenly scaling network structure parameters from multiple dimensions based on a composite coefficient.

[0182] The result module 640 is used to perform weighted summation on the M gas concentration prediction results according to the weights of the M prediction models to obtain a final gas concentration prediction result.

[0183] In an optional embodiment, the device further includes a data generation module for generating training data for the performance network, and the data generation module includes:

[0184] A first acquisition module is used to obtain sample gas concentration prediction results of M prediction models and a three-dimensional vector at a current moment;

[0185] A vector processing module, used for inputting the three-dimensional vector at the current moment into the performance network for processing to obtain training weights of M prediction models;

[0186] A first weighted summation module, used for performing weighted summation on the sample gas concentration prediction results according to the training weights to obtain a final sample gas concentration prediction result;

[0187] A first calculation module, used for calculating a reward value according to a difference between the final sample gas concentration prediction result and the actual gas concentration value;

[0188] The training data module is used to use the three-dimensional vector at the current moment, the three-dimensional vector at the next moment, the training weight, and the reward value as a piece of training data.

[0189] In an optional embodiment, the device further includes a training module for training the performance network, and the training module includes:

[0190] A storage module, used for storing each training data into a temporary memory for storage after each training data is generated, wherein the temporary memory is used for storing the training data of the performance network;

[0191] A first training submodule, used for randomly acquiring a plurality of training data from the temporary memory as training samples, and training the performance network according to the training samples;

[0192] The second training submodule is used to perform multiple rounds of training according to the above steps, and obtain a trained performance network when the training end conditions are met.

[0193] In an optional embodiment, the first calculation module includes:

[0194] A first determination module is used to calculate the prediction error of each prediction model according to the sample gas concentration prediction result of each prediction model and the true gas concentration value, and determine the local error according to the prediction error ranking of each prediction model and the number M of prediction models;

[0195] A second determination module is used to calculate a symmetric mean absolute percentage error according to the final sample gas concentration prediction result and the true gas concentration value, and determine an overall error according to a position of the symmetric mean absolute percentage error in the quantiles of the prediction errors of the M prediction models and the number M of the prediction models;

[0196] The second weighted summation module is used to perform weighted summation on the overall error and the local error to obtain a reward value.

[0197] In an optional embodiment, the conversion module includes:

[0198] A normalization processing module, used for normalizing the collected gas concentration sequence to obtain a normalized gas concentration sequence;

[0199] A polar coordinate conversion module, used for performing polar coordinate conversion on the normalized gas concentration sequence to obtain a gas concentration sequence represented by polar coordinates, wherein the value of each moment in the gas concentration sequence represented by polar coordinates includes a cosine angle;

[0200] A cosine calculation module, used for adding the value of each moment in the gas concentration sequence represented by the polar coordinates to the values ​​of the remaining moments including itself, and calculating the cosine value according to the addition result;

[0201] The matrix construction module is used to construct a Gram angular field transformation matrix according to all cosine values, and use each element of the Gram angular field transformation matrix as a pixel value of a two-dimensional image to obtain a gas concentration sequence two-dimensional image.

[0202] In an optional embodiment, the structural parameters include: the number of network layers, the network depth and the input resolution;

[0203] The composite coefficient is determined by network optimization under the condition of satisfying the structural parameter constraint, and the composite coefficient includes: a first composite coefficient, a second composite coefficient, and a third composite coefficient;

[0204] The structural parameter constraints include:

[0205] The network depth factor is equal to the power exponent of the first compound coefficient;

[0206] The network width factor is equal to the power exponent of the second composite coefficient;

[0207] The input resolution factor is equal to the power of the third composite coefficient;

[0208] The first compound coefficient, the second compound coefficient, and the third compound coefficient are all greater than or equal to 1, and the power exponential product of the first compound coefficient, the second compound coefficient, and the third compound coefficient is a fixed value.

[0209] In an optional embodiment, the performance network includes four network modules with the same structure, wherein:

[0210] The input layer of the network module includes: the convolution kernel is The convolutional layer;

[0211] The middle layer of the network module includes: 7 convolutional networks with different sizes of convolution kernels and numbers of layers;

[0212] The output layer of the network module includes: the convolution kernel is Convolutional layers and fully connected layers.

[0213] In an optional embodiment, the performance network includes: an action network module, a value network module, a target action network module and a target value network module; the first training submodule includes:

[0214] A first input module, used to input the three-dimensional vector at the current moment and the training weight into the value network module to obtain the current action value, and input the three-dimensional vector at the next moment into the target action network module to obtain new training weights of M prediction models;

[0215] A second calculation module, used for the target value network module to calculate the target action value according to the new training weight, the three-dimensional vector at the next moment and the reward value;

[0216] A first updating module, used for updating the network parameters of the value network module according to the error between the action value and the target action value, to obtain an updated value network module;

[0217] A third calculation module, used for the updated value network module to calculate the action value function gradient and the action parameter gradient according to the three-dimensional vector at the current moment and the new training weight;

[0218] A second updating module, used for updating the network parameters of the action network module according to the action value function gradient and the action parameter gradient to obtain an updated action network module;

[0219] The third updating module is used to update the network parameters of the target action network module using the updated value network module after the target time training is performed according to the above steps, and to update the network parameters of the target value network module using the updated action network module.

[0220] The present application also provides an electronic device, referring to Figure 7 , Figure 7 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 700 includes: a memory 710 and a processor 720. The memory 710 and the processor 720 are connected via a bus communication. A computer program is stored in the memory 710. The computer program can be run on the processor 720 to implement the steps of the gas concentration prediction method based on efficiency network enhanced weight selection described in the embodiment of the present application.

[0221] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0222] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, and devices according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0223] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0224] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0225] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0226] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0227] The above is a detailed introduction to a gas concentration prediction method and device based on efficiency network enhanced weight selection provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A gas concentration prediction method based on performance network enhanced weight selection, characterized in that: The method comprises: The collected gas concentration sequence is input into M prediction models for prediction processing to obtain M gas concentration prediction results, where M is a positive integer greater than 1; Converting the collected gas concentration sequence into a gas concentration sequence two-dimensional image, and converting the M gas concentration prediction results into M gas concentration prediction result two-dimensional images, and obtaining a three-dimensional vector according to the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images; Input the three-dimensional vector into the performance network for processing to obtain weights of M prediction models, wherein the performance network evenly scales network structure parameters from multiple dimensions based on a composite coefficient and is trained by a reinforcement learning method; Performing weighted summation on the M gas concentration prediction results according to the weights of the M prediction models to obtain a final gas concentration prediction result; The performance network includes: an action network module, a value network module, a target action network module and a target value network module; the three-dimensional vector at the current moment, the three-dimensional vector at the next moment, the training weight and the reward value are used as a piece of training data; a plurality of training data are randomly obtained from the temporary storage as training samples, and the performance network is trained according to the training samples, including: Input the three-dimensional vector at the current moment and the training weight into the value network module to obtain the current action value, and input the three-dimensional vector at the next moment into the target action network module to obtain new training weights for M prediction models; The target value network module calculates the target action value according to the new training weight, the three-dimensional vector at the next moment and the reward value; According to the error between the action value and the target action value, the network parameters of the value network module are updated to obtain an updated value network module; The updated value network module calculates the action value function gradient and the action parameter gradient according to the three-dimensional vector at the current moment and the new training weight; According to the action value function gradient and the action parameter gradient, the network parameters of the action network module are updated to obtain an updated action network module; After the target time training is performed according to the above steps, the network parameters of the target action network module are updated using the updated value network module, and the network parameters of the target value network module are updated using the updated action network module.

2. A gas concentration prediction method based on performance network enhanced weight selection according to claim 1, characterized in that: The training data of the performance network is obtained by the following steps: Obtain sample gas concentration prediction results of M prediction models, as well as the three-dimensional vector at the current moment; Inputting the three-dimensional vector at the current moment into the performance network for processing to obtain training weights of M prediction models; Performing weighted summation on the sample gas concentration prediction results according to the training weights to obtain a final sample gas concentration prediction result; Calculating a reward value according to the difference between the final sample gas concentration prediction result and the actual gas concentration value; The three-dimensional vector at the current moment, the three-dimensional vector at the next moment, the training weight, and the reward value are taken as a piece of training data.

3. A gas concentration prediction method based on performance network enhanced weight selection according to claim 2, characterized in that: Follow these steps to train the performance network: After each piece of training data is generated, the training data is placed in a temporary memory for storage, and the temporary memory is used to store the training data of the performance network; Randomly acquiring a plurality of training data from the temporary memory as training samples, and training the performance network according to the training samples; According to the above steps, multiple rounds of training are carried out, and when the training end conditions are met, a trained performance network is obtained.

4. A gas concentration prediction method based on efficiency network enhanced weight selection according to claim 2, characterized in that: Calculating a reward value according to the difference between the final sample gas concentration prediction result and the actual gas concentration value, including: Calculate the prediction error of each prediction model according to the sample gas concentration prediction result of each prediction model and the true gas concentration value, and determine the local error according to the prediction error ranking of each prediction model and the number M of prediction models; Calculate the symmetric mean absolute percentage error according to the final sample gas concentration prediction result and the true gas concentration value, and determine the overall error according to the position of the symmetric mean absolute percentage error in the quantiles of the prediction errors of the M prediction models and the number M of the prediction models; The overall error and the local error are weightedly summed to obtain a reward value.

5. The method for predicting gas concentration based on performance network enhanced weight selection according to claim 1, characterized in that: Converting the collected gas concentration sequence into a gas concentration sequence two-dimensional image includes: Normalizing the collected gas concentration sequence to obtain a normalized gas concentration sequence; Performing polar coordinate conversion on the normalized gas concentration sequence to obtain a gas concentration sequence represented by polar coordinates, wherein the value at each moment in the gas concentration sequence represented by polar coordinates includes a cosine angle; Adding the value of each moment in the gas concentration sequence represented by the polar coordinates to the values ​​of the remaining moments including the value itself, and calculating the cosine value according to the addition result; A Gram angular field transformation matrix is ​​constructed according to all cosine values, and each element of the Gram angular field transformation matrix is ​​used as a pixel value of a two-dimensional image to obtain a gas concentration sequence two-dimensional image.

6. A gas concentration prediction method based on efficiency network enhanced weight selection according to claim 1, characterized in that: The structural parameters include: number of network layers, network depth and input resolution; The composite coefficient is determined by network optimization under the condition of satisfying the structural parameter constraint, and the composite coefficient includes: a first composite coefficient, a second composite coefficient, and a third composite coefficient; The structural parameter constraints include: The network depth factor is equal to the power exponent of the first compound coefficient; The network width factor is equal to the power exponent of the second composite coefficient; The input resolution factor is equal to the power of the third composite coefficient; The first compound coefficient, the second compound coefficient, and the third compound coefficient are all greater than or equal to 1, and the power exponential product of the first compound coefficient, the second compound coefficient, and the third compound coefficient is a fixed value.

7. A gas concentration prediction method based on efficiency network enhanced weight selection according to claim 6, characterized in that: The performance network includes four network modules with the same structure, wherein: The input layer of the network module includes: the convolution kernel is The convolutional layer; The middle layer of the network module includes: 7 convolutional networks with different sizes of convolution kernels and numbers of layers; The output layer of the network module includes: the convolution kernel is Convolutional layers and fully connected layers.

8. A gas concentration prediction device based on performance network enhanced weight selection, characterized in that: The device comprises: A processing module, used for inputting the collected gas concentration sequence into M prediction models for prediction processing to obtain M gas concentration prediction results, where M is a positive integer greater than 1; a conversion module, used to convert the collected gas concentration sequence into a gas concentration sequence two-dimensional image, and to convert the M gas concentration prediction results into M gas concentration prediction result two-dimensional images, and to obtain a three-dimensional vector according to the gas concentration sequence two-dimensional image and the M gas concentration prediction result two-dimensional images; A weight module, used for inputting the three-dimensional vector into the performance network for processing to obtain weights of M prediction models, wherein the performance network is trained by a reinforcement learning method by evenly scaling network structure parameters from multiple dimensions based on a composite coefficient; A result module, used for performing weighted summation on the M gas concentration prediction results according to the weights of the M prediction models to obtain a final gas concentration prediction result; The performance network includes: an action network module, a value network module, a target action network module and a target value network module; the three-dimensional vector at the current moment, the three-dimensional vector at the next moment, the training weight and the reward value are used as a piece of training data; a first training submodule is used to randomly obtain a plurality of training data from a temporary memory as training samples, and the performance network is trained according to the training samples, and the first training submodule includes: A first input module, used to input the three-dimensional vector at the current moment and the training weight into the value network module to obtain the current action value, and input the three-dimensional vector at the next moment into the target action network module to obtain new training weights of M prediction models; A second calculation module, used for the target value network module to calculate the target action value according to the new training weight, the three-dimensional vector at the next moment and the reward value; A first updating module, used for updating the network parameters of the value network module according to the error between the action value and the target action value, to obtain an updated value network module; A third calculation module, used for the updated value network module to calculate the action value function gradient and the action parameter gradient according to the three-dimensional vector at the current moment and the new training weight; A second updating module, used for updating the network parameters of the action network module according to the action value function gradient and the action parameter gradient to obtain an updated action network module; The third updating module is used to update the network parameters of the target action network module using the updated value network module after the target time training is performed according to the above steps, and to update the network parameters of the target value network module using the updated action network module.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the gas concentration prediction method based on efficiency network enhanced weight selection as described in any one of claims 1-7 are implemented.

Citation Information

Patent Citations

  • Underground gas concentration prediction method and device based on long-term and short-term memory neural network

    CN112528558A

  • Method for predicting coal and gas outburst danger of heading end by using post-blasting gas concentration

    CN113743486A

  • Gas concentration calculation method, device and equipment and storage medium

    CN113758890A

  • Gas change detection method, device and equipment based on GPT model

    CN116759080A

  • Gas concentration prediction method and system for intelligent gas sensing

    CN117079736A