An intelligent early warning method for capturing changes in the value of combustible gas detectors
By building and optimizing the combustible gas concentration prediction network, the safety hazards and insufficient timeliness of combustible gas leakage detection in the prior art are solved, and early detection and efficient detection effects are achieved.
Patent Information
- Application Number
- CN202210424883.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-04-22
AI Technical Summary
The existing combustible gas leak detection methods have safety risks and cannot detect leakage in advance. The numerical prediction method based on neural network model cannot realize adaptive adjustment of the model structure, resulting in insufficient detection timeliness.
An intelligent early warning method is proposed to capture the numerical changes of combustible gas detectors. By collecting historical data, preprocessing and wavelet packet decomposition, a combustible gas concentration prediction network is constructed, and the network structure and parameters are optimized using improved artificial jellyfish search algorithm and neurodynamic method to achieve adaptive adjustment and rapid training of the prediction network.
The advance detection of combustible gas leakage is realized, which avoids safety hazards and improves the timeliness and accuracy of combustible gas detection.
Smart Images

Figure CN114722720B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of gas leakage detection, and in particular to an intelligent early warning method for capturing numerical changes of a combustible gas detector. Background Art
[0002] A combustible gas detector is a detector that responds to the concentration of a single or multiple combustible gases. At present, the traditional combustible gas detector uses the resistance change of the refractory metal platinum wire after heating to measure the concentration of combustible gas. When the combustible gas enters the detector, it causes an oxidation reaction (flameless combustion) on the surface of the platinum wire. The heat generated by the oxidation reaction causes the temperature of the platinum wire to rise, and the resistivity of the platinum wire changes. The concentration of the combustible gas is determined according to the change in resistivity. The existing combustible gas leak detection adopts the threshold discrimination method, that is, when the gas concentration exceeds the specified threshold, an alarm is issued, but this method has defects, because it takes a long time for the gas concentration to reach the specified threshold, but the combustible gas is already leaking, and there are great safety hazards in this process. On the one hand, the combustible gas detector can only detect combustible gas leaks in the scenario where a serious combustible gas leak has occurred. On the other hand, the numerical prediction method based on the neural network model needs to rely on the traditional model structure and only uses the data set to adjust the traditional model parameters. It is impossible to achieve adaptive adjustment of the model structure, so that the model with structural adjustment is more suitable for the current numerical prediction scenario. Summary of the invention
[0003] In view of this, the present invention provides an intelligent early warning method for capturing the numerical changes of combustible gas detectors, the purpose of which is to (1) achieve early detection of combustible gas leaks and avoid safety hazards caused by combustible gas leaks; and (2) achieve structural adaptive adjustment of the combustible gas concentration prediction network and rapid parameter training to improve the timeliness of combustible gas detection.
[0004] To achieve the above object, the present invention provides an intelligent early warning method for capturing the value change of a combustible gas detector, comprising the following steps:
[0005] S1: Collect historical data of combustible gas detectors and construct a combustible gas concentration time series data set;
[0006] S2: preprocessing the combustible gas concentration time series data in the constructed data set to obtain preprocessed combustible gas concentration time series data, wherein the preprocessed combustible gas concentration time series data set is a training data set for the combustible gas concentration prediction network;
[0007] S3: performing wavelet packet decomposition on the preprocessed combustible gas concentration time series data, and constructing a fitness function of the combustible gas concentration prediction network, wherein the input of the fitness function is the combustible gas concentration time series data after wavelet packet decomposition;
[0008] S4: The improved artificial jellyfish search algorithm is used to optimize and solve the fitness function to obtain the network structure parameters for combustible gas concentration prediction;
[0009] S5: instantiating the combustible gas concentration prediction network based on the solved combustible gas concentration prediction network structure parameter values, and determining the combustible gas concentration prediction network objective function;
[0010] S6: Using the improved neural dynamics method to train and optimize the objective function, the weight parameters of the combustible gas concentration prediction network are obtained, and the obtained weight parameters are used as the weight optimization parameters of the combustible gas concentration prediction network to obtain the optimized combustible gas concentration prediction network;
[0011] S7: Preprocess the combustible gas detector time series values, input the preprocessed combustible gas detector time series values into the optimized combustible gas concentration prediction network, predict the combustible gas detector data at the next moment, use the predicted and updated combustible gas detector time series values as the input of the combustible gas concentration prediction network, repeat the process to obtain the combustible gas concentration prediction value after the user-set prediction times, and if the prediction value is greater than the specified threshold, an alarm is issued, otherwise no alarm is issued.
[0012] As a further improvement method of the present invention:
[0013] Optionally, obtaining the combustible gas concentration time series data set in step S1 includes:
[0014] Obtain a combustible gas concentration time series data set, wherein the combustible gas concentration time series data set includes N combustible gas concentration time series data, and the time series range of each combustible gas concentration time series data is L. The format of the combustible gas concentration time series data set S is:
[0015] S={s 1 ,s 2 ,…,s i ,…,s N}
[0016] s i =(s i,0 ,s i,1 ,s i,2 ,…,s i,L )
[0017] in:
[0018] s i represents the i-th group of combustible gas concentration time series data in the combustible gas concentration time series data set, s i,0 Indicates i The combustible gas concentration value at the initial time, s i,L Indicates i The combustible gas concentration value at the end of the middle moment, the time difference between adjacent data values is 1 second;
[0019] In an embodiment of the present invention, the combustible gas concentration time series data set is obtained by sorting out historical data in the combustible gas detector. For example, the combustible gas concentration time series data set includes continuous combustible gas concentration data of combustible gas detector A in the past L seconds. If there is combustible gas concentration data at a certain moment, the combustible gas concentration data at that moment is marked as a null value.
[0020] Optionally, in step S2, preprocessing the combustible gas concentration time series data in the training data set includes:
[0021] All combustible gas concentration time series data in the combustible gas concentration time series data set S are traversed, the null values of each combustible gas concentration time series data are marked, and the marked null values are filled to obtain the preprocessed combustible gas concentration time series data. In the embodiment of the present invention, the preprocessed combustible gas concentration time series data set S′ is obtained by filling each combustible gas concentration time series data set, wherein the preprocessed combustible gas concentration time series data set is a training data set of the combustible gas concentration prediction network, and the null value filling formula of the data at any time point is:
[0022]
[0023] in:
[0024] s i,ρ′ is the non-null value before the time point ρ in the combustible gas concentration time series data;
[0025] s i,ρ″ is the non-null value after the time point ρ in the combustible gas concentration time series data;
[0026] L represents the time series range of each combustible gas concentration time series data;
[0027] If i,ρ If it is a null value, k represents s i,ρ For i The kth null value in ;
[0028] By performing null-filling processing on each group of combustible gas concentration time series data, the preprocessed combustible gas concentration time series data set S′ is obtained:
[0029] S′={s′ 1 ,s′ 2 ,…,s′ i ,…,s′ N}
[0030] in:
[0031] s′ i Any set of preprocessed combustible gas concentration time series data.
[0032] Optionally, in step S3, wavelet packet decomposition is performed on the combustible gas concentration time series data in the preprocessed combustible gas concentration time series data set, including:
[0033] The wavelet packet decomposition of the pre-processed combustible gas concentration time series data comprises:
[0034] The translation parameter b of the wavelet packet is fixed, and the Haar wavelet function ω(t) is used to transform the combustible gas concentration time series data s′ i Perform wavelet packet decomposition to obtain wavelet packet high-frequency decomposition results of different scales. The wavelet packet high-frequency decomposition formula is:
[0035]
[0036] in:
[0037] d(s′ i ,a,1) is the combustible gas concentration time series data s′ i The high-frequency decomposition result of wavelet packet at scale a;
[0038] b is the translation parameter of the wavelet function ω(t), which is set to 0.5;
[0039] a is the scale parameter of the wavelet function ω(t), a∈{a′,a′-1,a′-2,a′-3}, a′ is the maximum decomposition scale;
[0040] t represents the combustible gas concentration time series data s′ i The time series information of the wavelet packet is fixed; the translation parameter b of the wavelet packet is fixed, and the Haar wavelet function ω(t) is used to perform wavelet packet decomposition on the combustible gas concentration time series data to obtain wavelet packet low-frequency decomposition results of different scales. The wavelet packet low-frequency decomposition formula is:
[0041]
[0042] in:
[0043] d(s′ i ,a″,2) is the combustible gas concentration time series data s′ i Wavelet packet low-frequency decomposition result at scale a″, a″∈{1,2,3,4};
[0044] The wavelet packet high frequency decomposition result d(s′ i ,a,1) and wavelet packet low frequency decomposition result d(s′ i ,a″,2) as the wavelet packet decomposition result d i =[d(s′ i ,a,1),d(s′ i ,a″,2)], then the wavelet packet decomposition result set corresponding to the N groups of training data in the preprocessed combustible gas concentration time series data set is:
[0045] D={d 1 ,d 2 ,…,d i ,…,d N}
[0046] in:
[0047] d i is the combustible gas concentration time series data s′ of the i-th group in the preprocessed combustible gas concentration time series data set i The corresponding wavelet packet decomposition result.
[0048] Optionally, constructing a fitness function of the combustible gas concentration prediction network in step S3 includes:
[0049] The fitness function F of the constructed combustible gas concentration prediction network 1 for:
[0050]
[0051]
[0052]
[0053] in:
[0054] To convert s′ i The network output value after input into the combustible gas concentration prediction network;
[0055] is the output value of the lth neural unit in the mth hidden layer, NN(·) is the combustible gas concentration prediction network model;
[0056] m is the number of hidden layers of the combustible gas concentration prediction network;
[0057] l is the maximum number of neural units in the hidden layer;
[0058] α is the learning rate of the combustible gas concentration prediction network;
[0059] By inputting the wavelet decomposition result set of the training data in the preprocessed combustible gas concentration time series data set into the combustible gas concentration prediction network with different specifications, the combustible gas concentration prediction network structure with the minimum fitness function is the network structure adopted by the present invention, wherein the network structure includes the number of hidden layers, the maximum number of neural units in the hidden layer, and the learning rate.
[0060] Optionally, in step S4, the improved artificial jellyfish search algorithm is used to optimize and solve the fitness function to obtain the combustible gas concentration prediction network structure parameters, wherein the input of the fitness function is the combustible gas concentration time series data after wavelet packet decomposition, including:
[0061] The improved artificial jellyfish search algorithm is used to optimize and solve the fitness function, and the solution process of the fitness function is as follows:
[0062] 1) Set the jellyfish population to n max , the maximum number of iterations of the algorithm is Max, and it uses the generated n max jellyfish, the spatial position of any e-th jellyfish is X e =(x 1e ,x 2e ,x 3e ), the spatial position of each jellyfish is a combustible gas concentration prediction network of a certain specification, x 1e >1 corresponds to the number of hidden layers of the combustible gas concentration prediction network, x 2e >10 corresponds to the maximum number of neurons in the hidden layer, x 3e ∈(0,1] corresponds to the learning rate of the combustible gas concentration prediction network, X 0 is a set of randomly generated jellyfish positions, then n max The spatial position of the jellyfish is:
[0063] X e+1 =ηX e |0.5-X e |,e+1≤n max
[0064] in:
[0065] η is the jellyfish position parameter, which is set to 0.6;
[0066] Set the number of iterations of the current algorithm to n d , initialize the current algorithm iteration number to 0;
[0067] 2) Set n max The spatial position of the jellyfish is n max The network structure, in the nth d In the algorithm iteration, the wavelet packet decomposition result is input to any e-th spatial position In the network of the corresponding specification, the fitness function outputs its fitness value
[0068] 3) The nth d Minimum fitness value in algorithm iteration The corresponding spatial position is taken as the optimal spatial position of the current iteration
[0069] 4) Calculate the current number of iterations n d The threshold value f(n d ):
[0070]
[0071] in:
[0072] rand(0,1) randomly generates a number between 0 and 1;
[0073] If f(n d ) is greater than 0.5, then at the current iteration number n d In , the spatial position update formula of each jellyfish is:
[0074]
[0075] Otherwise, the spatial position update formula of each jellyfish is:
[0076]
[0077] in:
[0078] U 1 Search for the upper bound of the jellyfish's spatial position, U 2 is the lower bound of the mobile search for the jellyfish spatial position, where the lower bound of the mobile search for the jellyfish spatial position U 2 is a two-dimensional plane with a Z-axis coordinate of 0, and the upper limit of the mobile search for the spatial position of the jellyfish is a two-dimensional plane with a Z-axis coordinate greater than 1 but infinitely close to 1;
[0079] 5) Let n d =n d +1;
[0080] 6) Determine n d Whether it satisfies n d ≥Max, if satisfied, calculate the nth d After iteration, the fitness value is the minimum Corresponding spatial position The network structure corresponding to the spatial position is used as the combustible gas concentration prediction network structure; otherwise, return to step 2).
[0081] Optionally, determining the combustible gas concentration prediction network objective function in step S5 includes:
[0082] A combustible gas concentration prediction network is constructed according to the combustible gas concentration prediction network structure determined above. The constructed combustible gas concentration prediction network includes a wavelet packet decomposition input layer, a dual-channel hidden layer, and an output layer. The wavelet packet decomposition input layer is used to perform wavelet packet decomposition processing on the time series data input to the network, and obtain the wavelet packet high-frequency decomposition result and the wavelet packet low-frequency decomposition result respectively. The two are respectively input into the high-channel hidden layer and the low-channel hidden layer for convolution processing, and the softmax function is used to output the predicted value of the dual-channel hidden layer output result in the output layer to obtain the predicted value of the combustible gas concentration at the next moment;
[0083] Set the training objective function of the combustible gas concentration prediction network. The combustible gas concentration prediction network objective function F 2 for:
[0084] in:
[0085] N represents the total number of data in the training set.
[0086] L represents the time series range of each combustible gas concentration time series data;
[0087] s i,z In the training set s i,z+1 The actual combustible gas concentration value;
[0088] For the i,0 ,s i,1 ,…,s i,z ) is used as the input of the combustible gas concentration prediction network, and the combustible gas concentration prediction network outputs the predicted value of the combustible gas concentration at time z+1;
[0089] The constraints of the combustible gas concentration prediction network training objective function are:
[0090] w 1 +w 2 =1
[0091] w 1 ≥w 2
[0092] in:
[0093] w 1is the weight of the high channel hidden layer in the dual channel hidden layer, w 2 is the weight of the low channel hidden layer in the dual channel hidden layer.
[0094] Optionally, in step S6, the objective function is trained and optimized using an improved neural dynamics method to obtain the weight parameters of the combustible gas concentration prediction network, including:
[0095] The objective function is trained and optimized using an improved neural dynamics method, and the training optimization process is as follows:
[0096] According to the set combustible gas concentration prediction network training objective function and constraints, a weight parameter solution function is constructed:
[0097] L(w 1 ,w 2 ,λ,μ)=F 2 +λ T [(w 1 ) p -(w 2 ) p ]+μ T (w 1 +w 2 -1)
[0098] in:
[0099] T is transpose;
[0100] λ is used to constrain w 1 ≥w 2 The Lagrange multiplier of ;
[0101] μ is used to constrain w 1 +w 2 =1 Lagrange multiplier;
[0102] p is the order of the weight parameter solution function, which is set to 3;
[0103] Then the solution of the weight parameter is:
[0104]
[0105] The weight parameter solution function will be minimized As the weight of the high channel hidden layer in the dual channel hidden layer, the weight of the low channel hidden layer is The combustible gas concentration prediction network is obtained after parameter optimization;
[0106] The combustible gas concentration prediction network after parameter optimization is constructed as a combustible gas concentration prediction network module.
[0107] Optionally, in the step S7, the optimized combustible gas concentration prediction network module is installed in the combustible gas detector, the time series value of the combustible gas detector is obtained, and the time series value is preprocessed, and the preprocessed combustible gas detector time series value is input into the optimized combustible gas concentration prediction network, and the combustible gas detector data at the next moment is predicted, and the predicted and updated combustible gas detector time series value is used as the input of the combustible gas concentration prediction network, and the process is repeated to obtain the combustible gas concentration prediction value after the user sets the number of predictions, including:
[0108] Installing the optimized combustible gas concentration prediction network module to the combustible gas detector, obtaining the time series value of the combustible gas detector, and preprocessing the time series value, wherein the preprocessing method is a null value filling method;
[0109] The pre-processed combustible gas detector time series value is input into the optimized combustible gas concentration prediction network to predict the combustible gas detector data at the next moment, and the predicted and updated combustible gas detector time series value is used as the input of the combustible gas concentration prediction network. The process is repeated to obtain the combustible gas concentration prediction value after the user sets the number of predictions.
[0110] If the predicted value of the combustible gas concentration is greater than the specified threshold, an alarm will be issued, otherwise no alarm will be issued.
[0111] In order to solve the above problems, the present invention also provides an intelligent early warning device for capturing the value change of the combustible gas detector, characterized in that the device comprises:
[0112] Combustible gas concentration acquisition module, used to capture the real-time values and historical data of combustible gas detectors;
[0113] The data processing module is used to pre-process the time series data captured by the combustible gas detector, and upload the pre-processed time series data to the combustible gas concentration prediction network module;
[0114] The combustible gas concentration prediction network training module is used to set the network structure of the combustible gas concentration prediction network according to the set fitness function, and perform parameter optimization training on the combustible gas concentration prediction network according to the training objective function to obtain the combustible gas concentration prediction network after parameter optimization, and install the combustible gas concentration prediction network into the combustible gas concentration prediction network module;
[0115] The combustible gas concentration prediction network module is used to receive the pre-processed time series data uploaded by the data processing module, use the combustible gas concentration prediction network to predict the combustible gas detector data at the next moment, and use the predicted and updated combustible gas detector time series value as the input of the combustible gas concentration prediction network. Repeat this process to obtain the combustible gas concentration prediction value after the user sets the number of predictions. If the combustible gas concentration prediction value is greater than the specified threshold, an alarm is issued, otherwise no alarm is issued.
[0116] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0117] a memory storing at least one instruction; and
[0118] The processor executes the instructions stored in the memory to implement the above-mentioned intelligent early warning method for capturing the value changes of the combustible gas detector.
[0119] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned intelligent early warning method for capturing changes in the numerical values of combustible gas detectors.
[0120] Compared with the prior art, the present invention proposes an intelligent early warning method for capturing the value changes of combustible gas detectors. The technology has the following advantages:
[0121] First, considering that the numerical prediction method based on the neural network model needs to rely on the traditional model structure, it is impossible to achieve adaptive adjustment of the model structure by only adjusting the traditional model parameters using the data set. This scheme proposes a fitness function that realizes adaptive determination of the neural network structure. By solving the parameters of the fitness function, the optimal network structure is obtained. The constructed combustible gas concentration prediction network fitness function F 1 for:
[0122]
[0123]
[0124]
[0125] in: To convert s′ i The network output value after input into the combustible gas concentration prediction network; is the output value of the lth neural unit in the mth hidden layer, NN(·) is the combustible gas concentration prediction network model; m is the number of hidden layers of the combustible gas concentration prediction network; l is the maximum number of neural units in the hidden layer; α is the learning rate of the combustible gas concentration prediction network; by inputting the wavelet decomposition result set of the training data in the preprocessed combustible gas concentration time series data set into the combustible gas concentration prediction network with different specifications, the combustible gas concentration prediction network structure with the minimum fitness function is the network structure adopted in this scheme, where the network structure includes the number of hidden layers, the maximum number of neural units in the hidden layer, and the learning rate. The improved artificial jellyfish search algorithm is used to optimize and solve the fitness function, where the solution process of the fitness function is: 1) Set the number of jellyfish populations to n max , the maximum number of iterations of the algorithm is Max, and it uses the generated n max jellyfish, the spatial position of any e-th jellyfish is X e =(x 1e ,x 2e ,x 3e ), the spatial position of each jellyfish is a combustible gas concentration prediction network of a certain specification, x 1e >1 corresponds to the number of hidden layers of the combustible gas concentration prediction network, x 2e >10 corresponds to the maximum number of neurons in the hidden layer, x 3e ∈(0,1] corresponds to the learning rate of the combustible gas concentration prediction network, X 0 is a set of randomly generated jellyfish positions, then n max The spatial position of the jellyfish is:
[0126] X e+1 =ηX e |0.5-X e |,e+1≤n max
[0127] Where: η is the jellyfish position parameter, set it to 0.6; set the number of iterations of the current algorithm to n d , initialize the current algorithm iteration number to 0; 2) set n max The spatial position of the jellyfish is n max The network structure, in the nth d In the algorithm iteration, the wavelet packet decomposition result is input to any e-th spatial position In the network of the corresponding specification, the fitness function outputs its fitness value 3) The nth d Minimum fitness value in algorithm iteration The corresponding spatial position is taken as the optimal spatial position of the current iteration 4) Calculate the current number of iterations n d The threshold value f(nd ):
[0128]
[0129] Among them: rand (0,1) is a randomly generated number between 0 and 1; if f (n d ) is greater than 0.5, then at the current iteration number n d In , the spatial position update formula of each jellyfish is:
[0130]
[0131] Otherwise, the spatial position update formula of each jellyfish is:
[0132]
[0133] Among them: U 1 Search for the upper bound of the jellyfish's spatial position, U 2 Search for the lower bound of the movement of the jellyfish spatial position; 5) Let n d =n d +1; 6) Determine n d Whether it satisfies n d ≥Max, if satisfied, calculate the nth d After iteration, the fitness value is the minimum Corresponding spatial position The network structure corresponding to the spatial position is used as the combustible gas concentration prediction network structure; otherwise, return to step 2). Compared with the traditional scheme, this scheme optimizes and solves the fitness function by simulating the movement behavior of jellyfish. In the early stage of algorithm iteration, jellyfish moves passively, and the update direction is the optimal position of the current iteration, thereby speeding up the algorithm solution in the early stage of algorithm iteration, so that the solution result is close to the current optimal solution, improving the speed of algorithm solution, and ensuring the timeliness of the construction of the combustible gas concentration prediction network model. In the later stage of algorithm iteration, jellyfish actively moves and traverses between the upper and lower bounds of the movable search to obtain a more accurate network structure result, thereby obtaining a prediction network model for the adaptive prediction scenario, improving the accuracy of combustible gas concentration prediction, and helping to avoid safety hazards caused by combustible gas leakage.
[0134] At the same time, this scheme proposes a combustible gas leak detection method, and constructs a combustible gas concentration prediction network according to the combustible gas concentration prediction network structure determined above. The constructed combustible gas concentration prediction network includes a wavelet packet decomposition input layer, a dual-channel hidden layer, and an output layer, wherein the wavelet packet decomposition input layer is used to perform wavelet packet decomposition processing on the time series data input to the network, and obtain the wavelet packet high-frequency decomposition result and the wavelet packet low-frequency decomposition result respectively, and the two are respectively input into the high-channel hidden layer and the low-channel hidden layer for convolution processing, and the softmax function is used to output the predicted value of the dual-channel hidden layer output result in the output layer to obtain the predicted value of the combustible gas concentration at the next moment; the training objective function of the combustible gas concentration prediction network is set, and the combustible gas concentration prediction network objective function F is set. 2 for:
[0135]
[0136] Where: s i,z In the training set s i,z+1 The actual combustible gas concentration value; For the i,0 ,s i,1 ,…,s i,z ) is used as the input of the combustible gas concentration prediction network, and the combustible gas concentration prediction network outputs the predicted value of the combustible gas concentration at time z+1; the constraint condition of the combustible gas concentration prediction network training objective function is:
[0137] w 1 +w 2 =1
[0138] w 1 ≥w 2
[0139] Where: w 1 is the weight of the high channel hidden layer in the dual channel hidden layer, w 2 is the weight of the low channel hidden layer in the dual channel hidden layer. According to the set combustible gas concentration prediction network training objective function and constraints, the weight parameter solution function is constructed:
[0140] L(w 1 ,w 2 ,λ,μ)=F 2 +λ T [(w 1 ) p -(w 2 ) p ]+μ T (w 1 +w 2 -1)
[0141] Where: T is the transpose; λ is used to constrain w 1 ≥w 2 The Lagrange multiplier of 1 +w 2 =1 Lagrange multiplier; p is the order of the weight parameter solution function, then the solution result of the weight parameter is:
[0142]
[0143] The weight parameter solution function will be minimized As the weight of the high channel hidden layer in the dual channel hidden layer, the weight of the low channel hidden layer is Obtain a combustible gas concentration prediction network after parameter optimization; construct the combustible gas concentration prediction network after parameter optimization into a combustible gas concentration prediction network module. Install the optimized combustible gas concentration prediction network module into the combustible gas detector, obtain the time series value of the combustible gas detector, and preprocess the time series value, wherein the preprocessing method is a null value filling method; input the preprocessed combustible gas detector time series value into the optimized combustible gas concentration prediction network, predict the combustible gas detector data at the next moment, use the predicted and updated combustible gas detector time series value as the input of the combustible gas concentration prediction network, repeat the process to obtain the combustible gas concentration prediction value after the user sets the number of predictions; if the combustible gas concentration prediction value is greater than the specified threshold, an alarm is issued, otherwise no alarm is issued, thereby achieving effective detection of the combustible gas concentration prediction value. BRIEF DESCRIPTION OF THE DRAWINGS
[0144] Figure 1 A schematic flow chart of an intelligent early warning method for capturing changes in the value of a combustible gas detector provided by an embodiment of the present invention;
[0145] Figure 2 for Figure 1 A schematic diagram of a process of one of the steps in the embodiment;
[0146] Figure 3 for Figure 1 A schematic flow chart of another step of the embodiment;
[0147] Figure 4 A functional module diagram of an intelligent early warning device for capturing changes in the value of a combustible gas detector provided by an embodiment of the present invention;
[0148] Figure 5 A schematic diagram of the structure of an electronic device for implementing an intelligent early warning method for capturing changes in the values of a combustible gas detector provided by an embodiment of the present invention.
[0149] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0150] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0151] The embodiment of the present application provides an intelligent early warning method for capturing changes in the numerical value of a combustible gas detector. The execution subject of the intelligent early warning method for capturing changes in the numerical value of a combustible gas detector includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the intelligent early warning method for capturing changes in the numerical value of a combustible gas detector can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0152] Embodiment 1:
[0153] S1: Collect historical data of combustible gas detectors and construct a combustible gas concentration time series dataset.
[0154] The step S1 of obtaining a combustible gas concentration time series data set includes:
[0155] Obtain a combustible gas concentration time series data set, wherein the combustible gas concentration time series data set includes N combustible gas concentration time series data, and the time series range of each combustible gas concentration time series data is L. The format of the combustible gas concentration time series data set S is:
[0156] S={s 1 ,s 2 ,…,s i ,…,s N}
[0157] s i =(s i,0 ,s i,1 ,s i,2 ,…,s i,L )
[0158] in:
[0159] s i represents the i-th group of combustible gas concentration time series data in the combustible gas concentration time series data set, s i,0 Indicates i The combustible gas concentration value at the initial time, s i,L Indicates i The combustible gas concentration value at the end of the middle moment, the time difference between adjacent data values is 1 second;
[0160] In an embodiment of the present invention, the combustible gas concentration time series data set is obtained by sorting out historical data in the combustible gas detector. For example, the combustible gas concentration time series data set includes continuous combustible gas concentration data of combustible gas detector A in the past L seconds. If there is combustible gas concentration data at a certain moment, the combustible gas concentration data at that moment is marked as a null value.
[0161] Furthermore, each combustible gas detector sends the segmented historical data to the server through a message queue, and the server sorts the received historical data and deletes the data with more than NULL values. The combustible gas concentration time series data is obtained to obtain a combustible gas concentration time series data set, wherein the length of each segmented historical data is L seconds.
[0162] S2: preprocessing the combustible gas concentration time series data in the constructed data set to obtain preprocessed combustible gas concentration time series data, wherein the preprocessed combustible gas concentration time series data set is a training data set for the combustible gas concentration prediction network.
[0163] In the step S2, the combustible gas concentration time series data in the training data set is preprocessed, including:
[0164] All combustible gas concentration time series data in the combustible gas concentration time series data set S are traversed, the null values of each combustible gas concentration time series data are marked, and the marked null values are filled to obtain the preprocessed combustible gas concentration time series data. In the embodiment of the present invention, the preprocessed combustible gas concentration time series data set S′ is obtained by filling each combustible gas concentration time series data set, wherein the preprocessed combustible gas concentration time series data set is a training data set of the combustible gas concentration prediction network, and the null value filling formula of the data at any time point is:
[0165]
[0166] in:
[0167] s i,ρ′ is the non-null value before the time point ρ in the combustible gas concentration time series data;
[0168] s i,ρ″ is the non-null value after the time point ρ in the combustible gas concentration time series data;
[0169] L represents the time series range of each combustible gas concentration time series data;
[0170] If i,ρ If it is a null value, k represents s i,ρ Fori The kth null value in ;
[0171] By performing null-filling processing on each group of combustible gas concentration time series data, the preprocessed combustible gas concentration time series data set S′ is obtained:
[0172] S′={s′ 1 ,s′ 2 ,…,s′ i ,…,s′ N}
[0173] in:
[0174] s′ i Any set of preprocessed combustible gas concentration time series data.
[0175] S3: performing wavelet packet decomposition on the preprocessed combustible gas concentration time series data, and constructing a fitness function of a combustible gas concentration prediction network, wherein the input of the fitness function is the combustible gas concentration time series data after wavelet packet decomposition.
[0176] In the step S3, the combustible gas concentration time series data in the pre-processed combustible gas concentration time series data set is subjected to wavelet packet decomposition, including:
[0177] It needs to be explained that the wavelet packet decomposition method is used to perform wavelet packet decomposition on each combustible gas concentration time series data in the preprocessed combustible gas concentration time series data set;
[0178] In detail, for any combustible gas concentration time series data s′ in the preprocessed combustible gas concentration time series data set S′ i , which is used as the input of the wavelet packet decomposition model, where s′ i is the combustible gas concentration time series data after preprocessing;
[0179] Further, see Figure 2 As shown, the wavelet packet decomposition of the pre-processed combustible gas concentration time series data includes:
[0180] S31, fixing the translation parameters of the wavelet packet, using the Haar wavelet function to perform wavelet packet decomposition on the combustible gas concentration time series data, and obtaining high-frequency decomposition results of wavelet packets of different scales;
[0181] S32, fixing the translation parameters of the wavelet packet, using the Haar wavelet function to perform wavelet packet decomposition on the combustible gas concentration time series data, and obtaining wavelet packet low-frequency decomposition results of different scales;
[0182] S33, selecting the wavelet packet high-frequency decomposition result and the wavelet packet low-frequency decomposition result with a fixed scale factor as the wavelet packet decomposition result.
[0183] The fitness function of the combustible gas concentration prediction network is constructed in the S3 step, including:
[0184] The fitness function F of the constructed combustible gas concentration prediction network 1 for:
[0185]
[0186]
[0187]
[0188] in:
[0189] To convert s′ i The network output value after input into the combustible gas concentration prediction network;
[0190] is the output value of the lth neural unit in the mth hidden layer, NN(·) is the combustible gas concentration prediction network model;
[0191] m is the number of hidden layers of the combustible gas concentration prediction network;
[0192] l is the maximum number of neural units in the hidden layer;
[0193] α is the learning rate of the combustible gas concentration prediction network.
[0194] It needs to be explained that by inputting the wavelet decomposition result set of the training data in the preprocessed combustible gas concentration time series data set into the combustible gas concentration prediction network with different specifications, the combustible gas concentration prediction network structure with the minimum fitness function is the network structure adopted by the present invention, wherein the network structure includes the number of hidden layers, the maximum number of neural units in the hidden layer, and the learning rate.
[0195] S4: The improved artificial jellyfish search algorithm is used to optimize and solve the fitness function to obtain the combustible gas concentration prediction network structure parameters.
[0196] In the step S4, the improved artificial jellyfish search algorithm is used to optimize and solve the fitness function to obtain the combustible gas concentration prediction network structure parameters, wherein the input of the fitness function is the combustible gas concentration time series data after wavelet packet decomposition, including:
[0197] The improved artificial jellyfish search algorithm is used to optimize and solve the fitness function, and the solution process of the fitness function is as follows:
[0198] 1) Set the jellyfish population to n max , the maximum number of iterations of the algorithm is Max, and it uses the generated n max jellyfish, the spatial position of any e-th jellyfish is X e =(x 1e ,x 2e ,x 3e ), the spatial position of each jellyfish is a combustible gas concentration prediction network of a certain specification, x 1e >1 corresponds to the number of hidden layers of the combustible gas concentration prediction network, x 2e >10 corresponds to the maximum number of neurons in the hidden layer, x 3e ∈(0,1] corresponds to the learning rate of the combustible gas concentration prediction network, X 0 is a set of randomly generated jellyfish positions, then n max The spatial position of the jellyfish is:
[0199] X e+1 =ηX e |0.5-X e |,e+1≤n max
[0200] in:
[0201] η is the jellyfish position parameter, which is set to 0.6;
[0202] Set the number of iterations of the current algorithm to n d , initialize the current algorithm iteration number to 0;
[0203] 2) Set n max The spatial position of the jellyfish is n max The network structure, in the nth d In the algorithm iteration, the wavelet packet decomposition result is input to any e-th spatial position In the network of the corresponding specification, the fitness function outputs its fitness value
[0204] 3) The nth d Minimum fitness value in algorithm iteration The corresponding spatial position is taken as the optimal spatial position of the current iteration
[0205] 4) Calculate the current number of iterations n d The threshold value f(n d ):
[0206]
[0207] in:
[0208] rand(0,1) randomly generates a number between 0 and 1;
[0209] If f(n d ) is greater than 0.5, then at the current iteration number n d In , the spatial position update formula of each jellyfish is:
[0210]
[0211] Otherwise, the spatial position update formula of each jellyfish is:
[0212]
[0213] in:
[0214] U 1 Search for the upper bound of the jellyfish's spatial position, U 2 is the lower bound of the mobile search for the jellyfish spatial position, where the lower bound of the mobile search for the jellyfish spatial position U 2 is a two-dimensional plane with a Z-axis coordinate of 0, and the upper limit of the mobile search for the spatial position of the jellyfish is a two-dimensional plane with a Z-axis coordinate greater than 1 but infinitely close to 1;
[0215] 5) Let n d =n d +1;
[0216] 6) Determine n d Whether it satisfies n d ≥Max, if satisfied, calculate the nth d After iteration, the fitness value is the minimum Corresponding spatial position The network structure corresponding to the spatial position is used as the combustible gas concentration prediction network structure; otherwise, return to step 2).
[0217] S5: Instantiate the combustible gas concentration prediction network based on the solved combustible gas concentration prediction network structure parameter values, and determine the combustible gas concentration prediction network objective function.
[0218] Exemplarily, a combustible gas concentration prediction network is constructed according to the combustible gas concentration prediction network structure determined above, and the constructed combustible gas concentration prediction network includes a wavelet packet decomposition input layer, a dual-channel hidden layer, and an output layer, wherein the wavelet packet decomposition input layer is used to perform wavelet packet decomposition processing on the time series data input to the network, and obtain the wavelet packet high-frequency decomposition result and the wavelet packet low-frequency decomposition result respectively, and the two are respectively input into the high-channel hidden layer and the low-channel hidden layer for convolution processing, and the softmax function is used to output the predicted value of the dual-channel hidden layer output result in the output layer to obtain the predicted value of the combustible gas concentration at the next moment;
[0219] Set the training objective function of the combustible gas concentration prediction network. The combustible gas concentration prediction network objective function F 2 for:
[0220]
[0221] in:
[0222] N represents the total number of data in the training set.
[0223] L represents the time series range of each combustible gas concentration time series data;
[0224] s i,z In the training set s i,z+1 The actual combustible gas concentration value;
[0225] For the i,0 ,s i,1 ,…,s i,z ) as the input of the combustible gas concentration prediction network, which outputs the predicted value of the combustible gas concentration at time z+1;
[0226] The constraints of the combustible gas concentration prediction network training objective function are:
[0227] w 1 +w 2 =1
[0228] w 1 ≥w 2
[0229] in:
[0230] w 1 is the weight of the high channel hidden layer in the dual channel hidden layer, w 2 is the weight of the low channel hidden layer in the dual channel hidden layer;
[0231] It needs to be explained that the high-channel hidden layer and the low-channel hidden layer respectively output feature maps of the time series data, the feature maps are weighted and combined according to the respective weights of the two channels, and the output layer maps and outputs the predicted values of the weighted feature maps.
[0232] S6: The objective function is trained and optimized using an improved neural dynamics method to solve the weight parameters of the combustible gas concentration prediction network. The solved weight parameters are used as weight optimization parameters of the combustible gas concentration prediction network to obtain an optimized combustible gas concentration prediction network.
[0233] In the step S6, the objective function is trained and optimized using an improved neural dynamics method to obtain the weight parameters of the combustible gas concentration prediction network, including:
[0234] The objective function is trained and optimized using an improved neural dynamics method, and the training optimization process is as follows:
[0235] According to the set combustible gas concentration prediction network training objective function and constraints, a weight parameter solution function is constructed:
[0236] L(w 1 ,w 2 ,λ,μ)=F 2 +λ T [(w 1 ) p -(w 2 ) p ]+μ T (w 1 +w 2 -1)
[0237] in:
[0238] T is transpose;
[0239] λ is used to constrain w 1 ≥w 2 The Lagrange multiplier of ;
[0240] μ is used to constrain w 1 +w 2 =1 Lagrange multiplier;
[0241] p is the order of the weight parameter solution function, which is set to 3;
[0242] Then the solution of the weight parameter is:
[0243]
[0244] The weight parameter solution function will be minimized As the weight of the high channel hidden layer in the dual channel hidden layer, the weight of the low channel hidden layer is The combustible gas concentration prediction network is obtained after parameter optimization;
[0245] Exemplarily, the combustible gas concentration prediction network after parameter optimization is constructed as a combustible gas concentration prediction network module.
[0246] S7: Preprocess the combustible gas detector time series values, input the preprocessed combustible gas detector time series values into the optimized combustible gas concentration prediction network, predict the combustible gas detector data at the next moment, use the predicted and updated combustible gas detector time series values as the input of the combustible gas concentration prediction network, repeat the process to obtain the combustible gas concentration prediction value after the user-set prediction times, and if the prediction value is greater than the specified threshold, an alarm is issued, otherwise no alarm is issued.
[0247] In the step S7, the optimized combustible gas concentration prediction network module is installed in the combustible gas detector, the time series value of the combustible gas detector is obtained, and the time series value is preprocessed, and the preprocessed combustible gas detector time series value is input into the optimized combustible gas concentration prediction network, and the combustible gas detector data at the next moment is predicted, and the predicted and updated combustible gas detector time series value is used as the input of the combustible gas concentration prediction network, and the process is repeated to obtain the combustible gas concentration prediction value after the user sets the number of predictions, including:
[0248] For details, see Figure 3 The following is the leakage risk prediction process based on combustible gas detectors:
[0249] S71, installing the optimized combustible gas concentration prediction network module into the combustible gas detector, obtaining the time series value of the combustible gas detector, and preprocessing the time series value, wherein the preprocessing method is a null value filling method;
[0250] S72, input the preprocessed combustible gas detector time series value into the optimized combustible gas concentration prediction network, predict the combustible gas detector data at the next moment, use the predicted and updated combustible gas detector time series value as the input of the combustible gas concentration prediction network, and repeat the process to obtain the combustible gas concentration prediction value after the user sets the number of predictions;
[0251] S73. If the predicted value of the combustible gas concentration is greater than a specified threshold, an alarm is issued; otherwise, no alarm is issued.
[0252] Embodiment 2:
[0253] like Figure 4 , is a functional module diagram of an intelligent early warning device for capturing numerical changes of a combustible gas detector provided by an embodiment of the present invention, which can implement the intelligent early warning method in Example 1.
[0254] The intelligent early warning device 100 for capturing the value change of the combustible gas detector of the present invention can be installed in an electronic device. According to the functions to be implemented, the intelligent early warning device for capturing the value change of the combustible gas detector can include a combustible gas concentration acquisition module 101, a data processing module 102, a combustible gas concentration prediction network training module 103 and a combustible gas concentration prediction network module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0255] The combustible gas concentration acquisition module 101 is used to capture the real-time value and historical data of the combustible gas detector;
[0256] The data processing module 102 is used to pre-process the time series data captured by the combustible gas detector, and upload the pre-processed time series data to the combustible gas concentration prediction network module 104;
[0257] The combustible gas concentration prediction network training module 103 is used to set the network structure of the combustible gas concentration prediction network according to the set fitness function, and perform parameter optimization training on the combustible gas concentration prediction network according to the training objective function to obtain the combustible gas concentration prediction network after parameter optimization, and install the combustible gas concentration prediction network into the combustible gas concentration prediction network module;
[0258] The combustible gas concentration prediction network module 104 is used to receive the pre-processed time series data uploaded by the data processing module, use the combustible gas concentration prediction network to predict the combustible gas detector data at the next moment, use the predicted and updated combustible gas detector time series value as the input of the combustible gas concentration prediction network, repeat the process to obtain the combustible gas concentration prediction value after the user sets the number of predictions, and if the combustible gas concentration prediction value is greater than the specified threshold, an alarm is issued, otherwise no alarm is issued.
[0259] In detail, each module in the intelligent early warning device 100 for capturing the value change of the combustible gas detector in the embodiment of the present invention adopts the same method as above when in use. Figure 1 The intelligent early warning method for capturing the numerical changes of combustible gas detectors is the same technical means as described in the text and can produce the same technical effects, so it will not be repeated here.
[0260] Embodiment 3:
[0261] like Figure 5 , which is a schematic diagram of the structure of an electronic device for implementing an intelligent early warning method for capturing changes in the values of combustible gas detectors provided by an embodiment of the present invention.
[0262] The electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an intelligent early warning program 12 for changes in the value of a combustible gas detector.
[0263] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card, etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the intelligent early warning program 12 of the value change of the combustible gas detector, but also be used to temporarily store data that has been output or is to be output.
[0264] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as intelligent early warning programs for changes in the value of combustible gas detectors) stored in the memory 11, and calls data stored in the memory 11, so as to execute various functions of the electronic device 1 and process data.
[0265] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0266] Figure 5 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0267] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0268] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0269] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0270] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0271] The intelligent early warning program 12 for the value change of the combustible gas detector stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0272] Collect historical data of combustible gas detectors and construct a combustible gas concentration time series data set;
[0273] Preprocessing the combustible gas concentration time series data in the constructed data set to obtain preprocessed combustible gas concentration time series data, wherein the preprocessed combustible gas concentration time series data set is a training data set for the combustible gas concentration prediction network;
[0274] Performing wavelet packet decomposition on the preprocessed combustible gas concentration time series data, and constructing a fitness function of a combustible gas concentration prediction network, wherein the input of the fitness function is the combustible gas concentration time series data after wavelet packet decomposition;
[0275] The improved artificial jellyfish search algorithm is used to optimize the fitness function and obtain the network structure parameters for combustible gas concentration prediction.
[0276] Instantiate the combustible gas concentration prediction network based on the solved combustible gas concentration prediction network structure parameter values, and determine the combustible gas concentration prediction network objective function;
[0277] The objective function is trained and optimized using an improved neural dynamics method to solve the weight parameters of the combustible gas concentration prediction network. The solved weight parameters are used as the weight optimization parameters of the combustible gas concentration prediction network to obtain the optimized combustible gas concentration prediction network.
[0278] The combustible gas detector timing values are preprocessed and input into the optimized combustible gas concentration prediction network to predict the combustible gas detector data at the next moment. The predicted and updated combustible gas detector timing values are used as the input of the combustible gas concentration prediction network. The process is repeated to obtain the predicted value of the combustible gas concentration after the user sets the number of predictions. If the predicted value is greater than the specified threshold, an alarm is issued, otherwise no alarm is issued.
[0279] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 5 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0280] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method 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, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0281] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0282] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An intelligent early warning method for capturing the value changes of combustible gas detectors, characterized in that: The method comprises: S1: Collect historical data of combustible gas detectors and construct a combustible gas concentration time series data set; S2: preprocessing the combustible gas concentration time series data in the constructed data set to obtain preprocessed combustible gas concentration time series data, wherein the preprocessed combustible gas concentration time series data set is a training data set for the combustible gas concentration prediction network; S3: performing wavelet packet decomposition on the preprocessed combustible gas concentration time series data, and constructing a fitness function of the combustible gas concentration prediction network, wherein the input of the fitness function is the combustible gas concentration time series data after wavelet packet decomposition; S4: The improved artificial jellyfish search algorithm is used to optimize and solve the fitness function to obtain the network structure parameters for combustible gas concentration prediction; S5: instantiating the combustible gas concentration prediction network based on the solved combustible gas concentration prediction network structure parameter values, and determining the combustible gas concentration prediction network objective function; S6: Using the improved neural dynamics method to train and optimize the objective function, the weight parameters of the combustible gas concentration prediction network are solved, and the solved weight parameters are used as the weight optimization parameters of the combustible gas concentration prediction network to obtain the optimized combustible gas concentration prediction network; S7: Preprocess the combustible gas detector time series values, input the preprocessed combustible gas detector time series values into the optimized combustible gas concentration prediction network, predict the combustible gas detector data at the next moment, use the predicted and updated combustible gas detector time series values as the input of the combustible gas concentration prediction network, repeat the process to obtain the combustible gas concentration prediction value after the user-set prediction times, and if the prediction value is greater than the specified threshold, an alarm is issued, otherwise no alarm is issued.
2. The intelligent early warning method for capturing the value change of the combustible gas detector according to claim 1 is characterized in that: The step S1 of obtaining a combustible gas concentration time series data set includes: Obtain a combustible gas concentration time series data set, wherein the combustible gas concentration time series data set includes N combustible gas concentration time series data, and the time series range of each combustible gas concentration time series data is L. The format of the combustible gas concentration time series data set S is: S={s1,s2,…,s i ,…,s N } s i =(s i,0 ,s i,1 ,s i,2 ,…,s i,L ) in: s i represents the i-th group of combustible gas concentration time series data in the combustible gas concentration time series data set, s i,0 Indicates i The combustible gas concentration value at the initial time, s i,L Indicates i The combustible gas concentration value at the end of the middle moment, the time difference between adjacent data values is 1 second.
3. The intelligent early warning method for capturing the value change of the combustible gas detector according to claim 2 is characterized in that: In the step S2, the combustible gas concentration time series data in the training data set is preprocessed, including: Traverse all the combustible gas concentration time series data in the combustible gas concentration time series data set S, mark the null value of each combustible gas concentration time series data, and fill the marked null value to obtain the preprocessed combustible gas concentration time series data. The null value filling formula for the data at any time point is: in: s i,ρ′ is the non-null value before the time point ρ in the combustible gas concentration time series data; s i,ρ″ is the non-null value after the time point ρ in the combustible gas concentration time series data; L represents the time series range of each combustible gas concentration time series data; If i,ρ If it is a null value, k represents s i,ρ For i The kth null value in ; By performing null-filling processing on each group of combustible gas concentration time series data, the preprocessed combustible gas concentration time series data set S′ is obtained: S′={s1′,s2′,…,s i ′,…,s′ N } in: s i ′ is any set of combustible gas concentration time series data after preprocessing.
4. The intelligent early warning method for capturing the value change of the combustible gas detector according to claim 3 is characterized in that: In the step S3, the combustible gas concentration time series data in the pre-processed combustible gas concentration time series data set is subjected to wavelet packet decomposition, including: The wavelet packet decomposition of the pre-processed combustible gas concentration time series data comprises: The translation parameter b of the wavelet packet is fixed, and the Haar wavelet function ω(t) is used to transform the combustible gas concentration time series data s i 'Perform wavelet packet decomposition to obtain wavelet packet high-frequency decomposition results of different scales. The wavelet packet high-frequency decomposition formula is: in: d(s i ′,a,1) is the combustible gas concentration time series data s i ′The high-frequency decomposition result of wavelet packet at scale a; b is the translation parameter of the wavelet function ω(t), which is set to 0.5; a is the scale parameter of the wavelet function ω(t), a∈{a′,a′-1,a′-2,a′-3}, a′ is the maximum decomposition scale; t represents the combustible gas concentration time series data s i ′; fix the translation parameter b of the wavelet packet, use the Haar wavelet function ω(t) to perform wavelet packet decomposition on the combustible gas concentration time series data, and obtain the wavelet packet low-frequency decomposition results of different scales. The wavelet packet low-frequency decomposition formula is: in: d(s i ′,a″,2) is the combustible gas concentration time series data s i ′ is the wavelet packet low-frequency decomposition result on scale a″, a″∈{1,2,3,4}; The wavelet packet high frequency decomposition result d(s i ′,a,1) and the wavelet packet low-frequency decomposition result d(s i ′,a″,2) as the wavelet packet decomposition result d i =[d(s i ′,a,1),d(s i ′,a″,2)], then the wavelet packet decomposition result set corresponding to the N groups of training data in the preprocessed combustible gas concentration time series data set is: D={d1,d2,…,d i ,…,d N } in: d i is the combustible gas concentration time series data set of the i-th group in the preprocessed combustible gas concentration time series data set s i The corresponding wavelet packet decomposition result of ′.
5. The intelligent early warning method for capturing the value change of the combustible gas detector according to claim 4, characterized in that: The fitness function of the combustible gas concentration prediction network is constructed in the S3 step, including: The constructed combustible gas concentration prediction network fitness function F1 is: in: To i 'Network output value after input into combustible gas concentration prediction network; is the output value of the lth neural unit in the mth hidden layer, NN(·) is the combustible gas concentration prediction network model; m is the number of hidden layers of the combustible gas concentration prediction network; l is the maximum number of neural units in the hidden layer; α is the learning rate of the combustible gas concentration prediction network.
6. An intelligent early warning method for capturing the value change of a combustible gas detector as described in any one of claims 4-5, characterized in that: In the step S4, the improved artificial jellyfish search algorithm is used to optimize and solve the fitness function to obtain the combustible gas concentration prediction network structure parameters, wherein the input of the fitness function is the combustible gas concentration time series data after wavelet packet decomposition, including: The improved artificial jellyfish search algorithm is used to optimize and solve the fitness function, and the solution process of the fitness function is as follows: 1) Set the jellyfish population to n max , the maximum number of iterations of the algorithm is Max, and it uses the generated n max jellyfish, the spatial position of any e-th jellyfish is X e =(x 1e ,x 2e ,x 3e ), the spatial position of each jellyfish is a combustible gas concentration prediction network of a certain specification, x 1e >1 corresponds to the number of hidden layers of the combustible gas concentration prediction network, x 2e >10 corresponds to the maximum number of neurons in the hidden layer, x 3e ∈(0,1] corresponds to the learning rate of the combustible gas concentration prediction network, X0 is a set of randomly generated jellyfish positions, then n max The spatial position of the jellyfish is: X e+1 =ηX e |0.5-X e |,e+1≤n max in: η is the jellyfish position parameter, which is set to 0.6; Set the number of iterations of the current algorithm to n d , initialize the current algorithm iteration number to 0; 2) Set n max The spatial position of the jellyfish is n max The network structure, in the nth d In the algorithm iteration, the wavelet packet decomposition result is input to any e-th spatial position In the network of the corresponding specification, the fitness function outputs its fitness value 3) The nth d Minimum fitness value in algorithm iteration The corresponding spatial position is taken as the optimal spatial position of the current iteration 4) Calculate the current number of iterations n d The threshold value f(n d ): in: rand(0,1) randomly generates a number between 0 and 1; If f(n d ) is greater than 0.5, then at the current iteration number n d In , the spatial position update formula of each jellyfish is: Otherwise, the spatial position update formula of each jellyfish is: in: U1 is the upper bound of the mobile search of the jellyfish spatial position, and U2 is the lower bound of the mobile search of the jellyfish spatial position. The lower bound of the mobile search of the jellyfish spatial position U2 is a two-dimensional plane with a Z-axis coordinate of 0, and the upper bound of the mobile search of the jellyfish spatial position is a two-dimensional plane with a Z-axis coordinate greater than 1 but infinitely close to 1; 5) Let n d =n d +1; 6) Determine n d Whether it satisfies n d ≥Max, if satisfied, calculate the nth d After iteration, the fitness value is the minimum Corresponding spatial position The network structure corresponding to the spatial position is used as the combustible gas concentration prediction network structure; otherwise, return to step 2).
7. The intelligent early warning method for capturing the value change of the combustible gas detector according to claim 1 is characterized in that: Determining the combustible gas concentration prediction network objective function in the step S5 includes: A combustible gas concentration prediction network is constructed according to the combustible gas concentration prediction network structure determined above. The constructed combustible gas concentration prediction network includes a wavelet packet decomposition input layer, a dual-channel hidden layer, and an output layer. The wavelet packet decomposition input layer is used to perform wavelet packet decomposition processing on the time series data input to the network, and obtain the wavelet packet high-frequency decomposition result and the wavelet packet low-frequency decomposition result respectively. The two are respectively input into the high-channel hidden layer and the low-channel hidden layer for convolution processing, and the softmax function is used to output the predicted value of the dual-channel hidden layer output result in the output layer to obtain the predicted value of the combustible gas concentration at the next moment; The training objective function of the combustible gas concentration prediction network is set. The combustible gas concentration prediction network objective function F2 is set as: in: s i,z In the training set s i,z+1 The actual combustible gas concentration value; N represents the total number of data in the training set. L represents the time series range of each combustible gas concentration time series data; For the i,0 ,s i,1 ,…,s i,z ) is used as the input of the combustible gas concentration prediction network, and the combustible gas concentration prediction network outputs the predicted value of the combustible gas concentration at time z+1; The constraints of the combustible gas concentration prediction network training objective function are: w1+w2=1 w1 ≥ w2 in: w1 is the weight of the high channel hidden layer in the dual channel hidden layer, and w2 is the weight of the low channel hidden layer in the dual channel hidden layer.
8. The intelligent early warning method for capturing the value change of the combustible gas detector according to claim 7, characterized in that: In the step S6, the objective function is trained and optimized using an improved neural dynamics method to obtain the weight parameters of the combustible gas concentration prediction network, including: The objective function is trained and optimized using an improved neural dynamics method, and the training optimization process is as follows: According to the set combustible gas concentration prediction network training objective function and constraints, a weight parameter solution function is constructed: L(w1,w2,λ,μ)=F2+λ T [(w1) p -(w2) p ]+μ T (w1+w2-1) in: T is transpose; λ is the Lagrange multiplier used to constrain w1≥w2; μ is the Lagrange multiplier used to constrain w1+w2=1; p is the order of the weight parameter solution function, which is set to 3; Then the solution of the weight parameter is: The weight parameter solution function will be minimized As the weight of the high channel hidden layer in the dual channel hidden layer, the weight of the low channel hidden layer is The combustible gas concentration prediction network is obtained after parameter optimization.
9. The intelligent early warning method for capturing the value change of the combustible gas detector according to claim 1, characterized in that: In the step S7, the optimized combustible gas concentration prediction network module is installed in the combustible gas detector, the time series value of the combustible gas detector is obtained, and the time series value is preprocessed, and the preprocessed combustible gas detector time series value is input into the optimized combustible gas concentration prediction network, and the combustible gas detector data at the next moment is predicted, and the predicted and updated combustible gas detector time series value is used as the input of the combustible gas concentration prediction network, and the process is repeated to obtain the combustible gas concentration prediction value after the user sets the number of predictions, including: Installing the optimized combustible gas concentration prediction network module to the combustible gas detector, obtaining the time series value of the combustible gas detector, and preprocessing the time series value, wherein the preprocessing method is a null value filling method; The pre-processed combustible gas detector time series value is input into the optimized combustible gas concentration prediction network to predict the combustible gas detector data at the next moment, and the predicted and updated combustible gas detector time series value is used as the input of the combustible gas concentration prediction network. The process is repeated to obtain the combustible gas concentration prediction value after the user sets the number of predictions. If the predicted value of the combustible gas concentration is greater than the specified threshold, an alarm will be issued, otherwise no alarm will be issued.
10. An intelligent early warning device for capturing the value changes of combustible gas detectors, characterized in that: The device comprises: Combustible gas concentration acquisition module, used to capture the real-time values and historical data of combustible gas detectors; The data processing module is used to pre-process the time series data captured by the combustible gas detector, and upload the pre-processed time series data to the combustible gas concentration prediction network module; The combustible gas concentration prediction network training module is used to set the network structure of the combustible gas concentration prediction network according to the set fitness function, and perform parameter optimization training on the combustible gas concentration prediction network according to the training objective function to obtain the combustible gas concentration prediction network after parameter optimization, and install the combustible gas concentration prediction network into the combustible gas concentration prediction network module; The combustible gas concentration prediction network module is used to receive the pre-processed time series data uploaded by the data processing module, use the combustible gas concentration prediction network to predict the combustible gas detector data at the next moment, use the predicted and updated combustible gas detector time series value as the input of the combustible gas concentration prediction network, repeat the process to obtain the combustible gas concentration prediction value after the user sets the number of predictions, if the combustible gas concentration prediction value is greater than the specified threshold, an alarm is issued, otherwise no alarm is issued, so as to realize an intelligent early warning method for capturing the value changes of the combustible gas detector as described in claim 1.
Citation Information
Patent Citations
Gas concentration self-adaptive control method of gas generator set
CN110955273A
Gas concentration prediction method, system and device and storage medium thereof
CN112530529A