A method and system for processing flow data from a measuring station to a river section
By determining the upstream and downstream relationship and confluence interval between the measuring station and the river section, and calculating the flow data model, the accuracy problem of flow data in river sections without measuring station information is solved, and a highly accurate flow data model is generated, which is suitable for watershed management.
Patent Information
- Application Number
- CN202411335380.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-09-24
AI Technical Summary
In the existing technology, due to the lack of measuring station information in some river basins, the flow data of river sections cannot be accurately analyzed, and the existing supervised learning model is difficult to ensure the accuracy of the flow model.
By obtaining the water system data of the target basin, determining the upstream and downstream relationship between the measuring station and each river section and the range of the confluence interval, calculating the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station, and using interpolation calculation to generate the river section flow data model.
It has achieved the completion of flow data for river sections without meter station information and generated a highly accurate flow data model for the target river basin, which is suitable for river basin analysis and management of various sizes.
Smart Images

Figure CN119416686B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hydrological data analysis, and more particularly to a method and system for processing flow data from a measuring station to a river section. Background Art
[0002] A measuring station is a general term for various hydrological observation sites established within rivers, lakes, channels, reservoirs, and river basins to collect hydrological monitoring data. Measuring stations monitor the quality and quantity of regional water resources, providing basic information and data for water resource management, flood forecasting, and reservoir scheduling. They are an important source of data for scientific research and support for river basin management. Flow is one of the most important factors monitored by measuring stations. Although a relatively comprehensive network of monitoring stations has been established, there are still large sections of rivers in some river basins that lack measuring station information. These flow conditions require complex deductions using hydrological models, remote sensing monitoring, and other technologies. Therefore, developing a fast, automatic, and easy-to-use method for deriving river section flow data from measuring station flow data can help river basin managers analyze the flow conditions of various river sections within the basin, which is of great significance for river basin management and the rational use of water resources.
[0003] Currently, there are proposals to use machine learning to estimate river flow. This involves detecting and filling missing values in station hydrological data. Furthermore, supervised learning is performed using average cross-sectional water depth and flooded area data from primary stations, along with data from secondary stations, to generate a generalized model of station flow. However, because some river sections lack station information, flow models constructed solely based on supervised learning are difficult to guarantee accuracy. Summary of the Invention
[0004] In order to overcome the defect in the prior art that a large number of river sections in some river basins still have no measuring station information and cannot accurately analyze the flow data of river sections, the present invention provides a flow data processing method and system from measuring stations to river sections.
[0005] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0006] A method for processing flow data from a measuring station to a river section comprises the following steps:
[0007] Obtain the water system data of the target basin, and determine the upstream and downstream relationship between the measuring station and each river section and the confluence range of each measuring station based on the distance between the measuring station and each river section;
[0008] Pre-process the flow data collected by each measuring station in the target watershed;
[0009] Based on the pre-processed flow data and the confluence range of each measuring station, the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station are calculated;
[0010] Based on the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station, the flow of each river section is interpolated and calculated to generate the flow data model of the target basin water system.
[0011] Furthermore, the present invention also proposes a flow data processing system from a measuring station to a river section, which applies the flow data processing method from a measuring station to a river section proposed in the present invention. The system includes:
[0012] Data acquisition module, used to obtain water system data of target basin;
[0013] Data preprocessing module, used to preprocess the flow data collected by each measuring station in the target watershed;
[0014] The river section division module is used to determine the upstream and downstream relationship between the measuring station and each river section and the confluence range of each measuring station according to the distance between the measuring station and each river section;
[0015] The flow calculation module of the measuring station is used to calculate the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station based on the pre-processed flow data and the confluence interval range of each measuring station;
[0016] The river section flow interpolation module is used to interpolate the flow of each river section based on the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station, and generate the target basin water system flow data model.
[0017] Furthermore, the present invention also proposes a storage medium on which computer-readable instructions are stored, wherein when the computer-readable instructions are executed by a processor, all or part of the steps of the method for processing flow data from a measuring station to a river section as described in the present invention are implemented.
[0018] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0019] The present invention determines the river section type based on the upstream and downstream relationship of each river section and the confluence range of each measuring station. It then interpolates the flow of each river section based on the river section type and the inflow and outflow of the confluence range of the measuring station and the runoff modulus. This is used to supplement some river sections without measuring station information, thereby obtaining a more accurate target basin water system flow data model.
[0020] The present invention uses publicly available digital elevation model data and flow data from a small number of measuring stations to interpolate flow data for each river section within a watershed, obtaining a complete and highly accurate flow data model. Furthermore, in the interpolation of river section flow, there are no restrictions on the scale of the watershed, the number of river sections, or the number of measuring stations. This makes the method particularly suitable for watershed analysis and management work where measuring station information is missing. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1The figure is a flow chart of a method for processing flow data from a measuring station to a river section according to one embodiment of the present invention. Figure 2 The figure shows the spatial distribution of original digital elevation model data and survey station locations of the Xijiang River Basin according to one embodiment of the present invention.
[0022] Figure 3 The diagram is a schematic diagram of the encoded Xijiang River Basin water system according to one embodiment of the present invention.
[0023] Figure 4 The figure is a schematic diagram showing the upstream and downstream relationship between river sections and measuring stations in the Xijiang River Basin according to one embodiment of the present invention.
[0024] Figure 5 Schematic diagram of the runoff modulus of each confluence interval according to an embodiment of the present invention.
[0025] Figure 6 Schematic diagram of flow data interpolation results for a river section in the Xijiang River Basin according to one embodiment of the present invention.
[0026] Figure 7 The figure is an architecture diagram of a flow data processing system from a measuring station to a river section according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.
[0028] The terms used in this invention are for the purpose of describing specific embodiments only and are not intended to limit the invention. The singular forms "a," "the," and "the" used in this invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0029] It should be understood that although the terms "first," "second," "third," etc. may be used in the present invention to describe various information, such information should not be limited to these terms. These terms are merely used to distinguish information of the same type from one another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. Depending on the context, the term "if" as used herein may be interpreted as "when," "when," or "in response to determining."
[0030] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] Example 1
[0032] This embodiment proposes a method for processing flow data from a measuring station to a river section, such as Figure 1 FIG. 1 is a flow chart of the method for processing flow data from a measuring station to a river section according to the present embodiment.
[0033] The method for processing flow data from a measuring station to a river section proposed in this embodiment includes the following steps:
[0034] S1. Obtain the water system data of the target basin, and determine the upstream and downstream relationship between the measuring station and each river section and the confluence range of each measuring station based on the distance between the measuring station and each river section;
[0035] S2. Preprocess the flow data collected by each measuring station in the target watershed;
[0036] S3. Calculate the inflow and outflow flow and runoff modulus of the confluence interval of each measuring station based on the preprocessed flow data and the confluence interval range of each measuring station;
[0037] S4. Based on the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station, interpolation calculation is performed on the flow of each river section to generate the flow data model of the target basin water system.
[0038] In this embodiment, the river section type is determined based on the upstream and downstream relationship of each river section and the confluence range of each measuring station. The flow of each river section is interpolated based on the river section type combined with the inflow and outflow of the confluence interval and the runoff modulus of the measuring station. This is used to complete some river sections without measuring station information and obtain a highly accurate target basin water system flow data model.
[0039] This embodiment uses publicly available digital elevation model data and flow data from a small number of measuring stations to interpolate flow data for each river section within a watershed, resulting in a complete and highly accurate flow data model. Furthermore, in the river section flow interpolation, there are no restrictions on the size of the watershed, the number of river sections, or the number of measuring stations. This makes it particularly suitable for watershed analysis and management work where measuring station information is missing.
[0040] In an optional embodiment, the target watershed water system data obtained in step S1 includes watershed water system and sub-watershed data extracted from the digital elevation model, as well as reservoir station location data and reservoir inflow and outflow data; wherein, each river section in the watershed water system data contains river section identifiers, upstream and downstream river section identifiers and other information; the sub-watershed data contains river section identifier information, which corresponds one-to-one to the river section identifier.
[0041] Further optionally, in order to facilitate the judgment of the upstream and downstream relationship between the measuring station and the river section, the river basin water system is coded. Wherein, according to the target river basin water system data, each river section is coded; wherein, the outlet river section code in the target river basin water system is set to an initial code;
[0042] Starting from the outlet river section, traverse each river section, encode the upstream main river section of the current river section according to a preset first encoding rule, and encode the upstream branch river section of the current river section according to a preset second encoding rule.
[0043] Exemplarily, the first encoding rule is to add 1 to the end of the current code; the second encoding rule is to add an initial code to the end of the current code.
[0044] For example, the outlet river section in the target watershed is coded as 001, and starting from the outlet river section, each river section is traversed, and its upstream main river section is coded as 002, and its upstream branch river section is coded as 001001;
[0045] For the river section coded as 001002, its upstream main river section is coded as 001003, and its upstream branch river section is coded as 001002001.
[0046] In the process of determining the upstream and downstream relationship between the measuring station and each river section, this embodiment can directly determine the upstream and downstream relationship between the river sections, and the upstream and downstream relationship between the river sections and the measuring station based on the coding information.
[0047] In another optional embodiment, the river section code is set according to the river section identifier in the target watershed water system data.
[0048] Those skilled in the art can select appropriate coding rules based on the complexity of the actual river basin water system data, which will not be elaborated here.
[0049] In an optional embodiment, determining the upstream and downstream relationship between the measuring station and each river section based on the distance between the measuring station and each river section in step S1 includes the following steps:
[0050] For the i-th measuring station, calculate the Euclidean distance between it and each river section, and take the river section code corresponding to the river section r with the smallest Euclidean distance as the location code of measuring station i i ; Its expression is:
[0051] d i,r =f(reach r ,cood i ),r=1,2,...,N
[0052] Code i =Code r |d i,r =dmin
[0053] Among them, d i,r Represents the Euclidean distance between station i and river section r; reach r is the vector element of river section r, cood i Indicates the coordinates of station i; N is the total number of river sections in the target basin water system data; Code r Indicates the river section code corresponding to river section r; d min is the minimum distance between the measuring station and the river section;
[0054] According to the location code of each station, determine the upstream station of station i;
[0055] Traverse each river section in the target basin water system and code the code according to the location of station i i , determine the upstream and downstream relationship between the river section and the measuring station i, and obtain the upstream river section set L of the measuring station i i , and the confluence interval river section set C included in the confluence interval between station i and the upstream station i ; Its expression is:
[0056]
[0057] Among them, L j is the upstream river section set of the jth upstream station of station i;
[0058] The river section set C of the confluence interval from the measuring station i i Extract the sub-basin number of the river section and get the confluence range B of the measuring station i i ; Its expression is:
[0059] B i ={b r |Code r ∈C i}
[0060] Among them, b r is the sub-basin number corresponding to river segment r.
[0061] This embodiment determines the river section location of the measuring station by calculating the Euclidean distance between the measuring station and each river section. Furthermore, the river section code with the closest distance is used as the measuring station code of the measuring station to facilitate the subsequent flow data model construction.
[0062] Furthermore, in an optional embodiment, step S1 further includes the following steps:
[0063] For the confluence section river section set C of station i iFor any river section included in , the station code of station i is added to the downstream station field DownSta of the river section; for the confluence interval between the most downstream station and the basin outlet, the downstream station field DownSta of the corresponding river section is marked with an empty string, indicating that there is no downstream station information;
[0064] Traverse any two stations i and j with a direct upstream-downstream relationship. For any river section that the flow path between the downstream station i and the upstream station j passes through, add the station code of the upstream station j to the upstream station field UpSta of the river section. For river sections without upstream stations, mark their upstream station field UpSta with an empty string, indicating that there is no upstream station information.
[0065] The river type of any river section is determined based on the values of the UpSta and DownSta fields. The determination conditions are as follows:
[0066]
[0067] Among them, RT is the river section type; RT=1 means that the river section is the upstream section of the measuring station and only has the downstream measuring station information, but no upstream measuring station information; RT=2 means that the river section is the downstream section of the measuring station and only has the upstream measuring station information, but no downstream measuring station information; RT=3 means that the river section is the intermediate section of the measuring station and has both upstream and downstream measuring station information; RT=4 means that the river section has no measuring station information.
[0068] In this embodiment, according to the upstream and downstream relationship between the river section and the measuring station, the river section is divided into four types: upstream river section of the measuring station, downstream river section of the measuring station, river section between the measuring station, and river section without measuring station information. This facilitates the identification and classification of river section types and adopts an adaptive calculation method for flow interpolation calculation.
[0069] In an optional embodiment, the flow data collected by each measuring station in the target watershed system is pre-processed in step S2, including the following steps:
[0070] The original flow data collected by the measuring station are resampled and converted into daily scale data;
[0071] Count the number of missing values on each date in the transformed traffic data; the expression is:
[0072]
[0073] Among them, F t is the number of missing values in the outbound and inbound flow data of each station on day t; f(·) is a judgment function, which takes the value of 1 if the value is correct, otherwise it takes the value of 0; i,t represents the outflow flow of station i on day t; I i,t represents the inflow flow of station i on day t;
[0074] The first and last missing values F t The dates corresponding to 0 are used as the start and end dates of the data, and the flow data of each measuring station are aligned; the missing values in the inlet and outlet flow data of each measuring station that have been aligned are interpolated and filled.
[0075] Considering that each reservoir station may have inflow and outflow data with different time spans, this embodiment aligns the flow data of each station and then fills in the missing values in the data set.
[0076] Furthermore, in an optional embodiment, step S3 calculates the inflow and outflow flow and runoff modulus of the confluence interval of each measuring station based on the preprocessed flow data and the confluence interval range of each measuring station, including the following steps:
[0077] According to the confluence range B of station i i , obtain the area of each sub-basin within the confluence interval, and obtain the confluence interval area CA of the measuring station i i ; Its expression is:
[0078]
[0079] Among them, area l is the area corresponding to the lth sub-basin;
[0080] For the confluence range B of station i i , the inflow and outflow flow of this confluence interval is:
[0081]
[0082] QCA out,t =I i,t
[0083] Among them, QCA in,t is the inflow on day t; O j,t represents the outflow volume at the jth upstream station on the tth day; QCA out,t is the outflow on day t, and the outflow in this interval is consistent with the inflow at the downstream station; I i,t represents the inflow volume of station i on day t; n is the number of upstream stations of station i.
[0084] Then, for a confluence interval with upstream and downstream stations, the runoff modulus M on day t is t for:
[0085]
[0086] For the confluence interval with only downstream stations, the runoff modulus M on day t is t for:
[0087]
[0088] For the confluence interval with only upstream stations, the runoff modulus M on day t is t for:
[0089]
[0090] Among them, I j,t is the inflow volume at the jth upstream station on the tth day; A j is the catchment area of the jth upstream station.
[0091] Furthermore, in an optional embodiment, in step S4, interpolation calculation of the flow of each river section is performed based on the inflow and outflow flow and the runoff modulus of the confluence interval of the measuring station, including the following steps:
[0092] Traverse each river section and time, and calculate the interpolated flow of the river section based on the upstream measuring station information of the current river section; where:
[0093] (1) For a river section r with upstream station information, according to its catchment range RA within the confluence interval, r Calculate the interpolated flow Q of the river section on day t r,t ; Its expression is:
[0094]
[0095]
[0096] Among them, A r is the catchment area of river section r, L r is the upstream river section set of river section r, Code p Indicates the code of the pth river section in the upstream river section set, area p represents the sub-basin area corresponding to the p-th river section in the upstream river section set; M r,t It represents the runoff modulus of the confluence interval of the measuring station belonging to river section r on day t.
[0097] This embodiment takes into account that the catchment area of the river section r with upstream station information overlaps with the catchment area of the upstream station, and therefore subtracts the catchment area of the current river section from the catchment area of the upstream station.
[0098] (2) For a river section r′ without upstream station information, calculate the interpolated flow Q of the river section on day t. r′,t ; Its expression is:
[0099] Q r′,t =M r′,t *A r′
[0100]
[0101] Among them, A r′ is the catchment area of river section r′, L r′ is the upstream river section set of river section r′, Code p′ Indicates the code of the p′th river section in the upstream river section set, area p′ represents the sub-basin area corresponding to the p′th river section in the upstream river section set; M r′,t It represents the runoff modulus of the confluence interval of the measuring station to which the river section r′ belongs on the t day.
[0102] After the traversal is completed, a target watershed water system flow data model is constructed by combining the target watershed water system data and the interpolated flow of each river section.
[0103] Furthermore, in an optional embodiment, the method further comprises the following steps:
[0104] Visualize the target watershed water system data and the interpolated river flow;
[0105] Adjust the width of river feature lines according to the interpolated flow values;
[0106] According to the upstream and downstream relationship between the river section and the measuring station, the river element line type of different colors is used to reflect the river section type;
[0107] According to the coding level of the river section, different colors are used to reflect the coded river level.
[0108] This embodiment visualizes elements such as river section flow, river section type, and river section code based on the target watershed water system data and interpolated river section flow data, which helps watershed management workers analyze the flow conditions of each river section in the basin.
[0109] Example 2
[0110] This embodiment applies the flow data processing method from the measuring station to the river section proposed in Example 1 to process the flow data of the river section in the Xijiang River Basin on October 20, 2015.
[0111] Exemplarily, this embodiment performs traffic data processing based on the open source Python language platform.
[0112] Firstly, the target basin water system data, including the digital elevation model, station location data, and station flow data of the Xijiang River Basin on October 20, 2015, were extracted. The TauDEM program was called using the third-party library pygeoc in Python to process the digital elevation model to extract the Xijiang River Basin water system data on October 20, 2015, and then the basin water system was coded.
[0113] like Figure 2 、 3 As shown, Figure 2 It is the spatial distribution map of the original digital elevation model data and the measurement station locations; Figure 3 This is a schematic diagram of the encoded Xijiang River Basin water system.
[0114] The upstream stations and upstream river sections of each station were identified using the river section codes. Set operations were performed using Python's Set object to determine the set of river sections corresponding to the station's confluence interval. The confluence interval of the station was determined based on the identifiers of each river section and the identifiers of each sub-basin in the sub-basin data.
[0115] Use GeoPandas to create a GeoDataFrame object indexed by the river section code to store the upstream and downstream gauging stations and the section type. The downstream gauging station of the section is determined based on the confluence range of the gauging stations, and the upstream gauging station is determined based on the flow path between the gauging stations. Finally, the section is divided into sections upstream of the gauging station, downstream of the gauging station, sections between gauging stations, and sections without gauging stations based on the upstream and downstream gauging stations.
[0116] like Figure 4 The figure shows the upstream and downstream relationship between the river sections and measuring stations in the Xijiang River Basin.
[0117] All station flow data are merged into the same DataFrame. The resample method is used to resample the flow data into daily scale data. Then, the isna and sum methods are used to count the number of missing values on each date. The data records with missing values at the beginning and end of the dataset are discarded to obtain a set of station flow data with a consistent time span. The interpolate method is then used to fill in the missing values in the dataset.
[0118] Use the read_file method in GeoPandas to read the sub-basin data. Then, filter the river sections in the confluence interval of the measuring station to obtain the sub-basin set. Use the geometry.area method to calculate the area of each sub-basin. Then, use the sum method of the Series object to calculate the area of the confluence interval of the measuring station.
[0119] According to whether the confluence interval of each measuring station has upstream and downstream measuring stations, the corresponding method is used to calculate the runoff modulus of the confluence interval, and the results are as follows: Figure 5 Schematic diagram of runoff modulus of each confluence interval shown.
[0120] Traverse each river section in the basin's drainage system and interpolate the flow at each section. Create an empty DataFrame object, whose index is the section code and whose columns are the timestamps of the flow data. Based on the section type, retrieve the runoff modulus data for the confluence interval of the section and the data from upstream and downstream stations. Apply different calculation methods to interpolate the flow at that section and fill the corresponding position in the DataFrame. This will create a flow data model for the target basin system, completing the interpolation of the section flow.
[0121] Finally, the to_excel method is used to save the calculation results as an Excel file, which makes it easier for watershed managers to analyze the flow conditions of various river sections in the watershed.
[0122] When visualizing the flow data model of the target river basin system, use the read_excel method in pandas to read the interpolation calculation results of the river section flow and index to the value of the day of display as a Series object. According to the river section code, use the loc method of the Series object to add the river section flow to the river basin system to form the Xijiang River Basin water system with flow data. Finally, use the Basemap method in basemap to create a map of the Xijiang River Basin, and use the ListedColormap and BoundaryNorm methods in matplotlib to create a color bar with scales to display the river section flow data of the Xijiang River Basin, as shown below. Figure 6 Schematic diagram of flow data interpolation results for the Xijiang River Basin section shown.
[0123] Example 3
[0124] This embodiment proposes a flow data processing system from a measuring station to a river section, and applies the flow data processing method from a measuring station to a river section proposed in Example 1. Figure 7 FIG. 1 is an architecture diagram of the flow data processing system from the measuring station to the river section according to the present embodiment.
[0125] The flow data processing system from the measuring station to the river section proposed in this embodiment includes:
[0126] Data acquisition module, used to obtain water system data of target basin;
[0127] Data preprocessing module, used to preprocess the flow data collected by each measuring station in the target watershed;
[0128] The river section division module is used to determine the upstream and downstream relationship between the measuring station and each river section and the confluence range of each measuring station according to the distance between the measuring station and each river section;
[0129] The flow calculation module of the measuring station is used to calculate the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station based on the pre-processed flow data and the confluence interval range of each measuring station;
[0130] The river section flow interpolation module is used to interpolate the flow of each river section based on the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station, and generate the target basin water system flow data model.
[0131] It can be understood that the system of this embodiment corresponds to the method of the above-mentioned embodiment 1, and the options in the above-mentioned embodiment 1 are also applicable to this embodiment, so they will not be described again here.
[0132] Example 4
[0133] This embodiment proposes a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes all or part of the steps of the flow data processing method from the measuring station to the river section proposed in Example 1.
[0134] Example 5
[0135] This embodiment proposes a storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement all or part of the steps of the method for processing flow data from a measuring station to a river section proposed in Example 1.
[0136] Exemplarily, the storage medium includes, but is not limited to, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media that can store program codes.
[0137] Exemplarily, the instructions, programs, code sets or instruction sets may be implemented using conventional programming languages.
[0138] Exemplarily, the processor includes but is not limited to a smart phone, a personal computer, a server, a network device, etc., and is used to execute all or part of the steps of the flow data processing method from the measuring station to the river section described in Example 1.
[0139] Each embodiment of the present invention is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiment. The device embodiment described above is merely exemplary. The modules described as separate components may or may not be physically separated. When implementing the scheme of the present invention, the functions of each module can be implemented in the same one or more software and / or hardware. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the scheme of this embodiment.
[0140] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.
Claims
1. A method for processing flow data from a measuring station to a river section, characterized in that: The following steps are involved: Obtain the water system data of the target basin, and determine the upstream and downstream relationship between the measuring station and each river section and the confluence range of each measuring station based on the distance between the measuring station and each river section; The target watershed water system data includes measuring station location data, as well as river section coordinates and river section identifiers of each river section; Then, the upstream and downstream relationship between the measuring station and each river section is determined according to the distance between the measuring station and each river section, including the following steps: For the i-th measuring station, calculate the Euclidean distance between it and each river section, and take the river section code corresponding to the river section r with the smallest Euclidean distance as the location code of measuring station i i ; Its expression is: d i,r =f(reach r ,cood i ),r=1,2,...,N Code i =Code r |d i,r =d min Among them, d i,r Represents the Euclidean distance between station i and river section r; reach r is the vector element of river section r, cood i Indicates the coordinates of station i; N is the total number of river sections in the target basin water system data; Code r Indicates the river section code corresponding to river section r; d min is the minimum distance between the measuring station and the river section; According to the location code of each station, determine the upstream station of station i; Traverse each river section in the target basin water system and code the code according to the location of station i i , determine the upstream and downstream relationship between the river section and the measuring station i, and obtain the upstream river section set L of the measuring station i i , and the confluence interval river section set C included in the confluence interval between station i and the upstream station i ; Its expression is: Among them, L j is the upstream river section set of the jth upstream station of station i; n is the number of upstream stations of station i; The river section set C of the confluence interval from the measuring station i i Extract the sub-basin number of the river section and get the confluence range B of the measuring station i i ; Its expression is: B i ={b r |Code r ∈C i } Among them, b r is the sub-basin number corresponding to river segment r; Pre-process the flow data collected by each measuring station in the target watershed; Based on the pre-processed flow data and the confluence range of each measuring station, the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station are calculated; Based on the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station, the flow of each river section is interpolated and calculated to generate the flow data model of the target basin water system.
2. The method for processing flow data from a measuring station to a river section according to claim 1, characterized in that: The method further comprises the following steps: For the confluence section river section set C of station i i For any river section included in , the station code of station i is added to the downstream station field DownSta of the river section; for the confluence interval between the most downstream station and the basin outlet, the downstream station field DownSta of the corresponding river section is marked with an empty string, indicating that there is no downstream station information; Traverse any two stations i and j with a direct upstream-downstream relationship. For any river section that the flow path between the downstream station i and the upstream station j passes through, add the station code of the upstream station j to the upstream station field UpSta of the river section. For river sections without upstream stations, mark their upstream station field UpSta with an empty string, indicating that there is no upstream station information. The river type of any river section is determined based on the values of the UpSta and DownSta fields. The determination conditions are as follows: Among them, RT is the river section type; RT=1 means that the river section is the upstream section of the measuring station and only has the downstream measuring station information, but no upstream measuring station information; RT=2 means that the river section is the downstream section of the measuring station and only has the upstream measuring station information, but no downstream measuring station information; RT=3 means that the river section is the intermediate section of the measuring station and has both upstream and downstream measuring station information; RT=4 means that the river section has no measuring station information.
3. The method for processing flow data from a measuring station to a river section according to claim 1, characterized in that: The method further comprises the following steps: According to the target watershed water system data, each river section is coded; wherein, an initial code is set for the outlet river section code in the target watershed water system; Starting from the outlet river section, traverse each river section, encode the upstream main river section of the current river section according to a preset first encoding rule, and encode the upstream branch river section of the current river section according to a preset second encoding rule.
4. The method for processing flow data from a measuring station to a river section according to claim 1, characterized in that: The pre-processing of the flow data collected by each measuring station in the target watershed includes the following steps: The original flow data collected by the measuring station are resampled and converted into daily scale data; Count the number of missing values on each date in the transformed traffic data; the expression is: Among them, F t is the number of missing values in the outbound and inbound flow data of each station on day t; f(·) is a judgment function, which takes the value of 1 if the value is correct, otherwise it takes the value of 0; i,t represents the outflow flow of station i on day t; I i,t represents the inflow flow of station i on day t; The first and last missing values F t The dates corresponding to 0 are used as the start and end dates of the data, and the flow data of each measuring station are aligned; the missing values in the inflow and outflow data of each measuring station that have been aligned are interpolated and filled.
5. The method for processing flow data from a measuring station to a river section according to claim 1, characterized in that: The calculation of the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station includes the following steps: According to the confluence range B of station i i , obtain the area of each sub-basin within the confluence interval, and obtain the confluence interval area CA of the measuring station i i ; Its expression is: Among them, area l is the area corresponding to the lth sub-basin; For the confluence range B of station i i , the inflow and outflow flow of this confluence interval is: QCA out,t =I i,t Among them, QCA in,t is the inflow on day t; O j,t represents the outflow volume at the jth upstream station on the tth day; QCA out,t is the outflow on day t; I i,t represents the inflow volume of station i on day t; n is the number of upstream stations of station i; Then, for a confluence interval with upstream and downstream stations, the runoff modulus M on day t is t for: For the confluence interval with only downstream stations, the runoff modulus M on day t is t for: For the confluence interval with only upstream stations, the runoff modulus M on day t is t for: Among them, I j,t is the inflow volume at the jth upstream station on the tth day; A j is the catchment area of the jth upstream station.
6. The method for processing flow data from a measuring station to a river section according to claim 5, characterized in that: The interpolation calculation of the flow of each river section based on the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station includes the following steps: Traverse each river section and time, and calculate the interpolated flow of the river section based on the upstream measuring station information of the current river section; where: For a river section r with upstream station information, according to its catchment range RA within the confluence interval r Calculate the interpolated flow Q of the river section on day t r,t ; Its expression is: Among them, A r is the catchment area of river section r, L r is the upstream river section set of river section r, Code p Indicates the code of the pth river section in the upstream river section set, area p represents the sub-basin area corresponding to the p-th river section in the upstream river section set; M r,t It represents the runoff modulus of the confluence interval of the measuring station belonging to the river section r on the tth day; For a river section r′ without upstream station information, calculate the interpolated flow Q of the river section on day t. r′,t ; Its expression is: Q r′,t =M r′,t *A r′ Among them, A r′ is the catchment area of river section r′, L r′ is the upstream river section set of river section r′, Code p′ Indicates the code of the p′th river section in the upstream river section set, area p′ represents the sub-basin area corresponding to the p′th river section in the upstream river section set; M r′,t It represents the runoff modulus of the confluence interval of the measuring station belonging to the river section r′ on the tth day; After the traversal is completed, a target watershed water system flow data model is constructed by combining the target watershed water system data and the interpolated flow of each river section.
7. The method for processing flow data from a measuring station to a river section according to any one of claims 1 to 6, characterized in that: The method further comprises the following steps: Visualize the target watershed water system data and the interpolated river flow; where: Adjust the width of river feature lines according to the interpolated flow values; According to the upstream and downstream relationship between the river section and the measuring station, the river element line type of different colors is used to reflect the river section type; According to the coding level of the river section, different colors are used to reflect the coded river level.
8. A flow data processing system from a measuring station to a river section, applying the flow data processing method from a measuring station to a river section according to any one of claims 1 to 7, characterized in that: include: Data acquisition module, used to obtain water system data of target basin; Data preprocessing module, used to preprocess the flow data collected by each measuring station in the target watershed; The river section division module is used to determine the upstream and downstream relationship between the measuring station and each river section and the confluence range of each measuring station according to the distance between the measuring station and each river section; The flow calculation module of the measuring station is used to calculate the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station based on the pre-processed flow data and the confluence interval range of each measuring station; The river section flow interpolation module is used to interpolate the flow of each river section based on the inflow and outflow flow and runoff modulus of the confluence interval of the measuring station, and generate the target basin water system flow data model.
9. A storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, all or part of the steps of the method for processing flow data from a measuring station to a river section as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for cooperatively and optimally allocating water volume in non-flood season
CN102156914A
Fast coding method for a large quantity of sub-basins on basis of digital river network
CN108804804A