Method and system for completing missing time series data based on river basin cascade dispatching system
By using the time sequence data missing completion method in the basin step scheduling system, the water volume simulation data is generated using the water area local graph generation model, which solves the data completeness and reliability problems caused by the single detection method of water situation data, and achieves efficient completion of water situation time sequence data.
Patent Information
- Application Number
- CN202411265070.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-09-10
AI Technical Summary
The existing water condition data detection methods are relatively single, and the completeness and reliability of water level data cannot be guaranteed. In addition, sensor failure or environmental factors lead to data abnormalities, which can easily lead to data errors and missing.
The time sequence data missing completion method based on the basin stair scheduling system is adopted. By obtaining the water volume monitoring data and video monitoring data of each sub-basin of the cascade basin, abnormal data is detected, and a pre-trained water area local map generation model is used to generate local images, determine the water volume simulation data, and complete the abnormal data according to the most value.
Without changing the existing hardware conditions, the completion of water condition timing data can be achieved and the completeness and reliability of monitoring data can be improved.
Smart Images

Figure CN118916621B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and system for completing missing time series data based on a watershed cascade scheduling system. Background Art
[0002] Water condition data is the basis for water resource allocation management in the river basin, and the interval flow between cascade hydropower stations is the key basis for power generation and flood control scheduling decisions. In the existing technology, sensors are used to detect the river basin or multiple detection points are set to detect the water condition data of the cascade river basin. The key data in the water condition data are water level and water volume data. However, the existing water condition data detection method is relatively simple and cannot guarantee the completeness and reliability of water level data. In addition, in some cases, the sensor itself may cause abnormal data collection due to failure or other environmental factors.
[0003] Therefore, in order to ensure the completeness and reliability of the data, it is necessary to detect and correct the outliers in the water regime data. The difficulty in processing outliers in the data lies in the fact that the process of data aggregation and processing is relatively complicated, which is easy to cause data errors and may further cause data loss during the processing process. Summary of the invention
[0004] The embodiment of the present application provides a method and system for completing missing time series data based on a watershed cascade scheduling system, which is used to combine the monitoring data of the watershed to complete the water situation time series data without changing the existing hardware conditions, thereby improving the completeness and reliability of the monitoring data.
[0005] The embodiment of the present application proposes a method for completing missing time series data based on a watershed cascade scheduling system, comprising the following steps:
[0006] Acquire water volume monitoring data of each sub-basin of the cascade basin in chronological order; and acquire basin video monitoring data in front of the dam of each sub-basin;
[0007] Detect abnormal data in the water volume monitoring data, and determine an abnormal time interval of the abnormal data, wherein the abnormal time interval at least covers the abnormal data value time and the normal data time of a specified time length before and after;
[0008] Extracting image data of the determined abnormal time interval from the corresponding watershed video monitoring data;
[0009] Based on the captured image data, a pre-trained water area local image generation model is used to generate multiple local images associated with the detection point area;
[0010] Determine water volume simulation data of the detection point area according to the plurality of local images;
[0011] The abnormal data of the abnormal time interval is supplemented according to the maximum value in the water volume simulation data.
[0012] Optionally, detecting abnormal data in the water volume monitoring data and determining an abnormal time interval of the abnormal data includes:
[0013] Determine missing data in the water volume monitoring data; and detect data in the water volume monitoring data whose data fluctuation is outside a preset data fluctuation range, and treat the missing data and the data outside the preset data fluctuation range as abnormal data;
[0014] Determining the abnormal time interval of the abnormal data includes:
[0015] At the missing data position and the data position outside the preset data fluctuation range, determining the data interception point according to the specified time length;
[0016] In the case where the water volume monitoring data at the data interception point is abnormal, the window is slid based on the missing data position and the data position outside the preset data fluctuation range with the specified time length as the window until the normal data time required for the intercepted abnormal time interval is reached.
[0017] Optionally, extracting the image data of the determined abnormal time interval from the corresponding watershed video monitoring data includes:
[0018] Determine a video segment in the corresponding watershed video monitoring data according to the abnormal time interval;
[0019] Decomposing the video segment into a plurality of video frames, and calculating the clarity of the video frames;
[0020] According to the clarity of the video frame, multiple image data with clarity greater than a preset threshold are selected as image data of the abnormal time interval.
[0021] Optionally, the water area local map generation model includes a text encoder, a map generator and a map decoder;
[0022] The text encoder is used to convert the water condition description text of the selected image data into vector information, wherein the vector information contains the semantics and context information of the description text;
[0023] The image generator is used to output a water area image matrix representation according to the initial information matrix and the text information matrix output by the text encoder;
[0024] The image decoder is used to receive the water area image matrix representation generated by the image generator and decode it into an image output.
[0025] Optional, pre-trained water area map generation models include:
[0026] Obtain image data from normal historical watershed video monitoring data to build a training set;
[0027] Using U-net to segment the image data in the training set, and determining a plurality of sub-images containing river boundaries in the segmented image;
[0028] According to normal water volume monitoring data, establishing a water volume mapping relationship between the plurality of sub-images;
[0029] Adding corresponding water volume marks to the sub-images that meet the mapping, and using the corresponding sub-images as local areas for image generation;
[0030] The water area local map generation model is trained using the local area and the image data in the training set, and during the training process, the generated information matrix of the local area is used to replace the initial information matrix as input to perform training.
[0031] Optionally, based on the captured image data, a pre-trained water area local map generation model is used to generate multiple local images associated with the detection point area, including:
[0032] A pre-trained water area local map generation model is used to generate local images at multiple locations of the river channel boundary of the captured image data.
[0033] Optionally, determining the water volume simulation data of the detection point area according to the plurality of local images includes:
[0034] grayscale processing is performed on the intercepted image data and the image data after the partial image is generated;
[0035] Extract the river boundary corresponding to each local area in the grayscale processed image data;
[0036] Calculate the matching degree of any group of extracted river boundary, and take the local area corresponding to the river boundary with a matching degree higher than a preset threshold as the local image associated with the detection point area;
[0037] According to the established water volume mapping relationship, based on each associated local image, the water volume simulation data of the detection point area is determined.
[0038] Optionally, completing the abnormal data of the abnormal time interval according to the maximum value in the water volume simulation data includes:
[0039] According to the water volume mapping relationship, the maximum water volume value corresponding to each associated local image is used as the completion data of the abnormal time interval for completion.
[0040] An embodiment of the present application also proposes a system for completing missing time series data based on a watershed cascade scheduling system, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the method for completing missing time series data based on the watershed cascade scheduling system are implemented as described above.
[0041] The method for completing missing time series data in the present application combines the monitoring data of the river basin, makes full use of the monitoring data without changing the existing hardware conditions, and can complete the water situation time series data without specific identification, thereby improving the completeness and reliability of the monitoring data.
[0042] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0044] Figure 1 The following is a schematic diagram of the basic process of the method for completing missing time series data in this embodiment. DETAILED DESCRIPTION
[0045] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0046] The present application embodiment proposes a method for completing missing time series data based on a watershed cascade scheduling system, such as Figure 1 As shown, the following steps are included:
[0047] In step S101, water volume monitoring data of each sub-basin of the cascade basin is obtained in time sequence; and, video monitoring data of the basin in front of the dam of each sub-basin is obtained. In some examples, water volume monitoring data of each sub-basin of the cascade basin can be obtained based on sensors, and sensors are generally set at fixed positions. There may be problems such as sensor accuracy and failures that cause abnormalities or missing water level and volume monitoring data. In the embodiment of the present application, video monitoring data of the basin in front of the dam of the sub-basin is further obtained, that is, video data collected by the monitoring equipment in front of the dam is obtained, such as video data collected by existing industrial cameras.
[0048] In step S102, abnormal data in the water volume monitoring data is detected, and an abnormal time interval of the abnormal data is determined, wherein the abnormal time interval at least covers the abnormal data value time and the normal data time of a specified time before and after. In the embodiment of the present application, at least the data value time covering the abnormality and the normal data time of a specified time before and after is taken as the abnormal time interval. In subsequent examples, the video segment of the abnormal time interval is intercepted to assist in completing missing or abnormal data.
[0049] In step S103, the image data of the determined abnormal time interval is intercepted from the corresponding watershed video monitoring data. That is, based on the aforementioned abnormal time interval, the video segment of the corresponding time period in the watershed video monitoring data is selected. For example, if the abnormal time data time is 11:30, the video segment of 11:25-11:30 can be selected. If the later monitoring data is a normal value, the later time can also be set for interception. The specific specified time length can be set according to actual needs.
[0050] In step S104, based on the captured image data, a plurality of local images associated with the detection point area are generated using a pre-trained water area local map generation model. In the embodiment of the present application, the water area local map generation model is pre-trained so that after training, a local image of a marked river channel boundary is generated by the water area local map generation model.
[0051] In step S105, the water volume simulation data of the detection point area is determined according to the plurality of local images. Specifically, the water volume simulation data of the detection point area can be determined by the generated marked image.
[0052] In step S106, the abnormal data of the abnormal time interval is supplemented according to the maximum value in the water volume simulation data.
[0053] The method for completing missing time series data in the present application combines the monitoring data of the river basin, makes full use of the monitoring data without changing the existing hardware conditions, and can complete the water situation time series data without specific identification, thereby improving the completeness and reliability of the monitoring data.
[0054] In some embodiments, detecting abnormal data in the water volume monitoring data and determining the abnormal time interval of the abnormal data includes: determining missing data in the water volume monitoring data; and detecting data in the water volume monitoring data whose data fluctuations are outside the preset data fluctuation interval, and treating the missing data and the data outside the preset data fluctuation interval as abnormal data. For example, data that obviously does not conform to the water level and water volume trends are all abnormal data.
[0055] Determining the abnormal time interval of the abnormal data includes:
[0056] At the data positions outside the vacant data position and the preset data fluctuation range, the data interception point is determined according to the specified time length, that is, the start and end positions of the intercepted video segment are determined based on the abnormal time interval.
[0057] In the case where the water volume monitoring data at the data interception point is abnormal, the data position outside the preset data fluctuation interval is based on the vacant data position and the data position outside the preset data fluctuation interval, and the specified time length is used as a window to slide until the normal data time required for the intercepted abnormal time interval is reached. In some examples, the specific sliding step length can be set to, for example, 30 seconds, etc., which can be determined specifically according to the duration of the abnormal time interval and the step length of the water volume monitoring data. In the case where the step length of the monitoring data and the duration of the abnormal time interval are large, the sliding step length can be added.
[0058] In some embodiments, extracting the image data of the determined abnormal time interval from the corresponding watershed video monitoring data includes:
[0059] Determine a video segment in the corresponding watershed video monitoring data according to the abnormal time interval;
[0060] Decomposing the video segment into a plurality of video frames, and calculating the clarity of the video frames;
[0061] According to the clarity of the video frame, multiple image data with clarity greater than a preset threshold are selected as image data of the abnormal time interval. In some embodiments, the clarity of the video frame can be calculated based on an edge detection algorithm, such as Sobel, Canny, etc., or a blur calculation method can be used, which is not specifically limited here.
[0062] In some embodiments, the water area local map generation model includes a text encoder, a map generator, and a map decoder;
[0063] The text encoder is used to convert the water condition description text of the selected image data into vector information, and the vector information contains the semantics and context information of the description text. In some embodiments, water condition description text can be added to the selected image data during the training and generation process. The specific description text can be, for example, watershed location, rainfall information, and other text related to the water condition.
[0064] The graph generator is used to output a water area image matrix representation according to the initial information matrix and the text information matrix output by the text encoder. That is, the input of the graph generator includes the initial information matrix and the text information matrix output by the text encoder, and the water area image matrix representation is output by the graph generator, and then the image generation can be realized through the graph decoder.
[0065] The image decoder is used to receive the water area image matrix representation generated by the image generator and decode it into an image output.
[0066] In some embodiments, pre-training a water area local map generation model includes:
[0067] Obtain image data from normal historical watershed video monitoring data to build a training set;
[0068] The image data in the training set is segmented using U-net, and a plurality of sub-images containing the river boundary in the segmented image are determined, that is, the segmented sub-images containing the river boundary are extracted.
[0069] According to normal water volume monitoring data, a water volume mapping relationship is established between the multiple sub-images. In a specific example, a mapping can be established based on normal monitoring values and the river boundary range, that is, if the current water level is, for example, 500m, then at the current water level, each sub-image of the river boundary has a corresponding boundary position, that is, the established water volume mapping relationship is a one-to-many relationship, and this method can also improve the accuracy of subsequent data completion.
[0070] Add corresponding water volume marks to the sub-images that match the mapping, and use the corresponding sub-images as local areas for image generation. In some embodiments, sub-images with more overlapped boundaries and shadows are removed, and the rest are sub-images that match the mapping. These sub-image areas can be used for generating local images.
[0071] The water area local map generation model is trained using the local area and the image data in the training set, and the generated information matrix of the local area is used to replace the initial information matrix as input to perform training during the training process. By replacing the input information, the water area local map generation model can be trained, so that the trained water area local map generation model can generate a sub-image with a label in the corresponding area.
[0072] In some embodiments, based on the captured image data, a pre-trained water area local map generation model is used to generate multiple local images associated with the detection point area, including: using a pre-trained water area local map generation model to generate local images at multiple locations of the river channel boundary of the captured image data.
[0073] In some embodiments, determining the water volume simulation data of the detection point area according to the plurality of local images includes:
[0074] grayscale processing is performed on the intercepted image data and the image data after the partial image is generated;
[0075] The river boundary corresponding to each local area in the grayscale processed image data is extracted. For example, an edge detection algorithm can be used to group the local areas with the same position in the grayscale processed image and extract the river boundary two by two.
[0076] The matching degree of any group of extracted river boundaries is calculated, and the local area corresponding to the river boundary with a matching degree higher than the preset threshold is used as the local image associated with the detection point area. The generated boundary is further matched with the original boundary. The higher the matching degree, the more the generated marked local image conforms to the current water conditions.
[0077] According to the established water volume mapping relationship, the water volume simulation data of the detection point area is determined based on each associated local image. The embodiment of the present application further utilizes the aforementioned established mapping relationship to reversely map to obtain the water volume simulation data of the detection point area, and the mapping of multiple local images (sub-images) can further reduce the error that may be caused by one-to-one mapping and improve the accuracy of data completion.
[0078] In some embodiments, the abnormal data of the abnormal time interval is supplemented according to the maximum value in the water volume simulation data, including: according to the water volume mapping relationship, the maximum water volume value corresponding to each associated local image is used as the supplement data of the abnormal time interval for supplementation. In a specific example, the maximum water volume value corresponding to the associated local image is used as the data for supplementation. Through the maximum value supplementation, the fluctuation of the water situation can be further reflected through the data, thereby improving the expressiveness of the data.
[0079] An embodiment of the present application also proposes a system for completing missing time series data based on a watershed cascade scheduling system, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the method for completing missing time series data based on the watershed cascade scheduling system are implemented as described above.
[0080] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present disclosure with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. It is not limited to the examples described in this specification or during the implementation of this application, and its examples will be interpreted as non-exclusive.
[0081] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art may use other embodiments when reading the above description.
[0082] The above embodiments are merely exemplary embodiments of the present disclosure. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present disclosure, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
Claims
1. A method for completing missing time series data based on a watershed cascade dispatching system, characterized in that: The steps include: Acquire water volume monitoring data of each sub-basin of the cascade basin in chronological order; and acquire basin video monitoring data in front of the dam of each sub-basin; Detect abnormal data in the water volume monitoring data, and determine an abnormal time interval of the abnormal data, wherein the abnormal time interval at least covers the abnormal data value time and the normal data time of a specified time length before and after; Extracting image data of the determined abnormal time interval from the corresponding watershed video monitoring data; Based on the captured image data, a pre-trained water area local image generation model is used to generate multiple local images associated with the detection point area; Determine water volume simulation data of the detection point area according to the plurality of local images; Completing the abnormal data of the abnormal time interval according to the maximum value in the water volume simulation data; Based on the captured image data, a pre-trained water area local map generation model is used to generate multiple local images associated with the detection point area, including: Using a pre-trained water area local image generation model to generate local images at multiple locations of the river channel boundary of the intercepted image data; Determining the water volume simulation data of the detection point area according to the plurality of local images includes: Perform grayscale processing on the captured image data and the generated local image; Extract the river boundary corresponding to each local area in the grayscale processed image data; Calculate the matching degree of any group of extracted river boundary, and take the local area corresponding to the river boundary with a matching degree higher than a preset threshold as the local image associated with the detection point area; According to the established water volume mapping relationship, based on each associated local image, the water volume simulation data of the detection point area is determined.
2. The method for completing missing time series data based on a watershed cascade dispatching system according to claim 1, characterized in that: Detecting abnormal data in the water volume monitoring data and determining an abnormal time interval of the abnormal data includes: Determine missing data in the water volume monitoring data; and detect data in the water volume monitoring data whose data fluctuation is outside a preset data fluctuation range, and treat the missing data and the data outside the preset data fluctuation range as abnormal data; Determining the abnormal time interval of the abnormal data includes: At the missing data position and the data position outside the preset data fluctuation range, determining the data interception point according to the specified time length; In the case where the water volume monitoring data at the data interception point is abnormal, the window is slid based on the missing data position and the data position outside the preset data fluctuation range with the specified time length as the window until the normal data time required for the intercepted abnormal time interval is reached.
3. The method for completing missing time series data based on a watershed cascade dispatching system according to claim 2, characterized in that: The image data of the determined abnormal time interval intercepted from the corresponding watershed video monitoring data includes: Determine a video segment in the corresponding watershed video monitoring data according to the abnormal time interval; Decomposing the video segment into a plurality of video frames, and calculating the clarity of the video frames; According to the clarity of the video frame, multiple image data with clarity greater than a preset threshold are selected as image data of the abnormal time interval.
4. The method for completing missing time series data based on a watershed cascade dispatching system according to claim 1, characterized in that: The water area local map generation model includes a text encoder, a map generator and a map decoder; The text encoder is used to convert the water condition description text of the selected image data into vector information, wherein the vector information contains the semantics and context information of the description text; The image generator is used to output a water area image matrix representation according to the initial information matrix and the text information matrix output by the text encoder; The image decoder is used to receive the water area image matrix representation generated by the image generator and decode it into an image output.
5. The method for completing missing time series data based on a watershed cascade dispatching system according to claim 4, characterized in that: Pre-trained water area local map generation models include: Obtain image data from normal historical watershed video monitoring data to build a training set; Using U-net to segment the image data in the training set, and determining a plurality of sub-images containing river boundaries in the segmented images; According to normal water volume monitoring data, establishing a water volume mapping relationship between the plurality of sub-images; Adding corresponding water volume marks to the sub-images that conform to the mapping, and using the corresponding sub-images as local areas for image generation; The water area local map generation model is trained using the local area and the image data in the training set, and during the training process, the generated information matrix of the local area is used to replace the initial information matrix as input to perform training.
6. The method for completing missing time series data based on a watershed cascade dispatching system according to claim 1, characterized in that: Completing the abnormal data of the abnormal time interval according to the maximum value in the water volume simulation data includes: According to the water volume mapping relationship, the maximum water volume values corresponding to the associated local images are used as the completion data of the abnormal time interval for completion.
7. A system for completing missing time series data based on a watershed cascade dispatching system, characterized in that: It includes a processor and a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, the steps of the method for completing missing time series data based on a watershed cascade scheduling system as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Water body monitoring video and data linkage early warning method and system
CN112101790A
Multi-source data precipitation estimation method based on Kriging diagram convolutional network
CN117852639A