Track optimization method and device for multi-source data fusion of coastal defense

By assigning AIS data identifiers to radar data and performing data matching, merging, and rolling time window processing, the limitations of AIS and radar in ship monitoring are resolved, achieving high-precision and high-reliability dynamic monitoring of ships at sea.

CN120873071BActive Publication Date: 2025-12-30BEIJING TAIJI INFORMATION SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511376761.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-12-30
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

In existing technologies, AIS and radar each have their limitations in ship monitoring. AIS is subject to the risk of being turned off or tampered with, and its signal stability is insufficient. Radar lacks target identification information, which can lead to data loss or identification errors, making it difficult to build a high-precision and high-reliability dynamic monitoring system for ships at sea.

Method used

By acquiring AIS and radar data, assigning a unified identifier to both radar and AIS data, performing data matching, merging, grouping, and rolling time window processing, and combining this with Kalman filtering algorithm for trajectory optimization, perfect data fusion is achieved.

Benefits of technology

It achieves the fusion of high-precision location details of AIS data and radar data with ship identity, speed and heading information, improving the safety and accuracy of ship navigation and management, and overcoming the limitations of a single data source.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873071B_ABST
    Figure CN120873071B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a track optimization method and device for edge sea defense multi-source data fusion, through matching operations of AIS data and radar data, the radar data is given a uniform identifier with the AIS data, the identifier runs through the subsequent processing flow of the method, solves the problem of chaotic target identity information in the traditional monitoring means, meanwhile, the method realizes perfect fusion of AIS data and radar data through steps of merging data, grouping, rolling time window and track fusion, the method has key information such as ship identity, speed and heading brought by AIS data, and also has high-precision position details brought by radar data, overcomes the limitation of single data source, can accurately track the driving path of the work ship, and improves the safety of ship navigation in the context of ship navigation and management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, specifically to a trajectory optimization method and apparatus for fusing multi-source data from border and coastal defense. Background Technology

[0002] With the booming development of the marine economy, the maritime shipping industry is becoming increasingly busy, and ship traffic continues to rise. Against this backdrop, efficient and accurate maritime vessel monitoring technology has become a key support for ensuring maritime traffic safety, optimizing shipping management, and improving the efficiency of marine resource development and utilization.

[0003] Currently, Automatic Identification Systems (AIS) are widely used in ship monitoring. AIS can automatically broadcast static information (such as the ship's unique identifier MMSI, name, and type) and dynamic data (such as the ship's real-time position (latitude and longitude), speed, and heading) to surrounding vessels and shore-based base stations. Its advantage lies in providing rich details about a ship's identity and navigation status, which can assist in maritime traffic management, collision prevention, and maritime search and rescue operations. However, AIS also has some limitations. For example, ships need to actively and correctly turn on and maintain the normal operation of AIS equipment. There is a risk of intentionally turning off or tampering with AIS information. Furthermore, in complex marine environments (such as when there is strong signal interference or the ship is in a geographically obstructed area), the transmission stability of AIS signals may be affected, leading to data loss or untimely updates.

[0004] Meanwhile, radar also plays a crucial role in maritime surveillance. Radar detects information such as a ship's position and speed by emitting electromagnetic waves and receiving reflected signals from targets. It is capable of operating around the clock and in all weather conditions, effectively monitoring ship movements even in poor visibility (such as fog or nighttime), thus compensating for some of the shortcomings of AIS. However, radar itself faces challenges. For example, radar data often lacks target identification information, providing only limited data such as position and speed, making it difficult to directly determine the ship's specific identity, type, and navigational intentions. Furthermore, radar is affected by its own physical characteristics and environmental factors, including clutter interference and target obstruction, which may lead to target identification errors or omissions.

[0005] To fully integrate the advantages of both AIS and radar ship monitoring technologies and overcome their respective shortcomings, AIS and radar data fusion technology has emerged. This technology, through specific processing procedures and algorithms, organically integrates the rich ship identification and navigation status information provided by AIS with the real-time ship position and motion information monitored by radar. Its aim is to build a more accurate, continuous, and complete dynamic monitoring system for maritime vessels, meeting the increasingly complex requirements for high precision and reliability in maritime traffic safety supervision, marine resource protection, and marine development activities. Summary of the Invention

[0006] To address the problems in existing technologies, this application provides a trajectory optimization method and device for multi-source data fusion in border and coastal defense, which integrates AIS information and radar information to build a more accurate, continuous, and complete dynamic monitoring system for ships at sea, meeting the high precision and high reliability requirements of ship monitoring.

[0007] To solve at least one of the above problems, this application provides the following technical solution:

[0008] Firstly, this application provides a trajectory optimization method based on multi-source data fusion for border and coastal defense, including:

[0009] Acquire AIS data and Radar data; find the AIS data that matches the Radar data through trajectory recognition, and replace the temporary identifier of the Radar data with the identifier of the matching AIS data;

[0010] The AIS data and the Radar data are merged into a unified data stream; before merging, unmatched Radar data is filtered out; the data is grouped according to the fields of the identifier to form multiple sub-data streams, each of which belongs to the same target.

[0011] Each sub-data stream is divided into windows using a rolling time window. For the AIS data and Radar data sets within the time window corresponding to each identifier, fusion processing is performed according to the following rules: If the data contains only AIS data, the latest AIS data within the time window is directly selected as the fusion result; if the data contains only Radar data, the average value of all Radar data within the time window is calculated and used as the fusion result; if both AIS data and Radar data exist, the fusion result is selected according to a pre-configured priority strategy: if AIS is prioritized, the latest AIS data is used; if Radar is prioritized, the average value of the Radar data is used.

[0012] Furthermore, after the steps of acquiring AIS data and Radar data, the method further includes:

[0013] Convert AIS data into a unified Trace object format, which includes identifier, timestamp, latitude and longitude, and speed fields;

[0014] Radar data is converted into a unified Trace object format, and the structure of this object is consistent with that of the Trace object of AIS data; for Radar data that has already matched the AIS target, the corresponding identifier is directly assigned to it during conversion.

[0015] Furthermore, the step of finding AIS data that matches the Radar data through trajectory recognition includes:

[0016] The AIS interpolated data is stored in the corresponding spatial index according to its geographic region. When it is necessary to find AIS data that is adjacent to the Radar data, the geographic region where the Radar data is located and the surrounding potentially related regions are first determined, and then the AIS data is retrieved in the spatial index of these regions.

[0017] It also includes: extracting dynamic feature information from AIS data and Radar data, the dynamic feature information including speed and heading, and performing data matching in combination with distance; assigning corresponding weights to each feature, calculating a matching score based on the similarity of the features, and determining whether AIS data and Radar data belong to the same target based on the matching score.

[0018] Furthermore, the step of merging the AIS data and the Radar data into a unified data stream includes:

[0019] Set corresponding metadata fields for AIS data and Radar data; assign values ​​to these metadata fields according to the data source; use these values ​​as priority tags for the data, and when it is necessary to select or make a comprehensive decision between AIS data and Radar data, prioritize the data with higher priority.

[0020] Furthermore, the step of grouping data according to the identifier field to form multiple sub-data streams, each sub-data stream belonging to the same target, includes:

[0021] Establish a target state machine and set state attributes for each identifier, including active, inactive, and lost; periodically check the update time of each target; if a target has no new data updates within a set time period, change its state from active to inactive and remove the relevant data of that target.

[0022] It also includes: within the same time window, when the Radar data of multiple targets match the same AIS target, recording and statistically analyzing the matching relationship between the Radar data of each target and the AIS target, counting the number of matches for each target, and selecting the target with the most matches and the highest matching confidence as the final matching result.

[0023] Furthermore, the step of dividing each sub-data stream into windows using a rolling time window includes:

[0024] Analyze the speed information of each target and dynamically adjust the length of the time window for the corresponding target based on the speed.

[0025] For Radar data, within the time window, each new data point is added to the sum variable and the count variable is incremented; when the window is triggered, the average value is calculated directly from the sum and the count.

[0026] Furthermore, the step of performing the fusion process according to the following rules includes:

[0027] The system monitors the signal strength of AIS and the signal-to-noise ratio of radar in real time, and dynamically adjusts the priority of AIS data and radar data based on the comparison between the current value of the signal quality index and the set threshold: if the AIS signal strength is lower than the threshold, it automatically switches to radar priority mode.

[0028] Also includes:

[0029] The motion state of each target is modeled and predicted using the Kalman filter algorithm. When a cross-scene is detected, the fusion result is corrected based on the current motion state of the target and the predicted position of the next time point.

[0030] Secondly, this application provides a trajectory optimization device for multi-source data fusion in border and coastal defense, comprising:

[0031] The data acquisition module is used to acquire AIS data and Radar data; to find the AIS data that matches the Radar data through trajectory recognition, and to replace the temporary identifier of the Radar data with the identifier of the matching AIS data;

[0032] The data processing module is used to merge the AIS data and the Radar data into a unified data stream; before merging, it filters out unmatched Radar data through a filtering operation; and it performs grouping operations according to the fields of the identifier to form multiple sub-data streams, each of which belongs to the same target.

[0033] The data fusion module is used to divide each sub-data stream into windows using a rolling time window. For the AIS data and Radar data sets within the time window corresponding to each identifier, fusion processing is performed according to the following rules: If the data contains only AIS data, the latest AIS data within the time window is directly selected as the fusion result; if the data contains only Radar data, the average value of all Radar data within the time window is calculated and used as the fusion result; if both AIS data and Radar data exist, the fusion result is selected according to a pre-configured priority strategy: if AIS is prioritized, the latest AIS data is used; if Radar is prioritized, the average value of the Radar data is used.

[0034] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the trajectory optimization method for multi-source data fusion in border and coastal defense.

[0035] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the trajectory optimization method for multi-source data fusion in border and coastal defense.

[0036] Fifthly, this application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the trajectory optimization method for multi-source data fusion in border and coastal defense.

[0037] As can be seen from the above technical solution, this application provides a trajectory optimization method and device for multi-source data fusion in border and coastal defense. By matching AIS data and radar data, a unified identifier is assigned to the radar data, which is consistent with the AIS data. This identifier runs through the subsequent processing flow of this method, solving the problem of confusing target identity information in traditional monitoring methods. At the same time, this method achieves perfect fusion of AIS data and radar data through steps such as data merging, grouping, rolling time windows, and trajectory fusion. This method has both the key information such as ship identity, speed and heading from AIS data and the high-precision position details from radar data, overcoming the limitations of a single data source. It can accurately track the sailing path of operating vessels, thereby improving the safety of ship navigation in situations such as ship navigation and management. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating the trajectory optimization method for multi-source data fusion in border and coastal defense as described in this application embodiment;

[0040] Figure 2 This is a schematic diagram of the three main processes of the trajectory optimization method for multi-source data fusion in border and coastal defense in the embodiments of this application;

[0041] Figure 3 This is a schematic diagram of the cubic spline interpolation method for trajectory optimization through multi-source data fusion in the embodiments of this application.

[0042] Figure 4 This is a schematic diagram of trajectory association for the trajectory optimization method of multi-source data fusion for border and coastal defense in the embodiments of this application;

[0043] Figure 5 This is a schematic diagram of the AIS data processing flow of the trajectory optimization method for multi-source data fusion in border and coastal defense in the embodiments of this application;

[0044] Figure 6 This is a schematic diagram of the radar data processing flow of the trajectory optimization method for multi-source data fusion in border and coastal defense embodiments of this application;

[0045] Figure 7 This is a schematic diagram of the data fusion process of the trajectory optimization method for multi-source data fusion in border and coastal defense embodiments of this application;

[0046] Figure 8 This is a structural diagram of the trajectory optimization device for multi-source data fusion in border and coastal defense, as described in this application embodiment.

[0047] Figure 9 This is a schematic diagram of the structure of the electronic device in the embodiments of this application.

[0048] Figure label:

[0049] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver storage unit 9144, antenna 9111, speaker 9131, microphone 9132. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.

[0052] In view of the problems existing in the prior art, this application provides a trajectory optimization method and device for multi-source data fusion in border and coastal defense. By matching AIS data and radar data, a unified identifier is assigned to the radar data, which is consistent with the AIS data. This identifier runs through the subsequent processing flow of the method, solving the problem of confusing target identity information in traditional monitoring methods. At the same time, the method achieves perfect fusion of AIS data and radar data through steps such as data merging, grouping, rolling time windows, and trajectory fusion. The method has both the key information such as ship identity, speed and heading from AIS data and the high-precision position details from radar data, overcoming the limitations of a single data source. It can accurately track the travel path of operating vessels, thereby improving the safety of ship navigation in situations such as ship navigation and management.

[0053] To integrate AIS and radar information and construct a more accurate, continuous, and complete maritime vessel dynamic monitoring system that meets the high precision and reliability requirements of vessel monitoring, this application provides an embodiment of a trajectory optimization method based on multi-source data fusion for border and coastal defense. See [link to embodiment]. Figure 1 , Figure 2 As shown, the trajectory optimization method for multi-source data fusion in border and coastal defense specifically includes the following:

[0054] Step S101: Acquire AIS data and Radar data; find the AIS data that matches the Radar data through trajectory recognition, and replace the temporary identifier of the Radar data with the identifier of the matching AIS data.

[0055] Optional, see reference Figure 5As shown in this embodiment, the AIS data processing module connects to the Kafka message queue through the Apache Flink Kafka consumer API, subscribes to the corresponding AIS data topic, and receives raw AIS data transmitted in NMEA format in real time. Each data entry contains multi-dimensional ship status information, including the ship's MMSI (Maritime Mobile Service Identifier), precise latitude and longitude information, timestamp, and heading.

[0056] For example, you can use the programming library provided by Kafka to initialize a consumer object in your code, set the connection parameters and subscribed topics, and then continuously pull new messages through a loop. For instance, using the kafka-python library in Python, you can create a KafkaConsumer instance, specify parameters such as bootstrap_servers and topic, start a loop, and call the poll() method each time to retrieve a batch of messages; these messages are the raw AIS data.

[0057] During actual navigation, ships may generate erroneous AIS data due to various reasons such as equipment failure and signal interference. If these abnormal data are not cleaned, they will seriously interfere with subsequent ship trajectory analysis, fusion and other processing, leading to incorrect decision-making results. Therefore, it is necessary to filter out data that is obviously inconsistent with actual geography and navigation common sense.

[0058] Optionally, in this embodiment, the longitude, latitude, and heading fields in the received AIS data records are checked one by one by the first data cleaning operator. For longitude, it is determined whether it is within the range of -180° to +180°; for latitude, it is determined whether it is between -90° and +90°; and for heading, it is checked whether it is within the range of 0° to 360°. If it is outside the range, the data is considered abnormal and is filtered out, retaining only the normal data that meets the range requirements.

[0059] For example, corresponding logical conditional statements can be written in the code, such as using an if-else structure to determine whether the longitude, latitude, and heading meet the conditions. For instance, for the longitude field, if longitude < -180 or longitude > 180, it is marked as abnormal data. The same logic is applied to the latitude and heading fields. The data that meet the conditions are grouped into a new data stream, which is then output as the cleaned AIS data stream.

[0060] Continue to refer to Figure 5As shown, different data sources may use different data formats and identification methods. For example, AIS data has its own original data format, while subsequent radar data may have different representations. Therefore, this embodiment extracts the MMSI information from each cleaned AIS data entry using a first standardization operator, using it as the unique identifier of the ship and assigning a corresponding target-id (identifier). Then, the AIS data is converted into a unified Trace object format, which includes key fields such as target-id, timestamp, latitude and longitude, and speed, achieving data format standardization and facilitating unified processing of data from different sources by subsequent modules.

[0061] For example, a Trace class or data structure can be defined at the code level, containing the fields specified above. Then, a function or method can be written to populate the relevant information from each piece of cleaned AIS data received according to the specified fields, generating a Trace object instance. For instance, the MMSI field can be directly assigned to the target-id field; the original timestamps in the AIS data can be formatted and standardized to a standard time format before being assigned to the timestamp field of the Trace object; similar conversions and assignments can be performed on other fields such as latitude and longitude.

[0062] In this embodiment, through standardization, various types of data can be converted into a unified Trace object format and assigned a unique target-id. This enables data from different sources to be accurately identified, associated, and processed in subsequent processing, improving the accuracy and efficiency of data fusion and analysis.

[0063] refer to Figure 3 , Figure 5 As shown, since AIS data is typically reported by ships at regular time intervals (e.g., every few minutes), this results in discontinuities in ship trajectories over time, making it difficult to accurately reflect the ship's true motion state. This is especially problematic during trajectory matching and fusion, potentially affecting the accuracy of the results. Therefore, this embodiment uses a first data interpolation operator to interpolate the AIS data. For non-interpolated AIS data sequences corresponding to the same target-id, they are arranged in timestamp order. Then, a time window (e.g., 1 hour) is selected, and a cubic spline interpolation algorithm is applied to the data points within this window to generate continuous trajectory data at 1 point per second. This compensates for the excessively large time intervals in the original data caused by factors such as the reporting intervals of ship AIS devices. After interpolation, the interpolated data is categorized by target-id and stored in a Redis cache database for quick access and use by the subsequent trajectory recognition module.

[0064] For example, the data can first be grouped by target-id, and then the data within each group can be sorted by timestamp. Next, the size of the time window is determined, and the timestamps and corresponding latitude and longitude coordinates of the data points are extracted within each window. Using a cubic spline interpolation algorithm (e.g., the `interpolate.splrep` and `interpolate.splev` functions from the scipy library in Python), an interpolation function is generated based on the original data points, and then interpolation calculations are performed over 1-second time intervals to obtain the new trajectory point data. This interpolated data is stored with target-id as the key. A Redis hash structure or other suitable data structure can be used to store multi-field interpolated data for easy and fast subsequent queries and updates.

[0065] In this embodiment, data interpolation can generate denser and more continuous trajectory points in time, describing the ship's motion trajectory in more detail. This provides a higher quality data foundation for subsequent accurate matching and fusion with radar data, while also improving the temporal resolution of the entire trajectory analysis system, making the monitoring and prediction of ship dynamics more timely and accurate.

[0066] Optional, see reference Figure 6 As shown in this embodiment, similar to the AIS Source, the Radar data processing module connects to the corresponding radar data topic in the Kafka message queue through the Kafka consumer Apache Flink API to receive raw radar data. This radar data mainly includes point coordinates (usually in polar coordinates, such as rectangular coordinates converted from distance, azimuth, etc.), timestamps, and reflection intensity, which are used to describe the location and related characteristics of the target detected by the radar in space.

[0067] For example, you can use the Kafka consumer programming library in your code, set up the connection parameters and the radar data topic you want to subscribe to, and start a consumption loop to continuously pull radar data messages from Kafka. For instance, using the KafkaConsumer class in Java, you can configure parameters such as bootstrap.servers and group.id, call the subscribe() method to subscribe to the radar data topic, and then call the poll() method in a while loop to get message batches, thereby obtaining the raw radar data.

[0068] During radar detection, various factors such as sea clutter and electromagnetic interference can interfere with the generation of erroneous target tracking information. Failure to eliminate this invalid data will affect the subsequent matching and fusion with AIS data, reducing the overall system's accuracy in identifying and tracking maritime targets. Therefore, cleaning radar data is a crucial step in ensuring data quality.

[0069] Optionally, in this embodiment, the received radar data is cleaned using a second data cleaning operator, primarily checking the validity of the latitude and longitude information of the points. Based on geographical knowledge, it is determined whether the longitude is between -180° and +180° and the latitude is between -90° and +90°. At the same time, obviously erroneous or invalid point data, such as coordinates of zero point zero or other unreasonable values, are removed, thereby obtaining relatively clean and reliable radar data for subsequent processing.

[0070] For example, during code implementation, a function can be written to check the latitude and longitude fields in the radar data one by one. For instance, a conditional statement such as if (radar_longitude<-180 || radar_longitude>180 || radar_latitude<-90 || radar_latitude>90 || (radar_longitude == 0&&radar_latitude == 0)) can be used to consider the radar point as invalid data and filter it out; otherwise, it is retained as valid data and output to subsequent modules.

[0071] Continue to refer to Figure 6 As shown, this embodiment uses a second standardization operator to convert the cleaned radar data into a unified Trace object format, consistent with the Trace object structure of AIS data. For radar data that has already matched AIS targets (the corresponding target-id can be determined through historical matching relationships), the corresponding target-id is directly assigned during conversion; while for unmatched radar data, no target-id is assigned temporarily, and a Trace object without a target-id is generated.

[0072] For example, a class or data structure identical to the AIS Trace object can be defined to store radar data, and a conversion function can be written. In the function, it first checks whether the radar data has a corresponding target-id in historical matching records (this can be done by querying local cache or database matching records). If it exists, the corresponding target-id is filled into the target-id field of the Trace object; if it does not exist, the field is left blank for now. Then, the timestamp, latitude and longitude, reflection intensity, and other information from the radar data are filled into the corresponding fields of the Trace object to complete the standardization conversion.

[0073] Converting radar data into a unified Trace object format enables data from different sources to have the same interface and data structure in subsequent processing, facilitating unified processing and fusion operations. Simultaneously, assigning a target-id to matched radar data allows for rapid association with corresponding ship targets, improving processing efficiency; while unmatched radar data requires subsequent matching through trajectory recognition and other steps. This differentiated processing approach helps to better manage radar data in different states, improving the accuracy and performance of the entire data fusion system.

[0074] Optionally, in this embodiment, Redis sends the interpolated data back to the data interpolation operator to ensure the continuity of data interpolation. For example, in AIS data processing, the first data interpolation operator needs to perform batch interpolation on data within a certain period (e.g., 1 hour). However, the actual data stream arrives continuously, and new data needs to be combined with historical interpolation results to generate a seamless, continuous trajectory. For instance, when processing data within the current time window (e.g., 10:00-11:00), the interpolation operator needs to read the interpolation results from 9:00-10:00 in Redis to ensure the continuity of the trajectory on the timeline.

[0075] Meanwhile, this design avoids redundant calculations and optimizes performance. If each interpolation requires reprocessing the entire dataset, the computational overhead is enormous. Caching historical interpolation results in Redis significantly reduces redundant calculations. Redis's role is to cache already interpolated data; the interpolation operator only needs to process new data and merge it with historical data, improving efficiency. For example, when batch interpolating AIS data hourly, only the newly arrived 1-minute data needs to be processed, rather than recalculating the entire 1-hour window.

[0076] Optionally, in this embodiment, Redis sends the matched data (radar target-id to target-id) to the second normalization operator to replace the temporary identifier of the Radar data, directly assigning it the corresponding identifier during the conversion. The purpose of this design is that, in this embodiment, the core responsibility of the trajectory recognition operator is to calculate trajectory matching, which is an algorithm-intensive module. If it replaces the temporary ID, it would violate the single responsibility principle and increase the computational load. The core responsibility of the normalization operator is data format conversion and identifier management, a state-intensive module, which is naturally suitable for maintaining dynamic identifier mappings. If the ID is replaced in the trajectory recognition operator, subsequent data must wait for the previous match to complete, causing a delay. Replacing it in the normalization operator eliminates the feedback delay and improves the data flow speed.

[0077] Meanwhile, the standardized operator serves as the sole entry point for the radar data stream, maintaining a full radar-target-id → target-id mapping table to ensure all data is uniformly identified at the entry point. If this mapping is distributed across trajectory recognition operators, inconsistencies in mapping states during parallel execution of multiple instances necessitate distributed locks, increasing latency. Ship radar reflection points are often covered by overlapping radar coverage; a unified ID at the entry point prevents subsequent modules from receiving duplicate data, making subsequent window calculations more accurate.

[0078] Furthermore, replacing the temporary ID in the trajectory recognition operator would compromise the idempotency of the data stream and cause subsequent processing modules to receive inconsistent data versions. Worse still, if the matching logic needs modification, the entire system must be shut down for an update. Standardized operator replacement also provides error isolation; if a matching error occurs, it only affects a small amount of data. In contrast, incorrect replacement in the trajectory recognition operator scheme would pollute the entire data stream, requiring an additional backtracking and cleaning mechanism.

[0079] This design also enhances the system's scalability. When adding new data sources (such as satellite data), only the mapping logic of the standardized operator needs to be extended, without modifying the core trajectory recognition algorithm. The standardized operator also provides a unique state observation point to monitor the size and update frequency of the mapping table and to statistically analyze the proportion of unmatched targets in real time. In contrast, if state management is mixed into the trajectory recognition operator, it becomes difficult to distinguish between algorithm errors and state errors.

[0080] For example, this embodiment provides a scenario example of a ship suddenly activating AIS:

[0081] Initial state, radar tracks target radar-target-id: R888 (no target-id).

[0082] After AIS is enabled, the trajectory recognition operator is successfully matched, R888→T100 is established, and Redis pushes the mapping to the standardized operator.

[0083] Subsequent processing: In the standardized operator, new radar data is directly labeled with target-id: T100. The trajectory recognition operator no longer receives R888 data (because it already contains the correct ID).

[0084] The advantage of this design is that the fusion module can immediately identify a known vessel, avoiding false alarms about new targets.

[0085] refer to Figure 3 , Figure 6 As shown, since the unmatched radar data may correspond to new ship targets or other unidentified targets, the data of these targets also need to be interpolated to form a continuous trajectory. In this way, in the subsequent trajectory identification process, it can be more accurately matched with the AIS interpolated trajectory, thereby identifying new ship targets or determining the movement of unknown targets.

[0086] In this embodiment, the second data interpolation operator extracts the timestamps and corresponding coordinate information of unmatched radar data (i.e., data without a target-id), and arranges them in chronological order. Within a set time window (e.g., 1 hour), a suitable interpolation algorithm (such as linear interpolation or spline interpolation) is used to generate a continuous trajectory of 1 point per second to form a relatively complete radar target motion trajectory. After interpolation, these data are stored in a Redis cache with the key "radar-target-id" (temporary identifier) ​​so that subsequent trajectory recognition operators can quickly access and use these data for matching operations.

[0087] For example, unmatched radar data can be sorted by timestamp and the time window size determined. For each unmatched radar target, the original data points are extracted within the time window, and then an appropriate interpolation algorithm is selected for interpolation calculation. For instance, in Python, a simple linear interpolation function can be used to calculate the coordinate values ​​of intermediate time points based on the time and coordinates of the original data points. When storing the generated interpolated data, a temporary radar-target-id can be generated for each unmatched radar target, serving as the key in Redis. A hash structure is used to store information such as the coordinates of each time point, facilitating subsequent updates and queries.

[0088] This embodiment improves the temporal resolution of radar data through interpolation, making radar trajectories and AIS trajectories more comparable in the time dimension, thereby enhancing the entire data fusion system's ability to detect and identify maritime targets.

[0089] Optionally, in order to align the data points of AIS interpolation data with those of Radar interpolation data, in this embodiment, an external trigger signal can be set to make the AIS and radar devices start recording data simultaneously every whole second. For example, at 12:00:00.000, all devices synchronously start data acquisition, and during data recording, the AIS data and Radar data are forcibly aligned to a fixed time grid (such as one point per second).

[0090] Furthermore, AIS and Radar data of the same physical event (such as ship horn sounds or lighthouse signals) can be aligned as reference events. The timestamp deviation between the two can be calculated, and cross-correlation analysis can be used to perform time sliding window matching on the trajectory data of AIS and radar to find the time offset corresponding to the maximum correlation. If a continuous clock drift between devices is detected (e.g., 1 second slower per day), offset compensation is automatically added to the data processing pipeline. For example, if radar data is detected to be 0.5 seconds slower than AIS data overall, a 0.5-second correction is added to all radar timestamps during processing.

[0091] Optional, see reference Figure 4 , Figure 6 As shown, in this embodiment, the trajectory recognition operator retrieves all AIS interpolation data and currently unmatched radar interpolation data from Redis. For each radar interpolation target (identified by radar-target-id), the distance between its trajectory and each AIS trajectory is calculated using the Haversine formula. The calculated distance is compared with a set threshold (e.g., 100 meters). If the distance is less than the threshold, the radar target is considered to have successfully matched the corresponding AIS target. The successfully matched radar data is assigned a corresponding target-id, and the updated matching relationship (the mapping between radar-target-id and target-id) is saved to Redis and the MySQL database to ensure the persistence and fast access of the matching relationship. At the same time, the matched radar interpolation data is deleted from Redis to avoid duplicate processing. The newly matched target-id and radar-target-id mapping relationship is fed back to the second normalization operator in real time so that subsequently received radar data can be assigned the correct target-id in a timely manner according to the latest matching relationship.

[0092] For example, in terms of code implementation, a function can first be written to read AIS interpolation data and unmatched radar interpolation data from Redis. Then, for each radar interpolation target, the AIS interpolation targets are iterated through, and the Haversine formula is applied to calculate the shortest distance or average distance between the two trajectories in space (depending on the matching strategy used). For example, for each point in the radar and AIS trajectories, the distance corresponding to its latitude and longitude is calculated, the minimum distance is found, and it is determined whether it is less than a threshold. If a match is successful, the corresponding radar-target-id record in Redis is updated, and the target-id information is added; at the same time, the new matching relationship is inserted into the matching relationship table in the MySQL database. For the matched radar interpolation data, a Redis delete command is executed to remove it from the cache. In addition, the new target-id and radar-target-id mapping relationship is sent through a message queue or by directly calling the relevant interface of the second normalization operator, updating its internal matching relationship record.

[0093] Trajectory recognition is a crucial step in the data fusion process. It matches radar trajectories with AIS trajectories, associating unknown targets detected by radar with known AIS ship targets, thus achieving comprehensive identification and tracking of maritime targets. The Haversine formula accurately calculates the distance between two points on the Earth's surface. The distance threshold-based matching method is simple and effective, quickly filtering out potentially matching target pairs. Storing the matching relationships in Redis and MySQL ensures fast access during processing (due to Redis's in-memory storage) and guarantees the ability to restore historical matching relationships from MySQL after system restarts or other failures, ensuring the continuity and accuracy of data fusion. Simultaneously, a feedback mechanism allows newly received radar data to be promptly assigned target-ids based on the latest matching information, improving the automation and real-time performance of the entire system.

[0094] Optionally, in this embodiment, the Haversine formula is used to calculate the distance between two points on the Earth's surface. That is, the formula for calculating the distance between the Radar interpolation data of each Radar target and the respective AIS interpolation data in this embodiment is:

[0095]

[0096] in, It is the distance between two points on the sphere (the shortest distance along the great circle). It is the radius of the sphere (the average radius of the Earth is approximately 6,371 km). , Latitude (in radians) is the distance between two points on a sphere. and Longitude (in radians) is the distance between two points on a sphere. The difference in latitude between two points on a sphere. , The difference in longitude between two points on the sphere. .

[0097] Specifically, the derivation process of this formula is as follows:

[0098] For any two points on a sphere, the semi-versus of the central angle can be calculated using the following formula:

[0099]

[0100] Where, hav is an abbreviation for the semi-versus function:

[0101]

[0102] d is the distance between the two points (along a great circle, see spherical distance), r is the radius of the sphere, and the equals sign on the left is... It is the central angle, measured in radians.

[0103] d can be solved by applying the inverse half-vector function (if its value can be found) or by using the arcsine function:

[0104]

[0105] Substituting the values, we get:

[0106]

[0107] Optionally, to accelerate the matching speed, in this embodiment, the geographical area can be divided into multiple grids or a quadtree index structure can be used to store the AIS interpolated trajectory points in the corresponding spatial index according to their geographical area. When it is necessary to find AIS trajectory points adjacent to the radar point, the geographical area where the radar point is located and the surrounding potentially related areas are first determined, and then candidate AIS trajectory points are quickly retrieved from the spatial index of these areas.

[0108] For example, in RedisGeo, when using the GEORADIUS command, you can specify the latitude and longitude coordinates of the radar point and the search radius (e.g., 100 meters). This command will utilize Redis's internal spatial index structure to efficiently return all AIS trajectory points within this range, avoiding the need to compare all AIS trajectory points one by one, which greatly reduces computational complexity and time cost.

[0109] Optionally, in this embodiment, an environmental monitoring module can be established to collect information such as weather and sea conditions in real time, and adjust the distance threshold according to preset rules or models. For example, when the wind speed exceeds a certain threshold and the wave height is large, it is judged as a high-wind-wave scenario, and the distance threshold is increased accordingly. At the same time, a feedback mechanism is set up to automatically optimize the threshold parameters based on the historical matching success rate and false matching rate.

[0110] For example, a distance threshold configuration table corresponding to different environmental conditions can be stored in a configuration center (such as ZooKeeper), and the system can periodically or in real time pull the latest threshold parameters from the configuration center. Alternatively, a dynamic threshold adjustment model can be built based on historical matching data using machine learning algorithms, taking the current environmental characteristics and recent matching results as input, and outputting the optimal distance threshold.

[0111] Optionally, in this embodiment, dynamic feature information such as speed and heading can be extracted from AIS and radar data, and multi-feature matching can be performed by combining distance factors for comprehensive matching evaluation. Each feature is assigned a corresponding weight, and the matching score is calculated based on the similarity of the features to determine whether two trajectory points belong to the same target.

[0112] Optionally, in this embodiment, the matching relationships can also be backed up. When storing the matching relationships in MySQL, in addition to recording the matching relationship itself, version number and timestamp fields are added. Each time the matching relationship is updated, a new version number is generated and the current timestamp is recorded. When the system fails and needs to be recovered, the most recent valid matching relationship version is found based on the timestamp for recovery. Assuming that Redis crashes at a certain moment, the system filters the matching relationship records within the most recent hour based on the timestamps recorded in MySQL, and rebuilds the matching relationship cache in Redis in chronological order to ensure that data processing can continue based on the correct matching relationships after the system recovers.

[0113] Step S102: Merge the AIS data and the Radar data into a unified data stream; before merging, filter out unmatched Radar data through a filtering operation; group the data according to the fields of the identifier to form multiple sub-data streams, each of which belongs to the same target.

[0114] Optional, see reference Figure 7As shown, in this embodiment, the Union operator module receives non-interpolated AIS data (with target-id) output from the first data interpolation operator and non-interpolated radar data (matched portion) with target-id output from the second normalization operator in the radar processing flow. These two data portions are simply merged into a unified data stream, while filtering out unmatched radar data during the merging process, retaining only those data that have been successfully matched and have target-id.

[0115] For example, this can be implemented in code using merge operators provided by message queues or data stream processing frameworks (such as the union operator in Apache Flink). Two input data streams (AIS with target-id and radar with target-id) are taken as input and merged into a single data stream using the merge operator. Before merging, a filtering operation can be added to ensure that only matching (target-id) data from the radar stream enters the merging process. For example, in Flink, the filter operator is first applied to the radar data stream to filter out unmatched data, and then the filtered radar and AIS data streams are merged using the union operator.

[0116] In this embodiment, after the preceding processing, both AIS data and matched radar data share the same target-id, allowing them to be processed uniformly. The Union operator module integrates these data into a common data stream, providing a foundation for subsequent data grouping processing. This enables subsequent steps to consider information from both data sources simultaneously, further improving the efficiency and accuracy of data processing and achieving true data fusion.

[0117] Optionally, in this embodiment, corresponding metadata fields (such as source_priority) can be set for AIS data and radar data within the data stream processing framework. When data is generated or enters the processing flow, this field is assigned a value based on the data source; for example, AIS data is assigned a value of 0, and radar data is assigned a value of 1. Subsequent processing modules (such as trajectory fusion operators) can read this priority label. When a selection or comprehensive decision needs to be made between AIS and radar data, the information from the higher-priority data source is given priority, thereby improving the quality and reliability of the fusion results.

[0118] Optionally, in this embodiment, a buffer (such as a queue structure) can be set up before merging the data streams, allowing delayed data to enter the buffer within a certain time range (such as 1 second). Simultaneously, the timestamp information of the data is recorded, and during merging, the data in the buffer and the real-time data are merged together in chronological order.

[0119] For example, in Apache Flink, enabling the AllowedLateness configuration allows late data to enter the window for processing, and combines this with a watermark mechanism to control the processing of out-of-order data. The watermark is used to identify the time boundary of the data. Only when the delay time between the data's timestamp and the watermark is within an acceptable range is the data allowed to enter the subsequent processing flow, thereby effectively handling out-of-order data problems caused by network jitter and other reasons.

[0120] Optionally, in this embodiment, the unified data stream output by the Union operator module is grouped according to the target-id field using the KeyBy Target-id module. This way, the data corresponding to each target-id is aggregated into multiple independent data substreams, and the data points in each substream belong to the same target vessel, containing the vessel's AIS and radar trajectory information.

[0121] For example, you can use the keyBy operator (such as Flink's keyBy method) in a data stream processing framework to specify grouping by the target-id field. For instance, calling data_stream.keyBy("target_id") in the code, where data_stream is the data stream output by the Union operator, will partition the data according to the target-id. Subsequent processing of the data within each partition will then focus on the data corresponding to the same target-id.

[0122] In this embodiment, grouping by target-id allows for the aggregation of all data corresponding to each vessel (regardless of whether it originates from AIS or radar), facilitating subsequent independent processing and analysis for each vessel, such as trajectory analysis and status prediction. This grouping method improves the targeting and efficiency of data processing because subsequent processing of each vessel's data does not require sifting through a large amount of data; operations can be performed directly within the grouped data substreams. It also helps ensure the accuracy of the processing results and avoids confusion between data from different vessels.

[0123] Optionally, in this embodiment, a target state machine can be established to set state attributes (such as ACTIVE, INACTIVE, LOST) for each target-id. A scheduled task or an event-driven approach can be used to periodically check the update time of each target ID. If a target-id has no new data updates within a set time period (e.g., 30 minutes), its state is changed from ACTIVE to INACTIVE, and the data related to that target-id is removed from the current processing data stream.

[0124] For example, monitoring logic can be added to the data stream processing framework to update the last update time of the corresponding target-id whenever new data is received. Then, a timer can be used to iterate through the status and last update time of all target-ids at regular intervals, and the status of target IDs that have not been updated after the timeout can be updated and removed, thereby avoiding the system from processing invalid or outdated target data and saving system resources.

[0125] Optionally, in this embodiment, ID conflict resolution can be achieved as follows: Within the same time window, when multiple radar points match the same AIS target, the matching relationship between each radar point and the AIS target is recorded and statistically analyzed. The number of matches for each target-id is counted, and the target-id with the most matches and the highest match confidence is selected as the final matching result.

[0126] For example, within a time window, a counter can be maintained for each possible target-id. Whenever a radar point matches a target-id, the counter is incremented by 1. At the end of the window, the counter values ​​of each target-id are compared, and the target-id with the largest value is selected as the final matching result. If multiple target-ids have the same counter value, their matching scores (such as distance, feature similarity, etc.) are further compared to determine the final result.

[0127] Optionally, in this embodiment, a consistent hashing algorithm can be used to hash the target-id and map the hash value to a processing node. This ensures that the same target-id always maps to the same processing node, unless there are topology changes such as the addition or removal of processing nodes. During data distribution, the target-id is sent to the corresponding processing node based on its hash value.

[0128] Consistent hashing algorithms minimize data redistribution caused by changes in processing nodes. When the number of processing nodes changes, only a small number of target-ids need to be reassigned to processing nodes, while the processing nodes for most target-ids remain unchanged. This reduces cross-node communication overhead, improves system processing efficiency and the accuracy of state management, and enables the system to operate more stably and efficiently in a distributed environment.

[0129] Step S103: Divide each sub-data stream into windows using a rolling time window; for the AIS data and Radar data sets within the time window corresponding to each identifier, perform fusion processing according to the following rules: if the data contains only AIS data, directly select the latest AIS data within the time window as the fusion result; if the data contains only Radar data, calculate the average value of all Radar data within the time window and use it as the fusion result; if both AIS data and Radar data exist, select the fusion result according to the pre-configured priority strategy: if configured for AIS priority, use the latest AIS data; if configured for Radar priority, use the average value of the Radar data.

[0130] Optionally, in this embodiment, a rolling time window module is used to divide the data stream grouped by target-id obtained through the KeyBy operation into time windows. For example, a 5-second rolling time window is set, that is, the data is divided into windows every 5 seconds, and all data points (including AIS and radar trajectory points) within the window are aggregated together as a data set for output, which is used for subsequent trajectory fusion processing.

[0131] For example, in a data stream processing framework, a window operator can be used after keyBy to define a time window. For instance, in Flink, .window(TumblingProcessingTimeWindows.of(Time.seconds(5))) is used to create a 5-second rolling processing time window. In this way, for each target-id group of data streams, the system will automatically divide the window according to the set time interval and collect the data within the window for subsequent processing.

[0132] In this embodiment, by setting a time window, the target data for each vessel can be segmented and processed in the time dimension. This allows for data fusion and analysis within a limited time frame, promptly reflecting the vessel's motion status in the most recent time period, while also facilitating control over the frequency and load of data processing. The 5-second window setting ensures real-time data transmission, enabling subsequent operations such as trajectory fusion to quickly respond to changes in the vessel's status, thus supporting real-time monitoring and decision-making.

[0133] Optionally, in this embodiment, the speed information of each target can be parsed from the data stream, and the length of the time window for the corresponding target can be dynamically adjusted according to the speed. For example, a shorter time window (e.g., 3 seconds) can be set for high-speed ships to reflect their motion state changes more promptly; a longer time window (e.g., 10 seconds) can be set for low-speed ships to accumulate more data points for more accurate analysis.

[0134] For example, in the data stream processing framework, a state object is maintained for each target, containing the current speed information and the corresponding time window length. When new data arrives, the target's speed information is updated, and the time window length is recalculated according to preset rules. The window length adjustment information is sent to the window management module via the side output stream, which then divides and processes the data according to the new window length.

[0135] Optionally, in this embodiment, the ReduceFunction or AggregateFunction can be used to process and aggregate data line by line within the time window. For example, for radar point coordinate data, each time a new data point is received, its latitude and longitude values ​​are added to the sum variable, and the value of the count variable is increased. When the window is triggered, the average value is directly calculated based on the sum and count, without having to perform a one-time batch calculation on all data at the end of the window.

[0136] For example, an accumulator object can be defined in the code implementation, containing a sum of latitude and longitude and a count field. Whenever new radar data arrives, the method in ReduceFunction is called to add the new latitude and longitude values ​​to the corresponding fields of the accumulator and increment the count. In this way, when the window is triggered, the average coordinates of the radar points within the window can be obtained by simply dividing the sum of latitude and longitude in the accumulator by the count, reducing memory usage and computation time.

[0137] Optionally, in this embodiment, the trajectory fusion operator module performs fusion processing on the AIS and radar trajectory point sets within the time window corresponding to each target-id according to the following rules: If only AIS data is available, the latest AIS trajectory point within the time window is directly selected as the fusion result, because AIS data contains rich ship identity information, and using the latest data can ensure the timeliness of the identity information; if only radar data is available, the average value of the coordinates of all radar points within the time window is calculated, and this is used as the high-precision position information after fusion. The averaging method can reduce noise interference in radar data and improve position accuracy; if both AIS and radar data exist, the fusion result is selected according to a pre-configured priority strategy. If AIS is configured as priority, the latest AIS data is used; if radar is configured as priority, the average value of radar points is used. In addition, the priority can be adjusted in real time according to dynamic factors such as the position of the target distance sensor and the reliability of the sensor. For example, when the ship is close to the AIS receiving base station and the AIS signal quality is good, AIS data is used first; while when the ship is in a radar coverage area with less radar interference, radar data is used first.

[0138] For example, in the code implementation, the data type within the time window can be determined first (AIS only, radar only, or both). For AIS only, a sorting operation is used to find the AIS trajectory point with the latest timestamp and output it. For radar only, the average coordinates of all radar trajectory points (e.g., longitude average, latitude average, etc.) are calculated to generate the fused trajectory points. When both are present, pre-configured priority parameters are read (which can be loaded from a configuration file or database), and the appropriate data is selected as the fusion result based on these parameters. Simultaneously, algorithm logic is written to consider factors that dynamically adjust priorities, such as real-time acquisition of distance information between the ship and the sensor, sensor signal strength, etc. A pre-defined algorithm model (e.g., a weighted decision model) is used to calculate which data source should be prioritized at the current moment, and a fusion decision is made accordingly.

[0139] In this embodiment, the trajectory fusion rules are designed to comprehensively consider the advantages and characteristics of both AIS and radar data sources, employing the optimal fusion strategy under different data conditions to generate more accurate and reliable ship trajectory information. AIS data excels in the accuracy and completeness of ship identification information, while radar data may be more advantageous in terms of ship position accuracy, especially when AIS signals are lost or not updated in a timely manner. Through priority configuration and dynamic adjustment mechanisms, the fusion method can be flexibly selected based on the actual application scenario and data quality, improving the system's adaptability and robustness. This ensures that the fused trajectory data better reflects the ship's true motion state, meeting the needs of various ship monitoring and navigation applications.

[0140] Optionally, in this embodiment, a signal quality monitoring module can be added to the AIS and radar equipment or the data receiving end to collect signal quality indicators such as signal strength (e.g., RSSI) and signal-to-noise ratio (SNR) in real time, and transmit this information along with the data to the trajectory fusion operator module. In the fusion operator, the priority of AIS and radar data is dynamically adjusted based on the comparison result between the current value of the signal quality indicator and the set threshold.

[0141] For example, when the AIS signal strength is below a set threshold, the AIS signal quality is considered poor, which may affect the accuracy of the data. In this case, the priority is automatically switched, and radar data is used as the primary reference data for fusion processing. Conversely, when the AIS signal quality is good and the radar signal quality is poor, AIS data is used first. In this way, a more reliable data source can be flexibly selected based on the actual signal quality, improving the accuracy of the fusion results.

[0142] Optionally, in this embodiment, a Kalman filter algorithm can be used to model and predict the motion state (such as position, velocity, and heading) of each target. When a target intersection scene is detected, the fusion result is corrected based on the current motion state of the target and the predicted position at the next time point to ensure that mismatches or trajectory confusion do not occur due to target intersections.

[0143] For example, Kalman filtering estimates and updates the target state by establishing the target's state transition equation and observation equation, using a recursive approach. Before the target crossover, the filter's predictions are used to anticipate potential crossover scenarios and adjust the subsequent fusion results. For instance, the monitoring frequency of target heading and velocity changes is increased during the crossover period. After the crossover ends, accurate target trajectory tracking and fusion are quickly restored based on new observation data.

[0144] Optionally, in this embodiment, the fusion trajectory data (Fusion Trace) output by the trajectory fusion operator module can be received through the fusion data storage module, and this data can be written into the Prometheus time-series database for storage. Simultaneously, the stored data is synchronously pushed to various application systems, such as electronic chart display systems and automatic collision avoidance and early warning systems, so that these applications can obtain the latest ship fusion trajectory information in a timely manner, providing decision support for ship operators, maritime regulatory departments, etc.

[0145] As described above, the trajectory optimization method for multi-source data fusion in border and coastal defense provided in this application can assign a unified identifier to radar data and AIS data through matching operations of AIS data and radar data. This identifier runs through the subsequent processing flow of this method, solving the problem of confusing target identity information in traditional monitoring methods. At the same time, this method achieves perfect fusion of AIS data and radar data through steps such as data merging, grouping, rolling time windows, and trajectory fusion. This method has both key information such as ship identity, speed and heading from AIS data and high-precision position details from radar data, overcoming the limitations of a single data source. It can accurately track the travel path of operating vessels, thereby improving the safety of ship navigation in situations such as ship navigation and management.

[0146] To integrate AIS and radar information and construct a more accurate, continuous, and complete maritime vessel dynamic monitoring system, meeting the high precision and high reliability requirements of vessel monitoring, this application provides an embodiment of a trajectory optimization device for implementing all or part of the trajectory optimization method for multi-source data fusion in border and coastal defense. See [link to embodiment]. Figure 8 The trajectory optimization device for multi-source data fusion in border and coastal defense specifically includes the following components:

[0147] The data acquisition module 10 is used to acquire AIS data and Radar data; to find the AIS data that matches the Radar data through trajectory recognition, and to replace the temporary identifier of the Radar data with the identifier of the matching AIS data;

[0148] Data processing module 20 is used to merge the AIS data and the Radar data into a unified data stream; before merging, it filters out unmatched Radar data through a filtering operation; and it performs grouping operations according to the fields of the identifier to form multiple sub-data streams, each of which belongs to the same target.

[0149] The data fusion module 30 is used to divide each sub-data stream into windows using a rolling time window. For the AIS data and Radar data sets within the time window corresponding to each identifier, fusion processing is performed according to the following rules: if the data contains only AIS data, the latest AIS data within the time window is directly selected as the fusion result; if the data contains only Radar data, the average value of all Radar data within the time window is calculated and used as the fusion result; if both AIS data and Radar data exist, the fusion result is selected according to a pre-configured priority strategy: if AIS is prioritized, the latest AIS data is used; if Radar is prioritized, the average value of the Radar data is used.

[0150] As described above, the trajectory optimization device for multi-source data fusion in border and coastal defense provided in this application embodiment can assign a unified identifier to radar data and AIS data through matching operations of AIS data and radar data. This identifier runs through the subsequent processing flow of this method, solving the problem of chaotic target identity information in traditional monitoring methods. At the same time, this method achieves perfect fusion of AIS data and radar data through steps such as data merging, grouping, rolling time windows, and trajectory fusion. This method has both key information such as ship identity, speed and heading from AIS data and high-precision position details from radar data, overcoming the limitations of a single data source. It can accurately track the travel path of operating vessels, thereby improving the safety of ship navigation in situations such as ship navigation and management.

[0151] From a hardware perspective, in order to integrate AIS information and radar information to build a more accurate, continuous, and complete maritime vessel dynamic monitoring system and meet the high precision and high reliability requirements of vessel monitoring, this application provides an embodiment of an electronic device for implementing all or part of the trajectory optimization method for multi-source data fusion in border and coastal defense. The electronic device specifically includes the following components:

[0152] The system comprises a processor, memory, a communication interface, and a bus; wherein the processor, memory, and communication interface communicate with each other via the bus; the communication interface is used to realize information transmission between the trajectory optimization device for multi-source data fusion in border and coastal defense and core business systems, user terminals, and related databases and other related equipment; the logic controller can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the logic controller can be implemented with reference to the embodiments of the trajectory optimization method for multi-source data fusion in border and coastal defense and the embodiments of the trajectory optimization device for multi-source data fusion in border and coastal defense, the contents of which are incorporated herein, and repeated details will not be described again.

[0153] It is understood that the user terminal may include smartphones, tablet computers, network set-top boxes, portable computers, desktop computers, personal digital assistants (PDAs), in-vehicle devices, smart wearable devices, etc. Among these, the smart wearable devices may include smart glasses, smartwatches, smart bracelets, etc.

[0154] In practical applications, the trajectory optimization method for multi-source data fusion in border and coastal defense can be partially executed on the electronic device side as described above, or all operations can be completed in the client device. The choice can be made based on the processing power of the client device and the limitations of the user's usage scenario. This application does not impose any limitations on this. If all operations are completed in the client device, the client device may further include a processor.

[0155] The aforementioned client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side; in other implementation scenarios, it may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.

[0156] Figure 9 This is a schematic block diagram illustrating the system configuration of the electronic device 9600 according to an embodiment of this application. Figure 9 As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that... Figure 9 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.

[0157] In one embodiment, the trajectory optimization method function for multi-source data fusion in border and coastal defense can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:

[0158] Step S101: Acquire AIS data and Radar data; find the AIS data that matches the Radar data through trajectory recognition, and replace the temporary identifier of the Radar data with the identifier of the matching AIS data;

[0159] Step S102: Merge the AIS data and the Radar data into a unified data stream; before merging, filter out unmatched Radar data through a filtering operation; group the data according to the fields of the identifier to form multiple sub-data streams, each of which belongs to the same target;

[0160] Step S103: Divide each sub-data stream into windows using a rolling time window; for the AIS data and Radar data sets within the time window corresponding to each identifier, perform fusion processing according to the following rules: if the data contains only AIS data, directly select the latest AIS data within the time window as the fusion result; if the data contains only Radar data, calculate the average value of all Radar data within the time window and use it as the fusion result; if both AIS data and Radar data exist, select the fusion result according to the pre-configured priority strategy: if configured for AIS priority, use the latest AIS data; if configured for Radar priority, use the average value of the Radar data.

[0161] As described above, the electronic device provided in this application embodiment assigns a unified identifier to the radar data and AIS data through matching operations of AIS data and radar data. This identifier runs through the subsequent processing flow of this method, solving the problem of chaotic target identity information in traditional monitoring methods. At the same time, this method achieves perfect integration of AIS data and radar data through steps such as data merging, grouping, rolling time windows, and trajectory fusion. This method has both key information such as ship identity, speed, and heading from AIS data and high-precision position details from radar data, overcoming the limitations of a single data source and accurately tracking the travel path of operating vessels to improve the safety of ship navigation in situations such as ship navigation and management.

[0162] In another embodiment, the trajectory optimization device for multi-source data fusion in border and coastal defense can be configured separately from the central processing unit 9100. For example, the trajectory optimization device for multi-source data fusion in border and coastal defense can be configured as a chip connected to the central processing unit 9100, and the trajectory optimization method function of multi-source data fusion in border and coastal defense can be realized through the control of the central processing unit.

[0163] like Figure 9 As shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily need to include these components. Figure 9 All components shown; in addition, the electronic device 9600 may also include Figure 9 For components not shown, please refer to existing technologies.

[0164] like Figure 9 As shown, the central processing unit 9100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of various components of the electronic device 9600.

[0165] The memory 9140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information, and also store a program for executing that information. The central processing unit 9100 may execute the program stored in the memory 9140 to perform information storage or processing, etc.

[0166] Input unit 9120 provides input to central processing unit 9100. Input unit 9120 may be, for example, a keypad or touch input device. Power supply 9170 provides power to electronic device 9600. Display 9160 displays images and text. Display may be, for example, an LCD display, but is not limited thereto.

[0167] The memory 9140 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142 for storing application programs and function programs or processes for executing the operation of the electronic device 9600 via the central processing unit 9100.

[0168] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0169] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 (transmitter / receiver) is coupled to the central processing unit 9100 to provide input signals and receive output signals, which is the same as in a conventional mobile communication terminal.

[0170] Based on different communication technologies, multiple communication modules 9110 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module 9110 (transmitter / receiver) is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby realizing typical telecommunications functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Additionally, the audio processor 9130 is coupled to a central processing unit 9100, enabling on-device recording via the microphone 9132 and on-device playback of stored audio via the speaker 9131.

[0171] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the trajectory optimization method for multi-source data fusion in border and coastal defense, where the execution subject is a server or client, as described in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the trajectory optimization method for multi-source data fusion in border and coastal defense, where the execution subject is a server or client, as described in the above embodiments. For example, when the processor executes the computer program, it implements the following steps:

[0172] Step S101: Acquire AIS data and Radar data; find the AIS data that matches the Radar data through trajectory recognition, and replace the temporary identifier of the Radar data with the identifier of the matching AIS data;

[0173] Step S102: Merge the AIS data and the Radar data into a unified data stream; before merging, filter out unmatched Radar data through a filtering operation; group the data according to the fields of the identifier to form multiple sub-data streams, each of which belongs to the same target;

[0174] Step S103: Divide each sub-data stream into windows using a rolling time window; for the AIS data and Radar data sets within the time window corresponding to each identifier, perform fusion processing according to the following rules: if the data contains only AIS data, directly select the latest AIS data within the time window as the fusion result; if the data contains only Radar data, calculate the average value of all Radar data within the time window and use it as the fusion result; if both AIS data and Radar data exist, select the fusion result according to the pre-configured priority strategy: if configured for AIS priority, use the latest AIS data; if configured for Radar priority, use the average value of the Radar data.

[0175] As described above, the computer-readable storage medium provided in this application embodiment assigns a unified identifier to radar data and AIS data through matching operations of AIS data and radar data. This identifier runs through the subsequent processing flow of this method, solving the problem of chaotic target identity information in traditional monitoring methods. At the same time, this method achieves perfect integration of AIS data and radar data through steps such as data merging, grouping, rolling time windows, and trajectory fusion. This method has both key information such as ship identity, speed, and heading from AIS data and high-precision position details from radar data, overcoming the limitations of a single data source and accurately tracking the travel path of operating vessels to improve the safety of ship navigation in scenarios such as ship navigation and management.

[0176] Embodiments of this application also provide a computer program product capable of implementing all steps in the trajectory optimization method for border and coastal defense multi-source data fusion, where the execution subject is a server or client, as described in the above embodiments. When executed by a processor, this computer program / instruction implements the steps of the trajectory optimization method for border and coastal defense multi-source data fusion. For example, the computer program / instruction implements the following steps:

[0177] Step S101: Acquire AIS data and Radar data; find the AIS data that matches the Radar data through trajectory recognition, and replace the temporary identifier of the Radar data with the identifier of the matching AIS data;

[0178] Step S102: Merge the AIS data and the Radar data into a unified data stream; before merging, filter out unmatched Radar data through a filtering operation; group the data according to the fields of the identifier to form multiple sub-data streams, each of which belongs to the same target;

[0179] Step S103: Divide each sub-data stream into windows using a rolling time window; for the AIS data and Radar data sets within the time window corresponding to each identifier, perform fusion processing according to the following rules: if the data contains only AIS data, directly select the latest AIS data within the time window as the fusion result; if the data contains only Radar data, calculate the average value of all Radar data within the time window and use it as the fusion result; if both AIS data and Radar data exist, select the fusion result according to the pre-configured priority strategy: if configured for AIS priority, use the latest AIS data; if configured for Radar priority, use the average value of the Radar data.

[0180] As described above, the computer program product provided in this application provides a unified identifier for radar data and AIS data through matching operations of AIS data and radar data. This identifier runs through the subsequent processing flow of this method, solving the problem of confusing target identity information in traditional monitoring methods. At the same time, this method achieves perfect integration of AIS data and radar data through steps such as data merging, grouping, rolling time windows, and trajectory fusion. This method has both key information such as ship identity, speed, and heading from AIS data and high-precision position details from radar data, overcoming the limitations of a single data source and accurately tracking the travel path of operating vessels to improve the safety of ship navigation in situations such as ship navigation and management.

[0181] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0182] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0183] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0185] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A trajectory optimization method based on multi-source data fusion of coastal defense, characterized in that, The method comprises: Obtaining AIS data and Radar data; finding the AIS data matched with the Radar data through trajectory recognition, and replacing the temporary identifier of the Radar data with the identifier of the AIS data matched therewith; the step of finding the AIS data matched with the Radar data through trajectory recognition comprises: extracting dynamic characteristic information in the AIS data and the Radar data, the dynamic characteristic information comprising speed and heading, and combining distance for data matching; setting a corresponding weight for each characteristic, and calculating a matching score according to the similarity of the characteristics, and judging whether the AIS data and the Radar data belong to the same target according to the matching score; Merging the AIS data and the Radar data into a unified data stream; before merging, filtering out unmatched Radar data through filtering operation; grouping operation is performed according to the field of the identifier to form a plurality of sub-data streams, each sub-data stream belonging to the same target; the step of grouping operation according to the field of the identifier to form a plurality of sub-data streams, each sub-data stream belonging to the same target comprises: when the Radar data of a plurality of targets is matched with the same AIS target within the same time window, recording and counting the matching relationship between the Radar data of each target and the AIS target, counting the matching times of each target, and selecting the target with the most matching times and the highest matching confidence as the final matching result; Window division is performed on each sub-data stream through a rolling time window; for the AIS data and the Radar data set within the time window corresponding to each identifier, fusion processing is performed according to the following rules: if there is only AIS data in the data, the latest AIS data within the time window is directly selected as the fusion result; if there is only Radar data, the average value of all Radar data within the time window is calculated as the fusion result; if there are both AIS data and Radar data, a pre-configured priority strategy is used to select the fusion result: if AIS is configured as the priority, the latest AIS data is used; if Radar is configured as the priority, the average value of the Radar data is used. 2.The track optimization method of edge sea defense multi-source data fusion according to claim 1, wherein, The step of obtaining AIS data and Radar data further comprises: Converting the AIS data into a unified Trace object format, the object containing an identifier, a timestamp, latitude and longitude, and a speed field; Converting the Radar data into a unified Trace object format, and the object maintains the same structure as the Trace object of the AIS data; for the Radar data that has been matched with the AIS target, the corresponding identifier is directly assigned during conversion. 3.The method according to claim 1, wherein, The step of finding the AIS data matched with the Radar data through trajectory recognition comprises: The AIS interpolation data is stored in the corresponding spatial index according to the belonging geographical area; when the AIS data adjacent to the Radar data is needed to be searched, the geographical area where the Radar data is located and the surrounding related areas are determined, and then the AIS data is searched in the spatial index of the areas. 4.The method according to claim 1, wherein, The step of merging the AIS data and the Radar data into a unified data stream comprises: The AIS data and the Radar data are set with corresponding metadata fields, the metadata fields are assigned values according to the data sources, and the assigned values are taken as priority labels of the data, so that when the AIS data and the Radar data need to be selected or comprehensively decided, the data with high priority is given priority.

5. The method of claim 1, wherein, The step of grouping according to the field of the identifier to form a plurality of sub-data streams, each of which belongs to the same target, comprises: A target state machine is established, a state attribute is set for each identifier, the state attribute comprises active, inactive and lost, the update time of each target is checked regularly, and if a target has no new data update within a set time period, the state of the target is changed from active to inactive, and the related data of the target is removed.

6. The trajectory optimization method of the border sea defense multi-source data fusion according to claim 1, characterized in that, The step of dividing each sub-data stream by a rolling time window comprises: The speed information of each target is analyzed, and the length of the time window of the corresponding target is dynamically adjusted according to the size of the speed; For the Radar data, in the time window, each time a new data is received, the value of the data is added to a total sum variable, and the value of a count variable is increased; when the window is triggered, the average value is directly calculated according to the total sum and the count.

7. The method of claim 1, wherein, The step of performing fusion processing according to the following rules comprises: The signal strength of the AIS and the signal-to-noise ratio of the Radar are monitored in real time, and the priority of the AIS data and the Radar data is dynamically adjusted according to the comparison result of the current value of the signal quality index and the set threshold value: if the AIS signal strength is lower than the threshold value, the Radar priority mode is automatically switched; Further comprising: The Kalman filtering algorithm is used to model and predict the motion state of each target; when the target crossing scene is detected, the fusion result is corrected according to the motion state of the current target and the predicted position at the next time point.

8. A trajectory optimization device for edge coastal defense multi-source data fusion, characterized in that, The device comprises: A data acquisition module is configured to acquire AIS data and Radar data; the AIS data matching the Radar data is found through trajectory recognition, and the temporary identifier of the Radar data is replaced with the identifier of the matching AIS data; the step of finding the AIS data matching the Radar data through trajectory recognition comprises: extracting dynamic feature information in the AIS data and the Radar data, the dynamic feature information comprising speed and heading, and performing data matching in combination with distance; a corresponding weight is set for each feature, a matching score is calculated according to the similarity of the features, and it is determined whether the AIS data and the Radar data belong to the same target according to the matching score. The data processing module is used for merging the AIS data and the Radar data into a unified data stream; before the merging, filtering operation is performed to filter out unmatched Radar data; grouping operation is performed according to a field of identifiers to form a plurality of sub data streams, and each sub data stream belongs to a same target; the grouping operation according to the field of identifiers to form the plurality of sub data streams, and each sub data stream belonging to the same target comprises: when the Radar data of a plurality of targets matches a same AIS target within a same time window, recording and counting the matching relationship between the Radar data of each target and the AIS target, counting the matching times of each target, and selecting a target with the most matching times and the highest matching confidence as a final matching result. The data fusion module is used for dividing each sub data stream by a rolling time window; for an AIS data and a Radar data set within a time window corresponding to each identifier, fusion processing is performed according to the following rules: if only the AIS data is in the data, the latest AIS data within the time window is directly selected as a fusion result; if only the Radar data is in the data, an average value of all the Radar data within the time window is calculated and used as the fusion result; if the AIS data and the Radar data exist simultaneously, a pre-configured priority strategy is used to select the fusion result: if AIS priority is configured, the latest AIS data is used; if Radar priority is configured, the average value of the Radar data is used.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to realize the steps of the track optimization method of the multi-source data fusion of the border sea defense according to any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the track optimization method of the multi-source data fusion of the border sea defense according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Radar and AIS data fusion method based on multi-factor Euclidean distance correlation

    CN116027320A

  • Marine ship multi-source information target fusion method based on big data real-time calculation

    CN118585956A