A hydrology and water resource monitoring method and system based on cloud-edge collaboration

CN122946388APending Publication Date: 2026-10-20太原市水文水资源勘测站
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611123161.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0003]本发明的目的在于提供一种基于云边协同的水文水资源监测方法及系统,以解决上述背景技术中提出的局部监测数据异常难以准确定位以及水力连接关系变化后处理范围难以合理确定的问题

Benefits of technology

1、本发明中,基于沿水流方向生成的入口边界数据与沿逆水流方向生成的入口约束数据进行逐河段、逐字段比较,可以准确确定数据不一致的河段及监测字段,避免对整个河网进行无差别重复处理;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
Patent Text Reader

Abstract

This invention relates to the field of cloud-edge collaborative hydrological data processing technology, specifically a cloud-edge collaborative hydrological and water resources monitoring method and system. The method includes: acquiring hydrological monitoring data and hydraulic connectivity data; calling river segment processing units at edge nodes based on river segment connectivity and flow direction; establishing field instruction dependencies and initializing path execution states; generating inlet boundary data and inlet constraint data along the flow direction and against the flow direction, respectively; comparing the two to determine the river segment and field to be processed; acquiring updated hydraulic connectivity data; identifying changed hydraulic connectivity paths; updating the corresponding river segment connectivity and path execution states; and determining the target processing instruction; regenerating and comparing the two types of data based on the target processing instruction; releasing computing resources; and combining the processing results of each river segment. This invention enables the location of monitoring anomalies and local updates after changes in hydraulic connectivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud-edge collaborative hydrological data processing technology, specifically to a method and system for monitoring hydrological and water resources based on cloud-edge collaboration. Background Technology

[0002] Hydrological and water resources monitoring typically relies on monitoring equipment distributed across rivers, tributaries, reservoirs, sluice gates, and water intake and drainage points to continuously collect hydrological data such as water level, flow rate, flow velocity, and rainfall. This data is then transmitted, calculated, and aggregated based on the hydraulic connections between river sections. As the monitoring scope expands, hydrological monitoring systems are increasingly adopting a collaborative data processing approach between cloud and edge nodes. Edge nodes handle on-site data reception and local calculations, while the cloud handles cross-river section data organization and monitoring result aggregation to meet the needs of continuous monitoring of river network water conditions and dynamic water resources management. In the continuous monitoring of river network hydrology and water resources, there are still problems such as the difficulty in accurately locating local monitoring data anomalies and the difficulty in reasonably determining the processing scope after changes in hydraulic connectivity. Specifically, on the one hand, due to factors such as monitoring equipment drift, data transmission delay, local water intake and drainage, tributary inflow, and data loss, the monitoring data of a certain river segment may be inconsistent with the hydrological relationship reflected by the upstream and downstream river segments, and this inconsistency may continue to be transmitted along the river segment connectivity, making it difficult to accurately distinguish the river segments and monitoring fields that actually need to be reprocessed. On the other hand, the opening and closing of gates, operation of pumping stations, water diversion scheduling, or changes in local water flow direction will change the original river segment connectivity, making some existing processing results no longer applicable to the current river network state. Continuing to use the processing results will easily cause the monitoring results to be inconsistent with the actual hydraulic relationship, while recalculating the entire river segment will increase the cloud-edge communication volume and the computing resource consumption of edge nodes. Summary of the Invention

[0003] The purpose of this invention is to provide a cloud-edge collaborative hydrological and water resources monitoring method and system to solve the problems mentioned in the background art, such as the difficulty in accurately locating local monitoring data anomalies and the difficulty in reasonably determining the processing range after changes in hydraulic connection relationships.

[0004] To achieve the above objectives, the technical solution of the present invention is: a hydrological and water resources monitoring method based on cloud-edge collaboration, comprising: S1. Obtain hydrological monitoring data and hydraulic connection data, determine the current monitoring period and generate the current hydraulic connection version, determine the river segment connection relationship and water flow direction based on the current hydraulic connection version, call the river segment processing unit at the corresponding edge node, establish field instruction dependency relationship and initialize path execution status; Among them, the current hydraulic connection version is the data record of the connection relationship and water flow direction of each river segment within the current monitoring period; the river segment processing unit is the processing unit set at the edge node and performs forward processing and reverse constraint processing; the field instruction dependency relationship is the correspondence between the monitored field and the processing instruction to read the monitored field; the path execution status is the data of the status of the processing result corresponding to the hydraulic connection path; S2. Execute forward processing commands along the direction of water flow to generate inlet boundary data; execute reverse constraint commands along the direction of reverse water flow to generate inlet constraint data; compare the inlet boundary data and inlet constraint data of the same river segment according to the river segment identifier, monitoring period, version identifier, and field range to determine the river segment and field to be supplemented. Among them, the inlet boundary data is the processed data that is transmitted into the current river segment along the direction of water flow; the inlet constraint data is the allowable range of each monitoring field generated in the opposite direction of water flow; the river segment to be processed is the river segment where the inlet boundary data and the inlet constraint data do not correspond, and the field to be processed is the monitoring field that forms the non-corresponding data. S3. Based on the river segment to be processed, obtain updated hydraulic connection data, generate an updated hydraulic connection version, compare the current hydraulic connection version with the updated hydraulic connection version, and determine the changed hydraulic connection paths; update the connection relationships and flow directions of the river segment to be processed according to the updated hydraulic connection version, retain the path execution status of paths that have not changed, and set the path execution status of paths that have changed to an invalid state; query the field instruction dependency relationship according to the field to be processed, determine the target processing instruction, and register the updated hydraulic connection version as the current hydraulic connection version; Among them, the hydraulic connection path that has changed is the hydraulic connection path whose connection relationship record is inconsistent between the current hydraulic connection version and the updated hydraulic connection version; the target processing instruction is the processing instruction that reads the field to be processed in the field instruction dependency relationship; S4. Based on the target processing instructions, regenerate and compare the inlet boundary data and the inlet constraint data, determine the corresponding status and difference fields of the boundary data, release the computing resources occupied by the execution of the target processing instructions, combine the processing results of each river segment according to the current hydraulic connection version, and generate hydrological and water resources monitoring results. Among them, the boundary data correspondence status refers to the data status of whether the inlet boundary data and the inlet constraint data correspond, and the difference field is the monitoring field in the inlet boundary data and the inlet constraint data that does not form a corresponding relationship.

[0005] Preferably, in step S1, the hydrological monitoring data consists of monitoring field data generated by each hydrological monitoring node during the current monitoring period, including monitoring node identifier, monitoring period identifier, monitoring fields, and field values; the hydraulic connection data consists of data on the connection relationships and flow directions between river segments, including river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path identifier; the current hydraulic connection version is generated by organizing the hydraulic connection data corresponding to the current monitoring period according to the version identifier, including the version identifier and the river segment connection record corresponding to each river segment. The river segment connection record includes the river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path. Path identifier; the river segment processing unit uses the river segment identifier as the calling basis, including forward processing instructions and reverse constraint instructions; the field instruction dependency relationship includes the correspondence between input monitoring fields, processing instructions and output monitoring fields; a path execution status is established according to each hydraulic connection path identifier, the path execution status includes the hydraulic connection path identifier and the status identifier, the status identifier includes pending execution status, valid status and invalid status; the association between river segment connection records, river segment processing units and field instruction dependencies is established according to the river segment identifier, and the association between river segment connection records and path execution status is established according to the hydraulic connection path identifier.

[0006] Preferably, in step S2, the forward processing instruction is a pre-configured instruction in the river segment processing unit that generates outlet boundary data based on the current river segment's inlet boundary data and hydrological monitoring data. The inlet boundary data is data input into the current river segment and read by the forward processing instruction, including river segment identifier, monitoring period identifier, version identifier, monitoring fields, and field values. The outlet boundary data is data output by the forward processing instruction and transmitted to the downstream adjacent river segment, including river segment identifier, monitoring period identifier, version identifier, monitoring fields, and field values. The hydrological monitoring data of the monitoring node corresponding to the starting end of the hydraulic connection path is used as the inlet boundary data of the corresponding river segment. The forward processing instruction is executed to generate outlet boundary data, and the outlet boundary data of the current river segment is used as the inlet boundary data of the downstream adjacent river segment. The process is executed sequentially along the flow direction according to the river segment connection relationship in the current hydraulic connection version to generate inlet boundary data for each river segment.

[0007] Preferably, in step S2, the reverse constraint instruction is a processing instruction pre-configured in the river segment processing unit and used to generate inlet constraint data; the inlet constraint data is data that limits the allowable range of each monitoring field at the current river segment inlet, including river segment identifier, monitoring period identifier, version identifier, monitoring field, field lower limit value, and field upper limit value; the hydrological monitoring data of the monitoring node corresponding to the end of the hydraulic connection path is used as the input for executing the reverse constraint instruction for the corresponding river segment to generate the inlet constraint data for the corresponding river segment, and the inlet constraint data of the current river segment is used as the input for executing the reverse constraint instruction for the upstream adjacent river segment, and the instructions are executed sequentially along the countercurrent direction according to the river segment connection relationship in the current hydraulic connection version to generate the inlet constraint data for each river segment.

[0008] Preferably, in step S2, the river segment identifier is used to associate the inlet boundary data and inlet constraint data of the same river segment, the monitoring period identifier is used to record the current monitoring period to which the inlet boundary data and inlet constraint data belong, the version identifier is used to record the current hydraulic connection version to which the inlet boundary data and inlet constraint data belong, and the field range is the range between the lower limit value and the upper limit value of the field corresponding to the same monitoring field. Comparing the inlet boundary data and inlet constraint data of the same river segment specifically includes: associating the inlet boundary data and inlet constraint data according to the river segment identifier and the monitoring period identifier; comparing their version identifiers; and when the version identifiers are consistent, comparing the field values ​​in the inlet boundary data with the field ranges in the inlet constraint data item by item according to the monitoring fields; identifying monitoring fields whose field values ​​are not within the corresponding field range as fields to be supplemented, and identifying river segments containing fields to be supplemented as river segments to be supplemented; and when the version identifiers are inconsistent, identifying the corresponding river segment as a river segment to be supplemented, and writing the version identifiers of both into the river segment to be supplemented record.

[0009] Preferably, in step S3, the updated hydraulic connection data is hydraulic connection data re-acquired based on the river segment records to be processed, including river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path identifier; the updated hydraulic connection version is generated by organizing the updated hydraulic connection data according to the version identifier, and adopts the same data structure as the current hydraulic connection version; the hydraulic connection path identifiers in the current hydraulic connection version and the updated hydraulic connection version are compared, and hydraulic connection paths that exist only in one of the hydraulic connection versions are determined as changed hydraulic connection paths; for hydraulic connection paths that exist in both the current hydraulic connection version and the updated hydraulic connection version, the adjacent river segment identifiers and flow direction identifiers in the corresponding river segment connection records are compared, and hydraulic connection paths with inconsistent adjacent river segment identifiers or flow direction identifiers are determined as changed hydraulic connection paths; based on the river segment connection records in the updated hydraulic connection version, the connection relationship and flow direction of the river segment to be processed are updated.

[0010] Preferably, in step S3, the hydraulic connection path identifier in the path execution state is matched with the hydraulic connection path identifier corresponding to the changed hydraulic connection path; the path execution state where the hydraulic connection path identifier is not matched is retained; the status identifier of the path execution state where the hydraulic connection path identifier is matched is set to an invalid state, and the corresponding inlet boundary data and inlet constraint data are stopped from being called.

[0011] Preferably, in step S3, the field instruction dependency relationship also records the correspondence between the input monitoring field, the processing instruction, the output monitoring field, and the hydraulic connection path identifier; the input monitoring field in the field instruction dependency relationship is matched with the field to be processed, the matched processing instruction is determined as the target processing instruction, and the corresponding output monitoring field and hydraulic connection path identifier are read; a local processing task is generated according to the river segment to be processed, the target processing instruction, the output monitoring field, and the hydraulic connection path identifier, and the local processing task is sent to the edge node corresponding to the river segment to be processed. The edge node allocates computing resources and executes the target processing instruction, updates the corresponding output monitoring field, does not execute other processing instructions, keeps other monitoring fields unchanged, and sets the path execution status corresponding to the hydraulic connection path identifier in the local processing task to a valid state.

[0012] Preferably, in step S4, the target processing instruction is executed, and the inlet boundary data and inlet constraint data of the river segment to be processed are regenerated according to the river segment connection relationship and water flow direction in the current hydraulic connection version; the inlet boundary data and inlet constraint data regenerated according to the river segment identifier, monitoring period identifier and version identifier are associated, and the field values ​​in the inlet boundary data are compared item by item with the corresponding field ranges in the inlet constraint data; when all field values ​​are within the corresponding field range, the corresponding state of the boundary data is set to the corresponding state; when there are field values ​​that are not within the corresponding field range, the corresponding state of the boundary data is set to the non-corresponding state, and the corresponding monitoring field is determined as the difference field; after the comparison is completed, the computing resources allocated by the corresponding edge node for executing the target processing instruction are released, and the inlet boundary data, inlet constraint data, corresponding state of boundary data and difference fields of each river segment are combined according to the river segment connection relationship and water flow direction in the current hydraulic connection version to generate hydrological and water resources monitoring results.

[0013] On the other hand, the present invention provides a cloud-edge collaborative hydrological and water resources monitoring system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the aforementioned cloud-edge collaborative hydrological and water resources monitoring method.

[0014] Compared with the prior art, the above-mentioned technical solution of the present invention has the following beneficial technical effects: 1. In this invention, by comparing the inlet boundary data generated along the water flow direction with the inlet constraint data generated along the counter-water flow direction on a segment-by-segment and field-by-field basis, the segment and monitoring field with inconsistent data can be accurately identified, thus avoiding indiscriminate repetitive processing of the entire river network. 2. In this invention, by identifying paths where hydraulic connections have changed, valid processing results of unchanged paths are retained, and target processing instructions are executed only at the corresponding edge nodes, local updates of affected river sections are achieved, reducing cloud-edge communication volume and edge node computing resource consumption. Attached Figure Description

[0015] Figure 1 This is a flowchart of one embodiment of the present invention. Detailed Implementation

[0016] Example 1, as Figure 1 As shown, the present invention proposes a cloud-edge collaborative hydrological and water resources monitoring method, the specific implementation steps of which are as follows: S1. Obtain hydrological monitoring data and hydraulic connection data, determine the current monitoring period and generate the current hydraulic connection version, determine the river segment connection relationship and water flow direction based on the current hydraulic connection version, call the river segment processing unit at the corresponding edge node, establish field instruction dependency relationship and initialize path execution status; Among them, the current hydraulic connection version is the data record of the connection relationship and water flow direction of each river segment within the current monitoring period; the river segment processing unit is the processing unit set at the edge node and performs forward processing and reverse constraint processing; the field instruction dependency relationship is the correspondence between the monitored field and the processing instruction to read the monitored field; the path execution status is the data of the status of the processing result corresponding to the hydraulic connection path; S2. Execute forward processing commands along the direction of water flow to generate inlet boundary data; execute reverse constraint commands along the direction of reverse water flow to generate inlet constraint data; compare the inlet boundary data and inlet constraint data of the same river segment according to the river segment identifier, monitoring period, version identifier, and field range to determine the river segment and field to be supplemented. Among them, the inlet boundary data is the processed data that is transmitted into the current river segment along the direction of water flow; the inlet constraint data is the allowable range of each monitoring field generated in the opposite direction of water flow; the river segment to be processed is the river segment where the inlet boundary data and the inlet constraint data do not correspond, and the field to be processed is the monitoring field that forms the non-corresponding data. S3. Based on the river segment to be processed, obtain updated hydraulic connection data, generate an updated hydraulic connection version, compare the current hydraulic connection version with the updated hydraulic connection version, and determine the changed hydraulic connection paths; update the connection relationships and flow directions of the river segment to be processed according to the updated hydraulic connection version, retain the path execution status of paths that have not changed, and set the path execution status of paths that have changed to an invalid state; query the field instruction dependency relationship according to the field to be processed, determine the target processing instruction, and register the updated hydraulic connection version as the current hydraulic connection version; Among them, the hydraulic connection path that has changed is the hydraulic connection path whose connection relationship record is inconsistent between the current hydraulic connection version and the updated hydraulic connection version; the target processing instruction is the processing instruction that reads the field to be processed in the field instruction dependency relationship; S4. Based on the target processing instructions, regenerate and compare the inlet boundary data and the inlet constraint data, determine the corresponding status and difference fields of the boundary data, release the computing resources occupied by the execution of the target processing instructions, combine the processing results of each river segment according to the current hydraulic connection version, and generate hydrological and water resources monitoring results. Among them, the boundary data correspondence status refers to the data status of whether the inlet boundary data and the inlet constraint data correspond, and the difference field is the monitoring field in the inlet boundary data and the inlet constraint data that does not form a corresponding relationship.

[0017] In this embodiment S1, the hydrological monitoring data consists of monitoring field data generated by each hydrological monitoring node during the current monitoring period, including monitoring node identifier, monitoring period identifier, monitoring fields, and field values; the hydraulic connection data consists of data on the connection relationships and flow directions between river segments, including river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path identifier; the current hydraulic connection version is generated by organizing the hydraulic connection data corresponding to the current monitoring period according to the version identifier, including the version identifier and the river segment connection record corresponding to each river segment. The river segment connection record includes the river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path. Path identifier; the river segment processing unit uses the river segment identifier as the calling basis, including forward processing instructions and reverse constraint instructions; the field instruction dependency relationship includes the correspondence between input monitoring fields, processing instructions and output monitoring fields; a path execution status is established according to each hydraulic connection path identifier, the path execution status includes the hydraulic connection path identifier and the status identifier, the status identifier includes pending execution status, valid status and invalid status; the association between river segment connection records, river segment processing units and field instruction dependencies is established according to the river segment identifier, and the association between river segment connection records and path execution status is established according to the hydraulic connection path identifier.

[0018] In this embodiment S1, the hydrological and water resources monitoring system includes a cloud platform, multiple edge nodes, and hydrological monitoring nodes distributed at river channels, tributaries, reservoirs, sluice gates, and water intake and discharge locations. The cloud platform determines the current monitoring period according to a preset monitoring cycle and sets a start time, end time, and monitoring period identifier for the current monitoring period. The edge nodes receive data collected by each hydrological monitoring node within the current monitoring period and organize it according to the monitoring node identifier and monitoring period identifier to form hydrological monitoring data. The hydrological monitoring data consists of monitoring field data formed by each hydrological monitoring node within the current monitoring period, including monitoring node identifier, monitoring period identifier, monitoring field, and field value. The monitoring node identifier is used to identify the hydrological monitoring node that generated the corresponding data, and the monitoring period identifier is used to determine the current monitoring period to which the field value belongs. The monitoring field is used to represent hydrological parameters such as water level, flow rate, flow velocity, or rainfall, and the field value is used to represent the collection result of the corresponding monitoring field within the current monitoring period. Alternatively, the processing results are as follows: Each hydrological monitoring node establishes a correspondence with the river segment identifier of its respective river segment in advance through the monitoring node identifier. Hydrological monitoring nodes set at the river segment inlet, river segment outlet, or internal monitoring position are all associated with the corresponding river segment. Hydraulic connection data is obtained from the hydrological and water resources management platform in the cloud, including river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path identifier. The river segment identifier is used to determine the current river segment, the adjacent river segment identifier is used to determine the river segment with a direct hydraulic connection relationship to the current river segment, the flow direction identifier is used to indicate the direction of water flow between the current river segment and the adjacent river segment, and the hydraulic connection path identifier is used to determine the hydraulic connection path to which the corresponding river segment connection record belongs. In the case where the current river segment is connected to multiple adjacent river segments, corresponding hydraulic connection data is formed for the current river segment and each adjacent river segment, and the direct hydraulic connection relationship between each river segment is recorded according to the river segment identifier, adjacent river segment identifier, and flow direction identifier.

[0019] In this embodiment S1, the cloud generates the current hydraulic connection version based on the hydraulic connection data corresponding to the current monitoring period. Specifically, it collects hydraulic connection data according to river segment identifiers, forming a river segment connection record by establishing the direct hydraulic connection relationship between the current river segment and an adjacent river segment. Each river segment connection record includes a river segment identifier, an adjacent river segment identifier, a flow direction identifier, and a hydraulic connection path identifier. The cloud determines the interconnected river segments based on the river segment identifier and the adjacent river segment identifier, determines the upstream or downstream position of the current river segment relative to the adjacent river segment based on the flow direction identifier, and arranges the continuously connected river segments along the flow direction. The sequence of river segments extending continuously from the starting river segment to the ending river segment along the flow direction is determined as a hydraulic connection path and assigned a corresponding hydraulic connection path identifier. For river segments containing diversion relationships, corresponding hydraulic connection paths are formed based on the multiple downstream adjacent river segments corresponding to the river segment. For river segments containing confluence relationships, the corresponding confluence relationship is determined based on the river segment connection records between multiple upstream adjacent river segments and the current river segment. The cloud then... River segment connection records are categorized according to hydraulic connection path identifiers. The order of river segment connection records within the same hydraulic connection path is determined according to the flow direction identifier. The current monitoring period identifier is associated with all river segment connection records, and a version identifier is assigned to the resulting set of river segment connection records, generating the current hydraulic connection version. The current hydraulic connection version includes the version identifier and the corresponding river segment connection records for each river segment. River segment connection records within the same current hydraulic connection version have the same version identifier and correspond to the same current monitoring period. The cloud determines the river segment connection relationship and flow direction based on the river segment connection records in the current hydraulic connection version. The river segment connection relationship is the direct hydraulic connection relationship between the current river segment and one or more adjacent river segments. The flow direction is the direction in which water flows from the upstream river segment to the downstream river segment between interconnected river segments. The cloud queries the corresponding river segment connection record using the river segment identifier, reads the adjacent river segment identifiers and flow direction identifiers, and determines the upstream and downstream adjacent river segments of the current river segment and their positions in the corresponding hydraulic connection path.

[0020] In this embodiment S1, each river segment is pre-assigned an edge node responsible for processing the data of that river segment. The corresponding edge node is an edge computing device determined based on the river segment identifier and equipped with a corresponding river segment processing unit. One edge node corresponds to one or more spatially adjacent river segments. The cloud stores the correspondence between river segment identifiers and edge nodes. At the start of the current monitoring period and after the current hydraulic connection version is generated, the cloud queries the corresponding edge node based on the river segment identifier in the current hydraulic connection version and sends the river segment identifier, monitoring period identifier, version identifier, hydrological monitoring data of the corresponding river segment, and river segment connection record to the corresponding edge node. After receiving the above data, the edge node locates and invokes the corresponding river segment processing unit based on the river segment identifier. The river segment processing unit is an executable program unit deployed in the edge node, invoked based on the river segment identifier, and includes pre-configured forward processing instructions and reverse constraint instructions. The forward processing instructions are used for... The system reads the inlet data and hydrological monitoring data of the current river segment, and forms the processing results transmitted along the water flow direction according to the processing rules of the corresponding monitoring fields. The reverse constraint instruction is used to read the downstream data and hydrological monitoring data of the current river segment, and form the allowable range of the monitoring fields at the inlet of the current river segment according to the constraint rules of the corresponding monitoring fields. When the edge node calls the river segment processing unit, it determines the data range of this processing by the river segment identifier, monitoring period identifier, and version identifier, loads the processing parameters and processing instructions corresponding to the current river segment, so that the forward processing instruction and the reverse constraint instruction read the corresponding data according to the pre-configured input monitoring fields, and writes the formed processing results into the corresponding output monitoring fields. The river segment processing unit is associated with the river segment connection record in the current hydraulic connection version through the river segment identifier, so that the edge node can call the corresponding processing instruction according to the position of the current river segment in the hydraulic connection path.

[0021] In this embodiment S1, the field instruction dependency relationship is established based on the pre-configured input monitoring fields and output monitoring fields of each processing instruction in the river segment processing unit. The edge node reads the field configuration corresponding to the forward processing instruction and the reverse constraint instruction, determines the input monitoring fields read when each processing instruction is executed and the output monitoring fields formed or updated after execution, and establishes a correspondence between the input monitoring fields, processing instructions, and output monitoring fields. The input monitoring field represents the monitoring field read when the corresponding processing instruction is executed, and the output monitoring field represents the monitoring field formed or updated after the corresponding processing instruction is executed. The same processing instruction corresponds to one or more input monitoring fields and one or more output monitoring fields. The same monitoring field can be the output monitoring field of one processing instruction and the input monitoring field of another processing instruction. The edge node establishes the field instruction dependency relationship corresponding to each river segment processing unit according to the river segment identifier, and uses the input monitoring field as the query entry to record the processing instruction that reads the input monitoring field and the corresponding output monitoring field. The path execution status is based on the current hydraulic connection. Each version establishes separate hydraulic connection path identifiers, including hydraulic connection path identifiers and status identifiers. Status identifiers include pending execution, valid, and invalid states. A pending execution state indicates that the corresponding hydraulic connection path has established processing objects within the current monitoring period but has not yet generated corresponding processing results. A valid state indicates that the processing results of the corresponding hydraulic connection path are applicable to the current hydraulic connection version. An invalid state indicates that the existing processing results of the corresponding hydraulic connection path no longer correspond to the river segment connection relationship or water flow direction in the current hydraulic connection version. When initializing the path execution state, the cloud reads all hydraulic connection path identifiers in the current hydraulic connection version, establishes a corresponding path execution state for each hydraulic connection path identifier, and sets the status identifier to pending execution. The cloud establishes the association between river segment connection records, river segment processing units, and field instruction dependencies according to the river segment identifier, and establishes the association between river segment connection records and path execution states according to the hydraulic connection path identifier, so that river segment connection records with the same hydraulic connection path identifier correspond to a single path execution state.

[0022] In this embodiment S2, the forward processing instruction is a pre-configured instruction in the river segment processing unit that generates outlet boundary data based on the current river segment's inlet boundary data and hydrological monitoring data. The inlet boundary data is data passed into the current river segment and read by the forward processing instruction, including river segment identifier, monitoring period identifier, version identifier, monitoring fields, and field values. The outlet boundary data is data output by the forward processing instruction and transmitted to the downstream adjacent river segment, including river segment identifier, monitoring period identifier, version identifier, monitoring fields, and field values. The hydrological monitoring data of the monitoring node corresponding to the starting end of the hydraulic connection path is used as the inlet boundary data of the corresponding river segment. The forward processing instruction is executed to generate outlet boundary data, and the outlet boundary data of the current river segment is used as the inlet boundary data of the downstream adjacent river segment. The process is executed sequentially along the flow direction according to the river segment connection relationship in the current hydraulic connection version to generate inlet boundary data for each river segment.

[0023] In this embodiment S2, the forward processing instruction is an executable processing instruction pre-configured in the river segment processing unit. The forward processing instruction establishes an association with the corresponding river segment processing unit according to the river segment identifier, and pre-configures the input monitoring fields to be read, the processing rules for processing the input monitoring fields, and the corresponding output monitoring fields. When the forward processing instruction is executed, the edge node corresponding to the current river segment reads the inlet boundary data and hydrological monitoring data of the current river segment, matches the field values ​​in the inlet boundary data with the field values ​​in the hydrological monitoring data according to the monitoring fields, and generates the outlet boundary data of the current river segment according to the pre-configured processing rules. Boundary data includes river segment identifier, monitoring period identifier, version identifier, monitoring fields, and field values. The river segment identifier is used to determine the river segment corresponding to the inlet boundary data. The monitoring period identifier is used to determine the current monitoring period to which the inlet boundary data belongs. The version identifier is used to determine the current hydraulic connection version on which the inlet boundary data is based. The monitoring fields and field values ​​are used to record the hydrological parameters of the current river segment and their corresponding values. The outlet boundary data includes river segment identifier, monitoring period identifier, version identifier, monitoring fields, and field values. The field values ​​are the processing results generated by the forward processing instruction based on the current river segment inlet boundary data and hydrological monitoring data.

[0024] In this embodiment S2, the cloud reads the river segment connection records belonging to the same hydraulic connection path from the current hydraulic connection version according to the hydraulic connection path identifier, and determines the starting point of the hydraulic connection path and the arrangement order of each river segment along the water flow direction according to the water flow direction identifier in the river segment connection record; the starting point of the hydraulic connection path is the location of the river segment in the corresponding hydraulic connection path that is not connected to the upstream adjacent river segment. The cloud finds the hydrological monitoring node set at the inlet of the starting river segment according to the river segment identifier of the starting river segment, and writes the hydrological monitoring data generated by the hydrological monitoring node during the current monitoring period into the starting river segment according to the monitoring fields. Inlet boundary data: The edge node corresponding to the starting river segment calls the river segment processing unit according to the river segment identifier, executes the forward processing instruction and generates the outlet boundary data of the starting river segment. Then, it determines the downstream adjacent river segment according to the adjacent river segment identifier and the water flow direction identifier in the current river segment connection record, and sends the outlet boundary data to the edge node corresponding to the downstream adjacent river segment. The edge node corresponding to the downstream adjacent river segment keeps the monitoring period identifier, version identifier, monitoring field and field value in the outlet boundary data, and updates the river segment identifier to the river segment identifier of the current downstream adjacent river segment to form the inlet boundary data of the downstream adjacent river segment.

[0025] In this embodiment S2, after receiving the inlet boundary data, the edge node corresponding to the downstream adjacent river segment calls the forward processing instruction in the corresponding river segment processing unit to generate the outlet boundary data of the river segment based on the inlet boundary data and the hydrological monitoring data of the river segment. The data is then transmitted to the next downstream adjacent river segment along the flow direction determined by the current hydraulic connection version until the inlet boundary data of each river segment in the same hydraulic connection path is generated. When the current river segment corresponds to multiple downstream adjacent river segments, the outlet boundary data of the current river segment is sent to the edge node corresponding to each downstream adjacent river segment according to the hydraulic connection path identifier to which each downstream adjacent river segment belongs. When the current river segment corresponds to multiple upstream adjacent river segments, the edge node corresponding to the current river segment receives the outlet boundary data transmitted from each upstream adjacent river segment, collects it according to the same monitoring time period identifier, version identifier and monitoring field, and determines the field value of the corresponding monitoring field in the inlet boundary data of the current river segment according to the processing rules pre-configured in the forward processing instruction.

[0026] In this embodiment S2, the reverse constraint instruction is a processing instruction pre-configured in the river segment processing unit and used to generate inlet constraint data; the inlet constraint data is data that limits the allowable range of each monitoring field at the current river segment inlet, including river segment identifier, monitoring period identifier, version identifier, monitoring field, field lower limit value, and field upper limit value; the hydrological monitoring data of the monitoring node corresponding to the end of the hydraulic connection path is used as the input for executing the reverse constraint instruction for the corresponding river segment to generate the inlet constraint data for the corresponding river segment, and the inlet constraint data of the current river segment is used as the input for executing the reverse constraint instruction for the upstream adjacent river segment. The instructions are executed sequentially along the countercurrent direction according to the river segment connection relationship in the current hydraulic connection version to generate the inlet constraint data for each river segment.

[0027] In this embodiment S2, the reverse constraint instruction is an executable processing instruction pre-configured in the river segment processing unit. The reverse constraint instruction establishes an association with the corresponding river segment processing unit according to the river segment identifier, and pre-configures the monitoring fields to be read, the processing parameters used to determine the allowable range of the monitoring fields, and the corresponding output monitoring fields. The inlet constraint data is data that limits the allowable range of each monitoring field at the current river segment inlet position, including the river segment identifier, monitoring period identifier, version identifier, monitoring field, field lower limit value, and field upper limit value. The river segment identifier is used to determine the current river segment corresponding to the inlet constraint data, the monitoring period identifier is used to determine the current monitoring period to which the inlet constraint data belongs, the version identifier is used to determine the current hydraulic connection version on which the inlet constraint data is based, the monitoring field is used to determine the constrained hydrological parameters, and the field lower limit value and field upper limit value together form the field range of the corresponding monitoring field. When the reverse constraint instruction is executed, the edge node corresponding to the current river segment reads the data transmitted along the reverse flow direction and the hydrological monitoring data of the current river segment, and generates the field lower limit value and field upper limit value respectively according to the pre-configured processing parameters of the corresponding monitoring field.

[0028] In this embodiment S2, the cloud reads the river segment connection records belonging to the same hydraulic connection path from the current hydraulic connection version according to the hydraulic connection path identifier, and determines the termination end of the hydraulic connection path and the arrangement order of each river segment along the reverse flow direction according to the water flow direction identifier. The termination end of the hydraulic connection path is the location of the river segment in the corresponding hydraulic connection path that is not connected to the downstream adjacent river segment. The cloud searches for the hydrological monitoring node set at the outlet position of the river segment according to the river segment identifier of the termination river segment, and uses the hydrological monitoring data generated by the hydrological monitoring node in the current monitoring period as the input for the reverse constraint instruction to be executed on the termination river segment. The edge node corresponding to the termination river segment calls the reverse constraint instruction in the river segment processing unit, reads the hydrological monitoring data of the termination end and the hydrological monitoring data of the termination river segment according to the monitoring fields, generates the field lower limit value and field upper limit value corresponding to each monitoring field, and writes the river segment identifier, monitoring period identifier, version identifier, monitoring field, field lower limit value and field upper limit value into the entry constraint data of the termination river segment.

[0029] In this embodiment S2, the edge node corresponding to the terminated river segment determines the upstream adjacent river segment based on the adjacent river segment identifier and the water flow direction identifier in the river segment connection record, and sends the inlet constraint data of the terminated river segment to the edge node corresponding to the upstream adjacent river segment. The edge node corresponding to the upstream adjacent river segment uses the received inlet constraint data as the input of the reverse constraint command, and combines it with the hydrological monitoring data of this river segment to redetermine the lower limit value and upper limit value of each monitoring field, generate the inlet constraint data of this river segment, and continue to transmit it to the next upstream adjacent river segment along the reverse water flow direction. When the current river segment corresponds to multiple upstream adjacent river segments, the generated inlet constraint data is sent to the edge node corresponding to each upstream adjacent river segment respectively. When the current river segment corresponds to multiple downstream adjacent river segments, the inlet constraint data transmitted from each downstream adjacent river segment is collected according to the same monitoring time period identifier, version identifier, and monitoring field, and the lower limit value and upper limit value of the monitoring field corresponding to the current river segment are determined according to the processing rules pre-configured by the reverse constraint command. After both the forward processing command and the reverse constraint command in the same hydraulic connection path are executed, the path execution status corresponding to the hydraulic connection path is updated from the pending execution state to the valid state.

[0030] In this embodiment S2, the river segment identifier is used to associate the inlet boundary data and inlet constraint data of the same river segment, the monitoring period identifier is used to record the current monitoring period to which the inlet boundary data and inlet constraint data belong, the version identifier is used to record the current hydraulic connection version to which the inlet boundary data and inlet constraint data belong, and the field range is the range between the lower limit value and the upper limit value of the field corresponding to the same monitoring field. Comparing the inlet boundary data and inlet constraint data of the same river segment specifically includes associating the inlet boundary data and inlet constraint data according to the river segment identifier and the monitoring period identifier, comparing the version identifiers of the two, and when the version identifiers are consistent, comparing the field values ​​in the inlet boundary data with the field ranges in the inlet constraint data item by item according to the monitoring fields; determining the monitoring fields whose field values ​​are not within the corresponding field range as fields to be supplemented, and determining the river segments containing fields to be supplemented as river segments to be supplemented; when the version identifiers are inconsistent, determining the corresponding river segments as river segments to be supplemented, and writing the version identifiers of the two into the river segment to be supplemented record.

[0031] In this embodiment S2, inlet boundary data and inlet constraint data are associated according to the river segment identifier, monitoring period identifier, and version identifier. The river segment identifier determines whether the two types of data correspond to the same river segment, the monitoring period identifier determines whether the two types of data were generated in the same current monitoring period, and the version identifier determines whether the two types of data were generated based on the same current hydraulic connection version. The cloud or the edge node performing the comparison processing first searches for inlet boundary data and inlet constraint data according to the river segment identifier, then filters the two types of data belonging to the same current monitoring period according to the monitoring period identifier, and then compares the version identifiers in the two types of data. Inlet boundary data and inlet constraint data with consistent identifiers and monitoring period identifiers are identified as comparison objects corresponding to the same river segment. When the version identifiers are consistent, the field values ​​in the inlet boundary data are associated with the lower limit and upper limit values ​​of the field in the inlet constraint data item by item according to the monitoring fields. The field range is the closed range between the lower limit and upper limit values ​​of the field corresponding to the same monitoring field. When the field value is greater than or equal to the lower limit and less than or equal to the upper limit, the field value is determined to be within the corresponding field range. When the field value is less than the lower limit or greater than the upper limit, the field value is determined to be outside the corresponding field range.

[0032] In this embodiment S2, when the inlet boundary data and inlet constraint data of the same river segment contain multiple monitoring fields, the field value and field range of each monitoring field are compared, and the comparison results corresponding to each monitoring field are saved. Monitoring fields whose field values ​​are not within the corresponding field range are identified as fields to be supplemented, and river segments containing one or more fields to be supplemented are identified as river segments to be supplemented. When a monitoring field exists in the inlet boundary data but the corresponding field range is not recorded in the inlet constraint data, the monitoring field is identified as a monitoring field without a corresponding relationship. When a monitoring field exists in the inlet constraint data but the corresponding field value is not recorded in the inlet boundary data, the monitoring field is identified as a monitoring field without a corresponding relationship, and the above monitoring field is registered as a field to be supplemented. When the same river segment to be supplemented corresponds to multiple fields to be supplemented, the monitoring field, field value, field lower limit value, and field upper limit value of each field to be supplemented are recorded, so that each field to be supplemented is associated with the corresponding river segment identifier, monitoring period identifier, and version identifier.

[0033] In this embodiment S2, when the version identifiers of the inlet boundary data and the inlet constraint data are consistent, the river segment to be supplemented and the field to be supplemented are determined based on the comparison results of the field values ​​and field ranges. When the version identifiers of the inlet boundary data and the inlet constraint data are inconsistent, the corresponding river segment is determined as the river segment to be supplemented, and the monitoring field recorded in the inlet boundary data is determined as the field to be supplemented. At the same time, the version identifiers of the inlet boundary data and the inlet constraint data are recorded. A river segment record to be supplemented is generated based on the determined river segment to be supplemented and the field to be supplemented. Each river segment record to be supplemented corresponds to a river segment to be supplemented, including a river segment identifier, a monitoring period identifier, a version identifier of the inlet boundary data, a version identifier of the inlet constraint data, and one or more fields to be supplemented. The field values, lower limits, and upper limits of each field to be supplemented are associated with the river segment record to be supplemented.

[0034] In this embodiment S3, the updated hydraulic connection data is the hydraulic connection data re-acquired based on the river segment records to be processed, including river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path identifier. The updated hydraulic connection version is generated by organizing the updated hydraulic connection data according to the version identifier and adopts the same data structure as the current hydraulic connection version. The hydraulic connection path identifiers in the current hydraulic connection version and the updated hydraulic connection version are compared, and the hydraulic connection paths that exist only in one of the hydraulic connection versions are determined to be changed hydraulic connection paths. For hydraulic connection paths that exist in both the current hydraulic connection version and the updated hydraulic connection version, the adjacent river segment identifiers and flow direction identifiers in the corresponding river segment connection records are compared, and the hydraulic connection paths with inconsistent adjacent river segment identifiers or flow direction identifiers are determined to be changed hydraulic connection paths. Based on the river segment connection records in the updated hydraulic connection version, the connection relationship and flow direction of the river segment to be processed are updated.

[0035] In this embodiment S3, the cloud re-acquires updated hydraulic connection data based on the records of the river section to be processed. Specifically, it reads the river section identifier, monitoring period identifier, inlet boundary data version identifier, and inlet constraint data version identifier from the records of the river section to be processed. Using the river section identifier as the connection data query condition and the monitoring period identifier as the valid time range of the data, it reads the currently valid hydraulic connection data of the river section to be processed from the hydrological and water resources management platform, the river network scheduling system, and the operational status data of gates, pumping stations, and water distribution facilities. The scope of acquiring updated hydraulic connection data includes the river section to be processed, adjacent river sections directly connected to the river section to be processed, and the river section to which the river section to be processed belongs. The hydraulic connection path contains river segment connection records; when multiple river segments to be processed correspond to the same hydraulic connection path, the results are collected according to the hydraulic connection path identifier, and river segment connection records with the same content are merged according to the river segment identifier and the adjacent river segment identifier; the updated hydraulic connection data includes river segment identifier, adjacent river segment identifier, water flow direction identifier, and hydraulic connection path identifier. The river segment identifier is used to determine the river segment corresponding to the current record, the adjacent river segment identifier is used to determine the river segment that forms a direct hydraulic connection relationship with the current river segment, the water flow direction identifier is used to determine the flow direction of water between the current river segment and the adjacent river segment, and the hydraulic connection path identifier is used to determine the hydraulic connection path to which the corresponding river segment connection record belongs.

[0036] In this embodiment S3, the cloud generates an updated hydraulic connection version using the same data organization method as the current hydraulic connection version. Specifically, the updated hydraulic connection data is collected according to the river segment identifier, and the direct hydraulic connection relationship between the current river segment and an adjacent river segment is formed into a river segment connection record. The upstream and downstream relationship between the current river segment and the adjacent river segment is determined according to the water flow direction identifier, and the river segment connection records belonging to the same path are classified according to the hydraulic connection path identifier. For newly added continuous river segment connection relationships in the re-acquired hydraulic connection data, they are arranged along the water flow direction. The river segment connection records should be recorded and assigned hydraulic connection path identifiers. After completing the organization of the updated hydraulic connection data, the resulting set of river segment connection records should be assigned a version identifier that is different from the original current hydraulic connection version. This version identifier should be associated with the current monitoring period identifier to generate an updated hydraulic connection version. Both the current hydraulic connection version and the updated hydraulic connection version include a version identifier and river segment connection records. The river segment connection records in both versions include river segment identifiers, adjacent river segment identifiers, flow direction identifiers, and hydraulic connection path identifiers to support comparison of the two hydraulic connection versions using the same fields.

[0037] In this embodiment S3, the cloud reads the hydraulic connection path identifiers from the current hydraulic connection version and the updated hydraulic connection version, forming a current path identifier set and an updated path identifier set, and compares the two path identifier sets. Hydraulic connection paths existing only in the current path identifier set are identified as hydraulic connection paths removed in the updated state, while hydraulic connection paths existing only in the updated path identifier set are identified as newly added hydraulic connection paths in the updated state, and these hydraulic connection paths are registered as changed hydraulic connection paths. For hydraulic connection paths existing in both path identifier sets, the river segment connection records in the two versions are associated according to the hydraulic connection path identifier, and then the corresponding records for the same river segment are associated according to the river segment identifier. Record and compare adjacent river segment identifiers and water flow direction identifiers item by item; when the adjacent river segment identifier, water flow direction identifier, or number of river segment connection records contained in the same path changes in any river segment connection record, the corresponding hydraulic connection path is registered as the changed hydraulic connection path; the cloud updates the connection relationship and water flow direction of the river segments to be processed according to the river segment connection records in the updated hydraulic connection version, writes the newly added river segment connection records to the corresponding river segment, replaces the river segment connection records with the records in the updated hydraulic connection version with the records in the updated hydraulic connection version, transfers the river segment connection records that have been removed in the update state to the historical record range, and establishes an association between the updated river segment connection records and the version identifier of the updated hydraulic connection version.

[0038] In this embodiment S3, the hydraulic connection path identifier in the path execution state is matched with the hydraulic connection path identifier corresponding to the changed hydraulic connection path; the path execution state where the hydraulic connection path identifier does not match is retained; the status identifier of the path execution state where the hydraulic connection path identifier matches is set to an invalid state, and the corresponding inlet boundary data and inlet constraint data are stopped from being called.

[0039] In this embodiment S3, the cloud reads the hydraulic connection path identifier from the changed hydraulic connection path and reads the hydraulic connection path identifier recorded in each path execution state from the path execution state corresponding to the current hydraulic connection version. The two types of hydraulic connection path identifiers are matched item by item according to the matching rule of consistent identifier values. When the hydraulic connection path identifier in the path execution state is consistent with the changed hydraulic connection path identifier, a path matching result is formed. When the hydraulic connection path identifier in the path execution state is not consistent with the changed hydraulic connection path identifier, a path mismatch result is formed. Each hydraulic connection path identifier under the same hydraulic connection version corresponds to a path execution state, so that each matching result points to the status identifier and processing result of the corresponding hydraulic connection path.

[0040] In this embodiment S3, for path execution states where the hydraulic connection path identifier does not match, the cloud maintains the original status identifier of the path execution state and retains its association with the corresponding inlet boundary data, outlet boundary data, and inlet constraint data. For path execution states where the hydraulic connection path identifier matches, the cloud sets its status identifier to an invalid state and associates the inlet boundary data, outlet boundary data, and inlet constraint data formed by the path under the original current hydraulic connection version with the historical data range corresponding to the original version identifier. For newly added hydraulic connection paths that only exist in the updated hydraulic connection version, the cloud establishes a new path execution state based on the newly added hydraulic connection path identifier, initializes its status identifier to a pending execution state, and establishes an association with the corresponding river segment connection record in the updated hydraulic connection version. For hydraulic connection paths that only exist in the original current hydraulic connection version, the corresponding path execution state is set to an invalid state, and its historical association with the original version identifier and the original river segment connection record is maintained.

[0041] In this embodiment S3, the field instruction dependency relationship also records the correspondence between input monitoring fields, processing instructions, output monitoring fields, and hydraulic connection path identifiers. The input monitoring fields in the field instruction dependency relationship are matched with the fields to be processed, and the matched processing instructions are determined as the target processing instructions. The corresponding output monitoring fields and hydraulic connection path identifiers are then read. A local processing task is generated based on the river segment to be processed, the target processing instruction, the output monitoring fields, and the hydraulic connection path identifiers. This local processing task is then distributed to the edge nodes corresponding to the river segment to be processed. The edge nodes allocate computing resources and execute the target processing instruction, updating the corresponding output monitoring fields. No other processing instructions are executed, and other monitoring fields remain unchanged. The execution status of the path corresponding to the hydraulic connection path identifier in the local processing task is set to a valid state.

[0042] In this embodiment S3, the field instruction dependency relationship also records the correspondence between the input monitoring field, the processing instruction, the output monitoring field, and the hydraulic connection path identifier. The hydraulic connection path identifier is written into the field instruction dependency relationship according to the river segment connection record of the river segment to which the processing instruction belongs and the data transmission direction formed by the processing instruction, in order to determine the data propagation path corresponding to the processing instruction. The cloud reads the river segment identifier and the field to be processed from the river segment record to be processed. First, it determines the field instruction dependency relationship of the corresponding river segment processing unit according to the river segment identifier. Then, it matches the input monitoring field in the field instruction dependency relationship with the field identifier of the field to be processed. It also filters the matching results corresponding to the currently valid hydraulic connection path according to the updated hydraulic connection version. When the input monitoring field is consistent with the field to be processed, the corresponding processing instruction is determined as the target processing instruction, and the output monitoring field and hydraulic connection path identifier corresponding to the target processing instruction are read. When one field to be processed corresponds to multiple processing instructions, the multiple processing instructions are determined as target processing instructions respectively. When multiple fields to be processed correspond to the same processing instruction, the same processing instruction is merged and registered once, and the corresponding multiple fields to be processed are jointly registered as the input monitoring field of the target processing instruction.

[0043] In this embodiment S3, the cloud generates a local processing task based on the river segment to be processed, the target processing instruction, the input monitoring fields, the output monitoring fields, and the hydraulic connection path identifier. The local processing task includes the river segment identifier of the river segment to be processed, the current monitoring time period identifier, the version identifier of the updated hydraulic connection version, the target processing instruction identifier, the input monitoring fields, the output monitoring fields, and the hydraulic connection path identifier. Among them, the river segment identifier is used to determine the execution location of the local processing task, the version identifier is used to determine the river segment connection relationship and water flow direction on which the task execution is based, and the target processing instruction identifier is used to determine the executable instruction to be invoked. The input monitoring field is used to limit the data range read by the task, the output monitoring field is used to limit the data range updated by the task, and the hydraulic connection path identifier is used to determine the path execution status corresponding to the task. The cloud queries the edge node corresponding to the river segment to be processed based on the river segment identifier and sends the local processing task to the edge node. After receiving the local processing task, the edge node performs consistency verification on the river segment identifier, monitoring period identifier and version identifier in the task, locates the target processing instruction in the corresponding river segment processing unit based on the target processing instruction identifier, and loads and updates the river segment connection record and processing parameters of the corresponding river segment in the hydraulic connection version.

[0044] In this embodiment S3, the edge node allocates processor execution time, memory space, field data buffer, and task communication resources to the local processing task. It reads the corresponding hydrological monitoring data, inlet boundary data, or inlet constraint data according to the input monitoring fields registered by the local processing task, executes the target processing instruction, and forms the field values ​​of the corresponding output monitoring fields. The edge node finds the field to be updated based on the output monitoring field identifier, writes the field value formed by the target processing instruction into the corresponding output monitoring field, and writes the current monitoring period identifier and the updated hydraulic connection version identifier into the updated output monitoring field. The local processing task only calls the registered target processing instructions; other monitoring fields not registered as output monitoring fields retain their original field values. After the target processing instruction is executed and the corresponding output monitoring field is written, the path execution status corresponding to the hydraulic connection path identifier in the local processing task is set to a valid state, and the updated hydraulic connection version is registered as the current hydraulic connection version, so that subsequent processing uses the updated version identifier, river segment connection record, and path execution status.

[0045] In this embodiment S4, the target processing instruction is executed, and the inlet boundary data and inlet constraint data of the river segment to be processed are regenerated according to the river segment connection relationship and water flow direction in the current hydraulic connection version. The inlet boundary data and inlet constraint data regenerated according to the river segment identifier, monitoring period identifier and version identifier are associated, and the field values ​​in the inlet boundary data are compared with the corresponding field ranges in the inlet constraint data item by item. When all field values ​​are within the corresponding field range, the corresponding state of the boundary data is set to the corresponding state. When there are field values ​​that are not within the corresponding field range, the corresponding state of the boundary data is set to the non-corresponding state, and the corresponding monitoring field is determined as the difference field. After the comparison is completed, the computing resources allocated to the corresponding edge node for executing the target processing instruction are released, and the inlet boundary data, inlet constraint data, corresponding state of boundary data and difference fields of each river segment are combined according to the river segment connection relationship and water flow direction in the current hydraulic connection version to generate hydrological and water resources monitoring results.

[0046] In this embodiment S3, based on the updated output monitoring fields of the target processing instruction, the inlet boundary data and inlet constraint data of the river segment to be processed are regenerated according to the river segment connection relationship and water flow direction in the current hydraulic connection version. For the inlet boundary data of the river segment to be processed, the cloud determines the hydraulic connection path to which the river segment to be processed belongs and its upstream adjacent river segments according to the current hydraulic connection version, and the edge nodes corresponding to the upstream adjacent river segments transmit the updated outlet boundary data along the water flow direction. The edge nodes corresponding to the river segment to be processed register the received data as a new data entry according to the river segment identifier, monitoring time period identifier, version identifier and monitoring fields. The generated inlet boundary data; for the inlet constraint data of the river segment to be processed, the cloud determines the hydraulic connection path to which the river segment to be processed belongs and its downstream adjacent river segments according to the current hydraulic connection version, and the edge nodes corresponding to the downstream adjacent river segments transmit the updated constraint processing results along the reverse flow direction. The edge nodes corresponding to the river segment to be processed perform reverse constraint processing in combination with the output monitoring fields updated by the target processing instructions, and write the resulting field lower limit value and field upper limit value into the regenerated inlet constraint data; both the regenerated inlet boundary data and the inlet constraint data are written with the current monitoring period identifier and the version identifier of the current hydraulic connection version.

[0047] In this embodiment S3, the edge nodes corresponding to the river segment to be processed in the cloud are associated with the regenerated inlet boundary data and inlet constraint data according to the river segment identifier, monitoring period identifier, and version identifier. The field values ​​in the inlet boundary data and the field ranges in the inlet constraint data are matched item by item according to the monitoring fields. When the field value is greater than or equal to the lower limit of the corresponding field and less than or equal to the upper limit of the corresponding field, the monitoring field is determined to form a corresponding relationship. When the field values ​​of each monitoring field are all within the corresponding field range, the boundary data of the river segment is set to the corresponding state, and an empty difference field set is established for the river segment. When there is a field value that is less than the lower limit of the corresponding field or greater than the upper limit of the corresponding field, the boundary data of the river segment is set to the non-corresponding state, and the monitoring fields that form the above comparison results are written into the difference field set. The difference fields include the river segment identifier, monitoring field, field value, lower limit of the field, upper limit of the field, monitoring period identifier, and version identifier, which are used to record the specific fields that form differences between the inlet boundary data and the inlet constraint data and their comparison basis.

[0048] In this embodiment S3, after comparing the inlet boundary data and the inlet constraint data, the edge node releases the processor execution time, memory space, field data buffer, and task communication resources allocated for executing the target processing instruction, and retains the output monitoring field formed by the target processing instruction, the regenerated inlet boundary data, the inlet constraint data, the corresponding status of the boundary data, and the difference field. The cloud collects the processing results of each river segment according to the hydraulic connection path identifier in the current hydraulic connection version, and determines the arrangement order of the processing results of each river segment in the corresponding hydraulic connection path according to the river segment connection relationship and the water flow direction. The hydrological and water resources monitoring results include the current monitoring period identifier, the version identifier of the current hydraulic connection version, the river segment identifier, the hydraulic connection path identifier, the inlet boundary data, the inlet constraint data, the corresponding status of the boundary data, and the difference field of each river segment, and form the hydrological and water resources monitoring results corresponding to the current river network status according to the hydraulic connection path and the river segment arrangement order.

[0049] Example 2: The present invention proposes a cloud-edge collaborative hydrological and water resources monitoring system, which is applied to the cloud-edge collaborative hydrological and water resources monitoring method proposed in Example 1. It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the cloud-edge collaborative hydrological and water resources monitoring method in Example 1.

[0050] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.

Claims

1. A method for monitoring hydrological and water resources based on cloud-edge collaboration, characterized in that, Includes the following steps: S1. Obtain hydrological monitoring data and hydraulic connection data, determine the current monitoring period and generate the current hydraulic connection version, determine the river segment connection relationship and water flow direction based on the current hydraulic connection version, call the river segment processing unit at the corresponding edge node, establish field instruction dependency relationship and initialize path execution status; Among them, the current hydraulic connection version is the data record of the connection relationship and water flow direction of each river segment within the current monitoring period; the river segment processing unit is the processing unit set at the edge node and performs forward processing and reverse constraint processing; the field instruction dependency relationship is the correspondence between the monitored field and the processing instruction to read the monitored field; the path execution status is the data of the status of the processing result corresponding to the hydraulic connection path; S2. Execute forward processing commands along the direction of water flow to generate inlet boundary data; execute reverse constraint commands along the direction of reverse water flow to generate inlet constraint data; compare the inlet boundary data and inlet constraint data of the same river segment according to the river segment identifier, monitoring period, version identifier, and field range to determine the river segment and field to be supplemented. Among them, the inlet boundary data is the processed data that is transmitted into the current river segment along the direction of water flow; the inlet constraint data is the allowable range of each monitoring field generated in the opposite direction of water flow; the river segment to be processed is the river segment where the inlet boundary data and the inlet constraint data do not correspond, and the field to be processed is the monitoring field that forms the non-corresponding data. S3. Based on the river segment to be processed, obtain updated hydraulic connection data, generate an updated hydraulic connection version, compare the current hydraulic connection version with the updated hydraulic connection version, and determine the changed hydraulic connection paths; update the connection relationships and flow directions of the river segment to be processed according to the updated hydraulic connection version, retain the path execution status of paths that have not changed, and set the path execution status of paths that have changed to an invalid state; query the field instruction dependency relationship according to the field to be processed, determine the target processing instruction, and register the updated hydraulic connection version as the current hydraulic connection version; Among them, the hydraulic connection path that has changed is the hydraulic connection path whose connection relationship record is inconsistent between the current hydraulic connection version and the updated hydraulic connection version; the target processing instruction is the processing instruction that reads the field to be processed in the field instruction dependency relationship; S4. Based on the target processing instructions, regenerate and compare the inlet boundary data and the inlet constraint data, determine the corresponding status and difference fields of the boundary data, release the computing resources occupied by the execution of the target processing instructions, combine the processing results of each river segment according to the current hydraulic connection version, and generate hydrological and water resources monitoring results. Among them, the boundary data correspondence status refers to the data status of whether the inlet boundary data and the inlet constraint data correspond, and the difference field is the monitoring field in the inlet boundary data and the inlet constraint data that does not form a corresponding relationship.

2. The hydrological and water resources monitoring method based on cloud-edge collaboration according to claim 1, characterized in that: In S1, the hydrological monitoring data consists of monitoring field data generated by each hydrological monitoring node during the current monitoring period, including monitoring node identifier, monitoring period identifier, monitoring fields, and field values; the hydraulic connection data consists of data on the connection relationships and flow directions between river segments, including river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path identifier; the current hydraulic connection version is generated by organizing the hydraulic connection data corresponding to the current monitoring period according to the version identifier, including the version identifier and the river segment connection record corresponding to each river segment. The river segment connection record includes the river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path. The river segment processing unit uses the river segment identifier as the basis for invocation, including forward processing instructions and reverse constraint instructions; the field instruction dependency relationship includes the correspondence between input monitoring fields, processing instructions, and output monitoring fields; a path execution status is established according to each hydraulic connection path identifier, the path execution status includes the hydraulic connection path identifier and the status identifier, the status identifier includes pending execution status, valid status, and invalid status; the association between river segment connection records, river segment processing units, and field instruction dependencies is established according to the river segment identifier, and the association between river segment connection records and path execution status is established according to the hydraulic connection path identifier.

3. The hydrological and water resources monitoring method based on cloud-edge collaboration according to claim 2, characterized in that: In S2, the forward processing instruction is a pre-configured instruction in the river segment processing unit that generates outlet boundary data based on the current river segment's inlet boundary data and hydrological monitoring data. The inlet boundary data is data input into the current river segment and read by the forward processing instruction, including river segment identifier, monitoring period identifier, version identifier, monitoring fields, and field values. The outlet boundary data is data output by the forward processing instruction and transmitted to the downstream adjacent river segment, including river segment identifier, monitoring period identifier, version identifier, monitoring fields, and field values. The hydrological monitoring data of the monitoring node corresponding to the starting end of the hydraulic connection path is used as the inlet boundary data of the corresponding river segment. The forward processing instruction is executed to generate outlet boundary data, and the outlet boundary data of the current river segment is used as the inlet boundary data of the downstream adjacent river segment. The process is executed sequentially along the flow direction according to the river segment connection relationship in the current hydraulic connection version to generate inlet boundary data for each river segment.

4. The hydrological and water resources monitoring method based on cloud-edge collaboration according to claim 3, characterized in that: In S2, the reverse constraint instruction is a pre-configured processing instruction in the river segment processing unit used to generate inlet constraint data; the inlet constraint data is data that limits the allowable range of each monitoring field at the current river segment inlet, including river segment identifier, monitoring period identifier, version identifier, monitoring field, field lower limit value, and field upper limit value; the hydrological monitoring data of the monitoring node corresponding to the end of the hydraulic connection path is used as the input for executing the reverse constraint instruction for the corresponding river segment to generate the inlet constraint data for the corresponding river segment, and the inlet constraint data of the current river segment is used as the input for executing the reverse constraint instruction for the upstream adjacent river segment. The instructions are executed sequentially along the countercurrent direction according to the river segment connection relationship in the current hydraulic connection version to generate the inlet constraint data for each river segment.

5. A method for monitoring hydrological and water resources based on cloud-edge collaboration according to claim 4, characterized in that: In step S2, the river segment identifier is used to associate the inlet boundary data and inlet constraint data of the same river segment, the monitoring period identifier is used to record the current monitoring period to which the inlet boundary data and inlet constraint data belong, the version identifier is used to record the current hydraulic connection version to which the inlet boundary data and inlet constraint data belong, and the field range is the range between the lower limit value and the upper limit value of the field corresponding to the same monitoring field. Comparing the inlet boundary data and inlet constraint data of the same river segment specifically includes associating the inlet boundary data and inlet constraint data according to the river segment identifier and the monitoring period identifier, comparing their version identifiers, and when the version identifiers are consistent, comparing the field values ​​in the inlet boundary data with the field ranges in the inlet constraint data item by item according to the monitoring fields; identifying monitoring fields whose field values ​​are not within the corresponding field range as fields to be supplemented, and identifying river segments containing fields to be supplemented as river segments to be supplemented. When the version identifiers are inconsistent, the corresponding river segment is identified as the river segment to be supplemented, and the version identifiers of both are written into the river segment to be supplemented record.

6. The hydrological and water resources monitoring method based on cloud-edge collaboration according to claim 5, characterized in that: In step S3, the updated hydraulic connection data is the hydraulic connection data re-acquired based on the river segment records to be processed, including river segment identifier, adjacent river segment identifier, flow direction identifier, and hydraulic connection path identifier. The updated hydraulic connection version is generated by organizing the updated hydraulic connection data according to the version identifier and adopts the same data structure as the current hydraulic connection version. The hydraulic connection path identifiers in the current hydraulic connection version and the updated hydraulic connection version are compared, and hydraulic connection paths that exist only in one of the hydraulic connection versions are identified as changed hydraulic connection paths. For hydraulic connection paths that exist in both the current hydraulic connection version and the updated hydraulic connection version, the adjacent river segment identifiers and flow direction identifiers in the corresponding river segment connection records are compared, and hydraulic connection paths with inconsistent adjacent river segment identifiers or flow direction identifiers are identified as changed hydraulic connection paths. Based on the river segment connection records in the updated hydraulic connection version, the connection relationship and flow direction of the river segment to be processed are updated.

7. A hydrological and water resources monitoring method based on cloud-edge collaboration according to claim 6, characterized in that: In step S3, the hydraulic connection path identifier in the path execution state is matched with the hydraulic connection path identifier corresponding to the changed hydraulic connection path; the path execution state where the hydraulic connection path identifier is not matched is retained; the status identifier of the path execution state where the hydraulic connection path identifier is matched is set to the invalid state, and the corresponding inlet boundary data and inlet constraint data are stopped from being called.

8. A hydrological and water resources monitoring method based on cloud-edge collaboration according to claim 7, characterized in that: In S3, the field instruction dependency relationship also records the correspondence between input monitoring fields, processing instructions, output monitoring fields and hydraulic connection path identifiers; The input monitoring fields in the field instruction dependency relationship are matched with the fields to be processed. The matched processing instruction is determined as the target processing instruction, and the corresponding output monitoring fields and hydraulic connection path identifiers are read. A local processing task is generated based on the river segment to be processed, the target processing instruction, the output monitoring fields, and the hydraulic connection path identifiers. The local processing task is sent to the edge node corresponding to the river segment to be processed. The edge node allocates computing resources and executes the target processing instruction, updates the corresponding output monitoring fields, does not execute other processing instructions, keeps other monitoring fields unchanged, and sets the path execution status corresponding to the hydraulic connection path identifier in the local processing task to the valid state.

9. A hydrological and water resources monitoring method based on cloud-edge collaboration according to claim 8, characterized in that: In step S4, the target processing instruction is executed, and the inlet boundary data and inlet constraint data of the river segment to be processed are regenerated according to the river segment connection relationship and water flow direction in the current hydraulic connection version. The inlet boundary data and inlet constraint data regenerated according to the river segment identifier, monitoring period identifier and version identifier are associated, and the field values ​​in the inlet boundary data are compared item by item with the corresponding field ranges in the inlet constraint data. When all field values ​​are within the corresponding field range, the corresponding state of the boundary data is set to the corresponding state. When there are field values ​​that are not within the corresponding field range, the corresponding state of the boundary data is set to the non-corresponding state, and the corresponding monitoring field is determined as the difference field. After the comparison is completed, the computing resources allocated to the corresponding edge node for executing the target processing instruction are released, and the inlet boundary data, inlet constraint data, corresponding state of boundary data and difference fields of each river segment are combined according to the river segment connection relationship and water flow direction in the current hydraulic connection version to generate hydrological and water resources monitoring results.

10. A cloud-edge collaborative hydrological and water resources monitoring system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes a computer program to implement the cloud-edge collaborative hydrological and water resources monitoring method as described in any one of claims 1-9.