Intelligent gate control access method and system based on driver identification and data mapping
By building a gateway edge computing node into the water conservancy terminal, the protocol of the gate control device can be automatically identified and adapted, its variable format and function can be parsed, the control strategy can be dynamically executed, and simulation verification can be performed when direct application is not possible. This solves the problem of inconsistent equipment access in the existing technology and improves the intelligence and reliability of the water conservancy gate control system.
Patent Information
- Application Number
- CN202511178571.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-22
AI Technical Summary
Existing IoT gate control solutions rely on fixed drivers and manual configuration, resulting in inconsistent device access and difficulty meeting the needs of large-scale device access and efficient management. In addition, inconsistent communication protocols affect the automation and reliability of water conservancy gate control systems.
An intelligent gate control access method based on drive identification and data mapping is adopted. The gateway edge computing node of the water conservancy terminal monitors the logical port, automatically identifies and adapts the protocol type of the gate control device, parses the device data points and functions, dynamically executes the control strategy, and performs simulated data verification and behavior analysis when direct application is not possible, thereby establishing a linkage relationship between the device and upstream and downstream areas.
It realizes automatic identification and protocol adaptation of gate control equipment, reduces manual intervention, improves the intelligence level and operational reliability of the system, adapts to large-scale heterogeneous equipment access, enhances strategy adaptability and equipment versatility, and improves the automation and unified control capabilities of the water conservancy system.
Smart Images

Figure CN120729915A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a smart gate control access method and system based on drive identification and data mapping. Background Art
[0002] With the development of smart water conservancy and irrigation area automation, gate control systems need to connect to a large number of devices (such as integrated gates, RTUs, video surveillance equipment, etc.) to achieve real-time data collection and remote control.
[0003] Existing IoT gateway control solutions use fixed drives and manual configuration. Traditional solutions often rely on PLCs, and there are inconsistencies in communication protocols and access methods among brands. These solutions primarily rely on manual configuration. When connecting devices, existing traditional IoT solutions primarily use manual channel configuration and a fixed master-slave switching mechanism, making it difficult to meet the needs of large-scale device access and efficient management. Summary of the Invention
[0004] The present invention aims to solve the problem of how to improve the automation and reliability of water conservancy gate control while reducing manual intervention, and to provide an intelligent gate control access method and system based on drive identification and data mapping.
[0005] The present invention adopts the following technical means to solve the technical problem:
[0006] The present invention provides an intelligent gate control access method based on drive identification and data mapping, comprising:
[0007] Based on the gateway edge computing node preset by the water conservancy terminal, the newly added logical ports are monitored and the access gate control devices are identified through the logical ports;
[0008] Determining whether the gate control device matches a preset protocol type, wherein the protocol type specifically includes Modbus, IEC104, and a proprietary protocol;
[0009] If so, read the device data points preset in the gate control device, parse the variable format of the gate control device according to the device data points, and dynamically execute the control strategy pre-recorded in the water conservancy terminal according to the device functions preset in the gate control device, wherein the device data points specifically include water level, gate opening and fault status, and the variable format specifically includes encoding method, variable structure type and register address mapping;
[0010] determining whether the control strategy can be synchronized with the gate control device;
[0011] If not, obtain the verification content of the control strategy, and dynamically verify the execution behavior of the gate control device on the control strategy based on the simulation data pre-recorded in the water conservancy terminal. According to the execution behavior, identify the influencing parameters of the gate control device on the upstream and downstream areas, and construct the linkage relationship of the control strategy on the upstream and downstream areas based on the influencing parameters, wherein the verification content specifically includes logical conflicts, null value dependencies and threshold overlaps, and the influencing parameters specifically include water level change rate, water level response amplitude, discharge flow, flow velocity and water body lag time.
[0012] Furthermore, before the step of reading the device data points preset by the gate control device and parsing the variable format of the gate control device according to the device data points, the method further includes:
[0013] Based on the handshake request pre-initiated by the water conservancy terminal, obtaining the device identification of the gate control device, wherein the device identification specifically includes the firmware version, communication capability and device address;
[0014] Determining whether the device identification matches the manufacturer number preset in the water conservancy terminal;
[0015] If so, identify the device protocol type of the gate control device, dynamically load the pre-matched driver of the water conservancy terminal according to the device protocol type, and construct the driving parameters of the gate control device, wherein the device protocol type specifically includes the register range, communication baud rate and command structure, the driver specifically includes drive activation, communication test and feedback confirmation, and the drive parameters specifically include data reading instruction structure, register offset rules and data point mapping information.
[0016] Furthermore, the step of dynamically executing the control strategy pre-recorded by the water conservancy terminal according to the preset device function of the gate control device further includes:
[0017] Identify the policy trigger conditions of the device function based on the trigger type of the control policy, wherein the trigger type specifically includes instruction trigger, linkage trigger and timing trigger;
[0018] Determining whether the policy trigger condition matches the trigger type;
[0019] If so, the current hydrological status data is collected through the water conservancy terminal as the preset decision input information, and the strategy scheduling thread of the gate control device is dynamically constructed according to the collection cycle of the decision input information, wherein the hydrological status data specifically includes the upstream water level, downstream water level, gate opening, equipment operating status, remote instruction value, rainfall and warning level.
[0020] Furthermore, the step of obtaining the verification content of the control strategy further includes:
[0021] Based on a preset internal structure of the control policy, detecting the integrity of the policy fields of the control policy, wherein the internal structure of the policy specifically includes a condition set, an action set, and a data point reference;
[0022] Determining whether the integrity of the policy field is missing;
[0023] If so, obtain the dependency relationship preset by the control strategy, identify the linkage strategy preset by the control strategy based on the dependency relationship, and check the invalid commands of the control strategy from the gate control device based on the trigger status of the linkage strategy, wherein the invalid commands specifically include overwriting strategies or conflict strategies.
[0024] Furthermore, the step of determining whether the gate control device matches a preset protocol type further includes:
[0025] Collecting corresponding protocol original data frames from the gate control device, wherein the protocol original data frames specifically include message start and end characters, message length bytes, function codes, check bit types, response time intervals, and communication baud rates;
[0026] Determining whether the protocol original data frame matches a protocol feature field, wherein the protocol feature field specifically includes a protocol frame header, an address field, and a data length;
[0027] If so, extract the corresponding byte order from the protocol original data frame, divide the data type of the protocol original data frame based on the byte order, and parse the decoded data of the protocol original data frame according to the data type, wherein the data type specifically includes 16-bit integer, 32-bit floating point and decimal offset, and the decoded data specifically includes opening value, water level value and status word.
[0028] Furthermore, the step of determining whether the control strategy can be synchronized with the gate control device further includes:
[0029] Based on the preset real-time status information of the gate control device, the execution type of the control strategy is obtained, wherein the real-time status information specifically includes the communication status, the current working mode, the gate status and the control authority, and the execution type specifically includes the opening adjustment type, the state control type and the mode switching type;
[0030] Determining whether the real-time status information supports the execution type;
[0031] If so, identify the preset execution capability of the gate control device, collect the upload frequency of the gate control device based on the execution capability, construct the feedback cycle of the water conservancy terminal for the control strategy based on the upload frequency, compare the feedback cycle with the preset strategy tolerance time, and generate the strategy feedback information of the gate control device, wherein the execution capability specifically includes the execution confirmation frame, the execution result data point and the failure reason code.
[0032] Furthermore, the step of monitoring the newly added logical port by the gateway edge computing node preset based on the water conservancy terminal and identifying the accessed gate control device through the logical port further includes:
[0033] Detecting abnormal data injection into the logical port, wherein the abnormal data specifically includes high-frequency non-protocol data, illegal frames, and abnormal baud rate changes;
[0034] Determining whether the abnormal data injection exceeds a preset injection threshold;
[0035] If so, dynamically disconnect the water conservancy terminal from the gate control device, collect the data feature package of the gate control device, and detect the injection behavior of the gate control device based on the data feature package, wherein the data feature package specifically includes the device identification code, encryption signature, manufacturer code and protocol version information, and the injection behavior specifically includes high-frequency injection of non-protocol data, repeated frame flooding and fake communication attempts.
[0036] The present invention also provides an intelligent gate control access system based on drive identification and data mapping, comprising:
[0037] A monitoring module is used to monitor the newly added logical ports based on the gateway edge computing node preset by the water conservancy terminal, and identify the accessed gate control device through the logical port;
[0038] A determination module, configured to determine whether the gate control device matches a preset protocol type, wherein the protocol type specifically includes Modbus, IEC104, and a proprietary protocol;
[0039] an execution module, configured to, if yes, read device data points preset in the gate control device, parse a variable format of the gate control device according to the device data points, and dynamically execute a control strategy pre-recorded in the water conservancy terminal according to the device functions preset in the gate control device, wherein the device data points specifically include water level, gate opening, and fault status, and the variable format specifically includes an encoding method, a variable structure type, and a register address mapping;
[0040] A second judgment module is used to judge whether the control strategy can be synchronized with the gate control device;
[0041] The second execution module is used to obtain the verification content of the control strategy if it cannot be done, and dynamically verify the execution behavior of the gate control device on the control strategy based on the simulation data pre-recorded in the water conservancy terminal, identify the influencing parameters of the gate control device on the upstream and downstream areas according to the execution behavior, and construct the linkage relationship of the control strategy on the upstream and downstream areas based on the influencing parameters, wherein the verification content specifically includes logical conflicts, null value dependencies and threshold overlaps, and the influencing parameters specifically include water level change rate, water level response amplitude, discharge flow, flow velocity and water body lag time.
[0042] Furthermore, it also includes:
[0043] an acquisition module, configured to acquire a device identification of the gate control device based on a handshake request pre-initiated by the water conservancy terminal, wherein the device identification specifically includes a firmware version, a communication capability, and a device address;
[0044] A third judgment module is used to judge whether the device identification matches the manufacturer number preset in the water conservancy terminal;
[0045] The third execution module is used to identify the device protocol type of the gate control device, dynamically load the pre-matched driver of the water conservancy terminal according to the device protocol type, and construct the driving parameters of the gate control device, wherein the device protocol type specifically includes the register range, communication baud rate and command structure, the driver specifically includes drive activation, communication test and feedback confirmation, and the drive parameters specifically include data reading instruction structure, register offset rule and data point mapping information.
[0046] Furthermore, the execution module further includes:
[0047] an identification unit, configured to identify a policy trigger condition of the device function based on a trigger type of the control policy, wherein the trigger type specifically includes a command trigger, a linkage trigger, and a timing trigger;
[0048] a judging unit, configured to judge whether the policy triggering condition matches the triggering type;
[0049] The execution unit is used to collect the current hydrological status data as preset decision input information through the water conservancy terminal, and dynamically construct the strategy scheduling thread of the gate control device according to the collection cycle of the decision input information, wherein the hydrological status data specifically includes upstream water level, downstream water level, gate opening, equipment operating status, remote instruction value, rainfall and warning level.
[0050] The present invention provides a smart gate access method and system based on drive identification and data mapping, which has the following beneficial effects:
[0051] The present invention realizes automatic identification and protocol adaptation of gate control devices by building-in gateway edge computing nodes in water conservancy terminals, avoiding the tedious process of traditional manual configuration of communication channels and protocol drivers, effectively reducing human intervention. After the device is connected, its variable format and device function can be parsed, and the control strategy can be automatically matched and executed. If the strategy cannot be applied directly, dynamic verification and behavior analysis can be performed based on simulation data to further build the linkage relationship between the device and the upstream and downstream areas. This mechanism enhances the adaptability of the strategy and the versatility of the equipment, and helps to improve the intelligence level, operational reliability and automation capabilities of the gate control system. It is particularly suitable for smart water conservancy scenarios with large-scale heterogeneous access and unified control of equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of an embodiment of a smart gate-controlled access method based on drive identification and data mapping according to the present invention;
[0053] Figure 2 This is a structural block diagram of an embodiment of the intelligent gate-controlled access system based on drive identification and data mapping of the present invention. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The implementation, functional features and advantages of the present invention will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
[0055] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0056] Reference Attachment Figure 1 , is a smart gate control access method based on drive identification and data mapping in one embodiment of the present invention, comprising:
[0057] S1: Based on the gateway edge computing node preset by the water conservancy terminal, monitor the newly added logical ports and identify the connected gate control devices through the logical ports;
[0058] S2: Determine whether the gate control device matches a preset protocol type, wherein the protocol type specifically includes Modbus, IEC104, and a proprietary protocol;
[0059] S3: If yes, then read the device data points preset in the gate control device, parse the variable format of the gate control device according to the device data points, and dynamically execute the control strategy pre-recorded in the water conservancy terminal according to the device functions preset in the gate control device, wherein the device data points specifically include water level, gate opening, and fault status, and the variable format specifically includes encoding mode, variable structure type, and register address mapping;
[0060] S4: Determine whether the control strategy can be synchronized with the gate control device;
[0061] S5: If not, obtain the verification content of the control strategy, and dynamically verify the execution behavior of the gate control device on the control strategy based on the simulation data pre-recorded in the water conservancy terminal. According to the execution behavior, identify the influencing parameters of the gate control device on the upstream and downstream areas, and construct the linkage relationship of the control strategy on the upstream and downstream areas based on the influencing parameters, wherein the verification content specifically includes logical conflicts, null value dependencies and threshold overlaps, and the influencing parameters specifically include water level change rate, water level response amplitude, discharge flow, flow velocity and water body lag time.
[0062] In this embodiment, the system monitors the newly added logical ports based on the gateway edge computing nodes pre-installed in the water conservancy terminal, identifies the accessed gate control devices through these logical ports, and then determines whether these gate control devices match the pre-set protocol type to execute the corresponding steps; for example, when the system determines that the accessed gate control device cannot match the pre-set protocol type, the system will consider that the communication protocol used by the device is not in the protocol template library supported by the system, and the system will record the device access failure log, including the device's port information, initial message sample, and timestamp, and mark the device as "to be identified" to avoid misjudgment as illegal access. At the same time, the fuzzy protocol parser is started to try to extract the field structure from the communication data, using pattern matching, "Semi-automatic identification" is performed by means of protocol template similarity judgment, and if automatic identification fails, the system can prompt the operation and maintenance personnel to mark the basic information and communication structure of the device, and support subsequent manual entry of protocol field templates (such as register numbers, function codes, etc.) for unified management by the platform; for example, when the system determines that the connected gate control device can match the pre-set protocol type, the system will consider that the communication protocol of the device is in the protocol template library supported by the system, and the system will read the device data points pre-set for the gate control device. The device data points specifically include water level, gate opening and fault status. According to different device data points, the variable format of the gate control device is parsed. The variable format specifically includes encoding method, variable structure type and register address mapping. According to the pre-set protocol type of the gate control device, the system will analyze the variable format of the gate control device. The pre-set device functions dynamically execute the control strategies pre-recorded in the water conservancy terminal; the system can quickly determine whether the device is within the support range through automatic matching of the communication protocol of the gate control device. Once the protocol is matched successfully, the system can automatically read the preset data point information, eliminating the tedious steps of manually configuring register addresses, function codes, parsing formats, etc. This mechanism significantly reduces the time of manual intervention, lowers the threshold of deployment and debugging, and is conducive to unmanned deployment in distributed water conservancy sites. At the same time, the system supports parsing the variable formats of different device data points, including encoding methods (such as BCD, floating point, integer), variable structure types (such as single register, compound field) and register address mapping. Through these mechanisms, the system has compatibility with different The capabilities of gate control devices of different models from the same manufacturer no longer rely on a unified equipment source, improving the adaptability and expansion flexibility of the entire system. This is especially suitable for the real-world environment of water conservancy systems with inconsistent equipment updates and complex brands. Based on the analysis of equipment functions, the system can automatically execute control strategies preset in the water conservancy terminal according to real-time data such as water level and opening, such as automatic opening and closing of gates and linkage adjustment. This strategy call is an intelligent trigger based on data-driven and function recognition, without the need for manual setting of control logic paths, thereby improving real-time response and accuracy of strategy execution, and comprehensively enhancing the operational reliability and intelligent scheduling level of the water conservancy gate control system. The system then determines whether these control strategies can be synchronized with the gate control equipment to execute the corresponding steps.For example, when the system determines that these control strategies can be synchronized with the gate control device, the system will consider that the instruction set contained in the control strategy is consistent with the operations supported by the device communication protocol, and there is no protocol conflict at the communication layer. The system will establish a real-time data channel between the device and the control strategy within the system, start continuous matching monitoring of the device data points and the strategy logic conditions (such as real-time monitoring of whether the water level triggers the strategy threshold), and convert the control instructions in the strategy (such as setting the opening, executing the opening / closing of the gate) into corresponding protocol write commands, execute and issue them according to factors such as time priority and strategy weight, and write a "strategy-device binding success" log. Logs are generated to facilitate later tracking, start feedback mechanisms, and collect execution results in real time (such as gate opening changes and water level responses). For example, when the system determines that these control strategies cannot be synchronized with the gate control devices, the system will consider that the instruction set contained in the control strategy cannot be consistent with the operations supported by the device communication protocol. The system will obtain the verification content of these control strategies, which specifically includes logical conflicts, null value dependencies, and threshold overlaps. Based on the simulation data pre-collected by the water conservancy terminal, the execution behavior of the gate control device on the control strategy is dynamically verified. According to different execution behaviors, the influencing parameters of the gate control device on the upstream and downstream areas are identified, and the influencing parameters are specific. The system includes water level change rate, water level response amplitude, discharge flow, flow velocity and water body lag time. Based on these influencing parameters, the control strategy is constructed to link the upstream and downstream areas. When the control strategy instruction set is incompatible with the device protocol, the system will not simply report an error or terminate. Instead, it will analyze the verification content in the strategy (such as logical conflicts, null value dependencies, and threshold overlaps). It can accurately identify the key points of mismatch and avoid equipment failures or abnormal operations caused by the issuance of erroneous instructions, thereby enhancing the fault tolerance and compatibility of the system. At the same time, by calling the simulation data built into the water conservancy terminal to verify the strategy behavior, the system can dynamically simulate different The strategy's execution effect on the current equipment is analyzed, and its response behavior in actual operation is analyzed. This "virtual execution + verification and evaluation" mechanism helps optimize strategy logic without the need for real equipment trial and error, improving accuracy and feasibility before policy issuance. During the strategy simulation process, the system further identifies the impact parameters of equipment execution on upstream and downstream areas (such as water level response amplitude and water body lag time), and thus establishes a linkage relationship between upstream and downstream areas. This not only enhances the strategy's global scheduling capabilities, but also provides data support for intelligent decision-making under complex working conditions, helping to improve the overall coordination efficiency and operational stability of the water conservancy system.
[0063] It should be noted that the device data points preset in the gate control device are read, the variable format of the gate control device is parsed according to the device data points, and the control strategy pre-recorded in the water conservancy terminal is dynamically executed according to the device functions preset in the gate control device. The specific examples are as follows:
[0064] Assume that a remote-controlled sluice gate device is deployed in a smart water conservancy project. This device is provided by a certain manufacturer, supports Modbus-TCP protocol communication, and is connected to the water conservancy terminal through an edge gateway. The system has included multiple automatic control strategies for automatically adjusting the gate status based on the real-time water level and opening. The data points of the device are shown in Table 1 below.
[0065] Table 1:
[0066] Data point name Register address Data Type Byte order Description Upstream water level 40001~40002 FLOAT32 little-endian Current upstream water level (unit: m) Gate opening 40003 UINT16 Single byte Current gate opening (0~100%) Fault status 40004 BIT8 - 0=normal, 1=communication failure Control Commands 40010 UINT16 - Control instruction code (see Table 2 for details)
[0067] The control command description is shown in Table 2 below.
[0068] Table 2:
[0069] Instruction code Instruction meaning 0 Stop Control 1 Fully open 2 All Off 3 Set target opening
[0070] The target opening is written into register 40011. The control strategy logic included in the system is as follows:
[0071] If the upstream water level is >4.5m and the current opening is >80%, the target opening is set to 60% and a "set target opening" control instruction is issued;
[0072] 1. First, read the device data point. The system initiates a Modbus read command to the gate control device through the gateway:
[0073] Read Holding Registers:
[0074] -Address 40001~40002 (upstream water level);
[0075] -Address 40003 (opening);
[0076] -Address 40004 (fault status);
[0077] The reading results are as follows:
[0078] 40001-40002: Register value is 0xCDCC 0x4489 → interpreted as upstream water level = 4.8m (FLOAT32, little-endian format);
[0079] 40003: Register value 90 → opening = 90%;
[0080] 40004: Register value 0x00 → no fault;
[0081] 2. Parse the variable format. The system parses the field format according to the device model configuration:
[0082] The upstream water level is a 2-byte floating-point value and needs to be concatenated in little-endian format and converted to floating-point type;
[0083] The opening is a 16-bit unsigned integer and is used directly;
[0084] The fault status is 1 byte and is judged by bit flag;
[0085] The system concludes that: upstream water level = 4.8m, opening = 90%, and the equipment is normal;
[0086] 3. Match the control strategy logic to determine whether the conditions are met:
[0087] 4.8m>4.5m;
[0088] 90%>80%;
[0089] The strategy is triggered and enters the execution process;
[0090] 4. Generate control instructions. The operations specified by the control strategy are:
[0091] Set target opening = 60%;
[0092] Control command code = 3 (set target opening);
[0093] The system issues the following instructions:
[0094] Write the value 60 to register 40011 (representing 60% opening);
[0095] Write value 3 to register 40010 (trigger control instruction code);
[0096] The write operation will be completed through the Modbus write multiple registers command;
[0097] 5. Status feedback and verification. After a few seconds, the system automatically re-reads:
[0098] Current opening value (40003);
[0099] Upstream water level value (40001~40002);
[0100] If the reading feedback shows that the opening value changes to 60 and the water level trend decreases, the system determines that the strategy is successful. If the feedback does not change or the opening is still 90%, the system will attempt to retry, alarm, or prompt manual intervention;
[0101] In summary, the above examples fully reflect the following points: the accuracy of data point reading and variable format parsing is crucial to subsequent control, the dynamic matching of strategy logic and instruction execution mechanism improves automatic response capabilities, and the system feedback mechanism and closed-loop verification ensure effective, reliable and safe control.
[0102] It should be supplemented that the verification content of the control strategy is obtained, and based on the simulation data pre-recorded by the water conservancy terminal, the execution behavior of the gate control device on the control strategy is dynamically verified. According to the execution behavior, the influence parameters of the gate control device on the upstream and downstream areas are identified. Based on the influence parameters, the linkage relationship between the control strategy and the upstream and downstream areas is established. The specific examples are as follows:
[0103] Assume that a certain area of the smart water conservancy system is equipped with intelligent gate control devices GZ-102 (upstream sluice) and GZ-205 (downstream regulating gate). A control strategy is preset in the system:
[0104] Strategy C1: When the upstream water level monitored by GZ-102 exceeds 4.7 meters and the current gate opening exceeds 85%, the gate opening is adjusted to 60% to alleviate the rising upstream water level. However, when this strategy is synchronized to the GZ-102 device, some commands are incompatible and cannot be directly executed. The system then initiates the strategy verification and simulation validation process.
[0105] The first step is to obtain the verification content of the control strategy. The system extracts the verification elements from strategy C1, as shown in Table 3 below.
[0106] Table 3:
[0107] Check Item Check content result Logical conflict Are the conditions contradictory (e.g., requiring both >4.5m and <4.3m)? none Null value dependency Does the policy depend on variables that do not exist on the device? none Threshold overlap Are there any control objectives or time overlaps with other strategies? There is a slight overlap, and the system prompts "risk is acceptable"
[0108] After the verification is completed, the system will prompt that the policy structure is reasonable, but direct synchronization is not supported and the simulation verification phase must be entered;
[0109] The second step is to load simulation data for strategy verification. The system calls the historical simulation data (from the flood season in July 2023) pre-collected in the water conservancy terminal. The simulation data mainly includes:
[0110] The upstream water level is recorded every 10 minutes, ranging from 4.2m to 5.0m;
[0111] Gate opening historical change range: 70% to 100%;
[0112] Control response time: 30s~2min;
[0113] Downstream water level and flow rate response data;
[0114] The simulation execution playback (3 typical time points) is shown in Table 4 below.
[0115] Table 4:
[0116] Time point Upstream water level Current opening Whether to trigger the policy Simulated target opening Execution behavior T1=7:40 4.75m 90% yes 60% The gate simulation starts to slowly close T2=8:10 4.82m 95% yes 60% Gate simulates rapid closing T3=9:00 4.60m 88% no - Not triggered
[0117] The third step is to analyze the impact of the simulated execution behavior on the upstream and downstream. The system automatically generates an execution response curve based on the simulated data and extracts the following influencing parameters, as shown in Table 5.
[0118] Table 5:
[0119] Time point Gate adjustment time Upstream water level change rate Downstream water level response Leakage flow change Water stagnation T1 90s -0.12 m / h +0.08m +22 m³ / s 12 minutes T2 70s -0.18 m / h +0.14m +35 m³ / s 15 minutes
[0120] Note: When the gate opens from 90% to 60%, the upstream water level drops significantly, while the downstream water level tends to rise due to flow changes. There is a response lag of 10 to 15 minutes. Frequent closures will cause short-term flow shocks downstream, which may affect the operation of agricultural canals or other supporting equipment.
[0121] The fourth step is to build the upstream and downstream linkage relationship. The system combines the above response parameters and automatically builds the following linkage map:
[0122] Strategy C1 → Control device GZ-102 → Upstream water level drops, flood discharge increases → Downstream water level rises, with a lag of approximately 12-15 minutes → Recommend linkage device GZ-205 to perform a 5% slow opening adjustment → Avoid sudden flood peaks. The system will prompt that this strategy recommends synchronizing downstream control plans and incorporating them into the basin coordination framework.
[0123] To summarize, in the above examples, the strategy feasibility and actual effectiveness are guaranteed through the strategy verification + simulation verification mechanism, while the simulated behavior identifies the real impact of the control action on the environment, avoiding "blind control". By constructing a linkage map through influencing parameters, it provides decision support for upstream and downstream scheduling collaboration, significantly improving the automation level, response efficiency and system security of the entire smart water conservancy system.
[0124] Regarding control strategies, the relevant strategies are as follows:
[0125] 1. Strategies based on water level changes
[0126] Too high water level → close the gate;
[0127] Trigger condition: The upstream water level exceeds the preset safety threshold (e.g. 4.5 meters);
[0128] Control action: Gradually close the gate to prevent the water level from rising further;
[0129] Too low water level → open the gate;
[0130] Trigger condition: the downstream water level is lower than the lowest water level (e.g. 1.2 meters);
[0131] Control action: Open the gate to increase downstream water flow and ensure irrigation water;
[0132] Abnormal and rapid changes in water level → alarm and flow restriction;
[0133] Trigger condition: The water level change rate exceeds the set threshold (e.g., the rise and fall exceeds 0.3 meters per hour);
[0134] Control action: Automatically trigger an early warning and adjust the gate opening to mitigate water flow fluctuations;
[0135] 2. Strategies based on time and remote instructions,
[0136] Remote command → adjust the opening;
[0137] Trigger condition: receiving a specific opening adjustment command from the remote control center;
[0138] Control action: adjust the gate to the specified opening and feedback the execution status;
[0139] Timed opening / closing of gates;
[0140] Trigger conditions: preset time points or time periods (e.g., gates open at 6:00 a.m. and close at 9:00 p.m. every day);
[0141] Control action: Automatically execute corresponding gate actions on time to ensure irrigation or flood control scheduling;
[0142] 3. Strategies based on device status and failures;
[0143] Equipment failure → automatic switching to backup gate;
[0144] Triggering condition: The main gate control device detects a fault signal;
[0145] Control action: Immediately activate the backup gate to ensure uninterrupted water flow control;
[0146] Sensor abnormality → lock gate action and alarm notification;
[0147] Trigger conditions: abnormal key sensor data (such as a water level sensor with no data for a long time);
[0148] Control action: prohibit gate action to prevent misoperation, and send an alarm to notify operation and maintenance personnel;
[0149] 4. Multi-device linkage strategy,
[0150] The upstream gate opening is reduced → the downstream gate is adjusted appropriately;
[0151] Triggering conditions: The upstream gate opening decreases by more than 10%;
[0152] Control action: The downstream gate dynamically adjusts its opening according to the change of water flow to achieve flow balance;
[0153] Reservoir releases water → downstream gates open in conjunction;
[0154] Triggering conditions: The reservoir dispatching center starts the water release operation;
[0155] Control action: The downstream gates are opened synchronously to ensure smooth flood discharge and prevent blockage;
[0156] 5. Safety and environmental protection strategy, low flow mode at night,
[0157] Trigger conditions: a specific time period at night (e.g. 23:00 to 5:00);
[0158] Control action: Maintain the gate opening at the minimum to ensure ecological flow, reduce energy consumption and ecological impact;
[0159] Flood peak warning → close the gates slowly in advance;
[0160] Trigger conditions: Weather forecast or upstream sensor data indicates the onset of a flood peak;
[0161] Control action: Close some gates in advance to slow down the peak flow and protect downstream safety.
[0162] In this embodiment, before step S3 of reading the device data points preset by the gate control device and parsing the variable format of the gate control device according to the device data points, the method further includes:
[0163] S301: Based on the handshake request pre-initiated by the water conservancy terminal, obtain the device identification of the gate control device, wherein the device identification specifically includes the firmware version, communication capability and device address;
[0164] S302: Determine whether the device identification matches the manufacturer number preset in the water conservancy terminal;
[0165] S303: If yes, identify the device protocol type of the gate control device, dynamically load the pre-matched driver of the water conservancy terminal according to the device protocol type, and construct the driving parameters of the gate control device, wherein the device protocol type specifically includes the register range, communication baud rate and command structure, the driver specifically includes drive activation, communication test and feedback confirmation, and the drive parameters specifically include data reading instruction structure, register offset rules and data point mapping information.
[0166] In this embodiment, the system obtains the device identification of the gate control device based on the handshake request pre-initiated by the water conservancy terminal. The device identification specifically includes the firmware version, communication capability and device address. The system then determines whether the device identification of the gate control device matches the manufacturer number pre-set by the water conservancy terminal to execute the corresponding steps; for example, when the system determines that the device identification of the gate control device cannot match the manufacturer number pre-set by the water conservancy terminal, the system will believe that devices from different manufacturers often use private communication protocols, register mapping methods or data formats. If there is a mismatch, the system will not be able to correctly parse its data or issue instructions. The system will set the device to "unauthenticated" or "pending approval" status, suspend the automatic control strategy synchronization and data acquisition operations to avoid false triggering, and at the same time start the authentication mechanism of the water conservancy terminal, and try to read the device's digital signature, certificate or manufacturer-defined check field. If the device It supports online verification and can be linked to the central platform for manufacturer identity authentication. The system can also call the "universal driver compatibility mode" to try to parse the device according to known standard protocols (such as Modbus, IEC104). If the parsing is successful, it will be marked as "partially compatible" and some functions (such as read-only data, disabled control) will continue to run. For example, when the system determines that the device identification of the gate control device can match the manufacturer number pre-set in the water conservancy terminal, the system will consider that it can send instructions or parse data to the gate control device. The system will identify the device protocol type of the gate control device. The device protocol type specifically includes the register range, communication baud rate and command structure. According to different device protocol types, the pre-matched driver of the water conservancy terminal is dynamically loaded to build the driver parameters of the gate control device. The driver parameters specifically include data reading instruction structure, register offset rules and data point mapping information.Based on the recognition results, the system can automatically analyze the communication protocol type of the device (such as register range, baud rate and command structure), thereby eliminating the need to manually enter protocol parameters. Compared with the traditional method of relying on PLC or engineers to configure registers, this automatic recognition mechanism greatly improves the speed of equipment online and adapts to the actual needs of parallel deployment of multiple devices and multiple manufacturers. At the same time, based on the recognized device protocol type, it dynamically loads the preset driver template in the water conservancy terminal and constructs the drive parameters required to communicate with the device, including data reading instruction structure, register offset rules and data point mapping information. In this way, the system can accurately read key information such as water level, opening, fault status, etc. Parameters are mapped into standardized data structures to ensure the effective transmission and response of control commands, avoiding control failures or false triggers caused by register misalignment or command incompatibility. Through this identification, adaptation, and drive construction process, the system establishes a standardized and modular device access mechanism. This mechanism not only supports the automatic access and management of existing devices, but also provides a unified template for plug-and-play of subsequent new devices. The standardized data structure and control interface also provide a solid data foundation and execution channel for the system to implement more advanced functions (such as policy linkage, anomaly analysis, and water condition prediction), fundamentally improving the intelligence level and sustainable scalability of the entire water conservancy automation system.
[0167] It should be noted that the device protocol type of the gate control device is identified, and according to the device protocol type, the pre-matched driver of the water conservancy terminal is dynamically loaded to construct the driving parameters of the gate control device. The specific examples are as follows:
[0168] Assume the device information is,
[0169] Equipment name: XG-WATER-3000 intelligent water gate controller;
[0170] Manufacturer number: XG (already in the system water conservancy terminal whitelist);
[0171] Access method: RS485 serial port;
[0172] Protocol type: Modbus RTU;
[0173] Baud rate: 9600;
[0174] Data format: 8N1 (8-bit data, no parity, 1 stop bit);
[0175] Step 1: Identify the device protocol type. The system reads the basic information returned by the device through a handshake request initiated by the water conservancy terminal:
[0176] Firmware version: v3.2.5;
[0177] Device address: 0x07;
[0178] Communication protocol declaration: Modbus RTU, function codes support 0x03 (read) and 0x06 (write);
[0179] The system identifies the protocol type as Modbus RTU and the communication rate as 9600bps, and confirms that the device protocol already has a corresponding template in the terminal driver library;
[0180] Step 2: Dynamically load the driver. The system automatically loads the driver from the water conservancy terminal driver library based on the manufacturer number "XG" and the protocol type "Modbus RTU":
[0181] Driver template name: XG_Modbus_Template_V1.4;
[0182] The driver content includes:
[0183] Communication initialization sequence (including device activation steps);
[0184] Byte order rules (big endian format);
[0185] Control command structure definition;
[0186] The mapping relationship between standard variable names and registers;
[0187] The system does not require engineers to manually configure any register addresses or baud rates at this time, as all content is automatically imported by the driver template;
[0188] Step 3: Build the driver parameters. After loading the driver, the system automatically generates the following driver parameter structure, as shown in Table 6 below.
[0189] Table 6:
[0190] variable name Register address Data Type Explanation of meaning unit Water_Level_Down 0x0001 Uint16 Current downstream water level cm Gate_Open_Percent 0x0002 Uint8 Current gate opening percentage % Device_Health_Code 0x0003 Uint16 Current device health status code - Manual_Override 0x0005 Bool Whether manual control is activated -
[0191] And define the corresponding read / write operation instructions:
[0192] Read status command: 0x03 0x0001 0x0004 (read 4 registers continuously from address 0x0001);
[0193] Control gate opening command: write the target opening to 0x0002 (e.g., 0x06 0x0002 0x0050 means 80%), and write the confirmation bit to 0x0006 to trigger the action (value 0x0001).
[0194] The actual running example is:
[0195] Scenario: The remote control platform wants to increase the opening of the sluice gate from the current 30% to 80%:
[0196] The control commands defined in the system call driver parameters are packaged as follows:
[0197] Write target opening command: 0x06 0x0002 0x0050 (0x0050 = decimal 80);
[0198] Write confirmation command: 0x06 0x0006 0x0001;
[0199] The control platform sends the above two instructions, and the device responds and confirms;
[0200] The system then executes the status readback command: 0x03 0x0002 0x0001, reads the current gate opening value, confirms whether the change is complete, and finally logs the control success event and synchronizes the status data to the central control platform in real time;
[0201] In summary, in the above examples, there is no need to manually configure registers or function codes, which significantly reduces deployment costs, automatically adapts to device features, and avoids communication failures caused by protocol incompatibility. The standardized data structure makes the control strategy reusable across devices and easy to maintain. The drive and instructions are highly decoupled, which facilitates later OTA upgrades or multi-vendor expansion.
[0202] In this embodiment, the step S3 of dynamically executing the control strategy pre-recorded by the water conservancy terminal according to the preset device function of the gate control device further includes:
[0203] S31: Identifying a policy trigger condition of the device function based on a trigger type of the control policy, wherein the trigger type specifically includes instruction triggering, linkage triggering, and timing triggering;
[0204] S32: Determine whether the policy trigger condition matches the trigger type;
[0205] S33: If so, the current hydrological status data is collected through the water conservancy terminal as the preset decision input information, and the strategy scheduling thread of the gate control device is dynamically constructed according to the collection cycle of the decision input information, wherein the hydrological status data specifically includes the upstream water level, downstream water level, gate opening, equipment operating status, remote instruction value, rainfall and warning level.
[0206] In this embodiment, the system identifies the policy trigger conditions of the device function based on the trigger type of the control strategy, which specifically includes instruction trigger, linkage trigger and timing trigger. The system then determines whether the policy trigger conditions of the device function match the trigger type of the control strategy to execute the corresponding steps. For example, when the system determines that the policy trigger conditions of the device function cannot match the trigger type of the control strategy, the system will consider that the current gate control device cannot correctly respond or cooperate with the expected execution method of the control strategy, which may cause the control strategy to fail, be ignored, or trigger an error. The system will immediately terminate the automatic synchronization of the strategy with the device to prevent the device from being rejected, reporting an error or being stuck due to the issuance of an invalid strategy. At the same time, if the device supports "instruction triggering", the system The system can be converted to a control command issued by the platform periodically or manually, or downgraded to a "scheduled trigger". The control logic is simplified by setting a scheduled task, and the policy mismatch information is recorded, including the control policy ID and name, the device number and function type attempted to be bound, and the reason for failure (such as "lack of event monitoring capability" and "unsupported linkage response"). For example, when the system determines that the policy trigger condition of the device function can match the trigger type of the control policy, the system will consider that the current gate control device can correctly cooperate with the control policy. The system will collect the current hydrological status data as the pre-set decision input information through the water conservancy terminal. The hydrological status data specifically includes upstream water level, downstream water level, gate opening, equipment operating status, remote instructions, etc. Value, rainfall and warning level, according to the collection cycle of these decision input information, the policy scheduling thread of the gate control device is dynamically constructed; when the system determines that the policy trigger condition of the device function can match the trigger type of the control strategy, it means that the current control logic will not be interrupted due to the lack of protocol or insufficient capacity, and the device can accurately respond to policy requirements such as linkage triggering, timing triggering or instruction triggering, avoiding the problem of no response or execution failure of policy issuance from the source. This mechanism ensures that the control strategy can be "issued, identified and executed". At the same time, through the real-time collection of key hydrological status data (such as upstream and downstream water levels, rainfall, opening, etc.) through the water conservancy terminal, the system obtains complete and continuous decision-making basis. These data can be used as input to the control strategy, not only to trigger A single action can form a logical judgment chain to achieve "predictive scheduling" and "situation response", such as "warning level + sudden increase in rainfall → early discharge" or "high water level downstream + gate opened → stop further opening", which improves the accuracy and intelligence of system response. It also dynamically allocates computing resources according to the data collection cycle of different decision inputs (such as rainfall every 1 minute, remote instructions every 5 seconds, and equipment status every 10 seconds), builds a lightweight policy scheduling thread, and realizes asynchronous parallel scheduling of various control strategies. This thread-level policy management method not only improves system processing efficiency, but also supports coordinated control and distributed management of large-scale multi-gate equipment, providing basic support for the scalability, low latency and high availability of smart water conservancy systems.
[0207] It should be noted that, through the water conservancy terminal, the current hydrological status data is collected as the preset decision input information, and the policy scheduling thread of the gate control device is dynamically constructed according to the collection cycle of the decision input information. The specific example is as follows:
[0208] Assume that an irrigation district has deployed multiple automated sluice gates. Each sluice gate is equipped with RTUs, upstream and downstream water level gauges, rain sensors, cameras, and other equipment, all connected to a water conservancy terminal. The water conservancy terminal is responsible for receiving data, executing control strategies, and threading scheduling tasks.
[0209] Example 1:
[0210] Control strategy name: high water level warning and early flood discharge strategy;
[0211] Strategy type: linkage trigger;
[0212] Control rules,
[0213] If the upstream water level is ≥220cm;
[0214] And the current rainfall is ≥10mm (accumulated in the last hour);
[0215] If the current gate opening is ≤ 20%, adjust the gate opening to 50% to slow down the rising trend of the water level.
[0216] Decision input data points,
[0217] Upstream water level (Up_Level): collected every 5 minutes;
[0218] Rainfall (Rain_1h): Accumulated data collected every minute and refreshed in real time;
[0219] Gate opening (Gate_Open_Percent): collected every 2 minutes;
[0220] System behavior,
[0221] The system identifies the policy trigger as "linkage trigger";
[0222] System build strategy thread Thread_LeakageStrategy_HighLevelRainfall;
[0223] This thread includes: monitoring changes in rainfall data and updating status; determining whether the water level, rainfall, and gate opening meet the trigger conditions every 5 minutes; if so, automatically issuing Modbus commands to control the gate to adjust the gate opening; upon success, recording logs, triggering cameras to take photos, and reporting to the dispatch platform;
[0224] Example 2:
[0225] Control strategy name: remote manual command to close the gate;
[0226] Strategy type: remote command trigger;
[0227] Control rules,
[0228] If the central control platform sends an "emergency closing" command, the opening will be immediately adjusted to 0%;
[0229] Decision input data points,
[0230] Remote command value (Remote_Command): event-triggered, not dependent on periodic collection;
[0231] System behavior,
[0232] The system identifies it as a "remote trigger" strategy;
[0233] Construct Thread_RemoteCommandListener; this thread is a resident listening thread that listens to the MQTT command channel or platform API interface; once an "emergency close" command is received:
[0234] Parsing command parameters,
[0235] Construct a closing command (write the opening as 0%);
[0236] Send to the corresponding gate control device;
[0237] Update the execution status and return the result;
[0238] Example 3:
[0239] Control strategy name: Timed daily drainage strategy;
[0240] Strategy type: timed trigger;
[0241] Control rules,
[0242] At 6:00 a.m. and 18:00 p.m. every day, the gate will automatically open to 40%;
[0243] The drainage time will automatically shut down after 45 minutes;
[0244] Decision input data points: no real-time sensor dependency, based only on the system clock;
[0245] System behavior,
[0246] The system identifies it as a "timing trigger" strategy;
[0247] Construct a scheduled thread named Thread_DailyDrainSchedule;
[0248] Inside the thread: define 06:00 and 18:00 every day as trigger points; after the time is reached, send the "set opening to 40%" command; start the timer for 45 minutes; when the time is up, send the "set opening to 0%" command (close the gate); synchronize the device feedback status and push the control log to the management platform, as shown in Table 7 below.
[0249] Table 7:
[0250] project Content Examples Control strategy name High water level pre-discharge, remote gate closing, timed drainage Trigger Type Linkage, instructions, timing Required input data points Water level, rainfall, remote commands, system time Enter data collection cycle Every 1 minute / 2 minutes / 5 minutes / event monitoring Scheduling thread name Thread_xxx (each strategy generates an independent thread) Execution content Determine whether the trigger conditions are met → Issue control instructions → Record feedback
[0251] To sum up, in the above examples, the system saves resources by strongly coupling the strategy with the data collection rhythm. Each strategy is executed only within the required cycle, does not occupy redundant threads, improves the overall performance of the system, and achieves timely and intelligent strategy response. It achieves millisecond-level control for sudden increases in rainfall or remote emergency commands, meets flood season scheduling requirements, supports parallel strategy threads, and adapts to large-scale equipment deployment. Even if there are dozens of gate control devices and hundreds of strategies, the system can automatically schedule each thread according to the data cycle without manual adjustment.
[0252] In this embodiment, the step S5 of obtaining the verification content of the control strategy further includes:
[0253] S51: Based on a preset internal structure of the control policy, detecting the integrity of the policy fields of the control policy, wherein the internal structure of the policy specifically includes a condition set, an action set, and a data point reference;
[0254] S52: Determine whether the integrity of the policy field is missing;
[0255] S53: If so, obtain the dependency relationship preset by the control strategy, identify the linkage strategy preset by the control strategy based on the dependency relationship, and check the invalid commands of the control strategy from the gate control device based on the trigger status of the linkage strategy, wherein the invalid commands specifically include overwriting strategies or conflict strategies.
[0256] In this embodiment, the system detects the integrity of the policy fields of these control policies based on the pre-set internal structure of the control policy, which specifically includes a condition set, an action set, and a data point reference. The system then determines whether the integrity of the policy fields is missing to execute the corresponding steps. For example, when the system determines that the integrity of the policy fields of the control policy is not missing, the system will consider that the current control policy has complete and legal execution conditions and operation definitions, and can be safely loaded and issued to the corresponding gate control device for execution. The system will mark the policy as "executable", load it into the policy scheduling thread of the corresponding device, wait for the scheduling cycle or event trigger, and establish a state context for the policy. Including whether it is currently in the activation period, whether the current conditions are met, the last execution time and execution results, and according to the trigger type of the strategy (such as timing, linkage, instruction), start the listening thread (for remote instruction triggering), start the timed inspection task (for timing or periodic judgment), and register linkage sensor events (such as water level, rainfall change triggering); for example, when the system determines that the integrity of the policy field of the control strategy is missing, the system will think that the current control strategy does not have complete and legal execution conditions. The system will obtain the pre-set dependencies of these control strategies, and identify the pre-set linkage strategies of the control strategies according to different dependencies. According to the trigger status of these linkage strategies, the system will start from the gate control. The device checks for invalid commands of the control strategy, which specifically include overwriting strategies or conflicting strategies. When the system detects that the field integrity of the control strategy is missing (such as missing trigger conditions, reference to invalid data points, no configured action instructions, etc.), the system will not execute it blindly, but will actively mark the strategy as "unexecutable" and terminate its automatic scheduling, thus avoiding the risks of equipment misoperation, sluice operation disorder or water resource waste caused by the issuance of incorrect strategies. At the same time, the preset dependency relationship in the control strategy is obtained (such as the trigger status or execution result of strategy A depending on strategy B), and the linkage structure between the strategy and other strategies can be located. When a field is missing, the system determines whether it is Whether there is an overwriting strategy (higher priority) or conflicting strategy (with mutually exclusive execution results) that has already taken effect, further clarify whether the current strategy has been "structurally abandoned" due to logical conflicts. This mechanism effectively prevents strategies from repeatedly controlling the same device or causing state disorders due to conflicting conditions. After identifying the linkage strategy, the system will enter the gate control device instruction cache or the current execution channel to check whether there are invalid control commands derived from the current invalid strategy, such as instructions that are not triggered but issued, repeated commands that conflict with other strategies, etc. The recovery, revocation or alarm prompts of these "invalid commands" help to ensure the clarity and uniqueness of the device control instruction chain, and improve the data closed loop and execution transparency of the strategy scheduling system.
[0257] It should be noted that the dependency relationship preset by the control strategy is obtained, the linkage strategy preset by the control strategy is identified according to the dependency relationship, and invalid commands of the control strategy are checked from the gate control device according to the triggering state of the linkage strategy. The specific examples are as follows:
[0258] For example, assume that upstream flood discharge and downstream water replenishment of a mountain reservoir need to be controlled in a coordinated manner;
[0259] 1. System Background:
[0260] Equipment name: Gate No. 3 (main control object);
[0261] Gate control equipment type: RTU control unit + water level sensor + camera monitoring;
[0262] Reservoir structure:
[0263] The upstream area is the main reservoir area, which is prone to water accumulation;
[0264] The downstream is an agricultural irrigation canal, which needs to supply water on demand;
[0265] Goal: To prioritize flood discharge when flooding occurs and automatically replenish water downstream when there is no danger;
[0266] Second, strategy definition and dependency structure:
[0267] Strategy A: Flood Control and Discharge Strategy (No. ST-A01);
[0268] Trigger conditions: upstream water level ≥ 250 cm and heavy rain;
[0269] Action: Close gate No. 3 to 20% opening (control discharge);
[0270] Priority: High
[0271] Current status: Executed;
[0272] Strategy B: Conventional agricultural irrigation water replenishment strategy (No.: ST-B05);
[0273] Trigger conditions: downstream water level ≤ 140 cm and air temperature ≥ 30°C;
[0274] Action: Open gate No. 3 to 60% opening;
[0275] Priority: Medium;
[0276] Dependency: The "Policy A is not executed" state must be ensured (logical mutual exclusion);
[0277] Current field problem: Undefined temperature data point reference → field missing;
[0278] 3. Example of system processing:
[0279] Policy B fails to load (field missing). The system finds that the temperature field referenced by Policy B is not configured (for example, the temperature sensor is not bound). The field integrity check fails, and the system marks Policy B as "Incomplete Configuration."
[0280] Obtain the dependency relationship of Strategy B. The system identifies the preset dependency structure of Strategy B: its execution condition is "Strategy A is not executed", that is, Strategy B cannot be valid at the same time as Strategy A;
[0281] Identifying the linkage strategy status, the system checks the current status of Strategy A and finds that Strategy A was successfully triggered at 9:45 am, controlling Gate 3 to 20% opening.
[0282] Check the device command record → find an invalid command. The system reads the control command buffer of Gate 3 through the RTU and finds that Policy B was manually triggered once by the administrator at 10:00 today, generating the following control command:
[0283] Command ID:CMD-B05-1000
[0284] Content: Set the opening to 60%
[0285] Source strategy: ST-B05 Issue time: 10:00
[0286] Current status: pending (due to scheduling delay or dependency not triggered);
[0287] The system identifies that the command violates the dependency logic (Policy A has been executed) and the source policy field is missing. Therefore, it is judged as an "invalid command."
[0288] The system's response is to mark command CMD-B05-1000 as "invalid command" and notify the operation and maintenance system to record the exception log:
[0289] [Exception] Command CMD-B05-1000 was detected to violate the policy dependency structure and has been revoked;
[0290] The policy ST-B05 field is incomplete and the temperature data point binding is missing;
[0291] Remove the command from the execution queue;
[0292] If the automatic error correction mechanism is configured, the operation and maintenance personnel can also be prompted to bind "temperature sensor T-SZ1" to strategy B;
[0293] To summarize, in the above examples, the system can avoid improper equipment operation due to missing policy fields or dependency errors (such as opening the gate in reverse during flood discharge). At the same time, the entire process of command recording, dependency relationships, and conflict identification is traceable, and the priority logic and execution boundaries between multiple policies are clear and well-defined, which can automatically clear, remind, record and analyze invalid control instructions.
[0294] In this embodiment, the step S2 of determining whether the gate control device matches the preset protocol type further includes:
[0295] S21: collecting corresponding protocol original data frames from the gate control device, wherein the protocol original data frames specifically include message start and end characters, message length bytes, function code, check bit type, response time interval, and communication baud rate;
[0296] S22: Determine whether the protocol original data frame matches a protocol feature field, wherein the protocol feature field specifically includes a protocol frame header, an address field, and a data length;
[0297] S23: If so, extract the corresponding byte order from the protocol original data frame, divide the data type of the protocol original data frame based on the byte order, and parse the decoded data of the protocol original data frame according to the data type, wherein the data type specifically includes a 16-bit integer, a 32-bit floating point and a decimal offset, and the decoded data specifically includes an opening value, a water level value and a status word.
[0298] In this embodiment, the system collects the corresponding protocol original data frames from the gate control device. The protocol original data frames specifically include message start and end characters, message length bytes, function codes, check bit types, response time intervals, and communication baud rates. The system then determines whether these protocol original data frames match the protocol feature fields. The protocol feature fields specifically include the protocol frame header, address field, and data length, so as to execute the corresponding steps. For example, when the system determines that these protocol original data frames cannot match the protocol feature fields, the system will consider that the communication data structure of the current gate control device does not conform to the standard protocol template supported by the system, or that the device has communication anomalies, configuration errors, or unknown protocol types. The system cannot correctly parse its data content and instruction behavior. The system will cache the failed data frames, including timestamps, message hexadecimal contents, and source device addresses, for subsequent manual protocol inversion or manufacturer protocol comparison, and try to compare with the built-in "protocol fallback library", such as the early For Modbus / RTU variants and old versions of the manufacturer's protocol, if some fields can be preliminarily matched, such as the frame header is the same but the data segment is inconsistent, the system can enter the "semi-automatic protocol calibration mode" and notify the operation and maintenance personnel that the device has an unknown or unadapted protocol. A data frame reference template is provided for manufacturer feedback or new template entry. The system supports marking the current device as a "pending adaptation device", skipping automatic parsing but allowing manual entry of key data points. For example, when the system determines that these protocol raw data frames can match the protocol feature fields, the system will consider that the communication data structure of the current gate control device conforms to the standard protocol template supported by the system. The system will extract the corresponding byte sequence from the protocol raw data frame and, based on this byte sequence, divide the data type of the protocol raw data frame into 16-bit integer, 32-bit floating point and decimal offset. According to different data types, the system will parse the decoded data of the protocol raw data frame. The decoded data specifically includes the opening value, water level value and status word.The system can accurately identify and match the key feature fields (such as frame header, address field, data length, etc.) in the original data frame of the protocol of the gate control device, which means that the communication protocol used by the device is consistent with the standard template library supported by the system. Based on this matching process, the system can automatically identify the data structure of the device and complete the device access without manually configuring the communication template. This function effectively breaks the barriers of differences in protocol formats between devices from different manufacturers, greatly improving the adaptation speed and access efficiency of the system when facing multi-brand and multi-model devices. At the same time, by extracting byte order and parsing data types (such as 16-bit integer, 32-bit floating point, decimal offset, etc.) from the original data frame of the protocol, the system can accurately restore the data content transmitted by the device, such as accurately decoding the opening Key data points such as degree value, water level value, and status word facilitate refined monitoring during water conservancy scheduling, avoid data distortion caused by manual configuration deviations or protocol differences, and ensure the consistency and credibility of hydrological data in various analysis and control scenarios. Successfully acquired and decoded key data points directly contribute to the triggering and decision-making process of control strategies. For example, the system can determine whether to trigger gate opening and closing operations based on real-time opening value or water level value, or activate safety mechanisms based on the alarm bit in the status word. This automatically driven control logic based on decoded data significantly enhances the system's intelligent response capabilities, enabling the gate control system to quickly and autonomously make precise controls in emergency situations, thereby improving the reliability and operational efficiency of the overall water conservancy automation system.
[0299] In this embodiment, the step S4 of determining whether the control strategy can be synchronized with the gate control device further includes:
[0300] S41: Based on the preset real-time status information of the gate control device, obtaining the execution type of the control strategy, wherein the real-time status information specifically includes the communication status, the current working mode, the gate status and the control authority, and the execution type specifically includes the opening adjustment type, the state control type and the mode switching type;
[0301] S42: Determine whether the real-time status information supports the execution type;
[0302] S43: If so, identify the preset execution capability of the gate control device, collect the upload frequency of the gate control device based on the execution capability, construct the feedback cycle of the water conservancy terminal to the control strategy based on the upload frequency, compare the feedback cycle with the preset strategy tolerance time, and generate strategy feedback information of the gate control device, wherein the execution capability specifically includes an execution confirmation frame, an execution result data point, and a failure reason code.
[0303] In this embodiment, the system obtains the execution type of the control strategy based on the real-time status information preset by the gate control device, which specifically includes the communication status, current working mode, gate status, and control authority. The execution types specifically include opening adjustment type, state control type, and mode switching type. The system then determines whether the real-time status information supports these execution types to execute the corresponding steps. For example, when the system determines that the real-time status information preset by the gate control device cannot support the execution type of the control strategy, the system will consider that the current device is in an operating state that does not have the execution conditions or authority and cannot be adjusted or responded according to the target logic of the preset control strategy. The system will record the control strategy that cannot be executed and specify the failure reason (such as "device is in manual mode" or "communication is disconnected") for background analysis. At the same time, if there is redundant equipment or alternative paths (such as backup gates), the system can automatically attempt to switch the control target. If the strategy allows delayed execution, the system can enter the "pending execution queue" and wait for the status to recover, and prompt the user to perform necessary intervention, such as prompting the operation and maintenance personnel. If the administrator switches the device to "remote mode" or restores the communication connection, and if the authority ownership is inconsistent, the administrator can request the superior platform to release control permissions. For example, when the system determines that the pre-set real-time status information of the gate control device can support the execution type of the control strategy, the system will assume that the current device is in normal operation. The system will identify the pre-set execution capabilities of the gate control device, which specifically include execution confirmation frames, execution result data points, and failure reason codes. Based on these execution capabilities, the system collects the upload frequency of the gate control device and establishes the return cycle of the control strategy for the water conservancy terminal based on different upload frequencies. The return cycle is compared with the pre-set strategy tolerance time to generate strategy feedback information for the gate control device. By identifying the device's execution capabilities (such as execution confirmation frames, result data points, and failure reason codes), the system can clearly track whether the control command has been received and correctly executed by the device, avoiding the black box operation problem of "issuing a command but the device does not respond". For example, the device can actively upload an "execution confirmation frame" to confirm that the action has been triggered, and upload a "result data point" to verify whether the gate has opened to the target opening.Uploading a "failure reason code" allows the root cause of execution failure to be traced. This mechanism effectively improves the reliability and auditability of the control link. A feedback cycle is established based on the device upload frequency and then compared with the control policy's "tolerance period." This intelligently determines whether a device has "timed out without feedback" and whether a retry or alarm is required. For example, if the policy tolerance period is 30 seconds and the device feedback cycle is 60 seconds, the system can provide early warning of the risk of delayed policy feedback, preventing operational loss or misjudgment of device failure. This mechanism dynamically adapts the feedback rhythm of different devices and operating conditions, enhancing the system's fault tolerance and energy conservation capabilities for the policy execution rhythm. Ultimately, based on the policy execution results, feedback cycle, and device capabilities, "policy feedback information" is generated, such as "execution successful," "execution failure - reason code 04," and "execution timed out - no feedback." This feedback information can be uploaded to the water conservancy central control platform or regional water management system as basic data for intelligent scheduling, task evaluation, or operational statistics. This system not only improves automation but also enhances data collaboration and management transparency with upper-level platforms, providing comprehensive support for smart water conservancy management.
[0304] It should be noted that the preset execution capability of the gate control device is identified, and based on the execution capability, the upload frequency of the gate control device is collected. Based on the upload frequency, a feedback cycle of the water conservancy terminal for the control strategy is established, and the feedback cycle is compared with the preset strategy tolerance time to generate strategy feedback information of the gate control device. A specific example is as follows:
[0305] Assume that a water conservancy terminal system in a smart irrigation district controls a GZ-120 automatic gate control device installed at the middle gate of the main irrigation canal. Its task is to adjust the gate opening and regulate the irrigation flow based on a remotely issued control strategy.
[0306] System strategy goal: adjust the gate opening from the current 20% to the target opening of 50%;
[0307] Strategy number: ST-KD-120;
[0308] Policy tolerance time: 60 seconds (the maximum time the system waits for the device to respond successfully);
[0309] Device upload frequency: The device reports status data every 15 seconds;
[0310] First, the device capability identification (execution capability) is performed. Before executing the control strategy, the system first identifies the "execution capability" of the device, as shown in Table 8 below.
[0311] Table 8:
[0312] Ability Type illustrate Execute confirmation frame After receiving the control command, the device immediately responds with a "Control command received" message. Execution result data points Contains "current opening value" and "execution status flag" (0: not completed, 1: completed) Failure reason code If it fails, a 2-digit hexadecimal code is provided, such as 0x01 for "overcurrent protection"
[0313] The system then determines that the device supports the above three execution capabilities and meets the execution conditions;
[0314] Then the system execution and collection process is carried out.
[0315] T0 time point: policy issuance;
[0316] Control command: Set the opening to 50%;
[0317] The system record command has been issued.
[0318] T+15s: first report;
[0319] Opening value: still 20%;
[0320] Status flag: executing (flag bit = 0);
[0321] System judgment: the control action has started but not completed;
[0322] T+30s: Second report;
[0323] Opening value: has reached 42%;
[0324] Status flag: executing;
[0325] System judgment: Continue to wait for feedback, still within the policy tolerance time;
[0326] T+45s: 3rd report;
[0327] Opening value: 49.9%;
[0328] Status flag: execution completed (flag bit = 1);
[0329] System judgment: the task is completed, and the deviation is within the allowable range (±0.5%);
[0330] The strategy feedback information generated by the system is then
[0331] {
[0332] "Strategy Number": "ST-KD-120",
[0333] "Target opening": "50%",
[0334] "Actual opening":"49.9%",
[0335] "Execution Status": "Success",
[0336] "Return cycle":"3",
[0337] "Strategy tolerance time": "60 seconds",
[0338] "Total response time": "45 seconds",
[0339] "Deviation range": "±0.1%",
[0340] "Device execution frame status": "Received successfully",
[0341] "Status Code": "0x00 (Normal)"}
[0342] Based on the device's upload frequency (once every 15 seconds), the system sets a maximum monitoring period of four feedbacks within 60 seconds. If this strategy is successfully completed within the third feedback, with accurate execution and timely response, the system will determine that the strategy is closed-loop successful.
[0343] Finally, the comparison of the processing when the strategy is not completed (supplemented by the failure case),
[0344] If the device has not completed the action or has not sent back a response after T+60s:
[0345] The system feedback is as follows:
[0346] {
[0347] "Strategy Number": "ST-KD-120",
[0348] "Execution Status": "Failed",
[0349] "Failure reason": "Exceeded tolerance time and no feedback",
[0350] "Suggested Action":"Check the device communication status or resend the command"}
[0351] To summarize, in the above example, since the upload frequency determines the maximum window for waiting for a policy response, a reasonable comparison of the tolerance time ensures efficient feedback. At the same time, a closed-loop control logic is formed by executing frames, status flags, and failure codes, which facilitates subsequent operation and maintenance, scheduling decisions, or serves as a data audit record.
[0352] In this embodiment, based on the gateway edge computing node preset in the water conservancy terminal, the newly added logical port is monitored, and the step S1 of identifying the connected gate control device through the logical port further includes:
[0353] S11: Detecting abnormal data injection into the logical port, wherein the abnormal data specifically includes high-frequency non-protocol data, illegal frames, and abnormal baud rate changes;
[0354] S12: Determine whether the abnormal data injection exceeds a preset injection threshold;
[0355] S13: If so, dynamically disconnect the water conservancy terminal from the gate control device, collect the data feature package of the gate control device, and detect the injection behavior of the gate control device based on the data feature package, wherein the data feature package specifically includes the device identification code, encryption signature, manufacturer code and protocol version information, and the injection behavior specifically includes high-frequency injection of non-protocol data, repeated frame flooding and fake communication attempts.
[0356] In this embodiment, the system detects abnormal data injection into the logical port, and the abnormal data specifically includes high-frequency non-protocol data, illegal frames, and abnormal baud rate changes, and then determines whether the injection of these abnormal data exceeds a preset injection threshold to execute corresponding steps; for example, when the system determines that the abnormal data injection into the logical port does not exceed the preset injection threshold, the system will consider that the current data anomaly is still within the safe range that the system can tolerate, and the operation of the equipment has not been substantially threatened or interfered with. There is no need to immediately perform isolation or interruption operations, but the system should take steady-state monitoring and early warning protection measures to prevent risk escalation. The system will timestamp the currently detected abnormal data type (such as illegal frames, strange baud rate changes) and write The abnormal log cache of the input logical port is used for post-audit and trend analysis. At the same time, the receiving frame structure and frequency density of the port are enhanced to detect whether there is a trend of change such as an increase in the duration of the abnormality or a sudden increase in frequency in a short period of time, and temporarily increase the tolerance recognition threshold to avoid misjudging it as a communication interruption, or switch to the backup port for partial data reception and transmission verification without affecting the main task scheduling; for example, when the system determines that the abnormal input injection of the logical port exceeds the pre-set injection threshold, the system will consider that the current data abnormality is within the abnormal range, and the system will dynamically disconnect the water conservancy terminal from the gate control device and collect the data feature package of the gate control device. The data feature package specifically includes the device identification code, encryption signature, and manufacturer code. and protocol version information, and based on these data feature packets, detect the injection behavior of the gate control device, which specifically includes high-frequency injection of non-protocol data, repeated frame flooding and fake communication attempts; by dynamically disconnecting the communication connection between the water conservancy terminal and the gate control device, the system can timely block the potential attack chain before the problem spreads, prevent illegal instructions from interfering with the gate control logic, and effectively ensure the operational stability and data integrity of key businesses such as water level scheduling and flood discharge instructions. At the same time, after disconnecting the communication, the system further collects the data feature packets of the abnormal device, including key fields such as device identification code, encryption signature, manufacturer code, protocol version, etc., and by comparing the registered device files of the water conservancy terminal platform, the system can quickly determine whether the device is a legally registered device. Whether there is any feature tampering or impersonation, thereby achieving device-level abnormality tracing, this step provides strong data support for subsequent abnormal node isolation, access authorization review and risk accountability, and based on the analysis results of the feature package, the system can sub-classify and identify abnormal behaviors, such as "high-frequency injection of non-protocol data", "flooding of repeated frames", "fake communication attempts" and other typical security threats. Different types of injection behaviors will trigger different response strategies, such as triggering port isolation, dynamic reallocation of logical ports, increasing verification strength or calling redundant link equipment to take over operations. This multi-level response mechanism not only improves the system's adaptability and anti-interference capabilities in complex environments, but also helps to achieve safe and controllable access and stable operation of large-scale IoT devices in smart water conservancy systems.
[0357] Reference Attachment Figure 2 , is a smart gate control access system based on drive identification and data mapping in one embodiment of the present invention, comprising:
[0358] The monitoring module 10 is used to monitor the newly added logical ports based on the gateway edge computing node preset by the water conservancy terminal, and identify the accessed gate control device through the logical port;
[0359] A determination module 20 is configured to determine whether the gate control device matches a preset protocol type, wherein the protocol type specifically includes Modbus, IEC104, and a proprietary protocol;
[0360] an execution module 30 configured to, if yes, read device data points preset in the gate control device, parse the variable format of the gate control device according to the device data points, and dynamically execute the control strategy pre-recorded in the water conservancy terminal according to the device functions preset in the gate control device, wherein the device data points specifically include water level, gate opening, and fault status, and the variable format specifically includes encoding mode, variable structure type, and register address mapping;
[0361] A second judgment module 40 is used to judge whether the control strategy can be synchronized with the gate control device;
[0362] The second execution module 50 is used to obtain the verification content of the control strategy if it cannot be done, and dynamically verify the execution behavior of the gate control device on the control strategy based on the simulation data pre-recorded in the water conservancy terminal, identify the influencing parameters of the gate control device on the upstream and downstream areas according to the execution behavior, and construct the linkage relationship of the control strategy on the upstream and downstream areas based on the influencing parameters, wherein the verification content specifically includes logical conflicts, null value dependencies and threshold overlaps, and the influencing parameters specifically include water level change rate, water level response amplitude, discharge flow, flow velocity and water body lag time.
[0363] In this embodiment, the monitoring module 10 monitors the newly added logical ports based on the gateway edge computing node pre-installed in the water conservancy terminal, identifies the accessed gate control devices through these logical ports, and then the judgment module 20 judges whether these gate control devices match the pre-set protocol type to execute the corresponding steps; for example, when the system determines that the accessed gate control device cannot match the pre-set protocol type, the system will consider that the communication protocol used by the device is not in the protocol template library supported by the system, and the system will record the device access failure log, including the device's port information, initial message sample, and timestamp, and mark the device as "to be identified" to avoid misjudgment as illegal access. At the same time, the fuzzy protocol parser is started to try to extract the protocol from the communication data. Field structure, using pattern matching, protocol template similarity judgment and other methods for "semi-automatic identification", and if automatic identification fails, the system can prompt the operation and maintenance personnel to mark the basic information and communication structure of the device, and support subsequent manual entry of protocol field templates (such as register numbers, function codes, etc.) for unified management by the platform; for example, when the system determines that the connected gate control device can match the pre-set protocol type, the execution module 30 will think that the communication protocol of the device is in the protocol template library supported by the system, and the system will read the device data points pre-set for the gate control device. The device data points specifically include water level, gate opening and fault status. According to different device data points, the variable format of the gate control device is parsed. The variable format specifically includes encoding method, variable The system automatically matches the communication protocol of the gate control device to quickly determine whether the device is within the support range. Once the protocol is matched successfully, the system can automatically read the preset data point information, eliminating the need for manual configuration of register addresses, function codes, parsing formats and other tedious steps. This mechanism significantly reduces manual intervention time, lowers the threshold for deployment and debugging, and is conducive to unmanned deployment in distributed water conservancy sites. At the same time, the system supports parsing the variable formats of different device data points, including encoding methods (such as BCD, floating point, integer), variable structure types (such as single register, compound register, etc.), and other tedious steps. Through these mechanisms, the system is compatible with gate control devices of different manufacturers and models, no longer relying on a unified device source, improving the adaptability and expansion flexibility of the entire system. It is particularly suitable for the real-world environment of water conservancy systems where equipment updates vary and brands are complex. In addition, based on the analysis of device functions, the system can automatically execute control strategies preset in the water conservancy terminal based on real-time data such as water level and opening, such as automatic gate opening and closing, and linkage regulation. This strategy call is an intelligent trigger based on data-driven and function recognition, without the need for manual setting of control logic paths, thereby improving real-time response and accuracy of strategy execution, and comprehensively enhancing the operational reliability and dispatching intelligence level of the water conservancy gate control system.Then the second judgment module 40 judges whether these control strategies can be synchronized with the gate control device to execute the corresponding steps; for example, when the system determines that these control strategies can be synchronized with the gate control device, the system will consider that the instruction set contained in the control strategy is consistent with the operation supported by the device communication protocol, and there is no protocol conflict in the communication layer. The system will establish a real-time data channel between the device and the control strategy within the system, start continuous matching monitoring of the device data points and the strategy logic conditions (such as real-time monitoring of whether the water level triggers the strategy threshold), and at the same time convert the control instructions in the strategy (such as setting the opening, executing the opening / closing gate) into the corresponding protocol write command, according to the time priority, strategy The execution is issued based on factors such as weight, and the "strategy-device binding success" log is written to facilitate later tracking, start the feedback mechanism, and collect execution results in real time (such as gate opening changes, water level response); for example, when the system determines that these control strategies cannot be synchronized with the gate control device, the second execution module 50 will think that the instruction set contained in the control strategy cannot be consistent with the operations supported by the device communication protocol. The system will obtain the verification content of these control strategies, which specifically includes logical conflicts, null value dependencies and threshold overlaps. Based on the simulation data pre-collected by the water conservancy terminal, the gate control device's execution behavior of the control strategy is dynamically verified, and according to different execution behaviors, the system can identify The influencing parameters of the gate control equipment on the upstream and downstream areas include the water level change rate, water level response amplitude, discharge flow, flow velocity and water body lag time. Based on these influencing parameters, the control strategy is constructed to link the upstream and downstream areas. When the control strategy instruction set is incompatible with the device protocol, the system will not simply report an error or terminate. Instead, it will analyze the verification content in the strategy (such as logical conflicts, null value dependencies, and threshold overlaps) to accurately identify the key points of mismatch and avoid equipment failures or abnormal operations caused by the issuance of erroneous instructions, thereby enhancing the fault tolerance and compatibility of the system. At the same time, the strategy behavior is verified by calling the simulation data built into the water conservancy terminal. The system can dynamically simulate the execution effects of different strategies on current equipment and analyze their response behavior in actual operation. This "virtual execution + verification and evaluation" mechanism helps optimize strategy logic without the need for trial and error on actual equipment, improving accuracy and feasibility before policy issuance. During the strategy simulation process, the system further identifies the impact parameters of device execution on upstream and downstream areas (such as water level response amplitude and water body lag time), and thus establishes linkages between upstream and downstream areas. This not only enhances the strategy's global scheduling capabilities, but also provides data support for intelligent decision-making under complex working conditions, helping to improve the overall coordinated efficiency and operational stability of the water conservancy system.
[0364] In this embodiment, it also includes:
[0365] an acquisition module, configured to acquire a device identification of the gate control device based on a handshake request pre-initiated by the water conservancy terminal, wherein the device identification specifically includes a firmware version, a communication capability, and a device address;
[0366] A third judgment module is used to judge whether the device identification matches the manufacturer number preset in the water conservancy terminal;
[0367] The third execution module is used to identify the device protocol type of the gate control device, dynamically load the pre-matched driver of the water conservancy terminal according to the device protocol type, and construct the driving parameters of the gate control device, wherein the device protocol type specifically includes the register range, communication baud rate and command structure, the driver specifically includes drive activation, communication test and feedback confirmation, and the drive parameters specifically include data reading instruction structure, register offset rule and data point mapping information.
[0368] In this embodiment, the system obtains the device identification of the gate control device based on the handshake request pre-initiated by the water conservancy terminal. The device identification specifically includes the firmware version, communication capability and device address. The system then determines whether the device identification of the gate control device matches the manufacturer number pre-set by the water conservancy terminal to execute the corresponding steps; for example, when the system determines that the device identification of the gate control device cannot match the manufacturer number pre-set by the water conservancy terminal, the system will believe that devices from different manufacturers often use private communication protocols, register mapping methods or data formats. If there is a mismatch, the system will not be able to correctly parse its data or issue instructions, and the system will set the device to "unauthenticated" or "pending approval" status, temporarily suspending automatic authentication. The control strategy is synchronized with the data collection operation to avoid false triggering. At the same time, the authentication mechanism of the water conservancy terminal is started, and an attempt is made to read the digital signature, certificate or manufacturer-defined check field of the device. If the device supports online verification, the central platform can be linked to perform manufacturer identity authentication, and the system can call the "universal driver compatibility mode" to try to parse the device according to a known standard protocol (such as Modbus, IEC104). If the parsing is successful, it is marked as "partially compatible" and some functions (such as read-only data, disabled control) continue to run. For example, when the system determines that the device identification of the gate control device can match the pre-set manufacturer number of the water conservancy terminal, the system will consider that it can issue instructions or decode the gate control device. After analyzing the data, the system will identify the device protocol type of the gate control device. The device protocol type specifically includes register range, communication baud rate and command structure. According to different device protocol types, the system will dynamically load the pre-matched driver of the water conservancy terminal to build the drive parameters of the gate control device. The drive parameters specifically include data reading instruction structure, register offset rules and data point mapping information; based on the recognition result, the system can automatically parse the communication protocol type of the device (such as register range, baud rate and command structure), thereby eliminating the step of manually entering the protocol parameters. Compared with the traditional method of relying on PLC or engineers to configure registers, this automatic recognition mechanism greatly improves the speed of equipment online and is suitable for In response to the actual needs of parallel deployment of multiple devices and multiple manufacturers, and based on the identified device protocol type, the preset driver template in the water conservancy terminal is dynamically loaded, and the driver parameters required to communicate with the device are constructed, including data reading instruction structure, register offset rules and data point mapping information, etc. In this way, the system can accurately read key parameters such as water level, opening, fault status, etc., and map them into standardized data structures to ensure the effective transmission and response of control instructions, and avoid control failure or false triggering due to register misalignment or instruction incompatibility. Through this identification, adaptation and drive construction process, the system has established a standardized and modular device access mechanism.This mechanism not only supports the automatic access and management of current equipment, but also provides a unified template for the plug-and-play of subsequent new equipment. The standardized data structure and control interface also provide a solid data foundation and execution channel for the system to implement more advanced functions (such as policy linkage, anomaly analysis, water situation forecasting, etc.), fundamentally improving the intelligence level and sustainable expansion capabilities of the entire water conservancy automation system.
[0369] In this embodiment, the execution module further includes:
[0370] an identification unit, configured to identify a policy trigger condition of the device function based on a trigger type of the control policy, wherein the trigger type specifically includes a command trigger, a linkage trigger, and a timing trigger;
[0371] a judging unit, configured to judge whether the policy triggering condition matches the triggering type;
[0372] The execution unit is used to collect the current hydrological status data as preset decision input information through the water conservancy terminal, and dynamically construct the strategy scheduling thread of the gate control device according to the collection cycle of the decision input information, wherein the hydrological status data specifically includes upstream water level, downstream water level, gate opening, equipment operating status, remote instruction value, rainfall and warning level.
[0373] In this embodiment, the system identifies the policy trigger conditions of the device function based on the trigger type of the control strategy, which specifically includes instruction trigger, linkage trigger and timing trigger. The system then determines whether the policy trigger conditions of the device function match the trigger type of the control strategy to execute the corresponding steps. For example, when the system determines that the policy trigger conditions of the device function cannot match the trigger type of the control strategy, the system will consider that the current gate control device cannot correctly respond or cooperate with the expected execution method of the control strategy, which may cause the control strategy to fail, be ignored, or trigger an error. The system will immediately terminate the automatic synchronization of the strategy with the device to prevent the device from being rejected, reporting an error or being stuck due to the issuance of an invalid strategy. At the same time, if the device supports "instruction triggering", the system The system can be converted to a control command issued by the platform periodically or manually, or downgraded to a "scheduled trigger". The control logic is simplified by setting a scheduled task, and the policy mismatch information is recorded, including the control policy ID and name, the device number and function type attempted to be bound, and the reason for failure (such as "lack of event monitoring capability" and "unsupported linkage response"). For example, when the system determines that the policy trigger condition of the device function can match the trigger type of the control policy, the system will consider that the current gate control device can correctly cooperate with the control policy. The system will collect the current hydrological status data as the pre-set decision input information through the water conservancy terminal. The hydrological status data specifically includes upstream water level, downstream water level, gate opening, equipment operating status, remote instructions, etc. Value, rainfall and warning level, according to the collection cycle of these decision input information, the policy scheduling thread of the gate control device is dynamically constructed; when the system determines that the policy trigger condition of the device function can match the trigger type of the control strategy, it means that the current control logic will not be interrupted due to the lack of protocol or insufficient capacity, and the device can accurately respond to policy requirements such as linkage triggering, timing triggering or instruction triggering, avoiding the problem of no response or execution failure of policy issuance from the source. This mechanism ensures that the control strategy can be "issued, identified and executed". At the same time, through the real-time collection of key hydrological status data (such as upstream and downstream water levels, rainfall, opening, etc.) through the water conservancy terminal, the system obtains complete and continuous decision-making basis. These data can be used as input to the control strategy, not only to trigger A single action can form a logical judgment chain to achieve "predictive scheduling" and "situation response", such as "warning level + sudden increase in rainfall → early discharge" or "high water level downstream + gate opened → stop further opening", which improves the accuracy and intelligence of system response. It also dynamically allocates computing resources according to the data collection cycle of different decision inputs (such as rainfall every 1 minute, remote instructions every 5 seconds, and equipment status every 10 seconds), builds a lightweight policy scheduling thread, and realizes asynchronous parallel scheduling of various control strategies. This thread-level policy management method not only improves system processing efficiency, but also supports coordinated control and distributed management of large-scale multi-gate equipment, providing basic support for the scalability, low latency and high availability of smart water conservancy systems.
[0374] In this embodiment, the second execution module further includes:
[0375] a detection unit, configured to detect the integrity of the policy fields of the control policy based on a preset policy internal structure of the control policy, wherein the policy internal structure specifically includes a condition set, an action set, and a data point reference;
[0376] A second judging unit is used to judge whether the integrity of the policy field is missing;
[0377] The second execution unit is used to obtain the dependency relationship preset by the control strategy, identify the linkage strategy preset by the control strategy according to the dependency relationship, and check the invalid command of the control strategy from the gate control device according to the trigger status of the linkage strategy, wherein the invalid command specifically includes an overwrite strategy or a conflict strategy.
[0378] In this embodiment, the system detects the integrity of the policy fields of these control policies based on the pre-set internal structure of the control policy, which specifically includes a condition set, an action set, and a data point reference. The system then determines whether the integrity of the policy fields is missing to execute the corresponding steps. For example, when the system determines that the integrity of the policy fields of the control policy is not missing, the system will consider that the current control policy has complete and legal execution conditions and operation definitions, and can be safely loaded and issued to the corresponding gate control device for execution. The system will mark the policy as "executable", load it into the policy scheduling thread of the corresponding device, wait for the scheduling cycle or event trigger, and establish a state context for the policy. Including whether it is currently in the activation period, whether the current conditions are met, the last execution time and execution results, and according to the trigger type of the strategy (such as timing, linkage, instruction), start the listening thread (for remote instruction triggering), start the timed inspection task (for timing or periodic judgment), and register linkage sensor events (such as water level, rainfall change triggering); for example, when the system determines that the integrity of the policy field of the control strategy is missing, the system will think that the current control strategy does not have complete and legal execution conditions. The system will obtain the pre-set dependencies of these control strategies, and identify the pre-set linkage strategies of the control strategies according to different dependencies. According to the trigger status of these linkage strategies, the system will start from the gate control. The device checks for invalid commands of the control strategy, which specifically include overwriting strategies or conflicting strategies. When the system detects that the field integrity of the control strategy is missing (such as missing trigger conditions, reference to invalid data points, no configured action instructions, etc.), the system will not execute it blindly, but will actively mark the strategy as "unexecutable" and terminate its automatic scheduling, thus avoiding the risks of equipment misoperation, sluice operation disorder or water resource waste caused by the issuance of incorrect strategies. At the same time, the preset dependency relationship in the control strategy is obtained (such as the trigger status or execution result of strategy A depending on strategy B), and the linkage structure between the strategy and other strategies can be located. When a field is missing, the system determines whether it is Whether there is an overwriting strategy (higher priority) or conflicting strategy (with mutually exclusive execution results) that has already taken effect, further clarify whether the current strategy has been "structurally abandoned" due to logical conflicts. This mechanism effectively prevents strategies from repeatedly controlling the same device or causing state disorders due to conflicting conditions. After identifying the linkage strategy, the system will enter the gate control device instruction cache or the current execution channel to check whether there are invalid control commands derived from the current invalid strategy, such as instructions that are not triggered but issued, repeated commands that conflict with other strategies, etc. The recovery, revocation or alarm prompts of these "invalid commands" help to ensure the clarity and uniqueness of the device control instruction chain, and improve the data closed loop and execution transparency of the strategy scheduling system.
[0379] In this embodiment, the judgment module further includes:
[0380] An acquisition unit is used to acquire corresponding protocol original data frames from the gate control device, wherein the protocol original data frames specifically include message start and end characters, message length bytes, function codes, check bit types, response time intervals, and communication baud rates;
[0381] A third judgment unit is used to judge whether the protocol original data frame matches the protocol feature field, wherein the protocol feature field specifically includes a protocol frame header, an address field, and a data length;
[0382] The third execution unit is used to extract the corresponding byte order from the protocol original data frame, divide the data type of the protocol original data frame based on the byte order, and parse the decoded data of the protocol original data frame according to the data type, wherein the data type specifically includes a 16-bit integer, a 32-bit floating point and a decimal offset, and the decoded data specifically includes an opening value, a water level value and a status word.
[0383] In this embodiment, the system collects the corresponding protocol original data frames from the gate control device. The protocol original data frames specifically include message start and end characters, message length bytes, function codes, check bit types, response time intervals, and communication baud rates. The system then determines whether these protocol original data frames match the protocol feature fields. The protocol feature fields specifically include the protocol frame header, address field, and data length, so as to execute the corresponding steps. For example, when the system determines that these protocol original data frames cannot match the protocol feature fields, the system will consider that the communication data structure of the current gate control device does not conform to the standard protocol template supported by the system, or that the device has communication anomalies, configuration errors, or unknown protocol types. The system cannot correctly parse its data content and instruction behavior. The system will cache the failed data frames, including timestamps, message hexadecimal contents, and source device addresses, for subsequent manual protocol inversion or manufacturer protocol comparison, and try to compare with the built-in "protocol fallback library", such as the early For Modbus / RTU variants and old versions of the manufacturer's protocol, if some fields can be preliminarily matched, such as the frame header is the same but the data segment is inconsistent, the system can enter the "semi-automatic protocol calibration mode" and notify the operation and maintenance personnel that the device has an unknown or unadapted protocol. A data frame reference template is provided for manufacturer feedback or new template entry. The system supports marking the current device as a "pending adaptation device", skipping automatic parsing but allowing manual entry of key data points. For example, when the system determines that these protocol raw data frames can match the protocol feature fields, the system will consider that the communication data structure of the current gate control device conforms to the standard protocol template supported by the system. The system will extract the corresponding byte sequence from the protocol raw data frame and, based on this byte sequence, divide the data type of the protocol raw data frame into 16-bit integer, 32-bit floating point and decimal offset. According to different data types, the system will parse the decoded data of the protocol raw data frame. The decoded data specifically includes the opening value, water level value and status word.The system can accurately identify and match the key feature fields (such as frame header, address field, data length, etc.) in the original data frame of the protocol of the gate control device, which means that the communication protocol used by the device is consistent with the standard template library supported by the system. Based on this matching process, the system can automatically identify the data structure of the device and complete the device access without manually configuring the communication template. This function effectively breaks the barriers of differences in protocol formats between devices from different manufacturers, greatly improving the adaptation speed and access efficiency of the system when facing multi-brand and multi-model devices. At the same time, by extracting byte order and parsing data types (such as 16-bit integer, 32-bit floating point, decimal offset, etc.) from the original data frame of the protocol, the system can accurately restore the data content transmitted by the device, such as accurately decoding the opening Key data points such as degree value, water level value, and status word facilitate refined monitoring during water conservancy scheduling, avoid data distortion caused by manual configuration deviations or protocol differences, and ensure the consistency and credibility of hydrological data in various analysis and control scenarios. Successfully acquired and decoded key data points directly contribute to the triggering and decision-making process of control strategies. For example, the system can determine whether to trigger gate opening and closing operations based on real-time opening value or water level value, or activate safety mechanisms based on the alarm bit in the status word. This automatically driven control logic based on decoded data significantly enhances the system's intelligent response capabilities, enabling the gate control system to quickly and autonomously make precise controls in emergency situations, thereby improving the reliability and operational efficiency of the overall water conservancy automation system.
[0384] In this embodiment, the second judgment module further includes:
[0385] an acquiring unit, configured to acquire an execution type of the control strategy based on real-time status information preset by the gate control device, wherein the real-time status information specifically includes communication status, current working mode, gate status, and control authority ownership, and the execution type specifically includes opening adjustment type, state control type, and mode switching type;
[0386] a fourth determining unit, configured to determine whether the real-time status information supports the execution type;
[0387] The fourth execution unit is used to, if yes, identify the preset execution capability of the gate control device, collect the upload frequency of the gate control device according to the execution capability, construct the return cycle of the water conservancy terminal for the control strategy based on the upload frequency, compare the return cycle with the preset strategy tolerance time, and generate strategy feedback information of the gate control device, wherein the execution capability specifically includes an execution confirmation frame, an execution result data point, and a failure reason code.
[0388] In this embodiment, the system obtains the execution type of the control strategy based on the real-time status information preset by the gate control device, which specifically includes the communication status, current working mode, gate status, and control authority. The execution types specifically include opening adjustment type, state control type, and mode switching type. The system then determines whether the real-time status information supports these execution types to execute the corresponding steps. For example, when the system determines that the real-time status information preset by the gate control device cannot support the execution type of the control strategy, the system will consider that the current device is in an operating state that does not have the execution conditions or authority and cannot be adjusted or responded according to the target logic of the preset control strategy. The system will record the control strategy that cannot be executed and specify the failure reason (such as "device is in manual mode" or "communication is disconnected") for background analysis. At the same time, if there is redundant equipment or alternative paths (such as backup gates), the system can automatically attempt to switch the control target. If the strategy allows delayed execution, the system can enter the "pending execution queue" and wait for the status to recover, and prompt the user to perform necessary intervention, such as prompting the operation and maintenance personnel. If the administrator switches the device to "remote mode" or restores the communication connection, and if the authority ownership is inconsistent, the administrator can request the superior platform to release control permissions. For example, when the system determines that the pre-set real-time status information of the gate control device can support the execution type of the control strategy, the system will assume that the current device is in normal operation. The system will identify the pre-set execution capabilities of the gate control device, which specifically include execution confirmation frames, execution result data points, and failure reason codes. Based on these execution capabilities, the system collects the upload frequency of the gate control device and establishes the return cycle of the control strategy for the water conservancy terminal based on different upload frequencies. The return cycle is compared with the pre-set strategy tolerance time to generate strategy feedback information for the gate control device. By identifying the device's execution capabilities (such as execution confirmation frames, result data points, and failure reason codes), the system can clearly track whether the control command has been received and correctly executed by the device, avoiding the black box operation problem of "issuing a command but the device does not respond". For example, the device can actively upload an "execution confirmation frame" to confirm that the action has been triggered, and upload a "result data point" to verify whether the gate has opened to the target opening.Uploading a "failure reason code" allows the root cause of execution failure to be traced. This mechanism effectively improves the reliability and auditability of the control link. A feedback cycle is established based on the device upload frequency and then compared with the control policy's "tolerance period." This intelligently determines whether a device has "timed out without feedback" and whether a retry or alarm is required. For example, if the policy tolerance period is 30 seconds and the device feedback cycle is 60 seconds, the system can provide early warning of the risk of delayed policy feedback, preventing operational loss or misjudgment of device failure. This mechanism dynamically adapts the feedback rhythm of different devices and operating conditions, enhancing the system's fault tolerance and energy conservation capabilities for the policy execution rhythm. Ultimately, based on the policy execution results, feedback cycle, and device capabilities, "policy feedback information" is generated, such as "execution successful," "execution failure - reason code 04," and "execution timed out - no feedback." This feedback information can be uploaded to the water conservancy central control platform or regional water management system as basic data for intelligent scheduling, task evaluation, or operational statistics. This system not only improves automation but also enhances data collaboration and management transparency with upper-level platforms, providing comprehensive support for smart water conservancy management.
[0389] In this embodiment, the monitoring module further includes:
[0390] A second detection unit is configured to detect abnormal data injection into the logical port, wherein the abnormal data specifically includes high-frequency non-protocol data, illegal frames, and abnormal baud rate changes;
[0391] a fifth judging unit, configured to judge whether the abnormal data injection exceeds a preset injection threshold;
[0392] The fifth execution unit is used to dynamically disconnect the connection between the water conservancy terminal and the gate control device if so, collect the data feature package of the gate control device, and detect the injection behavior of the gate control device based on the data feature package, wherein the data feature package specifically includes the device identification code, encryption signature, manufacturer code and protocol version information, and the injection behavior specifically includes high-frequency injection of non-protocol data, repeated frame flooding and fake communication attempts.
[0393] In this embodiment, the system detects abnormal data injection into the logical port, and the abnormal data specifically includes high-frequency non-protocol data, illegal frames, and abnormal baud rate changes, and then determines whether the injection of these abnormal data exceeds a preset injection threshold to execute corresponding steps; for example, when the system determines that the abnormal data injection into the logical port does not exceed the preset injection threshold, the system will consider that the current data anomaly is still within the safe range that the system can tolerate, and the operation of the equipment has not been substantially threatened or interfered with. There is no need to immediately perform isolation or interruption operations, but the system should take steady-state monitoring and early warning protection measures to prevent risk escalation. The system will timestamp the currently detected abnormal data type (such as illegal frames, strange baud rate changes) and write The abnormal log cache of the input logical port is used for post-audit and trend analysis. At the same time, the receiving frame structure and frequency density of the port are enhanced to detect whether there is a trend of change such as an increase in the duration of the abnormality or a sudden increase in frequency in a short period of time, and temporarily increase the tolerance recognition threshold to avoid misjudging it as a communication interruption, or switch to the backup port for partial data reception and transmission verification without affecting the main task scheduling; for example, when the system determines that the abnormal input injection of the logical port exceeds the pre-set injection threshold, the system will consider that the current data abnormality is within the abnormal range, and the system will dynamically disconnect the water conservancy terminal from the gate control device and collect the data feature package of the gate control device. The data feature package specifically includes the device identification code, encryption signature, and manufacturer code. and protocol version information, and based on these data feature packets, detect the injection behavior of the gate control device, which specifically includes high-frequency injection of non-protocol data, repeated frame flooding and fake communication attempts; by dynamically disconnecting the communication connection between the water conservancy terminal and the gate control device, the system can timely block the potential attack chain before the problem spreads, prevent illegal instructions from interfering with the gate control logic, and effectively ensure the operational stability and data integrity of key businesses such as water level scheduling and flood discharge instructions. At the same time, after disconnecting the communication, the system further collects the data feature packets of the abnormal device, including key fields such as device identification code, encryption signature, manufacturer code, protocol version, etc., and by comparing the registered device files of the water conservancy terminal platform, the system can quickly determine whether the device is a legally registered device. Whether there is any feature tampering or impersonation, thereby achieving device-level abnormality tracing, this step provides strong data support for subsequent abnormal node isolation, access authorization review and risk accountability, and based on the analysis results of the feature package, the system can sub-classify and identify abnormal behaviors, such as "high-frequency injection of non-protocol data", "flooding of repeated frames", "fake communication attempts" and other typical security threats. Different types of injection behaviors will trigger different response strategies, such as triggering port isolation, dynamic reallocation of logical ports, increasing verification strength or calling redundant link equipment to take over operations. This multi-level response mechanism not only improves the system's adaptability and anti-interference capabilities in complex environments, but also helps to achieve safe and controllable access and stable operation of large-scale IoT devices in smart water conservancy systems.
[0394] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. An intelligent gate control access method based on drive identification and data mapping, characterized in that: The following steps are involved: Based on the gateway edge computing node preset by the water conservancy terminal, the newly added logical ports are monitored and the access gate control devices are identified through the logical ports; Determining whether the gate control device matches a preset protocol type, wherein the protocol type specifically includes Modbus, IEC104, and a proprietary protocol; If so, read the device data points preset in the gate control device, parse the variable format of the gate control device according to the device data points, and dynamically execute the control strategy pre-recorded in the water conservancy terminal according to the device functions preset in the gate control device, wherein the device data points specifically include water level, gate opening and fault status, and the variable format specifically includes encoding method, variable structure type and register address mapping; determining whether the control strategy can be synchronized with the gate control device; If not, obtain the verification content of the control strategy, and dynamically verify the execution behavior of the gate control device on the control strategy based on the simulation data pre-recorded in the water conservancy terminal. According to the execution behavior, identify the influencing parameters of the gate control device on the upstream and downstream areas, and construct the linkage relationship of the control strategy on the upstream and downstream areas based on the influencing parameters, wherein the verification content specifically includes logical conflicts, null value dependencies and threshold overlaps, and the influencing parameters specifically include water level change rate, water level response amplitude, discharge flow, flow velocity and water body lag time.
2. The intelligent gate control access method based on drive identification and data mapping according to claim 1, characterized in that: Before the step of reading the device data points preset by the gate control device and parsing the variable format of the gate control device according to the device data points, the method further includes: Based on the handshake request pre-initiated by the water conservancy terminal, obtaining the device identification of the gate control device, wherein the device identification specifically includes the firmware version, communication capability and device address; Determining whether the device identification matches the manufacturer number preset in the water conservancy terminal; If so, identify the device protocol type of the gate control device, dynamically load the pre-matched driver of the water conservancy terminal according to the device protocol type, and construct the driving parameters of the gate control device, wherein the device protocol type specifically includes the register range, communication baud rate and command structure, the driver specifically includes drive activation, communication test and feedback confirmation, and the drive parameters specifically include data reading instruction structure, register offset rules and data point mapping information.
3. The intelligent gate control access method based on drive identification and data mapping according to claim 1, characterized in that: The step of dynamically executing the control strategy pre-recorded by the water conservancy terminal according to the preset device function of the gate control device also includes: Identify the policy trigger conditions of the device function based on the trigger type of the control policy, wherein the trigger type specifically includes instruction trigger, linkage trigger and timing trigger; Determining whether the policy trigger condition matches the trigger type; If so, the current hydrological status data is collected through the water conservancy terminal as the preset decision input information, and the strategy scheduling thread of the gate control device is dynamically constructed according to the collection cycle of the decision input information, wherein the hydrological status data specifically includes the upstream water level, downstream water level, gate opening, equipment operating status, remote instruction value, rainfall and warning level.
4. The intelligent gate control access method based on drive identification and data mapping according to claim 1, characterized in that: The step of obtaining the verification content of the control strategy further includes: Based on a preset internal structure of the control policy, detecting the integrity of the policy fields of the control policy, wherein the internal structure of the policy specifically includes a condition set, an action set, and a data point reference; Determining whether the integrity of the policy field is missing; If so, obtain the dependency relationship preset by the control strategy, identify the linkage strategy preset by the control strategy based on the dependency relationship, and check the invalid commands of the control strategy from the gate control device based on the trigger status of the linkage strategy, wherein the invalid commands specifically include overwriting strategies or conflict strategies.
5. The intelligent gate control access method based on drive identification and data mapping according to claim 1, characterized in that: The step of determining whether the gate control device matches a preset protocol type further includes: Collecting corresponding protocol original data frames from the gate control device, wherein the protocol original data frames specifically include message start and end characters, message length bytes, function codes, check bit types, response time intervals, and communication baud rates; Determining whether the protocol original data frame matches a protocol feature field, wherein the protocol feature field specifically includes a protocol frame header, an address field, and a data length; If so, extract the corresponding byte order from the protocol original data frame, divide the data type of the protocol original data frame based on the byte order, and parse the decoded data of the protocol original data frame according to the data type, wherein the data type specifically includes 16-bit integer, 32-bit floating point and decimal offset, and the decoded data specifically includes opening value, water level value and status word.
6. The intelligent gate control access method based on drive identification and data mapping according to claim 1, characterized in that: The step of determining whether the control strategy can be synchronized with the gate control device further includes: Based on the preset real-time status information of the gate control device, the execution type of the control strategy is obtained, wherein the real-time status information specifically includes the communication status, the current working mode, the gate status and the control authority, and the execution type specifically includes the opening adjustment type, the state control type and the mode switching type; Determining whether the real-time status information supports the execution type; If so, identify the preset execution capability of the gate control device, collect the upload frequency of the gate control device based on the execution capability, construct the feedback cycle of the water conservancy terminal for the control strategy based on the upload frequency, compare the feedback cycle with the preset strategy tolerance time, and generate the strategy feedback information of the gate control device, wherein the execution capability specifically includes the execution confirmation frame, the execution result data point and the failure reason code.
7. The intelligent gate control access method based on drive identification and data mapping according to claim 1, characterized in that: The step of monitoring the newly added logical port based on the gateway edge computing node preset by the water conservancy terminal and identifying the connected gate control device through the logical port further includes: Detecting abnormal data injection into the logical port, wherein the abnormal data specifically includes high-frequency non-protocol data, illegal frames, and abnormal baud rate changes; Determining whether the abnormal data injection exceeds a preset injection threshold; If so, dynamically disconnect the water conservancy terminal from the gate control device, collect the data feature package of the gate control device, and detect the injection behavior of the gate control device based on the data feature package, wherein the data feature package specifically includes the device identification code, encryption signature, manufacturer code and protocol version information, and the injection behavior specifically includes high-frequency injection of non-protocol data, repeated frame flooding and fake communication attempts.
8. Intelligent gate access system based on drive identification and data mapping, characterized by: include: A monitoring module is used to monitor the newly added logical ports based on the gateway edge computing node preset by the water conservancy terminal, and identify the accessed gate control device through the logical port; A determination module, configured to determine whether the gate control device matches a preset protocol type, wherein the protocol type specifically includes Modbus, IEC104, and a proprietary protocol; an execution module, configured to, if yes, read device data points preset in the gate control device, parse a variable format of the gate control device according to the device data points, and dynamically execute a control strategy pre-recorded in the water conservancy terminal according to the device functions preset in the gate control device, wherein the device data points specifically include water level, gate opening, and fault status, and the variable format specifically includes an encoding method, a variable structure type, and a register address mapping; A second judgment module is used to judge whether the control strategy can be synchronized with the gate control device; The second execution module is used to obtain the verification content of the control strategy if it cannot be done, and dynamically verify the execution behavior of the gate control device on the control strategy based on the simulation data pre-recorded in the water conservancy terminal, identify the influencing parameters of the gate control device on the upstream and downstream areas according to the execution behavior, and construct the linkage relationship of the control strategy on the upstream and downstream areas based on the influencing parameters, wherein the verification content specifically includes logical conflicts, null value dependencies and threshold overlaps, and the influencing parameters specifically include water level change rate, water level response amplitude, discharge flow, flow velocity and water body lag time.
9. The intelligent gate control access system based on drive identification and data mapping according to claim 8, characterized in that: Also includes: an acquisition module, configured to acquire a device identification of the gate control device based on a handshake request pre-initiated by the water conservancy terminal, wherein the device identification specifically includes a firmware version, a communication capability, and a device address; A third judgment module is used to judge whether the device identification matches the manufacturer number preset in the water conservancy terminal; The third execution module is used to identify the device protocol type of the gate control device, dynamically load the pre-matched driver of the water conservancy terminal according to the device protocol type, and construct the driving parameters of the gate control device, wherein the device protocol type specifically includes the register range, communication baud rate and command structure, the driver specifically includes drive activation, communication test and feedback confirmation, and the drive parameters specifically include data reading instruction structure, register offset rule and data point mapping information.
10. The intelligent gate control access system based on drive identification and data mapping according to claim 8, characterized in that: The execution module also includes: an identification unit, configured to identify a policy trigger condition of the device function based on a trigger type of the control policy, wherein the trigger type specifically includes a command trigger, a linkage trigger, and a timing trigger; a judging unit, configured to judge whether the policy triggering condition matches the triggering type; The execution unit is used to collect the current hydrological status data as preset decision input information through the water conservancy terminal, and dynamically construct the strategy scheduling thread of the gate control device according to the collection cycle of the decision input information, wherein the hydrological status data specifically includes upstream water level, downstream water level, gate opening, equipment operating status, remote instruction value, rainfall and warning level.
Citation Information
Patent Citations
Water conservancy monitoring terminal access system and method based on virtual gateway
CN119299249A
Water and electricity integrated monitoring system for water conservancy pump station and control method
CN119439857A
Information security transmission method of stadium security platform based on Internet of Things
CN120415891A
Cited By
Tunnel comprehensive management and control platform construction method and system
CN121309368A
Intelligent electric control method and system for water conservancy gate based on multi-source data fusion
CN122386839A