Traffic determination method and device, and computer device
By acquiring the state and structural parameters of the fluid inside the pipeline and using a flow determination model to calculate flow characteristic parameters, the problem of accuracy in flow estimation during instrument failure is solved, achieving more accurate flow determination and cumulative flow correction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RICHFIT INFORMATION TECH
- Filing Date
- 2024-12-11
- Publication Date
- 2026-06-12
AI Technical Summary
In the existing technology, when the instrument malfunctions or the reading exceeds the range, the flow rate is estimated based on the experience of the measurement personnel, which leads to a decrease in the accuracy and reliability of the flow rate determination.
By obtaining the state and structural parameters of the fluid inside the pipe, the flow determination model is used to calculate multiple flow characteristic parameters of the fluid, including density, viscosity, Reynolds number and friction resistance coefficient. The predicted parameters are then corrected to determine the average flow rate of the fluid.
It improves the accuracy of flow rate determination, enabling more accurate estimation of cumulative flow during instrument malfunctions and ensuring the accuracy of instrument readings.
Smart Images

Figure CN122192452A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of measurement technology, and in particular to a method, apparatus, and computer device for determining flow rate. Background Technology
[0002] In the field of measurement technology, instruments are used to monitor and record energy consumption data. Common examples include water meters and gas meters. Instrument readings accurately reflect the total amount of fluid flowing through a specific cross-section of a pipe over a period of time, i.e., the cumulative flow. In cases of instrument malfunction, readings exceeding the instrument's range, or other abnormal situations, failure to address them promptly can result in the loss of consumption data for a given period.
[0003] Currently, the flow rate of fluid in a pipeline is usually estimated by measurement personnel based on experience or by referring to readings of other instruments. Then, based on the flow rate and the duration of the instrument failure, the cumulative flow rate during the failure period is determined, and the instrument reading is corrected based on the cumulative flow rate. Flow rate refers to the amount of fluid flowing through a certain cross-section of a pipeline per unit time, also known as instantaneous flow rate.
[0004] However, the above methods rely heavily on the subjective experience of the measurement personnel, which cannot guarantee the accuracy of the estimated flow rate, resulting in a decrease in the reliability and accuracy of the instrument. Summary of the Invention
[0005] This application provides a method, apparatus, and computer device for determining traffic flow, which can improve the accuracy of traffic flow determination. The technical solution is as follows:
[0006] On the one hand, a method for determining traffic flow is provided, the method comprising:
[0007] Obtain the state parameters of the fluid inside the pipe;
[0008] Based on at least one of the state parameters of the fluid and the structural parameters of the pipeline, a plurality of flow characteristic parameters of the fluid are obtained. The plurality of flow characteristic parameters include a first flow rate, which is the instantaneous flow rate of the fluid at the time of acquisition of the state parameters.
[0009] The flow determination model determines the second flow rate of the fluid based on the fluid's state parameters, multiple flow characteristic parameters, and the pipe's structural parameters. The second flow rate is the average flow rate of the fluid over a historical period prior to the acquisition time. The average flow rate represents the average of multiple instantaneous flow rates over the historical period. The second flow rate is used to determine the cumulative flow rate of the fluid over the historical period. The flow determination model is used to determine the average flow rate of the fluid in the pipe.
[0010] On the other hand, a flow rate determination device is provided, the device comprising:
[0011] The acquisition module is used to acquire the state parameters of the fluid inside the pipeline;
[0012] The calculation module is used to perform calculations based on at least one of the state parameters of the fluid and the structural parameters of the pipe to obtain multiple flow characteristic parameters of the fluid, wherein the multiple flow characteristic parameters include a first flow rate, which is the instantaneous flow rate of the fluid at the time of acquisition of the state parameters;
[0013] The determination module is used to determine the second flow rate of the fluid based on the fluid's state parameters, multiple flow characteristic parameters, and the pipe's structural parameters using a flow determination model. The second flow rate is the average flow rate of the fluid over a historical time period prior to the acquisition time. The average flow rate represents the average of multiple instantaneous flow rates over the historical time period. The second flow rate is used to determine the cumulative flow rate of the fluid over the historical time period. The flow determination model is used to determine the average flow rate of the fluid in the pipe.
[0014] In some embodiments, the plurality of flow characteristic parameters further include density, viscosity, Reynolds number, and friction drag coefficient;
[0015] The determining module is used to determine multiple first predicted parameters of the fluid based on the fluid's state parameters and the pipe's structural parameters using the flow determination model. The multiple first predicted parameters include density, viscosity, Reynolds number, and friction coefficient.
[0016] Using the flow determination model, the plurality of first prediction parameters are corrected based on multiple flow characteristic parameters of the fluid to obtain the corrected plurality of first prediction parameters; using the flow determination model, the second flow rate of the fluid is determined based on the state parameters of the fluid, the structural parameters of the pipe, and the corrected plurality of first prediction parameters.
[0017] In some embodiments, the determining module is configured to, for any first prediction parameter, determine the difference between the first prediction parameter and the flow characteristic parameter corresponding to the first prediction parameter; and, if the difference is not less than a first threshold, correct the first prediction parameter to the flow characteristic parameter corresponding to the first prediction parameter.
[0018] In some embodiments, the determining module is configured to output the second flow rate of the fluid using the flow rate determining model, provided that the difference between the second flow rate of the fluid and the first flow rate obtained through computation is not greater than a second threshold.
[0019] In some embodiments, the state parameters of the fluid include its composition. The calculation module is used to determine the molecular weight and molar volume of the fluid based on its composition; and to determine the density of the fluid based on its molecular weight and molar volume according to a density formula, wherein the density is positively correlated with the molecular weight and negatively correlated with the molar volume.
[0020] In some embodiments, the state parameters of the fluid include temperature, pressure, and composition. The calculation module is configured to determine the viscosity of each component in the fluid based on the composition and temperature of the fluid using a first viscosity formula, wherein the first viscosity formula is used to calculate the viscosity of a single-component fluid, and each component is a component that makes up the fluid; determine the viscosity of the fluid based on the viscosity and molecular weight of each component using a second viscosity formula, wherein the second viscosity formula is used to calculate the viscosity of a multi-component fluid; determine a corrected viscosity of the fluid based on the composition, temperature, and pressure using a correction formula; and add the viscosity of the fluid to the corrected viscosity to obtain the corrected viscosity of the fluid.
[0021] In some embodiments, the calculation module is configured to determine a first viscosity of the fluid based on the composition of the fluid, the temperature and pressure of the fluid at the inlet of the pipe, and the first viscosity formula, a second viscosity formula, and the correction formula; determine a second viscosity of the fluid based on the composition of the fluid, the temperature and pressure of the fluid at the outlet of the pipe, and the first viscosity formula, a second viscosity formula, and the correction formula; and take the average of the first viscosity and the second viscosity as the viscosity of the fluid.
[0022] In some embodiments, the state parameters of the fluid include flow velocity, and the structural parameters of the pipe include diameter;
[0023] The calculation module is used to obtain the density and viscosity of the fluid; and to determine the Reynolds number of the fluid based on the Reynolds formula, the fluid density, viscosity, flow velocity, and the diameter of the pipe. The Reynolds number is positively correlated with the fluid density, flow velocity, and pipe diameter, and negatively correlated with the fluid viscosity.
[0024] In some embodiments, the structural parameters of the pipe also include absolute roughness;
[0025] The calculation module is used to obtain the Reynolds number of the fluid; when the Reynolds number of the fluid is not greater than a first value, it determines the friction resistance coefficient of the fluid based on the Reynolds number of the fluid according to a first friction resistance formula, wherein the friction resistance coefficient of the fluid is negatively correlated with the Reynolds number of the fluid; when the Reynolds number of the fluid is not less than a second value, it determines the friction resistance coefficient of the fluid based on the Reynolds number of the fluid, the diameter of the pipe, and the absolute roughness of the pipe according to a second friction resistance formula; when the Reynolds number of the fluid is greater than the first value and less than the second value, it determines two friction resistance coefficients of the fluid according to the first friction resistance formula and the second friction resistance formula respectively, and takes the largest friction resistance coefficient as the friction resistance coefficient of the fluid.
[0026] In some embodiments, the state parameters of the fluid include temperature, pressure, and composition, and the structural parameters of the pipe include length and diameter;
[0027] The calculation module is used to obtain the frictional resistance coefficient of the fluid; and to determine the first flow rate of the fluid based on the temperature, pressure, composition of the fluid, and the length and diameter of the pipe according to the flow rate formula, wherein the flow rate formula is used to calculate the instantaneous flow rate of the fluid; wherein the pressure of the fluid includes the pressure of the fluid at the inlet of the pipe and the pressure of the fluid at the outlet of the pipe.
[0028] In some embodiments, the apparatus further includes:
[0029] A training module is used to construct sample data, which includes historically collected state parameters and instantaneous flow rates of the fluid in the pipe, structural parameters of the pipe, and multiple flow characteristic parameters of the fluid. The flow characteristic parameters are obtained by processing at least one of the structural parameters of the pipe and the state parameters of the fluid in the sample data. Using the flow determination model, a first average flow rate of the fluid in the pipe is determined based on the sample data; a second average flow rate of the fluid in the pipe is determined based on at least one instantaneous flow rate; a training loss of the flow determination model is determined based on the first average flow rate and the second average flow rate; and the flow determination model is trained based on the training loss.
[0030] In some embodiments, the training module is configured to: determine multiple second predicted parameters of the fluid based on the structural parameters of the pipe and the state parameters of the fluid in the sample data using the flow determination model; correct the multiple second predicted parameters based on multiple flow characteristic parameters in the sample data using the flow determination model to obtain corrected multiple second predicted parameters; and determine a first average flow rate of the fluid in the pipe based on the structural parameters of the pipe, the state parameters of the fluid, and the corrected multiple second predicted parameters in the sample data using the flow determination model.
[0031] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the traffic determination method as described above.
[0032] On the other hand, a computer-readable storage medium is provided that stores at least one computer program, which is loaded and executed by a processor to implement the flow determination method as described above.
[0033] On the other hand, a computer program product is provided, including a computer program loaded and executed by a processor to implement the traffic determination method as described above.
[0034] This application provides a flow rate determination scheme. When an instrument installed on a pipeline malfunctions, a flow rate determination model is used to determine the average flow rate of the fluid in the pipeline based on the pipeline's structural parameters and the latest collected state parameters of the fluid within the pipeline. Since the average flow rate accurately reflects the average instantaneous flow rate of the fluid over a period of time, the cumulative flow rate of the fluid in the pipeline over a period of time can be determined relatively accurately, allowing for instrument correction based on the cumulative flow rate. To further ensure the accuracy of the determined average flow rate, multiple flow characteristic parameters of the fluid obtained through calculations based on state and structural parameters, along with the instantaneous flow rate, are input into the flow rate determination model. This allows the model to determine a more accurate average flow rate based on the aforementioned data, thus improving the accuracy of the determined flow rate. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application;
[0037] Figure 2 This is a flowchart of a method for determining traffic flow provided in an embodiment of this application;
[0038] Figure 3 This is a flowchart of another method for determining traffic provided in an embodiment of this application;
[0039] Figure 4 This is a schematic diagram illustrating the determination of average flow rate according to an embodiment of this application;
[0040] Figure 5 This is a schematic diagram of the structure of a flow rate determination device provided in an embodiment of this application;
[0041] Figure 6 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application;
[0042] Figure 7 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0044] It is understood that the terms "first," "second," etc., used in this application may be used to describe various concepts herein, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of this application, a first flow may be referred to as a second flow, and similarly, a second flow may be referred to as a first flow.
[0045] It should be noted that all information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the structural parameters of the pipeline and the state parameters of the fluid involved in this application were obtained with full authorization.
[0046] The implementation environment of the embodiments of this application is described below.
[0047] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application. See also... Figure 1The implementation environment includes a terminal 101, a monitoring device 102, and a server 103. The terminal 101, monitoring device 102, and server 103 can be connected via a wireless network or a wired network. The monitoring device 102 is used to monitor the state parameters of the fluid within the pipeline, such as temperature, pressure, and flow velocity. The monitoring device 102 includes, but is not limited to, temperature sensors, pressure sensors, and flow meters. Optionally, the monitoring device 102 can monitor the state parameters in real time or periodically; this embodiment does not impose any limitations on this.
[0048] Optionally, terminal 101 can be at least one of a smartphone, desktop computer, laptop, or tablet computer. An application can be installed and run on terminal 101, which can determine and display the average flow rate of the fluid in the pipe based on the status parameters uploaded by monitoring device 102 and the structural parameters of the pipe. This application is associated with server 103, which provides background services.
[0049] Optionally, terminal 101 can also run an application offline, perform offline calculations based on the application, and obtain and display the average flow rate of the fluid. In other words, terminal 101 can determine and display the average flow rate of the fluid based on the fluid's state parameters and the pipe's structural parameters without the background service provided by server 103.
[0050] Optionally, the average flow rate of the fluid can also be determined by the server 103. Accordingly, the server 103 determines the average flow rate of the fluid based on the structural parameters of the pipeline and the fluid status parameters uploaded by the monitoring device 102.
[0051] Optionally, server 103 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, server 103 undertakes the main computing work, and terminal 101 undertakes the secondary computing work; or, server 103 undertakes the secondary computing work, and terminal 101 undertakes the main computing work; or, server 103 and terminal 101 collaborate on computing using a distributed computing architecture.
[0052] Terminal 101 can refer to one of a plurality of terminals; this embodiment uses terminal 101 as an example. Those skilled in the art will understand that the number of terminals can be more or less. For example, there may be several terminals, or dozens or hundreds of terminals, or even more. This application embodiment does not limit the number of terminals or the type of device.
[0053] Figure 2 This is a flowchart of a traffic determination method provided in an embodiment of this application. This embodiment is executed by a terminal as an example. See [link to relevant documentation]. Figure 2 The method includes:
[0054] 201. The terminal acquires the state parameters of the fluid in the pipeline.
[0055] In this embodiment, the pipeline, as part of a transportation system, is typically used to transport energy, such as fluids like oil, natural gas, and water. Here, "fluid" is a general term encompassing both gases and liquids. Fluid flow within a pipeline is usually unidirectional. The rate of change of fluid properties perpendicular to the flow direction is negligible. For example, at any cross-section perpendicular to the pipeline's axis, the fluid's density, flow velocity, and pressure are all the same.
[0056] Optionally, the pipeline is connected to monitoring equipment, such as temperature sensors, pressure sensors, flow meters, velocity meters, and gas (or liquid) chromatographs. These monitoring devices can detect the state parameters of the fluid within the pipeline in real time, such as temperature, pressure, flow velocity, and composition. The composition refers to the various components that make up the fluid. For example, taking the critical energy steam of a refining company as an example, during the steam transportation process, the gas composition within the pipeline includes, but is not limited to, water vapor (H2O), nitrogen (N2), and oxygen (O2).
[0057] When an instrument connected to a pipeline malfunctions or exceeds its range, it is necessary to determine the cumulative flow rate of the fluid within the pipeline over a historical period to correct the instrument reading. Therefore, the terminal acquires the state parameters of the fluid within the pipeline to subsequently determine the average flow rate. These state parameters can be at least one parameter collected in real-time by the monitoring equipment, reflecting at least one of the following: temperature, pressure, flow velocity, and composition of the fluid within the pipeline at the current moment. The average flow rate accurately reflects the average of multiple instantaneous flow rates of the fluid within the pipeline over a period of time following the instrument malfunction.
[0058] 202. The terminal performs calculations based on at least one of the fluid's state parameters and the pipe's structural parameters to obtain multiple flow characteristic parameters of the fluid.
[0059] In this embodiment, the pipeline includes interconnected pipe bodies, fittings, valves, etc. The pipe body is the main part of the pipeline and the main channel through which the fluid flows; its shape is generally cylindrical. The structural parameters of the pipeline include, but are not limited to, length, diameter, absolute roughness, and local resistance coefficient.
[0060] In this context, diameter usually refers to the inner diameter of the pipe. Absolute roughness is the average height of the protruding parts of the pipe's inner wall, reflecting the roughness of the pipe's inner wall. The material and degree of corrosion of the pipe body greatly affect the absolute roughness of the pipe. For example, with the same material, the greater the degree of corrosion of the pipe body, the greater the absolute roughness. The local resistance coefficient is used to describe the energy loss caused by local obstructions (such as valves, elbows, and other pipe fittings) during fluid flow in a pipe. Accordingly, the local resistance coefficient is related to the opening degree of pipe fittings and valves.
[0061] After obtaining the structural parameters of the pipeline and the state parameters of the fluid within the pipeline, the terminal performs calculations on at least one of the obtained parameters to obtain multiple flow characteristic parameters of the fluid. These flow characteristic parameters include, but are not limited to, density, viscosity, Reynolds number, friction coefficient, and initial flow rate. The Reynolds number reflects the flow state of the fluid, which includes laminar flow, turbulent flow, and the transition zone between laminar and turbulent flow. The Reynolds number is typically related to factors such as the fluid's flow velocity, density, viscosity, and the pipe diameter. The friction coefficient reflects the magnitude of the frictional resistance experienced by the fluid flowing in the pipeline. The friction coefficient is typically related to the fluid's Reynolds number, as well as factors such as the pipe's absolute roughness, diameter, and local resistance coefficient. The initial flow rate is the instantaneous flow rate of the fluid at the moment the state parameters are acquired. In other words, the initial flow rate is the theoretical value of the instantaneous flow rate of the fluid at the moment of acquisition, obtained through physical calculations.
[0062] 203. The terminal determines the second flow rate of the fluid by using the flow determination model, based on the fluid's state parameters, multiple flow characteristic parameters, and the pipe's structural parameters. The second flow rate is the average flow rate of the fluid over the historical time period prior to the acquisition time.
[0063] In this embodiment, the flow determination model can be a neural network model used to determine the average flow rate of the fluid in the pipeline. The flow determination model can determine a second flow rate of the fluid based on the fluid's state parameters, the pipeline's structural parameters, and multiple flow characteristic parameters of the fluid. This second flow rate, also known as the average flow rate, represents the average flow rate of the fluid over a historical time period prior to the acquisition time. The second flow rate is used to determine the cumulative flow rate of the fluid over the historical time period. For example, the historical time period could be a period of instrument malfunction or an period of instrument over-range measurement. The terminal calculates the cumulative flow rate of the fluid in the pipeline over the historical time period by multiplying the second flow rate by the duration of the historical time period. For example, if the second flow rate is X and the duration of the historical time period is T, the cumulative flow rate of the fluid over the historical time period is X*T.
[0064] Optionally, the second flow rate can reflect the average of multiple instantaneous flow rates over a historical period. Compared to instantaneous flow rate, the average flow rate is more appropriate. Since the instantaneous flow rate of a fluid fluctuates, determining the cumulative flow rate based on the average flow rate is more accurate than determining it based on the actual measured instantaneous flow rate, avoiding an overestimation or underestimation of the cumulative flow rate, thus ensuring the accuracy of the corrected instrument.
[0065] In some embodiments, after an instrument connected to a pipeline is damaged or exceeds its range, it is necessary to accurately estimate the cumulative flow rate of the fluid in the pipeline over a historical period. The instrument reading is then corrected based on this cumulative flow rate to ensure that the corrected instrument accurately records the cumulative flow rate of the fluid in the pipeline. Therefore, the terminal can accurately determine the second flow rate of the fluid, i.e., the average flow rate, by performing steps 201-203. Then, the terminal determines the cumulative flow rate of the fluid in the pipeline over the historical period by multiplying the duration of the historical time period by the average flow rate. This allows maintenance personnel to correct the instrument based on the cumulative flow rate, ensuring that the corrected instrument accurately records the flow rate during the period of instrument failure and guaranteeing the accuracy of the corrected instrument. The historical time period can be the period during which the instrument was damaged or the period during which the instrument exceeded its range; this embodiment does not limit this.
[0066] It should also be noted that, depending on the measurement standard, the flow rate referred to in this application can be either mass flow rate or volumetric flow rate. Mass flow rate refers to the mass of fluid flowing through any cross-section of a pipe per unit time, and its unit can be kg / s (kilograms per second). Volumetric flow rate refers to the volume of fluid flowing through any cross-section of a pipe per unit time, and its unit can be m³ / s (m³ / s). 3 / s (cubic meters per second).
[0067] This application provides a method for determining flow rate. When an instrument installed on a pipeline malfunctions, a flow rate determination model is used to determine the average flow rate of the fluid in the pipeline based on the pipeline's structural parameters and the latest collected state parameters of the fluid within the pipeline. Since the average flow rate accurately reflects the average instantaneous flow rate of the fluid over a period of time, the cumulative flow rate of the fluid in the pipeline over a period of time can be determined relatively accurately, allowing for instrument correction based on the cumulative flow rate. To further ensure the accuracy of the determined average flow rate, multiple flow characteristic parameters of the fluid obtained through calculations based on state parameters and structural parameters, along with the instantaneous flow rate, are input into the flow rate determination model. This allows the model to determine a more accurate average flow rate based on the aforementioned data, thus improving the accuracy of the determined flow rate.
[0068] The above Figure 2 The main flow of the traffic determination method provided in the embodiments of this application is illustrated by way of example. The traffic determination scheme will be described in detail below. Figure 3 This is a flowchart of another method for determining traffic provided in an embodiment of this application. Taking the method executed by a terminal as an example, see [link to flowchart]. Figure 3 The method includes:
[0069] 301. The terminal acquires the state parameters of the fluid in the pipeline.
[0070] In this embodiment, step 301 is the same as step 201 described above, and will not be repeated here.
[0071] 302. The terminal performs calculations based on at least one of the fluid's state parameters and the pipe's structural parameters to obtain multiple flow characteristic parameters of the fluid, including density, viscosity, Reynolds number, frictional resistance coefficient, and first flow rate.
[0072] In this embodiment, after obtaining the structural parameters of the pipeline and the state parameters of the fluid within the pipeline, the terminal performs calculations on at least one of the obtained parameters according to the corresponding physical formulas to obtain multiple flow characteristic parameters of the fluid. The physical formulas are the formulas used to calculate the flow characteristic parameters. The process of the terminal calculating each flow characteristic parameter is explained below through the following steps (1)-(5).
[0073] (1) The process of calculating density.
[0074] The terminal determines the molecular weight and molar volume of the fluid based on its composition. Optionally, the terminal determines the molecular weight and molar fraction of each component of the fluid based on its composition. The molar fraction of component i refers to the ratio of the amount of substance of component i to the sum of the amounts of substance of all components in the fluid. The terminal can determine the molecular weight of the fluid using the following formula (1).
[0075]
[0076] Among them, M m x represents the molecular weight of the fluid, expressed in g / mol. N represents the quantity of the component in the fluid. i M is the mole fraction of component i. i Let be the molecular weight of component i.
[0077] Then, the terminal determines the fluid density based on the molecular weight and molar volume of the fluid according to the density formula. The fluid density is positively correlated with the molecular weight and negatively correlated with the molar volume. The terminal can determine the fluid density using the following formula (2).
[0078]
[0079] Where, ρ m The density of the fluid is expressed in kg / m³. 3 (kg per cubic meter), M m V is the molecular weight of the fluid. m The molar volume of the fluid, in cubic meters (m³). 3 / mol (cubic meters per mole).
[0080] Since fluids are mixtures of multiple components, and directly measuring their density is quite complex, this method uses the fluid's composition and density formulas to estimate its density more accurately and quickly, improving the accuracy and efficiency of fluid density calculations.
[0081] It should be noted that, in addition to calculating the fluid density through computation, the terminal can also obtain the fluid density by querying a density table. This density table records the fluid density under different temperature and pressure conditions. Based on the obtained fluid temperature and density, the terminal can quickly obtain the fluid density by querying the corresponding density in the density table. Taking the critical energy steam of a refining company as an example, Table 1 below shows an exemplary steam density table.
[0082] Table 1
[0083]
[0084] As shown in the table above, when the steam temperature is between 150℃ and 330℃ and the pressure is between 0.10MPa and 21.50MPa, the terminal can determine the steam density by referring to Table 1.
[0085] (2) The process of calculating viscosity.
[0086] When a fluid comprises multiple components, the terminal determines the viscosity of each component in the fluid based on the fluid's composition and temperature using the first viscosity formula. The first viscosity formula is used to calculate the viscosity of a single-component fluid, which is a fluid consisting of a single component, each of which is a component of the fluid. The first viscosity formula can be found in formula (3) below.
[0087]
[0088] Where, μ i (p=0) represents the viscosity of component i at normal pressure, in N·s / m³. 2 (Newton-second per square meter). C 1i C 2i C 3i C 4i The constants related to component i can be calculated using the terminal to obtain multiple constants associated with component i. T represents the fluid temperature. It should be noted that the above first viscosity formula is applicable under the condition of C. 6i ≤T≤C 7i C 6i and C 7i It is also a calculation constant related to component i.
[0089] After calculating the viscosity of each component according to the first viscosity formula, the terminal determines the viscosity of the fluid based on the viscosity and molecular weight of each component according to the second viscosity formula. The second viscosity formula is used to calculate the viscosity of multi-component fluids. The second viscosity formula can be found in formula (4) below.
[0090]
[0091] Where, μ m (p=0) represents the viscosity of the fluid at normal pressure. μ i Let x be the viscosity of component i. i x is the mole fraction of component i. j Let B be the mole fraction of component j. ij This is an intermediate parameter between component i and component j. Intermediate parameter B ij The calculation process is shown in the following formula (5).
[0092]
[0093] Among them, M i M j μ represents the molecular weights of component i and component j, respectively. i μ j These are the viscosities of component i and component j at normal pressure, respectively.
[0094] Since the viscosity calculated according to the second viscosity formula above is the viscosity of the fluid under normal pressure, the terminal determines the corrected viscosity of the fluid based on the composition, temperature, and pressure of the fluid according to the correction formula. The corrected viscosity is the viscosity correction term obtained after taking into account the effect of pressure on viscosity. The terminal adds the viscosity of the fluid to the corrected viscosity to obtain the corrected viscosity of the fluid. Optionally, the correction formula is shown in formula (6) below, and the corrected viscosity of the fluid is shown in formula (7) below.
[0095]
[0096] μ m (p)=μ m (p=0)+Δμ p (7)
[0097] Where, Δμ p To correct viscosity. ρ rm M represents the specific density of the fluid. m ρ is the molecular weight of the fluid. P is the fluid pressure, in Pa (Pa). T is the fluid temperature, in K (Kelvin). m (p) represents the corrected viscosity of the fluid.
[0098] In the above-mentioned viscosity calculation process, by breaking down the viscosity calculation of a fluid with complex composition into the viscosity calculation of a single component at normal pressure, and then combining the characteristics of each component to calculate the mixed viscosity, the viscosity of the mixed fluid at normal pressure can be obtained more accurately. Furthermore, considering that the pressure of fluids in actual situations is not normal pressure, determining the corrected viscosity of the fluid based on its pressure and temperature can comprehensively consider the influence of temperature and pressure on viscosity, thus improving the accuracy of the calculated viscosity.
[0099] In some embodiments, since the temperature and pressure of the fluid may differ at the pipe inlet and outlet, the terminal calculates the viscosity of the fluid at the pipe inlet and the viscosity of the fluid at the pipe outlet separately, and then uses the average of the two as the fluid viscosity. Specifically, the terminal determines the first viscosity of the fluid based on the fluid composition, temperature, and pressure at the pipe inlet, according to the first viscosity formula, the second viscosity formula, and the correction formula described above. The first viscosity is the viscosity of the fluid at the pipe inlet. The terminal determines the second viscosity of the fluid based on the fluid composition, temperature, and pressure at the pipe outlet, according to the first viscosity formula, the second viscosity formula, and the correction formula described above. The second viscosity is the viscosity of the fluid at the pipe outlet. The terminal uses the average of the first viscosity and the second viscosity as the fluid viscosity. By using the average viscosity of the fluid at the pipe inlet and outlet as the fluid viscosity, the influence of changes in fluid temperature and pressure within the pipe on the calculation of fluid viscosity can be reduced, improving the accuracy of viscosity calculation.
[0100] (3) The calculation process of Reynolds number.
[0101] The terminal obtains the density and viscosity of the fluid. For example, the terminal obtains the density and viscosity calculated in steps (1)-(2) above. Then, the terminal determines the Reynolds number of the fluid based on the Reynolds formula, the fluid density, viscosity, flow velocity, and pipe diameter. The Reynolds number is a dimensionless number used to reflect the flow state of the fluid. The flow state of the fluid includes laminar flow, turbulent flow, and the transition zone between laminar and turbulent flow. The Reynolds number is positively correlated with the fluid density, flow velocity, and pipe diameter, and negatively correlated with the fluid viscosity. Optionally, the Reynolds formula is shown in formula (8) below.
[0102]
[0103] Where Re is the Reynolds number of the fluid. μ m (p) represents the corrected viscosity of the fluid. ρ m ρ is the density of the fluid. θ is the flow velocity of the fluid, in m / s (meters per second). d is the diameter of the fluid, in meters (meters).
[0104] (4) The calculation process of friction resistance coefficient.
[0105] The terminal obtains the Reynolds number of the fluid. For example, the terminal obtains the Reynolds number of the fluid calculated in step (3) above.
[0106] When the Reynolds number of the fluid is not greater than a first value, it indicates that the fluid flow is laminar. Therefore, the terminal can determine the frictional resistance coefficient of the fluid based on the Reynolds number using the first frictional resistance formula. The first value can be a preset value, such as 2000. The frictional resistance coefficient of the fluid is negatively correlated with the Reynolds number. The frictional resistance coefficient reflects the magnitude of the frictional resistance experienced by the fluid when flowing in a pipe, that is, it reflects the frictional resistance characteristics of the fluid flowing in the pipe.
[0107] The formula for the first frictional resistance is given in formula (9) below.
[0108]
[0109] Where λ is the frictional drag coefficient of the fluid. Re is the Reynolds number of the fluid. Similar to the Reynolds number, the frictional drag coefficient of the fluid is also a dimensionless number.
[0110] When the Reynolds number of the fluid is not less than the second value, it indicates that the fluid flow is turbulent. Therefore, the terminal can determine the frictional resistance coefficient of the fluid based on the Reynolds number of the fluid, the diameter of the pipe, and the absolute roughness of the pipe, according to the second frictional resistance formula. The second value can also be a preset value, such as 4000. The second frictional resistance formula is shown in formula (10) below.
[0111]
[0112] Where λ is the frictional resistance coefficient of the fluid. ε is the absolute roughness of the pipe. d is the diameter of the pipe. Re is the Reynolds number of the fluid.
[0113] When the Reynolds number of the fluid is greater than the first value but less than the second value, it indicates that the fluid flow state is in the transition zone between laminar and turbulent flow. The terminal determines the two friction resistance coefficients of the fluid according to the first friction resistance formula and the second friction resistance formula, that is, the terminal determines one friction resistance coefficient according to the above formula (9) and another friction resistance coefficient according to the above formula (10). Then, the terminal takes the larger of the two friction resistance coefficients as the friction resistance coefficient of the fluid.
[0114] Because the Reynolds number can intuitively and accurately reflect the flow state of a fluid, and fluids in different flow states exhibit different frictional resistance characteristics, after determining the flow state of the fluid based on the Reynolds number, a suitable frictional resistance formula can be used to calculate the frictional resistance coefficient of the fluid. This ensures that the obtained frictional resistance coefficient accurately reflects the frictional resistance characteristics of the fluid flowing in the pipe, improving the accuracy and flexibility of calculating the frictional resistance coefficient.
[0115] It should also be noted that, when the Reynolds number of the fluid is not less than the second value, in addition to the above formula (10), the terminal can also calculate the frictional resistance coefficient of the fluid according to the following formula (11).
[0116]
[0117] Where λ is the fluid friction coefficient. p1 and p2 are the fluid pressures at the pipe inlet and outlet, respectively. ρ m Let be the density of the fluid. z1 and z2 are the heights at the pipe inlet and outlet, respectively. g is the acceleration due to gravity. l is the length of the pipe, and d is the diameter of the pipe. ∑ζ is the sum of the local drag coefficients of the pipe. u is the fluid velocity.
[0118] It should also be noted that the absolute roughness ε of a pipe is related to its material, age, and degree of corrosion. Table 2 below shows the absolute roughness of an exemplary common pipe. The unit of absolute roughness is mm (millimeters).
[0119] As shown in Table 2 below, the absolute roughness of the pipe can be roughly determined based on its material, age, and degree of corrosion. This allows the terminal to calculate the frictional resistance coefficient of the fluid inside the pipe based on the absolute roughness.
[0120] Table 2
[0121] Serial Number Pipe Category Absolute roughness ε / mm 1 Seamless brass tubes, copper tubes and aluminum tubes 0.01~0.05 2 New seamless steel pipes or galvanized pipes 0.1~0.2 3 New cast iron pipes 0.3 4 Seamless steel pipes with mild corrosion 0.2~0.3 5 Seamless steel pipes with significant corrosion 0.5 or more 6 old cast iron pipes 0.85 and above
[0122] The local resistance coefficient describes the energy loss caused by local obstructions (such as valves, elbows, and other pipe fittings) during fluid flow within a pipe. Table 3 below shows the local resistance coefficients for several common pipe fittings.
[0123] Table 3
[0124]
[0125] In some embodiments, the length of the pipe is the sum of the length of the pipe body and the equivalent lengths of each pipe fitting. The equivalent length refers to the length of the straight pipe through which the local resistance exerted by the pipe fitting on the fluid within the pipe is converted into a length of resistance for easier calculation of local resistance losses. Table 4 below shows the equivalent lengths of several common pipe fittings.
[0126] Table 4
[0127]
[0128] As shown in Table 4 above, based on the type of pipe fittings and the opening degree of the valves, the equivalent length of each pipe fitting in the pipeline can be determined. Therefore, the length of the pipeline can be determined more accurately based on the length of the pipeline body and the equivalent length of each pipe fitting.
[0129] (5) Calculation process of the first flow rate.
[0130] The terminal obtains the frictional resistance coefficient of the fluid. For example, the terminal obtains the frictional resistance coefficient of the fluid calculated in step (4) above. Then, the terminal determines the first flow rate of the fluid based on the flow rate formula, the fluid's temperature, pressure, composition, and the length and diameter of the pipe. The flow rate formula is used to calculate the instantaneous flow rate of the fluid. The first flow rate calculated in the above manner is also the instantaneous flow rate of the fluid in the pipe at the moment the state parameters are collected. Since the instantaneous flow rate of the fluid is closely related to temperature, pressure, composition, and the structure of the pipe, for example, temperature and pressure affect the fluid's density and viscosity, thereby affecting the fluid's velocity and flow rate in the pipe. Therefore, by comprehensively considering the above factors, the instantaneous flow rate of the fluid can be accurately and quickly calculated according to the flow rate formula.
[0131] The fluid pressure includes the pressure at the inlet of the pipe and the pressure at the outlet of the pipe. Optionally, the flow rate formula is shown in formula (12) below.
[0132]
[0133] Where G is the first flow rate of the fluid, which is the mass flow rate and represents the mass of fluid flowing through any cross-section of the pipe per unit time. p1 and p2 are the pressures of the fluid at the inlet and outlet of the pipe, respectively. λ is the friction coefficient of the fluid. l is the length of the pipe, and d is the diameter of the pipe. M m denoted as , where is the molecular weight of the fluid. T is the temperature of the fluid.
[0134] It should be noted that in calculating the aforementioned flow characteristic parameters, the structural parameters of the pipeline used in the terminal may be historically statistical parameters. Furthermore, as the pipeline's usage time increases, its absolute roughness and local resistance coefficient may change. Therefore, the terminal can acquire multiple sets of state parameters of the fluid within the pipeline collected historically, along with the instantaneous flow rate corresponding to the acquisition time of each set of state parameters—that is, the instantaneous flow rate of the fluid within the pipeline at that moment, as monitored by the flow meter. Then, based on each set of state parameters and the pipeline's structural parameters, the terminal calculates the instantaneous flow rate of the fluid using the aforementioned formulas. Finally, based on the calculated flow rate and the actual monitored flow rate, at least one structural parameter of the pipeline is adjusted to ensure that the instantaneous flow rate calculated using the adjusted structural parameters is closer to the actual monitored instantaneous flow rate, thereby guaranteeing the accuracy of the structural parameters and the accuracy of the flow rate determined based on those parameters.
[0135] 303. The terminal determines multiple first predicted parameters of the fluid based on the fluid's state parameters and the pipe's structural parameters through the flow determination model. These multiple first predicted parameters include density, viscosity, Reynolds number, and friction coefficient.
[0136] In this embodiment, the terminal inputs the fluid's state parameters, the pipe's structural parameters, and multiple flow characteristic parameters of the fluid into the flow determination model. Based on the fluid's state parameters and the pipe's structural parameters, the flow determination model determines multiple first predicted parameters of the fluid, which are the flow characteristic parameters predicted by the flow determination model. In other words, the flow determination model can predict multiple flow characteristic parameters of the fluid based on the pipe's structural parameters and the fluid's state parameters.
[0137] 304. The terminal determines the model based on the flow rate and corrects multiple first prediction parameters based on multiple flow characteristic parameters of the fluid to obtain corrected first prediction parameters.
[0138] In the embodiments of this application, the flow determination model can correct its predicted first prediction parameters based on multiple flow characteristic parameters in the input data, so as to avoid excessive deviation between the first prediction parameters and the actual input flow characteristic parameters, thereby ensuring the accuracy of the first prediction parameters determined by the flow determination model.
[0139] In some embodiments, for any first prediction parameter, the terminal determines the difference between the first prediction parameter and the corresponding flow characteristic parameter. If the difference is not less than a first threshold, it indicates a high degree of difference between the two, and therefore the flow determination model corrects the first prediction parameter to the corresponding flow characteristic parameter. For example, if the Reynolds number input to the flow determination model is 5000 and the first threshold is 1000, then if the Reynolds number predicted by the flow determination model is less than 4000 or greater than 6000, the flow determination model can correct the predicted Reynolds number to 5000; if the Reynolds number predicted by the flow determination model is in the range of 4000 to 6000, the flow determination model does not need to correct it.
[0140] 305. The terminal determines the second flow rate of the fluid using the flow determination model, based on the fluid's state parameters, the pipe's structural parameters, and multiple corrected first prediction parameters.
[0141] In this embodiment, the flow rate determination model can accurately determine the average flow rate of the fluid in the pipe over a historical period, i.e., the second flow rate, based on the fluid's state parameters, the pipe's structural parameters, and several corrected first prediction parameters. By comprehensively considering the fluid's state parameters, the pipe's structural parameters, and the flow characteristic parameters determined by the flow rate determination model, the actual flow of the fluid in the pipe can be more accurately calculated based on these multiple parameters. This ensures that the output second flow rate more closely matches the average flow rate of the fluid over the historical period, thus improving the accuracy of determining the average flow rate.
[0142] In some embodiments, if the difference between the second flow rate determined by the flow rate determination model and the first flow rate obtained by the terminal calculation is not greater than a second threshold, the flow rate determination model outputs the second flow rate of the fluid. The second threshold can be any value set according to actual needs, and this application embodiment does not impose any limitation on it. By outputting the average flow rate only when the difference between the average flow rate determined by the flow rate determination model and the actual calculated instantaneous flow rate is within a certain range, excessive deviation in the average flow rate determined by the flow rate determination model can be avoided, thus improving the accuracy of determining the average flow rate.
[0143] Optionally, the terminal can also perform a weighted summation of the first flow rate and the second flow rate to obtain the average flow rate of the fluid in the pipe. The sum of the weights of the first flow rate and the second flow rate is 1. These weights can be values set according to actual conditions, and this embodiment does not impose any limitations on them. By using the weighted sum of the average flow rate determined by the flow rate determination model and the average flow rate obtained through terminal processing as the average flow rate of the fluid, the determination results and calculation results of the flow rate determination model can be comprehensively considered, thus improving the accuracy of determining the average flow rate.
[0144] This application provides a method for determining flow rate. When an instrument installed on a pipeline malfunctions, a flow rate determination model is used to determine the average flow rate of the fluid in the pipeline based on the pipeline's structural parameters and the latest collected state parameters of the fluid within the pipeline. Since the average flow rate accurately reflects the average instantaneous flow rate of the fluid over a period of time, the cumulative flow rate of the fluid in the pipeline over a period of time can be determined relatively accurately, allowing for instrument correction based on the cumulative flow rate. To further ensure the accuracy of the determined average flow rate, multiple flow characteristic parameters of the fluid obtained through calculations based on state parameters and structural parameters, along with the instantaneous flow rate, are input into the flow rate determination model. This allows the model to determine a more accurate average flow rate based on the aforementioned data, thus improving the accuracy of the determined flow rate.
[0145] It should be noted that the above embodiments use a terminal as the execution subject to illustrate the process by which the terminal determines the average flow rate of a fluid based on the structural parameters of the pipeline and the state parameters of the fluid. In some embodiments, the above embodiments can also use a server as the execution subject, whereby the server obtains the structural parameters of the pipeline and the state parameters of the fluid, and determines the average flow rate of the fluid based on these parameters. Alternatively, the above embodiments can be implemented through interaction between the terminal and the server. Accordingly, the terminal can upload the obtained structural parameters and state parameters to the server, the server determines and returns the average flow rate of the fluid based on the structural parameters and state parameters, and then the terminal displays the average flow rate of the fluid for relevant personnel to view.
[0146] The above embodiments mainly introduce the process by which the terminal determines the average flow rate of the fluid in the pipeline through the flow determination model. The training process of the flow determination model is explained below through the following steps (1)-(5).
[0147] (1) Terminal constructs sample data. The sample data includes historically collected fluid state parameters and instantaneous flow rates within the pipeline, pipeline structural parameters, and multiple fluid flow characteristic parameters. The flow characteristic parameters are obtained by the terminal through computational processing based on at least one of the pipeline structural parameters and fluid state parameters from the sample data. By incorporating the computationally processed flow characteristic parameters as part of the sample data, it is possible to ensure that the flow determination model is trained using the sample data. This allows the physical constraints (such as physical formulas) involved in the computational processing to be distilled into the flow determination model, improving its generalization ability and interpretability.
[0148] Optionally, the terminal acquires the state parameters and instantaneous flow rate of the fluid in the pipeline collected in the past, as well as the structural parameters of the pipeline; then the terminal performs calculations on the acquired state parameters and structural parameters to obtain multiple flow characteristic parameters; then the terminal constructs sample data based on the fluid state parameters, multiple flow characteristic parameters, instantaneous flow rate, and pipeline structural parameters.
[0149] In some embodiments, before constructing sample data, the terminal preprocesses the acquired state parameters, instantaneous flow, structural parameters, and other data. This preprocessing includes, but is not limited to, removing outliers, filling in missing values, removing noise, and normalization. By preprocessing the acquired data, the accuracy and completeness of the sample data can be ensured, thereby guaranteeing the efficiency and accuracy of training the flow determination model.
[0150] In some embodiments, the terminal can divide the constructed sample data into a training set, a validation set, and a test set. The training set is used to train the model, allowing it to learn the patterns and rules of the sample data in the training set. During training, the model's parameters are continuously adjusted to ensure the model can fit the relationship between the input features and the target output in the sample data as accurately as possible. The validation set is used to adjust the model's hyperparameters and evaluate its performance. Hyperparameters are parameters that need to be set before model training, such as the learning rate and dropout probability. During model training, the model learns on the training set, while the validation set is used to evaluate the model's performance under different hyperparameter settings. By comparing the model's performance on the validation set with different hyperparameter combinations, the optimal hyperparameter combination can be selected. The test set is used to evaluate the model's generalization ability, i.e., the model's performance on unseen data. After model training and hyperparameter tuning are complete, the test set is used to evaluate the model's true performance to determine whether the model can be effectively applied to real-world problems.
[0151] The process of training a flow determination model based on sample data in the training set is explained below.
[0152] (2) The terminal determines the first average flow rate of the fluid in the pipeline based on the sample data of the pipeline by using the flow determination model.
[0153] Optionally, during model training, the flow determination model includes an input layer, hidden layers, a dropout layer, and an output layer. For example, the hidden layer comprises three layers: the first layer has 64 neurons, using ReLU (Rectified Linear Unit) activation; the second layer has 32 neurons, also using ReLU activation; and the third layer has 16 neurons, also using ReLU activation. The output layer consists of one neuron. During model training, the learning rate can be set to 0.001, and the batch size to 64.
[0154] Furthermore, to avoid overfitting, a dropout layer is introduced after the hidden layer with a dropout probability of 0.3. Overfitting refers to the situation where the flow determination model performs well on the training set but poorly on the test set. During each training iteration, the dropout operation randomly and temporarily disables some neurons in the hidden layer according to a given dropout probability, preventing them from participating in forward and backward propagation in that iteration. This allows the flow determination model to learn more robust and generalizable features.
[0155] The following explains the process of processing input data in the flow determination model.
[0156] In some embodiments, the flow determination model can determine multiple second predicted parameters of the fluid based on the pipe's structural parameters and the fluid's state parameters in the sample data. Then, the flow determination model corrects these second predicted parameters based on multiple flow characteristic parameters in the sample data, obtaining corrected second predicted parameters. Finally, the flow determination model determines the first average flow rate of the fluid in the pipe based on the pipe's structural parameters, the fluid's state parameters, and the corrected second predicted parameters in the sample data. The process of determining the first average flow rate is similar to steps 303-305 described above and will not be repeated here.
[0157] In some embodiments, during the training process of the flow determination model, the input data of the flow determination model further includes at least one of a first range and a second range, so that the average flow rate output by the trained flow determination model falls within the first range or the second range, thereby limiting the magnitude of the average flow rate output by the flow determination model and avoiding large deviations in the average flow rate output by the flow determination model. The first range is the range of average flow rates of the fluid determined based on human experience, and the second range is the range of average flow rates of the fluid determined based on sample data. For example, the average flow rate for multiple arbitrary time periods is determined based on multiple instantaneous flow rates in the sample data, and then the second range is obtained by statistically analyzing the ranges of the multiple average flow rates.
[0158] (3) Determine the second average flow rate of the fluid in the pipe based on at least one instantaneous flow rate of the fluid in the pipe from the sample data. The second average flow rate may be the average of at least one instantaneous flow rate.
[0159] (4) Determine the training loss of the flow determination model based on the first average flow and the second average flow. Optionally, the flow determination model can perform calculations on the first average flow and the second average flow according to the loss function to obtain the training loss.
[0160] In some embodiments, an L2 regularization term can be added to the loss function of the flow determination model, with the weight decay coefficient set to 0.001. Regularization is a technique to prevent overfitting. L2 regularization, by adding the sum of squared weights as a penalty term to the loss function, ensures that the weight values of the flow determination model are not too large during training, thus making the model simpler and more generalizable. The weight decay coefficient determines the influence of the penalty term in the loss function.
[0161] (5) Train the flow determination model based on the training loss. Optionally, the flow determination model is trained using the backpropagation algorithm based on the training loss until the training termination condition is met. The training termination condition can be that the number of iterations reaches a preset number, or the training loss is less than a preset loss. This embodiment of the application does not limit this.
[0162] In some embodiments, the Adam optimizer and He initialization method can also be used to initialize weights during model training. The Adam optimizer is used to update the model's weight parameters during neural network training, enabling the model to converge in the direction of minimizing the loss function. The He initialization method is mainly used for neural network layers with ReLU activation functions. It can reasonably set the initial values of the weights according to the number of input neurons, helping to accelerate the network's convergence speed and avoid problems such as vanishing or exploding gradients in the early stages of training, allowing the model to train and learn better.
[0163] It should be noted that, in some embodiments, for different application scenarios and fluid types, multiple flow determination models corresponding to different fluids can be trained using the above method to obtain multiple types of flow determination models. This allows for subsequent multi-task learning using multiple flow determination models to simultaneously calculate the average flow rate of multiple fluids. Furthermore, the above model training process can be executed by the terminal or by the server; this application embodiment does not impose any limitations on this.
[0164] The above embodiments mainly introduce the process of training the traffic determination model. To more clearly illustrate the overall process of training and applying the traffic determination model, the following example uses terminal-based traffic determination model training as an example. Figure 4 A schematic diagram illustrating the determination of average flow rate is shown to explain the above process. For example... Figure 4 As shown, data acquisition includes acquiring sample data and acquiring input data for the flow determination model. Then, the terminal trains the flow determination model based on the sample data, and applies the trained flow determination model to determine and output the average flow rate of the fluid based on the acquired input data.
[0165] Figure 5This is a schematic diagram of a flow rate determination device provided in an embodiment of this application. See also... Figure 5 The device includes: an acquisition module 501, a calculation module 502, and a determination module 503.
[0166] Acquisition module 501 is used to acquire the state parameters of the fluid in the pipeline;
[0167] The calculation module 502 is used to perform calculations based on at least one of the fluid's state parameters and the pipe's structural parameters to obtain multiple flow characteristic parameters of the fluid. The multiple flow characteristic parameters include a first flow rate, which is the instantaneous flow rate of the fluid at the time of acquisition of the state parameters.
[0168] The determination module 503 is used to determine the second flow rate of the fluid based on the fluid's state parameters, multiple flow characteristic parameters, and the pipe's structural parameters through the flow determination model. The second flow rate is the average flow rate of the fluid during the historical time period before the acquisition time. The average flow rate represents the average value of multiple instantaneous flow rates during the historical time period. The second flow rate is used to determine the cumulative flow rate of the fluid during the historical time period. The flow determination model is used to determine the average flow rate of the fluid in the pipe.
[0169] In some embodiments, the multiple flow characteristic parameters further include density, viscosity, Reynolds number, and frictional resistance coefficient. The determination module 503 is used to determine multiple first predicted parameters of the fluid based on the fluid's state parameters and the pipe's structural parameters using a flow determination model. The multiple first predicted parameters include density, viscosity, Reynolds number, and frictional resistance coefficient. The multiple first predicted parameters are then corrected based on the multiple flow characteristic parameters of the fluid using the flow determination model to obtain corrected multiple first predicted parameters. Finally, a second flow rate of the fluid is determined based on the fluid's state parameters, the pipe's structural parameters, and the corrected multiple first predicted parameters using the flow determination model.
[0170] In some embodiments, the determining module 503 is configured to, for any first prediction parameter, determine the difference between the first prediction parameter and the flow characteristic parameter corresponding to the first prediction parameter; and, if the difference is not less than a first threshold, correct the first prediction parameter to the flow characteristic parameter corresponding to the first prediction parameter.
[0171] In some embodiments, the determining module 503 is configured to output the second flow rate of the fluid using a flow rate determination model, provided that the difference between the second flow rate of the fluid and the first flow rate obtained through computation is not greater than a second threshold.
[0172] In some embodiments, the state parameters of the fluid include its composition. The calculation module 502 is used to determine the molecular weight and molar volume of the fluid based on its composition; and to determine the density of the fluid based on its molecular weight and molar volume according to the density formula, wherein the density is positively correlated with the molecular weight and negatively correlated with the molar volume.
[0173] In some embodiments, the state parameters of the fluid include temperature, pressure, and composition. The calculation module 502 is used to determine the viscosity of each component in the fluid based on the composition and temperature of the fluid according to a first viscosity formula, wherein the first viscosity formula is used to calculate the viscosity of a single-component fluid, and each component is a component of the fluid; to determine the viscosity of the fluid based on the viscosity and molecular weight of each component according to a second viscosity formula, wherein the second viscosity formula is used to calculate the viscosity of a multi-component fluid; to determine the corrected viscosity of the fluid based on the composition, temperature, and pressure according to a correction formula; and to add the fluid viscosity to the corrected viscosity to obtain the corrected fluid viscosity.
[0174] In some embodiments, the calculation module 502 is configured to determine the first viscosity of a fluid based on the fluid's composition, temperature, and pressure at the inlet of the pipe, according to a first viscosity formula, a second viscosity formula, and a correction formula; determine the second viscosity of a fluid based on the fluid's composition, temperature, and pressure at the outlet of the pipe, according to the first viscosity formula, the second viscosity formula, and the correction formula; and use the average of the first viscosity and the second viscosity as the fluid's viscosity.
[0175] In some embodiments, the state parameters of the fluid include flow velocity, and the structural parameters of the pipe include diameter;
[0176] The calculation module 502 is used to obtain the density and viscosity of the fluid; based on the Reynolds formula, the Reynolds number of the fluid is determined based on the fluid density, viscosity, flow velocity and pipe diameter. The Reynolds number is positively correlated with the fluid density, flow velocity and pipe diameter, and negatively correlated with the fluid viscosity.
[0177] In some embodiments, the state parameters of the fluid include temperature, pressure, and composition, and the structural parameters of the pipe include absolute roughness.
[0178] The calculation module 502 is used to obtain the Reynolds number of the fluid; when the Reynolds number of the fluid is not greater than a first value, the friction resistance coefficient of the fluid is determined based on the Reynolds number of the fluid according to the first friction resistance formula, and the friction resistance coefficient of the fluid is negatively correlated with the Reynolds number of the fluid; when the Reynolds number of the fluid is not less than a second value, the friction resistance coefficient of the fluid is determined based on the Reynolds number of the fluid, the diameter of the pipe, and the absolute roughness of the pipe according to the second friction resistance formula; when the Reynolds number of the fluid is greater than the first value and less than the second value, two friction resistance coefficients of the fluid are determined according to the first friction resistance formula and the second friction resistance formula, and the larger friction resistance coefficient is taken as the friction resistance coefficient of the fluid.
[0179] In some embodiments, the structural parameters of the pipe include length and diameter;
[0180] The calculation module 502 is used to obtain the frictional resistance coefficient of the fluid; based on the flow formula, the fluid temperature, pressure, composition, and the length and diameter of the pipe, the first flow rate of the fluid is determined. The flow formula is used to calculate the instantaneous flow rate of the fluid; wherein, the fluid pressure includes the fluid pressure at the inlet of the pipe and the fluid pressure at the outlet of the pipe.
[0181] In some embodiments, the apparatus further includes:
[0182] The training module is used to construct sample data, which includes historically collected state parameters and instantaneous flow rates of the fluid in the pipe, pipe structural parameters, and multiple flow characteristic parameters of the fluid. The flow characteristic parameters are obtained by processing at least one of the pipe structural parameters and fluid state parameters in the sample data. Based on the sample data, the flow determination model determines the first average flow rate of the fluid in the pipe; based on at least one instantaneous flow rate of the fluid in the pipe, it determines the second average flow rate; based on the first and second average flow rates, it determines the training loss of the flow determination model; and based on the training loss, it trains the flow determination model.
[0183] In some embodiments, the training module is configured to determine multiple second predicted parameters of the fluid based on the structural parameters of the pipe and the state parameters of the fluid in the sample data using a flow determination model; to correct the multiple second predicted parameters based on multiple flow characteristic parameters in the sample data using a flow determination model to obtain corrected multiple second predicted parameters; and to determine a first average flow rate of the fluid in the pipe based on the structural parameters of the pipe, the state parameters of the fluid, and the corrected multiple second predicted parameters in the sample data using a flow determination model.
[0184] This application provides a flow rate determination device that, after an instrument installed on a pipeline malfunctions, uses a flow rate determination model to determine the average flow rate of the fluid in the pipeline based on the pipeline's structural parameters and the latest collected state parameters of the fluid within the pipeline. Since the average flow rate accurately reflects the average instantaneous flow rate of the fluid over a period of time, the cumulative flow rate of the fluid in the pipeline over that period can be determined relatively accurately, allowing for instrument correction based on the cumulative flow rate. To further ensure the accuracy of the determined average flow rate, multiple flow characteristic parameters of the fluid obtained through calculations based on state and structural parameters, along with the instantaneous flow rate, are input into the flow rate determination model. This allows the model to refer to the aforementioned data to determine a more accurate average flow rate, thus improving the accuracy of the determined flow rate.
[0185] It should be noted that the traffic determination device provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the terminal can be divided into different functional modules to complete all or part of the functions described above. In addition, the traffic determination method and the traffic determination method provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0186] This application also provides a terminal, which includes a processor and a memory. The memory stores at least one computer program, which is loaded and executed by the processor to implement the traffic determination method of the above embodiments.
[0187] Figure 6 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application.
[0188] Terminal 600 includes a processor 601 and a memory 602.
[0189] Processor 601 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 601 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 601 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 601 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 601 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0190] Memory 602 may include one or more computer-readable storage media, which may be non-transitory. Memory 602 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 602 are used to store at least one computer program, which is used by processor 601 to implement the flow determination method provided in the method embodiments of this application.
[0191] In some embodiments, the terminal 600 may also optionally include a peripheral device interface 603 and at least one peripheral device. The processor 601, memory 602, and peripheral device interface 603 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 603 via a bus, signal line, or circuit board. Optionally, the peripheral device includes at least one of a radio frequency circuit 604, a display screen 605, a camera assembly 606, an audio circuit 607, and a power supply 608.
[0192] Peripheral interface 603 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 601 and memory 602. In some embodiments, processor 601, memory 602 and peripheral interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 601, memory 602 and peripheral interface 603 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0193] The radio frequency (RF) circuit 604 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 604 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 604 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 604 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 604 can communicate with other devices through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 604 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0194] Display screen 605 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 605 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 601 for processing. In this case, display screen 605 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 605, disposed on the front panel of terminal 600; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 600 or in a folded design; in other embodiments, display screen 605 may be a flexible display screen, disposed on a curved or folded surface of terminal 600. Furthermore, display screen 605 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 605 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0195] The camera assembly 606 is used to acquire images or videos. Optionally, the camera assembly 606 includes a front-facing camera and a rear-facing camera. The front-facing camera is disposed on the front panel of the terminal 600, and the rear-facing camera is disposed on the back of the terminal 600. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 606 may also include a flash. The flash may be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.
[0196] The audio circuit 607 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 601 for processing, or input to the radio frequency circuit 604 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the terminal 600. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert the electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 607 may also include a headphone jack.
[0197] Power supply 608 is used to power the various components in terminal 600. Power supply 608 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 608 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0198] In some embodiments, the terminal 600 further includes one or more sensors 609. The one or more sensors 609 include, but are not limited to, an accelerometer 610, a gyroscope 611, a pressure sensor 612, an optical sensor 613, and a proximity sensor 614.
[0199] Accelerometer 610 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 600. For example, accelerometer 610 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 601 can control display screen 605 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 610. Accelerometer 610 can also be used for games or for acquiring user motion data.
[0200] The gyroscope sensor 611 can detect the orientation and rotation angle of the terminal 600. The gyroscope sensor 611 can work in conjunction with the accelerometer sensor 610 to collect the user's 3D movements on the terminal 600. Based on the data collected by the gyroscope sensor 611, the processor 601 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0201] The pressure sensor 612 can be disposed on the side bezel of the terminal 600 and / or on the lower layer of the display screen 605. When the pressure sensor 612 is disposed on the side bezel of the terminal 600, it can detect the user's grip signal on the terminal 600, and the processor 601 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 612. When the pressure sensor 612 is disposed on the lower layer of the display screen 605, the processor 601 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 605. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0202] An optical sensor 613 is used to collect ambient light intensity. In one embodiment, the processor 601 can control the display brightness of the display screen 605 based on the ambient light intensity collected by the optical sensor 613. Optionally, when the ambient light intensity is high, the display brightness of the display screen 605 is increased; when the ambient light intensity is low, the display brightness of the display screen 605 is decreased. In another embodiment, the processor 601 can also dynamically adjust the shooting parameters of the camera assembly 606 based on the ambient light intensity collected by the optical sensor 613.
[0203] A proximity sensor 614, also known as a distance sensor, is installed on the front panel of the terminal 600. The proximity sensor 614 is used to detect the distance between the user and the front of the terminal 600. In one embodiment, when the proximity sensor 614 detects that the distance between the user and the front of the terminal 600 is gradually decreasing, the processor 601 controls the display screen 605 to switch from a screen-on state to a screen-off state; when the proximity sensor 614 detects that the distance between the user and the front of the terminal 600 is gradually increasing, the processor 601 controls the display screen 605 to switch from a screen-off state to a screen-on state.
[0204] Those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on terminal 600, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0205] Figure 7This is a schematic diagram of a server structure provided in an embodiment of this application. The server 700 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 701 and one or more memories 702. The memories 702 store at least one computer program, which is loaded and executed by the processor 701 to implement the traffic determination method provided in the various method embodiments described above. Of course, the server 700 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 700 may also include other components for implementing device functions, which will not be elaborated upon here.
[0206] This application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the traffic determination method of the above embodiments.
[0207] This application also provides a computer program product, including a computer program loaded and executed by a processor to implement the traffic determination method as described in the above embodiments.
[0208] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0209] The above are merely optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present application should be included within the protection scope of the present application.
Claims
1. A method for determining flow rate, characterized in that, The method includes: Obtain the state parameters of the fluid inside the pipe; Based on at least one of the state parameters of the fluid and the structural parameters of the pipeline, a plurality of flow characteristic parameters of the fluid are obtained. The plurality of flow characteristic parameters include a first flow rate, which is the instantaneous flow rate of the fluid at the time of acquisition of the state parameters. The flow determination model determines the second flow rate of the fluid based on the fluid's state parameters, multiple flow characteristic parameters, and the pipe's structural parameters. The second flow rate is the average flow rate of the fluid over a historical period prior to the acquisition time. The average flow rate represents the average of multiple instantaneous flow rates over the historical period. The second flow rate is used to determine the cumulative flow rate of the fluid over the historical period. The flow determination model is used to determine the average flow rate of the fluid in the pipe.
2. The method according to claim 1, characterized in that, The multiple flow characteristic parameters also include density, viscosity, Reynolds number, and friction coefficient. The determination of the second flow rate of the fluid using the flow rate determination model, based on the fluid's state parameters, multiple flow characteristic parameters, and the pipe's structural parameters, includes: Based on the fluid's state parameters and the pipe's structural parameters, the flow rate determination model determines multiple first predicted parameters of the fluid, including density, viscosity, Reynolds number, and friction coefficient. The flow rate determination model is used to correct the multiple first prediction parameters based on multiple flow characteristic parameters of the fluid, thereby obtaining the corrected multiple first prediction parameters. The second flow rate of the fluid is determined using the flow rate determination model, based on the fluid's state parameters, the pipe's structural parameters, and the corrected plurality of first prediction parameters.
3. The method according to claim 2, characterized in that, The process of correcting the plurality of first prediction parameters based on the plurality of flow characteristic parameters of the fluid to obtain the corrected plurality of first prediction parameters includes: For any first prediction parameter, determine the difference between the first prediction parameter and the flow characteristic parameter corresponding to the first prediction parameter; If the difference is not less than the first threshold, the first prediction parameter is corrected to the flow characteristic parameter corresponding to the first prediction parameter.
4. The method according to claim 2, characterized in that, Determining the second flow rate of the fluid includes: If the difference between the second flow rate of the fluid and the first flow rate obtained by calculation is not greater than a second threshold, the second flow rate of the fluid is output through the flow rate determination model.
5. The method according to claim 1, characterized in that, The fluid's state parameters include its composition. The process involves calculating at least one of the fluid's state parameters and the pipe's structural parameters to obtain multiple flow characteristic parameters of the fluid, including: Based on the composition of the fluid, determine the molecular weight and molar volume of the fluid; The density of the fluid is determined based on the molecular weight and molar volume according to the density formula, wherein the density is positively correlated with the molecular weight and negatively correlated with the molar volume.
6. The method according to claim 1, characterized in that, The fluid's state parameters include temperature, pressure, and composition. The process involves calculating at least one of the fluid's state parameters and the pipe's structural parameters to obtain multiple flow characteristic parameters of the fluid, including: According to the first viscosity formula, based on the composition of the fluid and the temperature of the fluid, the viscosity of each component in the fluid is determined. The first viscosity formula is used to calculate the viscosity of a single-component fluid, where each component is a component that makes up the fluid. The viscosity of the fluid is determined based on the viscosity and molecular weight of each component according to the second viscosity formula. The second viscosity formula is used to calculate the viscosity of a multi-component fluid. The corrected viscosity of the fluid is determined based on the fluid's composition, temperature, and pressure, according to the correction formula. The corrected viscosity of the fluid is obtained by adding the viscosity of the fluid to the corrected viscosity.
7. The method according to claim 6, characterized in that, The method further includes: Based on the first viscosity formula, the second viscosity formula, and the correction formula, the first viscosity of the fluid is determined according to the composition of the fluid, the temperature and pressure of the fluid at the inlet of the pipe; The second viscosity of the fluid is determined based on the composition of the fluid, the temperature and pressure of the fluid at the outlet of the pipe, according to the first viscosity formula, the second viscosity formula, and the correction formula. The average of the first viscosity and the second viscosity is taken as the viscosity of the fluid.
8. The method according to claim 1, characterized in that, The fluid's state parameters include flow velocity, and the pipe's structural parameters include diameter; The process involves calculating at least one of the fluid's state parameters and the pipe's structural parameters to obtain multiple flow characteristic parameters of the fluid, including: Obtain the density and viscosity of the fluid; According to the Reynolds equation, the Reynolds number of the fluid is determined based on the fluid's density, viscosity, flow velocity, and the pipe's diameter. The Reynolds number is positively correlated with the fluid's density, flow velocity, and pipe diameter, and negatively correlated with the fluid's viscosity.
9. The method according to claim 1, characterized in that, The structural parameters of the pipeline also include absolute roughness; The process involves calculating at least one of the fluid's state parameters and the pipe's structural parameters to obtain multiple flow characteristic parameters of the fluid, including: Obtain the Reynolds number of the fluid; When the Reynolds number of the fluid is not greater than a first value, the frictional resistance coefficient of the fluid is determined based on the Reynolds number of the fluid according to the first frictional resistance formula. The frictional resistance coefficient of the fluid is negatively correlated with the Reynolds number of the fluid. When the Reynolds number of the fluid is not less than the second value, the frictional resistance coefficient of the fluid is determined according to the second frictional resistance formula, based on the Reynolds number of the fluid, the diameter of the pipe, and the absolute roughness of the pipe. When the Reynolds number of the fluid is greater than the first value and less than the second value, the two friction resistance coefficients of the fluid are determined according to the first friction resistance formula and the second friction resistance formula, and the larger friction resistance coefficient is taken as the friction resistance coefficient of the fluid.
10. The method according to claim 1, characterized in that, The fluid's state parameters include temperature, pressure, and composition; the pipe's structural parameters include length and diameter. The process involves calculating at least one of the fluid's state parameters and the pipe's structural parameters to obtain multiple flow characteristic parameters of the fluid, including: Obtain the frictional resistance coefficient of the fluid; Based on the flow formula, the first flow rate of the fluid is determined according to the fluid's temperature, pressure, composition, and the length and diameter of the pipe. The flow formula is used to calculate the fluid's instantaneous flow rate. The pressure of the fluid includes the pressure of the fluid at the inlet of the pipe and the pressure of the fluid at the outlet of the pipe.
11. The method according to claim 1, characterized in that, The training process of the traffic determination model includes: Construct sample data, which includes historically collected state parameters and instantaneous flow rate of the fluid in the pipeline, structural parameters of the pipeline, and multiple flow characteristic parameters of the fluid. The flow characteristic parameters are obtained by processing at least one of the structural parameters of the pipeline and the state parameters of the fluid in the sample data. Based on sample data from the pipeline, the flow rate determination model is used to determine the first average flow rate of the fluid within the pipeline. A second average flow rate of the fluid in the pipe is determined based on at least one instantaneous flow rate of the fluid in the pipe; Based on the first average flow and the second average flow, the training loss of the flow determination model is determined; The traffic determination model is trained based on the training loss.
12. The method according to claim 11, characterized in that, The step of determining the first average flow rate of the fluid in the pipe based on sample data from the pipe using the flow rate determination model includes: Based on the structural parameters of the pipe and the state parameters of the fluid in the sample data, the flow rate determination model determines multiple second prediction parameters of the fluid. The flow determination model is used to correct the multiple second prediction parameters based on multiple flow characteristic parameters in the sample data, resulting in the corrected multiple second prediction parameters. The flow rate determination model determines the first average flow rate of the fluid in the pipe based on the structural parameters of the pipe, the state parameters of the fluid, and the corrected plurality of second prediction parameters in the sample data.
13. A flow rate determination device, characterized in that, The device includes: The acquisition module is used to acquire the state parameters of the fluid inside the pipeline; The calculation module is used to perform calculations based on at least one of the state parameters of the fluid and the structural parameters of the pipe to obtain multiple flow characteristic parameters of the fluid, wherein the multiple flow characteristic parameters include a first flow rate, which is the instantaneous flow rate of the fluid at the time of acquisition of the state parameters; The determination module is used to determine the second flow rate of the fluid based on the fluid's state parameters, multiple flow characteristic parameters, and the pipe's structural parameters using a flow determination model. The second flow rate is the average flow rate of the fluid over a historical time period prior to the acquisition time. The average flow rate represents the average of multiple instantaneous flow rates over the historical time period. The second flow rate is used to determine the cumulative flow rate of the fluid over the historical time period. The flow determination model is used to determine the average flow rate of the fluid in the pipe.
14. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the method for determining traffic as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the method for determining traffic as described in any one of claims 1 to 12.
16. A computer program product, comprising a computer program, characterized in that, The computer program is loaded and executed by a processor to implement the method for determining traffic as described in any one of claims 1 to 12.