River flow velocity prediction method and device based on embedded physical information

By embedding the physical information of river dynamics calculations in the LSTM river flow rate prediction model and combining with the multi-layer attention mechanism, the problem of inaccurate river flow rate prediction in the existing technology is solved, and more accurate flow rate prediction is achieved.

CN120337781AActive Publication Date: 2025-07-18HANGZHOU KAIHONG FLUID TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510796660.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-07-18
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

The existing flow velocity measurement and analysis methods based on fixed-point horizontal acoustic Doppler flowmeter are difficult to capture the long-term dependence of river flow velocity, resulting in inaccurate flow velocity prediction and the incomplete understanding of the changing patterns of river flow velocity.

Method used

By embedding the physical information calculated by river dynamics into the LSTM river flow velocity prediction model, combining the Navier-Stokes momentum equation, the conservation of mass continuity equation and the riverbed surface friction loss equation, data fusion prediction is carried out to improve the prediction accuracy.

Benefits of technology

It enhances the scientificity and rationality of river flow velocity prediction, improves the accuracy and reliability of prediction of flow velocity data, and makes up for the shortcomings of relying solely on data-driven models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120337781A_ABST
    Figure CN120337781A_ABST
Patent Text Reader

Abstract

The invention provides a river flow velocity prediction method and device based on embedded physical information, and the method comprises the following steps: obtaining continuous flow velocity data, and inputting the continuous flow velocity data into a pre-trained LSTM river flow velocity prediction model to obtain a first prediction result; physical information is calculated based on a Navier-Stokes momentum equation, a mass conservation continuity equation and a riverbed surface friction loss equation; and performing fusion prediction on the physical information and the first prediction result to obtain a second prediction result, wherein the second prediction result is a river flow velocity prediction result. According to the scheme, the physical information calculated by the river dynamics is embedded into the prediction result of the LSTM river flow velocity prediction model for re-prediction, so that the prediction precision of the river flow velocity data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hydrological forecasting, and particularly to a method and device for predicting river flow velocity based on embedded physical information. Background Art

[0002] In the field of river flow velocity monitoring and research, accurately predicting river flow velocity is of crucial significance for many aspects such as water resource management, flood control and disaster reduction, ecological protection, and shipping safety. As a commonly used flow velocity measurement device, the fixed-point horizontal acoustic Doppler current profiler plays an important role in practical applications. However, there are certain limitations in the current flow velocity measurement and analysis based on the fixed-point horizontal acoustic Doppler current profiler.

[0003] The existing applications mainly focus on the flow velocity measurement data within the current short time period. This method only captures the short-term changes in flow velocity, but ignores the long-term dependence relationship between flow velocity data. River flow velocity is not an isolated short-term change phenomenon. It is affected by a variety of complex factors, such as the topography and geomorphology of the upstream and downstream of the river, long-term meteorological condition changes, seasonal water supply differences, etc. These factors make the flow velocity data have long-term correlations and trends in the time series. Ignoring this long-term dependence relationship will lead to an inability to comprehensively and deeply understand the change law of river flow velocity, and thus affect the accurate prediction of river flow velocity.

[0004] From the perspective of the prediction model, traditional prediction methods are difficult to effectively process flow velocity data with complex spatio-temporal characteristics. Some simple statistical models cannot fully explore the potential patterns and long-term dependence information in the data; while early neural network models, such as ordinary recurrent neural networks (RNNs), although able to process sequence data, are prone to the phenomenon of gradient disappearance or gradient explosion when facing long-term dependence problems, resulting in the model being unable to learn long-distance dependence relationships and having low prediction accuracy.

[0005] With the continuous improvement of the requirements for the accuracy of flow velocity prediction in river research and related applications, the existing flow velocity measurement and prediction methods based on fixed-point horizontal acoustic Doppler current profilers are difficult to meet the actual needs. Therefore, there is an urgent need for a new method that can fully capture the long-term dependence relationship between flow velocity data, more accurately express the change law of flow velocity, so as to achieve efficient and accurate prediction of river flow velocity and provide strong support for decision-making and practice in related fields. Summary of the Invention

[0006] The embodiments of this application provide a method and device for predicting river flow velocity based on embedded physical information. By embedding the physical information calculated by river dynamics into the prediction result of the LSTM river flow velocity prediction model for re-prediction, the prediction accuracy of river flow velocity data is improved.

[0007] In a first aspect, an embodiment of the present application provides a method for predicting river flow velocity based on embedded physical information, and the method includes: Obtain continuous flow velocity data, and input the continuous flow velocity data into a pre-trained LSTM river flow velocity prediction model to obtain a first prediction result. Among them, in the LSTM river flow velocity prediction model, a historical time window is set for each LSTM unit, and the cell states of each LSTM unit within the corresponding historical time window of the current LSTM unit are weighted and fused as the cell state of the current LSTM unit; Calculate physical information based on the Navier-Stokes momentum equation, the mass conservation continuity equation, and the riverbed surface friction loss equation; Fuse and predict the physical information and the first prediction result to obtain a second prediction result, and the second prediction result is the river flow velocity prediction result.

[0008] In a second aspect, an embodiment of the present application provides a device for predicting river flow velocity based on embedded physical information, including: An acquisition module, configured to obtain continuous flow velocity data, and input the continuous flow velocity data into a pre-trained LSTM river flow velocity prediction model to obtain a first prediction result. Among them, a historical time window is set in the LSTM river flow velocity prediction model, and the cell states of each LSTM unit within the historical time window of the current LSTM unit are weighted and fused as the cell state of the current LSTM unit; A physical information calculation module, which calculates physical information based on the Navier-Stokes momentum equation, the mass conservation continuity equation, and the riverbed surface friction loss equation; A prediction module, configured to fuse and predict the physical information and the first prediction result to obtain a second prediction result, and the second prediction result is the river flow velocity prediction result.

[0009] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute a method for predicting river flow velocity based on embedded physical information.

[0010] The main contributions and innovations of the present invention are as follows: In the embodiment of the present application, a historical time window is set for each LSTM unit in the LSTM river flow velocity prediction model. By weighted-fusing the cell states of each LSTM unit within the corresponding historical time window at the current moment as the cell state at the current moment, the historical data information is fully utilized, enabling the model to better combine the past flow velocity-related situations during prediction, and improving the accuracy and reliability of the prediction. In the embodiment of the present application, the physical information calculated by river dynamics is embedded into the prediction result of the LSTM river flow velocity prediction model for re-prediction, enhancing the scientificity and rationality of the prediction result and making up for the possible deficiencies of relying solely on data-driven models. In the embodiment of the present application, a multi-layer attention mechanism is used in the LSTM flow velocity prediction model to set weights for the input gate, forget gate, and output gate of each LSTM unit respectively, enabling the model to focus more on important input features, selectively forget unimportant information, and reasonably output results, which helps to improve the adaptability of the model to different situations and the accuracy of the prediction.

[0011] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions thereof are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings: Figure 1 is a flowchart of river flow velocity prediction based on embedded physical information according to an embodiment of the present application; Figure 2 is a structural block diagram of a river flow velocity prediction device based on embedded physical information according to an embodiment of the present application; Figure 3 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0013] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. On the contrary, they are merely examples of devices and methods consistent with some aspects of one or more embodiments as detailed in the appended claims.

[0014] It should be noted that: In other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step for description in other embodiments.

[0015] Embodiment 1 An embodiment of the present application provides a method for predicting river flow velocity based on embedded physical information. By embedding the physical information calculated by river dynamics into the prediction result of the LSTM river flow velocity prediction model for re-prediction, the prediction accuracy of river flow velocity data is improved. Specifically, referring to Figure 1 , the method includes: Obtain continuous flow velocity data, and input the continuous flow velocity data into a pre-trained LSTM river flow velocity prediction model to obtain a first prediction result. Among them, in the LSTM river flow velocity prediction model, a historical time window is set for each LSTM unit, and the cell states of each LSTM unit within the corresponding historical time window of the current LSTM unit are weighted and fused as the cell state of the current LSTM unit; Calculate physical information based on the Navier-Stokes momentum equation, the mass conservation continuity equation, and the riverbed surface friction loss equation; Fuse and predict the physical information and the first prediction result to obtain a second prediction result, and the second prediction result is the river flow velocity prediction result.

[0016] In some embodiments, a multi-layer attention mechanism is used in the LSTM flow velocity prediction model to set weights for the input gate, forget gate, and output gate of each LSTM unit respectively.

[0017] Specifically, weights are set for the input gate, forget gate, and output gate based on the current input, the hidden state at the previous adjacent time, and the cell state at the previous adjacent time of each LSTM unit. The formula is expressed as follows:

[0018] Among them, is the forget gate weight, is the input gate weight, is the output gate weight, is the weight matrix, is the current input, is the hidden state at the previous adjacent time, is the cell state at the previous adjacent time, is the bias term, represents the softmax activation function.

[0019] Specifically, through multi-layer attention calculation on the current input, the hidden state at the previous adjacent time, and the cell state at the previous adjacent time, and using the softmax activation function to output a column vector containing three elements, and these three vectors are the weights of the input gate, forget gate, and output gate.

[0020] Specifically, the input gate is used to control the degree to which new information is written into the cell state, and the input gate weight is used to represent the importance of the input information at the current moment; the output gate is used to control the information content output by the cell state, and the output gate weight is used to represent the importance of the cell state information output at the current moment; the forget gate is responsible for deciding whether to retain or discard the old information in the cell state, and the forget gate weight is used to represent the retention value of the cell state information at the previous moment.

[0021] In the prediction of the water flow velocity, the current input can directly reflect the current water flow state, the hidden state at the previous adjacent time integrates the features of the intermediate time, retains the key information in the historical process, and the cell state at the previous adjacent time stores long-term memory, which is of great significance for maintaining the long-term dependence relationship between data. Therefore, determining the weights of the input gate, output gate, and forget gate based on the current input, the hidden state at the previous adjacent time, and the cell state at the previous adjacent time can ensure that the input, forgetting, and output performed by the current LSTM unit conform to the current environment, thereby enabling more accurate adjustment of the cell state information.

[0022] In some embodiments, the historical time window of this solution is set to [t - , t - 1], and the intermediate quantity formula of the cell state of the LSTM unit at the current moment is expressed as follows:

[0023] ,

[0024] where t is the current moment, is the intermediate quantity of the cell state of the LSTM unit at the current moment t, is the cell state of the LSMT unit within the historical time window, is the weight corresponding to the cell state of the LSMT unit within the historical time window, is the parameter matrix to be trained, is the length of the time window.

[0025] Specifically, by setting a historical time window to perform multi-time scale fusion on the cell state of each LSTM unit, not only the cell state at the current time step is considered, but also the cell states at multiple historical time scales are considered.

[0026] In some specific embodiments, after setting weights for the input gate, output gate, and forget gate of each LSTM unit and performing multi-time scale fusion on the cell state of each LSTM unit, the formula of the forget gate of each LSTM unit is expressed as follows:

[0027]

[0028] Wherein, represents the forget gate output, is the current input, is the preprocessing matrix parameter to be trained, is the hidden state at the previous adjacent time, is the matrix parameter to be trained, is the cell state at the previous adjacent time, is the intermediate quantity of the cell state of the LSTM unit at the current time t, is the matrix parameter to be trained is the bias parameter to be trained, represents the Sigmoid activation function, The output value of is between 0 and 1, representing the state forgetting probability, is the forget gate weight, represents the final weighted forget gate output.

[0029] Specifically, the formula of the input gate of each LSTM unit is expressed as follows:

[0030]

[0031] Wherein, is the input gate output, is the current input, is the matrix parameter to be trained, is the hidden state at the previous adjacent time, is the matrix parameter to be trained, is the cell state at the previous adjacent time, is the intermediate quantity of the cell state of the LSTM unit at the current time t, is the parameter to be trained, is the bias parameter to be trained, represents the Sigmoid activation function, The output value ranges between 0 and 1 and is used to control the writing of new information. is the input gate weight. represents the final output of the input gate after weighting.

[0032] Specifically, the output gate formula of each LSTM cell is expressed as follows:

[0033]

[0034] Among them, is the output of the output gate. is the current input. is the matrix parameter to be trained. is the hidden state at the previous adjacent time. is the matrix parameter to be trained. is the cell state at the previous adjacent time. is the intermediate quantity of the cell state of the LSTM cell at the current time t. is the parameter to be trained. is the bias parameter to be trained. represents the Sigmoid activation function. is the output gate weight. represents the final output of the output gate after weighting.

[0035] Furthermore, based on the final output of the input gate after weighting and the output of the forget gate, the update process of the cell state can be obtained as follows:

[0036] Among them, represents the cell state at the current time t based on the final output of the input gate after weighting and the output of the forget gate. is the cell state at time. represents the Hadamard product between matrices.

[0037] In some embodiments, the LSTM river flow velocity prediction model includes an LSTM encoding layer, an attention mechanism layer, an LSTM decoding layer, and a fully connected layer connected in series in sequence. The LSTM encoding layer and the LSTM decoding layer have the same structure and are both composed of multiple LSTM cells. The attention mechanism layer updates the hidden state of the current time LSTM cell by combining the hidden states of historical LSTM cells. The fully connected layer is used to output the decoding result of the LSTM decoder.

[0038] Specifically, in the attention mechanism layer, the attention weights of the current-time LSTM unit to the hidden states of each historical-time LSTM unit are calculated, and the weighted sum of the hidden states of the corresponding LSTM units based on the attention weights of the hidden states of each historical-time LSTM unit is used to obtain the historical context information of the current-time LSTM, and the historical context information of the current-time LSTM unit is used as the hidden state of the current-time LSTM unit.

[0039] Specifically, in the LSTM, the update formula for the hidden state of the LSTM hidden layer is expressed as:

[0040] Where, is the hidden state at the current time, is the output of the final output gate after weighting, represents the tanh activation function, is the cell state at the current time.

[0041] Specifically, first calculate the attention degree of the current-time LSTM unit to the hidden states of each historical-time LSTM unit, and the formula is expressed as follows:

[0042] Where, represents the attention degree of the LSTM unit at the current time t to the hidden state of the LSTM unit at the historical time j, is the hidden state of the LSTM unit at the historical time j, is the hidden state at the previous adjacent time, is the parameter to be trained.

[0043] Specifically, normalize the attention degree of the hidden states of each historical-time LSTM unit to obtain the attention weights of the current-time LSTM unit to the hidden states of each historical-time LSTM unit, and the sum of the attention weights of the hidden states of each historical-time LSTM unit is 1, and the formula is expressed as follows:

[0044] Where, is the attention weight of the LSTM unit at the current time t to the hidden state of the LSTM unit at the historical time j, is the attention degree of the LSTM unit at the current time t to the hidden state of the LSTM unit at the historical time j.

[0045] Specifically, the calculation formula for the historical context information of the current-time LSTM unit is:

[0046] Among them, is the historical context information of the LSTM cell at the current time t, is the hidden state attention weight of the LSTM cell at the current time t for the historical time j, is the hidden state at the historical time j.

[0047] Therefore, the update process of the final cell state of the LSTM cell at the current time is as follows:

[0048] Among them, is the cell state at time t, is the input gate output, is the activation function, , , are training parameters, is the bias parameter, is the cell state at the previous time, is the forget gate output.

[0049] In some embodiments, the formula of the Navier-Stokes momentum equation is expressed as follows:

[0050] Among them, is the velocity component of the fluid in the x direction, is the velocity component of the fluid in the y direction, is the velocity component of the fluid in the z direction, represents time, is the three-dimensional coordinate in the spatial Cartesian coordinate system, represents the density of the fluid, represents the pressure of the fluid, represents the gravitational acceleration of the fluid in the x direction, represents the kinematic viscosity of the fluid, are the second-order spatial derivatives in the x, y, and z directions respectively, used to describe the viscous effect of the fluid.

[0051] Specifically, the Navier-Stokes momentum equation is used to describe the momentum transfer and fluid behavior in a river.

[0052] In some embodiments, the formula of the mass conservation continuity equation is expressed as follows:

[0053] Among them, is the velocity component of the fluid in the x direction, is the velocity component of the fluid in the y direction, $v_z$ is the velocity component of the fluid in the z - direction, respectively represent the velocity gradients of the fluid in each direction.

[0054] In some embodiments, the Manning formula is used to construct the bed - surface friction loss equation, which is expressed as:

[0055]

[0056] where, $v$ is the river flow velocity, $n$ is the Manning roughness coefficient, which is used to describe the roughness of the river - bed surface, $R_h$ is the hydraulic radius, which represents the ratio of the cross - sectional area of the fluid to the wetted perimeter, $A$ is the cross - sectional area of the fluid, $P$ is the wetted perimeter, which is used to represent the perimeter line of the contact between the fluid and the solid wall surface in the cross - sectional area of the flowing fluid.

[0057] In some specific embodiments, corresponding physical instruments are used to measure and calculate the parameters required for the Navier - Stokes momentum equation, the mass - conservation continuity equation, and the bed - surface friction loss equation, and the calculation results of the Navier - Stokes momentum equation, the mass - conservation continuity equation, and the bed - surface friction loss equation are used as physical information.

[0058] In some embodiments, the physical information and the first prediction result are input into a pre - trained fully - connected layer for prediction to obtain a second prediction result.

[0059] Specifically, by combining the physical information calculated from the Navier - Stokes momentum equation, the mass - conservation continuity equation, and the bed - surface friction loss equation into the first prediction result and performing a re - prediction by the fully - connected layer, the prediction accuracy of the flow velocity data can be further improved.

[0060] In some specific embodiments, the continuous flow velocity data collected in this solution is collected by an acoustic Doppler current profiler. Among them, in order to prevent the data - collection frequency of the acoustic Doppler current profiler from being too high, a sliding - window Poisson random sampling method is used to process the data collected by the acoustic Doppler current profiler to obtain continuous flow velocity data.

[0061] Exemplarily, the continuous flow velocity data is:

[0062] where, $t_i$ is the Poisson random sampling moment $v_{i,1 - 28}$ corresponding to the flow velocity measurement data of layers 1 - 28, which is expressed as:

[0063] Among them, represents the flow velocity of the

[0064] Furthermore, when training the LSTM flow velocity prediction model, corresponding label data is set for each flow velocity measurement data, and the formula is expressed as:

[0065] Among them, to ensure label consistency, k is a fixed value.

[0066] Embodiment 2 Based on the same concept, referring to Figure 2 , this application also proposes a river flow velocity prediction device based on embedded physical information, including: An acquisition module, configured to acquire continuous flow velocity data, input the continuous flow velocity data into a pre-trained LSTM river flow velocity prediction model to obtain a first prediction result. Among them, a historical time window is set in the LSTM river flow velocity prediction model, and the cell states of each LSTM cell of the current moment LSTM cell within the historical time window are weighted and fused as the cell state of the current moment LSTM cell; A physical information calculation module, which calculates physical information based on the Navier-Stokes momentum equation, the mass conservation continuity equation, and the riverbed surface friction loss equation; A prediction module, configured to fuse and predict the physical information and the first prediction result to obtain a second prediction result, and the second prediction result is the river flow velocity prediction result.

[0067] Embodiment 3 This embodiment also provides an electronic device, referring to Figure 3 , including a memory 404 and a processor 402. A computer program is stored in the memory 404, and the processor 402 is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0068] Specifically, the above-mentioned processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC for short), or may be configured as one or more integrated circuits implementing the embodiments of the present application.

[0069] Among them, the memory 404 may include a mass storage 404 for data or instructions. By way of example and not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In appropriate cases, the memory 404 may include removable or non-removable (or fixed) media. In appropriate cases, the memory 404 may be internal or external to the data processing device. In a particular embodiment, the memory 404 is non-volatile memory. In a particular embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these. In appropriate cases, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), where the DRAM may be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0070] The memory 404 can be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402.

[0071] By reading and executing the computer program instructions stored in the memory 404, the processor 402 implements any one of the river flow velocity prediction methods based on embedded physical information in the above embodiments.

[0072] Optionally, the above electronic device may further include a transmission device 406 and an input / output device 408. Among them, the transmission device 406 is connected to the above processor 402, and the input / output device 408 is connected to the above processor 402.

[0073] The transmission device 406 can be used to receive or send data via a network. Specific examples of the above network may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0074] The input / output device 408 is used to input or output information. In this embodiment, the input information can be continuous river flow velocity data, etc., and the output information can be river flow velocity prediction results, etc.

[0075] Optionally, in this embodiment, the above processor 402 can be set to perform the following steps through a computer program: Obtain continuous flow velocity data, input the continuous flow velocity data into a pre-trained LSTM river flow velocity prediction model to obtain a first prediction result. Among them, in the LSTM river flow velocity prediction model, a historical time window is set for each LSTM unit, and the cell states of each LSTM unit within the corresponding historical time window of the current LSTM unit are weighted and fused as the cell state of the current LSTM unit; Calculate physical information based on the Navier-Stokes momentum equation, the mass conservation continuity equation, and the riverbed surface friction loss equation; Fuse and predict the physical information and the first prediction result to obtain a second prediction result, and the second prediction result is the river flow velocity prediction result.

[0076] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be repeated here.

[0077] Generally, various embodiments can be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects of the present invention can be implemented in hardware, while other aspects can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the present invention is not limited thereto. Although aspects of the present invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, the blocks, devices, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or a controller or other computing device, or some combination thereof.

[0078] Embodiments of the present invention can be implemented by computer software, which is executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. A computer software or program (also referred to as a program product), including software routines, applets, and / or macros, can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product can include one or more computer-executable components configured to perform the embodiments when the program runs. The one or more computer-executable components can be at least one software code or a part thereof. Additionally, in this regard, it should be noted that any box in the logical flow, as Figure 3 described, can represent a program step, or interconnected logical circuits, boxes, and functions, or a combination of program steps and logical circuits, boxes, and functions. The software can be stored on physical media such as memory chips or storage blocks implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs. The physical media are non-transitory media.

[0079] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as falling within the scope described in this specification.

[0080] The above embodiments only represent several implementation manners of the present application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A river flow velocity prediction method based on embedded physical information, characterized in that, It includes the following steps: Obtain continuous flow velocity data, and input the continuous flow velocity data into a pre-trained LSTM river flow velocity prediction model to obtain a first prediction result. Among them, in the LSTM river flow velocity prediction model, a historical time window is set for each LSTM unit, and the cell states of each LSTM unit within the corresponding historical time window of the LSTM unit at the current moment are weighted and fused as the cell state of the LSTM unit at the current moment; Calculate physical information based on the Navier-Stokes momentum equation, the mass conservation continuity equation, and the riverbed surface friction loss equation; Fuse and predict the physical information and the first prediction result to obtain a second prediction result, and the second prediction result is the river flow velocity prediction result.

2. The river flow velocity prediction method based on embedded physical information according to claim 1, characterized in that In the LSTM flow velocity prediction model, use a multi-layer attention mechanism to set weights for the input gate, forget gate, and output gate of each LSTM unit respectively.

3. A method for predicting river flow velocity based on embedded physical information according to claim 1, characterized in that, Set the historical time window to [t - , t - 1], and the formula for the cell state of the LSTM unit at the current moment is as follows: ; , ; where t is the current moment, is the intermediate quantity of the cell state of the LSTM cell at the current moment t, is the cell state of the LSMT cell within the historical time window, is the weight corresponding to the cell state of the LSMT cell within the historical time window, is the parameter matrix to be trained, is the length of the time window.

4. A method for predicting river flow velocity based on embedded physical information according to claim 1, characterized in that, The formula for the forget gate of each LSTM unit is as follows: ; ; Among them, represents the output of the forget gate, is the current input, is the preprocessing matrix parameter to be trained, is the hidden state at the previous adjacent time, is the matrix parameter to be trained, is the intermediate quantity of the LSTM cell state at the current time t, is the matrix parameter to be trained is the bias parameter to be trained, represents the Sigmoid activation function, The output value of is between 0 and 1, representing the state forgetting probability, is the forget gate weight, represents the final weighted output of the forget gate.

5. A method for predicting river flow velocity based on embedded physical information according to claim 1, characterized in that, The formula for the input gate of each LSTM unit is as follows: ; ; Among them, is the output of the input gate, is the current input, is the matrix parameter to be trained, is the hidden state at the previous adjacent time, is the matrix parameter to be trained, is the intermediate quantity of the LSTM cell state at the current time t, is the parameter to be trained, is the bias parameter to be trained, represents the Sigmoid activation function, The output value of which is between 0 and 1 and is used to control the writing of new information, is the input gate weight, is expressed as the final weighted output of the input gate.

6. The river flow velocity prediction method based on embedded physical information according to claim 1, wherein The formula for the output gate of each LSTM unit is as follows: ; ; Among them, is the output of the output gate, is the current input, is the matrix parameter to be trained, is the hidden state at the previous adjacent time, is the matrix parameter to be trained, is the intermediate quantity of the LSTM cell state at the current time t, is the parameter to be trained, is the bias parameter to be trained, represents the Sigmoid activation function, is the output gate weight, represents the weighted final output of the output gate.

7. A method for predicting river flow velocity based on embedded physical information according to claim 1, characterized in that, The LSTM river flow velocity prediction model includes an LSTM encoding layer, an attention mechanism layer, an LSTM decoding layer, and a fully connected layer connected in series in sequence. The LSTM encoding layer and the LSTM decoding layer have the same structure and are both composed of multiple LSTM units. The attention mechanism layer updates the hidden state of the LSTM unit at the current moment by combining the hidden states of the historical LSTM units. The fully connected layer is used to output the decoding result of the LSTM decoder.

8. A method for predicting river flow velocity based on embedded physical information according to claim 7, characterized in that, In the attention mechanism layer, calculate the attention weight of the LSTM unit at the current moment for the hidden state of each historical moment LSTM unit, and perform a weighted sum on the corresponding LSTM unit hidden state based on the attention weight of the hidden state of each historical moment LSTM unit to obtain the historical context information of the LSTM at the current moment, and use the historical context information of the LSTM unit at the current moment as the hidden state of the LSTM unit at the current moment.

9. A river flow velocity prediction device based on embedded physical information, characterized in that, It includes: An acquisition module, configured to acquire continuous flow velocity data, and input the continuous flow velocity data into a pre-trained LSTM river flow velocity prediction model to obtain a first prediction result. Among them, a historical time window is set in the LSTM river flow velocity prediction model, and the cell states of each LSTM unit within the historical time window of the LSTM unit at the current moment are weighted and fused as the cell state of the LSTM unit at the current moment; A physical information calculation module, which calculates physical information based on the Navier-Stokes momentum equation, the mass conservation continuity equation, and the riverbed surface friction loss equation; A prediction module, configured to fuse and predict the physical information and the first prediction result to obtain a second prediction result, and the second prediction result is the river flow velocity prediction result.

10. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is set to run the computer program to execute a river flow velocity prediction method based on embedded physical information according to any one of claims 1-8.

Citation Information

Patent Citations

  • An expression tracking method based on DCNNs-LSTM model

    CN109086707A

  • Water quality prediction method based on attention neural network

    CN110428082A

  • Flight track abnormity judgment method based on sliding window algorithm

    CN117874678A

  • Method and device for constructing flow velocity prediction model based on improved gating circulation unit

    CN119378407A

  • Gas turbine dynamic parameter regression prediction method based on fusion network

    CN119740203A