Water quantity and quality spatiotemporal tracing method, device, electronic device and storage medium
Through the spatiotemporal tracing method of water quantity and quality, we obtain basin rainfall data, solve water quantity and quality variables, and construct a spatiotemporal matrix for iterative update, which solves the time-consuming and labor-intensive problem of water body tracing and realizes the full process description and cost savings of the dynamic change process.
Patent Information
- Application Number
- CN202510530520.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-04-25
AI Technical Summary
Existing water source tracing technology is time-consuming and labor-intensive, cannot effectively describe the dynamic changes in water source components, is costly, and has low tracing effectiveness.
The spatiotemporal traceability method of water quantity and quality is adopted. By obtaining rainfall-related data of the basin to be traced, the water quantity and quality related variables are solved, the spatiotemporal traceability update terms are constructed, and the spatiotemporal matrix is iteratively updated. The data is visualized to obtain the spatiotemporal traceability results.
The traceability calculation is completed simultaneously in time and space, providing dynamic change data of water source components throughout the entire process, reducing time and labor costs, saving consumables, breaking geographical restrictions, and improving the effectiveness of traceability.
Smart Images

Figure CN120068731B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water body source tracing, and in particular to a method, device, electronic device and storage medium for temporal and spatial tracing of water quantity and quality. Background Art
[0002] Water source tracing involves identifying the source and movement of water / water pollutants. For example, using known pollutant monitoring data and river hydrological parameters, pollution source identification methods can be used to determine the pollutant source category (e.g., industrial, agricultural, or domestic), discharge time, source location, and discharge intensity.
[0003] Currently, water source tracing technologies commonly use hydrochemical methods, such as statistical analysis of hydrochemical parameters, isotope analysis, or combined isotope analysis with other techniques (such as fluorescence spectroscopy). For example, isotope tracing uses radionuclides or stable nuclides as tracers. This technology exploits the specific isotopic composition of different sources of research objects (such as pollutants) and the fundamental assumption that isotopic compositions remain relatively stable through various physical, chemical, and biological processes to track the movement and changes of the research objects.
[0004] For example, sampling is conducted at a specific research location—the outlet of a river basin—and its isotopic composition is tested. Because water from different sources has different isotope ratios, the ratios of these isotopes at the outlets in the study area can also be analyzed through sampling and testing. Outlets with isotope ratios similar to those at the outlet of the river basin can be considered the source. According to the principles of isotope tracing technology, the accuracy of isotope analysis is affected by sample collection and experimental analysis, requiring a certain amount of time and experimental resources such as reagents and materials. Furthermore, in complex hydrological environments, there may be a certain degree of overlap in the characteristic isotope values of different sources, making it difficult to distinguish them. Complex isotope fractionation can also lead to deviations in the judgment of the source.
[0005] Although current technology uses a variety of isotopes combined with hydrochemical analysis, fluorescence spectroscopy, geographic information systems, remote sensing and other means to improve the accuracy of water source tracing, the basic principle of tracers still requires field test detection to complete source tracing, and the geographical location of the research object has certain specificity, such as a certain basin outlet, a fixed drainage outlet, and a designated river section. Therefore, it is not only costly, time-consuming and labor-intensive, but also unable to complete the description of the dynamic changes of the research object from the source to the final research location. The results obtained often fail to describe the dynamic changes of water source components, and the effectiveness of water source tracing is low. Summary of the Invention
[0006] The present invention provides a method, device, electronic device and storage medium for temporal and spatial tracing of water quantity and quality, which are used to solve or partially solve the technical problems of current water body tracing related technologies being time-consuming and labor-intensive, insufficient description of the dynamic changes in water source components, and low effectiveness of water body tracing.
[0007] The present invention provides a method for temporal and spatial tracing of water quantity and quality, the method comprising:
[0008] Obtaining rainfall-related data for a watershed to be traced; the watershed to be traced includes multiple sub-watersheds to be analyzed;
[0009] For any target sub-basin in the basin to be traced, solving water quantity and quality related variables of the target sub-basin based on the rainfall related data;
[0010] Based on the water quantity and water quality related variables, construct a spatiotemporal traceability update term, and perform spatiotemporal matrix iterative update calculation according to the spatiotemporal traceability update term to obtain the spatiotemporal matrix of each rainfall moment of the target sub-basin;
[0011] The spatiotemporal matrix of all rainfall moments is visualized to obtain the spatiotemporal tracing results.
[0012] The present invention also provides a water quantity and quality time-space tracing device, comprising:
[0013] A data acquisition unit is used to acquire rainfall-related data of a watershed to be traced; the watershed to be traced includes multiple sub-watersheds to be analyzed;
[0014] a water quantity and quality related variable solving unit, configured to solve, for any target sub-basin in the basin to be traced, the water quantity and quality related variables of the target sub-basin based on the rainfall related data;
[0015] a space-time matrix iterative update calculation unit, configured to construct a space-time source traceability update term based on the water quantity and quality related variables, and perform space-time matrix iterative update calculation based on the space-time source traceability update term to obtain the space-time matrix of each rainfall moment of the target sub-basin;
[0016] The visualization processing unit is used to perform visualization processing based on the spatiotemporal matrix of all rainfall moments to obtain spatiotemporal tracing results.
[0017] The present invention further provides an electronic device, comprising a processor and a memory:
[0018] The memory is used to store program code and transmit the program code to the processor;
[0019] The processor is used to execute the spatiotemporal tracing method for water quantity and quality as described in any one of the above items according to the instructions in the program code.
[0020] The present invention also provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the spatiotemporal tracing method of water quantity and quality as described in any one of the above items.
[0021] It can be seen from the above technical solutions that the present invention has the following advantages:
[0022] A spatiotemporal provenance method for water quantity and quality is proposed. First, rainfall data is obtained for the basin to be traced, which contains multiple sub-basins to be analyzed. For any target sub-basin in the basin to be traced, the water quantity-related variables of the target sub-basin are solved based on the rainfall data. Then, a spatiotemporal provenance update term is constructed based on the water quantity-related variables. The spatiotemporal matrix is iteratively updated based on the spatiotemporal provenance update term to obtain the spatiotemporal matrix for each rainfall moment in the target sub-basin. Finally, the spatiotemporal matrix of all rainfall moments is visualized to obtain the spatiotemporal provenance results. This method simultaneously considers the temporal and spatial aspects of water quantity and quality provenance, and obtains the spatiotemporal provenance results by constructing a spatiotemporal provenance update term that is closely related to spatiotemporal changes and proposing an iterative calculation of the spatiotemporal matrix that is updated with the time step. On the one hand, the traceability calculation can be completed simultaneously in time and space during the calculation, which makes up for the current traceability technology's neglect of the time level, provides full-process data for describing the dynamic changes of water source components, solves the defect of insufficient description of the dynamic changes of water source components by current technology, and improves the effectiveness of traceability; on the other hand, the processing and storage of water source information can be completed based on iterative calculation of the space-time matrix, and traceability results can be provided without the use of tracers, on-site sampling or experimental detection, which can reduce time and labor costs, save consumables, and break the limitations of current technology on the geographical location of the research object. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 It is a flowchart of the steps of a method for temporal and spatial tracing of water quantity and quality;
[0025] Figure 2 This is a schematic diagram of the basic principle of tracing the origin based on the space-time matrix;
[0026] Figure 3 It is a schematic diagram of a space-time matrix representation;
[0027] Figure 4It is a schematic diagram of the iteration of a space-time matrix;
[0028] Figure 5 This is a schematic diagram of the overall process of a method for temporal and spatial tracing of water quantity and quality;
[0029] Figure 6 (a) is a schematic diagram of the time tracing result of a specific example;
[0030] Figure 6 (b) is a schematic diagram of the spatial tracing result of a specific example;
[0031] Figure 7 This is a structural block diagram of a water quantity and quality spatiotemporal tracing device. DETAILED DESCRIPTION
[0032] The embodiments of the present invention provide a method, device, electronic device and storage medium for spatiotemporal tracing of water quantity and quality, which are used to solve or partially solve the technical problems of current water body tracing related technologies being time-consuming and labor-intensive, insufficient description of the dynamic changes in water source components, and low effectiveness of water body tracing.
[0033] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0034] As an example, current water source tracing technologies commonly use hydrochemical methods, such as statistical analysis of hydrochemical parameters, isotope analysis, or combined isotope analysis with other techniques (such as fluorescence spectroscopy). Taking isotope tracing as an example, this technology uses radionuclides or stable nuclides as tracers. It exploits the specific isotopic composition of different sources of research objects (such as pollutants) and the basic assumption that isotopic composition remains relatively stable during different physical, chemical, and biological processes to track the movement and changes of research objects.
[0035] For example, sampling is conducted at a specific research location—the outlet of a river basin—and its isotopic composition is tested. Because water from different sources has different isotope ratios, the ratios of these isotopes at the outlets in the study area can also be analyzed through sampling and testing. Outlets with isotope ratios similar to those at the outlet of the river basin can be considered the source. According to the principles of isotope tracing technology, the accuracy of isotope analysis is affected by sample collection and experimental analysis, requiring a certain amount of time and experimental resources such as reagents and materials. Furthermore, in complex hydrological environments, there may be a certain degree of overlap in the characteristic isotope values of different sources, making it difficult to distinguish them. Complex isotope fractionation can also lead to deviations in the judgment of the source.
[0036] Although current technology uses a variety of isotopes combined with hydrochemical analysis, fluorescence spectroscopy, geographic information systems, remote sensing and other means to improve the accuracy of water source tracing, the basic principle of tracers still requires field test detection to complete source tracing, and the geographical location of the research object has certain specificity, such as a certain basin outlet, a fixed drainage outlet, and a designated river section. Therefore, it is not only costly, time-consuming and labor-intensive, but also unable to complete the description of the dynamic changes of the research object from the source to the final research location. The results obtained often fail to describe the dynamic changes of water source components, and the effectiveness of water source tracing is low.
[0037] Therefore, one of the core invention points of the embodiment of the present invention is: in response to the shortcomings of current technology, a method for spatiotemporal tracing of water quantity and quality is proposed. First, combining the principle of water balance and taking into account the influence of time and space levels, a spatiotemporal matrix of water body / water quality tracing that is updated with the time step (hereinafter referred to as water quantity spatiotemporal matrix / water quality spatiotemporal matrix) is proposed, so that during calculation, the tracing calculation can be completed simultaneously in time and space, making up for the current tracing technology's neglect of the time level; secondly, in the rainfall runoff scenario, based on hydrological principles, hydrodynamic calculations, and water (solute) mass balance principles, based on matrices and their iterative operations, a spatiotemporal matrix is constructed to calculate and store the spatiotemporal tracing results of water body / water quality in any region at any time. The spatiotemporal tracing method includes different regions and different rainfall periods, thereby providing full-process data for describing the dynamic changes of water source components by paying attention to the tracing results at both the temporal and spatial levels, and solving the defect that the current technology is insufficient in describing the dynamic changes of water source components. At the same time, the technical solution of the present invention can be used to complete the processing and storage of water source information based on iterative calculation of the spatiotemporal matrix, and provide tracing results without the use of tracers, on-site sampling or experimental detection, which can reduce time and labor costs, save consumables, and break the limitation of the current technology on the geographical location of the research object.
[0038] Reference Figure 1 , shows a flow chart of the steps of a spatiotemporal tracing method for water quantity and quality provided by an embodiment of the present invention, which may specifically include the following steps:
[0039] Step 101: Obtain rainfall-related data for a watershed to be traced; the watershed to be traced includes multiple sub-watersheds to be analyzed;
[0040] In order to enable those skilled in the art to better understand the technical solution of the present invention, refer to Figure 2 , showing a schematic diagram of the basic principle of space-time matrix tracing provided by an embodiment of the present invention.
[0041] Based on the knowledge of hydrograph separation, given the time series data of a rainfall event and the regional division of the study area, the water composition of a water body at a certain location originates from different rainfall periods (1-3) and different upstream and downstream areas (U1-U6). This composition also changes over time (i.e., the process is dynamic).
[0042] For example, the calculation ends at time steps ( At that moment), the spatiotemporal matrix at U3 contains the spatiotemporal traceability information of the water body at this time and place. Specifically, it represents the flow generation and confluence pairs that occur in a certain area during a certain rainfall period. The contribution ratio of the water body at time U3 is a certain value. For example, the runoff generation and confluence in area U2 during period 2 The contribution of the water body at time U3 may be 6%. The sum of the elements of different rows or columns of the spatiotemporal matrix can further quantify the overall contribution of a rainfall period or a region to the water body at that time. For example, the runoff generation and runoff in period 2 The total contribution of the water body at time U3 may be 20%. The overall contribution of the water body at time E may be 9%.
[0043] In other words, tracing the source of water quantity and quality can be done by solving the confluence process (i.e., the changes in the inflow and outflow of water and solutes between different regions) through the water balance equation, the two-dimensional shallow water equation, the pollutant accumulation and washoff function, and the convection-diffusion equation. Combined with the basic parameters of the study area and the upstream and downstream relationships of the region, this source information is recorded in the form of a space-time matrix at each moment and in each region. By iterating the water flow propagation time and the water flow propagation path in time and space, the space-time matrix can be solved for any region at any moment. Further processing can then yield the corresponding space-time source information.
[0044] The rainfall-related data of the basin to be traced may include the basin area, the number of sub-basin divisions, the total duration of rainfall, the number of rainfall periods and rainfall sequence data.
[0045] Assume there is a basin to be traced , its drainage area is , the number of sub-basin partitions is Through the hydrological model, the basin to be traced can be Divided into Sub-basins. Based on the flow direction analysis, these sub-basins are numbered from upstream to downstream. Sub-basins use Indicates that Sub-basins use express. for upstream area (i.e. upstream sub-basin), According to the basin area and the number of sub-basin divisions , the basin to be traced can be calculated The sub-basin area of each sub-basin in sub-basins The sub-basin area can be expressed as ), and determine the sub-basin topological relationships of each sub-basin.
[0046] In a specific rainfall runoff scenario, it is assumed that the total rainfall duration (i.e. the total duration of rainfall) is , the operation time step is , the total number of time steps (i.e., the number of rainfall periods) is , yes For the research Time (i.e. current rainfall time), time step (i.e., rainfall periods), with .
[0047] Sub-basins whose water source tracing results will need attention The focus area (i.e., the target sub-basin) is set as the area of interest, and other sub-basins are represented by regions.
[0048] Figure 3 A schematic diagram of a space-time matrix representation is shown.
[0049] For the target sub-basin for each rainfall period ,have OK* Column matrix .in, ,express As of The space-time matrix of the moment. Figure 3 , Target sub-basin In the The space-time matrix of the rainfall period. Among them, the second element of the first row of the matrix Indicates the rainfall from the first rainfall period in the area The runoff generated As of The contribution ratio of the existing water volume at the moment, and so on. The sum of all elements in this matrix is 1. Traverse all rainfall periods, for each target sub-basin , the obtained The collection is saved as Therefore, in this spatiotemporal matrix, the sum of each row / column element represents the rainfall from different rainfall periods (e.g. Figure 4 Moderate rainfall period , , ...) / different regions (such as regions A, B, C) for the target sub-basin (such as area C) water contribution ratio.
[0050] It should be pointed out that the sub-basin in the present invention is obtained by dividing the source basin according to the hydrological principle, and is used for spatial source analysis. In practical applications, assuming that the sub-basin division method is not adopted, but a method such as grid division is adopted, the sub-basin can be replaced by technical terms such as partition, area, unit, grid unit or spatial position. Regardless of the division method adopted, the space-time matrix calculation principle and related methods proposed in the present invention are still applicable. It is understandable that the present invention is not limited to this.
[0051] Step 102: for any target sub-basin in the basin to be traced, solving water quantity and quality related variables of the target sub-basin based on the rainfall related data;
[0052] It should be pointed out that the basic principles of water quantity and water quality tracing are the same, and there are only two differences in the calculation between the two.
[0053] Difference 1: The solution of water quantity-related variables is based on the water balance equation and the two-dimensional shallow water equation, while the solution of water quality-related variables is based on the simulation calculation of the two-dimensional shallow water equation, and is combined with the pollutant accumulation and washoff function and the convection-diffusion equation.
[0054] Difference 2: In the calculation of water volume spatiotemporal source update, the water volume of the target sub-basin and It is obtained by summing up the water quantity related variables (refer to the formula (11) in the following introduction for details). In the calculation of the spatiotemporal traceability update term of water quality, the water quality factor concentration of the target sub-basin is It is obtained by weighted average calculation of water quantity based on water quality related variables (for details, please refer to formula (19) introduced below).
[0055] To simplify the description and facilitate understanding, the following explanation is given using water tracing as an example.
[0056] In some embodiments, the process of solving the water volume-related variables of the target sub-basin based on the rainfall-related data can be achieved by executing the following sub-steps S11 to S16:
[0057] Step S11: Determine the rainfall period corresponding to each rainfall moment according to the total rainfall duration and the number of rainfall periods (the time step of each rainfall period may also be determined at this time);
[0058] Step S12: extracting the rainfall intensity variation sequence of the target sub-basin from the rainfall sequence data, and calculating the current rainfall amount of the current rainfall period based on the rainfall intensity variation sequence (at this time, the current rainfall amount of each rainfall period can be determined as the current rainfall period for calculation);
[0059] Step S13: Calculate the sub-basin area of each sub-basin in the basin to be traced based on the basin area and the number of sub-basin partitions, and determine the sub-basin topological relationship of each sub-basin;
[0060] Step S14: by simultaneously solving the water balance equation and the two-dimensional shallow water equation, based on the sub-basin area of the target sub-basin, the sub-basin water volume of the target sub-basin at each rainfall moment is solved, and the sub-basin water volume at the previous rainfall moment corresponding to the current rainfall moment is recorded as the water volume at the previous moment;
[0061] Step S14 mainly implements the simultaneous calculation of the water balance equation and the two-dimensional shallow water equation to calculate the water-related variables used to construct the spatiotemporal traceability update term. In other words, it is necessary to calculate the water balance equation and the two-dimensional shallow water equation to calculate the water-related variables in order to calculate the spatiotemporal matrix of water. Only by updating the term of During each rainfall period (When calculating as the spatiotemporal matrix of water volume under the current rainfall period) .
[0062] The two-dimensional shallow water equations include the mass conservation equation and the momentum conservation equation.
[0063] The mass conservation equation is calculated as follows (1):
[0064] (1)
[0065] The momentum conservation equation is calculated as follows (2)-(3):
[0066] (2)
[0067] (3)
[0068] in, Indicates water depth; 、 The water flow and Directional velocity component; is the acceleration due to gravity; 、 The slope of the bed is and Directional component; 、 The friction slope is and The directional component is calculated using Manning's formula.
[0069] The source and sink terms on the right side of Equation (1) It can be calculated using the direct rainfall method shown in the following formula (4):
[0070] (4)
[0071] in, is the rainfall intensity per unit area; is the permeation loss (ignoring evaporation loss).
[0072] The water balance equation is calculated as follows (5):
[0073] (5)
[0074] in, It is a horizontal outflow item.
[0075] Based on the known rainfall sequence data provided, the target sub-basin can be extracted The rainfall intensity change sequence can also determine the current rainfall amount when each rainfall period is calculated as the current rainfall period. , and calculate the target sub-basin Rainfall intensity per unit area By combining the above equations, the target sub-basin can be solved The water level (water depth) and flow at each rainfall moment. Combined with the area of the target sub-basin , the sub-basin water volume of the target sub-basin at each rainfall moment can be obtained through the following formula (6): :
[0076] (6)
[0077] The sub-basin water volume at the current rainfall moment is recorded as , the sub-basin water volume at the previous rainfall moment corresponding to the current rainfall moment is recorded as the water volume at the previous moment .
[0078] Therefore, in combination with the above introduction, specifically, the process of simultaneously solving the water balance equation and the two-dimensional shallow water equation, and combining the sub-basin area of the target sub-basin, to solve the sub-basin water volume of the target sub-basin at each rainfall moment can be achieved by executing the following sub-steps S14-1 to S14-3:
[0079] Step S14-1: Calculate the rainfall intensity per unit area of the target sub-basin according to the rainfall intensity variation sequence, and calculate the source and sink terms based on the rainfall intensity per unit area and combined with the infiltration loss;
[0080] Step S14-2: Based on the source and sink terms, the water depth of the target sub-basin at each rainfall moment is calculated by simultaneously applying the water balance equation, the mass conservation equation, and the momentum conservation equation;
[0081] Step S14 - 3 : Calculate the sub-basin water volume of the target sub-basin at each rainfall moment based on the water depth at each rainfall moment and the sub-basin area of the target sub-basin.
[0082] It should be pointed out that the two-dimensional shallow water equation is used to solve the variables required for calculating the spatiotemporal matrix of water volume such as water level and flow in the basin to be traced, which is one of the examples of the solution method given by the application of the present invention. Other equations or methods can also be used to solve the above variables. The general solution principle is based on the basic physical laws of conservation of mass, conservation of momentum and conservation of energy. These laws solve the flow and water level of each unit through mathematical equations (such as shallow water equations, Saint-Venant equations, Manning formula) combined with numerical methods (such as finite difference method, finite element method, etc.). For another example, the existing hydrological model / hydrodynamic model (such as SWMM (Storm Water Management Model, Storm Management Model / Storm Control Model)) can also be directly used for solution. It is understandable that the present invention is not limited to this.
[0083] Step S15: Based on the sub-basin water volume of the target sub-basin at the current rainfall moment, the water volume at the previous moment, and the current rainfall, combined with the sub-basin topological relationship, the amount of water received by the target sub-basin from each upstream sub-basin during the current rainfall period is calculated and recorded as the upstream area inflow;
[0084] In subsequent calculations, according to the target sub-basin Water volume in the sub-basin at the current rainfall moment , water volume at the last moment and current rainfall , we can further combine the sub-basin topological relationship to obtain the target sub-basin During the current rainfall period, The amount of water received is recorded as the inflow to the upstream area .in, Indicates the target sub-basin From the upstream sub-basin during the current rainfall period Amount of water received.
[0085] Step S16: The water volume at the previous moment, the current rainfall, and the inflow volume in the upstream area are used as water volume-related variables of the target sub-basin.
[0086] Target sub-basin There are three water volume related variables, namely, the water volume at the previous moment , current rainfall and upstream regional inflow At this point, all the variables required for calculating the water volume space-time matrix can be obtained.
[0087] Similar to water quantity-related variables, the solution process for water quality-related variables is:
[0088] Based on the simulation calculation of the two-dimensional shallow water equation, the pollutant accumulation and washoff functions and the convection-diffusion equation are combined to solve the water quality factor concentration of the target sub-basin at each rainfall moment. The water quality factor concentration of the sub-basin corresponding to the previous rainfall moment at the current rainfall moment is recorded as the water quality factor concentration at the previous moment.
[0089] The water quality factor concentration of the water flow received by the target sub-basin from each upstream sub-basin during the current rainfall period is recorded as the upstream area water quality factor concentration;
[0090] The product of the water volume at the previous moment and the water quality factor concentration at the previous moment, the product of the current rainfall and the water quality factor concentration at the current rainfall moment, and the product of the inflow in the upstream area and the water quality factor concentration in the upstream area are used as water quality-related variables of the target sub-basin.
[0091] The pollutant accumulation and washoff functions are as follows:
[0092] (7)
[0093]
[0094] in, is the accumulation of surface pollutants per unit area; is the maximum accumulation of pollutants; is the pollutant accumulation rate constant; is the surface wash volume per unit area per unit time; is the washout coefficient; is the runoff rate per unit area; is the washout index. Obtained based on the water velocity and sub-basin area in the two-dimensional shallow water equation; 、 、 、 In the present invention, the value is empirically taken.
[0095] The convection-diffusion equation is as follows:
[0096] (8)
[0097] in, is the concentration of the pollutant, ; For time; for distance; is the degradation coefficient, is the convection diffusion coefficient, which is estimated by the relevant empirical formula. The empirical formula is as follows:
[0098] (9)
[0099] in, 、 Take the value for experience.
[0100] Step 103: constructing a spatiotemporal source update term based on the water quantity and quality related variables, and performing a spatiotemporal matrix iterative update calculation based on the spatiotemporal source update term to obtain the spatiotemporal matrix of each rainfall moment in the target sub-basin;
[0101] The spatiotemporal source update item includes the water quantity spatiotemporal source update item and the water quality spatiotemporal source update item. The spatiotemporal matrix includes the water quantity spatiotemporal matrix and the water quality spatiotemporal matrix.
[0102] Similarly, the water quantity traceability example is used for illustration. In some embodiments, the process of constructing the water quantity spatiotemporal traceability update item based on the water quantity related variables can be achieved by executing the following sub-steps S21 to S25:
[0103] Step S21: Calculate the sub-basin water volume sum of the target sub-basin before water outflow occurs during the current rainfall period based on the water volume at the previous moment, the current rainfall, and the inflow of the upstream area;
[0104] Specifically, the sum of the water volume at the previous moment, the current rainfall, and the inflow from the upstream area is taken as the sub-basin water volume sum before the outflow of water occurs in the current rainfall period;
[0105] The spatiotemporal matrix calculation method provided by this invention assumes that the current rainfall, water from other upstream areas, and water retained at the previous moment are instantaneously mixed at the current moment. Combining this with the principle of water balance, the following equation (10) can be written:
[0106] (10)
[0107] in, Indicates the amount of rainfall from the target sub-basin during the current rainfall period. All water flowing out of the area (infiltration, outflow).
[0108] Ignoring the effect of evaporation, the target sub-basin The water volume of the sub-basin before the outflow during the current rainfall period and It can be expressed as the following formula (11):
[0109] (11)
[0110] at this time, .
[0111] Furthermore, when the current rainfall, the water from other upstream areas, and the water retained at the previous moment are instantaneously mixed at this moment, by combining Equations (10) and (11), the equation to be solved can be listed as shown in Equation (12):
[0112] (12)
[0113] According to formula (12), we can see that to calculate There are three aspects that need to be paid attention to. They are the amount of water at the previous moment , current rainfall and the inflow to the upstream section .therefore, The update of also needs to be carried out by comprehensively considering the influence of these three aspects. In the calculation, it is called the spatiotemporal traceability update term (also called the update term), which is the water accumulation term, rainfall term, and inflow term at the previous moment.
[0114] Step S22: constructing a water quantity and rainfall item based on the water quantity and current rainfall of the sub-basin;
[0115] Specifically, the water quantity rainfall term can be constructed by combining the local rainfall contribution matrix at the current rainfall moment through the following formula (13):
[0116] (13)
[0117] Represents the contribution matrix of local rainfall at the current rainfall moment, with a unique non-zero element .
[0118] Step S23: constructing the water volume accumulation item at the previous moment based on the water volume of the sub-basin and the water volume at the previous moment;
[0119] Specifically, the water volume accumulation term at the last rainfall moment can be constructed by combining the spatiotemporal matrix of the water volume of the target sub-basin at the last rainfall moment through the following formula (14):
[0120] (14)
[0121] In the above formula, Indicates the target sub-basin Spatiotemporal matrix of water volume at the last rainfall moment.
[0122] Step S24: constructing a water inflow item based on the water volume of the sub-basin and the inflow volume of the upstream area;
[0123] Specifically, the water volume spatiotemporal matrix of each upstream sub-basin of the target sub-basin at the last rainfall moment can be combined to construct the upstream sub-basin through the following formula (15): Water inflow item:
[0124] (15)
[0125] In the above formula, Indicates the upstream sub-basin Spatiotemporal matrix of water volume at the last rainfall moment.
[0126] The target sub-basin usually corresponds to multiple upstream sub-basins. Therefore, a whole inflow item is generally composed of multiple inflow items. The inflow item referred to in the embodiment of the present invention is the whole inflow item. Then the water inflow item can be expressed by the following formula (16):
[0127] (16)
[0128] Step S25: The water rainfall item, the water accumulation item at the previous moment, and the water inflow item are used as water spatiotemporal source update items.
[0129] Target sub-basin There are three spatiotemporal traceability update items of the corresponding water volume spatiotemporal matrix, namely, water volume rainfall item , water accumulation item at the previous moment and water inflow .
[0130] Comparing with the process of water quantity spatiotemporal source update, the process of constructing water quantity spatiotemporal source update based on water quality related variables is as follows:
[0131] The water quality rainfall term is constructed based on the sub-basin water volume, current rainfall, and water quality factor concentration at the current rainfall moment. More specifically, the water quality rainfall term is constructed based on the sub-basin water volume, current rainfall, and water quality factor concentration at the current rainfall moment, combined with the local rainfall contribution matrix at the current rainfall moment.
[0132] The water quality accumulation term at the previous moment is constructed based on the sum of the sub-basin water volume, the water volume at the previous moment, and the concentration of the water quality factor at the previous moment. More specifically, the water quality accumulation term at the previous moment is constructed based on the sum of the sub-basin water volume, the water volume at the previous moment, and the concentration of the water quality factor at the previous moment, combined with the spatiotemporal matrix of the water quality of the target sub-basin at the previous rainfall moment.
[0133] The water quality inflow term is constructed based on the sub-basin water volume, upstream regional inflow, and upstream regional water quality factor concentration. More specifically, the water quality inflow term is constructed based on the sub-basin water volume, upstream regional inflow, and upstream regional water quality factor concentration, combined with the spatiotemporal water quality matrix of each upstream sub-basin of the target sub-basin at the last rainfall moment.
[0134] The water quality rainfall item, the water quality accumulation item at the previous moment, and the water quality inflow item are used as the water quality spatiotemporal traceability update items.
[0135] Based on the above introduction, in some embodiments, the process of performing iterative update calculation of the spatiotemporal matrix according to the spatiotemporal provenance update term to obtain the spatiotemporal matrix of each rainfall moment in the target sub-basin can be achieved by executing the following sub-steps S01 to S03:
[0136] Step S01: Initialize the water quantity space-time matrix and water quality space-time matrix corresponding to the water quantity and quality change process of the first rainfall period of all sub-basins;
[0137] For any target sub-basin In the iterative solution process, Updated according to the time step (i.e. rainfall period). Need to initialize the first time step corresponding to .exist When , the default water volume of the source basin is 0. Therefore, the original rainfall of the first rainfall period can be used to The contribution of is recorded as 1. That is, In line 1 The column has only one non-zero element equal to 1. In the subsequent calculation process, According to the update logic of step S02 below, the time step is calculated to obtain , , ..., and so on, until the research moment ,get Finally, each Under the value The collection is saved as .
[0138] Step S02: For the water quantity and quality change process during the current rainfall period, combined with the water balance principle and taking into account the update influence range of the spatiotemporal traceability update item, matrix operations are performed through the rainfall item, the water accumulation item at the previous moment, and the inflow item to update the spatiotemporal matrix of the target sub-basin at the previous rainfall moment. This matrix is used as the spatiotemporal matrix of the target sub-basin at the current rainfall moment after the time step of the current rainfall period.
[0139] Specifically, in combination with the principle of water balance and taking into account the update impact range of the spatiotemporal traceability update item, matrix operations are performed through the water quantity rainfall item, the water quantity accumulation item at the previous moment, and the water quantity inflow item to update the water quantity spatiotemporal matrix of the target sub-basin at the previous rainfall moment, which is used as the water quantity spatiotemporal matrix of the target sub-basin at the current rainfall moment after the time step of the current rainfall period. At the same time, matrix operations are performed through the water quality rainfall item, the water quality accumulation item at the previous moment, and the water quality inflow item to update the water quality spatiotemporal matrix of the target sub-basin at the previous rainfall moment, which is used as the water quality spatiotemporal matrix of the target sub-basin at the current rainfall moment after the time step of the current rainfall period.
[0140] For the water volume spatiotemporal matrix, combining equations (13) to (16), equation (12) can be transformed into the following equation (17):
[0141] (17)
[0142] Based on formula (17), at each rainfall moment (i.e., the water quantity and quality change process corresponding to each rainfall period), the water quantity rainfall term , water accumulation item at the previous moment , water inflow Perform matrix operations to solve the target sub-basin The spatiotemporal matrix of water volume at each rainfall moment .
[0143] Combining the above contents, Figure 4 A schematic diagram of the iteration of a space-time matrix is shown.
[0144] because Figure 4 It shows the changes of water quantity and quality over time and space. The corresponding iteration diagram is applicable to both water quantity space-time matrix and water quality space-time matrix. Figure 4 As shown in the figure, there are ① to ④ rainfall periods (corresponding to 4 rainfall moments), three spaces A, B, and C (corresponding to three sub-basins), where C is the target sub-basin, i.e., the area of interest. According to the principles of hydrology, the temporal and spatial components of water quantity / quality at C change with time as shown in the figure. Figure 4 The dashed lines indicate the columns. At each rainfall moment, matrix operations are performed using the water quantity / quality rainfall term, the previous moment's water quantity / quality accumulation term, and the relevant water quantity / quality inflow term to update the water quantity / quality spatiotemporal matrix of C at each rainfall moment. The black arrows within the grid indicate the direction of water flow. This example assumes that, starting at time ②, a certain confluence relationship between spaces is established and maintained. That is, water flows from A into B, and from B into C.
[0145] During the matrix calculation process, the influence range of each water quantity / water quality spatiotemporal traceability update item needs to be considered. Figure 4Similarly, the definition of the update influence range referred to in the present invention is also applicable to the water quantity space-time matrix and the water quality space-time matrix.
[0146] From the perspective of the entire rainfall process, the water quantity / water quality spatiotemporal matrix is a is the number of rows and sub-basin partitions For the column matrix.
[0147] The row elements of the water quantity spatiotemporal matrix represent the contribution ratio of the water quantity and quality changes during the rainfall period to the water quantity of the target sub-basin, and the column elements represent the contribution ratio of the upstream sub-basin to the water quantity of the target sub-basin. The row elements of the water quality spatiotemporal matrix represent the contribution ratio of the water quantity and quality changes during the rainfall period to the water quality of the target sub-basin, and the column elements represent the contribution ratio of the upstream sub-basin to the water quality of the target sub-basin.
[0148] The updated influence range of the water quantity / water quality rainfall item on the target sub-basin is the time-space matrix Rank That is, at each rainfall moment, the water quantity / water quality rainfall item has an impact on the update of the water quantity / water quality spatiotemporal matrix of the target sub-basin. Rank The elements of the column, i.e. .like Figure 4 Represented by blue blocks.
[0149] The update influence range of the water quantity / water quality accumulation item at the previous moment on the target sub-basin is the water quantity / water quality space-time matrix before Row and front That is to say, at each rainfall moment, the influence range of the water quantity / water quality accumulation item at the previous moment on the update of the water quantity / water quality spatiotemporal matrix of the target sub-basin is the same as the previous one. Line and forward Elements of the column. Figure 4 Represented by green blocks.
[0150] The updated influence range of water quantity / water quality inflow item on the target sub-basin is the water quantity / water quality space-time matrix before Row and front That is, at each rainfall moment, the water quantity / water quality inflow item affects the update range of the water quantity / water quality spatiotemporal matrix of the target sub-basin to the extent of its previous Line and forward Elements of the column. Figure 4 Indicated by yellow block.
[0151] in, and are all positive integers. , corresponding to the current rainfall period. , corresponding to the target sub-basin.
[0152] Combining the above introduction, the second difference between water quality traceability and water quantity traceability calculation is to replace formula (17) with the following formulas (18) to (19):
[0153] (18)
[0154] (19)
[0155] It represents the product of the water volume at the previous moment and the concentration of the corresponding water quality factor; Indicates the target sub-basin From the upstream sub-basin during the current rainfall period The product of the amount of water received and the concentration of the corresponding water quality factor; It represents the product of the current rainfall and the concentration of the corresponding water quality factor; Represents the water quality factor concentration calculated based on the weighted average of water volume. The water quality factor concentration refers to the concentration of a water pollution indicator.
[0156] In the above formula, water quality related variables can include 、 、 ; represents the water quality rainfall term; Indicates the cumulative water quality item at the previous moment; Represents the water quality inflow item.
[0157] Step S03: Determine whether there is a next rainfall period for which the spatiotemporal matrix update calculation has not yet been performed; if so, jump to step S02; if not, end the iterative process and output the water volume spatiotemporal matrix and water quality spatiotemporal matrix of each rainfall moment in the target sub-basin.
[0158] It should be pointed out that the previous embodiment only takes any sub-basin as the target sub-basin and gives the corresponding space-time matrix tracing process. In actual solution, all sub-basins in the tracing area need to be solved in each time step. Figure 4 In the example, the source basin to be traced is divided into three sub-basins. Although only the matrix iteration of C is shown, in practice, the solution must be completed for sub-basins A, B, and C at each time step. The spatiotemporal matrix solution for each sub-basin can be implemented in the same way as described in the previous embodiment.
[0159] Step 104 , performing visualization processing based on the spatiotemporal matrix of all rainfall moments to obtain spatiotemporal tracing results.
[0160] After the iterative calculation is completed, the obtained traceability results need to be visualized by drawing or other means to more intuitively understand the specific traceability of water quantity and quality. In some embodiments, the process of visualizing the spatiotemporal matrix of all rainfall moments to obtain spatiotemporal traceability results can be achieved by executing the following sub-steps S31 to S34:
[0161] Step S31: Integrate the spatiotemporal matrices of all rainfall moments as the spatiotemporal matrix set of the target sub-basin;
[0162] Specifically, the water volume space-time matrix of all rainfall moments is integrated as the water volume space-time matrix set of the target sub-basin; the water quality space-time matrix of all rainfall moments is integrated as the water quality space-time matrix set of the target sub-basin. That is, traverse all rainfall periods, for each target sub-basin , the obtained The collection is saved as .
[0163] Step S32: Adding up the row elements of each row of the water quantity spatiotemporal matrix set to obtain the first water quantity contribution ratio of the water quantity and quality change process of each rainfall period to the target sub-basin; adding up the row elements of each row of the water quality spatiotemporal matrix set to obtain the first water quality contribution ratio of the water quantity and quality change process of each rainfall period to the target sub-basin;
[0164] Step S33: Adding up the column elements of each column of the water quantity spatiotemporal matrix set to obtain the second water quantity contribution ratio of each upstream sub-basin of the target sub-basin to the target sub-basin; adding up the column elements of each column of the water quality spatiotemporal matrix set to obtain the second water quality contribution ratio of each upstream sub-basin of the target sub-basin to the target sub-basin;
[0165] Step S34: Based on each first water volume contribution ratio and each second water volume contribution ratio, a respective water volume contribution ratio change diagram is formed by drawing, which serves as the spatiotemporal tracing result of water volume that changes dynamically with the time step corresponding to the target sub-basin; based on each first water quality contribution ratio and each second water quality contribution ratio, a respective water quality contribution ratio change diagram is formed by drawing, which serves as the spatiotemporal tracing result of water quality that changes dynamically with the time step corresponding to the target sub-basin.
[0166] In an embodiment of the present invention, a method for temporal and spatial tracing of water quantity and quality is proposed. First, combining the principle of water balance and considering the influence of both time and space, a spatiotemporal matrix of water quantity / water quality that is updated with the time step is proposed. This allows for simultaneous tracing of source information in both time and space, thus overcoming the current tracing technology's neglect of the time dimension. Second, in a rainfall-runoff scenario, based on hydrological principles, hydrodynamic calculations, and water (solute) mass balance principles, and using matrices and iterative operations, a tracing method is constructed that calculates and stores spatiotemporal tracing results of water bodies / water quality in any region at any time based on the spatiotemporal matrix. Spatiotemporal tracing encompasses different regions and rainfall periods, providing full-process data for describing the dynamic changes of water source components by simultaneously focusing on tracing results at both the temporal and spatial levels, thus addressing the current technology's inadequate description of the dynamic changes of water source components. Furthermore, the technical solution of the present invention enables the processing and storage of water source information based on iterative calculations of the spatiotemporal matrix, providing tracing results without the use of tracers, on-site sampling, or experimental testing. This reduces time and labor costs, consumables, and overcomes the limitations of current technology on the geographical location of the research object.
[0167] For better explanation, refer to Figure 5 , showing a schematic diagram of the overall process of a method for spatiotemporal tracing of water quantity and quality provided by an embodiment of the present invention. It should be noted that this embodiment only briefly describes the general process of spatiotemporal tracing of water quantity and quality. The specific implementation process of each step can be understood by referring to the relevant content in the aforementioned embodiments. It will not be described here in detail. It is understood that the present invention is not limited to this.
[0168] Step 501: Obtain the watershed area, number of sub-watershed divisions, total rainfall duration, number of rainfall periods, and rainfall sequence data of the watershed to be traced; the watershed to be traced contains multiple sub-watersheds to be analyzed;
[0169] Step 502: For any target sub-basin in the basin to be traced, solve the water quantity and quality related variables of the target sub-basin based on the basin area, the number of sub-basin divisions, the total rainfall duration, the number of rainfall periods, and the rainfall sequence data;
[0170] Step 503: Based on the water quantity and water quality related variables, construct the water quantity / water quality rainfall item, the water quantity / water quality accumulation item at the previous moment, and the water quantity / water quality inflow item;
[0171] Step 504: In accordance with the water balance principle and taking into account the update impact range of the spatiotemporal traceability update item, the spatiotemporal matrix is iteratively updated based on the water quantity / quality rainfall item, the water quantity / quality accumulation item at the previous moment, and the water quantity / quality inflow item to obtain the spatiotemporal matrix of water quantity / quality at each rainfall moment in the target sub-basin.
[0172] Step 505: Based on the spatiotemporal matrix of water quantity / water quality at all rainfall moments, calculate the contribution ratio of water quantity / water quality of each rainfall period and upstream area to the target sub-basin respectively, and draw the corresponding water quantity / water quality contribution ratio change graph as the spatiotemporal tracing result of water quantity / water quality that changes dynamically with time steps corresponding to the target sub-basin.
[0173] In order to enable those skilled in the art to better understand the technical solution of the present invention, an embodiment of the present invention is described below through a specific example.
[0174] Taking a rainfall event S in a study area of Foshan City as an example, it lasted for 24 hours, with a total of 240 time steps of 6 minutes. S is the basin to be traced, which is divided into 480 sub-basins.
[0175] By the 24th hour of the research time, the surface water in the sub-basin numbered U17380 was subjected to the technical solution of the present invention, and its spatiotemporal matrix R 17380 .
[0176] R 17380_240 For example, contribution ratios less than 0.0001 are ignored (the same applies below) and presented as a sparse matrix, with row and column numbers corresponding to each time step and sub-basin. The spatiotemporal matrix results for U17380 are shown in Tables 1-1 and 1-2. By adding row (column) elements, the contribution ratios for each rainfall period are shown in Tables 2-1 and 2-2. The contribution ratios for each sub-basin are shown in Table 3.
[0177] For each moment R 17380_n By drawing a stacking diagram, we obtained the temporal traceability results shown in Figure 6(a), which show how the proportion of water contribution from each rainfall period to U17380 changes over time. For example, at time 240 on the horizontal axis, approximately 11.9% of the water volume comes from the 122nd rainfall period, and approximately 25.2% comes from the 123rd rainfall period. Figure 6(b) shows the spatial traceability results, showing how the proportion of water contribution from each sub-basin to U17380 changes over time. For example, at time 240 on the horizontal axis, approximately 55.5% of the water volume comes from sub-basin U17378, and approximately 5.3% comes from sub-basin U17150.
[0178]
[0179] Table 1-1: R 17380_240 Value (value > 0.0001)
[0180]
[0181] Table 1-2: R 17380_240 Value (value > 0.0001)
[0182]
[0183] Table 2-1: According to R 17380_240 The contribution ratio of each period
[0184]
[0185] Table 2-2: According to R 17380_240 The contribution ratio of each period
[0186]
[0187] Table 3: According to R 17380_240 The contribution ratio of each region
[0188] This example mainly provides a brief illustration of the spatiotemporal traceability of water quantity in water bodies. The spatiotemporal traceability of water quality can be implemented by referring to the relevant methods provided in the aforementioned embodiments. Through the technical solution provided by the present invention, it is possible to obtain spatiotemporal traceability results of water quantity / water quality updated with time steps. At any time, for water bodies in any area of interest, the present invention can additionally provide time traceability results. In the same rainfall runoff scenario, the current technology only gives the distribution of water contribution ratios at the spatial level (different drainage divisions), but does not give the distribution of water contribution ratios at the temporal level (different rainfall periods), that is, the water contribution ratios of the same drainage division in different rainfall periods.
[0189] Reference Figure 7 , shows a structural block diagram of a water quantity and quality spatiotemporal tracing device provided by an embodiment of the present invention, which may specifically include:
[0190] The data acquisition unit 701 is used to acquire rainfall-related data of a watershed to be traced; the watershed to be traced includes multiple sub-watersheds to be analyzed;
[0191] The water quantity and quality related variable solving unit 702 is used to solve the water quantity and quality related variables of any target sub-basin in the basin to be traced based on the rainfall related data;
[0192] The spatiotemporal matrix iterative update calculation unit 703 is configured to construct a spatiotemporal source tracing update term based on the water quantity and quality related variables, and perform spatiotemporal matrix iterative update calculation based on the spatiotemporal source tracing update term to obtain the spatiotemporal matrix of each rainfall moment of the target sub-basin;
[0193] The visualization processing unit 704 is used to perform visualization processing based on the spatiotemporal matrix of all rainfall moments to obtain spatiotemporal tracing results.
[0194] In an optional embodiment, the rainfall-related data includes watershed area, number of sub-watershed divisions, total rainfall duration, number of rainfall periods, and rainfall sequence data; the water quantity and quality-related variables include water quantity-related variables and water quality-related variables; the water quantity and quality-related variable solving unit 702 includes:
[0195] a rainfall period determination unit, configured to determine a rainfall period corresponding to each rainfall moment according to the total rainfall duration and the number of rainfall periods;
[0196] a current rainfall calculation unit, configured to extract a rainfall intensity variation sequence of the target sub-basin from the rainfall sequence data, and calculate the current rainfall in the current rainfall period according to the rainfall intensity variation sequence;
[0197] a sub-basin related calculation unit, configured to calculate the sub-basin area of each sub-basin in the basin to be traced according to the basin area and the number of sub-basin partitions, and determine the sub-basin topological relationship of each sub-basin;
[0198] a sub-basin water volume calculation unit, configured to calculate the sub-basin water volume of the target sub-basin at each rainfall moment based on the sub-basin area of the target sub-basin, and record the sub-basin water volume at the previous rainfall moment as the water volume at the previous moment;
[0199] a sub-basin water quality factor concentration calculation unit, configured to calculate the water quality factor concentration of the target sub-basin at each rainfall moment, and record the water quality factor concentration of the sub-basin at the last rainfall moment as the water quality factor concentration at the last moment;
[0200] an upstream region inflow calculation unit, configured to calculate the amount of water received by the target sub-watershed from each upstream sub-watershed during the current rainfall period based on the sub-watershed water volume of the target sub-watershed at the current rainfall moment, the water volume at the previous moment, and the current rainfall, in combination with the sub-watershed topological relationship, and record the amount of water as the upstream region inflow;
[0201] an upstream region water quality factor concentration determining unit, configured to record the water quality factor concentration of the water flow received by the target sub-watershed from each upstream sub-watershed during the current rainfall period as the upstream region water quality factor concentration;
[0202] a water quantity related variable determination unit, configured to use the water quantity at the previous moment, the current rainfall, and the inflow of the upstream area as the water quantity related variables of the target sub-basin;
[0203] The water quality-related variable determination unit is used to use the product of the water volume at the previous moment and the water quality factor concentration at the previous moment, the product of the current rainfall and the water quality factor concentration at the current rainfall moment, and the product of the inflow volume in the upstream area and the water quality factor concentration in the upstream area as the water quality-related variables of the target sub-basin.
[0204] In an optional embodiment, the sub-basin water volume calculation unit includes:
[0205] a source-sink term solving unit, configured to calculate the rainfall intensity per unit area of the target sub-basin according to the rainfall intensity variation sequence, and calculate the source-sink term based on the rainfall intensity per unit area in combination with the infiltration loss;
[0206] a water depth calculation unit, configured to calculate the water depth of the target sub-basin at each rainfall moment by simultaneously solving a water balance equation, a mass conservation equation, and a momentum conservation equation based on the source and sink terms;
[0207] The sub-basin water volume calculation subunit is used to calculate the sub-basin water volume of the target sub-basin at each rainfall moment according to the water depth at each rainfall moment and the sub-basin area of the target sub-basin.
[0208] In an optional embodiment, the spatiotemporal source update item includes a water quantity spatiotemporal source update item and a water quality spatiotemporal source update item; the spatiotemporal matrix includes a water quantity spatiotemporal matrix and a water quality spatiotemporal matrix; the spatiotemporal matrix iterative update calculation unit 703 includes:
[0209] a sub-basin water volume sum calculation unit, configured to calculate the sub-basin water volume sum of the target sub-basin before water outflow occurs during the current rainfall period based on the water volume at the previous moment, the current rainfall, and the inflow of the upstream area;
[0210] A water quantity and rainfall item construction unit, configured to construct a water quantity and rainfall item according to the water quantity of the sub-basin and the current rainfall;
[0211] A water volume accumulation item construction unit at the previous moment, configured to construct a water volume accumulation item at the previous moment based on the water volume of the sub-basin and the water volume at the previous moment;
[0212] A water inflow item construction unit, configured to construct a water inflow item according to the sub-basin water volume and the inflow volume of the upstream area;
[0213] a water volume spatiotemporal source updating item determining unit, configured to use the water volume rainfall item, the water volume accumulation item at the previous moment, and the water volume inflow item as the water volume spatiotemporal source updating item;
[0214] A water quality rainfall item construction unit is used to construct a water quality rainfall item according to the water volume of the sub-basin, the current rainfall and the water quality factor concentration at the current rainfall moment;
[0215] A water quality accumulation item construction unit at the previous moment, configured to construct a water quality accumulation item at the previous moment based on the sum of the sub-basin water volume, the water volume at the previous moment, and the water quality factor concentration at the previous moment;
[0216] a water quality inflow item construction unit, configured to construct a water quality inflow item according to the sub-basin water volume, the upstream area inflow volume, and the upstream area water quality factor concentration;
[0217] The water quality spatiotemporal traceability update item determination unit is used to use the water quality rainfall item, the water quality accumulation item at the previous moment and the water quality inflow item as the water quality spatiotemporal traceability update item.
[0218] In an optional embodiment, the spatiotemporal matrix iterative update calculation unit 703 includes:
[0219] The space-time matrix initialization unit is used to execute step S01: initializing the water quantity space-time matrix and the water quality space-time matrix corresponding to the water quantity and quality change process of the first rainfall period of all sub-basins;
[0220] The spatiotemporal matrix updating unit is configured to execute step S02: combining the water balance principle and taking into account the update influence range of the spatiotemporal traceability update item, performing matrix operations through the water quantity rainfall item, the water quantity accumulation item at the previous moment, and the water quantity inflow item, updating the water quantity spatiotemporal matrix of the target sub-basin at the previous rainfall moment as the water quantity spatiotemporal matrix of the target sub-basin at the current rainfall moment; performing matrix operations through the water quality rainfall item, the water quality accumulation item at the previous moment, and the water quality inflow item, updating the water quality spatiotemporal matrix of the target sub-basin at the previous rainfall moment as the water quality spatiotemporal matrix of the target sub-basin at the current rainfall moment;
[0221] The spatiotemporal matrix output unit is used in step S03 to determine whether there is a next rainfall period that has not been updated; if so, jump to step S02; if not, end the iterative process and output the water volume spatiotemporal matrix and water quality spatiotemporal matrix of each rainfall moment in the target sub-basin.
[0222] In an optional embodiment, the spatiotemporal matrix is a matrix based on the number of rainfall periods. is the number of rows and sub-basin partitions For the column Matrix, where:
[0223] The row elements of the water quantity space-time matrix represent the proportion of the water quantity and quality change process during the rainfall period to the water quantity of the target sub-basin, and the column elements represent the proportion of the water quantity contribution of the upstream sub-basin to the target sub-basin; the row elements of the water quality space-time matrix represent the proportion of the water quantity and quality change process during the rainfall period to the water quality of the target sub-basin, and the column elements represent the proportion of the water quality contribution of the upstream sub-basin to the target sub-basin.
[0224] In an optional embodiment, the visualization processing unit 704 includes:
[0225] The space-time matrix integration unit is used to integrate the water quantity space-time matrices of all rainfall moments to obtain a water quantity space-time matrix set, and to integrate the water quality space-time matrices of all rainfall moments to obtain a water quality space-time matrix set;
[0226] a first water contribution ratio calculation unit, configured to add the row elements of each row of the water volume spatiotemporal matrix set to obtain a first water volume contribution ratio of the water volume and water quality change process in each rainfall period to the target sub-basin;
[0227] A first water quality contribution ratio calculation unit is configured to add the row elements of each row of the water quality spatiotemporal matrix set to obtain a first water quality contribution ratio of the water quantity and quality change process in each rainfall period to the target sub-basin;
[0228] a second water contribution ratio calculation unit, configured to add the column elements of each column of the water spatiotemporal matrix set to obtain a second water contribution ratio of each upstream sub-basin of the target sub-basin to the target sub-basin;
[0229] a second water quality contribution ratio calculation unit, configured to add the column elements of each column of the water quality spatiotemporal matrix set to obtain a second water quality contribution ratio of each upstream sub-basin of the target sub-basin to the target sub-basin;
[0230] a water contribution ratio change graph drawing unit, configured to draw respective water contribution ratio change graphs based on each of the first water contribution ratios and each of the second water contribution ratios, as spatiotemporal tracing results of the dynamic change of water volume in the target sub-basin over time steps;
[0231] The water quality contribution ratio change graph drawing unit is used to draw respective water quality contribution ratio change graphs based on each of the first water quality contribution ratios and each of the second water quality contribution ratios, as the spatiotemporal tracing results of the water quality of the target sub-basin that changes dynamically with the time step.
[0232] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the aforementioned method embodiment.
[0233] It should be noted that in order to enable those skilled in the art to better distinguish data of the same type but with different actual meanings, some technical features are distinguished by the first and second in the embodiments of the present invention. The first and second are only used for data distinction and have no other special meanings. It can be understood that the present invention does not impose any restrictions on this.
[0234] An embodiment of the present invention further provides an electronic device, the device including a processor and a memory:
[0235] The memory is used to store program codes and transmit the program codes to the processor;
[0236] The processor is used to execute the spatiotemporal tracing method for water quantity and quality according to any embodiment of the present invention according to the instructions in the program code.
[0237] An embodiment of the present invention further provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the spatiotemporal tracing method for water quantity and quality according to any embodiment of the present invention.
[0238] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0239] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0240] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0241] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0242] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0243] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for temporal and spatial tracing of water quantity and quality, characterized in that: include: Obtain rainfall data for the basin to be traced; The watershed to be traced includes multiple sub-watersheds to be analyzed; For any target sub-basin in the basin to be traced, solving water quantity and quality related variables of the target sub-basin based on the rainfall related data; Based on the water quantity and water quality related variables, construct a spatiotemporal traceability update term, and perform spatiotemporal matrix iterative update calculation according to the spatiotemporal traceability update term to obtain the spatiotemporal matrix of each rainfall moment of the target sub-basin; Visualize the spatiotemporal matrix of all rainfall moments to obtain spatiotemporal tracing results; The spatiotemporal source update items include water quantity spatiotemporal source update items and water quality spatiotemporal source update items; The space-time matrix includes a water quantity space-time matrix and a water quality space-time matrix; The step of constructing a spatiotemporal source updating item based on the water quantity and quality related variables includes: Calculate the sum of the sub-basin water volume of the target sub-basin before water outflow occurs during the current rainfall period based on the water volume at the previous moment, the current rainfall, and the inflow of the upstream area; Constructing a water quantity and rainfall item according to the water quantity of the sub-basin and the current rainfall; Constructing a water volume accumulation item at the previous moment according to the water volume of the sub-basin and the water volume at the previous moment; Constructing a water inflow item according to the water volume of the sub-basin and the inflow volume of the upstream area; The water volume rainfall item, the water volume accumulation item at the previous moment and the water volume inflow item are used as water volume spatiotemporal source update items; Constructing a water quality rainfall term based on the sub-basin water volume, the current rainfall, and the water quality factor concentration at the current rainfall moment; Constructing a water quality accumulation item at the previous moment based on the sum of the water volume of the sub-basin, the water volume at the previous moment, and the concentration of the water quality factor at the previous moment; Constructing a water quality inflow item based on the sub-basin water volume, the upstream area inflow, and the upstream area water quality factor concentration; The water quality rainfall item, the water quality accumulation item at the previous moment and the water quality inflow item are used as water quality spatiotemporal traceability update items.
2. The method for temporal and spatial tracing of water quantity and quality according to claim 1 is characterized in that: The rainfall-related data include basin area, number of sub-basin divisions, total rainfall duration, number of rainfall periods and rainfall sequence data; the water quantity and quality-related variables include water quantity-related variables and water quality-related variables; Solving the water quantity and water quality related variables of the target sub-basin based on the rainfall related data includes: Determining the rainfall period corresponding to each rainfall moment according to the total rainfall duration and the number of rainfall periods; Extracting a rainfall intensity variation sequence of the target sub-basin from the rainfall sequence data, and calculating a current rainfall amount in a current rainfall period according to the rainfall intensity variation sequence; Calculating the sub-basin area of each sub-basin in the basin to be traced according to the basin area and the number of sub-basin partitions, and determining the sub-basin topological relationship of each sub-basin; Based on the sub-basin area of the target sub-basin, solving the sub-basin water volume of the target sub-basin at each rainfall moment, and recording the sub-basin water volume at the last rainfall moment as the water volume at the last moment; Calculating the water quality factor concentration of the target sub-basin at each rainfall moment, and recording the water quality factor concentration at the last rainfall moment as the water quality factor concentration at the last moment; Based on the sub-basin water volume of the target sub-basin at the current rainfall moment, the water volume at the previous moment, and the current rainfall, and in combination with the sub-basin topological relationship, the amount of water received by the target sub-basin from each upstream sub-basin during the current rainfall period is calculated and recorded as the upstream area inflow; Recording the water quality factor concentration of the water flow received by the target sub-basin from each upstream sub-basin during the current rainfall period as the upstream area water quality factor concentration; The water volume at the previous moment, the current rainfall, and the inflow volume of the upstream area are used as water volume-related variables of the target sub-basin; The product of the water volume at the previous moment and the water quality factor concentration at the previous moment, the product of the current rainfall and the water quality factor concentration at the current rainfall moment, and the product of the inflow volume in the upstream area and the water quality factor concentration in the upstream area are used as the water quality related variables of the target sub-basin.
3. The method for temporal and spatial tracing of water quantity and quality according to claim 2 is characterized in that: The step of calculating the sub-basin water volume of the target sub-basin at each rainfall moment based on the sub-basin area of the target sub-basin includes: Calculating the rainfall intensity per unit area of the target sub-basin according to the rainfall intensity variation sequence, and calculating the source and sink terms based on the rainfall intensity per unit area in combination with the infiltration loss; Based on the source and sink terms, the water depth of the target sub-basin at each rainfall moment is calculated by simultaneously solving the water balance equation, the mass conservation equation, and the momentum conservation equation; The sub-basin water volume of the target sub-basin at each rainfall moment is calculated based on the water depth at each rainfall moment and the sub-basin area of the target sub-basin.
4. The method for temporal and spatial tracing of water quantity and quality according to claim 1 is characterized in that: The iterative updating calculation of the space-time matrix according to the space-time traceability update item to obtain the space-time matrix of each rainfall moment of the target sub-basin includes: Step S01: Initialize the water quantity space-time matrix and water quality space-time matrix corresponding to the water quantity and quality change process of the first rainfall period of all sub-basins; Step S02: In combination with the water balance principle and taking into account the update impact range of the spatiotemporal traceability update item, matrix operations are performed through the water quantity rainfall item, the water quantity accumulation item at the previous moment, and the water quantity inflow item to update the water quantity spatiotemporal matrix of the target sub-basin at the previous rainfall moment as the water quantity spatiotemporal matrix of the target sub-basin at the current rainfall moment; matrix operations are performed through the water quality rainfall item, the water quality accumulation item at the previous moment, and the water quality inflow item to update the water quality spatiotemporal matrix of the target sub-basin at the previous rainfall moment as the water quality spatiotemporal matrix of the target sub-basin at the current rainfall moment; Step S03: Determine whether there is a next rainfall period that has not been updated; if so, jump to step S02; if not, end the iterative process and output the water volume spatiotemporal matrix and water quality spatiotemporal matrix of each rainfall moment in the target sub-basin.
5. The method for temporal and spatial tracing of water quantity and quality according to claim 4 is characterized in that: The spatiotemporal matrix is a matrix with the number of rainfall periods is the number of rows and sub-basin partitions For the column Matrix, where: The row elements of the water quantity space-time matrix represent the proportion of the water quantity and quality change process during the rainfall period to the water quantity of the target sub-basin, and the column elements represent the proportion of the water quantity contribution of the upstream sub-basin to the target sub-basin; the row elements of the water quality space-time matrix represent the proportion of the water quantity and quality change process during the rainfall period to the water quality of the target sub-basin, and the column elements represent the proportion of the water quality contribution of the upstream sub-basin to the target sub-basin.
6. The method for temporal and spatial tracing of water quantity and quality according to claim 4 or 5, characterized in that: The visualization processing is performed based on the spatiotemporal matrix of all rainfall moments to obtain spatiotemporal tracing results, including: Integrate the water quantity space-time matrix of all rainfall moments to obtain a water quantity space-time matrix set, and integrate the water quality space-time matrix of all rainfall moments to obtain a water quality space-time matrix set; Adding the row elements of each row of the water quantity spatiotemporal matrix set to obtain the first water quantity contribution ratio of the water quantity and quality change process in each rainfall period to the target sub-basin; Adding the row elements of each row of the water quality spatiotemporal matrix set to obtain the first water quality contribution ratio of the water quantity and quality change process in each rainfall period to the target sub-basin; Adding the column elements of each column of the water volume spatiotemporal matrix set to obtain a second water volume contribution ratio of each upstream sub-basin of the target sub-basin to the target sub-basin; Adding the column elements of each column of the water quality spatiotemporal matrix set to obtain a second water quality contribution ratio of each upstream sub-basin of the target sub-basin to the target sub-basin; Based on each of the first water contribution ratios and each of the second water contribution ratios, a respective water contribution ratio change graph is drawn as a spatiotemporal tracing result of the dynamic change of water volume in the target sub-basin over time steps; Based on each of the first water quality contribution ratios and each of the second water quality contribution ratios, respective water quality contribution ratio change graphs are drawn as spatiotemporal tracing results of the dynamic changes in water quality of the target sub-basin with time steps.
7. A water quantity and quality time-space tracing device, characterized in that: include: A data acquisition unit, used to acquire rainfall-related data of the basin to be traced; The watershed to be traced includes multiple sub-watersheds to be analyzed; a water quantity and quality related variable solving unit, configured to solve, for any target sub-basin in the basin to be traced, the water quantity and quality related variables of the target sub-basin based on the rainfall related data; a space-time matrix iterative update calculation unit, configured to construct a space-time source traceability update term based on the water quantity and quality related variables, and perform space-time matrix iterative update calculation based on the space-time source traceability update term to obtain the space-time matrix of each rainfall moment of the target sub-basin; A visualization processing unit is used to perform visualization processing based on the spatiotemporal matrix of all rainfall moments to obtain spatiotemporal tracing results; The spatiotemporal source update items include water quantity spatiotemporal source update items and water quality spatiotemporal source update items; The space-time matrix includes a water quantity space-time matrix and a water quality space-time matrix; The spatiotemporal matrix iterative update calculation unit includes: a sub-basin water volume sum calculation unit, configured to calculate the sub-basin water volume sum of the target sub-basin before water outflow occurs during the current rainfall period based on the water volume at the previous moment, the current rainfall, and the inflow of the upstream area; A water quantity and rainfall item construction unit, configured to construct a water quantity and rainfall item according to the water quantity of the sub-basin and the current rainfall; A water volume accumulation item construction unit at the previous moment, configured to construct a water volume accumulation item at the previous moment based on the water volume of the sub-basin and the water volume at the previous moment; A water inflow item construction unit, configured to construct a water inflow item according to the sub-basin water volume and the inflow volume of the upstream area; a water volume spatiotemporal source updating item determining unit, configured to use the water volume rainfall item, the water volume accumulation item at the previous moment, and the water volume inflow item as the water volume spatiotemporal source updating item; A water quality rainfall item construction unit is used to construct a water quality rainfall item according to the water volume of the sub-basin, the current rainfall and the water quality factor concentration at the current rainfall moment; A water quality accumulation item construction unit at the previous moment, configured to construct a water quality accumulation item at the previous moment based on the water volume of the sub-basin, the water volume at the previous moment, and the water quality factor concentration at the previous moment; A water quality inflow item construction unit, configured to construct a water quality inflow item according to the sub-basin water volume, the upstream area inflow volume, and the upstream area water quality factor concentration; The water quality spatiotemporal traceability update item determination unit is used to use the water quality rainfall item, the water quality accumulation item at the previous moment and the water quality inflow item as the water quality spatiotemporal traceability update item.
8. An electronic device, characterized in that: The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the spatiotemporal tracing method for water quantity and quality according to any one of claims 1 to 6 according to the instructions in the program code.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store program code, and the program code is used to execute the spatiotemporal tracing method for water quantity and quality according to any one of claims 1 to 6.
Citation Information
Patent Citations
Air pollution tracing method based on network virus spreading model
CN105528753A
Drainage basin level pollution value traceability analysis method
CN116070431A