Training method and device of gate flow prediction model and related equipment

By iteratively training the historical data using LSTM, the problem of low gate flow prediction accuracy in the prior art is solved, and higher prediction accuracy and accuracy are achieved.

CN119442897APending Publication Date: 2025-02-14POWERCHINA HUADONG ENG CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411561427.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prediction accuracy of the method of calculating gate flow through empirical formulas in the prior art is low.

Method used

By obtaining the training sample set of historical gate pass data and historical gate traffic, the long and short-term memory network LSTM is iteratively trained, and the hyperparameters of the LSTM are adjusted to improve prediction accuracy.

Benefits of technology

Improve the accuracy and accuracy of gate flow prediction, and can more effectively mine implicit features in the time series.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442897A_ABST
    Figure CN119442897A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of water conservancy projects, in particular to a gate flow prediction model training method and device and related equipment. The method comprises the following steps: acquiring a training sample set comprising historical lockage data and historical gate flow; iteratively training the long short-term memory network LSTM through the training sample set; wherein any round of training process comprises the following steps: determining an adjustment value for indicating the adjustment amplitude of the value of a hyper-parameter according to a historical value used by the hyper-parameter of the LSTM in the last training process; determining a target value of the hyper-parameter according to the adjustment value; inputting the training sample set into the LSTM of which the hyper-parameter value is a target value; and if the prediction effect index of the current round meets a training stop condition, determining the LSTM as a gate flow prediction model. The technical problem that in the prior art, a method for calculating the gate flow through empirical formula calculation is low in prediction accuracy can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of water conservancy engineering, and in particular to a training method, device and related equipment for a gate flow prediction model. Background Art

[0002] In water conservancy projects, radial gates can regulate the water flow through the gates by controlling their opening and closing degrees. In practical applications, flood control scheduling and optimization of water resource allocation can be carried out by predicting the gate flow of radial gates at future times. Therefore, the prediction of gate flow is very important.

[0003] In the prior art, the prediction of gate flow is mainly calculated through the empirical formula of flow coefficient. According to practical experience, the existing method of calculating gate flow through empirical formula has the technical problem of low prediction accuracy. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a training method, device and related equipment for a gate flow prediction model to solve the technical problem that the method of calculating gate flow through empirical formulas in the prior art has low prediction accuracy.

[0005] In a first aspect, the present application provides a method for training a gate flow prediction model, the method comprising:

[0006] Obtain a training sample set including historical gate passing data and historical gate flow;

[0007] Through the training sample set, iterative training is performed on the long short-term memory network LSTM;

[0008] Among them, the training process of any round includes:

[0009] Determine, according to the historical value of the hyperparameter of the LSTM used in the last training process, an adjustment value for indicating the adjustment amplitude of the value of the hyperparameter;

[0010] Determining a target value of the hyperparameter according to the adjustment value;

[0011] Inputting the training sample set into the LSTM whose hyperparameter value is the target value;

[0012] If the prediction effect index of the current round meets the training stop condition, the LSTM is determined as the gate flow prediction model.

[0013] In a second aspect, the present application provides a training device for a gate flow prediction model, the device comprising: a sample acquisition module and a model training module;

[0014] The sample acquisition module is used to acquire a training sample set including historical gate passing data and historical gate flow;

[0015] The model training module is used to perform iterative training on the long short-term memory network LSTM through a training sample set;

[0016] Among them, the training process of any round includes:

[0017] Determine, according to the historical value of the hyperparameter of the LSTM used in the last training process, an adjustment value for indicating the adjustment amplitude of the value of the hyperparameter;

[0018] Determining a target value of the hyperparameter according to the adjustment value;

[0019] Inputting the training sample set into the LSTM whose hyperparameter value is the target value;

[0020] If the prediction effect index of the current round meets the training stop condition, the LSTM is determined as the gate flow prediction model.

[0021] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory is used to store an application program, and the processor runs or executes a software program stored in the memory so that the electronic device implements the above-mentioned training method of the gate flow prediction model.

[0022] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes are used to implement the above-mentioned training method of the gate flow prediction model.

[0023] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device implements the above-mentioned training method for the gate flow prediction model.

[0024] Beneficial effects:

[0025] The present application provides a training method for a gate flow prediction model, the method comprising: obtaining a training sample set including historical gate passing data and historical gate flow; iteratively training a long short-term memory network LSTM through the training sample set; wherein the training process of any round comprises: determining an adjustment value indicating an adjustment range of a value of a hyperparameter according to a historical value of a hyperparameter of the LSTM used in a previous training process; determining a target value of the hyperparameter according to the adjustment value; inputting the training sample set into the LSTM whose value of the hyperparameter is the target value; if the prediction effect index of the current round meets the training stop condition, determining the LSTM as a gate flow prediction model;

[0026] In summary, this application obtains a gate flow prediction model by training LSTM using a training sample set, so that the gate flow prediction model can mine implicit features hidden in the time series. Compared with the existing technology, it can effectively improve the accuracy and precision of gate flow prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. The following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 A flow chart of a training method for a gate flow prediction model provided in an embodiment of the present application;

[0029] Figure 2 A schematic diagram of an LSTM provided in an embodiment of the present application;

[0030] Figure 3 A schematic diagram of a single LSTM memory unit provided in an embodiment of the present application;

[0031] Figure 4 A schematic diagram of a training device for a gate flow prediction model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0033] This application provides a training method for a gate flow prediction model, such as Figure 1 As shown, Figure 1 The flow chart of the training method of the gate flow prediction model provided in the embodiment of the present application includes: S100 to S200, and the details are as follows:

[0034] S100: Obtain a training sample set including historical gate passing data and historical gate flow.

[0035] Specifically, the embodiment of the present application uses a long short-term memory neural network (LSTM) as the neural network structure of the gate flow prediction model; LSTM is a special RNN (Recurrent Neural Network); Figure 2 As shown, Figure 2 A schematic diagram of LSTM provided for an embodiment of the present application, wherein the network structure of LSTM includes: an input layer, an LSTM layer and an output layer, wherein the output layer includes a fully connected layer; the input layer nodes have a sequence property, and the features of each time can be assigned to each node in chronological order, and the data is subjected to feature extraction after passing through the LSTM layer, and a prediction result is obtained after passing through a fully connected layer.

[0036] LSTM is a recursive neural network that takes a sequence as input data, recursively in the direction of sequence evolution, and links all recurrent units in a chain. LSTM also introduces a forget gate to transform and process the data of the input gate, which can affect the input of the next memory unit and the entire model, achieving the purpose of self-learning and self-adaptation. Figure 3 As shown, Figure 3 A schematic diagram of a single LSTM memory unit provided in an embodiment of the present application.

[0037] The main function of the input gate in LSTM is to replace useless information. The input data is judged by the Sigmoid function whether the data needs to be updated, and then the data that needs to be updated is replaced, and the data that does not need to be updated remains unchanged.

[0038] The excitation output i of the input gate t and update output The formula is as follows:

[0039] i t =δ(W xi x t +W hi h t-1 +b i );

[0040]

[0041] The state neuron is a neuron in the hidden layer of the LSTM neural network, which stimulates the output The formula is as follows:

[0042]

[0043] In the formula, f t C t-1 The output of the neuron representing the previous cell state.

[0044] The forget gate in LSTM can selectively save the information stored at time t-1 in the hidden layer of the LSTM neural network according to the 0 and 1 values ​​calculated by Sigmoid; the public display of the excitation output fftt of the forget gate is as follows:

[0045] f t =δ(W xf x t +W hf h t-1 +b f );

[0046] The output gate in LSTM selectively saves the data output at the current moment in the hidden layer of the LSTM neural network according to the 0 and 1 values ​​calculated by Sigmoid. 0 means no output, and 1 means output to the next hidden layer. In this way, the output of the hidden layer is controlled. t The formula is as follows:

[0047] o t =δ(W xo x t +W ho h t-1 +b o );

[0048] Where W xf x t , W hf h t-1 They represent the network weight values ​​from the network input layer to the gate corresponding to the module at this time, W xC , W hC They represent the network weight values ​​from the output of the LSTM module at the previous moment to the corresponding gate at the current moment, W x0 x t , W h0 h t-1 The output h of the LSTM neural network neuron is respectively the network weight value from the previous cell state neuron to the corresponding gate at this moment, and bb is the deviation vector of the corresponding gate at this moment. t-1 The formula is expressed by the following formula.

[0049] h t =ot tanh(C t );

[0050] In actual operation, since the input data of LSTM is a sequence, after obtaining the historical gate passing data and the historical gate flow data, the historical gate passing data and the historical gate flow data must be integrated into a sequence.

[0051] The training sample set usually includes a large number of training samples, each training sample is a sequence, and each sequence includes historical gate passing data and historical gate flow corresponding to multiple historical moments; the gate passing data may include: water level before the gate, water level after the gate and gate opening, and the gate opening can be determined according to the gate curvature.

[0052] In actual operation, it is usually necessary to collect original data such as historical gate passing data and historical gate flow for no less than 10 years, with an interval of no less than 1 hour. Due to sensor failure, data transmission errors and human factors, after obtaining the original data, it is necessary to perform data cleaning, missing value supplementation and outlier correction on the original data to obtain a sample set that meets the standards. In addition, the sample set needs to be divided into a training sample set and a test sample set. The training sample set is used to train LSTM, and the test sample set is used to test the prediction performance of the gate flow prediction model to determine the prediction performance of the gate flow prediction model.

[0053] S200: Iterative training of the long short-term memory network LSTM is performed through the training sample set.

[0054] Among them, the training process of any round includes:

[0055] S210: Determine an adjustment value for indicating an adjustment range of a value of a hyperparameter according to a historical value of the hyperparameter of the LSTM used in a previous training process.

[0056] Specifically, in the prior art, the value of the hyperparameter of LSTM is preset, and the value of the hyperparameter remains unchanged during the iterative training process. However, in order to improve the accuracy of LSTM in predicting gate flow, in the embodiment of the present application, during the iterative training process of LSTM, in addition to updating the model parameters of LSTM, the hyperparameters of LSTM are also updated to find the optimal combination of model parameters and hyperparameters to improve the accuracy of gate flow prediction.

[0057] It should be emphasized that in the embodiments of the present application, during the iterative training process, the update process of the hyperparameter values ​​and the update process of the model parameters do not interfere with each other; in actual operation, the model parameters can be updated according to the loss function value, and the type of loss function can be determined according to actual needs, and this application does not make any specific limitations.

[0058] In one implementation, the hyperparameters that can be updated during the iterative training process include: the number of neurons in the hidden layer in the LSTM and / or the learning rate; in the embodiment of the present application, the update processes of the number of neurons in the hidden layer and the learning rate do not interfere with each other, and each hyperparameter uses a unique update process, and S210~S250 is the update process of any hyperparameter.

[0059] In one implementation, the adjustment value includes: a first adjustment value, a second adjustment value and a third adjustment value; S210 includes: step (1), the details of which are as follows:

[0060] Step (1): determining a first adjustment value, a second adjustment value, and a third adjustment value according to the historical value of the hyperparameter used in the (t-1)th training process and the first formula;

[0061] Among them, the first formula is as follows:

[0062]

[0063] In the formula, and represents the first adjustment value, the second adjustment value and the third adjustment value in sequence; and represents a random vector corresponding to the first adjustment value, the second adjustment value, and the third adjustment value; Represents historical values; and Represent the first attribute vector, the second attribute vector and the third attribute vector in sequence.

[0064] Specifically, the first formula is constructed based on optimization exploration thinking and is used to simulate the division of labor and cooperation of trained individuals in the training process in nature.

[0065] Now assume that the training population includes N training individuals, where N is a positive integer. The larger the value of N, the more accurate the determined target value. After initializing the N training individuals, the fitness value of each training individual in the iterative training task of LSTM is calculated according to the fitness function. The matrix M is constructed according to the fitness of the N training individuals. The matrix M is as follows:

[0066] M=[m1m2…m N ];

[0067] The matrix elements such as m1 in the matrix represent the fitness values ​​of the training individuals.

[0068] After the matrix M is determined, the matrix elements in the matrix M are arranged to obtain the top three training individuals, namely, training individual No. 1, training individual No. 2, and training individual No. 3, and the remaining training individual is training individual No. 4.

[0069] Training individual No. 1, training individual No. 2, training individual No. 3 and training individual No. 4 are used to simulate the four leadership levels of training individuals, representing the first optimal solution, the second optimal solution, the third optimal solution and the candidate solution respectively; the embodiment of the present application simulates the process of determining the first optimal solution, the second optimal solution and the third optimal solution as a training process, and the training process mainly includes: determining the training target, surrounding the training target and attacking the training target; because the training target is movable, the process of determining the training target and surrounding the training target will be carried out for multiple rounds, and the positions of training individual No. 1, training individual No. 2, training individual No. 3 and training individual No. 4 in the current training process are always based on the positions in the previous training process.

[0070] In each training process, the training individual No. 1, the training individual No. 2 and the training individual No. 3 lead the entire training process, and the training individual No. 4 is responsible for following. In the embodiment of the present application, it is assumed that the training individual No. 1, the training individual No. 2 and the training individual No. 3 know the position of the training target better than the training individual No. 4, so the position of the training target can be determined according to the positions of the training individual No. 1, the training individual No. 2 and the training individual No. 3. Now, according to the above thinking, the first formula is constructed, and the first public expression is as follows:

[0071]

[0072] In the formula, and represents the first adjustment value, the second adjustment value and the third adjustment value in sequence, and is used to indicate the distance between the training individual No. 1, the training individual No. 2 and the training individual No. 3 and the other training individuals in the last training process; and represents a random vector corresponding to the first adjustment value, the second adjustment value and the third adjustment value, represents a random vector,

[0073] Represents the historical value, which is used to indicate the position of training individual No. 4 during the last training process; and The first attribute vector, the second attribute vector and the third attribute vector are represented in sequence, and are used to indicate the positions of training individual No. 1, training individual No. 2 and training individual No. 3 in the previous training process.

[0074] S220: Determine a target value of the hyperparameter according to the adjustment value.

[0075] Specifically, once the adjustment value is determined, the target value can be determined based on the adjustment value, and the historical value of the hyperparameter in the LSTM is subsequently updated using the target value.

[0076] In one implementation, S220 includes: Step (2) to Step (3), the details of which are as follows:

[0077] Step (2): determining a first transition value, a second transition value and a third transition value according to the first adjustment value, the second adjustment value, the third adjustment value and the second formula;

[0078] The second formula is as follows:

[0079]

[0080] In the formula, and represents the first transition value, the second transition value and the third transition value in sequence; and represents the first coefficient vector, the second coefficient vector and the third coefficient vector respectively; ω1, ω2 and ω3 represent the first disturbance coefficient, the second disturbance coefficient and the third disturbance coefficient respectively.

[0081] Specifically, after determining the distances between training individual No. 1, training individual No. 2, and training individual No. 3 and other training individuals in the previous training process, it is determined and After that, the positions of training individuals No. 1, No. 2 and No. 3 in the previous training process can be determined. Since training individual No. 4 will follow the positions of training individuals No. 1, No. 2 and No. 3, the position of training individual No. 4 in the current training process can be determined accordingly. Now, based on the above thinking, the second formula is constructed, and the second public expression is as follows:

[0082]

[0083] In the formula, and represents the first transition value, the second transition value and the third transition value in sequence, and is used to indicate the positions of training individual No. 1, training individual No. 2 and training individual No. 3 in the previous training process;

[0084] and represents the first coefficient vector, the second coefficient vector and the third coefficient vector respectively, represents a random vector, In practical applications, when When , the training individuals in the training individual population are ready to attack the training target that they have been chasing before. Stopping the training at this time is conducive to determining the local extreme value. When , the training individuals in the training individual population are ready to give up the training target they have been chasing and attack other training targets instead. Stopping the training at this time is helpful to avoid falling into the local optimal solution.

[0085] ω1, ω2 and ω3 represent the first perturbation coefficient, the second perturbation coefficient and the third perturbation coefficient respectively. The perturbation coefficient is used to increase the range of random walk of training individuals and enhance the global exploration capability, so that the positions of training individuals No. 1, No. 2 and No. 3 are more random, and the diversity of positions in the training individual population is improved to avoid falling into the local optimal solution.

[0086] In one implementation, the first disturbance coefficient ω1 is a random number, ω1∈(0,1); between step (2) and step (3), S220 further includes: step (4) to step (5), the details of which are as follows:

[0087] Step (4): Determine the second disturbance coefficient according to the fourth formula;

[0088] The fourth formula is as follows:

[0089]

[0090] s = 0.1 (hl);

[0091] Where s, l and h are constructed coefficients, s represents the maximum step length of the training individual moving within the natural activity range, l and h represent the minimum mean and maximum mean of each dimension of the training individual in the activity range respectively; t represents the iteration round of LSTM; T represents the limit value of t.

[0092] Specifically, the fourth and fifth formulas are also constructed based on optimization exploration thinking, and are used to simulate the division of labor and cooperation of training individuals in the training process in nature; it should be emphasized that the training individual populations created by the fourth and fifth formulas are completely independent of the training individual populations created by the first, second and third formulas. In order to distinguish them, the training individuals in the training individual populations corresponding to the fourth and fifth formulas will be referred to as training individuals' in the future, which are used to distinguish them from the training individuals in the training individual populations corresponding to the first, second and third formulas.

[0093] The training individual populations corresponding to the fourth and fifth formulas also include training individuals responsible for leadership. Training individual No. 1, training individual No. 2, and training individual No. 3 are used to simulate the three leadership levels of training individuals, corresponding to the first disturbance coefficient ω1, the second disturbance coefficient ω2, and the third disturbance coefficient ω3 respectively.

[0094] The fourth formula is created based on the action of training individual '2' in the training individual population, and the fourth formula is as follows:

[0095]

[0096] s = 0.1 (hl);

[0097] Where s, l and h are constructed coefficients, s represents the maximum step length of training individual 2 moving within the natural activity range, l and h represent the minimum mean and maximum mean of each dimension of training individual 2 in the activity range respectively; t represents the iteration round of LSTM; T represents the limit value of t.

[0098] Step (5): Determine the third disturbance coefficient according to the fifth formula;

[0099] The fifth formula is as follows:

[0100]

[0101] Where t represents the iteration round of LSTM; T represents the limit value of t.

[0102] Specifically, the fifth formula is created based on the action of training individual 'No. 3' in the population of training individuals.

[0103] Step (3): determining a target value according to the first transition value, the second transition value, the third transition value and the third formula;

[0104] Among them, the third formula is as follows:

[0105]

[0106] In the formula, represents the target value; represents a random vector,

[0107] Specifically, the embodiment of the present application updates the position of training individual No. 4 by calculating the average of the positions of training individual No. 1, training individual No. 2, and training individual No. 3; It can balance the mutual influence between global search and local search and improve the convergence speed and accuracy of training.

[0108] In actual operation, if the training group including training individual No. 1, training individual No. 2, training individual No. 3 and training individual No. 4 still needs to undergo the next training process, the fitness value of each training individual in the iterative training task of LSTM is recalculated according to the fitness function, and the training individual No. 1, training individual No. 2, training individual No. 3 and training individual No. 4 in the training group are re-determined according to the fitness value, and the above process is repeated.

[0109] S230: Input the training sample set into the LSTM whose hyperparameter value is the target value.

[0110] S240: Determine whether the prediction effect index of the current round meets the training stop condition.

[0111] Specifically, in the embodiment of the present application, in order to avoid wasting time due to too many training times to train LSTM and to avoid overfitting of LSTM, the embodiment of the present application introduces an early stopping mechanism, that is, when the accuracy of LSTM on the test sample set no longer improves after multiple training times, the training is stopped.

[0112] S250: If the prediction effect index of the current round meets the training stop condition, LSTM is determined as the gate flow prediction model.

[0113] Specifically, the prediction effect indicators include: root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), determination coefficient (R 2 ), relative error (Relative Error, RE) and absolute error (Absolute Error, AE), where RE and AE are used to analyze the performance of a single training sample, and the corresponding calculation formulas are as follows:

[0114]

[0115] In the formula, represents the predicted value of the gate flow prediction model; y n Indicates the annotation value of the gate flow prediction model.

[0116] In practical applications, after the gate flow prediction model is trained, the gate flow prediction model can be used to predict the gate flow at future moments; the input data is a sequence, each sequence includes historical gate flow data and historical gate flow corresponding to multiple historical moments; the gate flow data may include: water level before the gate, water level after the gate and gate opening, and the gate opening can be determined according to the gate arc, as shown below:

[0117] Q t =g([F t-nΔt ,F t-(n-1)Δt ,…,F t-Δt ]);

[0118] In the formula, Q t represents the gate flow at time t; [F t-nΔt ,F t-(n-1)Δt ,…,F t-Δt ] represents the historical gate passing data and historical gate flow at n historical moments; g represents the gate flow prediction model.

[0119] Second, the present application provides a training device for a gate flow prediction model, such as Figure 4 As shown, Figure 4 A structural diagram of a training device for a gate flow prediction model provided in an embodiment of the present application, the device comprising: a sample acquisition module 310 and a model training module 320;

[0120] A sample acquisition module 310 is used to acquire a training sample set including historical gate passing data and historical gate flow;

[0121] A model training module 320 is used to perform iterative training on a long short-term memory network LSTM through a training sample set;

[0122] Among them, the training process of any round includes:

[0123] Determine an adjustment value indicating an adjustment magnitude of a value of the hyperparameter according to a historical value of the hyperparameter used in a previous training process of the LSTM;

[0124] Based on the adjustment value, determine the target value of the hyperparameter;

[0125] Input the training sample set to the LSTM whose hyperparameter value is the target value;

[0126] If the prediction effect index of the current round meets the training stop condition, LSTM is determined as the gate flow prediction model.

[0127] In one implementation, the adjustment value includes: a first adjustment value, a second adjustment value, and a third adjustment value; the model training module 320 is further used to determine the first adjustment value, the second adjustment value, and the third adjustment value according to the historical value and the first formula used in the (t-1)th training process of the hyperparameter;

[0128] Among them, the first formula is as follows:

[0129]

[0130]

[0131] In the formula, and represents the first adjustment value, the second adjustment value and the third adjustment value in sequence; and represents a random vector corresponding to the first adjustment value, the second adjustment value, and the third adjustment value; Represents historical values; and Represent the first attribute vector, the second attribute vector and the third attribute vector in sequence.

[0132] In one implementation, the model training module 320 is further configured to determine the first transition value, the second transition value, and the third transition value according to the first adjustment value, the second adjustment value, the third adjustment value, and the second formula;

[0133] The second formula is as follows:

[0134]

[0135] In the formula, and represents the first transition value, the second transition value and the third transition value in sequence; and represents the first coefficient vector, the second coefficient vector and the third coefficient vector respectively; ω1, ω2 and ω3 represent the first disturbance coefficient, the second disturbance coefficient and the third disturbance coefficient respectively.

[0136] In one implementation, the model training module 320 is further used to determine a target value according to the first transition value, the second transition value, the third transition value and the third formula;

[0137] Among them, the third formula is as follows:

[0138]

[0139] In the formula, represents the target value; represents a random vector,

[0140] In one implementation, the first disturbance coefficient ω1 is a random number, ω1∈(0,1); the model training module 320 is further used to determine the second disturbance coefficient according to the fourth formula;

[0141] The fourth formula is as follows:

[0142]

[0143] s = 0.1 (hl);

[0144] Where s, l and h are constructed coefficients, s represents the maximum step length of the training individual moving within the natural activity range, l and h represent the minimum mean and maximum mean of each dimension of the training individual in the activity range respectively; t represents the iteration round of LSTM; T represents the limit value of t.

[0145] In one implementation, the first perturbation coefficient ω1 is a random number, ω1∈(0.1); the method further includes:

[0146] The model training module 320 is further used to determine a third disturbance coefficient according to the fifth formula;

[0147] The fifth formula is as follows:

[0148]

[0149] Where t represents the iteration round of LSTM; T represents the limit value of t.

[0150] Third, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, steps S100 to S200 provided in the above embodiment are implemented.

[0151] Fourthly, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, steps S100 to S200 of the above embodiment are executed.

[0152] Fifth, the computer program product provided in the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can refer to steps S100 to S200 of the method embodiment, which will not be repeated here.

[0153] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0154] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0155] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0156] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0157] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0158] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A training method for a gate flow prediction model, characterized in that: The method comprises: Obtain a training sample set including historical gate passing data and historical gate flow; Through the training sample set, iterative training is performed on the long short-term memory network LSTM; Among them, the training process of any round includes: Determine, according to the historical value of the hyperparameter of the LSTM used in the last training process, an adjustment value for indicating the adjustment amplitude of the value of the hyperparameter; Determining a target value of the hyperparameter according to the adjustment value; Inputting the training sample set into the LSTM whose hyperparameter value is the target value; If the prediction effect index of the current round meets the training stop condition, the LSTM is determined as the gate flow prediction model.

2. The method according to claim 1, characterized in that The adjustment value includes: a first adjustment value, a second adjustment value and a third adjustment value; the adjustment value used to indicate the adjustment amplitude of the value of the hyperparameter is determined according to the historical value used by the hyperparameter of the LSTM in the last training process, including: Determine the first adjustment value, the second adjustment value, and the third adjustment value according to the historical value and the first formula used in the (t-1)th training process of the hyperparameter; The first formula is as follows: In the formula, and represents the first adjustment value, the second adjustment value and the third adjustment value in sequence; and represents a random vector corresponding to the first adjustment value, the second adjustment value, and the third adjustment value; represents said historical value; and Represent the first attribute vector, the second attribute vector and the third attribute vector in sequence.

3. The method according to claim 2, characterized in that Determining the target value of the hyperparameter according to the adjustment value includes: Determine a first transition value, a second transition value, and a third transition value according to the first adjustment value, the second adjustment value, the third adjustment value, and a second formula; The second formula is as follows: In the formula, and represents the first transition value, the second transition value and the third transition value in sequence; and represents the first coefficient vector, the second coefficient vector and the third coefficient vector respectively; ω1, ω2 and ω3 represent the first disturbance coefficient, the second disturbance coefficient and the third disturbance coefficient respectively.

4. The method according to claim 3, characterized in that The step of determining the target value of the hyperparameter according to the adjustment value further includes: Determining the target value according to the first transition value, the second transition value, the third transition value and a third formula; Wherein, the third formula is as follows: In the formula, represents the target value; represents a random vector, 5. The method according to claim 3, characterized in that: The first disturbance coefficient ω1 is a random number, ω1∈(0,1); the method further includes: According to the fourth formula, determining the second disturbance coefficient; The fourth formula is as follows: s = 0.1 (hl); Wherein, s, l and h are constructed coefficients, s represents the maximum step length of the training individual moving within the natural activity range, l and h represent the minimum mean and maximum mean of each dimension of the training individual in the activity range respectively; t represents the iteration round of the LSTM; T represents the limit value of t.

6. The method according to claim 3, characterized in that The first disturbance coefficient ω1 is a random number, ω1∈(0.1); the method further includes: According to the fifth formula, determining the third disturbance coefficient; The fifth formula is as follows: Wherein, t represents the iteration round of the LSTM; T represents the limit value of t.

7. A training device for a gate flow prediction model, characterized in that: The device comprises: a sample acquisition module and a model training module; The sample acquisition module is used to acquire a training sample set including historical gate passing data and historical gate flow; The model training module is used to perform iterative training on the long short-term memory network LSTM through a training sample set; Among them, the training process of any round includes: Determine, according to the historical value of the hyperparameter of the LSTM used in the last training process, an adjustment value for indicating the adjustment amplitude of the value of the hyperparameter; Determining a target value of the hyperparameter according to the adjustment value; Inputting the training sample set into the LSTM whose hyperparameter value is the target value; If the prediction effect index of the current round meets the training stop condition, the LSTM is determined as the gate flow prediction model.

8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory is used to store an application program, and the processor runs or executes a software program stored in the memory so that the electronic device implements the training method of the gate flow prediction model as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes executed by a processor, and the program codes are used to implement the training method of the gate flow prediction model as described in any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device implements the training method of the gate flow prediction model as described in any one of claims 1 to 6.