A water demand prediction method, system, device and medium
By constructing a network structure model and timing memory model, and combining the spatial water demand correlation intensity, the existing water demand prediction methods have solved the objectivity and accuracy of the existing water demand prediction methods, and achieved more accurate water demand prediction.
Patent Information
- Application Number
- CN202410834376.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-06-26
AI Technical Summary
The existing water volume prediction methods have low objectiveness and accuracy, and cannot effectively capture the spatial correlation between different regions.
By obtaining the original water use data of different water use areas, pretreatment is carried out to construct a network structure model to obtain the spatial water demand correlation intensity, and predict the water demand in combination with the timing memory model, and finally obtain more accurate water demand results through spatial correction.
It improves the objectivity and accuracy of water demand prediction, can provide more objective and accurate water demand prediction results under different time scales, reflecting the space-time iteration evolution of water demand.
Smart Images

Figure CN118863123B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water conservancy technology, and in particular to a water demand prediction method, system, equipment and medium. Background Art
[0002] Reasonable water demand forecasting is an important basis for the planning and operation of water conservancy projects. In the project planning stage, the water demand forecast for the planning year affects the scale and layout of the project; in the project management and operation, water demand forecasts at different time scales (including medium- and long-term, short-term and real-time) affect the formulation of scheduling and operation plans and the balance between benefits and risks.
[0003] At present, the traditional water demand forecasting methods mainly include quota analysis method and trend method. Among them, quota analysis method takes the water quota of each industry as the main parameter and combines the forecast results of social and economic development indicators to forecast water demand; trend method is based on historical data and uses trend extension method to predict future water demand. However, the objectivity of these two methods in water demand forecasting is low and the accuracy is not high.
[0004] Therefore, the problems existing in the prior art still need to be solved and optimized. Summary of the invention
[0005] The purpose of the present invention is to solve one of the technical problems existing in the related art to at least a certain extent.
[0006] To this end, an object of an embodiment of the present invention is to provide a water demand prediction method, which can effectively improve the objectivity and accuracy of water demand prediction.
[0007] Another object of an embodiment of the present application is to provide a water demand prediction system.
[0008] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present application include:
[0009] In a first aspect, an embodiment of the present application provides a water demand prediction method, comprising:
[0010] Acquire first original water use data corresponding to the first water use area and second original water use data corresponding to the second water use area;
[0011] Preprocessing the first original water use data to obtain first historical water use data, and preprocessing the second original water use data to obtain second historical water use data;
[0012] Based on the first historical water use data and the second historical water use data, a network structure model is constructed, and the spatial water demand correlation intensity output by the network structure model is obtained, wherein the spatial water demand correlation intensity is used to characterize the degree of influence on the first water use area when the water demand of the second water use area changes, and the first water use area is adjacent to the second water use area;
[0013] Inputting the first historical water use data into a time series memory model, wherein the time series memory model is used to predict the water demand of the first water use area according to the time dependency relationship in the first historical water use data, to obtain a first time series water demand prediction result;
[0014] According to the spatial water demand correlation intensity and the second historical water use data, the first time series water demand forecast result is spatially corrected to obtain a target water demand result.
[0015] In addition, the water demand prediction method according to the above embodiment of the present application may also have the following additional technical features:
[0016] Furthermore, in one embodiment of the present application, the target water usage data is preprocessed to obtain target historical data, including:
[0017] Screening the target water use data to obtain maximum water use data and minimum water use data;
[0018] Normalizing the target water use data according to the maximum water use data and the minimum water use data to obtain the target historical data;
[0019] Among them, the target water use data is the first original water use data or the second original water use data, the target historical data is the first historical water use data or the second historical water use data, and the target historical data corresponds to the target water use data.
[0020] Furthermore, in one embodiment of the present application, the network structure model is constructed by the following steps:
[0021] Get the preset targeting rules;
[0022] Constructing a complete node graph according to the first historical water use data and the second historical water use data;
[0023] Performing independent node pair updates on the complete node graph to obtain an undirected node graph;
[0024] According to the directional rule, the node undirected graph is directed updated to obtain the network structure model.
[0025] Further, in one embodiment of the present application, performing node pair independent updating on the complete node graph includes:
[0026] Obtaining preset saliency indicators and node pairs in the complete node graph, and node sets corresponding to the node pairs;
[0027] According to the node set, an independence test is performed on the node pairs to obtain an independence statistic;
[0028] Comparing the independence statistic and the significant index to obtain a comparison result;
[0029] If the comparison result is that the independence statistic is greater than the significance index, the undirected edge corresponding to the node pair is removed; or if the comparison result is that the independence statistic is less than or equal to the significance index, the undirected edge corresponding to the node pair is retained.
[0030] Further, in one embodiment of the present application, performing independence test on the node pairs according to the node set to obtain independence statistics includes:
[0031] Obtain a first node and a second node in the node pair;
[0032] According to the node set, performing a first conditional probability test on the first node to obtain a first node probability, and, according to the node set and the second node, performing a second conditional probability test on the first node to obtain a second node probability;
[0033] According to the first node probability, a statistical test is performed on the second node probability to obtain the independence statistic.
[0034] Further, in the embodiment of the present application, the conditional probability expression of the third node corresponding to the first historical water consumption data in the network structure model is:
[0035]
[0036] Wherein, P(·) is the conditional probability distribution in the network structure model; i is the number of the third node; X u (t) is the third node in time period t; Pa(X i ) is the third node X i The collection of parent nodes; X j (t) is the set Pa(X i ), the j-th parent node in time period t; is Gaussian distribution; μ i (t) is the mean value of the third node in time period t; β ijThe third node and the parent node X j The weight parameter between ; is the variance of the third node.
[0037] Further, in one embodiment of the present application, spatially correcting the first time series water demand forecast result according to the spatial water demand association intensity and the second historical water use data to obtain a target water demand result includes:
[0038] Based on the time series memory model, obtaining a second time series water demand forecast result corresponding to the second water use area;
[0039] According to the spatial water demand correlation intensity and the second historical water use data, the second time series water demand forecast result is spatially corrected in the same region to obtain corrected data in the same region;
[0040] According to the same-area correction data, the first time series water demand forecast result is corrected in adjacent area space to obtain the target water demand result.
[0041] In a second aspect, an embodiment of the present application provides a water demand prediction system, comprising:
[0042] An acquisition module, used to acquire first original water use data corresponding to the first water use area and second original water use data corresponding to the second water use area;
[0043] a processing module, configured to pre-process the first original water use data to obtain first historical water use data, and to pre-process the second original water use data to obtain second historical water use data;
[0044] A construction module, configured to construct a network structure model based on the first historical water use data and the second historical water use data, and obtain a spatial water demand correlation strength output by the network structure model, wherein the spatial water demand correlation strength is used to characterize the degree of influence of a change in water demand in the second water use area on the first water use area, wherein the first water use area is adjacent to the second water use area;
[0045] A prediction module, used for inputting the first historical water use data into a time series memory model, wherein the time series memory model is used for predicting the water demand of the first water use area according to the time dependency in the first historical water use data, so as to obtain a first time series water demand prediction result;
[0046] A correction module is used to perform spatial correction on the first time series water demand forecast result according to the spatial water demand correlation intensity and the second historical water use data to obtain a target water demand result.
[0047] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0048] at least one processor;
[0049] at least one memory for storing at least one program;
[0050] When the at least one program is executed by the at least one processor, the at least one processor implements the method of the first aspect described above.
[0051] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used to implement the method of the first aspect when executed by the processor.
[0052] The advantages and benefits of the present application will be partially given in the following description, and partially become apparent from the following description, or be understood through the practice of the present application:
[0053] The embodiments of the present application disclose a water demand prediction method, system, device and medium, wherein the prediction method obtains first original water use data corresponding to a first water use area and second original water use data corresponding to a second water use area; pre-processes the first original water use data to obtain first historical water use data, and pre-processes the second original water use data to obtain second historical water use data; constructs a network structure model based on the first historical water use data and the second historical water use data, and obtains the spatial water demand correlation strength output by the network structure model, the spatial water demand correlation strength is used to characterize the degree of influence on the first water use area when the water demand of the second water use area changes, and the first water use area is adjacent to the second water use area; inputs the first historical water use data into a time series memory model, the time series memory model is used to predict the water demand of the first water use area according to the time dependency in the first historical water use data, and obtains a first time series water demand prediction result; spatially corrects the first time series water demand prediction result according to the spatial water demand correlation strength and the second historical water use data to obtain a target water demand result. This prediction method is based on the spatial water demand correlation intensity output by the network structure model and the first time series water demand prediction result output by the time series memory model. It can make the final target water demand result not only focus on the temporal continuity of water demand data, but also focus on the spatial correlation between water demand data in different regions, realize the spatiotemporal iterative evolution of water demand, and provide more objective and accurate water demand prediction results at different time scales. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the embodiments of the present application or the drawings of the related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly expressing some embodiments of the technical solutions of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0055] Figure 1 A schematic diagram of a flow chart of a water demand prediction method provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of the structure of a water demand prediction system provided in an embodiment of the present application;
[0057] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limitations on the present application. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0060] At present, the traditional water demand forecasting methods mainly include quota analysis method and trend method. Among them, quota analysis method takes the water quota of each industry as the main parameter and combines the prediction results of social and economic development indicators to predict water demand; trend method is based on historical data and adopts trend extension method to predict future water demand. However, the change of water demand in a region is not independent. The social and economic development of a region will affect the adjacent regions through spillover to varying degrees. In addition, the adjacent regions often have similar water use habits and industrial structures due to similar culture and frequent personnel flow. For example, water use area A and water use area B are adjacent in space, and water use area A undertakes the spillover industries and personnel of water use area B. Therefore, the change of water demand in water use area A not only depends on the change law of its historical water use, but also is affected by the change of water demand in the adjacent regions, that is, the change of water demand has both time continuity and spatial correlation. These two traditional methods often only focus on time continuity and ignore spatial correlation. Therefore, the objectivity of these two methods in water demand forecasting is low and the accuracy is not high.
[0061] In view of this, an embodiment of the present invention provides a water demand prediction method. The prediction method is based on the spatial water demand correlation intensity output by the network structure model and the first time series water demand prediction result output by the time series memory model. The method can make the final target water demand result not only focus on the time continuity of the water demand data, but also focus on the spatial correlation between the water demand data in different regions, realize the spatiotemporal iterative evolution of the water demand, and can provide more objective and accurate water demand prediction results at different time scales.
[0062] Reference Figure 1 In an embodiment of the present application, a water demand prediction method includes:
[0063] Step 110: Acquire first original water use data corresponding to the first water use area and second original water use data corresponding to the second water use area;
[0064] In the embodiment of the present application, the first water use area and the second water use area may be specific water use areas, wherein the first water use area is a target water use area for water demand forecasting, and the second water use area is a water use area adjacent to the first water use area, wherein the number of second water use areas is greater than or equal to 1. The first original water use data is the historical water demand data in the first water use area, and the data may be represented based on a time series, and the second original water use data is similar.
[0065] Step 120: preprocessing the first original water use data to obtain first historical water use data, and preprocessing the second original water use data to obtain second historical water use data;
[0066] In some embodiments, the target water use data is preprocessed to obtain target historical data, including:
[0067] A1. Screening the target water use data to obtain maximum water use data and minimum water use data;
[0068] A2. Normalizing the target water use data according to the maximum water use data and the minimum water use data to obtain the target historical data;
[0069] Among them, the target water use data is the first original water use data or the second original water use data, the target historical data is the first historical water use data or the second historical water use data, and the target historical data corresponds to the target water use data.
[0070] In the embodiment of the present application, the target water use data may be any one of the first original water use data or the second original water use data. In the embodiment of the present application, the target water use data is taken as the first original water use data as an example. The preprocessing may be to normalize the first original water use data. Specifically, step A1 may first perform maximum and minimum value screening on the first original water use data, so as to screen out the largest data sample in the first original water use data as the maximum water use data, and the smallest data sample as the minimum water use data; step A2 may be based on the maximum and minimum value normalization formula to normalize all data samples in the first original water use data, so as to obtain the first historical water use data. It is worth mentioning that when the target water use data is the second original water use data, it can be simply deduced similarly to the content of the aforementioned target water use data being the first original water use data.
[0071] Exemplarily, the equivalent expression of the target historical data is:
[0072]
[0073] Among them, X i (t) is the target historical data of water use area i in period t; is the target water consumption data of water-using area i in period t; is the minimum water consumption data of water use area i; is the maximum water consumption data of water use area i; water use area i is any one of the first water use area and the second water use area.
[0074] Step 130: construct a network structure model based on the first historical water use data and the second historical water use data, and obtain the spatial water demand correlation strength output by the network structure model, wherein the spatial water demand correlation strength is used to characterize the degree of influence of the change in water demand of the second water use area on the first water use area, and the first water use area is adjacent to the second water use area;
[0075] In an embodiment of the present application, the network structure model can be a Bayesian network structure, which is used to characterize the degree of mutual influence of changes in water demand between different water use areas. It can be constructed using expert experience or network structure learning algorithms.
[0076] In some embodiments, the network structure model in step 130 is constructed by the following steps:
[0077] B1. Obtaining preset directional rules;
[0078] B2. constructing a complete node graph based on the first historical water use data and the second historical water use data;
[0079] In an embodiment of the present application, a network structure model can be specifically constructed based on a PC algorithm (Peter-Clark Algorithm). The preset directional rule is used to orient the edges in the node undirected graph to generate a directed acyclic network structure model. Step B2 can be to use the first historical water use data corresponding to the first water use area as the first water use node in the node complete graph, and the second historical water use data corresponding to the second water use area as the second water use node in the node complete graph, and the number of the second water use nodes is greater than or equal to 1, so as to construct a node complete graph.
[0080] It can be understood that there is an undirected edge between each node pair in the node complete graph. For example, a node complete graph includes four nodes A, B, C and D, then the node complete graph includes undirected edge AB, undirected edge AC, undirected edge AD, undirected edge BC, undirected edge BD and undirected edge CD. The examples in this application are for illustration only and do not impose any limitations on this application. The actual number of nodes in the node complete graph can be obtained based on the total number of the first water use area and the second water use area.
[0081] B3, performing independent node pair updates on the complete node graph to obtain an undirected node graph;
[0082] Furthermore, the step B3, performing independent node pair updates on the complete node graph, includes:
[0083] B31. Obtaining preset significant indicators and node pairs in the complete node graph, and node sets corresponding to the node pairs;
[0084] In the embodiment of the present application, the significant index is used as a significance level threshold associated with the independence statistic; the node pair in the complete node graph can be composed of a first water-using node and a second water-using node, or can be composed of different second water-using nodes. It can be understood that the example of the present application takes a certain node pair in the complete node graph as an example, and for this node pair, its corresponding node set is used to verify whether the two nodes in the node pair are independent under the node set.
[0085] B32. Performing an independence test on the node pairs according to the node set to obtain an independence statistic;
[0086] Furthermore, the step B32, performing an independence test on the node pairs according to the node set to obtain an independence statistic, includes:
[0087] B321. Acquire the first node and the second node in the node pair;
[0088] B322. According to the node set, perform a first conditional probability test on the first node to obtain a first node probability, and, according to the node set and the second node, perform a second conditional probability test on the first node to obtain a second node probability;
[0089] B323. Perform a statistical test on the second node probability based on the first node probability to obtain the independence statistic.
[0090] In the embodiment of the present application, for a node pair in a complete node graph, the node pair includes a first node X and a second node Y. First, the conditional probability of the first node under the node set S can be calculated to obtain the first node probability, which can be expressed as P(X, S), and the conditional probability of the first node under the node set under the condition that the second node sends is calculated to obtain the second node probability, which can be expressed as P(X|Y, S). It can be understood that the statistical test of step B323 can be based on the chi-square test, Fisher's exact test, G 2 Whether the first node and the second node are independent in the node set is calculated by means of verification or the like.
[0091] B33, comparing the independence statistic and the significant index to obtain a comparison result;
[0092] B34. If the comparison result is that the independence statistic is greater than the significance index, then the undirected edge corresponding to the node pair is removed; or, if the comparison result is that the independence statistic is less than or equal to the significance index, then the undirected edge corresponding to the node pair is retained.
[0093] In an embodiment of the present application, step B33 may be to compare and calculate the size relationship between the independence statistic and the significance index. If the comparison result is that the independence statistic is greater than the preset significance index, the first node and the second node are conditionally independent, and the undirected edge between the first node and the second node is removed; or, if the comparison result is that the independence statistic is less than or equal to the preset significance index, the first node and the second node are not conditionally independent, and the undirected edge between the first node and the second node is retained.
[0094] It can be understood that the remaining node pairs in the complete node graph are similar to the contents of the aforementioned node pairs. By repeatedly executing steps B31 to B34 in the embodiment of the present application, all node pairs in the complete node graph can be independently updated, and the complete node graph after independent update can be used as a node undirected graph.
[0095] B4. According to the directional rule, the node undirected graph is directed updated to obtain the network structure model.
[0096] In an embodiment of the present application, the directional rules include an undirected edge directional rule, a loop avoidance rule, and a parent node determination rule, wherein the undirected edge directional rule can specifically be that for a node pair (X, Y), if there is an undirected edge XY between the first node X and the second node Y, and there is a third node Z such that X→Z→Y, then the undirected edge XY is updated to a directed edge X→Y; the loop avoidance rule can specifically be that if a certain directed edge will form a loop, the directed edge is abandoned; the parent node determination rule can specifically be that for each first node X, if the condition set formed by the second node Y makes the first node and other nodes conditionally independent, then the second node is determined to be the parent node of the first node, that is, the second node is an adjacent node of the first node.
[0097] It is understandable that the directed update can be based on the aforementioned undirected edge directional rules, loop avoidance rules and parent node determination rules, so as to convert the node undirected graph into a directed acyclic graph, and use the obtained directed acyclic graph as the network structure model.
[0098] In the embodiment of the present application, since the network structure model is constructed based on the Bayesian network structure, the strength of the correlation between the nodes in the network structure model can be expressed by conditional probability. Specifically, for the third node formed by the first historical water use data in the network structure model, its conditional probability expression in the network structure model is:
[0099]
[0100] Wherein, P(·) is the conditional probability distribution in the network structure model; i is the number of the third node; X i (t) is the third node in time period t; Pa(X i ) is the third node X i The collection of parent nodes; X j (t) is the set Pa(X i ), the j-th parent node in time period t; is Gaussian distribution; μ i (t) is the mean value of the third node in time period t; β ij The third node and the parent node X j The weight parameter between ; is the variance of the third node.
[0101] It should be noted that the parent node X j is the node formed by the second historical water use data (i.e., the second water use area) in the network structure model. The mean of the third node in time period t can be estimated by the local polynomial regression (Locally Estimated Scatterplot Smoothing, LOESS) method. Specifically, for the first historical water use data, the window width of each time period t can be selected first, and then the regression weights between the neighboring data points adjacent to the regression data points are calculated based on the window width and the regression data points in time period t. The regression weight can be determined by the distance between the neighboring data points and the regression data points. The equivalent expression of the regression weight is:
[0102]
[0103] Among them, ω(x ti , x t ) is the regression weight between the regression data point in time period t and the adjacent data points; x ti is the neighboring data point; x t are neighboring data points; d is half of the window width.
[0104] After determining the regression weights, the weighted least squares method can be used to perform local low-order polynomial fitting within the window width of each regression data point to obtain the mean μ of the third node in time period t. i (t).
[0105] It is worth mentioning that the variance of the third node can be simply determined based on the first historical water use data and the mean of the third node in time period t, which will not be described in detail in this application. As for the weight parameter between the third node and the parent node (i.e., the spatial water demand correlation strength), the weight parameter is also used to characterize the degree of influence on the adjacent water use area when the water demand of the water use area changes, that is, to characterize the degree of influence on the first water use area when the water demand of the second water use area changes.
[0106] Exemplarily, for the weight parameter of the third node corresponding to each first water use area, it can obtain the parent node set that affects the third node (i.e., the set of parent nodes), and build a regression model based on the mean value of the third node in time period t, the first historical water use data corresponding to the third node, and the parent node set to determine the equivalent expression of the regression model:
[0107]
[0108] Among them, X i (t) is the third node in time period t; μ i (t) is the average value of the third node in time period t; Pa(X i ) is the third node X i The collection of parent nodes; X j (t) is the set Pa(X i ), in the jth parent node of time period t; ∈ i (t) is the error term.
[0109] Step 140: input the first historical water use data into a time series memory model, wherein the time series memory model is used to predict the water demand of the first water use area according to the time dependency relationship in the first historical water use data, so as to obtain a first time series water demand prediction result;
[0110] In an embodiment of the present application, the time series memory model can be implemented by a trained long short-term memory network (LSTM), and the water demand forecast value of the first water use area in the future time period t+1 is predicted through the time series memory model, and the water demand forecast value is used as the first time series water demand prediction result.
[0111] It can be understood that the future time period in the embodiment of the present application can also be any one of the future time period t+2, future time period t+3, future time period t+6, etc. The specific value of the future time period can be set according to actual conditions. The examples in this application are for illustration only and do not impose any limitations on this application.
[0112] Step 150: perform spatial correction on the first time series water demand forecast result according to the spatial water demand correlation intensity and the second historical water use data to obtain a target water demand result.
[0113] In the embodiment of the present application, the step 150, spatially correcting the first time series water demand forecast result according to the spatial water demand association strength and the second historical water use data to obtain a target water demand result, includes:
[0114] Step 151: Based on the time series memory model, obtain a second time series water demand forecast result corresponding to the second water use area;
[0115] Step 152: perform same-region spatial correction on the second time series water demand forecast result according to the spatial water demand correlation intensity and the second historical water use data to obtain same-region corrected data;
[0116] Step 153: perform adjacent region spatial correction on the first time series water demand forecast result according to the same region correction data to obtain the target water demand result.
[0117] In an embodiment of the present application, for the first water use area and its corresponding first historical water use data, the first time series water demand forecast result of the first water use area can be corrected based on the spatial water demand correlation intensity and the second historical water use data corresponding to each second water use area, so as to obtain the final target water demand result of the first water use area. The target water demand result can reflect the actual water demand of several adjacent second water use areas and their impact on the water demand of the first water use area.
[0118] Exemplarily, step 151 may be to input the second historical water use data corresponding to each second water use area into the time series memory model for prediction, and obtain the second time series water demand prediction result corresponding to each second water use area. The same-region spatial correction of step 152 may be based on the spatial water demand correlation intensity and the second historical water use data, obtain the spatial correction item of the corresponding second time series water demand prediction result, and use the spatial correction item as the same-region correction data. The number of the same-region correction data is the same as the number of the second water use areas, and each same-region correction item can transfer the water demand impact of the corresponding second water use area to the first water use area. Step 153 may be the first time series demand prediction result, and the sum operation is performed with all the same-region correction data to correct the basic prediction value of the first time series water demand prediction result.
[0119] For example, in the embodiment of the present application, for a certain time-space iterative calculation, the equivalent expression of the target water demand result of the first water use area in the future time period t+1 is:
[0120]
[0121] in, is the target water demand result of the first water-using area in the future period t+1; is the first time series water demand forecast result of the first water use area in the future period t+1; j (t) is the second historical water use data of the jth second water use area in time period t; It is the second time series water demand forecast result of the jth second water use area in the future period t+1.
[0122] It should be noted that when the spatiotemporal iterative calculation is completed, the target water demand result obtained by the spatiotemporal iterative calculation at the current calculation times can be added to the latest first original water use data, thereby completing the update of the first original water use data; and / or, the second time series water demand forecast result obtained by the spatiotemporal iterative calculation at the current calculation times can be added to the latest second original water use data, thereby completing the update of the second original water use data.
[0123] Exemplarily, when the current time period is t, the time period corresponding to the first time-space iterative calculation is t+1, and the time period corresponding to the second time-space iterative calculation is t+2. If the number of calculations corresponding to the current time-space iterative calculation process is the second time, the target water demand result under time period t+1 can be added to the first original water use data, and / or the second time series water demand forecast result under time period t+1 can be added to the second original water use data. The specific adding method can be to denormalize the target water demand result, and then add the denormalized target water demand result to the latest first original water use data. The update of the second original water use data is similar to the aforementioned update of the first original water use data, and can be simply deduced by analogy, so this application will not go into details here.
[0124] To summarize, the embodiment of the present application is based on the spatial water demand correlation intensity output by the network structure model, and the first time series water demand prediction result output by the time series memory model, so that the final target water demand result not only focuses on the time continuity of the water demand data, but also focuses on the spatial correlation between the water demand data in different regions. It can realize the spatiotemporal iterative evolution of water demand, and can provide more objective and accurate water demand prediction results at different time scales (medium- and long-term, short-term and real-time time scales).
[0125] A water demand prediction system proposed according to an embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0126] Reference Figure 2 , a water demand prediction system proposed in an embodiment of the present application includes:
[0127] An acquisition module 101 is used to acquire first original water use data corresponding to a first water use area and second original water use data corresponding to a second water use area;
[0128] A processing module 102 is used to pre-process the first original water use data to obtain first historical water use data, and to pre-process the second original water use data to obtain second historical water use data;
[0129] A construction module 103 is used to construct a network structure model based on the first historical water use data and the second historical water use data, and obtain the spatial water demand correlation strength output by the network structure model, wherein the spatial water demand correlation strength is used to characterize the degree of influence of the change in water demand of the second water use area on the first water use area, and the first water use area is adjacent to the second water use area;
[0130] A prediction module 104, configured to input the first historical water use data into a time series memory model, wherein the time series memory model is configured to predict the water demand of the first water use area according to the time dependency relationship in the first historical water use data, and obtain a first time series water demand prediction result;
[0131] The correction module 105 is used to perform spatial correction on the first time series water demand forecast result according to the spatial water demand correlation intensity and the second historical water use data to obtain a target water demand result.
[0132] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0133] Reference Figure 3 , the embodiment of the present application further provides an electronic device, including:
[0134] at least one processor 201;
[0135] At least one memory 202, used to store at least one program;
[0136] When the at least one program is executed by the at least one processor 201, the at least one processor 201 implements the above method embodiment.
[0137] Similarly, it can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0138] The embodiment of the present application further provides a computer-readable storage medium, in which a program executable by the processor 201 is stored. The program executable by the processor 201 is used to implement the above-mentioned method embodiment when executed by the processor 201.
[0139] Similarly, the contents of the above method embodiments are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0140] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the application is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part described as a larger operation is performed independently.
[0141] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present application. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional techniques of the engineer. Therefore, those skilled in the art can implement the present application set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the attached claims and their equivalents.
[0142] If the function is implemented in the form of 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 application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method of the embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0143] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0144] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0145] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0146] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0147] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
[0148] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the embodiments. Technical personnel familiar with the field can make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A water demand prediction method, characterized in that: include: Acquire first original water use data corresponding to the first water use area and second original water use data corresponding to the second water use area; Preprocessing the first original water use data to obtain first historical water use data, and preprocessing the second original water use data to obtain second historical water use data; Based on the first historical water use data and the second historical water use data, a network structure model is constructed, and the spatial water demand correlation intensity output by the network structure model is obtained, wherein the spatial water demand correlation intensity is used to characterize the degree of influence on the first water use area when the water demand of the second water use area changes, and the first water use area is adjacent to the second water use area; Inputting the first historical water use data into a time series memory model, wherein the time series memory model is used to predict the water demand of the first water use area according to the time dependency relationship in the first historical water use data, to obtain a first time series water demand prediction result; According to the spatial water demand correlation intensity and the second historical water use data, spatially correct the first time series water demand forecast result to obtain a target water demand result; The spatial water demand association strength is a weight parameter between a third node and a parent node, the third node is a node formed by the first historical water use data in the network structure model, and the parent node is a node formed by the second historical water use data in the network structure model; The weight parameter between the third node and the parent node is determined according to a regression model, and the regression model is expressed as: Among them, X i (t) is the third node in time period t; μ i (t) is the average value of the third node in time period t; Pa(X i ) is the third node X i The collection of parent nodes; X j (t) is the set pa(X i ), in the jth parent node of time period t; ∈ i (t) is the error term; β ij The third node and the parent node X j The weight parameter between .
2. The water demand prediction method according to claim 1, characterized in that: Preprocess the target water use data to obtain target historical data, including: Screening the target water use data to obtain maximum water use data and minimum water use data; Normalizing the target water use data according to the maximum water use data and the minimum water use data to obtain the target historical data; Among them, the target water use data is the first original water use data or the second original water use data, the target historical data is the first historical water use data or the second historical water use data, and the target historical data corresponds to the target water use data.
3. The water demand prediction method according to claim 1, characterized in that: The network structure model is constructed by the following steps: Get the preset targeting rules; Constructing a complete node graph according to the first historical water use data and the second historical water use data; Performing independent node pair updates on the complete node graph to obtain an undirected node graph; According to the directional rule, the node undirected graph is directed updated to obtain the network structure model.
4. The water demand prediction method according to claim 3, characterized in that: The performing node pair independent updating on the complete node graph comprises: Obtaining preset saliency indicators and node pairs in the complete node graph, and node sets corresponding to the node pairs; According to the node set, an independence test is performed on the node pairs to obtain an independence statistic; Comparing the independence statistic and the significant index to obtain a comparison result; If the comparison result is that the independence statistic is greater than the significance index, the undirected edge corresponding to the node pair is removed; or if the comparison result is that the independence statistic is less than or equal to the significance index, the undirected edge corresponding to the node pair is retained.
5. The water demand prediction method according to claim 4, characterized in that: The step of performing an independence test on the node pairs according to the node set to obtain an independence statistic includes: Obtain a first node and a second node in the node pair; According to the node set, performing a first conditional probability test on the first node to obtain a first node probability, and, according to the node set and the second node, performing a second conditional probability test on the first node to obtain a second node probability; According to the first node probability, a statistical test is performed on the second node probability to obtain the independence statistic.
6. The water demand prediction method according to claim 1, characterized in that: The conditional probability expression of the third node corresponding to the first historical water use data in the network structure model is: Wherein, P(·) is the conditional probability distribution in the network structure model; i is the number of the third node; X i (t) is the third node in time period t; Pa(X i ) is the third node X i The collection of parent nodes; X j (t) is the set Pa(X i ), the j-th parent node in time period t; is Gaussian distribution; μ i (t) is the mean value of the third node in time period t; β ij The third node and the parent node X j The weight parameter between ; is the variance of the third node.
7. The water demand prediction method according to claim 1, characterized in that: The spatial correction of the first time series water demand forecast result according to the spatial water demand association intensity and the second historical water use data to obtain a target water demand result includes: Based on the time series memory model, obtaining a second time series water demand forecast result corresponding to the second water use area; According to the spatial water demand correlation intensity and the second historical water use data, the second time series water demand forecast result is spatially corrected in the same region to obtain corrected data in the same region; According to the same-area correction data, the first time series water demand forecast result is corrected in adjacent area space to obtain the target water demand result.
8. A water demand prediction system, characterized in that: include: An acquisition module, used to acquire first original water use data corresponding to the first water use area and second original water use data corresponding to the second water use area; a processing module, configured to pre-process the first original water use data to obtain first historical water use data, and to pre-process the second original water use data to obtain second historical water use data; A construction module, configured to construct a network structure model based on the first historical water use data and the second historical water use data, and obtain a spatial water demand correlation strength output by the network structure model, wherein the spatial water demand correlation strength is used to characterize the degree of influence of a change in water demand in the second water use area on the first water use area, wherein the first water use area is adjacent to the second water use area; A prediction module, used for inputting the first historical water use data into a time series memory model, wherein the time series memory model is used for predicting the water demand of the first water use area according to the time dependency in the first historical water use data, so as to obtain a first time series water demand prediction result; A correction module, configured to perform spatial correction on the first time series water demand forecast result according to the spatial water demand correlation intensity and the second historical water use data to obtain a target water demand result; The spatial water demand association strength is a weight parameter between a third node and a parent node, the third node is a node formed by the first historical water use data in the network structure model, and the parent node is a node formed by the second historical water use data in the network structure model; The weight parameter between the third node and the parent node is determined according to a regression model, and the regression model is expressed as: Among them, X i (t) is the third node in time period t; μ i (t) is the average value of the third node in time period t; Pa(X i ) is the third node X i The collection of parent nodes; X j (t) is the set Pa(X i ), in the jth parent node of time period t; ∈ i (t) is the error term; β ij The third node and the parent node X j The weight parameter between .
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.
Citation Information
Patent Citations
Graph neural network traffic flow prediction method and system based on attention mechanism
CN111161535A
Photovoltaic power station solar irradiance short-term prediction method based on optimal graph structure and storage medium
CN114676893A