Large hydro-junction sluice operation and maintenance safety monitoring and early warning method
By adopting an improved GRU network model and attention mechanism in the drain gate of large water conservancy hubs, combining weather and ship traffic data, the problem of poor early warning performance in the existing technology is solved, and more efficient operation and maintenance safety monitoring and early warning is achieved.
Patent Information
- Application Number
- CN202411915482.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-18
AI Technical Summary
In the operation and maintenance safety monitoring and early warning of large water conservancy hub drainage gates, the existing technology failed to effectively correlate weather and ship traffic data, and the LSTM model structure is complex, the training speed is slow, and the real-time prediction performance is poor.
A safety monitoring and early warning method for operation and maintenance of large-scale water conservancy hub drain gates is adopted. By obtaining historical data of drain gates, pre-processing and feature selection, the GRU network model is designed and improved, and training is combined with attention mechanism to generate safety warnings.
It improves the accuracy and real-time safety warning of drainage gate operation and maintenance, enhances operational efficiency, and can effectively correlate weather and ship traffic data for early warning.
Smart Images

Figure CN119848502A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence monitoring and early warning technology, and in particular to a method for monitoring and early warning the operation and maintenance safety of sluice gates in large-scale water conservancy hubs. Background Art
[0002] As a major component of the infrastructure of water conservancy and hydropower projects, the sluice gates of large-scale water conservancy hubs play an important role in flood control and drainage, water supply and diversion, hydropower generation, etc. However, during the operation of the sluice gates, due to factors such as water erosion, changes in ambient temperature stress, and changes in structural durability, problems such as vertical displacement, horizontal displacement, tilt, cracks, and structural joints of the sluice gates are prone to occur, which seriously affect the safe operation of the sluice gates and threaten the lives and property safety of people in the reservoir area.
[0003] Chinese patent application number CN116400675A discloses a fault diagnosis system and method based on an improved CNN-LSTM model, and relates to a fault diagnosis system and method based on an improved CNN-LSTM model, which includes a hardware platform and a software platform; the hardware platform includes a gate, a hoist, a gate controller and a water condition monitoring sensor; the water condition monitoring sensor includes an opening sensor, a current sensor, and a water level sensor; the gate controller is used to collect data from the water condition monitoring equipment, and is connected to a 4G module through a serial port, and the 4G module is connected to the software platform; the software platform includes data solution software, a device management platform, an algorithm middle platform and a database: the data solution software is responsible for parsing the data collected by the gate controller according to the prescribed protocol and storing it in the database, and can also control the hoist by issuing control instructions to the gate controller; the device management platform has user management, device management, device control, and fault warning functions. The present invention can better perform gate fault diagnosis.
[0004] The above scheme still has several limitations. Specifically, the safety warning of large-scale water conservancy hubs is highly correlated with weather and navigation data of ships passing through sluice gates. The existing technology does not consider the associated warning of weather and navigation data of ships passing through sluice gates. The existing LSTM model has a complex structure and is usually trained slowly, and its performance in real-time sluice gate operation and maintenance safety monitoring, early warning and prediction is poor. Summary of the invention
[0005] The purpose of the present invention is to provide a large-scale water conservancy hub sluice gate operation and maintenance safety monitoring and early warning method to solve the above-mentioned problems existing in the prior art.
[0006] The specific application is as follows:
[0007] A method for monitoring and early warning of the operation and maintenance safety of a sluice gate of a large-scale water conservancy hub comprises the following steps:
[0008] S1. Obtain historical data of the sluice gate within a certain period of time, and obtain characteristic data related to the sluice gate, including weather warning, dry season information period, sluice gate switch data, sluice gate water flow rate data, ship traffic data, ship traffic peak period, sluice gate hardware attributes and sluice gate software attributes;
[0009] S2. Preprocess the historical data of the sluice gate within a certain period of time, including outlier processing and water flow velocity granularity selection, and use the weather warning in the feature to calculate the weather warning index and the ship passage data to calculate the navigation speed of the ship passing the sluice gate;
[0010] S3, jointly statistically analyze the feature data including weather warning index, ship navigation speed of sluice gate, sluice gate water flow rate data, sluice gate hardware attributes and sluice gate software attributes and ship passage data during the water discharge period, design confidence for feature selection, select the top two features with the highest scores as the first feature data, mark the selected two features as X1 and X2, and mark the remaining features as the second feature data, and divide the first feature data and the second feature data into training set and test set;
[0011] S4, setting a first early warning model, sending the data of the training set to the constructed improved GRU network for training, and adjusting the weight coefficient in the first early warning model to generate multiple first prediction values;
[0012] S5. Setting a first loss function, obtaining a first true value corresponding to the first predicted value, taking each of the first predicted value and the first true value as parameters, inputting them into the first loss function, and calculating a matching degree between the first predicted value and the first true value;
[0013] S6. Find the weight coefficient in the first warning model corresponding to the maximum matching degree, and fit the weight coefficient, finally complete the training of the first warning model, and use the first warning model finally completed to provide a safety warning for the operation and maintenance of the sluice gate, wherein the safety warning at least includes classification of the safety type using the Softmax layer.
[0014] Furthermore, the specific implementation process of step S2 is as follows:
[0015] S21, processing the outlier data of the sluice gate water flow rate: the sluice gate water flow rate data that appears during non-discharge time is not the real sluice gate water flow rate data, and is meaningless in the prediction of the sluice gate water flow rate data, and is directly eliminated;
[0016] S22, selecting the granularity of the water discharge flow rate: performing statistical analysis on the water discharge flow rate to obtain water discharge flow rate values of different time granularities, selecting the water discharge flow rate of a preset time granularity for statistics, wherein the water discharge flow rate is obtained by a water flow monitoring sensor;
[0017] S23. Calculate the weather warning index:
[0018] Weather warning types include dry season warning, flood season warning, typhoon warning, rainstorm warning, gale warning, lightning warning and fog warning. According to the influence of dry season, flood season, typhoon, rainstorm, gale, lightning and fog on operation and maintenance safety monitoring, their weights m are assigned as 3, 3, 2, 2, 1, 1, 1 in sequence;
[0019] The formula for calculating the weather warning index is as follows:
[0020] W=∑ i (m i ),
[0021] Where W represents the weather warning index, i represents the i-th weather warning type; if no weather warning occurs, the value of the weather warning index is 0;
[0022] S24. Calculate the navigation speed of the ship passing through the sluice gate.
[0023] Furthermore, the specific implementation process of step S24 is as follows:
[0024] S241, deploy multiple groups of laser radar sensors on the sluice gates through which the ship is sailing, and obtain navigation data along the surface of the front side of the ship by emitting laser pulse reflections;
[0025] S242, when the ship passes through the sluice gate, the laser radar sensor collects the navigation data along the front surface in real time, and transmits the data collected by each sensor through wireless communication, and performs time stamp calibration processing on the transmitted data;
[0026] S243. Based on the multi-band navigation speed data after calibration in S242, a data fusion algorithm is used to integrate the sensor data from different locations, and a filtering algorithm is used to eliminate environmental noise and errors to obtain the navigation speed value of the ship after fusion.
[0027] Furthermore, the S241 specifically includes:
[0028] S2411. When installing the laser radar sensor, adjust the angle and position of the sensor according to the ship's sailing direction, calibrate the sensor's emission angle and the relative position of the target area, so that the laser radar can directly monitor the surface sailing speed of the front side of the ship;
[0029] S2412. The laser radar sensor collects data by emitting laser pulses. The laser pulses are emitted to the surface of the front side of the ship and received through the reflected signal. The navigation speed of the surface along the front side of the ship is calculated based on the time difference between the emission and reflection of the laser pulses. The formula is: Where V represents the ship's speed, W represents the distance between the emission and reflection of the laser pulse, and T represents the round-trip time of the laser pulse;
[0030] The S242 specifically includes:
[0031] S2421, after each laser radar sensor collects the navigation speed data along the surface of the front side of the ship, the data is transmitted through the wireless communication protocol, and each sensor sends the real-time data to the central processor, and the transmission process includes data packaging, encryption and sending;
[0032] S2422, after the central processor receives the data packets from each sensor, based on the timestamp information attached to each data packet, the transmission data is calibrated for the timestamp;
[0033] S2423. After the timestamp is calibrated, the time difference between sensors is compensated. Specifically, the existing time error is smoothed by the Newton interpolation algorithm to ensure that the sensor data maintains consistency in measuring the navigation speed along the surface of the front side of the ship at the same time sequence.
[0034] Furthermore, the S243 specifically includes:
[0035] S2431, receiving the navigation speed data of the surface along the front side of the ship collected by the laser radar sensors at different positions, the data packet of each sensor includes the navigation speed information and the ship position information, and the navigation speed data of all sensors are fused by using the data fusion algorithm, the formula is:
[0036] Among them, V t represents the fused navigation speed value along the surface of the front side of the ship; V1, V2, ..., V n Respectively represent the navigation speed measured by each sensor; k1, k2, ..., k n Respectively represent the weight coefficients of the corresponding sensors;
[0037] S2432. After data fusion, the Kalman filter algorithm is used to eliminate environmental noise from the fused data.
[0038] Furthermore, the specific implementation process of step S3 is as follows:
[0039] S31. Statistics on the safety monitoring data of sluice gate operation and maintenance during the water release period:
[0040] The sluice gate operation and maintenance safety monitoring data during the water discharge period are associated with the characteristic data: the ship traffic data during the water discharge period is associated with the dry season and the signal period to obtain the dry season ship traffic data and the signal period ship traffic data of the sluice gate of the preset time granularity; the sluice gate switch data of the reference weather factor of the preset time granularity is obtained by associating with the weather warning index obtained in step S2; the sluice gate switch data of the preset time granularity is obtained by associating with the peak ship traffic period; the sluice gate hardware configuration data of the preset time granularity is obtained by associating with the sluice gate hardware attributes; and the sluice gate software configuration data of the preset time granularity is obtained by associating with the sluice gate software attributes;
[0041] The ship passage data includes the speed of the ship along the surface, the GPS position of the ship, the time when the ship passes the sluice gate, the number of sluice gates the ship passes, and the warning value of the ship passing the sluice gate. The warning level of the ship passing the sluice gate is divided into high risk, medium risk, low risk and no risk, and the values are assigned to 4, 3, 2, and 1 respectively;
[0042] The peak ship traffic period is divided into “yes” and “no”, represented by 1 and 0 respectively;
[0043] The sluice gate switch data indicates whether the sluice gate is opened, the opening time period, the closing time point and the opening frequency;
[0044] The hardware attributes of the sluice gate include the gate number, gate opening and closing machine status data, gate controller status data and gate water flow monitoring sensor status data;
[0045] The sluice gate software attributes include gate association control software status data and gate network communication module status data, and the gate network communication module is used for network data transmission control between the gate association control software and the sluice gate hardware attributes;
[0046] The characteristic data include weather warning index, sluice gate opening and closing data, ship traffic data, ship traffic peak hours, sluice gate hardware attributes and sluice gate software attributes;
[0047] S32, using the confidence method to extract features, selecting the first feature data from the above feature data, and evaluating the importance of the feature with the hub sluice gate operation and maintenance safety monitoring data within a preset time period, the specific steps are as follows:
[0048] S321. Calculate the confidence of the feature and the target variable. The calculation formula is as follows:
[0049]
[0050] Among them, D(x,y) is the confidence, c(x,y) is the total probability distribution, c(x) and c(y) are conditional probability distributions, x is a feature in the feature set, and y is the sluice gate operation and maintenance safety monitoring data set;
[0051] S322, sorting according to confidence, and selecting the top two features with the highest scores as the first feature data;
[0052] S33, dividing the first feature data and the second feature data into a training set and a test set, and encoding the first feature data and the second feature data using One-hot.
[0053] Furthermore, the first early warning model includes:
[0054]
[0055] Among them, M predicts i is the first predicted value of the ith time, T 第一特征数据i is the i-th first feature data, S 第二特征数据i is the i-th second feature data, G, H, M and N are weight coefficients.
[0056] Furthermore, the specific structure and steps of the first early warning model in step S4 include:
[0057] S41, the improved GRU network is a two-layer GRU-attention network, and its improvement lies in adopting a two-layer GRU network architecture, and using an attention mechanism to weightedly merge the candidate hidden state sequences of the first layer GRU and the second layer GRU to obtain a weighted candidate hidden state sequence, and finally adding a fully connected layer to capture the key information of the weighted candidate hidden state sequence and map it to the space of the final sluice operation and maintenance safety prediction;
[0058] S42, in the first layer GRU, the training set of the first feature data obtained in step S3, including X1 and X2, is input into the first layer GRU to obtain a candidate hidden state sequence Q1 of the first layer GRU, where Q1 = {Q1, Q2, ... Q n}, Q n represents the candidate hidden state of the nth time step of the first layer GRU, where n is the length of the candidate hidden state sequence;
[0059] S43, in the second layer GRU, the training set of the second feature obtained in step S3 and the candidate hidden state sequence H1 obtained in the first layer GRU are input into the second layer GRU together to obtain the candidate hidden state sequence Q2 of the second layer GRU, Q2 = {Q'1, Q'2, ... Q' n}, Q2 represents the candidate hidden state of the second layer GRU at the nth time step;
[0060] S44, in the attention mechanism layer, using the attention mechanism to weightedly merge the candidate hidden state sequence Q1 of the first layer GRU and the candidate hidden state sequence Q2 of the second layer GRU;
[0061] First, the attention coefficient of the candidate hidden state sequence of the two-layer GRU is calculated, including two steps: calculating the weighted value and calculating the attention coefficient;
[0062] The formula for calculating the weighted value is as follows:
[0063] d1=w e *q i +c e ;
[0064] d2=w' e *q' i +c' e ;
[0065] Among them, d1 and d2 correspond to the weighted values of the first layer GRU and the second layer GRU respectively, and q i represents the candidate hidden state of the first layer GRU time step, q' i represents the candidate hidden state of the second layer GRU time step, w e 、w' e Represent the weighted coefficients of the first layer GRU and the second layer GRU, c e 、c' e is bias;
[0066] The formula for calculating the attention coefficient is as follows:
[0067] m1 = tanh(d1);
[0068] m2 = tanh(d2);
[0069] Among them, m1 and m2 are the attention coefficients corresponding to the first layer GRU and the second layer GRU respectively;
[0070] Secondly, the candidate hidden state sequence Q' of the double-layer GRU is weighted and fused using the attention coefficient to obtain the final weighted candidate hidden state sequence. The calculation formula is as follows:
[0071] Q'=m1*Q1+m2*Q2.
[0072] Furthermore, the first loss function includes:
[0073]
[0074] Among them, K(K 预测i ,K 真实i) is the matching degree between the i-th predicted value and the true value, K 真实i is the i-th true value, a is the overall offset of the first loss function, b is the coefficient factor between the nonlinear relationships of the first loss function, and z is the adjustment coefficient factor used to control the complexity of the nonlinear relationship. is the transpose of the i-th predicted value.
[0075] Furthermore, fitting the weight coefficient includes:
[0076] The weight coefficients G, H, M and N are fitted by BP neural network algorithm.
[0077] Compared with the prior art, the embodiments of the present invention achieve the following beneficial effects:
[0078] The embodiment of the present invention provides a method for obtaining historical data of a sluice gate within a certain time period, and obtaining feature data related to the sluice gate; preprocessing the historical data within a certain time period of the sluice gate, including outlier processing and water flow velocity granularity selection of the sluice gate, and using the weather warning in the feature to calculate the weather warning index and the ship passage data to calculate the navigation speed of the ship passing the sluice gate; jointly statistically analyzing the feature data including the weather warning index, the navigation speed of the ship passing the sluice gate, the water flow velocity data of the sluice gate, the hardware attributes of the sluice gate, and the software attributes of the sluice gate with the ship passage data during the water discharge period, designing the confidence to perform feature selection, selecting the top two features with the highest scores as the first feature data, and marking the other remaining features as the second feature data, and dividing the first feature data and the second feature data into a training set and a test set; setting the first warning Model, send the data of the training set to the constructed improved GRU network for training, and adjust the weight coefficient in the first early warning model to generate multiple first prediction values; set a first loss function, and obtain the first true value corresponding to the first prediction value, take each of the first prediction value and the first true value as parameters, input them into the first loss function, and calculate the matching degree between the first prediction value and the first true value; find out the weight coefficient in the first early warning model corresponding to the maximum matching degree, and fit the weight coefficient, finally complete the training of the first early warning model, and use the first early warning model that is finally completed to perform safety warning on the operation and maintenance of the sluice gate; the present invention improves the accuracy of the safety warning prediction of the operation and maintenance of the sluice gate and the real-time nature of the prediction, thereby improving the operational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 It is a flow chart of a method for monitoring and early warning of the operation and maintenance safety of a sluice gate at a large-scale water conservancy hub provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0080] The present invention will be described in detail below in conjunction with the accompanying drawings.
[0081] Example 1
[0082] The embodiment of the present invention provides a method for monitoring and early warning of the operation and maintenance safety of a sluice gate at a large water conservancy hub, such as Figure 1 , including the following steps:
[0083] S1. Obtain historical data of the sluice gate within a certain period of time, and obtain characteristic data related to the sluice gate, including weather warning, dry season information period, sluice gate switch data, sluice gate water flow rate data, ship traffic data, ship traffic peak period, sluice gate hardware attributes and sluice gate software attributes;
[0084] S2. Preprocess the historical data of the sluice gate within a certain period of time, including outlier processing and water flow velocity granularity selection, and use the weather warning in the feature to calculate the weather warning index and the ship passage data to calculate the navigation speed of the ship passing the sluice gate;
[0085] S3, jointly statistically analyze the feature data including weather warning index, ship navigation speed of sluice gate, sluice gate water flow rate data, sluice gate hardware attributes and sluice gate software attributes and ship passage data during the water discharge period, design confidence for feature selection, select the top two features with the highest scores as the first feature data, mark the selected two features as X1 and X2, and mark the remaining features as the second feature data, and divide the first feature data and the second feature data into training set and test set;
[0086] S4, setting a first early warning model, sending the data of the training set to the constructed improved GRU network for training, and adjusting the weight coefficient in the first early warning model to generate multiple first prediction values;
[0087] S5. Setting a first loss function, obtaining a first true value corresponding to the first predicted value, taking each of the first predicted value and the first true value as parameters, inputting them into the first loss function, and calculating a matching degree between the first predicted value and the first true value;
[0088] S6. Find the weight coefficient in the first warning model corresponding to the maximum matching degree, and fit the weight coefficient, finally complete the training of the first warning model, and use the first warning model finally completed to provide a safety warning for the operation and maintenance of the sluice gate, wherein the safety warning at least includes classification of the safety type using the Softmax layer.
[0089] Specifically, the Softmax layer is used to classify safety types, which include hardware failures corresponding to the hardware attributes of the spillway, software failures corresponding to the software attributes of the spillway, weather warnings, and warnings of abnormal navigation speeds of ships passing through the spillway. The safety types are divided into high-risk warnings and potential danger warnings according to their levels. When a high-risk warning occurs, a warning signal is automatically triggered, including sound and light alarms, text messages or phone notifications; when it is determined to be a potential danger warning situation, corresponding protective measures will be taken, including automatically closing the navigation channel in the spillway area or activating protective facilities (such as protective dams).
[0090] Furthermore, the specific implementation process of step S2 is as follows:
[0091] S21, processing the outlier data of the sluice gate water flow rate: the sluice gate water flow rate data that appears during non-discharge time is not the real sluice gate water flow rate data, and is meaningless in the prediction of the sluice gate water flow rate data, and is directly eliminated;
[0092] S22. Selecting the granularity of the discharge water flow rate: Statistical analysis is performed on the discharge water flow rate to obtain discharge water flow rate values of different time granularities. The selection of the time granularity will affect the accuracy of the discharge water flow rate prediction. In order to better reflect the change of the discharge water flow rate within the set time without being complicated, the discharge water flow rate of the preset time granularity is selected for statistics. The discharge water flow rate is obtained by a water flow monitoring sensor;
[0093] S23. Calculate the weather warning index:
[0094] Weather warning types include dry season warning, flood season warning, typhoon warning, rainstorm warning, gale warning, lightning warning and fog warning. According to the influence of dry season, flood season, typhoon, rainstorm, gale, lightning and fog on operation and maintenance safety monitoring, their weights m are assigned as 3, 3, 2, 2, 1, 1, 1 in sequence;
[0095] The formula for calculating the weather warning index is as follows:
[0096] W=∑ i (m i ),
[0097] Where W represents the weather warning index, i represents the i-th weather warning type; if no weather warning occurs, the value of the weather warning index is 0;
[0098] S24. Calculate the navigation speed of the ship passing through the sluice gate.
[0099] Furthermore, the specific implementation process of step S24 is as follows:
[0100] S241, deploy multiple groups of laser radar sensors on the sluice gates through which the ship is sailing, and obtain navigation data along the surface of the front side of the ship by emitting laser pulse reflections;
[0101] S242, when the ship passes through the sluice gate, the laser radar sensor collects the navigation data along the front surface in real time, and transmits the data collected by each sensor through wireless communication, and performs time stamp calibration processing on the transmitted data;
[0102] S243. Based on the multi-band navigation speed data after calibration in S242, a data fusion algorithm is used to integrate the sensor data from different locations, and a filtering algorithm is used to eliminate environmental noise and errors to obtain the navigation speed value of the ship after fusion.
[0103] Furthermore, the S241 specifically includes:
[0104] S2411. When installing the laser radar sensor, adjust the angle and position of the sensor according to the ship's sailing direction, calibrate the sensor's emission angle and the relative position of the target area, so that the laser radar can directly monitor the surface sailing speed of the front side of the ship;
[0105] S2412. The laser radar sensor collects data by emitting laser pulses. The laser pulses are emitted to the surface of the front side of the ship and received through the reflected signal. The navigation speed of the surface along the front side of the ship is calculated based on the time difference between the emission and reflection of the laser pulses. The formula is: Where V represents the ship's speed, W represents the distance between the emission and reflection of the laser pulse, and T represents the round-trip time of the laser pulse;
[0106] The S242 specifically includes:
[0107] S2421, after each laser radar sensor collects the navigation speed data along the surface of the front side of the ship, the data is transmitted through the wireless communication protocol, and each sensor sends the real-time data to the central processor, and the transmission process includes data packaging, encryption and sending;
[0108] S2422, after the central processor receives the data packets from each sensor, based on the timestamp information attached to each data packet, the transmission data is calibrated for the timestamp;
[0109] S2423. After the timestamp is calibrated, the time difference between sensors is compensated. Specifically, the existing time error is smoothed by the Newton interpolation algorithm to ensure that the sensor data maintains consistency in measuring the navigation speed along the surface of the front side of the ship at the same time sequence.
[0110] Specifically, the calibration time of each sensor is calculated by the following formula: T a =T b +(Tc -T d ), where T a Indicates the timestamp after calibration; T b Indicates the time when the sensor data packet is received; T c Indicates the preset standard time of the CPU; T d Indicates the timestamp of the sensor.
[0111] Furthermore, the S243 specifically includes:
[0112] S2431, receiving the navigation speed data of the surface along the front side of the ship collected by the laser radar sensors at different positions, the data packet of each sensor includes the navigation speed information and the ship position information, and the navigation speed data of all sensors are fused by using the data fusion algorithm, the formula is:
[0113] Among them, V t represents the fused navigation speed value along the surface of the front side of the ship; V1, V2, ..., V n Respectively represent the navigation speed measured by each sensor; k1, k2, ..., k n Respectively represent the weight coefficients of the corresponding sensors;
[0114] S2432. After data fusion, the Kalman filter algorithm is used to eliminate environmental noise from the fused data.
[0115] Specifically, the specific formula of the Kalman filter algorithm is: V m =V t +K(V n -V t ), where V m Represents the navigation speed value after filtering; V t Indicates the fused navigation speed value; V n represents the measured navigation speed value; K represents the Kalman gain.
[0116] Furthermore, the specific implementation process of step S3 is as follows:
[0117] S31. Statistics on the safety monitoring data of sluice gate operation and maintenance during the water release period:
[0118] The sluice gate operation and maintenance safety monitoring data during the water discharge period are associated with the characteristic data: the ship traffic data during the water discharge period is associated with the dry season and the signal period to obtain the dry season ship traffic data and the signal period ship traffic data of the sluice gate of the preset time granularity; the sluice gate switch data of the reference weather factor of the preset time granularity is obtained by associating with the weather warning index obtained in step S2; the sluice gate switch data of the preset time granularity is obtained by associating with the peak ship traffic period; the sluice gate hardware configuration data of the preset time granularity is obtained by associating with the sluice gate hardware attributes; and the sluice gate software configuration data of the preset time granularity is obtained by associating with the sluice gate software attributes;
[0119] The ship passage data includes the speed of the ship along the surface, the GPS position of the ship, the time when the ship passes the sluice gate, the number of sluice gates the ship passes, and the warning value of the ship passing the sluice gate. The warning level of the ship passing the sluice gate is divided into high risk, medium risk, low risk and no risk, and the values are assigned to 4, 3, 2, and 1 respectively;
[0120] The peak ship traffic period is divided into “yes” and “no”, represented by 1 and 0 respectively;
[0121] The sluice gate switch data indicates whether the sluice gate is opened, the opening time period, the closing time point and the opening frequency;
[0122] The hardware attributes of the sluice gate include the gate number, gate opening and closing machine status data, gate controller status data and gate water flow monitoring sensor status data;
[0123] Specifically, the hardware attributes of the spillway also include vertical displacement, horizontal displacement, inclination, and cracks of the spillway. The relevant data of the vertical displacement, horizontal displacement, inclination, and cracks of the spillway are obtained through a high-definition camera and a speed sensor, and features are extracted from the relevant data to be attributed to the hardware attributes of the spillway.
[0124] The sluice gate software attributes include gate association control software status data and gate network communication module status data, and the gate network communication module is used for network data transmission control between the gate association control software and the sluice gate hardware attributes;
[0125] The characteristic data include weather warning index, sluice gate opening and closing data, ship traffic data, ship traffic peak hours, sluice gate hardware attributes and sluice gate software attributes;
[0126] S32, using the confidence method to extract features, selecting the first feature data from the above feature data, and evaluating the importance of the feature with the hub sluice gate operation and maintenance safety monitoring data within a preset time period, the specific steps are as follows:
[0127] S321. Calculate the confidence of the feature and the target variable. The calculation formula is as follows:
[0128]
[0129] Among them, D(x,y) is the confidence, c(x,y) is the total probability distribution, c(x) and c(y) are conditional probability distributions, x is a feature in the feature set, and y is the feature of the sluice gate operation and maintenance safety monitoring data set;
[0130] S322, sorting according to confidence, and selecting the top two features with the highest scores as the first feature data;
[0131] S33, dividing the first feature data and the second feature data into a training set and a test set, and encoding the first feature data and the second feature data using One-hot.
[0132] Furthermore, the first early warning model includes:
[0133]
[0134] Among them, M 预测i is the first predicted value of the ith time, T 第一特征数据i is the i-th first feature data, S 第二特征数据i is the i-th second feature data, G, H, M and N are weight coefficients.
[0135] Furthermore, the specific structure and steps of the first early warning model in step S4 include:
[0136] S41. The improved GRU network is a two-layer GRU-attention network. The improvement lies in adopting a two-layer GRU network architecture and using an attention mechanism to weightedly merge the candidate hidden state sequences of the first layer GRU and the second layer GRU to obtain a weighted candidate hidden state sequence. Finally, a fully connected layer is added to capture the key information of the weighted candidate hidden state sequence and map it to the space of the final sluice operation and maintenance safety prediction;
[0137] S42, in the first layer GRU, the training set of the first feature data obtained in step S3, including X1 and X2, is input into the first layer GRU to obtain a candidate hidden state sequence Q1 of the first layer GRU, where Q1 = {Q1, Q2, ... Q n}, Q n represents the candidate hidden state of the nth time step of the first layer GRU, where n is the length of the candidate hidden state sequence;
[0138] S43, in the second layer GRU, the training set of the second feature obtained in step S3 and the candidate hidden state sequence H1 obtained in the first layer GRU are input into the second layer GRU together to obtain the candidate hidden state sequence Q2 of the second layer GRU, Q2 = {Q'1, Q'2, ... Q' n}, Q2 represents the candidate hidden state of the second layer GRU at the nth time step;
[0139] S44, in the attention mechanism layer, using the attention mechanism to weightedly merge the candidate hidden state sequence Q1 of the first layer GRU and the candidate hidden state sequence Q2 of the second layer GRU;
[0140] First, the attention coefficient of the candidate hidden state sequence of the two-layer GRU is calculated, including two steps: calculating the weighted value and calculating the attention coefficient;
[0141] The formula for calculating the weighted value is as follows:
[0142] d1=w e *q i +c e ;
[0143] d2=w' e *q' i +c' e ;
[0144] Among them, d1 and d2 correspond to the weighted values of the first layer GRU and the second layer GRU respectively, and q i represents the candidate hidden state of the first layer GRU time step, q' i represents the candidate hidden state of the second layer GRU time step, w e 、w' e Represent the weighted coefficients of the first layer GRU and the second layer GRU, c e 、c' e is bias;
[0145] The formula for calculating the attention coefficient is as follows:
[0146] m1 = tanh(d1);
[0147] m2 = tanh(d2);
[0148] Among them, m1 and m2 are the attention coefficients corresponding to the first layer GRU and the second layer GRU respectively;
[0149] Secondly, the candidate hidden state sequence Q' of the double-layer GRU is weighted and fused using the attention coefficient to obtain the final weighted candidate hidden state sequence. The calculation formula is as follows:
[0150] Q'=m1*Q1+m2*Q2.
[0151] Specifically, in this embodiment, the top two features with the highest scores sorted by confidence are the hardware attributes of the sluice and the software attributes of the sluice. The two features are divided into first feature data, and the first feature data is input into the first layer GRU for safety warning prediction; the other second feature data is input into the second layer GRU for safety warning prediction, and an attention mechanism is added to capture the dependency between the first layer GRU and the second layer GRU, thereby further accelerating the safety warning prediction between different features and not relying on a single feature for warning prediction. In the improved GRU network model, the safety fault warning in the first feature data is used as the main one, and the safety fault warning in the second feature data is used as the auxiliary one. At the same time, the feature correlation relationship in the two layers is captured through the attention mechanism to improve the accuracy of the prediction and the speed of the real-time prediction of the model.
[0152] Furthermore, the first loss function includes:
[0153]
[0154] Among them, K(K 预测i ,K 真实i ) is the matching degree between the i-th predicted value and the true value, K 真实i is the i-th true value, a is the overall offset of the first loss function, b is the coefficient factor between the nonlinear relationships of the first loss function, and z is the adjustment coefficient factor used to control the complexity of the nonlinear relationship. is the transpose of the i-th predicted value.
[0155] Furthermore, fitting the weight coefficients includes:
[0156] The weight coefficients G, H, M and N are fitted by BP neural network algorithm.
[0157] Specifically, the BP neural network calculates the output through forward propagation, and then back-propagates the error to adjust the weight coefficients G, H, M and N and the bias to minimize the prediction error. This process requires multiple iterations until the network converges. When the prediction error is met, the training of the first warning model is stopped. In this embodiment, the prediction error is set to 0.001.
[0158] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0159] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0160] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0161] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0162] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0163] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the apparatus according to an embodiment of the present invention. The present invention may also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may have the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
Claims
1. A method for monitoring and early warning of the operation and maintenance safety of a sluice gate of a large-scale water conservancy hub, characterized in that: The following steps are involved: S1. Obtain historical data of the sluice gate within a certain period of time, and obtain characteristic data related to the sluice gate, including weather warning, dry season information period, sluice gate switch data, sluice gate water flow rate data, ship traffic data, ship traffic peak period, sluice gate hardware attributes and sluice gate software attributes; S2. Preprocess the historical data of the sluice gate within a certain period of time, including outlier processing and water flow velocity granularity selection, and use the weather warning in the feature to calculate the weather warning index and the ship passage data to calculate the navigation speed of the ship passing the sluice gate; S3, jointly statistically analyze the feature data including weather warning index, ship navigation speed of sluice gate, sluice gate water flow rate data, sluice gate hardware attributes and sluice gate software attributes and ship passage data during the water discharge period, design confidence for feature selection, select the top two features with the highest scores as the first feature data, mark the selected two features as X1 and X2, and mark the remaining features as the second feature data, and divide the first feature data and the second feature data into training set and test set; S4, setting a first early warning model, sending the data of the training set to the constructed improved GRU network for training, and adjusting the weight coefficient in the first early warning model to generate multiple first prediction values; S5. Setting a first loss function, obtaining a first true value corresponding to the first predicted value, taking each of the first predicted value and the first true value as parameters, inputting them into the first loss function, and calculating a matching degree between the first predicted value and the first true value; S6. Find the weight coefficient in the first warning model corresponding to the maximum matching degree, and fit the weight coefficient, finally complete the training of the first warning model, and use the first warning model finally completed to provide a safety warning for the operation and maintenance of the sluice gate, wherein the safety warning at least includes classification of the safety type using the Softmax layer.
2. A large-scale water conservancy hub sluice gate operation and maintenance safety monitoring and early warning method according to claim 1, characterized in that: The specific implementation process of step S2 is: S21, processing the outlier data of the sluice gate water flow rate: the sluice gate water flow rate data that appears during non-discharge time is not the real sluice gate water flow rate data, and is meaningless in the prediction of the sluice gate water flow rate data, and is directly eliminated; S22, selecting the granularity of the water discharge flow rate: performing statistical analysis on the water discharge flow rate to obtain water discharge flow rate values of different time granularities, selecting the water discharge flow rate of a preset time granularity for statistics, wherein the water discharge flow rate is obtained by a water flow monitoring sensor; S23. Calculate the weather warning index: Weather warning types include dry season warning, flood season warning, typhoon warning, rainstorm warning, gale warning, lightning warning and fog warning. According to the influence of dry season, flood season, typhoon, rainstorm, gale, lightning and fog on operation and maintenance safety monitoring, their weights m are assigned as 3, 3, 2, 2, 1, 1, 1 in sequence; The formula for calculating the weather warning index is as follows: W=∑ i (m i ), Where W represents the weather warning index, i represents the i-th weather warning type; if no weather warning occurs, the value of the weather warning index is 0; S24. Calculate the navigation speed of the ship passing through the sluice gate.
3. A large-scale water conservancy project sluice gate operation and maintenance safety monitoring and early warning method according to claim 2, characterized in that: The specific implementation process of step S24 is as follows: S241, deploy multiple groups of laser radar sensors on the sluice gates through which the ship is sailing, and obtain navigation data along the surface of the front side of the ship by emitting laser pulse reflections; S242, when the ship passes through the sluice gate, the laser radar sensor collects the navigation data along the front surface in real time, and transmits the data collected by each sensor through wireless communication, and performs time stamp calibration processing on the transmitted data; S243. Based on the multi-band navigation speed data after calibration in S242, a data fusion algorithm is used to integrate the sensor data from different locations, and a filtering algorithm is used to eliminate environmental noise and errors to obtain the navigation speed value of the ship after fusion.
4. A large-scale water conservancy project sluice gate operation and maintenance safety monitoring and early warning method according to claim 3, characterized in that: The S241 specifically includes: S2411. When installing the laser radar sensor, adjust the angle and position of the sensor according to the ship's sailing direction, calibrate the sensor's emission angle and the relative position of the target area, so that the laser radar can directly monitor the surface sailing speed of the front side of the ship; S2412. The laser radar sensor collects data by emitting laser pulses. The laser pulses are emitted to the surface of the front side of the ship and received through the reflected signal. The navigation speed of the surface along the front side of the ship is calculated based on the time difference between the emission and reflection of the laser pulses. The formula is: Where V represents the ship's speed, W represents the distance between the emission and reflection of the laser pulse, and T represents the round-trip time of the laser pulse; The S242 specifically includes: S2421, after each laser radar sensor collects the navigation speed data along the surface of the front side of the ship, the data is transmitted through the wireless communication protocol, and each sensor sends the real-time data to the central processor, and the transmission process includes data packaging, encryption and sending; S2422, after the central processor receives the data packets from each sensor, based on the timestamp information attached to each data packet, the transmission data is calibrated for the timestamp; S2423. After the timestamp is calibrated, the time difference between sensors is compensated. Specifically, the existing time error is smoothed by the Newton interpolation algorithm to ensure that the sensor data maintains consistency in measuring the navigation speed along the surface of the front side of the ship at the same time sequence.
5. A large-scale water conservancy project sluice gate operation and maintenance safety monitoring and early warning method according to claim 4, characterized in that: The S243 specifically includes: S2431, receiving the navigation speed data of the surface along the front side of the ship collected by the laser radar sensors at different positions, the data packet of each sensor includes the navigation speed information and the ship position information, and the navigation speed data of all sensors are fused by using the data fusion algorithm, the formula is: Among them, V t represents the fused navigation speed value along the surface of the front side of the ship; V1, V2, ..., V n Respectively represent the navigation speed measured by each sensor; k1, k2, ..., k n Respectively represent the weight coefficients of the corresponding sensors; S2432. After data fusion, the Kalman filter algorithm is used to eliminate environmental noise from the fused data.
6. A large-scale water conservancy project sluice gate operation and maintenance safety monitoring and early warning method according to claim 1, characterized in that: The specific implementation process of step S3 is as follows: S31. Statistics on the safety monitoring data of sluice gate operation and maintenance during the water release period: The sluice gate operation and maintenance safety monitoring data during the water discharge period are associated with the characteristic data: the ship traffic data during the water discharge period is associated with the dry season and the signal period to obtain the dry season ship traffic data and the signal period ship traffic data of the sluice gate of the preset time granularity; the sluice gate switch data of the reference weather factor of the preset time granularity is obtained by associating with the weather warning index obtained in step S2; the sluice gate switch data of the preset time granularity is obtained by associating with the peak ship traffic period; the sluice gate hardware configuration data of the preset time granularity is obtained by associating with the sluice gate hardware attributes; and the sluice gate software configuration data of the preset time granularity is obtained by associating with the sluice gate software attributes; The ship passage data includes the speed of the ship along the surface, the GPS position of the ship, the time when the ship passes the sluice gate, the number of sluice gates the ship passes, and the warning value of the ship passing the sluice gate. The warning level of the ship passing the sluice gate is divided into high risk, medium risk, low risk and no risk, and the values are assigned to 4, 3, 2, and 1 respectively; The peak ship traffic period is divided into "yes" and "no", represented by 1 and 0 respectively; The sluice gate switch data indicates whether the sluice gate is opened, the opening time period, the closing time point and the opening frequency; The hardware attributes of the sluice gate include the gate number, gate opening and closing machine status data, gate controller status data and gate water flow monitoring sensor status data; The sluice gate software attributes include gate association control software status data and gate network communication module status data, and the gate network communication module is used for network data transmission control between the gate association control software and the sluice gate hardware attributes; The characteristic data include weather warning index, sluice gate opening and closing data, ship traffic data, ship traffic peak hours, sluice gate hardware attributes and sluice gate software attributes; S32, using the confidence method to extract features, selecting the first feature data from the above feature data, and evaluating the importance of the feature with the hub sluice gate operation and maintenance safety monitoring data within a preset time period, the specific steps are as follows: S321. Calculate the confidence of the feature and the target variable. The calculation formula is as follows: Among them, D(x,y) is the confidence, c(x,y) is the total probability distribution, c(x) and c(y) are conditional probability distributions, x is a feature in the feature set, and y is the sluice gate operation and maintenance safety monitoring data set; S322, sorting according to confidence, and selecting the top two features with the highest scores as the first feature data; S33, dividing the first feature data and the second feature data into a training set and a test set, and encoding the first feature data and the second feature data using One-hot.
7. A large-scale water conservancy project sluice gate operation and maintenance safety monitoring and early warning method according to claim 1, characterized in that: The first early warning model includes: Among them, M 预测i is the first predicted value of the ith time, T 第一特征数据i is the i-th first feature data, S 第二特征数据i is the i-th second feature data, G, H, M and N are weight coefficients.
8. A method for monitoring and early warning of the operation and maintenance safety of a sluice gate of a large-scale water conservancy hub according to claim 1, characterized in that: The specific structure and steps of the first early warning model in step S4 include: S41, the improved GRU network is a two-layer GRU-attention network, and its improvement lies in adopting a two-layer GRU network architecture, and using an attention mechanism to weightedly merge the candidate hidden state sequences of the first layer GRU and the second layer GRU to obtain a weighted candidate hidden state sequence, and finally adding a fully connected layer to capture the key information of the weighted candidate hidden state sequence and map it to the space of the final sluice operation and maintenance safety prediction; S42, in the first layer GRU, the training set of the first feature data obtained in step S3, including X1 and X2, is input into the first layer GRU to obtain a candidate hidden state sequence Q1 of the first layer GRU, where Q1 = {Q1, Q2, ... Q n }, Q n represents the candidate hidden state of the nth time step of the first layer GRU, where n is the length of the candidate hidden state sequence; S43, in the second layer GRU, the training set of the second feature obtained in step S3 and the candidate hidden state sequence H1 obtained in the first layer GRU are input into the second layer GRU together to obtain the candidate hidden state sequence Q2 of the second layer GRU, Q2 = {Q'1, Q'2, ... Q' n }, Q2 represents the candidate hidden state of the second layer GRU at the nth time step; S44, in the attention mechanism layer, using the attention mechanism to weightedly merge the candidate hidden state sequence Q1 of the first layer GRU and the candidate hidden state sequence Q2 of the second layer GRU; First, the attention coefficient of the candidate hidden state sequence of the two-layer GRU is calculated, including two steps: calculating the weighted value and calculating the attention coefficient; The formula for calculating the weighted value is as follows: d1=w e *q i +c e ; d2=w' e *q' i +c' e ; Among them, d1 and d2 correspond to the weighted values of the first layer GRU and the second layer GRU respectively, and q i represents the candidate hidden state of the first layer GRU time step, q' i represents the candidate hidden state of the second layer GRU time step, w e 、w' e Represent the weighted coefficients of the first layer GRU and the second layer GRU, c e 、c' e is bias; The formula for calculating the attention coefficient is as follows: m1 = tanh(d1); m2 = tanh(d2); Among them, m1 and m2 are the attention coefficients corresponding to the first layer GRU and the second layer GRU respectively; Secondly, the candidate hidden state sequence Q' of the double-layer GRU is weighted and fused using the attention coefficient to obtain the final weighted candidate hidden state sequence. The calculation formula is as follows: Q'=m1*Q1+m2*Q2.
9. A method for monitoring and early warning of the operation and maintenance safety of a sluice gate of a large-scale water conservancy hub according to claim 1, characterized in that: The first loss function includes: Among them, K(K 预测i ,K 真实i ) is the matching degree between the i-th predicted value and the true value, K 真实i is the i-th true value, a is the overall offset of the first loss function, b is the coefficient factor between the nonlinear relationships of the first loss function, and z is the adjustment coefficient factor used to control the complexity of the nonlinear relationship. is the transpose of the i-th predicted value.
10. A method for monitoring and early warning of the operation and maintenance safety of a sluice gate of a large-scale water conservancy hub according to claim 7, characterized in that: In S6, fitting the weight coefficient includes: The weight coefficients G, H, M and N are fitted by BP neural network algorithm.
Citation Information
Patent Citations
Fault diagnosis system and method based on improved CNN-LSTM model
CN116400675A