Method and device for automatically recording navigation logs
By combining streaming processing and machine learning with blockchain technology, navigation logs are automatically recorded, solving the data collection limitations, insufficient anomaly detection and compliance issues of the existing system, achieving real-time and accurate navigation risk assessment and data immutability, and improving the efficiency of human-machine collaboration.
Patent Information
- Application Number
- CN202510604939.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-09-05
AI Technical Summary
The existing electronic logbook system has problems such as data collection limitations, insufficient anomaly detection capabilities, log credibility defects, low human-machine collaboration efficiency and insufficient compliance. Especially in complex environments, it is difficult to dynamically assess navigation risks and provide accurate early warnings.
A streaming processing engine is used to analyze ship status and meteorological data in real time, combined with machine learning models to issue warnings for abnormal events. Logs are signed using hash functions and stored in a distributed database. A visual audit interface is provided to optimize warning thresholds, and blockchain technology is used to ensure that data cannot be tampered with.
It realizes the real-time collection and analysis of ship status and hydrological and meteorological data, improves the accuracy of abnormal event identification and the reliability of early warning, simplifies the operation process, enhances the system's adaptability and data transparency and security.
Smart Images

Figure BDA0005397935830000051 
Figure BDA0005397935830000088 
Figure BDA0005397935830000092
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of navigation log recording, and in particular to a method and device for automatically recording navigation logs. Background Art
[0002] As a legal record document of a ship's voyage, the International Convention for the Safety of Life at Sea explicitly stipulates that logbooks must be preserved. Traditional logbooks are manually recorded on paper, which poses risks of data tampering, omissions, and errors, and increases the workload of crew members. Although electronic logbook systems have been gradually implemented, existing technologies still have the following technical drawbacks:
[0003] 1) Data collection limitations;
[0004] Existing electronic logbook systems rely heavily on crew members manually inputting ship status and weather data, failing to fully integrate automated data sources such as ship sensors and weather satellites. This results in insufficient real-time and accuracy of data, and also fails to address the issue of automated data collection.
[0005] 2) Insufficient anomaly detection capabilities;
[0006] Traditional methods rely on fixed threshold rules (e.g., triggering an alarm when wind speeds exceed 20m / s), and are unable to dynamically assess compound risks. For example, when a ship encounters crosswinds in a narrow channel, existing systems struggle to quantify the risk associated with course deviation and channel width, leading to missed or false alarms.
[0007] 3) Log credibility defects;
[0008] Electronic logs are susceptible to tampering, and existing storage solutions lack effective anti-tampering mechanisms.
[0009] 4) Low efficiency of human-machine collaboration;
[0010] The existing system lacks adaptive optimization capabilities, requiring specialized IT personnel to adjust thresholds and modify rules. Crew members are unable to quickly correct system decisions in emergencies like typhoons, impacting navigation safety decisions.
[0011] Therefore, there is an urgent need for an automated logbook recording method to address core issues such as data authenticity, intelligent analysis, and compliance. Summary of the Invention
[0012] The present invention provides a method and device for automatically recording a logbook, which solves various technical defects in existing electronic logbook systems and also demonstrates significant advantages in data authenticity, intelligent analysis, human-computer collaboration efficiency, system reliability and compliance.
[0013] In order to achieve the purpose of the present invention, the technical solution adopted is: a method for automatically recording a navigation log, comprising:
[0014] A. Preprocess the acquired ship status data, hydrological and meteorological data, and external data;
[0015] B. Use a streaming processing engine to analyze ship status data and weather data in real time, and issue warnings for abnormal events based on machine learning models;
[0016] C. Generate log entries based on standard timing extraction of relevant data. Automatically generate additional logs when abnormal events are detected. Sign the logs using a hash function and store them in a distributed database.
[0017] D. Provide a visual audit interface to collect user correction records to optimize log generation rules and abnormal warning thresholds.
[0018] As an optimization solution of the present invention, ship status data includes ship position, speed, heading, draft and engine data; hydrological and meteorological data includes wind speed, wind direction, temperature and humidity data, radar data and satellite remote sensing data; external data includes weather forecasts, waterway dynamics and port information.
[0019] As an optimization solution of the present invention, a stream processing engine is used to analyze ship status data and meteorological data in real time, and abnormal event warnings are issued based on machine learning models, including:
[0020] B1. Use Flink's sliding window mechanism to filter outliers. If |x t -μ W |>3σ W , it is marked as missing value and filled with interpolation; where: μ W is the mean value in the sliding window, σ W is the standard deviation within the sliding window;
[0021] B2. Extract spatiotemporal features and meteorological correlation features. Spatiotemporal features include speed fluctuation and heading change rate, while meteorological correlation features include risk indicators.
[0022] The calculation formula for speed fluctuation is:
[0023] Where: V fluct is the speed fluctuation value, v t is the current speed, μ v,W is the mean speed in the sliding window, σ v,W is the standard deviation of ship speed within the sliding window;
[0024] The calculation formula for heading change rate is:
[0025] Where: θ t is the current heading angle, ΔT is the time interval, and Δθ is the heading change rate;
[0026] The risk indicator formula is:
[0027] Where: R is the risk index, which is used to quantify the navigation risk of the ship under the current meteorological conditions; It represents the longitudinal component of wind speed in the direction of ship heading, Indicates the component of wind speed in the transverse direction of the ship, v crit is the ship wind resistance level threshold, d safe is the safe lateral offset distance, α and β are weighting coefficients, and α and β are used to adjust the contribution ratio of the longitudinal and transverse wind speed components to the total risk respectively;
[0028] B3. Input the spatiotemporal feature vector [speed fluctuation value, heading change rate] and the risk index R into the pre-trained LSTM anomaly detection model to obtain the output probability value P anomaly , according to the output probability value P anomaly Trigger a graded warning.
[0029] As an optimized solution of the present invention, step C specifically includes:
[0030] C1, using a fixed time window T log Periodic triggering, extracting data, and generating standard log entries;
[0031] C2, when the abnormal probability P is detected anomaly When ≥0.7, additional logs are generated:
[0032] C3. Use the SHA-256 algorithm to generate a unique digest of the log content and add a timestamp for encryption; Hash(Log) = SHA256(Log||t||ship_key);
[0033] Where: Log is the log content, t is the timestamp of log generation, ship_key is the ship key, and |||| is the string concatenation operator.
[0034] As an optimization solution of the present invention, storage in a distributed database specifically includes:
[0035] 1) Shard by ship ID and timestamp combination key;
[0036] shard_id=hash(ID||[t / 24h])mod N shards ;
[0037] Where: shard_id is the ID of the target shard, ID is the unique identifier of the ship, [t / 24h] means the timestamp is rounded to 24 hours, N shards is the total number of shards in the distributed storage system;
[0038] 2) Write the log Merkle root hash to the public chain every 24 hours;
[0039]
[0040] Where: Blockchain_Tx is the transaction record on the blockchain, commit writes the Merkle root hash value into the blockchain, MerkleRoot is the root hash value of the Merkle tree, Logi is the content of the i-th log, Hash(Log i ) is a hash set of log entries;
[0041] 3) Each shard stores 3 copies to meet data integrity standards.
[0042] As an optimization solution of the present invention, in step D, the optimization of the abnormal warning threshold is achieved by a threshold dynamic optimization algorithm, specifically:
[0043]
[0044] in, is the threshold value manually adjusted for the i-th time, is the new abnormal warning threshold after dynamic adjustment, w i is the weight of the ith adjustment, λ is the weight coefficient of the feedback term, and ΔR is the performance feedback term.
[0045] In order to achieve the purpose of the present invention, the technical solution adopted is: a device for automatically recording navigation logs, including a data collection and preprocessing module, a real-time stream processing and intelligent analysis module, a log generation and secure storage module and a user interaction and adaptive optimization module, wherein the data collection and preprocessing module is used to preprocess the acquired ship status data, hydrological and meteorological data and external data; the real-time stream processing and intelligent analysis module uses a streaming processing engine to analyze the ship status data and meteorological data in real time, and performs abnormal event warning based on a machine learning model; the log generation and secure storage module extracts relevant data according to standard timing to generate log entries, and automatically generates additional logs when an abnormal event is detected, signs the logs using a hash function and stores them in a distributed database; the user interaction and adaptive optimization module provides a visual audit interface, collects user correction records to optimize log generation rules and abnormal warning thresholds.
[0046] This invention has positive effects: 1) By integrating automated data sources such as ship sensors and meteorological satellites, it enables real-time collection and analysis of ship status and hydrological and meteorological data, reducing data inaccuracies and omissions caused by manual input. It also uses the SHA-256 hash function to sign log content and combines blockchain technology to store Merkle root hash values, ensuring the immutability and transparency of log data.
[0047] 2) This invention uses a machine learning method based on the LSTM model for abnormal event warning. Compared with traditional fixed threshold rules (such as the 3σ rule), it can more accurately identify compound risks in complex environments and effectively reduce false alarm and missed alarm rates. The risk index calculation method that introduces spatiotemporal feature vectors and meteorological correlation characteristics can dynamically assess the comprehensive risks during the navigation process and provide more accurate warning information.
[0048] 3) This invention provides a visual review interface, enabling crew members to quickly correct system decisions in emergency situations without the need for professional intervention, improving emergency response capabilities and decision-making efficiency. It also implements a dynamic threshold optimization algorithm, allowing for continuous adjustment of abnormal warning thresholds based on user feedback and system performance feedback, enhancing the system's adaptability and flexibility.
[0049] 4) The present invention's sharded storage strategy allocates data based on a combination of vessel ID and timestamp keys, ensuring even data distribution and easy retrieval, improving the system's disaster recovery capabilities and data recovery speed. It also provides a user-friendly interface, simplifies the operational process, and makes daily maintenance more convenient and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0051] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0052] like Figure 1 As shown, the present invention discloses a method for automatically recording a navigation log, comprising:
[0053] A. Preprocess the acquired ship status data, hydrological and meteorological data, and external data. Ship status data includes ship position, speed, heading, draft, and engine data. Hydrological and meteorological data includes wind speed, wind direction, temperature and humidity data, radar data, and satellite remote sensing data. External data includes weather forecasts, waterway dynamics, and port information.
[0054] Apache Flink, a streaming computing platform, was used for preprocessing to perform data denoising, missing value filling, and spatiotemporal alignment. Multi-source data was converted to a unified format (ISO 19848 standard) to ensure data consistency.
[0055] B. Use a stream processing engine to analyze ship status and weather data in real time, and issue warnings for abnormal events based on machine learning models. This includes: Introducing Apache Flink into the system that automatically records navigation logs can significantly improve real-time data processing capabilities and achieve millisecond-level delay warnings through the stream processing engine.
[0056] B1. Use Flink's sliding window mechanism to filter outliers. If |x t -μ W |>3σ W , it is marked as missing value and filled with interpolation; where: μ W is the mean value in the sliding window, σ W is the standard deviation within the sliding window;
[0057] B2. Extract spatiotemporal features and meteorological correlation features. Spatiotemporal features include speed fluctuation and heading change rate, while meteorological correlation features include risk indicators.
[0058] The calculation formula for speed fluctuation is:
[0059] Where: V fluct is the speed fluctuation value, v t is the current speed, μ v,W is the mean speed in the sliding window, σ v,W is the standard deviation of ship speed within the sliding window;
[0060] The calculation formula for heading change rate is:
[0061] Where: θ t is the current heading angle, ΔT is the time interval, and Δθ is the heading change rate;
[0062] The risk indicator formula is:
[0063] Where: R is the risk index, which is used to quantify the navigation risk of the ship under the current meteorological conditions; It represents the longitudinal component of the wind speed in the direction of the ship's heading, which is the effect of the wind on the ship's heading (such as tailwind or headwind); It represents the component of wind speed in the transverse direction of the ship, and the effect of wind on the lateral deviation of the ship (such as lateral drift caused by crosswind). crit The ship's wind resistance level threshold indicates the maximum wind speed the ship can withstand, which is usually determined by the ship's design parameters.safe is the safe lateral deviation distance. It indicates the maximum distance allowed for a ship to deviate laterally, and is usually related to factors such as channel width and obstacle distribution. α and β are weighting coefficients, which are used to adjust the contribution of the longitudinal and transverse wind speed components to the total risk respectively. and The calculation formula is:
[0064]
[0065] Among them, v wind is the true wind speed, θ wind is the wind direction, θ ship The ship's heading.
[0066] B3. Input the spatiotemporal feature vector [speed fluctuation value, heading change rate] and the risk index R into the pre-trained LSTM anomaly detection model to obtain the output probability value P anomaly , according to the output probability value P anomaly Trigger a graded warning.
[0067] The input vector is Construct LSTM input sequence,
[0068] The key parameters of LSTM include:
[0069] Time step: 10 (corresponding to 10 minutes of historical data);
[0070] Hidden layer dimensions: 64 (first layer), 32 (second layer);
[0071] Output layer: Sigmoid activation function, output Panomaly∈[0,1].
[0072] C. Generate log entries based on standard timing extraction of relevant data. Automatically generate additional logs when abnormal events are detected. Sign the logs using a hash function and store them in a distributed database.
[0073] Step C specifically includes:
[0074] C1, using a fixed time window T log Periodic triggering, extracting data, and generating standard log entries;
[0075] C2, when the abnormal probability P is detected anomaly When ≥0.7, additional logs are generated:
[0076] C3. Use the SHA-256 algorithm to generate a unique digest of the log content and add a timestamp for encryption; Hash(Log) = SHA256(Log||t||ship_key);
[0077] Where: Log is the log content, t is the timestamp of log generation, ship_key is the ship key, and || is the string concatenation operator.
[0078] Storage in distributed databases specifically includes:
[0079] 1) Shard by ship ID and timestamp combination key;
[0080] shard_id=hash(ID||[t / 24h])mod N shards ;
[0081] Where: shard_id is the ID of the target shard, ID is the unique identifier of the ship, [t / 24h] means the timestamp is rounded to 24 hours, N shards is the total number of shards in the distributed storage system; logs are distributed to different shards based on ship ID and timestamp, ensuring that data is evenly distributed and easy to retrieve.
[0082] 2) Write the log Merkle root hash to the public chain every 24 hours;
[0083]
[0084] Where: Blockchain_Tx is the transaction record on the blockchain, commit writes the Merkle root hash value into the blockchain, MerkleRoot is the root hash value of the Merkle tree, Logi is the content of the i-th log, Hash(Log i ) is a hash set of log entries; the Merkle root hash of the log data is written to the blockchain every 24 hours to ensure the immutability and transparency of the data.
[0085] 3) Each shard stores three copies, meeting data integrity standards. Each shard stores three copies, improving the system's high availability and disaster recovery capabilities.
[0086] Hash signatures and blockchain technology ensure data integrity and immutability. Sharded storage and multi-copy strategies improve overall performance and disaster recovery capabilities.
[0087] D. Provide a visual audit interface to collect user correction records to optimize log generation rules and abnormal warning thresholds.
[0088] In step D, the optimization of the abnormal warning threshold is achieved through the threshold dynamic optimization algorithm, specifically:
[0089]
[0090] in, is the threshold value manually adjusted for the i-th time, is the new abnormal warning threshold after dynamic adjustment, w i is the weight of the ith adjustment, λ is the weight coefficient of the feedback term, and ΔR is the performance feedback term.
[0091] Implementation Process
[0092] 1) Collect user feedback;
[0093] Provides a visual audit interface that allows users to view logs and abnormal warning records generated by the system.
[0094] Users can manually adjust the warning threshold according to actual conditions and assign a weight w to each adjustment. i .
[0095] 2) Computational performance feedback;
[0096] Calculate the performance feedback term ΔR based on historical operation data or real-time monitoring data.
[0097] ΔR = correct warning rate - false alarm rate;
[0098] 3) Dynamically adjust the threshold;
[0099] Use the formula to calculate the new abnormal warning threshold.
[0100] Update the configuration to Used for subsequent anomaly detection.
[0101] 4) Continuous optimization: As user feedback and system performance data accumulate, the threshold optimization process is continuously iterated.
[0102] A device for automatically recording a navigation log comprises a data collection and preprocessing module, a real-time stream processing and intelligent analysis module, a log generation and secure storage module, and a user interaction and adaptive optimization module. The data collection and preprocessing module is used to preprocess acquired ship status data, hydrological and meteorological data, and external data. The real-time stream processing and intelligent analysis module uses a streaming engine to analyze ship status data and meteorological data in real time and issues abnormal event warnings based on a machine learning model. The log generation and secure storage module extracts relevant data according to standard timing to generate log entries, and automatically generates additional logs when abnormal events are detected. The logs are signed using a hash function and stored in a distributed database. The user interaction and adaptive optimization module provides a visual audit interface and collects user correction records to optimize log generation rules and abnormality warning thresholds.
[0103] To demonstrate the technical effects of the present invention, the LSTM model training results include:
[0104] Dataset: Maritime historical accident data (5000+ anomaly events annotated);
[0105] Model performance: Accuracy 92.4%;
[0106] Recall: 89.7%; F1-Score: 90.5%
[0107] Compared to the baseline, the traditional statistical method (3σ rule) has an F1-Score of only 72.3%. This indicates that the method and device for automatically recording logbooks significantly outperforms traditional logbook systems in core metrics such as real-time performance (Flink stream processing latency <50ms), accuracy (LSTM model F1-Score 90.5%), reliability (sharded storage recovery time <3s), and compliance (100% blockchain tamper-proofing).
[0108] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for automatically recording a logbook, characterized in that: include: A. Preprocess the acquired ship status data, hydrological and meteorological data, and external data; B. Use a streaming processing engine to analyze ship status data and weather data in real time, and issue warnings for abnormal events based on machine learning models; C. Generate log entries based on standard timing extraction of relevant data. Automatically generate additional logs when abnormal events are detected. Sign the logs using a hash function and store them in a distributed database. D. Provide a visual audit interface to collect user correction records to optimize log generation rules and abnormal warning thresholds.
2. The method for automatically recording a logbook according to claim 1, wherein: Ship status data includes ship position, speed, course, draft and engine data; hydrological and meteorological data includes wind speed, wind direction, temperature and humidity data, radar data and satellite remote sensing data; external data includes weather forecasts, waterway dynamics and port information.
3. The method for automatically recording a logbook according to claim 2, characterized in that: Utilizing a streaming processing engine to analyze ship status data and meteorological data in real time, and providing early warnings for abnormal events based on machine learning models, the following are included: B1. Use Flink's sliding window mechanism to filter outliers. If |x t -μ W |>3σ W , it is marked as missing value and filled with interpolation; where: μ W is the mean value in the sliding window, σ W is the standard deviation within the sliding window; B2. Extract spatiotemporal features and meteorological correlation features. Spatiotemporal features include speed fluctuation and heading change rate, while meteorological correlation features include risk indicators. The calculation formula for speed fluctuation is: Where: V fluct is the speed fluctuation value, v t is the current speed, μ v,W is the mean speed in the sliding window, σ v,W is the standard deviation of ship speed within the sliding window; The calculation formula for heading change rate is: Where: θ t is the current heading angle, ΔT is the time interval, and Δθ is the heading change rate; The risk indicator formula is: Where: R is the risk index, which is used to quantify the navigation risk of the ship under the current meteorological conditions; It represents the longitudinal component of wind speed in the direction of ship heading, Indicates the component of wind speed in the transverse direction of the ship, v crit is the ship wind resistance level threshold, d safe is the safe lateral offset distance, α and β are weighting coefficients, and α and β are used to adjust the contribution ratio of the longitudinal and transverse wind speed components to the total risk respectively; B3. Input the spatiotemporal feature vector [speed fluctuation value, heading change rate] and the risk index R into the pre-trained LSTM anomaly detection model to obtain the output probability value P anomaly , according to the output probability value P anomaly Trigger a graded warning.
4. The method for automatically recording a logbook according to claim 3, wherein: Step C specifically includes: C1, using a fixed time window T log Periodic triggering, extracting data, and generating standard log entries; C2, when the abnormal probability P is detected anomaly When ≥0.7, additional logs are generated: C3. Use the SHA-256 algorithm to generate a unique digest of the log content and add a timestamp for encryption; Hash(Log) = SHA256(Log||t||ship_key); Where: Log is the log content, t is the timestamp of log generation, ship_key is the ship key, and |||| is the string concatenation operator.
5. The method for automatically recording a logbook according to claim 4, characterized in that: Storage in distributed databases specifically includes: 1) Shard by ship ID and timestamp combination key; shard_id=hash(ID||[t / 24h])mod N shards ; Where: shard_id is the ID of the target shard, ID is the unique identifier of the ship, [t / 24h] means the timestamp is rounded to 24 hours, N shards is the total number of shards in the distributed storage system; 2) Write the log Merkle root hash to the public chain every 24 hours; Where: Blockchain_Tx is the transaction record on the blockchain, commit writes the Merkle root hash value into the blockchain, MerkleRoot is the root hash value of the Merkle tree, Logi is the content of the i-th log, Hash(Log i ) is a hash set of log entries; 3) Each shard stores 3 copies to meet data integrity standards.
6. The method for automatically recording a logbook according to claim 5, characterized in that: In step D, the optimization of the abnormal warning threshold is achieved through the threshold dynamic optimization algorithm, specifically: in, is the threshold value manually adjusted for the i-th time, is the new abnormal warning threshold after dynamic adjustment, w i is the weight of the i-th adjustment, λ is the weight coefficient of the feedback term, and ΔR is the performance feedback term.
7. A device using the method of automatically recording a logbook according to claim 6, characterized in that: It includes a data collection and preprocessing module, a real-time stream processing and intelligent analysis module, a log generation and secure storage module, and a user interaction and adaptive optimization module. The data collection and preprocessing module is used to preprocess the acquired ship status data, hydrological and meteorological data, and external data; the real-time stream processing and intelligent analysis module uses a stream processing engine to analyze ship status data and meteorological data in real time, and issues abnormal event warnings based on machine learning models; The log generation and security storage module extracts relevant data according to standard timing to generate log entries, and automatically generates additional logs when abnormal events are detected, signs the logs using a hash function, and stores them in a distributed database; The user interaction and adaptive optimization module provides a visual audit interface and collects user correction records to optimize log generation rules and abnormal warning thresholds.