Method and device for determining nitrogen oxide concentration based on BiLSTM model

Through the nitrogen oxide concentration determination method based on the BiLSTM model and the improved sparrow algorithm, the problem of inaccurate ammonia spray control of the SCR off-selling device is solved, and the accurate prediction of nitrogen oxide concentration and optimization of ammonia spraying are achieved, reducing the risks of emission exceeding the standard and operating costs.

CN120220852APending Publication Date: 2025-06-27NORTH CHINA ELECTRICAL POWER RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510254503.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art is difficult to accurately control the ammonia spraying of SCR off-pinning devices, resulting in excess of nitrogen oxide emissions or the equipment accumulation and dust accumulation, affecting the safe operation and operation costs of thermal power units.

Method used

The nitrogen oxide concentration determination method based on the BiLSTM model is used, combined with the improved sparrow algorithm, the initial concentration determination model is updated to accurately predict the nitrogen oxide concentration, thereby optimizing the ammonia spraying amount.

Benefits of technology

It improves the accuracy of nitrogen oxide concentration prediction, accurately controls ammonia spraying, avoids excessive nitrogen oxide emissions and equipment ash accumulation and blockage, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120220852A_ABST
    Figure CN120220852A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a nitrogen oxide concentration determination method and device based on a BiLSTM model, relates to the technical field of thermal power generating units, and can accurately control the ammonia injection amount. The method comprises the following steps: acquiring a data sample of nitrogen oxide concentration, wherein the data sample comprises input data and output data; based on the maximum value and the minimum value of the input data and the maximum value and the minimum value of the output data, data processing is carried out on the data sample to obtain a target data sample, the target data sample comprises a training data set and a test data set, and the training data set comprises training input data and training output data; the test data set comprises test input data and test output data; training the obtained BiLSTM model based on the training data set to obtain an initial concentration determination model; updating the initial concentration determination model based on an improved sparrow algorithm to obtain a concentration determination model; the concentration of nitrogen oxides is determined based on the concentration determination model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of thermal power units, and particularly to a method and device for determining nitrogen oxide concentration based on a BiLSTM model. Background Art

[0002] Currently, society is in an important period of energy structure transformation and upgrading. Under this background, traditional thermal power generating units not only need to meet the absorption of new energy and the rapid response of grid power demand, but also face higher challenges in environmental protection and energy-saving economy. Especially in the selective catalytic reduction (SCR) denitration device, due to the complexity of the reaction process, the requirements for control strategies become more stringent.

[0003] The energy efficiency of the SCR denitration device is affected by various factors, including the activity of the catalyst, reaction temperature, ammonia injection amount, etc. It should be noted that once the catalyst is put into use, it can usually only be replaced when it fails, and the reaction rate is controlled through the flue gas bypass. In contrast, the ammonia injection amount is the only key parameter that can be adjusted. If the ammonia injection amount is insufficient, the denitration effect will not be ideal, which may lead to excessive emissions of nitrogen oxides; while if the ammonia injection amount is too much, it may cause equipment fouling, blockage and corrosion, which not only threatens the safe operation of the boiler, but also increases the operating cost and causes secondary pollution. Therefore, how to accurately control the ammonia injection amount is a technical problem to be solved urgently. Summary of the Invention

[0004] To solve the above problems, the present application provides a method and device for determining nitrogen oxide concentration based on a BiLSTM model.

[0005] In a first aspect, a method for determining nitrogen oxide concentration based on a BiLSTM model is provided, including:

[0006] Obtaining a data sample of nitrogen oxide concentration, the data sample including input data and output data;

[0007] Performing data processing on the data sample based on the maximum value, minimum value of the input data, the maximum value and minimum value of the output data to obtain a target data sample, the target data sample including a training data set and a test data set, the training data set including training input data and training output data, and the test data set including test input data and test output data;

[0008] Training the obtained BiLSTM model based on the training data set to obtain an initial concentration determination model;

[0009] Updating the initial concentration determination model based on an improved sparrow algorithm to obtain a concentration determination model;

[0010] Determining the concentration of nitrogen oxides based on the concentration determination model.

[0011] Further, the initial concentration determination model is updated based on the improved sparrow algorithm to obtain the concentration determination model, including:

[0012] Based on the improved sparrow algorithm, the learning rate, the number of hidden layer neurons, and the number of training times of the initial concentration determination model are iteratively optimized, and the fitness values during the iterative optimization process are determined;

[0013] Based on the fitness values, the target model parameters are determined;

[0014] Based on the target model parameters, the model parameters of the initial concentration determination model are adjusted to obtain the concentration determination model.

[0015] Further, the method further includes:

[0016] The test input data in the test data set is input into the concentration determination model to generate a test output result;

[0017] Based on the test output result and the test output data corresponding to the test input data in the test data set, the evaluation result of the test output result is determined;

[0018] Based on the evaluation result, the concentration determination model is adjusted.

[0019] Further, the steps of the improved sparrow algorithm include:

[0020] Initialize the sparrow population based on cubic mapping;

[0021] Based on the butterfly optimization algorithm, the position of the discoverer in the sparrow algorithm is iteratively updated;

[0022] Based on the Lévy flight strategy, the position of the joiner in the sparrow algorithm is iteratively updated;

[0023] Based on the individual fitness of the sparrows in the sparrow population, the position of the early warning sparrow in the sparrow algorithm is updated.

[0024] Further, obtaining the data samples of nitrogen oxide concentration includes:

[0025] Based on the observed values of the input data and the output data in the initial data samples of the obtained nitrogen oxide concentration, the correlation values of the input data and the output data are determined;

[0026] Delete the input data and the output data with correlation values lower than the preset correlation threshold in the initial data samples to obtain the data samples.

[0027] In a second aspect, the present application provides a nitrogen oxide concentration determination device based on a BiLSTM model, including:

[0028] An acquisition module for acquiring data samples of nitrogen oxide concentration, where the data samples include input data and output data;

[0029] A sample module for processing the data samples based on the maximum and minimum values of the input data and the maximum and minimum values of the output data to obtain target data samples. The target data samples include a training data set and a test data set. The training data set includes training input data and training output data, and the test data set includes test input data and test output data;

[0030] A first training module for training the obtained BiLSTM model based on the training data set to obtain an initial concentration determination model;

[0031] A second training module for updating and processing the initial concentration determination model based on an improved sparrow algorithm to obtain a concentration determination model;

[0032] A determination module for determining the concentration of nitrogen oxides based on the concentration determination model.

[0033] Further, the second training module includes:

[0034] An iteration unit for performing multiple iterative optimization processes on the learning rate, the number of hidden layer neurons, and the number of training times of the initial concentration determination model based on the improved sparrow algorithm, and determining the fitness values during the multiple iterative optimization processes;

[0035] A parameter determination unit for determining target model parameters based on the fitness values;

[0036] A parameter adjustment unit for adjusting the model parameters of the initial concentration determination model based on the target model parameters to obtain a concentration determination model.

[0037] Further, the device further includes:

[0038] A test input unit for inputting the test input data in the test data set into the concentration determination model to generate a test output result;

[0039] An evaluation determination unit for determining the evaluation result of the test output result based on the test output result and the test output data corresponding to the test input data in the test data set;

[0040] A model adjustment unit for adjusting the concentration determination model based on the evaluation result.

[0041] Further, the steps of the improved sparrow algorithm include:

[0042] Initializing the sparrow population based on cubic mapping;

[0043] Iteratively updating the positions of the discoverers in the sparrow algorithm based on the butterfly optimization algorithm;

[0044] Iteratively update the positions of the joiners in the sparrow algorithm based on the Lévy flight strategy;

[0045] Update the positions of the early warning sparrows in the sparrow algorithm based on the individual fitness of the sparrows in the sparrow population.

[0046] Furthermore, the acquisition module includes:

[0047] A correlation determination unit for determining the correlation value of the input data and the output data based on the observed values of the input data and the output data in the initial data sample of the obtained nitrogen oxide concentration;

[0048] A sample determination unit for deleting the input data and the output data with correlation values lower than the preset correlation threshold in the initial data sample to obtain a data sample.

[0049] In a third aspect, the present application provides an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the nitrogen oxide concentration determination method based on the BiLSTM model are implemented.

[0050] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the nitrogen oxide concentration determination method based on the BiLSTM model are implemented.

[0051] In a fifth aspect, the present application provides a computer program product including a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the nitrogen oxide concentration determination method based on the BiLSTM model are implemented.

[0052] The technical solution provided by the embodiments of the present application selects the BiLSTM model as the basic model of the concentration determination model, can consider both past and future context information at the same time, enhances the model's processing ability for time series data, and makes it more accurate in predicting the nitrogen oxide concentration. And, by updating the initial concentration determination model through the improved sparrow algorithm, the prediction accuracy of the model is further improved, and the accuracy of controlling the ammonia injection amount is improved accordingly. Description of the Drawings

[0053] In order to more clearly illustrate some embodiments of this specification or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0054] Figure 1 Schematic flowchart of a method for determining nitrogen oxide concentration based on a BiLSTM model provided by an embodiment of the present application;

[0055] Figure 2 Schematic structural diagram of a BiLSTM model provided by an embodiment of the present application;

[0056] Figure 3 Schematic flowchart of another method for determining nitrogen oxide concentration based on a BiLSTM model provided by an embodiment of the present application;

[0057] Figure 4 Schematic flowchart of another method for determining nitrogen oxide concentration based on a BiLSTM model provided by an embodiment of the present application;

[0058] Figure 5 Schematic flowchart of another method for determining nitrogen oxide concentration based on a BiLSTM model provided by an embodiment of the present application;

[0059] Figure 6 Schematic flowchart of another method for determining nitrogen oxide concentration based on a BiLSTM model provided by an embodiment of the present application;

[0060] Figure 7 Schematic structural diagram of a device for determining nitrogen oxide concentration based on a BiLSTM model provided by an embodiment of the present application;

[0061] Figure 8 Schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners

[0062] In order to enable those skilled in the art of the present technology to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the accompanying drawings in some embodiments of this specification. Obviously, the described embodiments are only some embodiments of this specification, rather than all embodiments. Based on some embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this specification.

[0063] It should be noted that the terms "first", "second", etc. in the specification, claims and the above-mentioned drawings of this article are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or equipment. It should be noted that the acquisition, storage, use, processing, etc. of data in the technical solution of this application all comply with the relevant regulations of relevant laws and regulations.

[0064] The SCR denitration device is the ultimate control means for thermal power units to control the emission of flue gas nitrogen oxides (NO x ). In traditional technologies, in order to control the ammonia injection amount, the ammonia injection amount is often adjusted by predicting the NO x concentration at the outlet of the SCR denitration device. However, the SCR denitration reaction is a complex chemical reaction and is easily affected by many factors such as temperature and catalyst aging degree. The traditional prediction method cannot accurately predict the NO x concentration, and the accuracy is too low to effectively assist in controlling the ammonia injection amount. Therefore, a technical solution for accurately determining the NO x concentration is needed to determine the NO x concentration at the outlet of the SCR denitration device to adjust the ammonia injection amount.

[0065] Based on this, this application provides a method for determining nitrogen oxide concentration based on a BiLSTM model. As Figure 1 shown, it is a schematic flow diagram of a method for determining nitrogen oxide concentration based on a BiLSTM model provided by an embodiment of this application, including the following steps:

[0066] S101. Obtain data samples of nitrogen oxide concentration.

[0067] Among them, the data samples include input data and output data.

[0068] S102. Perform data processing on the data samples based on the maximum value, minimum value of the input data, the maximum value and minimum value of the output data to obtain target data samples.

[0069] Among them, the target data samples include a training data set and a test data set. The training data set includes training input data and training output data, and the test data set includes test input data and test output data.

[0070] S103. Train the obtained BiLSTM model based on the training data set to obtain an initial concentration determination model.

[0071] S104. Update the initial concentration determination model based on the improved sparrow algorithm to obtain a concentration determination model.

[0072] S105. Determine the concentration of nitrogen oxides based on the concentration determination model.

[0073] For the technical solution provided in the embodiment of the present application, the BiLSTM model is selected as the basic model of the concentration determination model, which can consider both past and future context information, enhance the model's processing ability for time series data, and make it more accurate in predicting the concentration of nitrogen oxides. Moreover, by using the improved sparrow algorithm to update the initial concentration determination model, the prediction accuracy of the model is further improved, and thus the accuracy of controlling the ammonia injection amount is improved.

[0074] The following explains each of the above steps:

[0075] S101. Obtain data samples of nitrogen oxide concentration.

[0076] Among them, the data samples include input data and output data. Exemplarily, the data samples of nitrogen oxide concentration can be obtained from the SCR flue gas denitration system of a 1000MW supercritical unit in a coal-fired power plant. For example, select the operation data of the unit with a load span of 500MW to 1000MW for 10 consecutive days from the DCS database of the power plant as the data samples of nitrogen oxides. The data acquisition interval in the DCS historical database is 1 second, and the data volume for 10 days is 86,400. On the premise of covering multiple operating conditions of the unit, obtain the data under steady-state conditions with the load as the reference variable and perform screening to obtain 3000 groups of data samples, select 2400 groups of data as the training data set, and 600 groups of data as the test training set. The input data in this data sample includes the SCR inlet NOx concentration, unit load, SCR inlet flue gas flow rate, SCR inlet flue gas temperature, SCR ammonia injection amount, and SCR inlet flue gas oxygen content, and the SCR outlet NOx concentration (also known as the concentration of nitrogen oxides) is used as the output data. For example, the data sample of nitrogen oxide concentration can be characterized by the following formula:

[0077] D = {(Xi, Yi)|i = 1, 2, 3, …, N}

[0078] Xi = [xi1, xi2, …, min] ∈ Rm

[0079] Yi ∈ R

[0080] In the above formula, D represents a data sample with a data size of N (also known as an observed data sample), Xi represents input data with a dimension of m (also known as an input variable), and Yi represents a one-dimensional output variable.

[0081] It should be noted that when obtaining a data sample, it is necessary to detect whether there are missing values in the data sample to avoid affecting the model accuracy during subsequent model training. When it is detected that there are missing values in the data sample, the missing values can be replaced according to a specific value in other historical operation data. This specific value can be a parameter measured by the same sensor as the missing value, with the same measurement state but different measurement times. For example, if the missing value is a parameter measured by sensor A at time A, the specific value can be a parameter measured by sensor A at time B, and time B can be the previous time of time A.

[0082] S102. Perform data processing on the data sample based on the maximum value, minimum value of the input data, the maximum value and minimum value of the output data to obtain a target data sample.

[0083] Among them, the target data sample includes a training data set and a test data set. The training data set includes training input data and training output data, and the test data set includes test input data and test output data.

[0084] It should be noted that the data sample of nitrogen oxide concentration involves a wide variety of power plant measurement data, and the dimensions and value ranges of various data in the data sample are different, which may affect the data analysis results and may lead to an increase in training time. To avoid the interference of dimension differences and different value ranges on the analysis results, first perform dimensionless processing on the data of different indicators to make various data at the same order of magnitude, and then perform data processing. Specifically, the data processing is characterized by the following formula:

[0085]

[0086] In the above formula, represents the maximum value of the input data, represents the minimum value of the input data, Y max represents the maximum value of the output data, Y min represents the minimum value of the output data. Exemplarily, the input data includes: SCR inlet NOx concentration, unit load, SCR inlet flue gas flow rate, SCR inlet flue gas temperature, SCR ammonia injection amount, and SCR inlet flue gas oxygen content, and the output data includes the concentration of nitrogen oxides at the SCR outlet.

[0087] S103. Train the obtained BiLSTM model based on the training data set to obtain an initial concentration determination model.

[0088] Among them, the Bidirectional Long Short-Term Memory (BiLSTM) model is an efficient variant of the recurrent neural network model and is widely used in tasks for processing sequential data. Its core advantage lies in being able to consider both the forward and backward context information of time series data simultaneously, thereby significantly enhancing the model's expressive ability and prediction accuracy.

[0089] Exemplarily, as Figure 2 shown, it is a schematic structural diagram of a BiLSTM model provided by this application. The design of the BiLSTM model is based on two independent LSTM layers: one processes the input sequence in the forward order, and the other processes the same sequence in the reverse order. The forward LSTM layer starts from the beginning position of the sequence and advances element by element until the end; while the reverse LSTM layer starts from the end of the sequence and processes elements backward one by one until the beginning. This design enables the BiLSTM model to access not only the information before a certain time point but also the information after it at any time point, that is, it realizes the simultaneous capture of past and future contexts.

[0090] At each time step, the LSTM layers in both directions of the BiLSTM model each generate a hidden state output. These two hidden states respectively represent the feature representations based on past information and future information at that time point. Subsequently, these two hidden states are concatenated together to form a richer and more comprehensive feature vector for subsequent tasks such as classification and regression. By integrating information from both directions, the BiLSTM model can more deeply understand the internal structure and pattern of the input sequence, thereby improving the model's performance in various sequence learning tasks.

[0091] Specifically, the BiLSTM model includes a forget gate, an input gate, and an output gate. The forget gate is mainly used to determine which information to discard from the cell state. The forget gate can read the output h t-1 at the previous moment and the input x t at the current moment, and then input a value between 0 and 1 through a related function (such as the sigmoid function). This value is used to represent which information in the cell state needs to be retained and which needs to be forgotten, specifically characterized by the following formula:

[0092] f t =σ(W f ·[h t-1 ,x t +b f )

[0093] In the above formula, b f represents the forget gate bias, and W f represents the weight gradient of the forget gate threshold structure. h t-1 represents the output at the (t - 1) moment, and ft represents the output of the forget gate, x t is the input at time t, and σ represents the sigmoid layer.

[0094] The role of the input gate is to determine which new information should be incorporated into the cell state. This process involves analyzing the output of the previous moment and the input of the current moment, and needs to be divided into two parts. One part evaluates which information is worth updating through the sigmoid function, and the other part generates a candidate cell state through the tanh function. Then, the information of the two parts is combined to update the cell state, which is specifically characterized by the following formula:

[0095]

[0096] In the above formula, C t represents the cell state at time t, i t represents the value of the input gate, C′ t represents h at time t t-1 for the preliminary feature extraction of x t , tanh represents the hyperbolic tangent activation function, b i represents the bias of the input gate, b c represents the bias in the feature extraction process, W i represents the weight gradient of the input threshold structure, W c represents the weight gradient in the feature extraction process.

[0097] The role of the input gate is to determine the output value of the BiLSTM model based on the updated cell state. First, read the output h of the previous moment t-1 and the input x of the current moment t , and determine which parts of the cell state will be output through the sigmoid function. Then, process the cell state C t through the tanh function and multiply it by the output of the output gate to obtain the final output h t , which is specifically characterized by the following formula:

[0098]

[0099] In the above formula, O t represents the output gate, b o represents the bias of the forget gate, W o represents the weight gradient of the forget threshold structure.

[0100] As a specific implementation method, the data in the training dataset is input into the BiLSTM model one by one or in batches for model training to obtain the initial concentration determination model.

[0101] S104. Update the initial concentration determination model based on the improved sparrow algorithm to obtain the concentration determination model.

[0102] In some embodiments, the learning rate, the number of hidden layer neurons, and the number of training times of the initial concentration determination model are iteratively optimized based on the improved sparrow algorithm to obtain the concentration determination model.

[0103] S105. Determine the concentration of nitrogen oxides based on the concentration determination model.

[0104] Exemplarily, taking the nitrogen oxides in the SCR flue gas denitration system of a 1000MW supercritical unit in a coal-fired power plant as the nitrogen oxides to be detected, the concentration of the nitrogen oxides to be detected is determined by the concentration determination model. First, it is necessary to collect the current SCR inlet NOx concentration, unit load, SCR inlet flue gas flow rate, SCR inlet flue gas temperature, SCR ammonia injection amount, and SCR inlet flue gas oxygen content of the coal-fired power plant, and input the above data into the concentration determination model to obtain the concentration of nitrogen oxides (the concentration of SCR outlet nitrogen oxides).

[0105] In some embodiments, as Figure 3 shown, the specific implementation of obtaining the data samples of nitrogen oxide concentration can be realized as the following steps:

[0106] S201. Determine the correlation values of the input data and the output data based on the observed values of the input data and the output data in the initial data samples of the obtained nitrogen oxide concentration.

[0107] Among them, the observed values of the input data and the output data represent actual data points. These data points can be actual numerical values obtained from experiments, measurements, or records. For example, when the input data and the output data in the initial data samples are regarded as multiple input variables and multiple output variables respectively, there can be multiple observed values for each input variable or output variable. It should be noted that the initial data samples include multiple input data and multiple output data corresponding to the input data, and each input data corresponds to an output data. Exemplarily, the input data includes: SCR inlet NOx concentration, unit load, SCR inlet flue gas flow rate, SCR inlet flue gas temperature, SCR ammonia injection amount, and SCR inlet flue gas oxygen content, and the output data includes the concentration of SCR outlet nitrogen oxides.

[0108] Specifically, taking an input data and the corresponding output data in the initial data samples as an example, the correlation value between the input data and the output data is determined by the obtained observed values of the input data and the output data through non-parametric statistical methods. Among them, the non-parametric statistical method can be to determine the correlation value between the input data and the output data through the Spearman correlation coefficient.

[0109] S202. Delete the input data and output data in the initial data sample whose correlation values are lower than the preset correlation threshold to obtain a data sample.

[0110] Among them, the preset correlation threshold can be set according to historical practice or according to the actual situation, and this application does not limit it here. Exemplarily, taking the initial data sample including 5 input data and 5 output data corresponding to the input data as an example, the input data are respectively denoted as: A1, A2, A3, A4, A5, and the corresponding output data are respectively denoted as: B1, B2, B3, B4, B5. The input data and output data with the same number correspond to each other. For example, the output data corresponding to the input data A1 is B1. The correlation threshold set according to historical practice is 0.7. The correlation value between A1 and B1 is 0.5, the correlation value between A2 and B2 is 0.8, the correlation value between A3 and B3 is 0.9, the correlation value between A4 and B4 is 0.6, and the correlation value between A1 and B1 is 0.8. Based on this, it is necessary to delete the input data with a correlation value lower than 0.7 and the corresponding output data, that is, delete the input data A1, A4 and the corresponding output data B1, B4 to obtain a data sample.

[0111] In this way, by deleting the data with low correlation in the initial data sample, the data quantity can be reduced. When used for model training, it can eliminate irrelevant and redundant features, making the model more concise. At the same time, it can also avoid model overfitting, improve the generalization ability of the model, and reduce the time and resource consumption of model training and prediction.

[0112] In some embodiments, as Figure 4 shown, the steps of the improved sparrow algorithm can be specifically implemented as the following steps:

[0113] S301. Initialize the sparrow population based on cubic mapping.

[0114] Exemplarily, assuming that the number of the sparrow population is n and the dimension of the variable to be optimized is m, an n×m sparrow population X is formed based on the number of the sparrow population and the dimension of the variable to be optimized, which can be characterized by the following formula:

[0115]

[0116] Since the standard sparrow search algorithm (SSA) uses a random generation method for population initialization, this may lead to uneven population distribution and seriously affect the iterative optimization process of the algorithm. To further improve the global optimization ability of the algorithm and increase the diversity of the sparrow population, cubic mapping is introduced here to perform initialization processing on the population.

[0117] The cubic mapping has better randomness, ergodicity, and regularity compared to the Logistic mapping. It can distribute the initial population more evenly, thereby improving the search efficiency and optimization performance of the algorithm. Therefore, the cubic mapping is used for population initialization to ensure the diversity and global optimization ability of the population. Specifically, the cubic mapping is characterized by the following formula:

[0118]

[0119] where i represents the number of mapping times, and x i represents the mapping value of the i-th mapping, and the range of x i is [-1, 1].

[0120] Furthermore, the initialization formula for the cubic mapping population is as follows:

[0121] x i = I min + (I max + I min ) * (x i + 1) / 2

[0122] In the above formula, I max represents the upper limit of the search space, and I min represents the lower limit of the search space.

[0123] S302. Iteratively update the position of the discoverer in the sparrow algorithm based on the butterfly optimization algorithm.

[0124] It should be noted that since the discoverer in the sparrow algorithm is responsible for the search area and direction of the entire sparrow population, the discoverer has a larger search space compared to the joiner and will optimize food acquisition. Therefore, the fitness value of the discoverer in the population is higher. The position update of the discoverer is characterized by the following formula:

[0125]

[0126] In the above formula, t represents the current iteration number, T represents the total number of iterations, represents the position information of the k-th dimension of the j-th sparrow at the t-th iteration, α represents the linearly decreasing factor, with a value in (0, 1], L represents a 1×m matrix where each element is 1, Q represents a random number following a normal distribution, R2 represents the warning value, and ST represents the safety value. When R2 < ST, it indicates that there is no predator currently, and the discoverer can search for food widely. When R2 ≥ ST, it indicates that an individual in the sparrow population has discovered a predator and sent a warning signal to the sparrow population, and the entire sparrow population will go to the safe area to forage.

[0127] As can be seen from the above, when R2 < ST, as the number of iterations increases and the iterative process progresses, the magnitude of the position update of the discoverer in the search process gradually becomes smaller and finally stabilizes, approaching 0. This phenomenon may cause the discoverer to fall into a local optimal solution, limiting its search ability and thus affecting the search for the global optimal solution.

[0128] To overcome this limitation, the present application introduces the butterfly optimization algorithm. During the iterative process, the butterfly population can sensitively perceive and migrate towards the region with the highest information concentration, and this characteristic significantly enhances the global search ability of the algorithm. The position update method of the butterfly optimization algorithm in the global search stage is introduced to improve the above-mentioned discoverer position update method. Among them, the position update formula of the butterfly algorithm is as follows:

[0129]

[0130] In the above formula, represents the position information of the j-th butterfly at the t-th iteration, represents the current global optimal position, r represents a random number between (0, 1], and f j represents the odor emitted by the j-th butterfly.

[0131] Introducing the above butterfly algorithm into the position update of the discoverer is characterized by the following formula:

[0132]

[0133] S303. Iteratively update the position of the joiner in the sparrow algorithm based on the Lévy flight strategy.

[0134] It should be noted that during the entire foraging process of the sparrow population, the joiner will continuously monitor the discoverer. When the joiner perceives that the discoverer has found food, the joiner will leave its current position to compete for food. The position update formula of the joiner is as follows:

[0135]

[0136] In the above formula, x worst represents the global worst position of the current discoverer, represents the optimal position of the discoverer at the t-th iteration, and A + = A T (AA T ) -1 , represents a 1×m matrix, and each element in this matrix is 1 or -1. When , as the joiner with lower fitness has no food, it will go to other areas to hunt.

[0137] The standard SSA algorithm has strong search ability and fast convergence speed. However, this algorithm may have the problem of premature convergence in the later stage of iteration, resulting in being trapped in the local optimal solution. To solve this problem, this application uses the Levy flight strategy to improve the position update strategy of the joiners in the SSA algorithm. The Levy flight strategy effectively expands the search range and increases the population diversity with its characteristic of long-distance random jumps. By introducing the Levy flight strategy, it can ensure that the algorithm can maintain a wide search ability in the later stage of iteration and reduce the risk of being trapped in the local optimal solution. The position update formula of the joiners introducing the Levy flight strategy is as follows:

[0138]

[0139] Among them, the Levy flight strategy levy is characterized by the following formula:

[0140]

[0141] In the above formula, both μ and v follow the normal distribution, β represents a random number between [0, 2], for example, it can be 1.5. μ and v are specifically characterized by the following formula:

[0142]

[0143] S304. Update the position of the early warning sparrows in the sparrow algorithm based on the individual fitness of the sparrows in the sparrow population.

[0144] It should be noted that the proportion of the early warning sparrows in the sparrow population is 10 - 20%, responsible for discovering danger and sending out early warning signals. Its position update formula is as follows:

[0145]

[0146] In the above formula, f j represents the individual fitness of the current sparrow, f g represents the fitness value of the current global optimum, f w represents the fitness value of the current global worst, X represents the step size control parameter, specifically a random number following the normal distribution with a mean of 0 and a variance of 1, K represents a random number between [-1, 1], and ε represents a random constant. When f j > f g , the current sparrow is at the edge position of the sparrow population and is likely to be attacked by predators. And when f j = f g , it means that the sparrows in the middle of the sparrow population are aware of the danger and need to enter other sparrow populations to reduce the risk of being preyed on.

[0147] In some embodiments, such as Figure 5As shown in the figure, updating the initial concentration determination model based on the improved sparrow algorithm to obtain the concentration determination model can be specifically implemented as the following steps:

[0148] S401. Perform multiple iterative optimizations on the learning rate, the number of hidden layer neurons, and the number of training times of the initial concentration determination model based on the improved sparrow algorithm, and determine the fitness values during the multiple iterative optimization processes.

[0149] It should be noted that the original model of the initial concentration determination model is a BiLSTM model, and its prediction accuracy mainly depends on the settings of several key hyperparameters, including the learning rate of the model, the number of hidden layer neurons, and the number of training times. Among them, the learning rate controls the step size during the model optimization process and directly affects the convergence speed and stability of the model. A higher learning rate may cause the model to skip the optimal solution during the optimization process, while a lower learning rate may lead to an overly slow convergence speed. The number of hidden layer neurons determines the complexity and learning ability of the model. The more hidden layer neurons there are, the more complex the model is, and it can capture more features and patterns, thereby improving the learning effect. However, too many neurons will increase the training time and computational complexity of the model and reduce the training efficiency. The number of training times determines the degree of learning of the model for the data during the training process. Too many training times may cause the model to overfit, that is, the model performs well on the training data but poorly on the unseen test data. On the contrary, too few training times may lead to insufficient learning of the model for the data and affect the prediction performance.

[0150] Specifically, aiming at minimizing the prediction error, use the improved sparrow algorithm to perform multiple iterative optimizations on the learning rate, the number of hidden layer neurons, and the number of training times of the model, and record the hyperparameters (the learning rate of the model, the number of hidden layer neurons, and the number of training times) and the corresponding fitness values (prediction errors) during the multiple iterative optimization processes.

[0151] S402. Determine the target model parameters based on the fitness values.

[0152] Specifically, select the hyperparameters (the learning rate of the model, the number of hidden layer neurons, and the number of training times) with the smallest fitness value, that is, the smallest prediction error, during the iterative optimization process as the target model parameters to ensure that the model has the optimal prediction accuracy.

[0153] S403. Adjust the model parameters of the initial concentration determination model based on the target model parameters to obtain the concentration determination model.

[0154] Exemplarily, take the learning rate of 0.05, the number of neurons in the hidden layer of 50, and the number of training times of 500 in the target model parameters as an example. Adjust the model parameters of the initial concentration determination model to the target model parameters, and continue to perform model training on the initial concentration determination model using the target data samples to obtain a concentration determination model that can ensure the prediction accuracy.

[0155] In some embodiments, to further verify the accuracy, generalization ability, and prevent overfitting of the concentration determination model, it is necessary to further test the concentration determination model using the test data set. Specifically, as Figure 6 shown, it can be specifically implemented as the following steps:

[0156] S501: Input the test input data in the test data set into the concentration determination model to generate test output results.

[0157] It should be noted that to ensure the accurate evaluation of the generalization ability of the concentration model, the data in the test data set is not contacted by the concentration determination model before. Input the test input data in the test data set one by one or in batches into the concentration determination model, and record the corresponding test input results.

[0158] S502: Determine the evaluation result of the test output result based on the test output result and the test output data corresponding to the test input data in the test data set.

[0159] Specifically, the root mean square error (RMSE), mean absolute percentage error (MAPE), and mean absolute error (MAE) between the test output result and the test output data can be used as the evaluation result of the test output result.

[0160] Among them, the root mean square error is determined according to the following formula:

[0161]

[0162] The mean absolute percentage error is determined according to the following formula:

[0163]

[0164] The mean absolute error is determined according to the following formula:

[0165]

[0166] In the above formula, y i represents the actual value of the nitrogen oxide concentration at the i-th outlet (the test output data corresponding to the test input data), represents the predicted value (the test output result), and N represents the size of the prediction data.

[0167] S503: Adjust the concentration determination model based on the evaluation result.

[0168] Specifically, based on the evaluation results, identify the deficiencies of the concentration determination model, such as high error rates or inconsistencies. The hyperparameters of the concentration determination model, such as the learning rate, regularization coefficient, network structure, etc., can be adjusted accordingly based on the evaluation results to improve the model performance.

[0169] For the technical solution provided in the embodiments of the present application, the BiLSTM model is selected as the basic model of the concentration determination model, which can consider both past and future context information, enhancing the model's processing ability for time series data and making it more accurate in predicting nitrogen oxide concentration. Moreover, the initial concentration determination model is updated through the improved sparrow algorithm, further improving the prediction accuracy of the model and thereby enhancing the accuracy of controlling the ammonia injection volume.

[0170] It should be noted that the information collected in the present application is information and data authorized by the user or fully authorized by all parties. For the processing of relevant data, such as collection, storage, use, processing, transmission, provision, disclosure, and application, etc., all comply with the relevant laws, regulations, and standards of relevant countries and regions, necessary confidentiality measures are taken, it does not violate public order and good customs, and corresponding operation entrances are provided for users to choose to authorize or reject.

[0171] It should be noted that for the technical solution provided in the present application, a corresponding operation entrance is provided for users to choose to agree or reject the automated decision result; if the user chooses to reject, the expert decision-making process will be entered.

[0172] Figure 7 There is provided a nitrogen oxide concentration determination device based on the BiLSTM model for the embodiments of the present application. The nitrogen oxide concentration determination device based on the BiLSTM model is used to execute the above-mentioned nitrogen oxide concentration determination method based on the BiLSTM model, such as Figure 7 As shown, the nitrogen oxide concentration determination device based on the BiLSTM model includes: an acquisition module 701, a sample module 702, a first training module 703, a second training module 704, and a determination module 705.

[0173] The acquisition module 701 is used to acquire data samples of nitrogen oxide concentration, and the data samples include input data and output data;

[0174] The sample module 702 is used to perform data processing on the data samples based on the maximum value, minimum value of the input data, the maximum value, and minimum value of the output data to obtain target data samples. The target data samples include a training data set and a test data set. The training data set includes training input data and training output data, and the test data set includes test input data and test output data;

[0175] The first training module 703 is used to train the obtained BiLSTM model based on the training dataset to obtain an initial concentration determination model;

[0176] The second training module 704 is used to update the initial concentration determination model based on the improved sparrow algorithm to obtain a concentration determination model;

[0177] The determination module 705 is used to determine the concentration of nitrogen oxides based on the concentration determination model.

[0178] Furthermore, the second training module 704 includes:

[0179] The iteration unit is used to perform multiple iterative optimization processes on the learning rate, the number of neurons in the hidden layer, and the number of training times of the initial concentration determination model based on the improved sparrow algorithm, and determine the fitness values during the multiple iterative optimization processes;

[0180] The parameter determination unit is used to determine the target model parameters based on the fitness values;

[0181] The parameter adjustment unit is used to adjust the model parameters of the initial concentration determination model based on the target model parameters to obtain a concentration determination model.

[0182] Furthermore, the device further includes:

[0183] The test input unit is used to input the test input data in the test dataset into the concentration determination model to generate a test output result;

[0184] The evaluation determination unit is used to determine the evaluation result of the test output result based on the test output result and the test output data corresponding to the test input data in the test dataset;

[0185] The model adjustment unit is used to adjust the concentration determination model based on the evaluation result.

[0186] Furthermore, the steps of the improved sparrow algorithm include:

[0187] Initializing the sparrow population based on cubic mapping;

[0188] Iteratively updating the positions of the discoverers in the sparrow algorithm based on the butterfly optimization algorithm;

[0189] Iteratively updating the positions of the joiners in the sparrow algorithm based on the Lévy flight strategy;

[0190] Updating the positions of the early warning birds in the sparrow algorithm based on the individual fitness of the sparrows in the sparrow population.

[0191] Furthermore, the acquisition module 701 includes:

[0192] A correlation determination unit, configured to determine a correlation value between input data and output data based on observed values of the input data and the output data in an initial data sample of the obtained nitrogen oxide concentration;

[0193] A sample determination unit, configured to delete the input data and the output data in the initial data sample whose correlation value is lower than a preset correlation threshold to obtain a data sample.

[0194] The technical solution provided by the embodiments of the present application selects a BiLSTM model as the basic model of the concentration determination model, which can consider both past and future context information, enhances the model's processing ability for time series data, and makes it more accurate in predicting nitrogen oxide concentration. Moreover, by using the improved sparrow algorithm to update the initial concentration determination model, the prediction accuracy of the model is further improved, and thereby the accuracy of controlling the ammonia injection amount is improved.

[0195] The systems, devices, modules or units illustrated in the above embodiments may be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer device. Specifically, the computer device may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0196] An embodiment of the present invention provides a computer device, including a memory and a processor. The memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, the steps of the above embodiments of the method for determining nitrogen oxide concentration based on the BiLSTM model are implemented. For specific descriptions, reference may be made to the embodiments of the method for determining nitrogen oxide concentration based on the BiLSTM model.

[0197] Next, refer to Figure 6 , which shows a schematic structural diagram of a computer device 600 suitable for implementing the embodiments of the present application.

[0198] As Figure 8 shown, the computer device 800 includes a central processing unit (CPU) 801, which can perform various appropriate operations and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage section 808 into the random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the computer device 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. The input / output (I / O) interface 805 is also connected to the bus 804.

[0199] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read from it can be installed in the storage section 808 as needed.

[0200] Specifically, according to an embodiment of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present invention includes a computer program product that includes a computer program tangibly embodied on a machine-readable medium, the computer program including program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811.

[0201] Computer-readable media includes both permanent and non-permanent, removable and non-removable media implemented by any method or technology for storing information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.

[0202] For convenience of description, the above-described apparatus is described by functionally dividing it into various units. Of course, when implementing the present application, the functions of the various units can be implemented in the same or multiple software and / or hardware.

[0203] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows 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 the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a means for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or a means for implementing the functions specified in multiple blocks.

[0204] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction means that implements the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or a means for implementing the functions specified in multiple blocks.

[0205] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or a means for implementing the functions specified in multiple blocks.

[0206] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, commodity or device including the said element.

[0207] In the technical solution of this application, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of national laws and regulations.

[0208] It should be noted that in the embodiments of the present application, some existing industry solutions such as certain software, components, models, etc. may be mentioned. They should be regarded as exemplary. The purpose is only to illustrate the feasibility in the implementation of the technical solution of the present application, but it does not mean that the applicant has already or necessarily used this solution.

[0209] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0210] The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0211] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description of the method embodiments.

[0212] The above description is only for the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A method for determining nitrogen oxide concentration based on a BiLSTM model, characterized in that: include: Acquire a data sample of nitrogen oxide concentration, wherein the data sample includes input data and output data; Based on the maximum value and the minimum value of the input data and the maximum value and the minimum value of the output data, the data sample is processed to obtain a target data sample, wherein the target data sample includes a training data set and a test data set, the training data set includes training input data and training output data, and the test data set includes test input data and test output data; Based on the training data set, the acquired BiLSTM model is trained to obtain an initial concentration determination model; The initial concentration determination model is updated based on the improved sparrow algorithm to obtain a concentration determination model; The concentration of nitrogen oxides is determined based on the concentration determination model.

2. The method according to claim 1, characterized in that The updating process of the initial concentration determination model based on the improved sparrow algorithm to obtain the concentration determination model includes: Based on the improved sparrow algorithm, the learning rate, the number of neurons in the hidden layer and the number of training times of the initial concentration determination model are subjected to multiple iterative optimization processes, and the fitness value during the multiple iterative optimization processes is determined; Determining target model parameters based on the fitness value; The concentration determination model is obtained by adjusting the model parameters of the initial concentration determination model based on the target model parameters.

3. The method according to claim 2, characterized in that The method further comprises: Inputting test input data in the test data set into the concentration determination model to generate a test output result; Determining an evaluation result of the test output result based on the test output result and the test output data corresponding to the test input data in the test data set; The concentration determination model is adjusted based on the evaluation results.

4. The method according to any one of claims 1 or 2, characterized in that: The steps to improve the sparrow algorithm include: Initialize the sparrow population based on cubic mapping; Iteratively update the position of the finder in the sparrow algorithm based on the butterfly optimization algorithm; Iteratively updating the position of the joiner in the sparrow algorithm based on the Levy flight strategy; The position of the early warning detector in the sparrow algorithm is updated based on the individual fitness of the sparrows in the sparrow population.

5. The method according to claim 1, characterized in that: The method of obtaining the data sample of nitrogen oxide concentration includes: Determining correlation values ​​of the input data and the output data based on observed values ​​of the input data and the output data in the acquired initial data sample of the nitrogen oxide concentration; The data sample is obtained by deleting the input data and output data whose correlation values ​​are lower than a preset correlation threshold in the initial data sample.

6. A device for determining nitrogen oxide concentration based on a BiLSTM model, characterized in that: include: An acquisition module, used to acquire a data sample of nitrogen oxide concentration, wherein the data sample includes input data and output data; A sample module, used for performing data processing on the data sample based on the maximum value and the minimum value of the input data and the maximum value and the minimum value of the output data to obtain a target data sample, wherein the target data sample includes a training data set and a test data set, wherein the training data set includes training input data and training output data, and the test data set includes test input data and test output data; A first training module, used to train the acquired BiLSTM model based on the training data set to obtain an initial concentration determination model; A second training module is used to update the initial concentration determination model based on an improved sparrow algorithm to obtain a concentration determination model; A determination module is used to determine the concentration of nitrogen oxides based on the concentration determination model.

7. The device according to claim 6, characterized in that The second training module includes: An iterative unit, used for performing multiple iterative optimization processing on the learning rate, the number of hidden layer neurons and the number of training times of the initial concentration determination model based on the improved sparrow algorithm, and determining the fitness value in the multiple iterative optimization processing process; A parameter determination unit, used for determining target model parameters based on the fitness value; A parameter adjustment unit is used to adjust the model parameters of the initial concentration determination model based on the target model parameters to obtain the concentration determination model.

8. 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 program, the steps of the method for determining the nitrogen oxide concentration based on the BiLSTM model described in any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for determining the nitrogen oxide concentration based on the BiLSTM model described in any one of claims 1 to 5 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method for determining nitrogen oxide concentration based on the BiLSTM model as described in any one of claims 1 to 5 are implemented.