A ship lock scheduling method and system based on machine learning

The lock scheduling method based on machine learning utilizes LSTM neural networks and reinforcement learning optimization models, combined with a cloud-edge collaborative architecture, to solve the problem of poor dynamic adaptability in traditional lock scheduling methods, and achieves efficient, safe intelligent scheduling and continuous optimization.

CN122390360APending Publication Date: 2026-07-14ZHONGSHUI SANLI DATA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGSHUI SANLI DATA TECH CO LTD
Filing Date
2026-04-28
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Traditional lock scheduling methods rely on static rules and human experience, resulting in poor dynamic adaptability, low throughput during peak periods, inability to effectively cope with fluctuations in ship traffic and changes in hydrology and meteorology, poor system coordination, insufficient real-time and accuracy of safety monitoring, and a lack of continuous learning mechanisms.

Method used

A machine learning-based lock scheduling method is adopted, which uses LSTM neural network for ship traffic prediction and reinforcement learning scheduling optimization model. Dynamic decision-making and real-time execution are achieved through cloud-edge collaborative architecture, and an anomaly detection mechanism is introduced to establish a self-learning and adaptive intelligent scheduling closed loop.

Benefits of technology

It has improved the throughput efficiency, safety and intelligence of the lock system, enabled real-time identification and dynamic scheduling optimization of complex abnormal behaviors, and ensured the continuous updating of the model and cross-regional collaborative evolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122390360A_ABST
    Figure CN122390360A_ABST
Patent Text Reader

Abstract

The application provides a ship lock scheduling method and system based on machine learning, relates to the technical field of intelligent water transportation, and solves the technical problem of low traffic efficiency in peak period caused by poor dynamic adaptability of traditional ship lock scheduling methods due to reliance on static rules and manual experience. The method comprises the following steps: acquiring ship information data, hydrological and meteorological data, and ship lock state data; inputting the ship information data and the hydrological and meteorological data into a pre-trained ship flow prediction model to obtain ship predicted flow; inputting the ship predicted flow and the ship lock state data into a pre-trained ship lock scheduling optimization model to obtain a ship lock scheduling scheme; and converting the ship lock scheduling scheme into a ship lock scheduling instruction through a cloud-edge collaborative architecture and executing the instruction. The application is used in the ship lock scheduling process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent water transport technology, and in particular to a lock scheduling method and system based on machine learning. Background Technology

[0002] Currently, the field of lock scheduling generally adopts scheduling methods based on preset rules or static algorithms, which are difficult to cope with multi-dimensional dynamic factors such as fluctuations in ship traffic and changes in hydrological and meteorological conditions. Existing technologies mainly suffer from the following limitations: First, the scheduling strategies are rigid and lack adaptive optimization capabilities, failing to dynamically adjust lock chamber allocation and release order according to the real-time navigation environment, resulting in low throughput during peak periods; second, ship traffic prediction relies heavily on manual experience or simple statistical models, with limited accuracy, failing to effectively support forward-looking resource allocation; third, system coordination is poor, with information silos formed between different locks, making it difficult to achieve basin-wide coordinated scheduling and water level coordination; fourth, safety monitoring mainly relies on threshold alarms and manual inspections, resulting in poor real-time identification of complex abnormal behaviors and a high false alarm rate; fifth, model updates are lagging, lacking a continuous learning mechanism, and unable to utilize historical data for self-evolution to adapt to long-term changes in navigation patterns. Therefore, a new generation of lock scheduling methods that can achieve intelligent prediction, dynamic decision-making, real-time coordination, and continuous optimization is urgently needed. Summary of the Invention

[0003] This application provides a lock scheduling method and system based on machine learning, which solves the technical problem that traditional lock scheduling methods have poor dynamic adaptability due to reliance on static rules and human experience, resulting in low throughput efficiency during peak periods.

[0004] To achieve the above objectives, this application adopts the following technical solution: Firstly, a machine learning-based lock scheduling method is provided, including: Acquire ship information data, hydrological and meteorological data, and lock status data; Ship information data and hydrological and meteorological data are input into a pre-trained ship flow prediction model to obtain the predicted ship flow; wherein, the ship flow prediction model is constructed based on an LSTM neural network; Ship traffic forecasts and lock status data are input into a pre-trained lock scheduling optimization model to obtain a lock scheduling scheme; wherein, the lock scheduling optimization model is constructed based on a reinforcement learning algorithm. The cloud-edge collaborative architecture is used to convert the lock scheduling scheme into lock scheduling instructions and execute them.

[0005] Based on the above technical solutions, the machine learning-based lock scheduling method provided in this application achieves a fundamental shift from static rule-driven to dynamic data-driven lock scheduling by constructing an intelligent closed loop of "perception-prediction-decision-execution". First, the flow prediction model based on LSTM neural networks significantly improves the ability to predict ship arrival status, giving the scheduling system a forward-looking capability. Second, the reinforcement learning-based scheduling optimization model can autonomously generate and dynamically adjust scheduling schemes based on real-time prediction results and lock status information, effectively balancing multiple objectives such as throughput efficiency, safety, and energy consumption. Finally, relying on a cloud-edge collaborative architecture, it ensures both continuous training and optimization of complex models in the cloud and real-time, reliable, and secure execution of scheduling commands at the edge, thereby comprehensively improving the throughput capacity, response speed, and intelligence level of the lock system.

[0006] In conjunction with the first aspect above, in one possible implementation, the ship traffic prediction model includes a multimodal input layer, an attention layer, a bidirectional LSTM layer, and an output layer; The multimodal input layer is used to acquire multimodal data; wherein, the multimodal data includes ship information sequences and hydro-meteorological sequences; The attention layer is used to calculate the correlation scores of multimodal data at different times and assign weight coefficients; The bidirectional LSTM layer is used to learn and integrate the contextual dependencies of multimodal data from both forward and backward directions based on the weight coefficients. The output layer is used to output the integrated ship traffic forecast through a fully connected network.

[0007] In conjunction with the first aspect above, in one possible implementation, the training process of the ship traffic prediction model includes: Acquire historical vessel traffic data; wherein, the historical vessel traffic data includes vessel arrival records, hydrological and meteorological data, and time-stamped data; Historical ship traffic data is integrated into training samples using a sliding window method. According to the adversarial training strategy, perturbation data is added to the training samples to obtain adversarial samples; The business complexity score of the adversarial examples is calculated based on the preset business complexity rules, and the adversarial examples are sorted according to the business complexity score to obtain the sorted samples. Construct a training model based on an LSTM neural network; By training the model to be trained in batches using sorted samples, a ship traffic prediction model is obtained.

[0008] In conjunction with the first aspect mentioned above, in one possible implementation, the lock scheduling optimization model includes an environmental state perception module, a scheduling action definition module, an intelligent scheduling decision module, and a reward function module. The environmental state perception module is used to combine the predicted ship flow and lock state data into an environmental state vector. The scheduling action definition module is used to define executable lock scheduling actions, including lock chamber allocation actions, ship release sequence and gate control actions; The intelligent scheduling decision module is used to generate a lock scheduling scheme based on the environmental state vector and lock scheduling actions using the PPO algorithm. The reward function module is used to optimize and adjust the lock scheduling scheme through the reward function to obtain the adjusted lock scheduling scheme; wherein, the reward function includes navigation efficiency, safety risk and energy consumption indicators.

[0009] In conjunction with the first aspect above, in one possible implementation, the cloud-edge collaborative architecture includes a cloud platform and an edge side; The cloud platform is used for training and updating the ship traffic prediction model and the lock scheduling optimization model; and for encapsulating the lock scheduling scheme and distributing it to the edge. The edge side is used to receive and parse the lock scheduling scheme to obtain the lock scheduling command; and to control the lock equipment in real time through the lock scheduling command.

[0010] In conjunction with the first aspect described above, one possible implementation further includes abnormal gate passage behavior detection; wherein, the abnormal gate passage behavior detection includes: Obtain real-time gate passage trajectory; The real-time gate passage trajectory is input into a pre-trained anomaly detection model to obtain a predicted gate passage trajectory; wherein, the anomaly detection model is built based on Autoencoder; Calculate the reconstruction error between the real-time gate passage trajectory and the predicted gate passage trajectory, and compare the reconstruction error with a preset error threshold; When the reconstruction error exceeds the error threshold, the real-time gate passage trajectory is marked as abnormal gate passage behavior, and an anomaly detection result is generated. The lock scheduling plan is adjusted in real time based on the anomaly detection results.

[0011] In conjunction with the first aspect above, in one possible implementation, the training method of the anomaly detection model includes: Obtain historical normal gate passage data; Simulated normal gate passage data is generated using GAN, and historical normal gate passage data and simulated normal gate passage data are labeled as normal training sets; Based on unsupervised training, the anomaly detection model is trained using a normal training set to obtain the trained anomaly detection model.

[0012] In conjunction with the first aspect described above, one possible implementation also includes continuous model optimization; wherein, the continuous model optimization includes: The scheduling results data are collected in real time through the stream processing platform; The ship traffic prediction model is periodically and incrementally updated using scheduling results data; A joint training framework was established among multiple lock systems based on federated learning. Collaborative optimization of cross-regional lock models is achieved through a joint training framework.

[0013] In conjunction with the first aspect above, in one possible implementation, the method for acquiring the multimodal data includes: The ship information data is cleaned using the Kalman filtering algorithm to obtain cleaned data; Feature extraction was performed on the cleaning data and hydro-meteorological data through spatiotemporal feature engineering to obtain ship information features and hydro-meteorological features. The integrity of ship information characteristics and hydro-meteorological characteristics is verified and standardized through a data verification mechanism to obtain ship information sequences and hydro-meteorological sequences.

[0014] Secondly, a machine learning-based lock scheduling system is provided, including a data acquisition module, a prediction processing module, a scheduling optimization module, and an execution control module. The data acquisition module is used to acquire ship information data, hydrological and meteorological data, and lock status data; The prediction processing module is used to input ship information data and hydrological and meteorological data into a pre-trained ship flow prediction model to obtain the predicted ship flow. The scheduling optimization module is used to input the predicted ship flow and lock status data into the pre-trained lock scheduling optimization model to obtain the lock scheduling scheme. The execution control module is used to convert the lock scheduling scheme into lock scheduling instructions and execute them through a cloud-edge collaborative architecture.

[0015] This application provides a machine learning-based lock scheduling method and system. First, by utilizing a prediction model that integrates an attention mechanism and a bidirectional LSTM, high-precision time-series prediction of ship traffic flow is achieved, providing reliable preliminary information for scheduling decisions. Second, an optimization model based on reinforcement learning can autonomously generate dynamic scheduling schemes according to real-time environmental conditions, achieving a multi-objective balance optimization of efficiency, safety, and energy consumption. Third, through a cloud-edge collaborative architecture, the system ensures real-time and reliable execution of scheduling commands while guaranteeing global optimization and model training capabilities. Fourth, an anomaly detection mechanism based on generative adversarial networks and autoencoders is introduced, significantly improving the automatic identification capability and safety monitoring level of complex abnormal lock passage behaviors. Finally, by leveraging federated learning and streaming incremental update mechanisms, the system can achieve cross-regional collaborative evolution and continuous optimization while protecting data privacy, forming a complete intelligent scheduling closed loop with self-learning, self-adaptation, and self-evolution capabilities, thereby comprehensively improving the navigation efficiency, safety level, and operational intelligence of the lock system.

[0016] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description

[0017] Figure 1 A flowchart illustrating a machine learning-based lock scheduling method provided in this application embodiment; Figure 2 A schematic diagram illustrating the training process of a ship traffic prediction model provided in an embodiment of this application; Figure 3 A flowchart illustrating an abnormal gate crossing behavior detection method provided in an embodiment of this application; Figure 4 This is a system architecture diagram of a machine learning-based lock scheduling system provided in an embodiment of this application. Detailed Implementation

[0018] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.

[0019] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0020] To address the technical problem of traditional lock scheduling methods, which rely on static rules and manual experience and suffer from poor dynamic adaptability, resulting in low throughput during peak periods, this application provides a machine learning-based lock scheduling method, which includes: Acquire ship information data, hydrological and meteorological data, and lock status data; Ship information data and hydrological and meteorological data are input into a pre-trained ship flow prediction model to obtain the predicted ship flow; wherein, the ship flow prediction model is constructed based on an LSTM neural network; Ship traffic forecasts and lock status data are input into a pre-trained lock scheduling optimization model to obtain a lock scheduling scheme; wherein, the lock scheduling optimization model is constructed based on a reinforcement learning algorithm. The cloud-edge collaborative architecture is used to convert the lock scheduling scheme into lock scheduling instructions and execute them.

[0021] Based on this, the technical problem of low throughput during peak periods caused by the poor dynamic adaptability of traditional lock scheduling methods that rely on static rules and human experience has been solved.

[0022] like Figure 1 As shown in the figure, an embodiment of this application provides a lock scheduling method based on machine learning, including: S201. Obtain ship information data, hydrological and meteorological data, and lock status data.

[0023] For example, IoT devices such as AIS base stations, RFID readers, ultrasonic water level gauges, and weather stations deployed in lock areas and waterways can collect multi-dimensional data such as ship latitude and longitude, speed, identification, real-time water level, wind speed, and visibility in real time. After these raw data are transmitted to the dispatch center via the communication network, the AIS positioning data is first cleaned using a Kalman filter algorithm, reducing the ship trajectory error from more than 10 meters before cleaning to less than 3 meters, effectively eliminating GPS drift points. At the same time, RFID data and hydrological and meteorological data are integrated into a unified spatiotemporal data stream after being timestamped and standardized in format.

[0024] S202. Input ship information data and hydrological and meteorological data into the pre-trained ship flow prediction model to obtain the predicted ship flow.

[0025] The ship traffic prediction model is constructed based on an LSTM neural network.

[0026] In some implementations, the ship traffic prediction model includes a multimodal input layer, an attention layer, a bidirectional LSTM layer, and an output layer; The multimodal input layer is used to acquire multimodal data; wherein, the multimodal data includes ship information sequences and hydro-meteorological sequences; The attention layer is used to calculate the correlation scores of multimodal data at different times and assign weight coefficients; The bidirectional LSTM layer is used to learn and integrate the contextual dependencies of multimodal data from both forward and backward directions based on the weight coefficients. The output layer is used to output the integrated ship traffic forecast through a fully connected network.

[0027] For example, the multimodal input layer synchronously receives a 72-hour sequence of ship AIS position coordinates, a sequence of lock passage timestamps recorded by RFID, and minute-level time series of wind speed, wind direction, and water level collected by sensors during the corresponding time period. The attention layer dynamically analyzes the correlation between data at different times based on a multi-head self-attention mechanism. For example, when predicting the evening peak flow, it assigns significant weight coefficients to the ship acceleration and aggregation pattern in the upstream waters in the afternoon and specific wind direction changes. The bidirectional LSTM layer then learns the transmission pattern of historical flow to the future and the re-evaluation of historical patterns by future weather warnings from the forward and backward time series dimensions, respectively, based on these weights, to achieve a deep integration of the complex causes of ship arrival behavior. Finally, the output layer maps the learned time series representation to hourly ship flow predictions for the next 6 hours through a three-layer fully connected network.

[0028] In this embodiment of the application, by integrating the attention mechanism and the bidirectional LSTM prediction model, the intrinsic correlation of multi-source heterogeneous time-series information is adaptively modeled and fused, enabling it to output more accurate and physically interpretable traffic predictions when facing nonlinear and strongly coupled real-world navigation environments, thus providing a high-quality decision-making basis for dynamic scheduling.

[0029] In some implementations, the training process of the ship traffic prediction model, such as Figure 2 As shown, it includes: S31. Obtain historical vessel traffic data; wherein, the historical vessel traffic data includes vessel arrival records, hydrological and meteorological data, and time-stamped data; S32. Historical ship traffic data are integrated into training samples using the sliding window method; S33. Add perturbation data to the training samples according to the adversarial training strategy to obtain adversarial samples; S34. Calculate the business complexity score of the adversarial examples based on the preset business complexity rules, and sort the adversarial examples according to the business complexity scores to obtain sorted samples; S35. Construct a training model based on an LSTM neural network; S36. Train the model to be trained in batches using sorted samples to obtain the ship traffic prediction model.

[0030] It should be noted that the business complexity rules include holiday coefficients, time period coefficients, meteorological condition coefficients, hydrological condition coefficients, ship flow fluctuation coefficients, ship mixing coefficients, and special event coefficients. Different weights are assigned to different complexity coefficients by those skilled in the art, and the business complexity score is obtained by weighted summation of the different coefficients.

[0031] For example, historical ship arrival records for three consecutive years, wind speed and water level data for the corresponding time periods, and precise time labels were collected. This data was then integrated into nearly 10,000 training samples using a 72-hour sliding window. Subsequently, based on an adversarial training strategy, random disturbances conforming to the Weiber distribution were injected into the wind speed sequence, and simulated non-Gaussian noise was added to the ship position coordinates, constructing a more robust adversarial sample library. To further optimize the learning path, the system calculates a multi-dimensional business complexity score for each sample. For instance, a higher holiday coefficient of 2.5 is assigned to samples from the first day of the National Day holiday, a meteorological condition coefficient of 3.0 is assigned to samples with winds of force 6 or higher, and a ship mixing coefficient of 2.0 is assigned to samples containing both cargo ships and fleets. After expert weighting, the final score of a complex scenario sample can reach more than 3.5 times that of a regular sample. The training program sorts samples from low to high scores and progressively trains the model in three batches, allowing it to first master the daily stable flow pattern and then gradually overcome the extreme conditions of holiday peaks coupled with severe weather.

[0032] In some implementations, the method of acquiring the multimodal data includes: The ship information data is cleaned using the Kalman filtering algorithm to obtain cleaned data; Feature extraction was performed on the cleaning data and hydro-meteorological data through spatiotemporal feature engineering to obtain ship information features and hydro-meteorological features. The integrity of ship information characteristics and hydro-meteorological characteristics is verified and standardized through a data verification mechanism to obtain ship information sequences and hydro-meteorological sequences.

[0033] It should be noted that the spatiotemporal feature engineering includes extracting ship temporal trajectory features, extracting spatiotemporal context features, and extracting hydrological and meteorological features. The extraction methods for ship temporal trajectory features include: extracting motion state features and intent inference features through statistical calculations based on sliding windows and kinematic model derivation. The motion state features include instantaneous features, dynamic change features, and stability features. The intent inference features include arrival time at the lock, trajectory deviation, and turning features. The extraction methods for spatiotemporal context features include: extracting grid-level traffic flow features, ship-to-ship interaction features, and global statistical features through spatiotemporal gridding and statistical aggregation. The ship temporal trajectory features and spatiotemporal context features are marked as ship information features. The extraction methods for hydrological and meteorological features include: extracting meteorological features and hydrological features through spatiotemporal alignment and influence weight calculation.

[0034] For example, instantaneous features include the current speed, heading, and latitude / longitude; dynamic features include the average acceleration calculated within a fixed time window, reflecting the ship's maneuverability; stability features include the standard deviation of speed and heading, determining whether the navigation is smooth; arrival time is dynamically predicted based on the current position, speed, and heading, indicating the remaining time to reach the lock; trajectory deviation is calculated as the average distance deviation between the actual trajectory and the ideal route, providing early warning of deviation; turning features include the calculation of turning angular velocity and radius of curvature, identifying whether the ship is turning or adjusting its attitude; grid-level traffic flow features include statistics on the number of ships, average speed, and ship traffic volume in each grid within a specific time period; ship-to-ship interaction features include the calculation of the closest distance, relative speed, and expected encounter time between the target ship and surrounding ships, quantifying collision risk; global statistical features include statistics on the total number, average length, and ship type distribution of ships currently waiting to enter the lock area; meteorological features include wind speed, visibility, and precipitation intensity; and hydrological features include water level difference and flow velocity.

[0035] S203. Input the predicted ship flow and lock status data into the pre-trained lock scheduling optimization model to obtain the lock scheduling scheme.

[0036] The lock scheduling optimization model is constructed based on a reinforcement learning algorithm.

[0037] In some implementations, the lock scheduling optimization model includes an environmental state perception module, a scheduling action definition module, an intelligent scheduling decision module, and a reward function module; The environmental state perception module is used to combine the predicted ship flow and lock state data into an environmental state vector. The scheduling action definition module is used to define executable lock scheduling actions, including lock chamber allocation actions, ship release sequence and gate control actions; The intelligent scheduling decision module is used to generate a lock scheduling scheme based on the environmental state vector and lock scheduling actions using the PPO algorithm. The reward function module is used to optimize and adjust the lock scheduling scheme through the reward function to obtain the adjusted lock scheduling scheme; wherein, the reward function includes navigation efficiency, safety risk and energy consumption indicators.

[0038] For example, the environmental state perception module represents the environment with a 128-dimensional vector that integrates the predicted ship flow for the next two hours, the current water depth and gate opening status of the lock chamber, and the size and draft data of the 12 ships in the waiting queue. The scheduling action definition module concretizes the action space into a combination of discrete and continuous variables. For example, it assigns the four cargo ships that have arrived to lock chambers 1 and 3, determines their entry sequence as BADC, and generates a precise control command to open gate 1 at a rate of 0.8 meters per minute. The intelligent scheduling decision module is driven by the PPO algorithm. Its policy network has been trained for 15 days in a digital twin simulation environment and has learned to select efficient action sequences under different flow densities and water levels. The reward function module designs a multi-objective function. The navigation efficiency reward is negatively correlated with the average waiting time of ships, the safety risk reward is based on the minimum distance calculated in real time between ships, and the energy consumption reward is linked to the frequency and magnitude of gate actions. In a test simulating an evening peak, the system generated a lock scheduling scheme for a complex queue containing 18 ships.

[0039] In this embodiment, an optimization model based on reinforcement learning (PPO algorithm) is introduced. The system continuously interacts with the environment to autonomously optimize the scheduling strategy and dynamically adjusts the lock chamber allocation and release order according to real-time ship flow, water level and other data. This improvement enables the system to maintain a high throughput during peak periods, effectively shortens the lock passage time, and intelligently balances multiple objectives such as efficiency, energy consumption and safety, solving the problem of rigid scheduling in complex scenarios of traditional methods.

[0040] S204. Convert the lock scheduling scheme into lock scheduling instructions and execute them through a cloud-edge collaborative architecture.

[0041] In some implementations, the cloud-edge collaborative architecture includes a cloud platform and an edge side; The cloud platform is used for training and updating the ship traffic prediction model and the lock scheduling optimization model; and for encapsulating the lock scheduling scheme and distributing it to the edge. The edge side is used to receive and parse the lock scheduling scheme to obtain the lock scheduling command; and to control the lock equipment in real time through the lock scheduling command.

[0042] For example, a cloud platform deployed in a data center is equipped with multiple servers featuring A100 GPUs. Every day at midnight, it automatically starts a training process, using encrypted data from dozens of locks collected over the past 24 hours to incrementally train and iterate the ship traffic prediction and scheduling optimization models. Once training is complete, the cloud platform encapsulates the latest scheduling scheme generated for a key lock into an encrypted policy data packet of approximately 50KB, and distributes it to the edge device at the lock site via a dedicated fiber optic network. The core of the edge device is an industrial-grade NVIDIA Jetson AGXXavier computing module, which decrypts and parses the data packet within 50 milliseconds of receiving it, converting it in real-time into a sequence of control commands that can directly drive the gate servo motors, channel lights, and broadcasting system. In one actual operation, based on the scheme distributed from the cloud, the edge device continuously and accurately completed a series of operations within 90 seconds, including guiding three cargo ships into the lock, opening and closing the gates, and adjusting the water level, without any command delays or parsing errors.

[0043] In this embodiment, the model’s continuous evolution and global optimization are achieved through centralized computing power in the cloud. At the same time, the reliable computing at the edge ensures the extremely low latency, determinism and execution of control commands. While reducing network dependence and bandwidth pressure, this ensures the high responsiveness, high availability and high security of the entire scheduling system when facing complex field conditions.

[0044] Some implementations also include abnormal gate passage behavior detection; wherein, the abnormal gate passage behavior detection, such as Figure 3 As shown, it includes: S61. Obtain real-time gate passage trajectory; S62. Input the real-time gate passage trajectory into a pre-trained anomaly detection model to obtain the predicted gate passage trajectory; wherein, the anomaly detection model is constructed based on an Autoencoder; S63. Calculate the reconstruction error of the real-time gate passage trajectory and the predicted gate passage trajectory, and compare the reconstruction error with the preset error threshold; S64. When the reconstruction error is greater than the error threshold, the real-time gate passage trajectory is marked as abnormal gate passage behavior, and an abnormal detection result is generated; S65. Adjust the lock scheduling plan in real time based on the anomaly detection results.

[0045] For example, video surveillance and AIS base stations deployed on both sides of the lock chamber collect the real-time lock-passing trajectory of the vessel once per second. This trajectory data is encoded into a 200-dimensional time-series vector containing position coordinates, heading angle, and speed. This vector is input in real time into a pre-trained anomaly detection model, which is built on a deep convolutional autoencoder architecture. The encoder compresses the input into 32-dimensional latent features, and the decoder reconstructs the theoretically correct predicted lock-passing trajectory that the vessel should follow. The system then calculates the Euclidean distance between the real-time trajectory and the predicted trajectory at each time step and takes the average as the reconstructed trajectory. The error threshold, set to 0.35 after calibration with historical data, was used to measure the error. In one actual monitoring, a large cargo ship experienced a sudden change in course due to the influence of water flow during its entry into the lock. The calculated error of its trajectory reconstruction reached 0.42. The system immediately marked the trajectory as an abnormal lock passage behavior and generated a detection result containing the ship ID, the abnormality type as course deviation, and the current lock chamber position. Within milliseconds of receiving the result, the dispatch center automatically sent a scheduling adjustment plan to the lock chamber to suspend the release of subsequent ships and initiate corrective navigation instructions, while simultaneously notifying the on-site operator to intervene.

[0046] In this embodiment, a high-precision dynamic benchmark is established by introducing a generative adversarial network (GAN) and an autoencoder, enabling the model to sensitively and reliably identify various unknown abnormal patterns that deviate from the benchmark. This transforms safety monitoring from post-event tracing and fixed rule alarms into real-time, predictive proactive intervention, significantly enhancing the overall safety and emergency response capabilities of the lock operation.

[0047] In some implementations, the training method of the anomaly detection model includes: Obtain historical normal gate passage data; Simulated normal gate passage data is generated using GAN, and historical normal gate passage data and simulated normal gate passage data are labeled as normal training sets; Based on unsupervised training, the anomaly detection model is trained using a normal training set to obtain the trained anomaly detection model.

[0048] For example, over 100,000 manually verified ship trajectory data points marked as normal lock passage over the past three years were collected. These data, sourced from an AIS and video fusion system, included typical lock passage paths for different ship types under various hydrological conditions. Subsequently, the system utilized a data augmenter built on a deep convolutional GAN. The generator's input consisted of random noise and a conditional vector, while the discriminator was composed of a five-layer convolutional network. Through 50,000 rounds of adversarial training, the GAN was able to generate simulated normal lock passage trajectories that were highly consistent with the distribution of real data and exhibited diverse forms, resulting in a total of 50,000 high-quality synthetic trajectories. These generated trajectories, together with the original historical data, constituted a larger-scale normal training set with more comprehensive scenario coverage. Based on this training set, a structurally symmetric convolutional autoencoder was trained in an unsupervised manner. Its encoder progressively learned the core features that compressed high-dimensional trajectory data into a low-dimensional latent space, while the decoder learned to accurately reconstruct the original trajectory from these features. After twenty rounds of training, the model's average reconstruction error on the independent validation set converged to a low and stable level.

[0049] In this embodiment of the application, by integrating real data and high-quality synthetic data, a benchmark model that is highly sensitive to normal behavior and significantly distinguishes abnormal behavior is effectively constructed, which greatly improves the system's ability to generalize detection of unknown risks and the overall level of security protection.

[0050] Some implementations also include continuous model optimization; wherein, the continuous model optimization includes: The scheduling results data are collected in real time through the stream processing platform; The ship traffic prediction model is periodically and incrementally updated using scheduling results data; A joint training framework was established among multiple lock systems based on federated learning. Collaborative optimization of cross-regional lock models is achieved through a joint training framework.

[0051] It should be noted that the federated learning framework enables multiple geographically dispersed lock systems to participate in collaborative training. Each local lock system calculates the model update gradient on its local dataset and uploads the encrypted gradient to the central aggregation server. The central aggregation server securely aggregates the encrypted gradient, generates a global model update, and distributes it to all participants, thereby achieving collaborative improvement of model performance without sharing the original data.

[0052] For example, the Apache Kafka stream processing platform deployed at each lock gathers log data every minute, including actual ship passage time, lock chamber utilization, and scheduling command execution status. The cloud-based model management service triggers an incremental learning task every hour, using the scheduling results data collected in the past hour to fine-tune the LSTM layer weights of the ship traffic prediction model. Meanwhile, eight important lock nodes in the upper, middle, and lower reaches of a certain river basin participate in building a federated learning joint training framework. Each node retains its encrypted data from the past week locally, calculates the local model update gradient using this data every morning, and uploads the approximately 10MB encrypted gradient to the regional central aggregation server using the Paillier homomorphic encryption algorithm. The server aggregates and averages the encrypted gradient in a secure environment to generate a global model update file, which is then distributed to all participating nodes. In actual operation, when a newly built downstream lock first accesses the framework, its local model's traffic prediction error is significantly higher than the average level. However, after participating in five rounds of federated collaborative updates, its prediction accuracy rapidly improves to a level comparable to that of mature upstream locks, and the original navigation data of each lock is always retained locally throughout the entire process.

[0053] In this embodiment, a continuously evolving ecosystem of "data remains stationary while the model moves" is constructed through federated learning and streaming incremental update mechanism. This enables individual locks to rapidly improve their own model performance by utilizing global knowledge while strictly protecting local data sovereignty and privacy. From the system level, the collaborative growth and dynamic equilibrium of lock swarm intelligence are realized, significantly enhancing the overall adaptability, robustness, and knowledge sharing efficiency of the entire water transport network scheduling system.

[0054] Based on the above technical solutions, this application provides a machine learning-based lock scheduling method. First, by utilizing a prediction model that integrates an attention mechanism and a bidirectional LSTM, high-precision time-series prediction of ship traffic flow is achieved, providing reliable preliminary information for scheduling decisions. Second, an optimization model based on reinforcement learning can autonomously generate dynamic scheduling schemes according to real-time environmental conditions, achieving a multi-objective balance optimization of efficiency, safety, and energy consumption. Third, through a cloud-edge collaborative architecture, the real-time and reliable execution of scheduling commands is ensured while guaranteeing global optimization and model training capabilities. Fourth, an anomaly detection mechanism based on generative adversarial networks and autoencoders is introduced, significantly improving the automatic identification capability and safety monitoring level of complex abnormal lock passage behaviors. Finally, by leveraging federated learning and streaming incremental update mechanisms, the system can achieve cross-regional collaborative evolution and continuous optimization while protecting data privacy, forming a complete intelligent scheduling closed loop with self-learning, self-adaptation, and self-evolution capabilities, thereby comprehensively improving the navigation efficiency, safety level, and operational intelligence of the lock system.

[0055] In one possible implementation, this application embodiment also provides a lock scheduling system 100 based on machine learning, such as... Figure 4 As shown, the system includes a data acquisition module 10, a prediction processing module 20, a scheduling optimization module 30, and an execution control module 40. Among them, the data acquisition module 10 is used to acquire ship information data, hydrological and meteorological data and lock status data; Prediction processing module 20 is used to input ship information data and hydro-meteorological data into a pre-trained ship flow prediction model to obtain the predicted ship flow. The scheduling optimization module 30 is used to input the predicted ship flow and lock status data into the pre-trained lock scheduling optimization model to obtain the lock scheduling scheme. The execution control module 40 is used to convert the lock scheduling scheme into lock scheduling instructions and execute them through the cloud-edge collaborative architecture.

[0056] For example, the data acquisition module 10 collects real-time data on ship latitude and longitude, speed, identification, real-time water level, wind speed, and visibility once per second through 12 AIS base stations, 8 RFID readers, 4 ultrasonic water level gauges, and 2 automatic weather stations distributed within the lock area and a three-kilometer waterway upstream and downstream. This data is then aggregated to a local server via a 5G private network. The prediction processing module 20 is mounted on a high-performance GPU server in the cloud. Its core is a trained bidirectional LSTM model with a fusion attention mechanism. This model starts every ten minutes, inputting a structured data sequence from the past 72 hours and outputting hourly predicted ship traffic for the next 6 hours. The average absolute error between the predicted traffic and the subsequent actual traffic has been maintained at 7.5 vessels per hour over long-term observation. Scheduling optimization... Module 30 also runs in the cloud. It receives predicted flow and real-time gate opening and lock chamber water depth status synchronized from the edge gateway. Through an agent trained based on the PPO algorithm, it performs millisecond-level decision simulation in the digital twin environment to generate an optimized scheme that includes ship sequencing, lock chamber allocation, and gate operation timing. The execution control module 40 consists of edge computing devices and a PLC system deployed in the lock area control room. After receiving the scheduling scheme from the cloud, the edge devices parse it into specific control commands within 50 milliseconds and drive the corresponding gate opening and closing machines, channel signal lights, and voice broadcasting system to execute automatically via industrial Ethernet. In a complete scheduling cycle, the system successfully generated a dynamic scheduling scheme for a continuously arriving mixed fleet of 15 ships, and the entire lock passage process did not trigger any manual intervention alarms.

[0057] Based on the above technical solutions, a complete closed loop from global perception, intelligent prediction, automatic decision-making to precise execution has been constructed through modular division of labor and cloud-edge collaboration, which significantly improves the overall automation level, scientific nature of decision-making and reliability of lock scheduling.

[0058] In implementation, each step of the method provided in this embodiment can be completed by integrated logic circuits in the processor or by instructions in software form. The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.

[0059] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks (SSDs)).

[0060] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.

[0061] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.

Claims

1. A lock scheduling method based on machine learning, characterized in that, include: Acquire ship information data, hydrological and meteorological data, and lock status data; Ship information data and hydrological and meteorological data are input into a pre-trained ship flow prediction model to obtain the predicted ship flow. By inputting the predicted ship traffic and lock status data into a pre-trained lock scheduling optimization model, a lock scheduling scheme is obtained. The cloud-edge collaborative architecture is used to convert the lock scheduling scheme into lock scheduling instructions and execute them.

2. The lock scheduling method based on machine learning according to claim 1, characterized in that, The ship traffic prediction model includes a multimodal input layer, an attention layer, a bidirectional LSTM layer, and an output layer; The multimodal input layer is used to acquire multimodal data; wherein, the multimodal data includes ship information sequences and hydro-meteorological sequences; The attention layer is used to calculate the correlation scores of multimodal data at different times and assign weight coefficients; The bidirectional LSTM layer is used to learn and integrate the contextual dependencies of multimodal data from both forward and backward directions based on the weight coefficients. The output layer is used to output the integrated ship traffic forecast through a fully connected network.

3. The lock scheduling method based on machine learning according to claim 2, characterized in that, The training process of the ship traffic prediction model includes: Acquire historical vessel traffic data; wherein, the historical vessel traffic data includes vessel arrival records, hydrological and meteorological data, and time-stamped data; Historical ship traffic data is integrated into training samples using a sliding window method. According to the adversarial training strategy, perturbation data is added to the training samples to obtain adversarial samples; The business complexity score of the adversarial examples is calculated based on the preset business complexity rules, and the adversarial examples are sorted according to the business complexity score to obtain the sorted samples. Construct a training model based on an LSTM neural network; By training the model to be trained in batches using sorted samples, a ship traffic prediction model is obtained.

4. The lock scheduling method based on machine learning according to claim 1, characterized in that, The lock scheduling optimization model includes an environmental state perception module, a scheduling action definition module, an intelligent scheduling decision module, and a reward function module. The environmental state perception module is used to combine the predicted ship flow and lock status data into an environmental state vector. The scheduling action definition module is used to define executable lock scheduling actions, including lock chamber allocation actions, ship release sequence and gate control actions; The intelligent scheduling decision module is used to generate a lock scheduling scheme based on the environmental state vector and lock scheduling actions using the PPO algorithm. The reward function module is used to optimize and adjust the lock scheduling scheme through the reward function to obtain the adjusted lock scheduling scheme; wherein, the reward function includes navigation efficiency, safety risk and energy consumption indicators.

5. The lock scheduling method based on machine learning according to claim 1, characterized in that, The cloud-edge collaborative architecture includes a cloud platform and an edge side; The cloud platform is used for training and updating the ship traffic prediction model and the lock scheduling optimization model; and for encapsulating the lock scheduling scheme and distributing it to the edge. The edge side is used to receive and parse the lock scheduling scheme to obtain the lock scheduling command; and to control the lock equipment in real time through the lock scheduling command.

6. The lock scheduling method based on machine learning according to claim 1, characterized in that, It also includes abnormal gate passage behavior detection; wherein, the abnormal gate passage behavior detection includes: Obtain real-time gate passage trajectory; The real-time gate passage trajectory is input into a pre-trained anomaly detection model to obtain a predicted gate passage trajectory; wherein, the anomaly detection model is built based on Autoencoder; Calculate the reconstruction error between the real-time gate passage trajectory and the predicted gate passage trajectory, and compare the reconstruction error with a preset error threshold; When the reconstruction error exceeds the error threshold, the real-time gate passage trajectory is marked as abnormal gate passage behavior, and an anomaly detection result is generated. The lock scheduling plan is adjusted in real time based on the anomaly detection results.

7. The lock scheduling method based on machine learning according to claim 6, characterized in that, The training methods for the anomaly detection model include: Obtain historical normal gate passage data; Simulated normal gate passage data is generated using GAN, and historical normal gate passage data and simulated normal gate passage data are labeled as normal training sets; Based on unsupervised training, the anomaly detection model is trained using a normal training set to obtain the trained anomaly detection model.

8. The lock scheduling method based on machine learning according to claim 1, characterized in that, It also includes continuous model optimization; wherein, the continuous model optimization includes: The scheduling results data are collected in real time through the stream processing platform; The ship traffic prediction model is periodically and incrementally updated using scheduling results data; A joint training framework was established among multiple lock systems based on federated learning. Collaborative optimization of cross-regional lock models is achieved through a joint training framework.

9. The lock scheduling method based on machine learning according to claim 2, characterized in that, The methods for acquiring the multimodal data include: The ship information data is cleaned using the Kalman filtering algorithm to obtain cleaned data; Feature extraction was performed on the cleaning data and hydro-meteorological data through spatiotemporal feature engineering to obtain ship information features and hydro-meteorological features. The integrity of ship information characteristics and hydro-meteorological characteristics is verified and standardized through a data verification mechanism to obtain ship information sequences and hydro-meteorological sequences.

10. A machine learning-based lock scheduling system, applied to the machine learning-based lock scheduling method as described in any one of claims 1-9, characterized in that, It includes a data acquisition module, a prediction processing module, a scheduling optimization module, and an execution control module; The data acquisition module is used to acquire ship information data, hydrological and meteorological data, and lock status data; The prediction processing module is used to input ship information data and hydrological and meteorological data into a pre-trained ship flow prediction model to obtain the predicted ship flow. The scheduling optimization module is used to input the predicted ship flow and lock status data into the pre-trained lock scheduling optimization model to obtain the lock scheduling scheme. The execution control module is used to convert the lock scheduling scheme into lock scheduling instructions and execute them through a cloud-edge collaborative architecture.