Ship port entering and leaving prediction method based on multi-modal neural network and adaptive LSTM

By using multimodal neural network and adaptive LSTM methods in ship entry and exit prediction, integrating ship position, environment and historical data, the problems of inaccurate prediction and poor adaptability in the existing technology are solved, and efficient and intelligent fishing port management and operation are achieved.

CN120123976APending Publication Date: 2025-06-10LIANKE YUNCHUANG (BEIJING) TECH CO LTD
View PDF 0 Cites 16 Cited by

Patent Information

Application Number
CN202510192523.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately predict the complex laws of ships entering and leaving the port. The model lacks real-time and adaptability when processing dynamically changing data, and it is difficult to effectively integrate multiple data sources, resulting in low accuracy of the prediction results.

Method used

A multimodal neural network and adaptive LSTM method is adopted to integrate ship position data, environmental data and historical inbound and outbound data to perform multimodal data fusion and deep learning to predict the inbound, outbound behavior and time of ships.

Benefits of technology

Accurate prediction of the time, route and possible obstacles in the port, optimize the resource scheduling of fishing ports, improve operational efficiency and safety, and promote the construction and development of smart fishing ports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123976A_ABST
    Figure CN120123976A_ABST
Patent Text Reader

Abstract

The invention discloses a ship arrival and departure prediction method based on a multi-modal neural network and an adaptive LSTM, and the method comprises the following steps: S1, collecting data, including ship position data, environment data and historical arrival and departure data; s2, data preprocessing: cleaning and standardizing the data; s3, feature extraction optimization is carried out on various types of data; s4, performing multi-modal data fusion, including data splicing fusion, data weighted fusion and data deep fusion; s5, training and constructing a self-adaptive LSTM model, wherein the self-adaptive LSTM model predicts the port entering and leaving behaviors and time of the ship; s6, evaluating and optimizing a self-adaptive LSTM (Long Short Term Memory) model; s7, performing real-time prediction and scheduling; and S8, dynamically predicting and providing scheduling suggestions. Based on the ship position data, the environment data and the historical port entering and leaving data, the multi-mode neural network is used for data fusion, the port entering and leaving prediction model based on the self-adaptive LSTM is constructed, and the prediction accuracy and real-time performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data analysis and prediction, and particularly to a ship in-and-out port prediction method based on a multi-modal neural network and adaptive LSTM. Background Art

[0002] A fishing port is an important fishery resource and shipping base, and the dynamic prediction of ships entering and leaving the port is of great significance to fishing port management and shipping operations. However, due to the influence of various factors on ships entering and leaving the fishing port, such as weather conditions, waterway conditions, and ship status, its dynamics and complexity pose challenges to prediction and management.

[0003] Existing methods for predicting ships entering and leaving the port have the following problems: First, there is a lack of reasonable integration, which makes the model unable to fully explore the correlations and synergistic effects between data, and it is difficult to accurately grasp the complex laws of ships entering and leaving the port.

[0004] Second, when the model predicts the time of ships entering and leaving the port, it may rely on fixed rules or empirical formulas and is difficult to process dynamically changing data in real time. At the same time, due to insufficient data utilization and model adaptability problems, the accuracy of the prediction results is not high, and it cannot reflect the actual situation of ships entering and leaving the port in a timely and accurate manner, which is not conducive to the efficient operation of the port and the rational allocation of resources.

[0005] Third, the model is constructed based on conventional machine learning algorithms, with insufficient flexibility and difficulty in adapting to complex and changeable port environments and ship behaviors. When facing different types of data inputs and environmental changes, it is unable to automatically adjust the model structure and parameters, and is prone to overfitting or underfitting problems, resulting in weak robustness and generalization ability of the model in practical applications and being unable to effectively handle various actual scenarios.

[0006] Fourth, most of the static fusion parameter settings have poor adaptability in scenarios where the data distribution changes dynamically. Once new situations occur in port operations, such as the introduction of new types of ships, the encounter of rare meteorological disasters, or the change of ship flow and direction due to the adjustment of the port logistics pattern, the fixed fusion weights and methods cannot respond in a timely manner. For example, the dynamic characteristics of the ship position data vary due to the special power system of the new ship type, and the original fusion rules set based on conventional ship types fail, resulting in the fusion data deviating from the actual ship state, an increase in the output error of the prediction model, affecting the scientific nature and timeliness of port ship scheduling and resource allocation, reducing the port operation efficiency and service quality, and increasing the operation cost and safety risk.

[0007] Fifth, there is a lack of effective integration in data fusion, and the data correlations are not fully explored, making it difficult to accurately grasp the laws of ships entering and leaving the port. For example, only simple combination of data is considered without taking into account the deep-level interactions, such as the influence of complex ocean currents and meteorological environments on the ship position and its association with historical laws not being effectively explored.

[0008] VI. Weak ability to extract complex environmental features. Especially when facing the complex geographical, meteorological, and ocean current environments in ports and the interactive impacts of ships, it is difficult to accurately analyze the mechanism of environmental factors on ship entry and exit from ports, and mostly relies on simple statistical analysis of environmental parameters.

[0009] VII. The model has poor adaptability to the dynamic changes of ship behavior and the environment. When the data distribution changes, a large number of parameters need to be adjusted or retrained, making it difficult to meet the real-time and accuracy requirements of ports. Summary of the Invention

[0010] The technical problem to be solved by the present invention is to provide a ship entry and exit prediction method based on a multi-modal neural network and adaptive LSTM, which can accurately predict the arrival time of ships at the port, the entry route, and possible obstacles (such as other ships, weather changes, etc.), effectively optimize the resource scheduling of fishing ports, provide an efficient and intelligent solution for the management and operation of fishing ports, help improve the operation efficiency of fishing ports, ensure the safety of ships and crew, and promote the construction and development of smart fishing ports.

[0011] To solve the above technical problems, the technical solutions adopted by the present invention are as follows.

[0012] A ship entry and exit prediction method based on a multi-modal neural network and adaptive LSTM includes the following steps: S1. Data collection, including ship position data, environmental data, and historical entry and exit data; S2. Data preprocessing, including cleaning and standardizing the data; S3. Feature extraction and optimization of various types of data; S4. Perform multi-modal data fusion, including data splicing fusion, data weighted fusion, and data deep fusion; S5. Train and construct an adaptive LSTM model, and the adaptive LSTM model predicts ship entry, exit behavior, and time; S6. Evaluate and optimize the adaptive LSTM model; S7. Real-time prediction and scheduling; S8. Dynamically predict and provide scheduling suggestions.

[0013] Preferably, in step S1, the ship position data is obtained from the automatic identification system of the ship, including but not limited to dynamic position, speed, and heading; collect relatively static conditions, including but not limited to geographical landforms and fixed facility layouts, meteorological conditions, including but not limited to changes in wind speed and direction and fluctuations in temperature and humidity, and ocean data, including but not limited to periodic fluctuations of ocean currents and tides and changes in wave fluctuations as environmental data; extract the past ship entry and exit records of the port as historical entry and exit data; In step S3, for the ship position data, the position and speed change vectors of the ship at different times are extracted according to the time series; the environmental data encodes the meteorological and ocean conditions at each time point as feature vectors; the historical port entry and exit data are recorded in a specific time window to extract feature vectors; The specific method of data splicing and fusion in step S4 is: splicing the feature vectors of different modes into a unified vector in sequence to form a comprehensive feature vector; The specific method of weighted data fusion in step S4 is: give the ship position data a weight of 0.5, the environment data a weight of 0.3, and the historical port entry and exit data a weight of 0.2, and the fusion feature = ship position data feature × 0.5 + environment data feature × 0.3 + historical port entry and exit data feature × 0.2; The specific method of deep data fusion in step S4 is: constructing a neural network architecture, taking the characteristics of ship position data, environmental data and historical port entry and exit data as the input layer, and learning the intrinsic correlation and complex interaction patterns of each modal data through multiple hidden layers.

[0014] Preferably, the adaptive LSTM model in step S5 performs multimodal feature extraction including: Time series analysis of ship position data: Through deep mining of time series analysis technology, a time series sub-model is constructed to sample observation values ​​at fixed intervals, calculate speed differences and heading change rates, and accurately capture the behavior patterns of ships including but not limited to acceleration, deceleration and turning; Feature coding of environmental data: Encode the numerical value of environmental factors at each time node as a feature vector, use discretization or quantization methods to convert continuous data into discrete categories or numerical intervals, and mine the trend of meteorological and oceanic conditions and the correlation pattern of abnormal events; Mining patterns in historical port entry and exit data: Filter records according to specific time periods, extract features and build a behavior pattern library; analyze the distribution of port entry and exit time, the pattern of stay time and periodic characteristics under different environments, time periods and ship types, and use data mining and statistical analysis techniques to cluster and analyze the similarity of ship behavior, so as to predict and match similar historical situation patterns for the current ship.

[0015] Preferably, the adaptive LSTM model in step S5 performs time series analysis and extracts features, including: Data sampling and time series construction: Accurately collect ship position data from the ship automatic identification system AIS, including precise latitude and longitude, timestamp, speed, and heading information; sample at a fixed 5-minute interval to construct a data point sequence, each point containing the ship's position and speed at the time; Analysis of speed change: Calculate the speed difference between adjacent sampling points to form a speed difference sequence. If the difference is continuously positive and shows an increasing trend, it is determined that the ship is accelerating; if it is continuously negative and the absolute value is increasing, the ship is decelerating; if the difference fluctuates slightly around zero, the ship is moving at a constant speed. Combining with the time dimension, determine the duration and start and end times of the acceleration and deceleration stages, and draw a speed-time curve to visually present the change process, and deeply analyze the characteristics and laws of the ship speed change mode; Assessment of course stability: Calculate the position change vector based on the longitude and latitude of the sampling points, and measure the course stability by the direction stability of the vector. If the direction deviation of the position change vectors in multiple adjacent time periods is within a small threshold, it is determined that the course is stable; otherwise, it is variable. Statistically analyze the proportion of the course stability duration, the number of turning times, and the turning angle distribution; Trend smoothing and pattern recognition: Use the moving average method to smooth the speed sequence, filter out the interference of short-term fluctuation noise, and highlight the long-term change trend. Combine the smoothed speed trend and the course stability state to identify the ship's turning, constant-speed, and variable-speed navigation modes, as well as their conversion times and conditions, and construct a complete ship motion mode map.

[0016] Preferably, in step S5, the adaptive LSTM model uses a graph convolutional neural network GCN for multi-modal data fusion, specifically: construct a sub-model of the ship's entry and exit port graph, and the nodes include but are not limited to ships, port facilities, and meteorological and ocean monitoring points, and the edges represent the relationships between entities; the ship position data is processed by the graph convolutional neural network GCN, and potential features are mined based on the relationship between the ship's trajectory and surrounding nodes; In step S5, the adaptive LSTM model uses a graph convolutional neural network GCN to capture complex environmental features, specifically: in the port geographical environment, construct a graph structure including but not limited to port facilities and waterways, and the graph convolutional neural network GCN learns the impact of the geographical layout on the ship's path planning; in the meteorological environment, use meteorological monitoring stations as nodes, and the graph convolutional neural network GCN extracts features based on the meteorological data propagation law; in the ocean current environment, construct a graph through ocean current monitoring points, and the graph convolutional neural network GCN analyzes the complex structure of the ocean current field and the interaction with the ship; In step S5, the adaptive LSTM model based on the graph convolutional neural network GCN and the adaptive LSTM collaboratively improves the dynamic adaptability, specifically: the graph convolutional neural network GCN dynamically updates the graph structure and parameters according to the port entity relationship; the adaptive LSTM adaptively adjusts the network according to new data, and the combination of the two realizes the online update and learning of the adaptive LSTM model.

[0017] Preferably, the adaptive feature adjustment of the adaptive LSTM model includes: Adaptive learning rate algorithm: When training the adaptive LSTM model, according to the Adam algorithm, the adaptive LSTM model dynamically adjusts the learning rate based on the first-order moment estimation and second-order moment estimation of the gradient; Adaptive gating mechanism: Design the gating parameter adjustment rule, which is triggered according to the environmental data intensity or the ship position change rate; when there is strong wind, increase the weight of the input gate corresponding to the environmental data to focus on the environmental impact; when the ship is sailing stably, reduce the weight and pay attention to the ship position historical information; Adaptive network structure: During the training of the adaptive LSTM model, monitor the mean square error MSE. If the mean square error MSE does not decrease or increases for several consecutive rounds, adjust the number of LSTM layers or the number of neurons according to the preset rules.

[0018] Preferably, in the step S5, the adaptive LSTM model uses a real-time prediction process, decision-making basis, dynamic adjustment mechanism and system optimization for prediction; The real-time prediction process and decision-making basis are specifically as follows: When the ship is approaching the port, the real-time data stream is continuously input into the adaptive LSTM model. The adaptive LSTM model, based on the latest ship position deceleration trend, gentle wind and downstream environment, and historical similar conditions, receives through the input layer, deeply analyzes through the LSTM layer, and converts through the fully connected layer, and outputs a probability distribution with a 70% probability of entering the port within 2 hours and a 90% probability of entering the port within 3 hours; The dynamic adjustment mechanism and system optimization are specifically as follows: As the ship sails and the environment evolves, the adaptive LSTM model dynamically updates the prediction. When encountering special situations, the adaptive LSTM model quickly responds according to the real-time pushed data and re-evaluates the port entry risk and time; the re-evaluation method is: The LSTM layer focuses on the key factors affecting the ship in special situations, dynamically adjusts the weights to strengthen the role of relevant factors, and the fully connected layer updates the probability distribution.

[0019] Preferably, in the step S6, evaluating and optimizing the adaptive LSTM model includes a data partitioning and model training process, formulating a hyperparameter adjustment strategy, and designing a dynamic adaptive fusion mechanism; The data partitioning and model training process is specifically as follows: Use the K-fold cross-validation method to evenly and randomly divide the data set into 5 non-overlapping subsets, iterate 5 times, each time select 4 subsets as the training set to train the adaptive LSTM model, and the remaining 1 subset is used as the validation set for evaluation; in the first round, select the first 4 subsets to train the adaptive LSTM model to predict the 5th subset, and record indicators including but not limited to the mean square error MSE and the mean absolute error MAE; The hyperparameter adjustment strategy is specifically as follows: Summarize the validation error indicators of each round to construct an evaluation matrix, and deeply analyze the error fluctuation characteristics and mean level; under a certain parameter combination, if the standard deviation of the validation error of each fold is lower than the threshold and the mean is the lowest among similar combinations, it is determined to be excellent; when adjusting the number of neurons in the LSTM hidden layer, expanding from 64 to 128 results in a 15% reduction in the mean of the multi-fold MSE and a 30% reduction in the standard deviation, and determine the new parameters to improve the generalization ability; The specific dynamic adaptive fusion mechanism is as follows: real-time monitoring of data statistical characteristics, including but not limited to mean, variance, skewness, and feedback of the prediction error of the adaptive LSTM model, and online optimization of the fusion strategy using reinforcement learning algorithms or dynamic Bayesian networks.

[0020] Due to the adoption of the above technical solutions, the technical progress achieved by the present invention is as follows.

[0021] The present invention can accurately predict the arrival time of ships at the port, the inbound route, and possible obstacles (such as other ships, weather changes, etc.), effectively optimize the resource scheduling of fishing ports, provide efficient and intelligent solutions for the management and operation of fishing ports, help improve the operation efficiency of fishing ports, ensure the safety of ships and crew, promote the construction and development of smart fishing ports, and has the following advantages: (1) Advantages of multi-modal data fusion: Capturing the dynamics of ship trajectories: The data of ships entering and leaving the port contains complex time-series information. LSTM can accurately capture the long-term dependencies of ship trajectories with its unique gating mechanism (forget gate, input gate, output gate). For example, during the stage from ocean navigation to approaching the port, the forget gate filters and retains key historical patterns such as long-term stable headings and typical speed ranges. The input gate integrates the influence of new environmental factors (such as changes in near-port ocean currents and meteorological fluctuations), effectively dealing with the dynamic changes in speed and heading and complex turning behaviors in long time series, avoiding the problem of gradient disappearance in traditional neural networks, and laying a solid foundation for predicting the arrival and departure times and routes. It is superior to traditional methods in terms of information loss and prediction deviation defects when dealing with the long-term dynamic trajectories of ships.

[0022] Adapting to the lagging effects of the environment: The influence of port environmental factors (meteorology, ocean currents, etc.) on ships has a lagging nature. LSTM can learn the lagging correlations in the environmental data sequence. For example, the seasonal changes in ocean currents in a certain sea area affect the speed and trajectory of ships. LSTM learns the patterns of ocean current changes and the subsequent response laws of ships from historical data. The input gate timely incorporates the current ocean current data. Through the transfer and update of the cell state, the output gate outputs accurate predictions, optimizing ship trajectory predictions considering the lagging effects of ocean currents, and enhancing the adaptability of the model to the long-term dynamic effects of environmental factors. Traditional models are difficult to effectively handle such complex lagging relationships.

[0023] (2) Advantages of graph convolutional neural networks: More accurate relationship mining: In the scenario of predicting the entry and exit of ships, the Graph Convolutional Network (GCN) can construct a complex relationship graph. The nodes cover multiple elements such as ships, port facilities, meteorological and ocean monitoring points, and geographical regions. The edges accurately depict the complex interactions between entities, such as the path of a ship affected by surrounding environmental factors and the constraint relationship between port facilities and ship scheduling. Compared with traditional methods, GCN can deeply mine the hidden associations in ship positions, environments, and historical entry and exit data, analyze the traffic rules in specific regions from the relationship between ship trajectories and geographical nodes, provide rich features for prediction, and improve the adaptability of the model to complex environments and the depth of data understanding.

[0024] More efficient feature extraction: Traditional methods have shallow mining of data features. GCN uses convolutional kernels to slide on the graph structure and automatically extracts high-order features of multi-modal data. For example, it extracts the characteristics of meteorological frontal propagation from the meteorological node network, mines the characteristics of vortex structures from the sea current node graph, and fuses them with ship trajectory features to enhance the feature expression ability, provides a key basis for predicting ship behavior, avoids the limitations of manual feature engineering, and improves the efficiency and quality of feature extraction.

[0025] Sensitive geographical environment perception: For the complex geographical layout of ports, GCN constructs a graph with geographical elements such as docks, channels, and breakwaters, and learns the impact of geographical topological structures on ship route planning. It can identify the optimal driving routes of ships in narrow channels and the dynamic change characteristics of the availability of anchorages, which is superior to the static and local nature of traditional technologies in dealing with geographical environment features, provides support for accurate navigation of ships entering and leaving ports, and improves the adaptability of the prediction model to the geographical environment.

[0026] Accurate meteorological and ocean current analysis: In the analysis of meteorological and ocean current environments, GCN constructs a graph model with monitoring stations as nodes and physical relationships as edges to analyze the influence mechanism of complex structures such as meteorological fronts and ocean current vortices on ships. For example, it quantifies the characteristics of changes in ship speed and heading during the passage of a front, and the laws of forces on ships and trajectory offsets around ocean current vortices, provides a more accurate description of environmental factor characteristics than traditional methods, improves the prediction accuracy of the model under complex meteorological and ocean current conditions, and ensures the safe and efficient entry and exit of ships.

[0027] Effective extraction of ship interaction features: GCN constructs a graph structure from ship trajectories and captures ship interaction features, such as the speed and heading adjustment patterns in meeting and avoidance scenarios, and the collaborative features of closely following trajectories. It overcomes the limitations of traditional technologies in dealing with ship interactions, provides key features for predicting the entry and exit of ships in dense traffic flow scenarios, optimizes port traffic organization and resource scheduling strategies, and enhances the adaptability of the model to ship cluster behavior.

[0028] (3)Advantages of Adaptive LSTM: Fusing ship position and environmental modalities: Ship position data reflects the real-time dynamics of the ship, and environmental data affects the ship's navigation conditions. LSTM receives multi-modal fusion data. The ship position data is processed into a time series of position, speed, and heading vectors, and the environmental data is encoded as meteorological and oceanographic element vectors for input. For example, in strong wind weather, the input gate adjusts the attention weight for the ship position data according to the wind force and wind direction vectors, and the forget gate retains the characteristics of the ship's historical trajectory under similar meteorological conditions, enabling the model to fuse the relationship between wind conditions and the ship's position and speed, accurately predict the ship's speed adjustment and trajectory correction, achieve collaborative analysis of ship position and environmental data, improve prediction accuracy, and avoid the prediction errors caused by the lack of a dynamic adjustment mechanism in traditional models when fusing ship position and environmental information.

[0029] Integrating historical experience correlations: Historical in-port and out-port data contains the behavioral patterns of ships. LSTM integrates it with real-time ship position and environmental data. Mine the ship's behavioral patterns at different times and conditions from historical data and construct feature vectors for input into the model. For example, the in-port and out-port patterns of ships during specific seasons and tidal periods are retained by the forget gate in the current prediction, the input gate is updated by combining real-time environment and ship position, and the output gate outputs the prediction results considering historical experience, strengthening the model's ability to predict the current ship behavior based on historical patterns, making up for the defect of traditional models not fully utilizing historical data to predict ship in-port and out-port, and optimizing resource allocation and scheduling decisions.

[0030] (4)Advantages of the graph convolutional neural network: Excellent spatio-temporal feature fusion: The architecture that fuses GCN and adaptive LSTM realizes the deep fusion of data spatio-temporal features. GCN processes the spatial relationships and instantaneous interactions of multi-modal data, and adaptive LSTM captures the temporal evolution and long-term dependencies of the ship's trajectory. For example, when the ship approaches the port, GCN analyzes the current environmental spatial layout, and adaptive LSTM predicts the future path based on the historical trajectory, providing accurate spatio-temporal predictions collaboratively, exceeding the limitations of traditional single-structure models in dealing with the complex spatio-temporal data of ship in-port and out-port, and improving the model's task processing ability and prediction accuracy.

[0031] Excellent in coping with complex tasks: Facing complex changes such as port facility expansion, channel dredging, or the implementation of new traffic rules, the hybrid architecture shows strong adaptability. GCN quickly updates the graph structure to fuse the node relationships of new facilities or rules, and adaptive LSTM adjusts the learning strategy to adapt to changes in the operation mode. For example, when new intelligent navigation facilities are added to the port, the model quickly learns the influence rules of the facilities to optimize the prediction, solves the problem of difficult upgrade of traditional models, ensures the long-term effectiveness and stability of the prediction system, and promotes the intelligent upgrade of the port.

[0032] Outstanding real-time learning ability: During ship navigation, the model dynamically updates graph parameters according to GCN and adjusts the mechanism of adaptive LSTM in real time to continuously learn new data. For example, when a ship encounters a sudden storm, GCN incorporates real-time changes in the storm path and intensity, and adaptive LSTM optimizes the learning weights to predict the ship's emergency strategy and trajectory adjustment, enabling the model to evolve online. It can respond more agilely to environmental changes than traditional offline training models, improving prediction reliability and ship operation safety.

[0033] Significantly expanded generalization ability: GCN and adaptive LSTM cooperate to enhance the model's generalization ability, showing strong adaptability to new ports, unknown ship behaviors, or extreme environments. During the operation of a new port, the model quickly adapts by learning geographical and operational features through GCN and accumulating experience rules through adaptive LSTM. For example, in a port in an unfamiliar sea area, the model can adapt to complex sea conditions and ship traffic changes in a short time, providing accurate predictions, facilitating the global operation layout of the port and the efficient allocation of resources, and enhancing the cross-scenario application value and industry competitiveness of the model. Brief Description of the Drawings

[0034] Figure 1 It is a flowchart of the present invention. Detailed Embodiments

[0035] The present invention will be further described in detail below in conjunction with the drawings and specific embodiments.

[0036] A ship in-port and out-port prediction method based on a multi-modal neural network and adaptive LSTM is a technical method that relies on advanced Internet of Things, big data, artificial intelligence, and shipborne positioning technologies, combines the actual operation requirements of fishing ports, and accurately predicts the in-port and out-port time, path, and behavior of ships by obtaining and analyzing ship dynamic data (such as ship position data, speed, heading, etc.), port surrounding environment data (such as meteorological information, tides, ocean currents, etc.), and dynamic information inside and outside the fishing port in real time, and performing data analysis and prediction through intelligent algorithms. Thereby, it can provide scientific and accurate decision-making support for fishing port management personnel, help port management parties achieve intelligent scheduling, optimize resource utilization, reduce congestion, and improve port operation efficiency.

[0037] Combined with Figure 1 as shown, it includes the following steps: S1. Data collection, including ship position data, environmental data, and historical in-port and out-port data.

[0038] Specifically, the ship position data stands out with its distinct temporal characteristics. It is the dynamic log of ship navigation, which records in real time key dynamic information such as changes in ship position, speed fluctuations, and course reversals. The ship position data can be obtained from the ship's automatic identification system, which contains temporal information such as dynamic position, speed, and course. The environmental data presents a complex and diverse situation, covering both relatively static elements such as geographical features and fixed facility layouts, as well as rapidly changing meteorological conditions (such as changes in wind speed and direction, fluctuations in temperature and humidity) and ocean data (such as periodic fluctuations in ocean currents and tides, changes in wave undulations). The past ship in-and-out records of the port are extracted as historical in-and-out data, which contains temporal behavior characteristics, such as the in-and-out time patterns, berthing duration preferences, and navigation path tendencies under different seasons, different time periods, different weather conditions, and different ship types.

[0039] S2. Data preprocessing, including data cleaning and standardization.

[0040] Given the incorrectness in the range span, different scales in measurement, and differences in unit measurement of various multi-modal data, the data preprocessing step is the cornerstone to ensure the stable operation and efficient learning of the model. Standardization and normalization techniques play an indispensable and crucial role in this process, calibrating the data and unifying the measurement units. Through standardization processing, the features of different modal data can be mapped to a unified standard framework, effectively avoiding the risk of model training imbalance caused by the huge difference in data magnitude, ensuring that in the model learning process, the features of each modal data can be treated equally and fully explored, so as to achieve the deep fusion and collaborative effort of different modal data features, laying a solid foundation for the subsequent model to accurately capture the data connotation and extract prediction rules.

[0041] S3. Optimize the feature extraction of various types of data.

[0042] Specifically, for the ship position data, the position and speed change vectors of the ship at different times are extracted according to the time series; the environmental data encodes the meteorological and ocean conditions as feature vectors at each time point; the historical in-and-out data extracts feature vectors according to the records within a specific time window (such as the past week).

[0043] S4. Perform multi-modal data fusion, including data concatenation fusion, data weighted fusion, and data deep fusion.

[0044] The specific method of data concatenation fusion is: sequentially concatenate the feature vectors of different modalities in step S3 into a unified vector, so as to completely retain the features of each modal data and provide rich information for the subsequent model. For example, the ship position data vector, the corresponding environmental data vector, and the historical in-and-out data vector of the same period of a certain ship within a specific time period are concatenated to form a comprehensive feature vector for model training.

[0045] The specific method of weighted data fusion is: in view of the different degrees of influence of different modal data on the prediction of ship entry and exit, the weight of the position data is 0.5 (because it directly reflects the core elements of the ship's dynamic behavior), the weight of the environmental data is 0.3 (affecting navigation conditions but not dominant), and the weight of the historical entry and exit data is 0.2 (providing empirical rules to assist). Through the weighted summation formula: fusion feature = position data feature × 0.5 + environmental data feature × 0.3 + historical entry and exit data feature × 0.2, the key mode dominates the prediction, while taking other factors into account, improving the accuracy of the fusion effect and optimizing the prediction accuracy. For example, in the prediction of a certain period of time, the fusion feature is calculated based on this weight, highlighting the key role of the position data, and combining the environment and historical data to assist in judging the trend of ship entry and exit.

[0046] The specific method of deep data fusion is to build a neural network architecture, with ship position, environment, and historical port entry and exit data features as the input layer, and learn the internal correlation and complex interaction patterns of each modal data through multiple hidden layers. The first hidden layer learns the initial correlation between ship position and environmental data (the impact pattern of ocean currents at specific locations on ship speed), and the subsequent layers gradually deepen the fusion, mining complex relationships such as the comprehensive impact of ship behavior in the historical environment and the current ship position environment, outputting deep fusion feature vectors, accurately capturing data synergy effects and improving prediction performance. In the data learning of a certain port, the network deeply mined the correlation between specific tidal periods and the historical port entry speed of ships, and integrated it into the prediction model to enhance the reliability of prediction.

[0047] S5. Train and build an adaptive LSTM model to predict the ship’s entry and exit behavior and time.

[0048] In terms of model selection, LSTM (Long Short-Term Memory Network) is a neural network that is good at processing time series data and can effectively capture long-term dependencies in data. Therefore, the present invention adopts an adaptive LSTM model. LSTM uses its special gating mechanism (such as forget gate, input gate, and output gate) to determine how much information should be retained at each time step, which can avoid the gradient vanishing problem of traditional RNN. The structure of the LSTM model usually includes an input layer, an LSTM layer, and a fully connected layer, wherein the input layer receives multimodal data that has been fused; the LSTM layer is responsible for learning the patterns in the time series data and retaining long-term dependencies; the fully connected layer maps the output of the LSTM to specific prediction results, such as arrival or departure time.

[0049] Adaptive LSTM model training: In the early stage, after careful preparation through multimodal data fusion and adaptive LSTM model architecture construction, massive historical data (covering rich ship position trajectories over a long span and port entry and exit records under diverse environmental conditions) were injected into the model training furnace. The data was divided into training set, validation set and test set according to scientific proportions. During training, the model iteratively fine-tuned parameters according to the gradient descent optimization strategy (combined with the adaptive learning rate algorithm). The multimodal data fusion layer deeply integrates the ship position (speed, heading spatiotemporal sequence), environment (meteorological and oceanographic elements spatiotemporal encoding), and historical port entry and exit (behavior pattern feature vector) data to inject multi-dimensional information nutrients into the model; the adaptive LSTM layer adaptively captures the long-term navigation trend of ships, the lag effect of environmental impact and the law of historical experience through the gating mechanism, and the fully connected layer accurately maps the features to the predicted value range of port entry and exit time. Through repeated training and validation set error feedback optimization, the model deeply internalizes the complex causal logic and data feature patterns of ship entry and exit, and passes the rigorous test of the test set with excellent generalization performance, just like a precise clock ready to tell time for the real-time shipping world.

[0050] The adaptive LSTM model performs multimodal feature extraction as follows: Time series analysis of ship position data: Ship position data contains key dynamic information of ships, which comes from the automatic identification system (AIS), including position, speed, heading and timestamp. Through deep mining of time series analysis technology, a time series model is constructed, observation values ​​are sampled at fixed intervals, speed differences and heading change rates are calculated, and ship acceleration, deceleration, turning and other behavior patterns are accurately captured, laying a solid foundation for predicting the future trajectory of ships and the time of entry and exit of ports, such as estimating the arrival time of ships based on the speed change trend and judging the navigation intention based on the heading stability.

[0051] Characteristic coding of environmental data: Meteorological and marine environmental data (wind speed, wind direction, temperature, ocean currents, tides, etc.) have a profound impact on ship navigation. At each time node, the numerical value of environmental factors is encoded as a feature vector, and the continuous data is converted into discrete categories or numerical intervals using discretization or quantization methods to explore the changing trends of meteorological and marine conditions and the correlation patterns of abnormal events. For example, strong winds affect the speed and direction of the ship, and specific currents change the trajectory of the ship. After the feature coding, it is embedded in the prediction model as a key influencing factor to improve the environmental adaptability of the model and the reliability of the prediction.

[0052] Mining the rules of historical port entry and exit data: The historical port entry and exit data precipitates the past behavior rules of ships, selects records according to specific time periods (several days to several months), extracts features and builds a behavior pattern library. Analyze the distribution of port entry and exit time, the rules of stay time and periodic characteristics under different environments, time periods and ship types, cluster analyze the similarity of ship behavior through data mining and statistical analysis technology, match similar historical situation patterns for current ship prediction, and enhance the accuracy and credibility of prediction results, such as predicting the arrival time of the current ship based on the historical port entry time of the same type of ship, and optimizing the pre-configuration of port resources.

[0053] The time series analysis for feature extraction using the adaptive LSTM model includes: Data sampling and time series construction: Accurately collect ship position data from the Automatic Identification System (AIS) of ships, covering precise longitude and latitude, timestamps, as well as speed and heading information. Sample at a fixed 5-minute interval to ensure an appropriate density of the time series, capturing dynamic details while also considering computational efficiency. Taking the data of a ship over a week as an example, a time series containing thousands of data points is sampled and constructed. Each data point includes the ship's position and speed at a certain moment, laying the foundation for subsequent analysis, and discretizing and structuring the ship's movement trajectory in the time dimension, making it convenient to explore potential regular patterns.

[0054] Analysis of speed changes: Calculate the speed difference between adjacent sampling points to form a speed difference sequence. If the difference is continuously positive and shows an increasing trend, it is determined that the ship is accelerating; if it is continuously negative and the absolute value is increasing, it is decelerating; if the difference fluctuates slightly around zero, it is moving at a constant speed. For example, if a ship's speed values are 10 knots, 12 knots, and 15 knots in sequence, the corresponding speed differences are 2 knots and 3 knots, showing an accelerating trend. Combining with the time dimension, the duration and start and end times of the acceleration and deceleration phases can be determined, and a speed-time curve can be plotted to visually present the change process, deeply analyzing the characteristics and laws of the ship's speed change pattern, providing a core basis for predicting the evolution of the ship's navigation state.

[0055] Assessment of heading stability: Calculate the position change vector based on the longitude and latitude of the sampling points, and measure the heading stability by the stability of the vector direction. If the direction deviation of the position change vectors in multiple adjacent time periods is within a small threshold (such as ±5°), it is determined that the heading is stable; otherwise, it is variable. For example, if the average value of the direction deviation of the position change vectors of a ship in multiple consecutive 5-minute time periods is less than 3°, it indicates that the heading is stable during this period, maintaining a straight or nearly straight course. Statistics on the proportion of the stable heading duration, the number of turns, and the distribution of turning angles comprehensively depict the dynamic characteristics of the ship's heading, accurately grasp the rules of the ship's navigation trajectory adjustment, improve the depth of understanding of the ship's control behavior, and enhance the accuracy of the prediction model for ship trajectory prediction.

[0056] Trend smoothing and pattern recognition: Use the moving average method to smooth the speed sequence, filtering out short-term fluctuation noise interference and highlighting the long-term change trend. For example, with a 7-point moving average, the average of every 7 consecutive values in the original speed sequence is taken to generate a new sequence, highlighting the overall rising and falling trends, stable intervals, and change turning points of the ship's speed. Combining the smoothed speed trend with the heading stability state, identify the ship's turning, constant-speed, variable-speed (acceleration or deceleration) navigation patterns and their conversion times and conditions, and construct a complete ship movement pattern map. For example, if a ship's speed remains stable at 12 knots after moving average and the heading is stable, it is determined to be in a constant-speed straight-line navigation pattern; if the speed drops suddenly and the heading changes, it is marked as a deceleration and turning pattern, providing a solid technical basis for predicting the ship's behavior when entering and leaving the port and intelligent scheduling, and realizing precise and efficient port operation management.

[0057] The adaptive LSTM model uses the graph convolutional neural network GCN for multimodal data fusion, thereby achieving in-depth expansion of multimodal data fusion, specifically: constructing a sub-model of ship entry and exit graphs, with nodes covering ships, port facilities, meteorological and oceanographic monitoring points, etc., and edges representing the relationship between entities (such as the distance between ships and ports, and the path of the impact of ocean currents on ships). The ship position data is processed by the graph convolutional neural network GCN, and potential features can be mined based on the relationship between ship trajectories and surrounding nodes, such as the turning mode of ships affected by nearby ships in specific port areas; in environmental data, the graph convolutional neural network GCN extracts features from meteorological and ocean node relationships, such as analyzing the impact of ocean current interactions in different sea areas on ships; in terms of historical entry and exit data, the graph convolutional neural network GCN mines long-term dependencies and similar patterns between historical ship behavior nodes to provide reference for current predictions. By fusing multimodal data through the graph convolutional neural network GCN, data interaction relationships are fully captured, and feature richness and prediction accuracy are improved.

[0058] More specifically, the basis for graph data construction: In the scenario of ship entry and exit prediction, the application of graph convolutional neural network GCN is based on the graph structure representation of the complex environment of the port. Port geographic information, such as dock layout, channel direction, shoal location, etc., constitute the static node and edge framework of the graph. As a dynamic element, the ship track is connected to form edges according to the position of the ship at different times, connecting the port geographic nodes in series, reflecting the dynamic relationship between the ship's navigation trajectory and space. Environmental data, such as the distribution of meteorological conditions in a specific area, the spatial differences in the speed and direction of ocean currents, etc., give weight attributes to the edges of the graph. For example, the increase in edge weights in strong wind areas or turbulent currents indicates that the impact on ship navigation has intensified. In this way, a graph network covering multiple nodes of ships, port facilities, and geographical areas and reflecting their complex associated edges is constructed, providing a structured data cornerstone for the graph convolutional neural network GCN to mine spatial features.

[0059] The adaptive LSTM model uses a graph convolutional neural network (GCN) to capture complex environmental features, thereby achieving enhanced capture of complex environmental features. Specifically, in the geographical environment of the port, the port facilities, waterways, etc. are constructed as a graph structure, and the graph convolutional neural network (GCN) learns the impact of geographical layout on ship path planning, such as identifying the rules for ship passage in narrow waterways in ports; in the meteorological environment, the meteorological monitoring station is used as a node, and the graph convolutional neural network (GCN) extracts features based on the propagation law of meteorological data, such as analyzing the scope and degree of influence of the marine front system on the speed and course of the ship; in the current environment, a graph is constructed through the current monitoring points, and the graph convolutional neural network (GCN) analyzes the interaction between the complex structure of the current field and the ship, such as determining the ship detour strategy in the vortex area. In terms of ship interaction, the graph convolutional neural network (GCN) mines interactive features such as multi-ship encounters and avoidances from the ship trajectory map, providing all-round environmental feature support for ship entry and exit predictions and enhancing the model's environmental adaptability.

[0060] More specifically, the core of the feature extraction mechanism: The core of the graph convolutional neural network (GCN) lies in leveraging the aggregation of node neighborhood information to update node features. Taking a ship node as an example, its neighborhood includes surrounding ships, adjacent port facilities, and geographical area nodes. By aggregating the features of these neighborhood nodes, the GCN can capture the relative positional relationships and potential interaction patterns of ships in the port space. For example, by calculating the average speed, heading differences, and distance weights of neighboring ships, it can uncover cooperative navigation relationships such as collision avoidance and following among ships; by analyzing the attributes of the connection edges between port facility nodes and ship nodes, it can obtain influencing factors such as berthing and loading / unloading operations; by integrating the environmental feature weights of geographical area nodes, it can consider the comprehensive effects of meteorology and ocean currents on ship navigation. Through multiple rounds of iterative aggregation and update, it deeply explores the potential rules and complex topological relationships of ship navigation within the port space, injecting key spatial dimension insights into improving the accuracy of ship in-and-out port predictions, enhancing the universality of the model, and adapting to different port layouts and environmental differences.

[0061] The adaptive LSTM model collaborates with the GCN to enhance dynamic adaptability, thereby achieving dynamic adaptability optimization. Specifically: The GCN dynamically updates the graph structure and parameters according to port entity relationships. For example, when new port facilities are added, they are quickly incorporated into the adaptive LSTM model; the adaptive LSTM adaptively adjusts the network according to new data. For example, when a ship encounters sudden weather conditions, it quickly changes its learning strategy. The combination of the two enables online update and learning of the model. For example, during ship navigation, it continuously optimizes predictions, adjusts prediction results immediately based on real-time ship dynamics and environmental feedback, improves port resource scheduling efficiency and ship operation safety, effectively responds to complex and changing port scenarios, and enhances the robustness and generalization ability of the model.

[0062] More specifically, the adaptive feature adjustment of the adaptive LSTM model includes: Adaptive learning rate algorithm: During training, according to the Adam algorithm, the model dynamically adjusts the learning rate based on the first-order and second-order moment estimates of the gradient. For example, during stages with large gradient fluctuations, it automatically reduces the learning rate to prevent excessive deviation of parameter updates; when the gradient is stable, it moderately increases the learning rate to accelerate convergence. For example, during the stage of learning about the complex in-and-out port of ships affected by sudden weather changes, large gradient fluctuations cause the Adam algorithm to reduce the learning rate to stabilize parameter updates and avoid misguidance; after the weather becomes stable, it increases the learning rate to accelerate convergence, improving training efficiency and model adaptability, and flexibly coping with complex data changes.

[0063] Adaptive gating mechanism: Design the gating parameter adjustment rule, which is triggered according to the environmental data intensity (such as wind speed exceeding the threshold) or the ship position change rate (when making a high-speed turn). Increase the weight of the input gate corresponding to the environmental data in strong winds to focus on the environmental impact; reduce the weight during stable ship navigation and pay attention to the historical information of the ship position. For example, when a ship encounters strong side winds, the input gate of the adaptive LSTM model increases the weight of the environmental wind speed data, strengthens its influence on the prediction of the ship's speed and heading, adaptively optimizes the information screening and retention according to the environmental and ship states, and improves the robustness and prediction accuracy of the model.

[0064] Adaptive network structure: During the training of the adaptive LSTM model, monitor the mean squared error MSE. If the mean squared error MSE does not decrease or increases continuously for several rounds, adjust the number of LSTM layers or the number of neurons according to the preset rules. For example, if the mean squared error MSE continues to increase significantly, add one more LSTM layer to capture complex patterns; when the error fluctuates slightly, fine-tune the number of neurons to optimize the expression. For example, during the busy period of a certain port, the ship's entry and exit are affected by multiple factors, and the increase in the mean squared error MSE triggers the expansion of the structure. A new layer is added to capture the factors of ship interaction and environmental coordination, improving the model's adaptability and prediction performance for complex scenarios.

[0065] In the present invention, the adaptive LSTM model using the graph convolutional neural network GCN has the following advantages: Connection between data preprocessing and graph construction: Before embedding the graph convolutional neural network GCN module in the multi-modal data fusion layer of the model, input data preprocessing is the key starting point. The ship position data is transformed through coordinate transformation and time series regularization into node position and dynamic trajectory features; the environmental data is quantified and classified into regional environmental feature vectors and mapped to the graph edge weights; the historical entry and exit data is mined for frequent routes and stay hotspots and transformed into node behavior pattern features. These preprocessed ship position, environmental, and historical entry and exit data are accurately transformed into the initial features of the graph network nodes, laying the foundation for the spatial feature learning of the graph convolutional neural network GCN. For example, based on the historical data statistics of the average berthing duration, time period pattern of ships at a certain dock berth, and the surrounding sea current characteristics, a berth node feature vector is constructed and incorporated into the graph network, providing a data starting point for the graph convolutional neural network GCN to analyze the relationship between ship berthing behavior and the environment.

[0066] Space-time collaborative deep fusion architecture: After receiving the initial features, the Graph Convolutional Neural Network (GCN) layer iteratively optimizes the feature representation according to the graph structure and the node feature matrix during the operation. During the operation, the convolutional kernel is defined to adapt to the graph topology, aggregating the neighborhood features according to the node connection relationship and weighted updating its own features. For example, for a ship node, features such as speed, heading, and environmental impact factors are aggregated according to the weights of its connection edges with surrounding ships, facilities, and regions, and the feature expression is strengthened through a non-linear activation function. The multi-modal data that outputs the fused spatial features is seamlessly connected to the adaptive LSTM layer. The LSTM focuses on the time-series evolution of the ship position data and captures the historical in-and-out port patterns, while the Graph Convolutional Neural Network (GCN) strengthens the modeling of the spatial layout and environmental interaction. The two are fused and decision-making in the fully connected layer. For example, when predicting the ship's arrival time at the port, the LSTM analyzes the trend based on the past trajectory sequence, the Graph Convolutional Neural Network (GCN) provides the spatial information of the congested areas and the optimal shipping lanes in the port, and the fully connected layer comprehensively makes a decision to accurately output the prediction time. The deep fusion of space-time features reshapes the prediction model architecture and improves the performance beyond traditional single-dimensional models.

[0067] Data partitioning space balance strategy: The data partitioning for the model training after the fusion of the Graph Convolutional Neural Network (GCN) is innovated, taking into account the uniformity and representativeness in the spatial dimension. The traditional random partitioning is extended to clustering partitioning based on the geographical zoning of the port, the types of shipping lanes, and the ship traffic density. For example, the dataset is partitioned according to the inner and outer port areas of the port, busy and idle shipping lanes, and the traffic aggregation areas of different ship types, ensuring that the training, validation, and test sets cover diverse spatial scenarios and preventing overfitting in local spaces. In a large port, the data subsets are partitioned according to the dock functions and the water depth of the shipping lanes, and the trained model comprehensively learns the differences in the in-and-out port patterns of ships in each area, improving the adaptability of the model to multiple working conditions in complex ports, strengthening the generalization performance of the model from the data foundation, and stabilizing the foundation for improving the prediction reliability.

[0068] Two-dimensional balance optimization of the loss function: The optimization of the loss function introduces a spatial feature loss term to accurately guide the learning of the Graph Convolutional Neural Network (GCN). The mean square error term based on the node feature differences focuses on the accuracy of the spatial features extracted by the Graph Convolutional Neural Network (GCN). For example, it monitors the mean square of the deviations of the position and environmental correlation features of ship nodes in the predicted and real scenarios. It is weighted and combined with the loss of the prediction task, and the weights are dynamically adjusted according to the prediction error feedback to balance the learning priorities of the space-time features. When the deviation of the predicted ship trajectory is large, the weight of the spatial feature loss is increased to strengthen the learning of the Graph Convolutional Neural Network (GCN). If the error mainly comes from time-series factors, the focus is on optimizing the loss of the prediction task and adjusting the LSTM parameters. After multiple rounds of iteration, the adaptability of the GCN layer and the overall model parameters is optimized, improving the accuracy and stability of the model in predicting complex port environments, and promoting the intelligent prediction technology of ship arrivals and departures to a new realm of precision and efficiency.

[0069] The adaptive LSTM model uses a real-time prediction process, decision-making basis, dynamic adjustment mechanism, and system optimization for prediction, as follows: Real-time Prediction Process and Decision-making Basis: When the ship is approaching the port, real-time data streams are continuously input into the adaptive LSTM model. For example, when a ship is 20 nautical miles away from the port, the adaptive LSTM model, based on the latest ship position deceleration trend, light wind and downstream current environment (wind speed 3 m / s, sea current favorable for entering the port 0.5 knot), and historical similar conditions (average entry time of the same type of ship under similar meteorological and sea conditions), receives through the input layer, conducts in-depth analysis through the LSTM layer, and converts through the fully connected layer, and outputs a probability distribution with a 70% probability of entering the port within 2 hours and a 90% probability of entering the port within 3 hours. The port plans accordingly, preferentially allocates berths in the near term, schedules tugboats and loading and unloading equipment, improves the efficiency of resource pre-allocation, avoids ship delays in port, and enhances the agility and throughput capacity of the port operation.

[0070] Dynamic Adjustment Mechanism and System Optimization: As the ship sails and the environment evolves, the adaptive LSTM model dynamically updates the prediction. When encountering special situations suddenly, the adaptive LSTM model quickly responds according to the real-time pushed data and re-evaluates the entry risk and time; the re-evaluation method is: the LSTM layer focuses on the key factors affecting the ship in special situations, dynamically adjusts the weights to strengthen the role of relevant factors, and the fully connected layer updates the probability distribution. Example: If suddenly encountering heavy fog (visibility drops to 500 meters), the environmental sensor pushes real-time data, and the adaptive LSTM model quickly responds and re-evaluates the entry risk and time. The LSTM layer focuses on the key factors affecting the ship's speed and maneuverability in heavy fog, dynamically adjusts the weights to strengthen the role of environmental factors, and the fully connected layer updates the probability to 70% probability of entering the port within 4 hours and 90% probability of entering the port within 5 hours. The port management flexibly allocates resources according to the new prediction, delays the start of unloading equipment, and adjusts the timing of tugboat assistance to ensure the safe and orderly entry of the ship, realizes the intelligent and accurate dynamic prediction management of the entire process of ship entry and exit, improves the safety, efficiency and service quality of port operation, and creates a model of intelligent port management.

[0071] S6. Evaluate and optimize the adaptive LSTM model.

[0072] Evaluating and optimizing the adaptive LSTM model includes data partitioning and model training processes, formulating hyperparameter adjustment strategies, and designing a dynamic adaptive fusion mechanism, which are specifically as follows: The data partitioning and model training process is specifically as follows: The dataset is evenly and randomly partitioned into 5 non-overlapping subsets using K-fold cross-validation (K = 5). Iterate 5 times, each time selecting 4 subsets as the training set to train the model, and the remaining 1 subset is used as the validation set for evaluation. In the first round, select the first 4 subsets to train the model to predict the 5th subset, and record indicators such as the mean squared error (MSE) and mean absolute error (MAE). This process comprehensively evaluates the performance of the model on different data subsets, discovers potential overfitting or underfitting problems. Because different subsets have differences in data distribution, it can expose the generalization shortcomings of the model and provide a direction for accurate optimization, ensuring that the model can robustly handle diverse ship entry and exit data scenarios.

[0073] The hyperparameter adjustment strategy is specifically as follows: Summarize the validation error indicators of each round to construct an evaluation matrix, and deeply analyze the error fluctuation characteristics and mean level. Under a certain parameter combination, if the standard deviation of the validation error of each fold is lower than the threshold (such as 0.05) and the mean is the lowest among similar combinations, it is determined to be excellent. When adjusting the number of neurons in the LSTM hidden layer, expanding from 64 to 128 results in a 15% reduction in the mean of the multi-fold MSE and a 30% reduction in the standard deviation, determining that the new parameters improve the generalization ability. This strategy precisely fine-tunes the hyperparameters based on data-driven, balances the model complexity and fitting ability, enhances the adaptability to the complex environment of ships entering and leaving the port, diverse ship types, and dynamic port operation data, improves the prediction stability and accuracy, and optimizes the efficiency of resource allocation and scheduling decisions.

[0074] The dynamic adaptive fusion mechanism is specifically as follows: Real-time monitor the statistical characteristics of data (mean, variance, skewness, etc.) and the feedback of the model prediction error, and use reinforcement learning algorithms (such as deep Q network) or dynamic Bayesian networks to optimize the fusion strategy online. When a ship encounters a sudden strong wind, the model, according to the wind speed intensity, wind direction change rate, and the ship's dynamic response characteristics, real-time strengthens the fusion weight of environmental data and adjusts the form of the fusion function (from linear weighted to non-linear kernel function fusion); when the port logistics switches between peak and trough, intelligently adjusts the fusion ratio of historical in-and-out port data and real-time data according to the ship flow density and the proportion of cargo types, ensuring that the fused data accurately reflects the real-time state and trend changes of ships entering and leaving the port, improving the model's rapid response and adaptation ability to the dynamic changes of port operations, and ensuring the scientificity, flexibility, and forward-looking of port management decisions.

[0075] S7. Real-time prediction and scheduling.

[0076] S8. Dynamically predict and provide scheduling suggestions.

[0077] When the present invention is in use, it has the following innovations: (1) Model selection and structure design (LSTM, GCN): Multi-modal data access and preprocessing in the input layer: The input layer is carefully designed to accept multi-modal fusion data, laying the foundation for accurate prediction. After the ship position data is preprocessed by high-precision coordinate transformation, speed and heading filtering and noise reduction, and time series smoothing, it is accessed in a standardized format; the environmental data is calibrated by meteorological and ocean sensors, outliers are screened out, and time-space normalization is performed, and then converted into an adapted format; the historical in-and-out port data is mined for deep behavioral patterns, and after clustering and encoding according to ship types and time periods, it is input. The input layer sets different channels and weights according to the data characteristics, highlighting the key modal data (high weight is set for ship position data in the near-port period), ensuring the efficient use of data, inputting high-quality data for the LSTM layer to accurately learn the complex laws of ships entering and leaving the port, and improving the initial prediction accuracy of the model.

[0078] Optimization of LSTM Core Layer Architecture and Gating Mechanism: The LSTM core layer consists of multiple neuron units, and the layout is optimized according to the time series characteristics of ships entering and leaving the port. The forget gate accurately selects and retains historical information according to the Sigmoid function, reducing the weight of irrelevant historical noise (navigation trajectories under normal weather in the long term) and increasing the retention rate of stable key features (preferred berths for regular berthing) during critical periods near the port; the input gate processes new information using the Tanh function and collaborates with the forget gate to efficiently integrate the weights of new environmental factors into the cell state update in case of sudden environmental changes (strong winds, rapid currents), ensuring that the model adapts to dynamic changes; the output gate controls the output of key prediction-related features through the coordination of the Sigmoid and Tanh functions based on the current input and the updated cell state, ensuring the accurate transmission of information to the fully connected layer. Dynamic connection weights are set between neurons to strengthen the collaborative learning ability according to learning feedback, deeply mining the long-term dependencies and dynamic change laws of ships entering and leaving the port, and improving the prediction reliability.

[0079] Feature Mapping of the Fully Connected Layer and Adaptation to Prediction Goals: The fully connected layer receives the output feature vector of the LSTM and maps it to the prediction value range through a multi-layer perceptron architecture and non-linear activation functions (ReLU, Softmax determined according to the task). To predict the ship's arrival time, a continuous time value mapping network is constructed to learn and output the accurate time probability distribution based on the ship's trajectory trend, environmental impact, and historical rules; for planning the arrival path, the features are converted into a probability vector of channel selection, integrating the port geographical information and real-time traffic situation for decision-making; for the berth allocation task, the features are mapped to a berth occupancy probability matrix, accurately allocating berths considering ship attributes, port facility status, and historical berthing preferences. The fully connected layer sets a loss function and optimizer (Adam, SGD, etc.) according to the prediction goal to fine-tune the parameters, collaborating with the LSTM to optimize and improve the overall model prediction performance, achieving accurate and intelligent prediction of ships entering and leaving the port, and supporting efficient port operation decision-making.

[0080] Graph Construction and Data Embedding Layer: Node Definition and Attribute Assignment: A graph network is carefully constructed, with ships, port facilities (wharves, anchorages, lighthouses, etc.), and geographical regions (channels, bays, shoal areas) defined as nodes. The attributes of ship nodes cover ship type, load, real-time speed, heading, historical frequency and timestamp of entering and leaving the port; the port facility nodes include location coordinates, throughput capacity, facility type, and associated channel information; the geographical region nodes have area, water depth, mean meteorological and climate characteristics, and sea current and tide statistical parameters. The attributes of ship nodes are dynamically updated based on ship AIS data; port facility information is extracted from the port management database for assignment; the attributes of geographical region nodes are filled by integrating marine environment monitoring data and geographical information system (GIS) data, constructing a graph infrastructure with complete and dynamically updated node attributes, providing an accurate data foundation for GCN learning.

[0081] Edge connection rules and weight setting: Edge connection is constructed based on the logical relationship and physical interaction of nodes. Ships are connected based on distance threshold, communication signal strength or trajectory similarity, and the weight is determined by the inverse of distance, signal strength ratio or trajectory similarity function value, to explore the potential coordination or collision avoidance relationship of ships; ships and port facilities are connected based on berthing history and navigation path planning, and the weight is the berthing frequency weighting and the quantified value of navigation path preference, reflecting the attractiveness of facilities to ships and service intensity; ships and geographical areas are connected based on location and environmental impact, and the weight is the regional impact factor (water flow resistance coefficient, wind impact index), which describes the degree of environmental impact on ships. Environmental data (weather, ocean currents, tidal changes) are assigned dynamic weights to edges based on differences in temporal and spatial distribution. The weights of strong wind areas and jet streams are increased in real time, and a weighted graph network that reflects complex shipping relationships and dynamic environmental impacts is constructed to drive GCN to accurately learn spatial features.

[0082] Convolution layer and feature aggregation layer: Convolution kernel design and operation rules: Design multi-scale convolution kernels to capture multi-dimensional features. Small-scale convolution kernels focus on the microscopic behavior of ships, extract individual speed and heading change rates and close-range interaction features in densely populated areas; medium-scale kernels capture the interaction between ship groups and the local environment, learn fleet formation navigation patterns, and trajectory deviations under the influence of local ocean currents and weather; large-scale kernels cover the entire port landscape, extract regional ship flow density gradients, channel congestion trends, and port facility busy heat maps. During the convolution operation, the convolution kernel slides according to the node connection relationship, aggregates the weighted sum of the attribute features of neighboring nodes, and enhances the nonlinear ability of feature expression through nonlinear activation functions (ReLU, LeakyReLU), outputs node high-level feature representations, and mines the complex behavior patterns of ships from individual manipulation to regional coordination, from micro dynamics to macro trends, to improve the accuracy and depth of GCN feature extraction.

[0083] Feature aggregation strategy and update mechanism: Hierarchical aggregation and skip connection fusion strategies are used to optimize feature learning. Hierarchical aggregation progressively aggregates features according to the graph network level. The bottom layer aggregates the basic attributes of the neighborhood nodes, the middle layer integrates the interaction features of the ship group and the environment, and the high layer abstracts the overall operation status features of the port. The output features of each layer are normalized and passed to the next layer; the skip connection cross-layer fuses features of different levels, combines the bottom-level details with the high-level semantic features, prevents gradient disappearance and feature loss, and strengthens feature reuse and propagation. After each aggregation, the node features are updated according to the weighted importance of the nodes. The feature weights of important nodes (such as ships in key waterways and core port facilities) are increased to ensure the inheritance of key information, gather key spatial features for ship entry and exit prediction, and enhance the GCN's ability to represent complex shipping scenarios.

[0084] Graph Pooling and Readout Layer: Pooling Operation and Dimensionality Reduction Optimization: The graph pooling layer adopts an adaptive pooling algorithm to compress the graph scale and reduce the dimensionality of the feature space according to the node feature distribution. For example, key nodes are selected and retained based on node degree centrality, feature variance, or clustering coefficient, and similar redundant nodes are merged to simplify the graph structure; a combination of max pooling and average pooling is used to compress the node feature vectors, extracting the extreme values and mean information of regional features to balance the feature abstraction degree and information retention degree. During peak ship flow periods, the pooling layer focuses on the features of ships in key shipping lanes and busy port areas, reduces the dimensionality of massive data, accelerates the operation efficiency of the GCN, efficiently processes data for subsequent prediction tasks, ensures the balance between the real-time performance and performance of the model, and improves the applicability in the port big data scenario.

[0085] Function of the Readout Layer and Connection with Prediction: The readout layer integrates the graph features after pooling into a global feature vector, and adapts and connects with the prediction task through a fully connected network. Different readout strategies are designed according to the prediction objectives (ship arrival time, path planning, berth allocation). When predicting the arrival time, the readout layer extracts the features of the ship's current position, speed, channel congestion, and meteorological and ocean currents, and inputs them into the time series prediction model; for path planning, it focuses on the features of the port topology, ship distribution, and environmental obstacles and transforms them into the input of the path search algorithm; for berth allocation, a berth selection probability vector is generated based on ship attributes, port facility status, and historical berthing preferences. The readout layer efficiently transforms the spatial features learned by the GCN into the input of the prediction task, seamlessly connects with downstream model components, constructs a complete intelligent prediction process, realizes the output from spatial feature extraction to accurate prediction decision-making, and improves the intelligent level and prediction accuracy of the entire process of ship arrival and departure prediction.

[0086] (2) Feature Extraction and Pattern Recognition: Temporal Feature Extraction: As a temporal record of the ship's navigation trajectory, the ship position data contains rich prediction information. The ship position data collected at high frequency from the Automatic Identification System (AIS), including timestamp, longitude and latitude, speed, heading, etc., is used to construct an accurate time series model. Sampling is carried out at a fixed time interval (such as 5 minutes), and the speed difference and heading change rate between adjacent moments are calculated to identify the ship's motion mode. If the speed difference is continuously positive and increasing, it is marked as the acceleration stage; if it is continuously negative and the absolute value increases, it is the deceleration stage; if it is stable near zero, it is a uniform motion. If the average value of the heading change rate in multiple time periods is less than a threshold (such as 0.5° / minute), the heading is judged to be stable, otherwise it is variable. For example, when a ship is in the open ocean section, the speed is stable at 18 knots and the heading change rate is nearly zero, and the model accurately determines that it is in a uniform straight-line motion; when approaching the port, the speed decreases and the heading changes frequently, capturing the trend of decelerating and turning into the port, which anchors the key behavioral basis for predicting the arrival and departure time and improves the accuracy when integrated into the prediction model.

[0087] Environmental data pattern recognition: Environmental data such as weather, ocean currents, and tides are key interference factors for ships entering and leaving ports, and in-depth pattern recognition is imperative. For wind speed, the Beaufort wind scale is used for quantification (level 0, no wind - level 12, hurricane), and the mean and standard deviation of the ship speed attenuation rate under different wind levels are statistically analyzed. For example, when the wind is level 5, the average speed drops by 10% (standard deviation 2%), and a wind speed-speed attenuation model is constructed. Ocean current data is discretely classified according to flow direction and flow velocity, and the impact of different flow direction and flow velocity combinations on the ship's voyage is analyzed. Downstream increases the range and upstream reduces the range. For example, a 1-knot downstream at the entrance of a port reduces the arrival time of the ship by 15 minutes (standard deviation 3 minutes), and a current-range correction model is constructed. At the tidal level, the impact on the draft and maneuverability of the ship is analyzed according to the tide height and tide time sequence. At high tide, the shallow waters increase the ship's passability and are restricted at low tide. Accurate time windows are planned for ships entering and leaving ports, routes are optimized, and environmental pattern knowledge is injected into the prediction model to enhance environmental adaptability and prediction reliability, and improve port operation efficiency and safety.

[0088] Innovation in fusion architecture: The key innovation is to build a multimodal data fusion architecture with graph convolutional neural network (GCN) as the core. The fusion layer preprocesses the ship position, environment, and historical port entry and exit data into graph node features. GCN mines the port space topological relationship and ship interaction mode, and outputs the fused spatial features to the adaptive LSTM. This architecture breaks through the limitations of traditional linear fusion, mines the deep spatial semantic association of data, and enhances the model's perception of complex port environments. For example, to predict the path of a ship in the port, GCN accurately plans the route based on the dock layout, ship distribution, and current weight guidance, combined with the LSTM time series rules, and optimizes the port resource allocation and scheduling efficiency. This fusion architecture and operation process are protected.

[0089] Data conversion and graph construction accuracy: The conversion method from raw data to graph network node features is innovative and valuable for protection. Coordinate-node position, time series-dynamic trajectory conversion of ship position data; quantitative classification and weighting of environmental data on graph edges; mining rules of historical port entry and exit data to construct node behavior features, each link is accurate and mutually adaptive. It ensures the quality of GCN input and determines the starting point and effectiveness of spatial feature learning. For example, a port clusters the characteristics of port hot spots based on historical ship trajectories and embeds graph nodes for GCN to learn the rules of ship aggregation. This data preprocessing and graph construction technology chain should be protected to prevent copying and infringement, so as to lay a solid data foundation for ship entry and exit predictions.

[0090] (3) Adaptive LSTM and GCN dual-drive model features: Dynamic Collaborative Learning Mechanism: The collaborative learning of adaptive LSTM and GCN is the core for improving the model performance. LSTM captures the temporal evolution of ship positions and the historical rules of entering and leaving ports, while GCN enhances spatial feature extraction and relationship modeling. The two are fused and make decisions in the fully connected layer. In case of changes in the spatial layout due to port facility expansion or interference from extreme weather, the model dynamically adjusts the prediction strategy according to the temporal trend of LSTM and the spatial changes of GCN. This collaborative learning process, interaction mode, and fusion decision-making logic are the key points of protection, ensuring the accurate and stable prediction of the model under complex shipping conditions, providing intelligent decision-making support for port operations, suppressing imitation infringement, and consolidating the technological innovation advantage.

[0091] Adaptive Adjustment Rule System: The model's adaptive adjustment rule system covers multiple aspects and is crucial. LSTM dynamically adjusts the learning rate, gating parameters, and network structure according to gradient fluctuations (Adam algorithm) and prediction errors; GCN optimizes the convolution kernel parameters, number of layers, and connection weights based on node feature errors and prediction deviations. The two evolve adaptively according to data characteristics and environmental changes. This adaptive adjustment rule system, triggering conditions, and optimization directions are the key to innovation, ensuring that the model adapts to the dynamic development of ports, improving the robustness of intelligent prediction, providing solid legal support for technological exclusivity and market competitiveness, and preventing malicious copying and low-quality substitution by competing products.

[0092] (4)Model Evaluation and Optimization: Evaluation Criteria: Accurately evaluating the prediction performance of the model under diverse environmental conditions is the key cornerstone for optimizing and improving the model. The mean squared error (MSE) measures the dispersion degree of predicted values by calculating the average of the squared differences between predicted values and true values. It is sensitive to large errors and highlights the degree of prediction deviation. In ship entering and leaving port predictions, a low MSE indicates that the model's prediction time is close to the actual situation and can accurately capture the dynamic changes of ships; the mean absolute error (MAE) takes the average of the absolute values of the differences between predicted values and true values, evaluating the prediction accuracy from the average deviation amplitude and intuitively reflecting the overall scale of prediction errors, providing a perspective for evaluating the robustness of the model's predictions. Precision metrics are used for evaluating classification tasks, such as predicting whether a ship enters or leaves port on time (on-time / delay classification). Precision is the proportion of correctly predicted on-time entering and leaving port samples to the predicted on-time entering and leaving port samples, quantifying the accuracy of the model's positive class predictions; recall is the proportion of correctly predicted on-time entering and leaving port samples to the actual on-time entering and leaving port samples, focusing on the completeness of the model's coverage of positive class samples. Balancing and optimizing these two ensure that the model can accurately distinguish the entering and leaving port status of ships in complex shipping scenarios. Using these metrics in multiple dimensions provides a comprehensive understanding of the advantages and disadvantages of the model's prediction performance, guiding accurate optimization, and laying the foundation for the stable operation of the model in a dynamic shipping environment. And optimize through methods such as cross-validation to ensure the generalization ability of the model.

[0093] (5)Real-time Update and Dynamic Prediction: In the ship in and out port prediction system, updating the model prediction results in real time based on ship dynamic information and environmental changes is the core link to improve the model's robustness and ensure accurate prediction. As the ship sails, the AIS system pushes high-frequency ship position (latitude and longitude, speed, heading), environmental sensors monitor meteorological (wind speed and direction, temperature and humidity) and ocean (ocean current and tide, wave conditions) data in real time, forming a dynamic data stream. The model deploys a real-time data processing module to accurately match and integrate new data with the historical data sequence according to the timestamp, ensuring data coherence and timeliness. When the ship accelerates, turns, or encounters sudden weather changes or ocean current turns, the data update instantly triggers a re-evaluation of the model.

[0094] Real-time access and integration of dynamic data: In the scenario of ship in and out port dynamic prediction, LSTM has excellent real-time data processing capabilities and can seamlessly connect to the ship position (accurate latitude and longitude, real-time speed, heading change) pushed by the Automatic Identification System (AIS) at high frequency, as well as meteorological (sudden changes in wind speed and direction, fluctuations in temperature and humidity) and ocean (turns in ocean current and tide, dynamic wave undulations) data monitored by environmental sensors in real time. When a new data point is introduced, LSTM quickly integrates it into the existing data sequence according to the time series characteristics, accurately sorts it according to the timestamp, and ensures data continuity and integrity. When the ship encounters sudden meteorological changes during navigation, the new wind speed, direction, and ocean current data are instantly accepted by LSTM and become the key basis for updating the prediction model, laying a solid data foundation for capturing the ship's state changes in real time and accurately predicting the in and out port trajectories.

[0095] Dynamic adjustment of cell state based on new data: The core mechanism of LSTM is to optimize the cell state in real time based on new data. The input gate selects key information according to the importance of the current input data (such as ship acceleration, turning instructions, or sudden changes in environmental factors), and after transformation by the Tanh function, it is organically integrated with the cell state of the previous moment regulated by the forget gate. If the ship encounters strong winds near the port, the input gate increases the weight of the wind speed and direction data and integrates it into the cell state to adjust the ship speed and heading prediction benchmark; the forget gate dynamically determines the proportion of historical information to be retained based on the correlation between the new environmental characteristics and the ship's historical trajectory, filters out the memory of outdated trajectories (such as the pattern during the smooth ocean voyage stage), and focuses on the current key situation (responding to the complex near-port environment). The output gate calibrates the output according to the updated cell state, accurately adjusts the probability distribution of the predicted arrival time and the trajectory path, ensures that the prediction closely follows the dynamic evolution of the ship, improves the timeliness and accuracy of the prediction, and effectively responds to the uncertainty of the shipping environment.

[0096] Efficient Admission of Dynamic Data Streams: With its unique architecture, the Graph Convolutional Network (GCN) can receive and efficiently process in real-time the dynamic data stream composed of the ship positions (real-time changes in longitude, latitude, speed, and heading) from the Automatic Identification System (AIS) of ships, the meteorological conditions (real-time fluctuations in wind speed and direction, temperature and humidity) monitored by environmental sensors, and the ocean conditions (dynamic evolution of ocean currents, tides, and wave conditions). When new data floods in, the GCN quickly and accurately integrates it into the constructed ship in-port and out-port graph structure based on the data timestamp and entity associations. New ship position nodes are added to the graph in real-time and connected according to their spatial relationships with surrounding ships, port facilities, and environmental monitoring points, ensuring that the graph structure reflects the latest state in real-time and providing a solid data foundation and accurate topological relationship support for subsequent accurate predictions.

[0097] Graph Structure Adaptive Adjustment Mechanism: As the ship sails and the environment changes, the GCN adaptively adjusts the graph structure parameters according to the characteristics of the new data. If a ship enters a new sea area or port area, the GCN quickly identifies the differences in geographical features and facility layouts in this area and dynamically updates the node attributes in the graph (functional parameters of port facility nodes, bathymetric data of geographical nodes) and edge weights (the association strength between the ship and the ocean current monitoring point is adjusted according to the real-time changes in ocean currents), ensuring that the graph model accurately represents the ship's current environment, enhancing its adaptability to the dynamic changes in the ship in-port and out-port environment, effectively avoiding prediction deviations caused by environmental changes, and improving the response speed and accuracy of the prediction model to complex dynamic scenarios.

[0098] Based on ship position data, environmental data, and historical in-port and out-port data, the present invention uses a multi-modal neural network for data fusion to construct an in-port and out-port prediction model based on adaptive LSTM, improving the accuracy and real-time performance of the prediction.

[0099] Specifically, the present invention first collects multi-dimensional data such as the position information, navigation status, and surrounding environmental conditions of ships in real-time through the AIS system, Beidou positioning system, and port environmental monitoring equipment of ships. Then, using big data analysis and machine learning models, combined with the fusion of historical data and real-time data, it predicts key links such as the time, channel, and berthing position of ships entering and leaving the port. The present invention can accurately predict the arrival time, in-port route, and possible obstacles (such as other ships, weather changes, etc.) when a ship approaches the port, effectively optimizing the resource scheduling of fishing ports.

[0100] Through real-time prediction based on ship position and environmental data, the fishing port management department can plan berths, dispatch ships, and arrange unloading operations in advance, thereby improving the port operation efficiency, reducing congestion and ship waiting time. At the same time, the present invention can also help improve the safety of the port, warning of potential collision risks, adverse weather impacts, or other safety hazards, providing more reliable safety guarantees for ships and crew.

[0101] In addition, the present invention is not only applicable to fishing ports, but also can be widely applied to the management and optimization of various ports and waterways. Fishing port management departments, shipowners, fishing cooperatives, and maritime management agencies can use this method to monitor the dynamic of ships entering and leaving the port in real time, effectively supervise the navigation status of ships, environmental changes, and other key data, and ensure the smooth operation of fishing ports and the safety of crew members.

[0102] In summary, through advanced technical means, the present invention integrates multi-dimensional data and uses intelligent algorithms for prediction and optimization, providing an efficient and intelligent solution for the management and operation of fishing ports, helping to improve the operation efficiency of fishing ports, ensuring the safety of ships and crew members, and promoting the construction and development of smart fishing ports.

Claims

1. A ship entry and exit prediction method based on multimodal neural network and adaptive LSTM, characterized by: The following steps are involved: S1. Data collection, including ship position data, environmental data and historical port entry and exit data; S2. Data preprocessing, including data cleaning and standardization; S3. Optimize feature extraction of various types of data; S4. Perform multimodal data fusion, including data splicing fusion, data weighted fusion and data deep fusion; S5. Train and build an adaptive LSTM model to predict the ship's entry and exit behavior and time; S6. Evaluate and optimize the adaptive LSTM model; S7. Real-time prediction and scheduling; S8. Dynamically predict and provide scheduling suggestions.

2. According to claim 1, a method for predicting ship entry and exit based on multimodal neural network and adaptive LSTM is characterized in that: In step S1, the ship position data including but not limited to dynamic position, speed and heading are obtained from the ship's automatic identification system; relatively static conditions including but not limited to geographical features and fixed facility layout, meteorological conditions including but not limited to changes in wind speed and direction and fluctuations in temperature and humidity, and ocean data including but not limited to periodic fluctuations in ocean currents and tides and changes in wave fluctuations are collected as environmental data; past ship entry and exit records of the port are extracted as historical entry and exit data; In step S3, for the ship position data, the position and speed change vectors of the ship at different times are extracted according to the time series; the environmental data encodes the meteorological and ocean conditions at each time point as feature vectors; the historical port entry and exit data are recorded in a specific time window to extract feature vectors; The specific method of data splicing and fusion in step S4 is: splicing the feature vectors of different modes into a unified vector in sequence to form a comprehensive feature vector; The specific method of weighted data fusion in step S4 is: give the ship position data a weight of 0.5, the environment data a weight of 0.3, and the historical port entry and exit data a weight of 0.2, and the fusion feature = ship position data feature × 0.5 + environment data feature × 0.3 + historical port entry and exit data feature × 0.2; The specific method of deep data fusion in step S4 is: constructing a neural network architecture, taking the characteristics of ship position data, environmental data and historical port entry and exit data as the input layer, and learning the intrinsic correlation and complex interaction patterns of each modal data through multiple hidden layers.

3. The method for predicting ship entry and exit based on multimodal neural network and adaptive LSTM according to claim 1, characterized in that: The adaptive LSTM model in step S5 performs multimodal feature extraction including: Time series analysis of ship position data: Through deep mining of time series analysis technology, a time series sub-model is constructed to sample observation values ​​at fixed intervals, calculate speed differences and heading change rates, and accurately capture the behavior patterns of ships including but not limited to acceleration, deceleration and turning; Feature coding of environmental data: Encode the numerical value of environmental factors at each time node as a feature vector, use discretization or quantization methods to convert continuous data into discrete categories or numerical intervals, and mine the trend of meteorological and oceanic conditions and the correlation pattern of abnormal events; Mining patterns in historical port entry and exit data: Filter records according to specific time periods, extract features and build a behavior pattern library; analyze the distribution of port entry and exit time, the pattern of stay time and periodic characteristics under different environments, time periods and ship types, and use data mining and statistical analysis techniques to cluster and analyze the similarity of ship behavior, so as to predict and match similar historical situation patterns for the current ship.

4. A method for predicting ship entry and exit based on multimodal neural network and adaptive LSTM according to claim 3, characterized in that: In step S5, the adaptive LSTM model performs time series analysis and extracts features, including: Data sampling and time series construction: Accurately collect ship position data from the ship automatic identification system AIS, including precise latitude and longitude, timestamp, speed, and heading information; sample at a fixed 5-minute interval to construct a data point sequence, each point containing the ship's position and speed at the time; Speed ​​change analysis: Calculate the speed difference between adjacent sampling points to form a speed difference sequence; if the difference is continuously positive and increasing, the ship is judged to be accelerating; if it is continuously negative and the absolute value increases, it is decelerating; a small fluctuation of the difference around zero is a uniform speed; combined with the time dimension, determine the duration and start and end times of the acceleration and deceleration stages, draw a speed-time curve to intuitively present the change process, and deeply analyze the characteristics and laws of the ship speed change pattern; Heading stability assessment: Calculate the position change vector based on the latitude and longitude of the sampling point, and measure the heading stability by the vector direction stability; if the direction deviation of the position change vector in multiple adjacent time periods is within a small threshold, the heading is considered stable; otherwise, it is variable; count the proportion of heading stability duration, the number of turns, and the distribution of turning angles; Trend smoothing and pattern recognition: Use the moving average method to smooth the speed sequence, filter out short-term fluctuation noise interference, and highlight the long-term change trend; combine the smoothed speed trend with the heading stability state to identify the ship's turning, uniform speed, and variable speed navigation modes and their conversion times and conditions, and construct a complete ship motion pattern map.

5. A method for predicting ship entry and exit based on multimodal neural network and adaptive LSTM according to claim 4, characterized in that: In step S5, the adaptive LSTM model uses a graph convolutional neural network (GCN) to perform multimodal data fusion, specifically: constructing a sub-model of a ship entry and exit graph, where nodes include but are not limited to ships, port facilities, and meteorological and oceanographic monitoring points, and edges represent relationships between entities; the ship position data is processed by a graph convolutional neural network (GCN), and potential features are mined based on the relationship between the ship trajectory and surrounding nodes; In step S5, the adaptive LSTM model uses a graph convolutional neural network (GCN) to capture complex environmental features. Specifically, in the port geographical environment, including but not limited to port facilities and waterways, the graph convolutional neural network (GCN) learns the impact of geographical layout on ship path planning; in the meteorological environment, the meteorological monitoring station is used as a node, and the graph convolutional neural network (GCN) extracts features based on the propagation law of meteorological data; In the ocean current environment, a graph is constructed through ocean current monitoring points, and the graph convolutional neural network (GCN) analyzes the complex structure of the ocean current field and the interaction with the ship; In step S5, the adaptive LSTM model improves dynamic adaptability based on the collaboration between the graph convolutional neural network GCN and the adaptive LSTM. Specifically, the graph convolutional neural network GCN dynamically updates the graph structure and parameters according to the port entity relationship; the adaptive LSTM adaptively adjusts the network according to the new data. The combination of the two realizes the online update learning of the adaptive LSTM model.

6. A method for predicting ship entry and exit based on multimodal neural network and adaptive LSTM according to claim 5, characterized in that: The adaptive LSTM model performs adaptive feature adjustment including: Adaptive learning rate algorithm: The adaptive LSTM model is trained according to the Adam algorithm. The adaptive LSTM model dynamically adjusts the learning rate based on the first-order moment estimation and second-order moment estimation of the gradient. Adaptive gating mechanism: Design gating parameter adjustment rules, triggered by environmental data intensity or ship position change rate; increase the weight of input gate corresponding to environmental data in strong winds to focus on environmental impact; reduce the weight when the ship is sailing steadily and pay attention to the historical information of the ship's position; Adaptive network structure: The mean square error (MSE) is monitored during adaptive LSTM model training. If the mean square error (MSE) does not decrease or increase for several consecutive rounds, the number of LSTM layers or neurons is adjusted according to preset rules.

7. A method for predicting ship entry and exit based on multimodal neural network and adaptive LSTM according to claim 6, characterized in that: In step S5, the adaptive LSTM model uses real-time prediction process and decision basis as well as dynamic adjustment mechanism and system optimization to make predictions; The real-time prediction process and decision-making basis are as follows: when a ship approaches a port, the real-time data stream is continuously input into the adaptive LSTM model. The adaptive LSTM model receives the latest ship position deceleration trend, breeze and downstream environment, and similar historical conditions through input layer reception, LSTM layer deep analysis, and full connection layer conversion, and outputs the probability distribution of 70% probability of entering the port within 2 hours and 90% probability of entering the port within 3 hours; The dynamic adjustment mechanism and system optimization are specifically as follows: as the ship navigates and the environment evolves, the adaptive LSTM model dynamically updates the prediction. When encountering special circumstances, the adaptive LSTM model responds quickly based on the real-time pushed data and re-evaluates the risk and time of entering the port; the re-evaluation method is as follows: the LSTM layer focuses on the key factors affecting the ship under special circumstances, dynamically adjusts the weights to strengthen the role of related factors, and the fully connected layer updates the probability distribution.

8. The method for predicting ship entry and exit based on multimodal neural network and adaptive LSTM according to claim 1, characterized in that: The evaluation and optimization of the adaptive LSTM model in step S6 includes data partitioning and model training process, formulating hyperparameter adjustment strategy and designing dynamic adaptive fusion mechanism; The data partitioning and model training process is specifically as follows: the data set is uniformly and randomly divided into 5 non-overlapping subsets using the K-fold cross-validation method, iterated 5 times, 4 subsets are selected each time as training sets to train the adaptive LSTM model, and the remaining 1 subset is used as the validation set for evaluation; the first 4 subsets are selected in the first round to train the adaptive LSTM model to predict the 5th subset, and the records include but are not limited to the mean square error MSE and mean absolute error MAE indicators; The hyperparameter adjustment strategy is as follows: summarize the validation error indicators of each round to construct an evaluation matrix, deeply analyze the error fluctuation characteristics and mean level; under a certain parameter combination, if the standard deviation of the validation error of each fold is lower than the threshold and the mean is the lowest among similar combinations, it is judged to be excellent; when adjusting the number of neurons in the LSTM hidden layer, expand it from 64 to 128, resulting in a 15% decrease in the multi-fold MSE mean and a 30% reduction in the standard deviation, and determine the new parameters to improve generalization ability; The dynamic adaptive fusion mechanism is specifically: real-time monitoring of data statistical characteristics, including but not limited to mean, variance, and skewness and adaptive LSTM model prediction error feedback, and using reinforcement learning algorithm or dynamic Bayesian network online optimization fusion strategy.

Citation Information

Cited By

  • Multi-modal question and answer method and device fusing history of learner

    CN120407880A

  • River-sea combined transportation scheduling optimization method and system based on transportation volume prediction

    CN120450559A

  • Ship water gauge dynamic calibration identification system and method based on multi-modal data fusion

    CN120702565A

  • Ship water gauge dynamic calibration identification system and method based on multi-modal data fusion

    CN120702565B

  • Intelligent management and control system for digital flow of port production operation

    CN120952649A