Ocean-going ship navigation risk identification method and device based on multi-source data fusion and machine learning

By integrating multi-source data and machine learning methods, a random forest multi-classifier and SHAP framework were constructed to solve the problems of single data, fixed rules, and imbalanced models in the identification of dynamic risks in ocean-going vessel navigation. This resulted in high-accuracy and interpretable risk identification, meeting the needs of shipping decision-making.

CN123180729APending Publication Date: 2026-11-27CHINA WATERBORNE TRANSPORT RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611280961.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies for identifying dynamic risks in ocean-going vessel navigation suffer from problems such as single data sources, fixed risk assessment rules, unbalanced models, and black-box characteristics, resulting in insufficient accuracy and interpretability, making it difficult to meet the needs of shipping decision-making.

Method used

By using multi-source data fusion and machine learning methods, meteorological data and ship automatic identification system trajectory data are collected, matched and reanalyzed to construct a random forest multi-classifier. Combined with synthetic minority class oversampling and cost-sensitive learning, the risk identification model is trained and validated. Attribution analysis is performed through the SHAP framework to form a list of disaster-causing factors.

Benefits of technology

It achieves high-accuracy risk identification, reduces false alarm rate, improves model interpretability and reliability, enhances the trust in shipping decisions, and can accurately identify complex risks and extreme events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180729A_ABST
    Figure CN123180729A_ABST
Patent Text Reader

Abstract

The present application belongs to the field of navigation safety engineering and marine meteorological information, and relates to a method and device for identifying navigation risks of ocean-going ships based on multi-source data fusion and machine learning. The method comprises the following steps: fusing reanalysis meteorological data and AIS trajectory data, generating a ship position-environment data set through quality control and space-time matching; setting the thresholds of strong wind, heavy fog and dangerous waves according to international standards and automatically labeling them to construct space-time derived features. The training / test set is divided in chronological order, a multi-classifier is constructed using random forest, sample imbalance is processed using SMOTE and cost-sensitive learning, and hyperparameters are optimized through chainwise cross-validation and grid search. The reliability of the test set is verified through triple testing (feature importance, independent extrapolation outside the ship, misclassification backtracking). Finally, SHAP is used for attribution analysis, combined with weather dynamics diagnosis to extract disaster-causing factors and form a list of decision factors. This method replaces fixed threshold alarms with dynamic classification, improving identification accuracy and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of maritime safety engineering and marine meteorological information technology, and in particular to a method and apparatus for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning. Background Technology

[0002] In existing technologies, the identification of dynamic risks in ocean-going vessel navigation often involves traditional paradigms such as single data source driving, static risk threshold judgment, coarse handling of sample imbalance, and insufficient model interpretability.

[0003] The core defects in existing technologies are reflected in the following four aspects: Single data source and coarse matching: Traditional methods often rely on single reanalysis meteorological grid data or only on the static ship position of AIS (Automatic Identification System), lacking fine spatiotemporal matching between meteorological environment and ship dynamics. This results in the actual environmental parameters at the ship position being significantly smoothed or interpolated and distorted, making it difficult to capture the instantaneous severe sea conditions encountered by the ship in a local area.

[0004] The risk assessment rules are fixed and lack machine learning modeling: Early technologies mainly set fixed thresholds for Boolean type alarms based on international standards (such as the World Meteorological Organization's wind and wave rating), which cannot handle the complex risks under the combined effect of multiple factors (such as strong winds and large waves), and ignore the different sensitivities of different ship types and routes to the same environmental quantity, resulting in high false alarm and false alarm rates.

[0005] The problem of data imbalance is seriously ignored: the proportion of navigation risk samples (especially high-risk events) in the actual historical trajectory is extremely low. Existing methods directly train classifiers, which will cause the model to be biased towards the majority class (safe samples) and have almost no ability to identify rare risk events. On the other hand, simple oversampling or undersampling can easily lead to overfitting or information loss.

[0006] The black-box nature of models restricts the adoption of shipping decisions: Most existing studies only output risk probability values ​​without providing physical explanations for the causes of risks. Shipping managers cannot determine why the model issued a certain warning, resulting in low decision-making confidence and difficulty in transforming the identification results into actionable navigation avoidance measures. Summary of the Invention

[0007] To address the aforementioned technical problems, this invention provides a method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning, employing the following technical solution, including the following steps: Collect reanalysis meteorological data and ship automatic identification system trajectory data covering the target route, perform quality control on the data, and perform spatiotemporal matching of the reanalysis meteorological data and the ship automatic identification system trajectory data to generate a matching dataset in which ship position and environmental parameters correspond one-to-one. Based on the matching dataset, quantitative physical thresholds for three types of risk events—strong winds, dense fog, and dangerous waves—are established in accordance with international navigation standards. Risk category labels are generated for each record using an automated annotation script. At the same time, spatiotemporal derived features with physical meaning are constructed to form a feature-label matrix. Based on the feature-label matrix, the dataset is divided into a training set and an independent test set in chronological order. A multi-classifier is constructed using the random forest algorithm, and the data imbalance problem is addressed by using synthetic minority class oversampling technology and cost-sensitive learning method to obtain the trained risk identification model. Based on the training set, the risk identification model is validated using the time series forward chain cross-validation method. The hyperparameters of the random forest algorithm are optimized by grid search, and the hyperparameter combination with the best average performance in cross-validation is selected as the final model configuration. Based on the independent test set, the risk identification model after hyperparameter optimization is subjected to a triple test, which includes feature importance analysis using the built-in function of random forest, external validation using historical observation data of independent ships, and time series backtracking analysis of misclassification cases to verify the reliability, generalization ability and physical consistency of the model. Based on the risk identification model that has been verified through triple testing, the SHAP framework is used to perform global attribution analysis and local attribution explanation of the model's prediction results. Combined with weather dynamics diagnosis, key disaster-causing factors are extracted from the features with the highest importance ranking in SHAP, forming a list of disaster-causing factors that can serve shipping decision-making.

[0008] To address the aforementioned technical problems, this invention also provides a navigation risk identification device for ocean-going vessels based on multi-source data fusion and machine learning, employing the following technical solution, including: The data acquisition module is used to collect reanalysis meteorological data and ship automatic identification system trajectory data covering the target route, perform quality control on the data, and perform spatiotemporal matching of the reanalysis meteorological data and the ship automatic identification system trajectory data to generate a matching dataset in which the ship position and environmental parameters correspond one-to-one. The annotation module is used to formulate quantitative physical thresholds for three types of risk events—strong winds, dense fog, and dangerous waves—based on the matching dataset and in accordance with international navigation standards. It generates risk category labels for each record through an automated annotation script, and constructs spatiotemporal derived features with physical meaning to form a feature-label matrix. The processing module is used to divide the feature-label matrix into a training set and an independent test set in chronological order, construct a multi-classifier using the random forest algorithm, and use synthetic minority class oversampling technology and cost-sensitive learning method to handle the data imbalance problem, so as to obtain the trained risk identification model. The optimization module is used to validate the risk identification model based on the training set using the time series forward chain cross-validation method, optimize the hyperparameters of the random forest algorithm through grid search, and select the hyperparameter combination with the best average performance in cross-validation as the final model configuration. The verification module is used to perform a triple test on the risk identification model after hyperparameter optimization based on the independent test set. The triple test includes feature importance analysis using the built-in function of random forest, external verification using historical observation data of independent ships, and time series backtracking analysis of misclassification cases to verify the reliability, generalization ability and physical consistency of the model. The analysis module is used to perform global attribution analysis and local attribution interpretation on the model prediction results based on the risk identification model that has been verified by triple testing, and combined with weather dynamics diagnosis, extract key disaster-causing factors from the features with the highest importance ranking in SHAP, forming a list of disaster-causing factors that can serve shipping decision-making.

[0009] To address the aforementioned technical problems, the present invention also provides a computer device that employs the technical solution described below, comprising a memory and a processor. The memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the above-described method for identifying ocean-going vessel navigation risks based on multi-source data fusion and machine learning.

[0010] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium, which employs the technical solution described below. The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the aforementioned method for identifying ocean-going vessel navigation risks based on multi-source data fusion and machine learning.

[0011] Compared with the prior art, the present invention has the following main advantages: (1) High-fidelity data fusion and refined spatiotemporal matching: The reanalysis meteorological field and AIS dynamic trajectory are precisely matched ship by ship, time by time and point by point, instead of coarse grid interpolation, so that each ship position can correspond to the environmental factors such as wind, waves and visibility encountered in reality, which greatly improves the physical authenticity of the input data.

[0012] (2) Dynamic intelligent classification replaces fixed threshold alarm: The random forest multi-classifier is introduced, which can automatically learn the nonlinear coupling relationship between multiple environmental factors and ship motion state, and distinguish between safety, wind risk, fog risk, dangerous wave risk and compound risk. Compared with the fixed threshold method, it has higher accuracy and lower false alarm rate.

[0013] (3) Targeted solution to the problem of scarce extreme risk samples: By combining SMOTE oversampling and cost-sensitive learning, the model can increase the number of minority class samples while imposing a greater penalty on misclassified high-risk samples, significantly improving the detection rate of rare risks (such as extreme wave heights) and avoiding the bias of traditional methods that prioritize safety above all else.

[0014] (4) End-to-end interpretability and physical consistency assurance: Through SHAP global and local attribution and weather dynamics diagnosis, it can not only give the risk probability, but also clearly tell whether wind or waves are the main cause. Furthermore, through triple verification (feature importance, independent ship extrapolation, false alarm backtracking), it ensures that the model output conforms to the laws of marine meteorological physics, greatly enhancing the shipping decision-makers' trust in the system and facilitating the formulation of accurate avoidance or deceleration strategies. Attached Figure Description

[0015] To more clearly illustrate the solutions in this invention, the accompanying drawings used in the description of the embodiments of this invention will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0016] Figure 1 This is a flowchart of an embodiment of the method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning according to the present invention; Figure 2 This is a schematic diagram of an embodiment of the ocean-going vessel navigation risk identification device based on multi-source data fusion and machine learning of the present invention; Figure 3 This is a schematic diagram of the structure of an embodiment of the computer device of the present invention. Detailed Implementation

[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the terminology used herein in the specification is for the purpose of describing particular embodiments only and is not intended to limit the invention; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings are used to distinguish different objects and not to describe a particular order.

[0018] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0019] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0020] It should be noted that the ocean-going vessel navigation risk identification method based on multi-source data fusion and machine learning provided in the embodiments of the present invention is generally executed by a server / terminal device, and correspondingly, the ocean-going vessel navigation risk identification device based on multi-source data fusion and machine learning is generally set in the server / terminal device.

[0021] It should be understood that the number of terminal devices, networks, and servers is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be used.

[0022] Example 1

[0023] Please refer to Figure 1 The diagram illustrates a flowchart of an embodiment of the ocean-going vessel navigation risk identification method based on multi-source data fusion and machine learning according to the present invention. The method includes the following steps: Step S1: Collect reanalysis meteorological data and AIS trajectory data covering the target route, perform quality control on the data, and perform spatiotemporal matching of the reanalysis meteorological data and AIS trajectory data to generate a matching dataset in which the ship position and environmental parameters correspond one-to-one.

[0024] In this embodiment, the electronic device (e.g., server / terminal device) on which the ocean-going vessel navigation risk identification method based on multi-source data fusion and machine learning runs can receive ocean-going vessel navigation risk identification requests based on multi-source data fusion and machine learning via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future-developed wireless connection methods.

[0025] In this embodiment, step S1 may specifically include the following steps: S11. The target route is defined as the research scenario, the time window and spatial range of data collection are determined, meteorological and marine environmental parameters including wind field, wave height, air pressure, temperature and dew point temperature are downloaded from the reanalysis database, and dynamic and static information of ships covering the time window and spatial range are obtained from the global Automatic Identification System data service provider.

[0026] The China-Africa shipping route was selected as a typical research scenario. This route is specifically defined as an ocean route departing from major Chinese ports (Shanghai Port, Ningbo-Zhoushan Port, Shenzhen Port), passing through the Strait of Malacca, the Indian Ocean, and the Cape of Good Hope, to reach major West African ports (Lagos Port, Abidjan Port). This route traverses tropical, subtropical, and temperate sea areas, passing through monsoon regions and storm belts, exhibiting complex and diverse sea conditions, making it a valuable subject for research.

[0027] The time window can be selected according to actual needs. In this embodiment, it is selected as January 1, 2024 to December 31, 2025, a total of 2 years. Selecting recent data ensures that the model reflects the current climate conditions and shipping patterns.

[0028] ERA5 (ECMWF Reanalysis v5, ECMWF fifth-generation reanalysis data) data acquisition: The following variables were downloaded from the Copernicus Climate Data Store (CDS) platform of the European Centre for Medium-Range Weather Forecasts (ECMWF): 10-meter height zonal wind component ( (Unit: m / s), meridional wind component at 10 meters height ( (Unit: m / s), 2-meter dew point temperature ( (Unit: K), 2-meter temperature ( (Unit: K) Significant wave height (SWH, denoted as K) (Unit: m) Mean wave period (denoted as m) (Unit: s) Mean wave direction (denoted as s) (Unit: rad) Sea level pressure (mean sea level pressure, denoted as rad) (Unit: Pa). Data spatial resolution is... The time resolution is 1 hour.

[0029] The latest global climate reanalysis dataset released by ECMWF covers decades and provides hourly meteorological and oceanographic variables at a resolution of 0.25°.

[0030] AIS Data Acquisition: Dynamic messages (Message Types 1, 2, and 3) covering the research area and time window are obtained from global AIS data service providers. These messages include: Maritime Mobile Service Identity (MMSI), timestamp (UTC, Coordinated Universal Time), longitude (°), latitude (°), speed over ground (SOG, km / h), and course over ground (COG, °). Static messages (Message Type 5) are also acquired to extract information such as vessel type, length, and beam.

[0031] The purpose of step S11 is to determine the geographical scope and time window of the study, and to complete the raw acquisition of ERA5 reanalysis data and AIS trajectory data.

[0032] S12 performs position rationality checks, speed rationality checks, time continuity checks, and duplicate record removal on the Automatic Identification System (AIS) data in sequence. It also performs range checks and physical consistency checks on the reanalyzed data, filtering out abnormal records that do not conform to physical laws.

[0033] The following quality control rules are implemented for AIS data: Location rationality check: Eliminate locations with latitude and longitude exceeding the limit. and Records within a certain range; records located on land are excluded (based on a global coastline database).

[0034] Speed ​​reasonableness check: Remove records with SOG > 50kn or SOG < 0kn.

[0035] Time continuity test: The trajectories of the same MMSI are sorted by time, and isolated points with time jumps exceeding 6 hours are removed (considered as signal interruption or equipment failure).

[0036] Duplicate record deduplication: When multiple records for the same MMSI appear at the same timestamp, the first record is retained.

[0037] The following quality control measures were implemented for ERA5 data: Range test: Exclusion or m records; remove hPa or Records of hPa.

[0038] Physical consistency check: Remove records where the wind speed and pressure gradient are clearly inconsistent (e.g., low wind speed accompanied by extremely low pressure is considered suspicious).

[0039] The purpose of step S12 is to filter out noisy records and outliers in the original data to avoid problems caused by garbage entering and exiting the data.

[0040] S13. For each vessel AIS record that has undergone quality control, match its timestamp with the most recent reanalysis data field and perform necessary time interpolation, match its spatial location with the nearest reanalysis data grid point, assign the matched reanalysis environmental parameters to the corresponding vessel record, and generate a matching dataset.

[0041] Time Matching: AIS records use timestamps in UTC integer seconds. ERA5 data is in hourly increments (00:00, 01:00, ...). For each AIS record, the ERA5 field for the nearest hour is matched. If the difference between the AIS timestamp and the nearest hourly increment exceeds 30 minutes, linear time interpolation is performed. .

[0042] Where: t is the AIS recording time (unit: h). and For adjacent hourly times ( (Unit: h) For any environmental variable value (the unit depends on the specific variable, such as wave height in meters and wind speed in meters per second).

[0043] This formula assumes that environmental variables change linearly over two hours, distributing the difference proportionally over time. Both sides of the formula use the dimension of X, ensuring consistency and avoiding contradiction.

[0044] Spatial matching: ERA5 mesh resolution is For each AIS record (longitude) ,latitude (Unit: °), take the nearest grid point. ,satisfy: .

[0045] in: Longitude (in °) of candidate grid points. The latitude (in degrees) of the candidate grid points. Longitude (unit: °) recorded by AIS. Latitude (unit: °) recorded by AIS. This term is used to correct for the effect of longitude distance varying with latitude.

[0046] Each term within the square root represents the square of the difference between latitude and longitude (dimension: °). 2 Both sides are dimensionless distance metrics. The actual distance is calculated using the spherical cosine formula. If the distance to the nearest grid point exceeds 50 km, it is marked as no match and discarded.

[0047] Through the above spatiotemporal matching, each AIS record is assigned a set of environmental parameters (wind speed, wave height, wave direction, air pressure, etc.), forming a matching dataset. .

[0048] The purpose of step S13 is to spatiotemporally correlate the ship position recorded by AIS with the environmental parameters on the ERA5 grid points to generate a complete record of the ship position and environment corresponding to each AIS record.

[0049] The core objective of step S1 is to construct a matching dataset that corresponds one-to-one between ship trajectory and environmental conditions, providing a data foundation for subsequent feature engineering.

[0050] Step S2: Based on the matching dataset, quantitative physical thresholds for three types of risk events—strong winds, dense fog, and dangerous waves—are established according to international navigation standards. Risk category labels are generated for each record using an automated annotation script. At the same time, spatiotemporal derived features with physical meaning are constructed to form a feature-label matrix.

[0051] In this embodiment, step S2 may specifically include the following steps: S21 establishes physical thresholds for gale events based on the World Meteorological Organization's Beaufort scale, physical thresholds for fog events based on the International Maritime Organization's visibility class standards, and physical thresholds for dangerous wave events based on the International Maritime Organization's second-generation intact stability criterion, thus forming quantitative judgment rules for three types of risk events.

[0052] High Wind (HW) Threshold: Based on the World Meteorological Organization (WMO) Beaufort Scale and the IMO (International Maritime Organization) ship maneuverability standards, the wind speed at a height of 10 meters is defined. (Unit: m / s) Winds exceeding 13.9 m / s (upper limit of level 7) are classified as gale-force winds. The calculation formula is: .

[0053] in: The zonal wind speed at a height of 10 meters (unit: m / s, positive for east). The meridional wind speed at a height of 10 meters (unit: m / s, north is positive).

[0054] The unit is m / s, and , Consistent.

[0055] Heavy Fog (HF) Threshold: Visibility is defined with reference to the IMO visibility class system. (Unit: km) Visibility below 1 km is considered a dense fog event. ERA5 does not provide visibility directly; it is indicated by the 2-meter dew point temperature. The difference between the temperature at 2 meters (T, K) and the relative humidity (RH, %) is used to estimate the relative humidity (RH, %). Furthermore, wind speeds of very low intensity (<3 m / s) are considered potential conditions for dense fog. Actual visibility is estimated using an empirical formula: , Unit: km.

[0056] Where: RH is relative humidity (unit: %, value range 0-100).

[0057] It is the natural logarithm function.

[0058] The constant -0.070 in the denominator is the empirical extinction coefficient (unit: km). -1 (Take a negative sign to make the visibility value positive).

[0059] Before calculation, RH needs to be divided by 100 to get a dimensionless value of 0~1, ensuring that the overall output dimension of the formula is km.

[0060] This formula is based on a simplified version of Koschmieder's law and is suitable for approximate estimation of visibility under hazy conditions. When The event was marked as a fog event.

[0061] Hazardous Wave (HWv) Threshold: Referencing the definition of excessive roll risk in the IMO Second Generation Intact Stability Criteria (SGISC), a significant wave height is defined. (Unit: m) A dangerous wave event is defined as a wave exceeding 6 m or a wave height to ship length ratio exceeding a specific threshold. The specific rules are as follows: .

[0062] in: Significant wave height (unit: m); The length between perpendiculars of the ship (unit: m); This is an indicator function (it takes the value 1 if the condition is true, and 0 otherwise). This is a dimensionless ratio (m / m = 1); The constant 0.03 is a dimensionless threshold.

[0063] This dual condition considers both the absolute wave height and the relative wave height relative to the ship's length, reflecting the risk differences related to ship type. In terms of dimensions, The comparison is between wave height and length (both measured in meters). This is a dimensionless comparison.

[0064] The purpose of step S21 is to formulate quantitative physical thresholds for three types of risk events—strong winds, dense fog, and dangerous waves—based on international maritime conventions and navigation rules, so as to provide an objective basis for tag generation.

[0065] S22, the quantitative judgment rules are written into an automated labeling script, and each record in the matching dataset is judged in turn to see if it meets the conditions of strong wind, heavy fog, and dangerous waves. According to the preset risk priority order, each record is labeled with a unique risk category label, which is labeled as safe status, strong wind risk, heavy fog risk, or dangerous wave risk.

[0066] Use Python to write annotation scripts to... For each record in the database, the following logic is executed: calculate , , .

[0067] Judge the three types of risk conditions in sequence: If the strong wind threshold is met, mark it. (Risk of strong winds); Otherwise, if the fog threshold is met, mark it. (Fog risk); Otherwise, if the dangerous wave threshold is met, mark it. (Dangerous waves and risks); Otherwise, mark (Safe status).

[0068] If multiple conditions are met simultaneously, sort them by priority: Dangerous Waves ( Strong winds ) > Dense fog ( Priorities are set based on the IMO's statistical ranking of the severity of ship accidents caused by various risks.

[0069] The annotation results are denoted as label vectors. , where N is the total number of records in the matching dataset (a dimensionless integer).

[0070] The purpose of step S22 is to programmatically implement the above threshold rules and automatically label each record in the matching dataset with a risk category label.

[0071] S23. Based on the original environmental parameters in the matching dataset, construct spatiotemporal derived features with physical meaning, including air pressure gradient, wave height change rate, wind and wave coupling factor and comprehensive sea state index. Merge the spatiotemporal derived features with the original features to form a feature-label matrix.

[0072] Construct the following four types of derived features: Pressure gradient The pressure gradient reflects the strength of the baroclinicity of the atmosphere and is directly related to wind speed. The formula for calculating the pressure gradient is: .

[0073] in: Sea level pressure (unit: Pa); x represents the horizontal distance along the meridian (unit: m); y represents the horizontal distance in the latitudinal direction (unit: m); This is the partial derivative of air pressure along the meridian (unit: Pa / m). This is the partial derivative of air pressure along the latitudinal direction (unit: Pa / m). The pressure gradient calculation formula outputs a dimensionless value in Pa / m.

[0074] Partial derivatives are calculated from adjacent ERA5 grid points using a central difference scheme.

[0075] The greater the pressure gradient, the stronger the geostrophic wind, and the higher the risk of strong winds.

[0076] Wave Height Tendency, Wave height change rate reflects the drastic trend of sea state changes and is an important early warning indicator for ships encountering sudden severe sea conditions. The formula for calculating wave height change rate is: .

[0077] in: The current significant wave height (unit: m); Significant wave height 3 hours ago (unit: m); The denominator 3 represents the time interval (in hours), the molecular wavelength (in meters), and the output. The dimension is m / h.

[0078] Positive values ​​indicate deteriorating sea conditions, while negative values ​​indicate improving sea conditions.

[0079] Wind-Wave Coupling Factor The wind-wave coupling factor characterizes the phase relationship between wind speed and wave height. When the wind direction is the same as the wave propagation direction and the wind speed is greater than the wave speed, energy is transferred from the atmosphere to the ocean, and the wave height continues to increase. The formula for calculating the wind-wave coupling factor is: .

[0080] in: The wind speed is 10 meters per second (unit: m / s). Significant wave height (unit: m); Mean wave direction (unit: rad); Wind direction (by , pass( , (Calculation, unit: rad). It is a cosine function, taking values ​​in... Between (dimensionless), output Dimensionless m 2 / s.

[0081] This value can be understood as an indicator of the power density of wind energy transferred to waves. The larger the value, the stronger the wind-wave coupling and the greater the potential for sea state deterioration.

[0082] Integrated Sea State Index The comprehensive sea state index is: , , The weighted combination reflects the overall severity of sea conditions: .

[0083] in: Significant wave height (unit: m); The wind speed is 10 meters per second (unit: m / s). The average wave period (unit: s); The weighting coefficients (dimensionless) are used to determine the loadings of the first principal component through Principal Component Analysis (PCA). The loadings are taken as follows: , , .

[0084] because , , Directly weighting and summing quantities with different dimensions (m, m / s, s) will lead to inconsistencies in dimensions. In practical implementation, [the following will be done] , , Each variable is first standardized (subtract the mean and divide by the standard deviation to convert it to a dimensionless Z-score), and then a weighted sum is calculated. This is a dimensionless exponent for ease of use in the model. The formula here is a simplified expression; in actual implementation... , , All values ​​represent standardized dimensionless values. All input variables are uniformly standardized using Z-score to eliminate differences in physical dimensions.

[0085] All derived features are merged with the original features to form the final feature matrix. , where M is the total number of features (original features + derived features, a dimensionless integer). Represents an N-row, M-column real matrix.

[0086] The purpose of step S23 is to construct derived features with clear physical meaning, thereby enhancing the model's ability to perceive the trend of risk evolution, rather than relying solely on single-point instantaneous values.

[0087] The core objective of step S2 is to transform the raw matching data into a feature-label matrix that the model can learn.

[0088] Step S3: Based on the feature-label matrix, the dataset is divided into a training set and an independent test set in chronological order. A multi-classifier is constructed using the random forest algorithm, and the data imbalance problem is addressed by using synthetic minority oversampling technology and cost-sensitive learning methods to obtain the trained risk identification model.

[0089] In this embodiment, step S3 may specifically include the following steps: S31. Sort all records in the feature-label matrix according to the time stamp order, use all data in the first time period as the training set, and use all data in the second time period that is after the first time period and does not overlap with it as the independent test set, to ensure that the independent test set does not participate in the model training and hyperparameter selection process.

[0090] Sort the matching dataset by timestamp. Use the entire year of 2024 (January 1, 2024, 00:00 to December 31, 2024, 23:00) as the training set. The entire year of 2025 (from 00:00 on January 1, 2025 to 23:00 on December 31, 2025) was used as the independent test set. .

[0091] The rationale behind this division is that shipping risk management focuses on predicting future risks based on historical data, and the training and testing periods should not overlap. Using whole years instead of random division preserves the temporal structure of the data, facilitating subsequent cross-validation of time series data.

[0092] The purpose of step S31 is to divide the dataset in chronological order to ensure that the model evaluation does not introduce future information leakage and reflects the real forecast scenario.

[0093] S32 uses the random forest algorithm as the core classifier. It generates multiple training subsets through bootstrapping, constructs a decision tree for each training subset, and determines the multi-classification result through majority voting, thus building an initial classification model that can learn risk patterns from the training set.

[0094] Random forest is an ensemble learning algorithm based on decision trees. It generates multiple training subsets through bootstrap sampling, trains a decision tree on each subset, and finally determines the classification result through majority voting. Key hyperparameters include: the number of trees (…). (dimensionless integer), maximum depth of each tree ( , dimensionless integers), the largest eigenvalue considered during splitting ( (a dimensionless integer).

[0095] The advantages of random forest in this method are: it naturally supports multi-class classification tasks; it has a built-in feature importance assessment, which facilitates subsequent interpretation; it is robust to outliers and noise; it is not prone to overfitting and is suitable for handling high-dimensional feature spaces.

[0096] The goal of model training is to minimize the classification error: .

[0097] in: The final predicted category of sample i by the model (takes one of 0, 1, 2, or 3); k is the category index (0 represents safety, 1 represents strong wind, 2 represents dense fog, and 3 represents dangerous waves). T is the total number of decision trees (a dimensionless integer); Let t be the predicted category of sample i by the t-th tree; The feature vector of sample i ( ); This is an indicator function (it takes the value 1 if the condition is true, and 0 otherwise). argmax represents taking the maximum value of k that makes the expression described later.

[0098] A vote is taken on the predictions of all decision trees, and the category with the most votes is selected as the final prediction.

[0099] The purpose of step S32 is to use the random forest algorithm as the core classifier and utilize its ensemble learning mechanism to handle high-dimensional features and nonlinear relationships.

[0100] S33 applies a synthetic minority oversampling technique to the training set, generating synthetic samples by linear interpolation between minority class samples to balance the class distribution. At the same time, cost-sensitive learning is introduced during the training process of random forest, imposing a higher penalty cost on misclassification of minority class samples than that of majority class samples, thus mitigating the class imbalance problem at both the data and algorithm levels.

[0101] SMOTE (Synthetic Minority Over-sampling Technique) generates synthetic samples by linear interpolation between minority class samples, rather than simply copying them. For each minority class sample... ), from its k nearest neighbors (usually Randomly select a sample from (dimensionless integers). Generate new samples: .

[0102] in: For the generated synthetic samples ( ); For the current minority class samples ( ); Another minority class sample randomly selected from its nearest neighbors ( ); These are uniformly distributed random numbers (dimensionless). The feature difference vector between two samples ( ).

[0103] The new sample is located on the line segment connecting the two real samples, and its position is determined by... The decision is made. SMOTE is only performed on the training set, while the test set remains unchanged to reflect the true distribution.

[0104] Cost-Sensitive Learning: In the training process of random forests, different costs are assigned to misclassifications of different classes. A cost matrix is ​​defined. ,in This represents the cost of misclassifying category j as category k: .

[0105] Where: j is the true category index ( ); k is the predicted category index ( ); The number of training samples for class j (dimensionless integer); The number of training samples for class k (dimensionless integer); The cost weight is a dimensionless cost weight.

[0106] This design makes misclassification of minority classes more costly (when...) (At that time), it forces the model to pay more attention to minority class samples during training.

[0107] This method employs a combined strategy of SMOTE and cost-sensitive learning, which can alleviate the imbalance problem at both the data and algorithm levels. During training, SMOTE is first applied to the training set to achieve class balance, and then a cost-sensitive approach is used to train the random forest.

[0108] The purpose of step S33 is to address the data imbalance problem where the number of risk event samples is far less than the number of safe state samples, and to improve the model's ability to identify minority risks.

[0109] The core objective of step S3 is to build a classifier that can learn risk patterns from the feature-label matrix.

[0110] Step S4: Based on the training set, the risk identification model is validated using the time series forward chain cross-validation method. The hyperparameters of the random forest algorithm are optimized by grid search, and the hyperparameter combination with the best average performance in the cross-validation is selected as the final model configuration.

[0111] In this embodiment, step S4 may specifically include the following steps: S41, the training set is divided into multiple time blocks in chronological order, and a forward chain cross-validation method is adopted, in which all time blocks before the current time block are used as training subsets and the current time block is used as validation subsets, forming multiple training-validation pairs arranged in chronological order.

[0112] Standard k-fold cross-validation randomly partitions the data without preserving the temporal order. In time series forecasting, this can lead to the model using future data to validate past data, resulting in optimistic bias. This method employs TimeSeries Forward Chaining Cross-Validation.

[0113] The specific operation is as follows: Divide the 2024 training set into 12 blocks (January to December). Perform the following validation rounds in sequence: Round 1: Training will be conducted in January and February, and validation will be performed in March; Round 2: Training will be conducted from January to March, and validation will be performed in April; … Round 10: Training from January to November, and validation in December.

[0114] A total of 10 training-validation pairs were formed. The validation set for each round was strictly placed after the training set to prevent future information leakage.

[0115] The purpose of step S41 is to generate a validation fold that reflects the temporal dependency relationship, thereby avoiding the leakage of future information in the standard k-fold cross-validation.

[0116] S42, set the hyperparameters to be optimized for the random forest algorithm and their candidate value ranges, calculate the macro-average F1 score for each hyperparameter combination on each training-validation pair, take the mean of the macro-average F1 scores on all validation pairs as the performance evaluation index of the hyperparameter combination, and select the hyperparameter combination with the best performance evaluation index.

[0117] Perform a grid search on the following three core hyperparameters: (Dimensionless integer) (Dimensionless integer) (Dimensionless integer, where M is the total number of features).

[0118] The macro-averaged F1 score was used. As the optimization objective: .

[0119] Where: K is the number of categories (K=4, a dimensionless integer); k is the category index (k=1,2,3,4 corresponds to four categories); The F1 score for the k-th class (dimensionless, range of values) ).

[0120] The calculation formula is: .

[0121] in: The precision of the k-th class (dimensionless, range of values) The calculation formula is: ; The recall rate of the k-th class (dimensionless, ranging from...) The calculation formula is: ; The number of true positive samples in class k (a dimensionless integer); The number of false positive samples in class k (a dimensionless integer); is the number of false negative samples (dimensionless integer) in class k.

[0122] The macro average F1 score treats all classes equally and is unaffected by class imbalance, making it suitable as an optimization metric for imbalanced multi-class classification tasks.

[0123] Calculate each hyperparameter combination in each round of time series cross-validation. The combination with the best average performance over 10 rounds is selected as the final hyperparameter.

[0124] The purpose of step S42 is to search the hyperparameter space and select the configuration that optimizes the verification performance.

[0125] S43 retrains the model on the entire training set with the hyperparameter combination that has the best performance evaluation index, makes predictions on an independent test set that has never been used for training and validation, calculates the classification evaluation index of the model on the independent test set, and compares the model performance with a baseline method based on a single fixed threshold.

[0126] The model was retrained on the entire training set (full year 2024) with optimal hyperparameters, and then used for prediction on the independent test set (full year 2025). The following evaluation metrics were calculated: Confusion Matrix: Displays the comparison between predictions and actual results for various categories. Integer matrix.

[0127] Macro-average F1 score: As defined above, it is a dimensionless pure number.

[0128] Weighted-averaged F1 score: The weighted average is calculated with the number of samples in each class as the weight, and it is a dimensionless pure number.

[0129] AUC-ROC (Area Under the Receiver Operating Characteristic Curve): Calculates the area under the ROC curve for each category, pairwise (one-vs-rest) (dimensionless, range of values). Then take the macro average.

[0130] The model performance is compared with a single fixed threshold baseline method. The baseline method is: when m / s indicates strong winds. m marks dangerous waves, The km marker is indicated as heavy fog; otherwise, it is marked as safe. A separate 2025 test set is used for comparison to ensure impartiality.

[0131] The purpose of step S43 is to evaluate the final generalization performance of the model using 2025 data that has never been used in training and validation.

[0132] The core objective of step S4 is to select the optimal combination of hyperparameters through cross-validation without polluting the test set, thereby ensuring the model's time generalization ability.

[0133] Step S5: Based on the independent test set, the risk identification model optimized by hyperparameters is subjected to triple verification. The triple verification includes feature importance analysis using the built-in function of random forest, external verification using historical observation data of independent ships, and time series backtracking analysis of misclassification cases to verify the reliability, generalization ability and physical consistency of the model.

[0134] In this embodiment, step S5 may specifically include the following steps: S51 uses the feature importance measure based on the reduction of the Gini coefficient and the permutation importance measure built into Random Forest to rank all features used by the model in terms of importance, identify the important features that contribute the most to the prediction, and verify the degree of consistency between the important features and the physical expectations.

[0135] Random forests provide two built-in feature importance measures: Based on the reduction in Gini impurity: When splitting at a node of each decision tree, the feature that maximizes the decrease in Gini impurity is selected. The importance score is obtained by normalizing the total reduction of this feature across all trees. .

[0136] in: Gini importance score for feature j (dimensionless, the sum of all feature scores is 1); T is the total number of decision trees (a dimensionless integer); t is the index of the tree (a dimensionless integer); Let be the set of all internal nodes in the t-th tree that are split using feature j; n is the internal node index; The reduction in Gini impurity (dimensionless) before and after splitting node n using feature j.

[0137] Based on permutation importance: The values ​​of feature j are randomly shuffled in the test set, and the decrease in model performance (such as F1 score) before and after shuffling is calculated. The greater the decrease, the more important the feature.

[0138] This method combines two importance measures, analyzes the top 10 features, and compares them with physical predictions. For example, if wave height features contribute the most to severe wave events and pressure gradient features contribute the most to strong wind events, then the model's decision is considered to conform to physical intuition.

[0139] The purpose of step S51 is to identify the features that contribute the most to the prediction, verify whether the model decision conforms to physical intuition, and provide a basis for feature selection.

[0140] S52. Select multiple independent vessels that did not participate in model training, collect navigation trajectory data and nautical log records of the independent vessels during independent test periods, and compare the risk identification results of the risk identification model for the independent vessels with the actual observation records recorded in the nautical logs by time window matching and comparison, calculate the consistency rate between model identification and log records, and verify the generalization ability of the model.

[0141] Three vessels that did not appear in the training set AIS data (or appeared very infrequently) were selected, and their historical tracks and logbook records for 2025 were collected. The logbook records the captain's observations of severe weather (such as encountering high winds and waves, reduced speed, poor visibility, and increased lookout).

[0142] The model's risk identification results for these three vessels during their voyages in 2025 were compared segment by segment with the records in the nautical logs. A time window matching method was used: if the model identified a certain type of risk within a certain time window (±3 hours), and a corresponding record appeared in the nautical log, it was counted as a one-fatal risk. The external validation consistency rate was defined as follows: .

[0143] Where: the numerator is the number of windows that are consistent with the model identification and log records (a dimensionless integer). The denominator is the total number of windows in the log that record risky events (a dimensionless integer). Consistency rate is a dimensionless percentage (range of values) ).

[0144] A consistency rate exceeding 80% is considered to indicate that the model has good external generalization ability.

[0145] The purpose of step S52 is to verify the reliability of the model recognition results using independent ship data that did not participate in model training, thereby achieving a model-observation double closed loop.

[0146] S53 extracts all misclassified samples whose predicted labels do not match the actual labels from the independent test set, examines the sea state evolution process and model prediction trajectory of each misclassified sample in the time period before and after it, statistically analyzes the distribution patterns of misclassified samples in each time dimension, spatial dimension and risk category, and identifies the systematic bias and boundary failure conditions of the model.

[0147] All misclassified samples (samples whose predicted labels do not match the actual labels) were extracted from the test set (2025). For each misclassified sample, the following backtracking analysis was performed: Examine the sea state evolution process during the time period of the sample to determine whether it is a boundary condition (such as...). (Just approaching the threshold, during the transition period of rapid wind speed changes).

[0148] Examine the model's predicted change trajectory for the sample over the three hours before and after the test to determine whether the isolated misjudgment was caused by insufficient time smoothness.

[0149] The distribution of misclassified samples in different months, sea areas, and categories was statistically analyzed to identify spatiotemporal conditions where the model performed poorly.

[0150] Based on the results of the backtracking analysis, directions for model improvement can be proposed (such as increasing training data for specific sea areas, adjusting feature smoothing methods, etc.).

[0151] The purpose of step S53 is to backtrack each misclassified case of the model on the test set to identify the systematic bias and boundary failure conditions of the model.

[0152] The core objective of step S5 is to verify the reliability, robustness, and physical consistency of the model from multiple dimensions.

[0153] Step S6: Based on the risk identification model that has been verified by triple testing, the SHAP framework is used to perform global attribution analysis and local attribution explanation of the model prediction results. Combined with weather dynamics diagnosis, key disaster-causing factors are extracted from the features with the highest importance ranking in SHAP, forming a list of disaster-causing factors that can serve shipping decision-making.

[0154] SHAP (SHapley Additive exPlanations) is a model interpretation method based on Shapley values ​​in cooperative game theory. It can decompose the model's predicted values ​​into the marginal contributions of each feature, thus achieving global and local interpretability.

[0155] In this embodiment, step S6 may specifically include the following steps: S61. The TreeExplainer algorithm in the SHAP framework is used to calculate the SHAP value of each feature in each sample for the model prediction result. The absolute SHAP value of each feature on all samples is averaged to obtain the average absolute SHAP value of each feature as a global importance measure, and a global feature importance ranking is generated.

[0156] SHAP (SHapley Additive exPlanations, an interpretable machine learning framework based on Shapley values) uses Shapley values ​​from cooperative game theory to interpret model predictions. Decomposed into a linear sum of the contributions of each feature: .

[0157] in: Let be the model's predicted value for sample i (for classification problems, is the probability of predicting it as a certain class; it is dimensionless and has a range of values). ); The feature vector of sample i ( ); The average prediction of the model across all training samples (baseline value, dimensionless, range). ); M is the total number of features (a dimensionless integer). j is the feature index ( ); denoted as the SHAP value (dimensionless, can be positive or negative) of the prediction of feature j for sample i.

[0158] The predicted value for each sample equals the baseline value plus the sum of the SHAP contributions of all features.

[0159] The formula for calculating the SHAP value of feature j is: .

[0160] in: The set of all features; S is a feature subset that does not contain feature j. ); The number of features in subset S (a dimensionless integer); M is the total number of features (a dimensionless integer). The model predictions when using only features from a subset S (marginalizing other features, dimensionless, range of values) ); The model prediction value (dimensionless, range) after adding feature j to subset S. ); Weighting factors It is a dimensionless pure number, and the sum of the weights of all subsets is 1.

[0161] The contribution of feature j is equal to its average marginal increment across all possible feature combinations. The difference in parentheses represents the change in the predicted value after adding feature j (dimensionless), and the weight is the reciprocal of the number of combinations with equal probability across all feature permutations (dimensionless).

[0162] In actual calculations, M may reach dozens, requiring precise calculation of all... Combining subsets is not feasible. This method employs the TreeExplainer algorithm, leveraging the tree structure characteristics of random forests to efficiently approximate the SHAP value, reducing the complexity from... Reduce to , where D is the maximum depth of the tree (a dimensionless integer).

[0163] Global attribution analysis uses the Mean Absolute SHAP Value: .

[0164] in: is the average absolute SHAP value (dimensionless) of feature j; N is the total number of samples in the test set (a dimensionless integer). i is the sample index ( ); It is the absolute value of the SHAP value (dimensionless).

[0165] The larger the value, the stronger the average influence of feature j on the model's decision. The values ​​of each feature... Arrange in descending order to generate a global ranking of feature importance (which corroborates the importance of features built into the random forest).

[0166] The purpose of step S61 is to interpret the model’s predictions using the SHAP framework and quantify the marginal contribution of each feature to a single prediction.

[0167] S62 selects multiple typical cases, including correctly identified cases and misjudged cases, from the model prediction results, and outputs a SHAP force map for each typical case. The model prediction probability is decomposed into a linear superposition of the baseline value and the contribution value of each feature, showing the effect of each feature on the rise or fall of a single prediction result, and realizing a layer-by-layer interpretation from the global to the local.

[0168] Three typical cases from each of the following three categories were selected from the test set: The model correctly identified the sudden strong wind event (both the prediction and label were for strong wind risk). The model correctly identified dangerous wave events (both the prediction and label were dangerous wave risk). Boundary cases where the model misjudged (e.g., the actual situation is safe but the model's prediction is risky).

[0169] For each case, a SHAP (Force Plot) is output, visually demonstrating the impact of each feature on the prediction results. The specific format is as follows: Predicted probability = baseline value + ∑ positive contribution features + ∑ negative contribution features.

[0170] For example, in a case of a strong wind event, the SHAP decomposition might show: pressure gradient feature contribution +0.15, wind speed feature contribution +0.12, wave height change rate contribution +0.08, while wave period feature contribution -0.02 (indicating that a longer wave period slightly reduces the probability of risk). This decomposition allows end users to understand why the model makes this prediction.

[0171] The purpose of step S62 is to select several typical risk event cases, display the decomposition results of the SHAP value in each case, and realize a layer-by-layer explanation from the global to the local.

[0172] S63 involves conducting weather dynamics diagnosis on each of the top-ranked features in terms of global importance, verifying the consistency between the contribution direction and physical mechanism of each feature, extracting key disaster-causing factors from the important features, clarifying the physical meaning, mechanism of action, and navigation intervention recommendations for each key disaster-causing factor, and forming a list of disaster-causing factors.

[0173] For the top 5 features of global importance in SHAP, weather dynamics diagnosis was performed one by one: Pressure gradient: Based on the geostrophic wind relationship, the pressure gradient is directly proportional to the geostrophic wind speed. Verification in diagnostics: In cases where the model predicts high wind risk, are the pressure gradient SHAP values ​​all positive contributions and consistent with the magnitude of the pressure field gradient in the ERA5 reanalysis?

[0174] Coupling of wind speed and wave height: Diagnosing the relationship between wind and wave growth—the greater the wind speed and the longer the wind zone, the greater the wave height. Verifying whether the model classifies the combination of "strong wind and high waves" as a higher risk than "strong wind but low waves".

[0175] Wave height change rate: Diagnostic feature of sudden sea state changes — if Furthermore, a large absolute value indicates a rapid deterioration in sea conditions; even if the current wave height does not exceed the 6 m threshold, the model should issue an early warning. This validates the model's sensitivity to trend characteristics.

[0176] Standardized wave height by captain: Diagnosing vessel type-related risks – for small vessels, This may trigger a severe wave warning earlier, while it is relatively safer for large vessels. The goal is to verify whether the model correctly identifies differences in vessel type.

[0177] Ultimately, 3–5 key disaster-causing factors were identified, forming a list of key disaster-causing factors, along with the physical meaning, mechanism of action, and intervention recommendations for each factor. This list can directly serve shipping decision-making: when planning a route, if a ship encounters a rapidly increasing pressure gradient, a positive wave height change rate, and a length-standardized wave height approaching the threshold, it should take avoidance or speed reduction measures in advance.

[0178] The purpose of step S63 is to compare the SHAP attribution results with the principles of weather dynamics to extract key disaster-causing factors and their physical mechanisms.

[0179] The core objective of step S6 is to decompose the output of the black box model into the contribution values ​​of each feature, and, in conjunction with weather dynamics diagnosis, extract key disaster-causing factors with physical interpretability.

[0180] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0181] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0182] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0183] Example 2

[0184] Further reference Figure 2 As a response to the above Figure 1 The present invention provides an embodiment of a device for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning, which is similar to the method described above. Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0185] like Figure 2 As shown, the ocean-going vessel navigation risk identification device 70 based on multi-source data fusion and machine learning described in this embodiment includes: a data acquisition module 71, a labeling module 72, a processing module 73, an optimization module 74, a verification module 75, and an analysis module 76. Wherein: The acquisition module 71 is used to acquire reanalysis meteorological data and automatic identification system (AIS) trajectory data covering the target route, perform quality control on the data, and perform spatiotemporal matching of the reanalysis meteorological data and the AIS trajectory data to generate a matching dataset in which the ship position and environmental parameters correspond one-to-one. The annotation module 72 is used to formulate quantitative physical thresholds for three types of risk events—strong winds, dense fog, and dangerous waves—based on the matching dataset and in accordance with international navigation standards. It generates risk category labels for each record through an automated annotation script, and constructs spatiotemporal derived features with physical meaning to form a feature-label matrix. The processing module 73 is used to divide the feature-label matrix into a training set and an independent test set in chronological order, construct a multi-classifier using the random forest algorithm, and use synthetic minority class oversampling technology and cost-sensitive learning method to handle the data imbalance problem, so as to obtain the trained risk identification model. Optimization module 74 is used to validate the risk identification model based on the training set using the time series forward chain cross-validation method, optimize the hyperparameters of the random forest algorithm through grid search, and select the hyperparameter combination with the best average performance in cross-validation as the final model configuration. The verification module 75 is used to perform a triple test on the risk identification model after hyperparameter optimization based on the independent test set. The triple test includes feature importance analysis using the built-in function of random forest, external verification using historical observation data of independent ships, and time series backtracking analysis of misclassification cases to verify the reliability, generalization ability and physical consistency of the model. Analysis module 76 is used to perform global attribution analysis and local attribution interpretation on the model prediction results based on the risk identification model after triple verification, using the SHAP framework, and combined with weather dynamics diagnosis, to extract key disaster-causing factors from the features with the highest importance ranking in SHAP, forming a list of disaster-causing factors that can serve shipping decision-making.

[0186] Example 3

[0187] To address the aforementioned technical problems, embodiments of the present invention also provide a computer device. Please refer to [link / reference needed]. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.

[0188] The aforementioned computer device 8 includes a memory 81, a processor 82, and a network interface 83 that are interconnected via a system bus. It should be noted that only the computer device 8 with components 81, 82, and 83 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described herein is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0189] The aforementioned computer devices can be desktop computers, laptops, handheld computers, and cloud servers, among other computing devices. These devices can facilitate human-computer interaction with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.

[0190] The aforementioned memory 81 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the aforementioned memory 81 may be an internal storage unit of the aforementioned computer device 8, such as the hard disk or memory of the computer device 8. In other embodiments, the aforementioned memory 81 may also be an external storage device of the aforementioned computer device 8, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 8. Of course, the aforementioned memory 81 may also include both the internal storage unit and its external storage device of the aforementioned computer device 8. In this embodiment, the aforementioned memory 81 is typically used to store the operating system and various application software installed on the aforementioned computer device 8, such as computer-readable instructions for a method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning. In addition, the aforementioned memory 81 can also be used to temporarily store various types of data that have been output or will be output.

[0191] In some embodiments, the processor 82 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 82 is typically used to control the overall operation of the computer device 8. In this embodiment, the processor 82 is used to execute computer-readable instructions stored in the memory 81 or to process data, for example, to execute the computer-readable instructions of the method for identifying ocean-going vessel navigation risks based on multi-source data fusion and machine learning.

[0192] The network interface 83 may include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the computer device 8 and other electronic devices.

[0193] Example 4

[0194] The present invention also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the above-described method for identifying ocean-going vessel navigation risks based on multi-source data fusion and machine learning.

[0195] The beneficial effects of implementing the above embodiments are as follows: (1) High-fidelity data fusion and refined spatiotemporal matching: The reanalysis meteorological field and AIS dynamic trajectory are precisely matched ship by ship, time by time and point by point, instead of coarse grid interpolation, so that each ship position can correspond to the environmental factors such as wind, waves and visibility encountered in reality, which greatly improves the physical authenticity of the input data.

[0196] (2) Dynamic intelligent classification replaces fixed threshold alarm: The random forest multi-classifier is introduced, which can automatically learn the nonlinear coupling relationship between multiple environmental factors and ship motion state, and distinguish between safety, wind risk, fog risk, dangerous wave risk and compound risk. Compared with the fixed threshold method, it has higher accuracy and lower false alarm rate.

[0197] (3) Targeted solution to the problem of scarce extreme risk samples: By combining SMOTE oversampling and cost-sensitive learning, the model can increase the number of minority class samples while imposing a greater penalty on misclassified high-risk samples, significantly improving the detection rate of rare risks (such as extreme wave heights) and avoiding the bias of traditional methods that prioritize safety above all else.

[0198] (4) End-to-end interpretability and physical consistency assurance: Through SHAP global and local attribution and weather dynamics diagnosis, it can not only give the risk probability, but also clearly tell whether wind or waves are the main cause. Furthermore, through triple verification (feature importance, independent ship extrapolation, false alarm backtracking), it ensures that the model output conforms to the laws of marine meteorological physics, greatly enhancing the shipping decision-makers' trust in the system and facilitating the formulation of accurate avoidance or deceleration strategies.

[0199] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0200] Obviously, the embodiments described above are merely some embodiments of the present invention, not all embodiments. The accompanying drawings show preferred embodiments of the present invention, but do not limit the patent scope of the present invention. The present invention can be implemented in many different forms; rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the patent protection scope of this invention.

Claims

1. A method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning, characterized in that, Includes the following steps: Collect reanalysis meteorological data and ship automatic identification system trajectory data covering the target route, perform quality control on the data, and perform spatiotemporal matching of the reanalysis meteorological data and the ship automatic identification system trajectory data to generate a matching dataset in which ship position and environmental parameters correspond one-to-one. Based on the matching dataset, quantitative physical thresholds for three types of risk events—strong winds, dense fog, and dangerous waves—are established in accordance with international navigation standards. Risk category labels are generated for each record using an automated annotation script. At the same time, spatiotemporal derived features with physical meaning are constructed to form a feature-label matrix. Based on the feature-label matrix, the dataset is divided into a training set and an independent test set in chronological order. A multi-classifier is constructed using the random forest algorithm, and the data imbalance problem is addressed by using synthetic minority class oversampling technology and cost-sensitive learning method to obtain the trained risk identification model. Based on the training set, the risk identification model is validated using the time series forward chain cross-validation method. The hyperparameters of the random forest algorithm are optimized by grid search, and the hyperparameter combination with the best average performance in cross-validation is selected as the final model configuration. Based on the independent test set, the risk identification model after hyperparameter optimization is subjected to a triple test, which includes feature importance analysis using the built-in function of random forest, external validation using historical observation data of independent ships, and time series backtracking analysis of misclassification cases to verify the reliability, generalization ability and physical consistency of the model. Based on the risk identification model that has been verified through triple testing, the SHAP framework is used to perform global attribution analysis and local attribution explanation of the model's prediction results. Combined with weather dynamics diagnosis, key disaster-causing factors are extracted from the features with the highest importance ranking in SHAP, forming a list of disaster-causing factors that can serve shipping decision-making.

2. The method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning according to claim 1, characterized in that, The steps of collecting reanalysis meteorological data and ship automatic identification system (AIS) trajectory data covering the target route, performing quality control on the data, and performing spatiotemporal matching of the reanalysis meteorological data and the ship AIS trajectory data to generate a matching dataset with a one-to-one correspondence between ship position and environmental parameters specifically include: The target route was defined as the research scenario, the time window and spatial range of data collection were determined, meteorological and marine environmental parameters including wind field, wave height, air pressure, temperature and dew point temperature were downloaded from the reanalysis database, and ship dynamic and static information covering the time window and spatial range were obtained from the global Automatic Identification System data service provider. The Automatic Identification System (AIS) data is subjected to position rationality checks, speed rationality checks, time continuity checks, and duplicate record removal in sequence. The reanalyzed data is subjected to range checks and physical consistency checks to filter out abnormal records that do not conform to physical laws. For each vessel AIS record that has undergone quality control, the most recent reanalysis data field is matched according to its timestamp and necessary time interpolation is performed. The nearest reanalysis data grid point is matched according to its spatial location. The matched reanalysis environmental parameters are assigned to the corresponding vessel record to generate the matching dataset.

3. The method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning according to claim 1, characterized in that, The steps of formulating quantitative physical thresholds for three types of risk events—strong winds, dense fog, and dangerous waves—based on the matching dataset and in accordance with international navigation standards, generating risk category labels for each record using automated annotation scripts, and constructing spatiotemporally derived features with physical meaning to form a feature-label matrix specifically include: The physical thresholds for gale events are established based on the World Meteorological Organization's Beaufort scale, the physical thresholds for fog events are established based on the International Maritime Organization's visibility class classification standards, and the physical thresholds for dangerous wave events are established based on the International Maritime Organization's second-generation intact stability criterion, thus forming quantitative judgment rules for three types of risk events. The quantitative judgment rules are written into an automated annotation script. Each record in the matching dataset is judged in turn to see if it meets the conditions of strong wind, heavy fog, and dangerous waves. Each record is labeled with a unique risk category label according to the preset risk priority order, and is labeled as safe status, strong wind risk, heavy fog risk, or dangerous wave risk. Based on the original environmental parameters in the matching dataset, a spatiotemporal derived feature with physical meaning is constructed, including pressure gradient, wave height change rate, wind and wave coupling factor and comprehensive sea state index. The spatiotemporal derived feature is then merged with the original feature to form the feature-label matrix.

4. The method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning according to claim 1, characterized in that, The steps of dividing the feature-label matrix into a training set and an independent test set in chronological order, constructing a multi-classifier using the random forest algorithm, and addressing the data imbalance problem using synthetic minority class oversampling and cost-sensitive learning methods to obtain the trained risk identification model specifically include: All records in the feature-label matrix are sorted in chronological order by timestamp. All data within the first time period are used as the training set, and all data within the second time period that is after the first time period and does not overlap with it are used as the independent test set, ensuring that the independent test set does not participate in the model training and hyperparameter selection process. The random forest algorithm is used as the core classifier. Multiple training subsets are generated through bootstrapping sampling. A decision tree is constructed for each training subset. The multi-classification result is determined by majority voting. An initial classification model that can learn risk patterns from the training set is constructed. The synthetic minority class oversampling technique is applied to the training set. Synthetic samples are generated by linear interpolation between minority class samples to balance the class distribution. At the same time, cost-sensitive learning is introduced during the training process of random forest. The misclassification of minority class samples is penalized with a higher penalty than that of the majority class, so that the model can alleviate the class imbalance problem at both the data level and the algorithm level.

5. The method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning according to claim 1, characterized in that, The steps of validating the risk identification model using the time-series forward chain cross-validation method based on the training set, optimizing the hyperparameters of the random forest algorithm through grid search, and selecting the hyperparameter combination with the best average performance in cross-validation as the final model configuration specifically include: The training set is divided into multiple time blocks in chronological order. A forward chain cross-validation method is adopted, in which all time blocks before the current time block are used as training subsets and the current time block is used as validation subsets, forming multiple training-validation pairs arranged in chronological order. The hyperparameters to be optimized and their candidate value ranges for the random forest algorithm are set. The macro-average F1 score of each hyperparameter combination is calculated on each training-validation pair. The mean of the macro-average F1 scores on all validation pairs is taken as the performance evaluation index of the hyperparameter combination. The hyperparameter combination with the optimal performance evaluation index is selected. The model is retrained on the entire training set with the optimal hyperparameter combination for the performance evaluation metric, and predictions are made on the independent test set that has never been used for training and validation. The classification evaluation metric of the model on the independent test set is calculated, and the model performance is compared with a baseline method based on a single fixed threshold.

6. The method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning according to claim 1, characterized in that, The process of performing a triple test on the hyperparameter-optimized risk identification model based on the independent test set includes: feature importance analysis using the built-in functions of random forest, external validation using historical observation data from independent vessels, and time-series backtesting analysis of misclassification cases to verify the model's reliability, generalization ability, and physical consistency. Specifically, the steps include: The importance of all features used by the model is ranked by the importance of the feature based on the reduction of the Gini coefficient and the importance based on the permutation, which are built into random forest. The important features that contribute the most to the prediction are identified, and the degree of conformity between the important features and the physical expectations is verified. Select several independent vessels that did not participate in model training, collect navigation trajectory data and nautical log records of the independent vessels during independent test periods, and compare the risk identification results of the risk identification model for the independent vessels with the actual observation records recorded in the nautical logs by time window matching, calculate the consistency rate between model identification and log records, and verify the generalization ability of the model. Extract all misclassified samples whose predicted labels do not match the actual labels from the independent test set. For each misclassified sample, examine the sea state evolution process and model prediction trajectory before and after the time period. Statistically analyze the distribution patterns of misclassified samples in each time dimension, spatial dimension and risk category to identify the systematic bias and boundary failure conditions of the model.

7. The method for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning according to any one of claims 1 to 6, characterized in that, The steps involved in establishing a list of disaster-causing factors that can be used to support shipping decision-making include: Firstly, based on the risk identification model validated through triple verification, the SHAP framework is used to perform global and local attribution analysis on the model's prediction results. This is combined with weather dynamics diagnostics. The TreeExplainer algorithm in the SHAP framework is used to calculate the SHAP value of each feature in each sample for the model prediction result. The absolute SHAP value of each feature over all samples is averaged to obtain the average absolute SHAP value of each feature as a global importance measure, and a global feature importance ranking is generated. Multiple typical cases, including correctly identified cases and misidentified cases, are selected from the model prediction results. A SHAP force map is output for each typical case. The model prediction probability is decomposed into a linear superposition of the baseline value and the contribution value of each feature, showing the effect of each feature on the rise or fall of a single prediction result, and realizing a layer-by-layer interpretation from the global to the local. Weather dynamics diagnosis is performed on each of the features ranked high in global importance to verify the consistency between the contribution direction and physical mechanism of each feature. Key disaster-causing factors are extracted from the important features, and the physical meaning, mechanism of action, and navigation intervention recommendations of each key disaster-causing factor are clarified to form a list of disaster-causing factors.

8. A device for identifying navigation risks of ocean-going vessels based on multi-source data fusion and machine learning, characterized in that, include: The data acquisition module is used to collect reanalysis meteorological data and ship automatic identification system trajectory data covering the target route, perform quality control on the data, and perform spatiotemporal matching of the reanalysis meteorological data and the ship automatic identification system trajectory data to generate a matching dataset in which the ship position and environmental parameters correspond one-to-one. The annotation module is used to formulate quantitative physical thresholds for three types of risk events—strong winds, dense fog, and dangerous waves—based on the matching dataset and in accordance with international navigation standards. It generates risk category labels for each record through an automated annotation script, and constructs spatiotemporal derived features with physical meaning to form a feature-label matrix. The processing module is used to divide the feature-label matrix into a training set and an independent test set in chronological order, construct a multi-classifier using the random forest algorithm, and use synthetic minority class oversampling technology and cost-sensitive learning method to handle the data imbalance problem, so as to obtain the trained risk identification model. The optimization module is used to validate the risk identification model based on the training set using the time series forward chain cross-validation method, optimize the hyperparameters of the random forest algorithm through grid search, and select the hyperparameter combination with the best average performance in cross-validation as the final model configuration. The verification module is used to perform a triple test on the risk identification model after hyperparameter optimization based on the independent test set. The triple test includes feature importance analysis using the built-in function of random forest, external verification using historical observation data of independent ships, and time series backtracking analysis of misclassification cases to verify the reliability, generalization ability and physical consistency of the model. The analysis module is used to perform global attribution analysis and local attribution interpretation on the model prediction results based on the risk identification model that has been verified by triple testing, and combined with weather dynamics diagnosis, extract key disaster-causing factors from the features with the highest importance ranking in SHAP, forming a list of disaster-causing factors that can serve shipping decision-making.

9. A computer device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the method for identifying ocean-going vessel navigation risks based on multi-source data fusion and machine learning as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the ocean-going vessel navigation risk identification method based on multi-source data fusion and machine learning as described in any one of claims 1 to 7.