A method for early warning of ship navigation risks for edge deployment
By constructing a teacher model and generating a lightweight student model through distillation training, the problem of large number of parameters and high computational cost when deploying ship navigation risk early warning models on edge devices is solved, realizing real-time risk identification and early warning under complex weather and sea conditions.
Patent Information
- Application Number
- CN202610803334.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-07-03
AI Technical Summary
Existing ship navigation risk warning models are difficult to effectively identify risks under complex weather and sea conditions. Furthermore, when deployed on edge devices, the large number of model parameters and high computational load lead to increased latency and energy consumption, making it difficult to achieve real-time warnings.
By acquiring multi-source data for feature extraction and spatiotemporal consistency matching, a teacher model is constructed and trained by distillation to generate a lightweight student model. The warning threshold is determined by combining the risk probability distribution and confusion matrix, thereby realizing real-time risk warning for edge devices.
While reducing the number of model parameters and computational load, it improves the model's ability to identify risks in complex environments, and achieves low-latency real-time early warning and security optimization.
Smart Images

Figure CN122335018A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship navigation technology, and more specifically to a ship navigation risk early warning method for edge deployment. Background Technology
[0002] Ship navigation risks are influenced by a variety of factors, including the ship's navigation status, maritime traffic density, meteorological and sea conditions, and the ship's own characteristics. Among these, meteorological and sea condition factors such as wind speed, wave height, gusts, air pressure, and wave direction directly affect the stability and safety of ship navigation. Under complex meteorological and sea conditions, ships are more susceptible to wind and wave disturbances, changes in visibility, and reduced maneuverability, thereby increasing the risk of accidents such as collisions, groundings, and capsizing.
[0003] Existing methods for identifying ship navigation risks mainly include statistical analysis methods, expert experience methods, Bayesian networks, fuzzy comprehensive evaluation methods, and machine learning methods. While these methods can assess ship risks to a certain extent, they still have shortcomings in complex weather and sea conditions, multi-source data coupling, and real-time early warning application scenarios. First, some methods fail to adequately express the coupling relationship between weather and sea conditions and ship operating status, making it difficult to fully reflect the risk evolution characteristics under complex environments. Second, although some deep learning models can improve the accuracy of risk identification, their complex models, large number of parameters, and high inference computation requirements make them difficult to directly apply to shipborne terminals, shore-based edge devices, and maritime regulatory front-end equipment.
[0004] In practical applications, ship navigation risk early warning systems typically need to complete data input, risk assessment, and early warning output within a short period. If the model is too large, it can easily lead to edge inference latency, excessive equipment load, and increased energy consumption, affecting the real-time performance of the early warning system. Therefore, how to reduce the number of model parameters and inference computation while ensuring risk identification capabilities is a key issue in the practical deployment of ship navigation risk early warning models. Summary of the Invention
[0005] This invention provides a method for early warning of ship navigation risks for edge deployment.
[0006] According to one aspect of the present invention, a method for early warning of ship navigation risks for edge deployment is provided, comprising: acquiring multi-source data during ship navigation, wherein the multi-source data includes positive data corresponding to navigation risk events and negative data corresponding to safe navigation states, and the content of the multi-source data includes ship traffic flow data, marine meteorological data, and ship static parameter data; performing feature extraction on the multi-source data to obtain feature data, wherein the feature data includes: ship navigation state features extracted based on ship traffic flow data, meteorological and sea state features extracted based on marine meteorological data, and ship attribute features extracted based on ship static parameter data; calculating the distance between each negative data and positive data based on the feature data, filtering negative data with a distance less than a distance threshold as boundary negative data, and constructing a training set based on the feature data of the boundary negative data and positive data and the real labels; and constructing a training set for learning the meteorological and sea state features, ship state features, and ship attribute features. A teacher model is constructed based on the nonlinear mapping relationship between risk probabilities. This teacher model is then trained using a training set to obtain a target teacher model. A student model is constructed based on the deployment constraints of edge devices, including constraints on model parameter quantity, model storage space, single inference time, and computational resources. The student model is trained using the target teacher model as a knowledge source, and the trained model is used as a risk warning model. A risk probability distribution is generated based on the risk probabilities output by the risk warning model. A confusion matrix is constructed based on the real labels and the predicted labels obtained through the risk warning model. The warning threshold for the edge devices is determined based on the risk probability distribution, the confusion matrix, and the actual deployment requirements of the edge devices. The risk warning model is deployed to the edge devices to receive multi-source data during ship navigation in real time and output risk probabilities. If the risk probability exceeds the warning threshold, a risk warning message is generated.
[0007] According to at least one embodiment of the present invention, the method for early warning of ship navigation risks for edge deployment further includes, after acquiring multi-source data during ship navigation, performing spatiotemporal consistency matching on the multi-source data to convert the multi-source data into data within the same time window and the same spatial range.
[0008] According to at least one embodiment of the present invention, the method for early warning of ship navigation risks for edge deployment further includes preprocessing the multi-source data before feature extraction. The preprocessing includes: time format unification, outlier removal, duplicate data deletion, missing value handling, and track continuity correction.
[0009] The edge-deployed ship navigation risk early warning method according to at least one embodiment of the present invention further includes standardizing or normalizing the feature data after obtaining the feature data.
[0010] According to at least one embodiment of the present invention, the method for early warning of ship navigation risks for edge deployment involves distillation training of the student model through a joint loss function, which includes real label supervision loss, output probability distillation loss, and intermediate feature distillation loss.
[0011] According to at least one embodiment of the present invention, a method for early warning of ship navigation risks for edge deployment determines the early warning threshold of the edge device based on the risk probability distribution, confusion matrix, and actual deployment requirements of the edge device. The method includes: determining the positive risk probability distribution corresponding to positive data and the negative risk probability distribution corresponding to negative data; extracting the risk probability interval corresponding to the probability overlap region in the positive and negative risk probability distributions as an initial search interval; adjusting candidate thresholds within the initial search interval with a preset step size; constructing a confusion matrix for each candidate threshold by combining the real and predicted labels; statistically analyzing the corresponding recall and false positive rates based on the confusion matrix; selecting candidate thresholds that satisfy a recall rate greater than the lower limit of recall based on the priority principle of missed detection control in the actual deployment requirements of the edge device, forming a candidate threshold set; selecting candidate thresholds that satisfy the device performance constraints in the candidate threshold set, forming an optional threshold set; and selecting from the optional threshold set the candidate threshold that minimizes the false positive rate or balances the recall rate with the operating load of the edge device as the early warning threshold for the edge device.
[0012] This invention acquires and integrates multi-source data, including ship traffic flow data, marine meteorological data, and ship static parameter data, and performs targeted feature extraction. This comprehensively characterizes the coupling relationship between complex meteorological and sea conditions and ship operational status, enhancing the model's feature representation and adaptability to changing navigation environments. By calculating feature spatial distances to filter boundary negative class data and construct a training set, the critical transition zone information between risk and normal states can be preserved, enhancing the model's sensitivity to precursors of potential risk evolution and its ability to control false alarms. By constructing a student model under the constraints of edge device deployment, such as parameter quantity, storage space, inference time, and computing resources, and using a high-precision teacher model as the knowledge source for joint probability and feature distillation, the risk discrimination logic and intermediate layer feature expression capabilities of the teacher model can be fully transferred while significantly compressing model size and computational overhead, effectively overcoming the performance degradation defects of traditional lightweight networks. By jointly determining the warning threshold based on the risk probability distribution pattern and confusion matrix statistical results, the false alarm frequency and edge device computing load can be dynamically balanced with false alarm control as a hard constraint, achieving synergistic optimization of warning security and system operating efficiency. By deploying the final model to edge terminals for real-time inference, low-latency risk probability output and accurate threshold-triggered early warnings can be achieved in resource-constrained scenarios, significantly improving the real-time response capability and engineering deployment feasibility of ship navigation safety early warnings. Attached Figure Description
[0013] The accompanying drawings illustrate exemplary embodiments of the invention and, together with the description thereof, serve to explain the principles of the invention. These drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification.
[0014] Figure 1 This is a flowchart illustrating a method for early warning of ship navigation risks for edge deployment according to an embodiment of the present invention.
[0015] Figure 2 This is a flowchart illustrating a method for determining an early warning threshold according to an embodiment of the present invention. Detailed Implementation
[0016] The present invention will now be described in further detail with reference to the accompanying drawings and examples. It should be understood that the specific examples described herein are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present invention are shown in the accompanying drawings.
[0017] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other. The technical solution of this invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] Existing methods for identifying ship navigation risks have the following technical problems: 1. To achieve high recognition accuracy, existing deep learning risk warning models typically require the construction of large-scale network structures, resulting in a large number of model parameters, high storage consumption, and large inference computation.
[0019] 2. Shipborne terminals, shore-based edge devices, and maritime regulatory front-end devices typically have limited computing power, making it difficult to directly deploy high-precision risk identification models with large parameter scales.
[0020] 3. Although ordinary lightweight models can reduce the number of parameters and inference time, the reduced network size can lead to a decrease in the ability to express risk features, which in turn reduces the performance of ship navigation risk identification.
[0021] 4. Existing model training and validation processes mostly focus on offline classification results, lacking a systematic approach to balance the number of model parameters, inference efficiency, and risk identification capabilities in edge deployment scenarios.
[0022] Therefore, this disclosure proposes a method for early warning of ship navigation risks for edge deployment. Figure 1 A schematic diagram illustrating the overall flow of an edge-deployed ship navigation risk early warning method according to one embodiment of the present invention is shown. Figure 1 The method shown includes steps S1 to S8.
[0023] S1: Acquire multi-source data during ship navigation. This multi-source data includes positive data corresponding to navigation risk events and negative data corresponding to safe navigation status. The content of the multi-source data includes ship traffic flow data, marine meteorological data, and ship static parameter data.
[0024] Positive data can be data generated when a navigation risk event occurs, while negative data can be data generated when no navigation risk event occurs.
[0025] For example, vessel traffic flow data can utilize AIS data to characterize changes in vessel position, speed, heading, and track. Marine meteorological data can include data characterizing meteorological and sea state conditions such as wind speed, wave height, gusts, air pressure, and wave direction in the vessel's navigation environment. Vessel static parameter data can include data characterizing vessel attributes such as gross tonnage, length, beam, and year of construction.
[0026] As a further implementation, after acquiring multi-source data during ship navigation, the method further includes: performing spatiotemporal consistency matching on the multi-source data to convert it into data within the same time window and spatial range. For example, during the spatiotemporal consistency matching process, a unified spatiotemporal index can be established based on time information, latitude and longitude information, and ship identification information from different data sources. This unified spatiotemporal index is used to match ship traffic flow data, marine meteorological data, and ship static parameter data. Through spatiotemporal consistency matching, discrete, heterogeneous data at different scales can be converted into a unified sample structure that can be used as input for subsequent models, enabling the model to simultaneously learn the combined impact of ship operating status, meteorological and sea conditions, and ship attributes on navigation risks.
[0027] S2: Feature extraction is performed on the multi-source data to obtain feature data. Feature data includes: ship navigation status features extracted from ship traffic flow data, meteorological and sea state features extracted from marine meteorological data, and ship attribute features extracted from ship static parameter data.
[0028] For example, meteorological and sea state characteristics may include: significant wave height, wave drag coefficient, average wave direction, maximum single wave height, significant wave height in wind and waves, wind speed, 10-meter instantaneous gust, surface pressure, and average sea level pressure. Ship attribute characteristics may include: gross weight, length, beam, and year of construction. Ship navigation state characteristics may include: speed, heading, rate of turn, track curvature, rate of change of speed, rate of change of heading, and yaw angle.
[0029] As a further implementation, the multi-source data is preprocessed before feature extraction. For example, preprocessing may include: standardizing time formats, removing outliers, deleting duplicate data, handling missing values, and correcting track continuity.
[0030] As another further implementation, after obtaining the feature data, the method also includes standardizing or normalizing the feature data to ensure that the subsequent model input uses a uniform input format. Standardization or normalization ensures that the model has a consistent input data structure during both the training and inference phases.
[0031] S3: Calculate the distance between each negative class data and the positive class data based on the feature data, filter the negative class data whose distance is less than the distance threshold as the boundary negative class data, and construct the training set based on the feature data and real labels of the boundary negative class data and the positive class data.
[0032] As one possible implementation, for each negative class data point, the distance between the feature data of the negative class data and the feature data of each positive class data point is calculated, and the minimum distance is extracted as the distance between the negative class data point and the positive class data point. All negative class data points with a distance less than a distance threshold are selected as boundary negative class data points.
[0033] The training set includes positive and negative training samples. In the positive training samples, the feature data of the positive class data is used as the model input, and the value 1 is used as the true label, indicating that the positive training sample corresponds to a historical navigation risk event. In the negative training samples, the feature data of the negative class data is used as the model input, and the value 0 is used as the true label, indicating that the negative training sample corresponds to a safe navigation state.
[0034] Step S3 preserves the boundary region information between positive data (risk samples) and negative data (normal samples), enabling subsequent models to better distinguish between normal navigation states and potential risk states.
[0035] As a further implementation, when there are insufficient positive class training samples, minority class sample augmentation methods can be used to supplement the positive class training samples in the feature space. Examples of minority class sample augmentation methods include SMOTE, ADASYN, or generative model-based sample generation methods.
[0036] S4: Construct a teacher model to learn the nonlinear mapping relationship between meteorological and sea state characteristics, ship state characteristics, ship attribute characteristics and risk probability, and train the teacher model through the training set to obtain the trained target teacher model.
[0037] The teacher model is a high-precision model and can employ RNN, LSTM, GRU, Transformer, or other deep learning model structures. The trained target teacher model outputs the risk probability for each sample. The risk probability ranges from [0,1]. When the risk probability is greater than the warning threshold, the prediction label is set to 1, indicating a navigation risk event. When the risk probability is less than or equal to the warning threshold, the prediction label is set to 0, indicating a safe navigation state.
[0038] S5: Construct a student model based on the deployment constraints of edge devices. The deployment constraints include: model parameter quantity constraints, model storage space constraints, single inference time constraints, and computing resource constraints.
[0039] The student model employs a lightweight approach, which, compared to the teacher model, has fewer network layers, fewer parameters, and less computational overhead, thus meeting the operational requirements of edge devices. For example, the student model can utilize a shallow MLP, a lightweight RNN, a lightweight GRU, a lightweight LSTM, or other small neural network architectures.
[0040] For example, edge devices can be shipborne terminal devices, shore-based edge devices, maritime surveillance front-end devices, etc.
[0041] S6: Use the target teacher model as the knowledge source to distill and train the student model, and use the model after distillation training as the risk warning model.
[0042] One possible implementation is to train the student model using a joint loss function, which includes a ground truth label supervision loss, an output probability distillation loss, and an intermediate feature distillation loss. The ground truth label supervision loss ensures the student model learns hard label supervision signals for real risk categories, guaranteeing basic classification accuracy. The output probability distillation loss constrains the student model's output probability distribution to approximate the teacher model's output probability distribution, enabling the student model to learn the teacher model's soft label knowledge of the relative discriminative relationships between risk categories. The intermediate feature distillation loss constrains the student model's intermediate-layer feature representation to approximate the teacher model's intermediate-layer risk feature representation, allowing the student model to inherit the teacher model's ability to extract and distinguish boundaries of complex weather, sea conditions, and ship state coupled features.
[0043] By jointly weighting and optimizing the above three losses, the lightweight student model can meet the edge deployment constraints while retaining the risk identification performance of the high-precision teacher model to the maximum extent.
[0044] S7: Generate a risk probability distribution based on the risk probability output by the risk warning model, construct a confusion matrix based on the real labels and the predicted labels obtained through the risk warning model, and determine the warning threshold of the edge devices according to the risk probability distribution, the confusion matrix and the actual deployment requirements of the edge devices.
[0045] For example, the risk probability distribution can be represented by a probability density curve with the probability value [0,1] on the horizontal axis and the probability density on the vertical axis. As one possible implementation, positive risk probability distributions corresponding to positive data and negative risk probability distributions corresponding to negative data are generated respectively.
[0046] As one possible implementation, the early warning threshold for edge devices is determined based on the risk probability distribution, confusion matrix, and actual deployment requirements of edge devices, including... Figure 2 Steps S710 to S760 are shown.
[0047] S710: Determine the probability distribution of positive risk corresponding to positive data and the probability distribution of negative risk corresponding to negative data.
[0048] S720: Extract the risk probability interval corresponding to the probability overlap region in the probability distributions of positive and negative risk classes, and use it as the initial search interval.
[0049] S730: Adjust the candidate threshold with a preset step size within the initial search interval. For each candidate threshold, construct a confusion matrix by combining the real label and the predicted label. Calculate the corresponding recall rate and false positive rate based on the confusion matrix.
[0050] S740: Based on the principle of prioritizing false negative control in the actual deployment needs of edge devices, select candidate thresholds that can meet the requirement of recall rate being greater than the lower limit of recall rate, and form a candidate threshold set.
[0051] The principle of prioritizing false alarm control means that when determining the warning threshold, the recall rate of high-risk samples is set as a hard constraint. Under the premise of meeting this hard constraint, the false alarm rate and edge device load are then balanced to ensure that no real navigation risks are missed.
[0052] S750: In the candidate threshold set, based on the device performance constraints in the actual deployment requirements of edge devices, candidate thresholds that can meet the device performance constraints are selected to form an optional threshold set.
[0053] For example, device performance constraints may include inference time constraints, computing resource load constraints, and communication bandwidth constraints.
[0054] S760: Select a candidate threshold from the set of selectable thresholds that minimizes the false alarm rate or balances the recall rate with the operating load of the edge device, and use it as the warning threshold for the edge device.
[0055] S8: Deploy the risk warning model to edge devices to receive multi-source data during ship navigation in real time and output risk probabilities. If the risk probability is greater than the warning threshold, generate risk warning information.
[0056] Understandably, in the process of the deployed risk warning model receiving multi-source data and outputting risk probabilities, it is also necessary to perform the feature extraction process of step S2 on the multi-source data and use the obtained feature data as the input of the risk warning model.
[0057] This invention uses feature data from multi-source data driven by meteorological and sea conditions as model input to train a high-precision teacher model, and constructs a lightweight student model under the deployment constraints of edge devices. Furthermore, it transfers the risk discrimination ability and intermediate feature expression ability of the teacher model to the lightweight student model through knowledge distillation. At the same time, it determines the warning threshold of the edge device by combining the risk probability distribution and confusion matrix statistical results, so that the lightweight model can realize real-time identification and warning of ship navigation risks under the conditions of low parameter quantity and low inference computation.
[0058] In the description of this specification, the references to terms such as "one embodiment / mode," "some embodiments / modes," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, or characteristic described in connection with that embodiment / mode or example is included in at least one embodiment / mode or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment / mode or example. Moreover, the specific features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments / modes or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments / modes or examples described in this specification, as well as the features of different embodiments / modes or examples.
[0059] Those skilled in the art should understand that the above embodiments are merely for illustrating the present invention and are not intended to limit the scope of the invention. Those skilled in the art can make other changes or modifications based on the above disclosure, and these changes or modifications still fall within the scope of the present invention.
Claims
1. A method for early warning of ship navigation risks for edge deployment, characterized in that, include: Acquire multi-source data during ship navigation, including positive data corresponding to navigation risk events and negative data corresponding to safe navigation status. The content of the multi-source data includes ship traffic flow data, marine meteorological data, and ship static parameter data. Feature extraction is performed on multi-source data to obtain feature data, which includes: ship navigation status features extracted based on ship traffic flow data, meteorological and sea state features extracted based on marine meteorological data, and ship attribute features extracted based on ship static parameter data. The distance between each negative class data and the positive class data is calculated based on the feature data. Negative class data with a distance less than the distance threshold are selected as boundary negative class data. A training set is constructed based on the feature data and real labels of the boundary negative class data and the positive class data. A teacher model is constructed to learn the nonlinear mapping relationship between meteorological and sea state characteristics, ship state characteristics, ship attribute characteristics and risk probability. The teacher model is then trained using a training set to obtain the trained target teacher model. The student model is constructed based on the deployment constraints of edge devices, including: model parameter constraints, model storage space constraints, single inference time constraints, and computing resource constraints. The student model is trained by distillation using the target teacher model as the knowledge source, and the model after distillation training is used as a risk warning model. A risk probability distribution is generated based on the risk probability output by the risk warning model. A confusion matrix is constructed based on the real labels and the predicted labels obtained by the risk warning model. The warning threshold of the edge device is determined according to the risk probability distribution, the confusion matrix and the actual deployment requirements of the edge device. The risk warning model is deployed to edge devices to receive multi-source data during ship navigation in real time and output risk probabilities. When the risk probability is greater than the warning threshold, risk warning information is generated.
2. The ship navigation risk early warning method for edge deployment as described in claim 1, characterized in that, After acquiring multi-source data during ship navigation, the process also includes: performing spatiotemporal consistency matching on the multi-source data to convert it into data within the same time window and spatial range.
3. The ship navigation risk early warning method for edge deployment as described in claim 1, characterized in that, Before feature extraction from multi-source data, preprocessing of the multi-source data is also included. Preprocessing includes: standardizing time format, removing outliers, deleting duplicate data, handling missing values, and correcting track continuity.
4. The ship navigation risk early warning method for edge deployment as described in claim 1, characterized in that, After obtaining the feature data, the process also includes standardizing or normalizing the feature data.
5. The ship navigation risk early warning method for edge deployment as described in claim 1, characterized in that, The process of distilling the student model is carried out through a joint loss function, which includes the real label supervision loss, the output probability distillation loss, and the intermediate feature distillation loss.
6. The ship navigation risk early warning method for edge deployment as described in claim 1, characterized in that, Based on the risk probability distribution, confusion matrix, and actual deployment requirements of edge devices, determine the early warning thresholds for edge devices, including: Determine the positive risk probability distribution corresponding to positive data and the negative risk probability distribution corresponding to negative data; Extract the risk probability interval corresponding to the probability overlap region in the probability distributions of positive and negative risk classes, and use it as the initial search interval; Within the initial search interval, the candidate thresholds are adjusted with a preset step size. For each candidate threshold, a confusion matrix is constructed by combining the real label and the predicted label. Based on the confusion matrix, the corresponding recall rate and false positive rate are calculated. Based on the principle of prioritizing false negative control in the actual deployment needs of edge devices, candidate thresholds that can meet the requirement of recall rate being greater than the lower limit of recall rate are selected to form a candidate threshold set. In the candidate threshold set, based on the device performance constraints in the actual deployment requirements of edge devices, candidate thresholds that can meet the device performance constraints are selected to form an optional threshold set; Candidate thresholds that minimize the false alarm rate or balance the recall rate with the operating load of the edge device are selected from the set of available thresholds and used as the warning thresholds for the edge device.