Ship navigation decision-making method fusing large language model and lightweight neural network

Through the collaborative architecture of lightweight neural networks and large language models, combined with risk assessment and timed sequence instruction output, the problems of reasoning delay and irrational decision-making in the ship navigation decision-making system are solved, and safe and real-time navigation decisions are achieved in complex environments.

CN120606947APending Publication Date: 2025-09-09DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510532407.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

When faced with complex dynamic scenarios, existing ship navigation decision-making systems have problems such as large language model inference delays leading to delayed command output and lightweight neural networks' lack of global rule understanding leading to irrational decisions, making it difficult to achieve both real-time and safety in emergency scenarios.

Method used

By constructing a collaborative architecture of lightweight neural networks and large language models, utilizing temporal feature vectors and structured text, dynamically allocating weight coefficients of immediate control instructions and global control instructions, combining risk assessment to generate fused control instructions, and designing a timing sequence instruction output mechanism to ensure that ships can make safe decisions under periodic constraints.

Benefits of technology

It achieves the periodic stability and safe execution of ship navigation decisions in open water scenarios, takes into account both real-time response and global strategy optimization, and improves the dynamic adaptability and rule compliance of ships in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120606947A_ABST
    Figure CN120606947A_ABST
Patent Text Reader

Abstract

The invention provides a ship navigation decision-making method fusing a large language model and a lightweight neural network, and belongs to the technical field of ship intelligent navigation and decision-making optimization. The method comprises the following steps: constructing a time sequence feature vector and a structured text in a predefined format according to ship multi-source data; outputting a real-time control instruction through a lightweight neural network based on the time sequence feature vector; determining a global control instruction through a large language model based on the structured text; according to a preset risk level, dynamically distributing weight coefficients of the instant control instruction and the global control instruction, and generating a fusion control instruction through weighted fusion; an instant control instruction and a fusion control instruction are sent according to a time sequence in each decision period, and a ship execution mechanism completes navigation control according to the instructions. Through the steps, the contradiction between large language model reasoning delay and fixed-period instruction output of the ship control system is solved, and periodic stable generation and safe execution of decision instructions are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent ship navigation and decision optimization, and in particular to a ship navigation decision method integrating a large language model with a lightweight neural network. Background Art

[0002] Ship navigation decision-making is a core link in ensuring maritime traffic safety and efficiency. Its core task is to generate safe and compliant navigation instructions by integrating multimodal environmental information, combining international navigation rules and real-time scene semantics. Traditional methods rely on predefined rules, mathematical models, or reinforcement learning based on local states. However, when dealing with complex dynamic scenarios, they often face the challenge of insufficient decision rationality due to the limitations of environmental understanding. In recent years, large language models (LLMs) have provided new solutions for global strategy generation in complex navigation scenarios with their powerful semantic understanding and reasoning capabilities. They can achieve deep semantic analysis and logical reasoning of navigation rules, multi-ship intentions, and other deep semantics through natural language interaction.

[0003] At present, ship navigation decision systems are mainly divided into two categories: one is a real-time control system based on traditional rule engines or lightweight reinforcement learning, which quickly generates instructions through predefined rules or local state features to meet low latency requirements; the other is an intelligent decision system that introduces a large language model, which uses its semantic understanding ability to process complex multimodal information and generate a global strategy that complies with navigation rules. However, although the lightweight model can achieve millisecond-level response, it lacks a deep understanding of navigation rules and dynamic intentions; and due to the high computational complexity of LLM, the single inference delay may reach seconds, which is difficult to meet the real-time requirements of ship emergency scenarios. Therefore, the above methods have the following problems: (1) Timing contradiction: The deep reasoning of LLM conflicts with the ship's periodic instruction requirements, and high latency may cause the instruction output to lag behind environmental changes; (2) Capacity limitations: Lightweight neural network decisions rely on local features and are prone to ignore global rules (such as the priority of collision avoidance rules), generating unreasonable or even illegal instructions; (3) Insufficient dynamic adaptability: The existing system does not effectively balance real-time response and long-term strategy optimization. When the environment suddenly changes, safety risks may be caused by instruction conflicts. For example, the collision avoidance path generated by LLM may become invalid due to delays, while the fast-responding rule engine may ignore the intentions of other ships, resulting in fragmented decision-making.

[0004] Therefore, a ship navigation decision-making method that integrates a large language model with a lightweight neural network is needed. Summary of the Invention

[0005] In view of this, the present invention provides a ship navigation decision-making method that integrates a large language model and a lightweight neural network. Through the collaborative architecture of the lightweight neural network and the large language model, the contradiction between the inference delay of the large language model and the periodic instruction output of the ship control system is resolved, ensuring the periodic stable generation and safe execution of decision instructions in open water scenarios.

[0006] To this end, the present invention provides the following technical solutions:

[0007] A ship navigation decision-making method that integrates a large language model with a lightweight neural network includes:

[0008] Construct time series feature vectors and pre-defined structured text based on multi-source ship data;

[0009] Output immediate control instructions through a lightweight neural network based on the time series feature vector;

[0010] Determine global control instructions through a large language model based on structured text;

[0011] Dynamically assign weight coefficients of immediate control instructions and global control instructions based on preset risk levels, and generate fused control instructions through weighted fusion;

[0012] In each decision cycle, immediate control instructions and fusion control instructions are sent in sequence, and the ship's executive agency completes navigation control according to the instructions.

[0013] Furthermore, the preset risk level classification includes:

[0014] Calculate the instruction difference between the immediate control instruction and the global control instruction;

[0015] Determine the risk value by combining the collision probability between the ship and the obstacle and the instruction difference;

[0016] Based on the preset risk value threshold, the risk level is divided into low risk, medium risk and high risk.

[0017] Furthermore, the method of dynamically allocating weight coefficients of immediate control instructions and global control instructions according to preset risk levels and generating fused control instructions through weighted fusion includes:

[0018] When the risk level is low, the immediate control instruction is used as a fusion control instruction;

[0019] When the risk level is medium, the weight coefficients of the immediate control instructions and the global control instructions are assigned through the evaluation network, and the fused control instructions are generated through weighted fusion;

[0020] When the risk level is high, the weight coefficient of the global control instruction is increased, and a fusion control instruction is generated through weighted fusion.

[0021] Furthermore, determining the global control instruction based on the structured text through a large language model includes:

[0022] Inputting structured text into the large language model to output inference instructions;

[0023] Judging the reasoning instruction based on the physical constraints of ship navigation;

[0024] When the inference instruction satisfies the physical constraints of the ship's navigation, the inference instruction serves as a global control instruction;

[0025] If the large language model output instruction does not meet the physical constraints of ship navigation, the large language model performs re-inference until the large language model output instruction meets the physical constraints of ship navigation.

[0026] Furthermore, sending the immediate control instruction and the fusion control instruction in a time sequence within each decision cycle includes:

[0027] Preset the decision cycle and reserve the instruction fusion time to determine the instruction fusion moment;

[0028] After the decision cycle begins, the lightweight neural network outputs immediate control instructions before the instruction fusion moment and sends them to the ship's actuators;

[0029] Before the instruction fusion moment, if the large language model completes reasoning, the global control instruction is output; if the large language model does not complete reasoning, the weight coefficient of the global control instruction is 0;

[0030] After the instruction fusion moment, the weight coefficients of the immediate control instructions and the global control instructions are dynamically allocated according to the preset risk level, and the fused control instructions are generated through weighted fusion and sent to the ship's actuator to cover the immediate control instructions.

[0031] Furthermore, the physical constraints on ship navigation include:

[0032] The steering angle rate is within the safe range;

[0033] The ship's sailing speed is within a safe range.

[0034] Furthermore, the instructions differ:

[0035]

[0036] Among them, ω θ Represents the weight coefficient of heading difference, ω v The weight coefficient representing the speed difference; the instruction difference value within the current decision cycle k

[0037] Furthermore, the risk value:

[0038]

[0039] Among them, d max is the preset maximum difference threshold, d (k) is the relative distance between the two ships in the current decision cycle k, d safe is the preset safety distance, α is the balance coefficient between difference and collision probability, μ is the sensitivity factor, represents the collision probability.

[0040] Furthermore, the time series feature vector includes:

[0041] The position, speed and direction of own ship, the speed and direction of target ship, and the azimuth, relative distance and relative speed of target ship relative to own ship.

[0042] Furthermore, the control instruction includes: a heading adjustment amount and a speed adjustment amount.

[0043] Advantages and positive effects of the present invention:

[0044] The present invention provides a ship navigation decision-making method that integrates a large language model and a lightweight neural network. By designing a deep fusion strategy and a timing instruction output mechanism for the large language model and the lightweight neural network, the lightweight neural network realizes dynamic compensation correction of the large language model reasoning delay, so that the ship navigation decision not only follows the periodic timing constraints, but also fully utilizes the global safety reasoning capability of the dual-model decision output; at the same time, an experience replay buffer is set to realize incremental learning of the dual model, and the model parameters are periodically updated to adapt to the ever-changing new environment. The method of the present invention breaks through the inherent limitations of a single model in response speed and decision-making dimension, and provides a new technical path for dynamic decision-making and control of ships in open water scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0046] Figure 1 This is a flow chart of a ship navigation decision-making method that integrates a large language model and a lightweight neural network in an embodiment of the present invention;

[0047] Figure 2 This is a diagram of the architecture of dual-model fusion decision and instruction dynamic compensation in an embodiment of the present invention;

[0048] Figure 3 This is a flowchart of dynamic fusion of instructions based on dual-model decision information in an embodiment of the present invention;

[0049] Figure 4 This is a diagram of the decision-evaluation network architecture based on dual-model decision-making and dynamic weight output in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0051] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0052] The present invention provides a ship navigation decision-making method that integrates a large language model and a lightweight neural network. By establishing a collaborative decision-making architecture of a lightweight neural network and a large language model, the real-time response of the lightweight neural network is dynamically weighted and fused with the deep reasoning results of the large language model. A timing instruction output mechanism is designed to solve the contradiction between the time delay uncertainty of the global deep reasoning of the large language model and the ship's periodic decision-making control, while ensuring the global optimal decision-making instructions of the ship under the periodic timing constraints. In addition, a dynamic assessment strategy of the risk level based on the probability of collision is introduced, and an experience buffer is set to support the incremental learning and continuous updating of the dual-model network to ensure that the model constantly adapts to new scenarios. The method of the present invention significantly improves the ship's periodic stable decision-making ability and rule compliance in open water scenarios, and is suitable for the field of autonomous navigation and safe navigation technology of intelligent ships.

[0053] Combine Figure 1 As shown, the method of the present invention comprises the following steps:

[0054] Step A: Receive multi-source data in real time, and perform multi-source data analysis and pre-processing;

[0055] 1) Multi-source data includes: AIS data, radar data, electronic nautical charts, visual sensors, and international maritime navigation regulations;

[0056] AIS data includes: ship position, heading, and speed; radar data includes: relative distance to obstacles, relative bearing, and relative speed; electronic nautical charts include: channel topology and channel trajectory; visual sensors include: navigation marks and visibility;

[0057] The actual scene information is parameterized and described based on multi-source data to obtain scene information.

[0058] 2) Determine the decision cycle:

[0059] Taking the ship navigation decision cycle T c As the benchmark, each period is marked as k, and the time range is recorded as [t k ,t k +T c ), where t k =k×T c is the starting moment of the cycle, and the ship navigation decision instructions are given during the decision cycle.

[0060] 3) Based on the scene information parameterized by multi-source data, a time series feature vector is constructed as the input of a lightweight neural network and structured text is constructed as the input of a large language model.

[0061] Step B: Integrate a lightweight neural network and a large language model for dual-model collaborative reasoning and decision-making;

[0062] Step B1: Build and train a lightweight neural network to quickly infer and output immediate control instructions;

[0063] Adopting a lightweight neural network (LNN) architecture, the supervised training of the LNN model is performed using currently known public decision information and historical decision data (state-command pairs) of a large language model.

[0064] The input of the lightweight neural network is a time series feature vector, including: the current state data of the ship, the state data of obstacles and the environmental feature data;

[0065] The current status data of the ship includes: position, speed and heading;

[0066] Obstacle status data includes: the relative distance, relative azimuth and relative speed between the obstacle or other ship and the own ship;

[0067] Environmental characteristic data include: visibility;

[0068] The lightweight neural network uses a fully connected layer as the output layer;

[0069] The output of the lightweight neural network is a heading adjustment and speed change Immediate control instructions

[0070] The lightweight neural network uses mean square error to calculate the loss, optimizes the fitting accuracy of heading and speed commands, and makes the lightweight neural network model close to the distribution of target commands. An optimization weight coefficient is introduced. If λ = 1, it means that the optimization weights of heading and speed are the same. If λ < 1, more attention is paid to heading accuracy. The loss function is:

[0071]

[0072] Where N is the number of samples in the batch, is the heading adjustment value predicted by LNN for the i-th sample, is the target heading adjustment of the i-th sample, obtained through known manual annotation or historical data, is the speed change predicted by LNN for the i-th sample, is the target speed change of the i-th sample, and λ is the weight coefficient of the speed term.

[0073] The lightweight neural network outputs the immediate control command and sends it to the ship's actuator immediately to ensure that the command is not lost within the cycle. The output time of the immediate control command is t k +Δt LNN , where Δt LNN Inference time for lightweight neural networks.

[0074] Step B2: Build and train a large language model for deep inference to output global control instructions.

[0075] The large language model uses a self-attention mechanism to analyze historical trajectories and environmental semantic information, and injects navigation rules to fine-tune the model without modifying the original model parameters;

[0076] The input of the large language model is structured text containing key information of the scene, including: ship status, obstacle information, environmental characteristics and navigation tasks;

[0077] The large language model outputs inference instructions, including heading adjustment and speed adjustment;

[0078] According to the ship performance, the physical constraints include: steering angle rate limit |Δθ| / Δt≤ω max ° / s, speed limit: v+Δv∈[0,vmax ];

[0079] The feasibility of the output instructions is checked through the processing layer. If the constraints are not met, the large language model is triggered to re-infer until a global control instruction that meets the constraints is obtained. in Indicates the heading adjustment amount, Indicates the speed adjustment amount.

[0080] The large language model uses a hybrid loss function that combines cross entropy loss and mean square error to adapt to the different requirements of classification and regression tasks during navigation. The loss function of the large language model is:

[0081]

[0082] In the formula, α and β are the weight coefficients of the loss term, C is the total number of classification task categories, and y C is the encoding vector of the true classification level, p C is the regular distribution of classification levels predicted by the model; N is the number of training samples, is the heading adjustment amount predicted by LMM for the i-th sample, is the target heading adjustment of the i-th sample (from known manual annotations or historical data), is the speed change predicted by LMM for the i-th sample, is the target speed change of the i-th sample.

[0083] Instruction timeout judgment: If the instruction output time is t k +T c -Δt integ If it is not completed within 10 seconds, it will be marked as timeout, forcing the fusion of weight instructions within this decision cycle. where Δt integ This is to reserve time for instruction fusion.

[0084] Step C: Dynamically allocate weight coefficients of immediate control instructions and global control instructions according to the preset risk level, and generate fusion control instructions through weighted fusion; Figure 4 Further explanation:

[0085] Step C1: Calculate the instruction difference between the immediate control instruction and the global control instruction as the basis for dynamic weight adjustment;

[0086] Quantify the degree of difference between the output instructions of the lightweight neural network and the large language model as the instruction difference:

[0087]

[0088] Where ωθ represents the weight coefficient of heading difference, ω vThe weight coefficient representing the speed difference; the weight coefficient is dynamically adjusted to adapt to different ship types, and the instruction difference value within the current decision cycle k The larger the value, the more significant the instruction difference between the two models; Indicates the instruction difference value.

[0089] Step C2: Calculate the risk value based on the collision probability between the ship and the obstacle and the instruction difference;

[0090]

[0091] Where, d max is the preset maximum difference threshold, d (k) is the relative distance between the two ships in the current decision cycle k, d safe is the preset safety distance, α is the balance coefficient between difference and collision probability, μ is the sensitivity factor, represents the collision probability; R (k) Represents the risk value of the current decision cycle k.

[0092] Step C3: Dynamically assign weight coefficients of immediate control instructions and global control instructions according to the preset risk level, and generate fused control instructions through weighted fusion:

[0093] 1. If the risk value in the current decision cycle is less than the first dynamic risk threshold (R (k) <τ1), it is classified as low risk, and the output instructions of the lightweight neural network model are maintained;

[0094] If the risk value in the current decision cycle is greater than or equal to the first dynamic risk threshold and less than the second dynamic risk threshold (τ1≤R (k) <τ2), it is classified as medium risk, and the weight coefficients of immediate control instructions and global control instructions are assigned through the evaluation network;

[0095] If the risk value in the current decision cycle is greater than or equal to the second dynamic risk threshold (R (k) ≥τ2), and is classified as high risk, the weight ratio of the global control instructions is forced to increase to obtain the fusion control instructions.

[0096] Among them, τ1 represents the first dynamic risk threshold and τ2 represents the second dynamic risk threshold, which can be adjusted according to the scenario.

[0097] 2. In medium-risk scenarios, dynamic fusion weights are generated through the evaluation network;

[0098] Build a deep neural network Q(s t ,a t ; θ) is used as the evaluation network for dual-model instructions, and the dynamic fusion weight is output by training the evaluation network:

[0099] Input: The state of the environment s in the current cycle k tk , dual-model instructions

[0100] Output: instruction fusion weight Calculation requires the reserved instruction fusion time Δt integ Completed within, where θ is the network parameter;

[0101] Evaluation network training method:

[0102] 1) Build an experience replay pool to record the experience data set within a decision cycle:

[0103]

[0104] Among them, s tk is the environmental state at the start of period k, r tk is the execution reward within period k, s tk+1 is the environmental state at the start of period k+1.

[0105] 2) Calculate the target Q value in the current decision cycle k:

[0106]

[0107] In the formula, γ is the discount factor, which indicates the importance of future rewards, and a LNN(t+1) , a LLM(t+1) Output instruction for the dual model at the next moment, s tk+1 is the environmental state at the next moment, r tk is the execution reward and θ is the network parameter.

[0108] 3) Design and execute reward function:

[0109] r tk =p·I avoid +q·I collision +k·N violation

[0110] In the formula, p is the positive reward value given for the successful obstacle avoidance of the ship; q is the negative reward value given for the failure of obstacle avoidance; k is the negative reward given for the violation of the decision instruction, and the collision avoidance success flag variable (I avoid =0 / 1), collision avoidance failure flag variable (I collision =0 / 1) and the violation count variable N violation .

[0111] 4) Minimize the mean square error between the current predicted Q value and the target Q value as the loss function L(θ):

[0112]

[0113] Where θ is the network parameter and M is the batch size.

[0114] 5) Back propagation updates network parameters:

[0115]

[0116] Where θ t ,θ t+1 are the updated parameter values ​​of the neural network at the current moment and the next moment respectively, η is the update step size, η<<1.

[0117] 3. Generate fusion control instructions through weighted fusion:

[0118] According to the risk level assessment results in step C2, within the reserved time Δt integ Complete navigation decision-making and instruction fusion within:

[0119] Low-risk scenario: Maintain immediate control instructions,

[0120] Medium-risk scenario: Based on step C3, the command fusion weight value is determined by the evaluation network to obtain the fusion control command;

[0121] High-risk scenarios: Forcibly increase the weight ratio of global control instructions to obtain fused control instructions.

[0122] Use weighted summation fusion control instructions:

[0123]

[0124] At the current cycle time T c Before the end, the fusion control instructions are sent to the ship execution structure, overwriting the immediate control instructions, and the actual navigation motion state of the ship is read in real time for updating the initial conditions of the next cycle decision algorithm; the ship execution structure includes the steering gear and propeller.

[0125] Step C4: outputting a timing sequence control instruction within the decision cycle;

[0126] Ship navigation decision cycle T c The timing sequence instruction output is:

[0127] 1)t k At time k, the kth cycle begins, multi-source data is preprocessed, and key features are extracted;

[0128] 2)t k +Δt LNN At this moment, lightweight neural networks quickly infer and generate immediate control instructions Send to the execution agency to ensure that the instructions are not lost within the cycle;

[0129] 3)tk +T c -Δt integ Before the moment, the large language model asynchronously infers and generates global control instructions If the large language model inference is not completed, it is marked as timeout and the fusion weight coefficient

[0130] 4)t k +T c -Δt integ After time, the evaluation network generates the fusion weight coefficient And generate fusion control instructions Sent to the actuator to override the immediate control instructions;

[0131] 5)t k +T c At this moment, the kth cycle ends and enters the next cycle k+1.

[0132] Step D: incremental learning and model updating;

[0133] Step D1: Sample batches of experience data from the experience replay pool in step C3 in periodic order to construct an experience replay buffer: {D k ,D k+1 ,D k+2 ,…,D k+N}, used to update lightweight neural networks and large language models offline, so that the dual models can continuously adapt to new scenarios, and the output instructions are closer to the current optimal decision instructions after fusion, avoiding catastrophic forgetting.

[0134] The experience buffer is set to store a fixed amount of the latest data to avoid memory overflow, and is set to prioritize the storage of high-risk scenario data.

[0135] Step D2, updating the lightweight neural network;

[0136] Minimize the deviation between historical instructions and the current optimal instructions, while constraining parameter mutations and maintaining low computational latency. The loss function is:

[0137]

[0138] Where N is the amount of sample data, λ is the elastic constraint coefficient to prevent parameter mutation, θ is the network parameter, Output instructions for the lightweight neural network of the i-th sample, is the fusion output instruction of the i-th sample, and an offline fine-tuning is performed every time new experience is received for M cycles.

[0139] Large language model update: Dynamically adjustable parameters are embedded between the layers of the large language model to adjust the information flow without changing the original structure. This allows the historical output instructions of the large language model to align with the current optimal instructions after weight fusion. The loss function is as follows:

[0140]

[0141] Where N is the amount of sample data, CE represents the calculation of cross entropy loss, which is used for classification tasks. is the probability distribution of the classification level of the i-th sample predicted by the model, is the encoding vector of the true classification level of the i-th sample, and the dynamic weight of the i-th sample Determines the loss ratio of regression and classification, Output instructions for the large language model of the i-th sample, is the fusion output instruction of the i-th sample, triggering the model update every H hours.

[0142] At the same time, a dual-model alternating training mode was designed: during the lightweight neural network update phase, the parameters of the large language model were frozen, and the lightweight neural network was optimized based on the experience pool data. During the large language model update phase, the parameters of the lightweight neural network were frozen, and the adjustable parameter groups between the layers of the large language model were optimized. After each dual-model update cycle, the experience pool was cleared for the next round of switching.

[0143] Combine Figures 1 to 4 , the method of the present invention is further described with specific examples:

[0144] like Figure 1 As shown, this embodiment provides a ship navigation decision-making method that integrates a large language model and a lightweight neural network, including:

[0145] Step A: Receive multi-source data and perform data analysis and preprocessing;

[0146] In the scenario of two ships crossing each other in open waters, the scenario parameterization is described by parsing multi-source data:

[0147] Own vessel A, position: (120.5°E, 30.3°N), speed 8 knots, and course 45° (due northeast);

[0148] AIS receives information about target ship B: speed 10 knots and heading 330° (northwest).

[0149] The radar detected that the target ship was approaching at an angle of 30°, a relative distance of 150 meters, and a relative speed of 2 knots relative to the ship.

[0150] The visual sensor detects an environmental visibility of 5 nautical miles;

[0151] According to the International Regulations for Preventing Collisions at Sea, when crossing, the starboard ship (own ship A) has the right of way, and the port ship (target ship B) must give way.

[0152] Ship decision cycle T c =500ms, taking the initial cycle k=0 as an example, the reserved instruction fusion time Δt integ =10ms.

[0153] Step B: Collaborative reasoning and decision-making through dual models;

[0154] Step B1: Determine immediate control instructions through a lightweight neural network;

[0155] 1) The input of the lightweight neural network is a time series feature vector, including: the current state data of the ship, the state data of obstacles, and the environmental feature data;

[0156] Current ship status data: [(120.5°E, 30.3°N), 8 knots, 45°]; obstacle status data: [150, 30°, 2 knots]; environmental characteristics data: [5 nautical miles];

[0157] 2) A recurrent neural network (RNN) is selected as a lightweight neural network model. The model structure is as follows: the environment feature vector is used as the input layer; a single-layer gated recurrent unit is used as the hidden layer to solve the gradient vanishing problem of traditional RNN; and a fully connected layer is used as the output layer.

[0158] 3) Lightweight neural network training: Use mean square error to calculate the loss function and perform supervised training;

[0159] 4) Lightweight neural network outputs immediate control instructions:

[0160]

[0161] Heading adjustment amount:

[0162] Speed ​​adjustment:

[0163] Ship A starts to execute the right turn and deceleration instruction.

[0164] Step B2: determining global control instructions through a large language model;

[0165] 1) Large language model input: Structured text is generated based on multi-source ship data. The large language model uses the Transformer decoder to parse the corresponding information and perform global policy reasoning;

[0166] In this embodiment, the structured text is: Own ship A's position: (120.5°E, 30.3°N), speed 8 knots, heading 45°; target ship B's speed 10 knots, heading 330°; the target ship's azimuth relative to the own ship is 30°, the relative distance is 150 meters, the relative speed is 2 knots, and it is gradually approaching; the environmental visibility is 5 nautical miles; according to the requirements of the International Regulations for Preventing Collisions at Sea, please give the navigation instructions for the own ship.

[0167] 2) The Transformer-based Deepseek_R1 model was used as the foundation for the large language model for local deployment. Pre-training was performed on a large number of prompt-response decision pairs for navigation scenarios, covering collision avoidance, channel planning, and rule application. A low-rank matrix was constructed to fine-tune the model without modifying the original model parameters.

[0168] 3) Large language model training: A hybrid loss function combining cross entropy loss and mean squared error is used to adapt to the different requirements of classification and regression tasks during navigation.

[0169] 4) Large language model outputs global control instructions

[0170] Heading adjustment amount:

[0171] Speed ​​adjustment: Output not timed out.

[0172] Physical constraint verification: The instruction complies with the maximum turning rate of the ship (5° / 0.8s=6.25° / s<20° / s), and the physical state is feasible.

[0173] Step C: Dynamically assign weight coefficients of immediate control instructions and global control instructions according to the preset risk level, and generate fused control instructions through weighted fusion;

[0174] Step C1: Calculate instruction differences:

[0175]

[0176] Step C2: Assess the risk level;

[0177] Set dynamic risk thresholds: τ1 = 20% and τ2 = 60%;

[0178] Collision probability calculation:

[0179]

[0180] Value at Risk calculation:

[0181]

[0182] Risk level assessment: This scenario is medium risk (20% ≤ R (0) <60%), and execute the dynamic weight fusion compensation algorithm.

[0183] Step C3: Generate fusion weights through the evaluation network, and generate fusion control instructions through weighted fusion;

[0184] In this embodiment, the risk level is medium, and the decision-evaluation network architecture based on dual-model decision-making and dynamic weight output is as follows: Figure 4 As shown, the fusion weights are output by the evaluation network

[0185] Generate fusion control instructions through weighted fusion

[0186]

[0187] Execution results:

[0188] Vessel A turns right slightly and slows down, maintaining a safe distance from Vessel B (100 meters at the closest point);

[0189] Vessel B turned left to avoid the other ship as per the rules, and both parties successfully completed the intersection.

[0190] Step C4: timing sequence instruction output mechanism within the cycle;

[0191] Period T c =500ms, k=0 cycle, reserved instruction fusion time Δt integ =10ms:

[0192] 1) At t0 = 0ms, the kth cycle begins and multi-source data preprocessing begins;

[0193] 2) At t0+20ms, the lightweight neural network generates real-time control instructions through synchronous reasoning Immediately send to the execution agency to ensure that the instructions are not lost within the cycle;

[0194] 3) Before t0+490ms, the large language model asynchronously infers and generates global control instructions

[0195] 4) After t0+490ms, the evaluation network generates fusion weights And determine the fusion control instructions Sent to the actuator to override the immediate control instructions;

[0196] 5) At time t0+500ms, the cycle ends and enters the next cycle k=1.

[0197] Step D: incremental learning and model updating;

[0198] Step D1: Save the experience data of each cycle: Then, batch experience data sets are sampled in order of cycles: {D k ,D k+1 ,D k+2 ,…,D k+N}, used for offline updating of lightweight neural networks and large language models.

[0199] For the current k=0 decision cycle, the empirical data D (0) include:

[0200] Environmental status t(0) : [Ship A heading 45°, speed 8 knots, ship B heading 330°, speed 10 knots, relative distance 150m];

[0201] Lightweight neural network RNN ​​output instructions:

[0202] Large language model output instructions:

[0203] Fusion weight:

[0204] Fusion control instructions:

[0205] Reward: r t(0) =(+10)×1+(-20)×0+(-5)×0=10;

[0206] The environmental state s at the initial moment of the next cycle t(1) : [Ship A heading 47.8°, speed 6.8 knots, ship B heading 33°, speed 10 knots, relative distance 143.2m].

[0207] Step D2: model update;

[0208] During the lightweight RNN update phase, the parameters of the large language model are frozen. Experience data is collected every 200 cycles to fine-tune the gated recurrent unit layer. Elastic weight constraints are added to the loss function for online fine-tuning. During the large language model update phase, the parameters of the lightweight neural network are frozen, the low-rank matrix parameters are updated every 24 hours, the original Transformer is frozen, and the large language model adapter is optimized. After each dual-model update cycle, the experience pool is cleared and the cycle is switched.

[0209] The present invention proposes a ship navigation decision-making method that integrates a large language model with a lightweight neural network. The method compensates for the inference delay of the large language model through a lightweight real-time network, prioritizes the generation of immediate control instructions, and dynamically corrects the deep inference results of the integrated large model. A timed instruction output mechanism is designed to output the integrated control instructions strictly on time within each control cycle, resolving the contradiction between the uncertainty of the inference delay of the large language model and the strict periodic instruction output of the ship control system, ensuring the stable generation and safe execution of decision instructions in open water scenarios.

[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A ship navigation decision-making method integrating a large language model and a lightweight neural network, characterized in that: include: Construct time series feature vectors and pre-defined structured text based on multi-source ship data; Output immediate control instructions through a lightweight neural network based on the time series feature vector; Determine global control instructions through a large language model based on structured text; Dynamically assign weight coefficients of immediate control instructions and global control instructions based on preset risk levels, and generate fused control instructions through weighted fusion; In each decision cycle, immediate control instructions and fusion control instructions are sent in sequence, and the ship's executive agency completes navigation control according to the instructions.

2. The ship navigation decision-making method integrating a large language model and a lightweight neural network according to claim 1 is characterized in that: The preset risk level classification includes: Calculate the instruction difference between the immediate control instruction and the global control instruction; Determine the risk value by combining the collision probability between the ship and the obstacle and the instruction difference; Based on the preset risk value threshold, the risk level is divided into low risk, medium risk and high risk.

3. The ship navigation decision-making method integrating a large language model and a lightweight neural network according to claim 2 is characterized in that: The step of dynamically allocating weight coefficients of immediate control instructions and global control instructions according to preset risk levels and generating fused control instructions through weighted fusion includes: When the risk level is low, the immediate control instruction is used as a fusion control instruction; When the risk level is medium, the weight coefficients of the immediate control instructions and the global control instructions are assigned through the evaluation network, and the fused control instructions are generated through weighted fusion; When the risk level is high, the weight coefficient of the global control instruction is increased, and a fusion control instruction is generated through weighted fusion.

4. The ship navigation decision-making method integrating a large language model and a lightweight neural network according to claim 1 is characterized in that: The determining of the global control instruction based on the structured text through the large language model includes: Inputting structured text into the large language model to output inference instructions; Judging the reasoning instruction based on the physical constraints of ship navigation; When the inference instruction satisfies the physical constraints of the ship's navigation, the inference instruction serves as a global control instruction; If the large language model output instruction does not meet the physical constraints of ship navigation, the large language model performs re-inference until the large language model output instruction meets the physical constraints of ship navigation.

5. The ship navigation decision-making method integrating a large language model and a lightweight neural network according to claim 1 is characterized in that: Sending the immediate control instructions and the fusion control instructions in a time sequence within each decision cycle includes: Preset the decision cycle and reserve the instruction fusion time to determine the instruction fusion moment; After the decision cycle begins, the lightweight neural network outputs immediate control instructions before the instruction fusion moment and sends them to the ship's actuators; Before the instruction fusion moment, if the large language model completes reasoning, the global control instruction is output; if the large language model does not complete reasoning, the weight coefficient of the global control instruction is 0; After the instruction fusion moment, the weight coefficients of the immediate control instructions and the global control instructions are dynamically allocated according to the preset risk level, and the fused control instructions are generated through weighted fusion and sent to the ship's actuator to cover the immediate control instructions.

6. The ship navigation decision-making method integrating a large language model and a lightweight neural network according to claim 4 is characterized in that: The physical constraints on ship navigation include: The steering angle rate is within the safe range; The ship's sailing speed is within a safe range.

7. The ship navigation decision-making method integrating a large language model and a lightweight neural network according to claim 2 is characterized in that: The instruction differences are: Among them, ωθ represents the weight coefficient of heading difference, ω v The weight coefficient representing the speed difference; the instruction difference value within the current decision cycle k 8. The ship navigation decision-making method integrating a large language model and a lightweight neural network according to claim 2 is characterized in that: The stated risk value: Among them, d max is the preset maximum difference threshold, d (k) is the relative distance between the two ships in the current decision cycle k, d safe is the preset safety distance, α is the balance coefficient between difference and collision probability, μ is the sensitivity factor, represents the collision probability.

9. The ship navigation decision-making method integrating a large language model and a lightweight neural network according to claim 1, characterized in that: The time series feature vector includes: The position, speed and direction of own ship, the speed and direction of target ship, and the azimuth, relative distance and relative speed of target ship relative to own ship.

10. The ship navigation decision-making method integrating a large language model and a lightweight neural network according to claim 1, characterized in that: The control instructions include: a heading adjustment amount and a speed adjustment amount.

Citation Information

Cited By

  • Unmanned feeding ship multi-source breeding data low-delay anti-interference communication method and system

    CN121751208A