Indexing method, device, controller and storage medium for relative distance of a ship

CN122220435BActive Publication Date: 2026-09-18YIHAILAN (BEIJING) DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610193185.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-10
Publication Date
2026-09-18
Estimated Expiration
2046-02-10

AI Technical Summary

Technical Problem

但仅依赖原始数据的逐一遍历筛选,由于船舶轨迹、位置等原始数据量较大,严重影响船舶相对距离查询效率,无法及时获取船舶间相对距离信息,不利于及时开展船舶监测工作

Benefits of technology

[0054] The fourth aspect of this application provides a readable storage medium having a program or instructions stored thereon. When the program or instructions are executed by a processor, they implement the steps of the indexing method for the relative distance between ships as provided in any of the above technical solutions, thus achieving all the same technical effects. To avoid repetition, further details are omitted here.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122220435B_ABST
    Figure CN122220435B_ABST
Patent Text Reader

Abstract

The application provides a ship relative distance indexing method, device, controller and storage medium. The method comprises: generating and storing a data structure of a field of view range index table in the memory of a computing device; calculating, by the processor of the computing device, the spatial distance between a target ship and a candidate ship at multiple time points based on the acquired moving track data of the target ship and the candidate ship; comparing, by the processor, the spatial distance with a preset field of view distance threshold value, and updating the field of view range index table when the comparison result meets the update condition; and reading, by the processor, the corresponding data from the field of view range index table according to the input target number identifier and the pre-query time range, and outputting the candidate number identifier of the candidate ship and the corresponding time point which reach or exceed the preset field of view distance threshold value from the target ship within the pre-query time range. This method can improve the query efficiency of the relative distance of the ship and obtain the relative distance information between the ships in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ship monitoring technology, and more specifically, to a method, apparatus, controller, and storage medium for indexing the relative distances of ships. Background Technology

[0002] With the rapid development of ship navigation monitoring and maritime traffic safety management, it is frequently necessary to query relative distance information between ships in actual monitoring work to assist in ship compliance supervision. The rapid acquisition of ship relative distance data is a crucial link in ensuring the efficient conduct of monitoring work. Currently, the mainstream industry approach is to directly store and traverse raw data, that is, to obtain relative distance information between target and candidate ships by traversing and filtering through massive amounts of raw data such as ship trajectories and positions. However, relying solely on traversing and filtering raw data, due to the large volume of raw data such as ship trajectories and positions, severely impacts the efficiency of ship relative distance querying, making it impossible to obtain relative distance information between ships in a timely manner, which is detrimental to timely ship monitoring work. Summary of the Invention

[0003] This application provides a method, apparatus, controller, and storage medium for indexing relative ship distances, aiming to improve the efficiency of querying relative ship distances, obtain relative ship distance information in a timely manner, and ensure the smooth operation of ship monitoring work.

[0004] In view of this, the first aspect of this application provides a method for indexing relative distances between ships, the method being performed by a computing device, comprising:

[0005] The data structure of the field of view index table is generated and stored in the memory of the computing device. The field of view index table is used to record the target number identifier of the target ship and the position coordinates at multiple times, as well as the candidate number identifier and corresponding time of the candidate ship whose distance from the target ship reaches or exceeds the preset field of view distance threshold.

[0006] The processor of the computing device calculates the spatial distance between the target ship and the candidate ship at multiple moments based on the acquired movement trajectory data of the target ship and the candidate ship.

[0007] The processor compares the spatial distance with a preset field of view distance threshold, and updates the field of view index table when the comparison result meets the update conditions.

[0008] The processor reads the corresponding data from the field of view index table based on the input target number identifier and the pre-query time range, and outputs the candidate number identifier and the corresponding time of the candidate ships whose distance from the target ship reaches or exceeds the preset field of view distance threshold within the pre-query time range.

[0009] In the above technical solution, the field-of-view index table serves as the data storage medium, recording the target vessel's target identification number, position coordinates (e.g., latitude and longitude) at multiple times, and the time and candidate identification number of candidate vessels that meet the distance criteria. The target vessel is the vessel used as the monitoring benchmark. The target identification number uniquely identifies the target vessel. Candidate vessels are other vessels used for distance calculations relative to the target vessel. The candidate identification number uniquely identifies the candidate vessel. The preset field-of-view distance threshold is a preset distance standard for determining whether a candidate vessel enters or leaves the target vessel's area of ​​interest. The movement trajectory data is a sequence of vessel position coordinates at multiple times, used to calculate spatial distance. This data can be directly obtained through a vessel monitoring system (e.g., real-time or historical trajectory data collected by Automatic Identification System (AIS), Global Positioning System (GPS), etc.). The movement trajectory data includes at least the vessel's identification number and position coordinates at multiple times, and can be used for subsequent position sequence extraction and spatial distance calculation without additional secondary processing. Spatial distance is the actual distance between the target vessel and candidate vessels at multiple times. The pre-query time range is the user-specified query time interval. The update condition refers to the situation where the spatial distance reaches or exceeds the preset field of view distance threshold and a state change occurs. Specifically, it includes situations where the spatial distance changes from being less than or greater than the preset field of view distance threshold to being equal to, or from being equal to to being greater than.

[0010] In the above technical solution, a data structure for the field of view index table is generated and stored in the memory of the computing device. Combined with a preset field of view distance threshold to filter data, only the core information of the target vessel and information of candidate vessels meeting the distance criteria are stored, eliminating invalid data to reduce storage and subsequent processing pressure. The processor calculates spatial distances at multiple times based on movement trajectory data, providing reliable support for updating the field of view index table and ensuring the accuracy of recorded information. The processor dynamically updates the field of view index table when the update conditions are met by comparing the spatial distance with the preset field of view distance threshold, ensuring that the relative distance information of the vessel remains consistent with the actual navigation status and avoiding information lag. The processor queries the field of view index table based on the target number identifier and the pre-query time range, which can quickly locate related data and narrow the query range without traversing massive amounts of raw data, greatly improving query efficiency and quickly obtaining target results. This achieves efficient management and rapid querying of relative distance information of vessels, ensuring the timeliness and effectiveness of vessel monitoring work.

[0011] In some technical solutions, optionally, the processor of the computing device calculates the spatial distance between the target ship and the candidate ship at multiple times based on the acquired movement trajectory data of the target ship and the candidate ship, including:

[0012] The processor obtains the target position sequence from the trajectory data of the target vessel and the candidate position sequence from the trajectory data of the candidate vessels. Both the target position sequence and the candidate position sequence contain position coordinates corresponding to multiple time points.

[0013] The processor generates time-ordered data pairs based on the target position sequence and the candidate position sequence. Each data pair includes the target position coordinates of the target vessel and the candidate position coordinates of the candidate vessels at a given moment.

[0014] The processor calculates the spatial distance based on the data pairs.

[0015] In the above technical solution, the target position sequence is a set of position coordinates arranged by time in the target vessel's trajectory data. The candidate position sequence is a set of position coordinates arranged by time in the candidate vessel's trajectory data. A data pair is a combination of the position coordinates of the target vessel and the candidate vessels at the same moment.

[0016] In the above technical solution, the processor acquires the target position sequence and the candidate position sequence, which can clarify the position information of the ship at different times; based on the two types of position sequences, the data pairs arranged by time can be obtained, which can ensure the temporal consistency of distance calculation; the processor calculates the spatial distance according to the data pairs, which can accurately obtain the spatial distance between ships at multiple times, providing reliable data support for subsequent updates to the field of view index table.

[0017] In some technical solutions, optionally, the processor compares the spatial distance with a preset field-of-view distance threshold, and updates the field-of-view index table when the comparison result meets the update conditions, including:

[0018] The processor compares the spatial distance calculated at the current moment with the preset field of view distance threshold in real time to determine the spatial distance status between the candidate ship and the target ship.

[0019] When the comparison result meets the update conditions, the processor records the time and corresponding candidate number of the candidate ship into the field of view index table.

[0020] The processor synchronously updates the current position coordinates of the target ship in the field of view index table.

[0021] In the above technical solution, the current moment is the real-time point in time for distance calculation and updating of the field of view index table. The spatial distance status is the determination result of whether the distance between the candidate ship and the target ship meets the update conditions.

[0022] In the above technical solution, the processor compares the current spatial distance with the preset field of view distance threshold in real time, which can promptly grasp the changes in distance between ships; when the update conditions are met, the relevant information of the candidate ship is recorded in the field of view index table, ensuring that the field of view index table includes information that meets the conditions in a timely manner; the processor synchronously updates the current position coordinates of the target ship, which can ensure the real-time performance and accuracy of the target ship position information in the field of view index table.

[0023] In some technical solutions, optionally, the processor compares the spatial distance with a preset field-of-view distance threshold, and updates the field-of-view index table when the comparison result meets the update conditions, including:

[0024] The processor compares the spatial distances at multiple pre-calculated historical moments with a preset field-of-view distance threshold to determine the spatial distance status between the candidate ship and the target ship at the corresponding historical moment.

[0025] When the comparison result meets the update conditions, the processor records the historical time and corresponding candidate number of the candidate ship into the field of view index table.

[0026] The processor synchronously updates the position coordinates of the target ship at the corresponding historical moment in the field of view index table.

[0027] In the above technical solution, historical moments are points in time that have already passed, corresponding to pre-calculated historical movement trajectory data. The processor compares the spatial distances of multiple historical moments with a preset field-of-view distance threshold to trace the distance relationships between historical vessels. When update conditions are met, the historical information of candidate vessels is recorded in the field-of-view index table, which can improve the historical data of the field-of-view index table. The processor synchronously updates the position coordinates of the target vessel at the corresponding historical moment, which can ensure the completeness and accuracy of the historical position information of the target vessel in the field-of-view index table.

[0028] In some technical solutions, the update conditions may optionally include at least one of the following:

[0029] The spatial distance changes from being less than the preset field of view distance threshold to being equal to the preset field of view distance threshold;

[0030] The spatial distance changes from being greater than the preset field of view distance threshold to being equal to the preset field of view distance threshold;

[0031] The spatial distance changes from being equal to the preset field of view distance threshold to being greater than the preset field of view distance threshold.

[0032] The above technical solution clarifies the specific circumstances of the update conditions, which can accurately determine whether the candidate vessel has reached or exceeded the boundary conditions within the target vessel's scope of interest, avoid omissions or misjudgments in the update of the field of view index table, and ensure the accuracy and reliability of the data in the field of view index table.

[0033] In some technical solutions, optionally, there are multiple preset field of view distance thresholds, and each preset field of view distance threshold corresponds to a monitoring range.

[0034] In the above technical solution, the monitoring range is the area of ​​interest for the ship corresponding to different preset field-of-view distance thresholds. There are multiple preset field-of-view distance thresholds, each corresponding to a monitoring range. This enables monitoring of different levels of interest for the target ship, meeting diverse ship monitoring needs and improving the applicability and flexibility of the ship relative distance indexing method.

[0035] In some technical solutions, optionally, the processor reads corresponding data from the field of view index table based on the input target number identifier and the pre-query time range, and outputs the candidate number identifiers and corresponding times of candidate ships whose distance from the target ship reaches or exceeds a preset field of view distance threshold within the pre-query time range, including:

[0036] The processor filters out all records in the field of view index table that are within the pre-query time range corresponding to the target number identifier;

[0037] The processor deduplicates and sorts the selected records, and outputs the candidate IDs and their corresponding times in chronological order to form the query results.

[0038] In the above technical solution, filtering is the operation by which the processor extracts relevant records from the field-of-view index table based on the target number identifier and the pre-query time range. Deduplication is the operation by which the processor removes duplicate candidate ship information from the filtering results. Sorting is the operation by which the processor arranges the filtering results in chronological order. The query result is the final output set of candidate ship candidate number identifiers and their corresponding times, sorted by time.

[0039] In the above technical solution, the processor filters target-related records in the field of view index table, which can quickly locate data; after deduplication and sorting of the filtering results, the output can ensure the uniqueness and time continuity of the query results, and improve the readability and usability of the query results.

[0040] In some technical solutions, optionally, the field of view index table also stores the trajectory trend labels of candidate ships, which are calculated by the processor based on the position coordinates of the candidate ships at more than three consecutive time points.

[0041] If the spatial distance between consecutive moments shows a decreasing trend, the trajectory trend label is "approaching";

[0042] If the spatial distance at consecutive moments shows an increasing trend, the trajectory trend label is "moving away";

[0043] If the spatial distance fluctuation amplitude at consecutive times is less than the preset fluctuation threshold, the trajectory trend label is "stable";

[0044] When the processor outputs the query results, it synchronously outputs the trajectory trend labels. The query results include the candidate number identifier of the candidate ships, the corresponding time, and the trajectory trend labels.

[0045] In the above technical solution, trajectory trend labels are used to intuitively represent the motion trend of candidate ships relative to target ships. The preset fluctuation threshold is a pre-defined numerical standard for judging whether the spatial distance is stable. The processor calculates and stores the trajectory trend labels based on the position coordinates at multiple consecutive time points, and outputs them synchronously during queries. No additional calculations or analysis are required from the user, which can quickly determine the motion direction of candidate ships, providing a more comprehensive reference for ship monitoring decisions and further improving monitoring efficiency.

[0046] In some technical solutions, optionally, the processor uses a hierarchical incremental update mechanism to update the field of view index table:

[0047] For each preset field-of-view distance threshold corresponding to the monitoring range, the processor updates the record corresponding to the monitoring range only when the spatial distance state of the candidate ship relative to the monitoring range changes;

[0048] When the spatial distance status remains unchanged, the processor retains only the record of the candidate ship that most recently met the update conditions within the monitoring range, and deletes historical duplicate records with the same status;

[0049] Update records from different monitoring ranges are stored independently and do not interfere with each other.

[0050] In the above technical solution, the hierarchical incremental update mechanism is based on a differentiated update strategy across multiple monitoring ranges. Spatial distance status changes refer to situations where a candidate vessel changes from meeting the update conditions to not meeting them, or vice versa. This mechanism avoids storing a large number of duplicate records in the field-of-view index table, significantly reducing storage usage. Simultaneously, it ensures that update data from different monitoring ranges is independent and clear, without affecting query accuracy. It is particularly suitable for applications involving massive amounts of vessel trajectory data, improving the performance and stability of the indexing method.

[0051] A second aspect of this application provides a device for indexing relative distances between ships, comprising: a building module for generating and storing a data structure of a field-of-view index table in the memory of a computing device, the field-of-view index table recording the target ship's target number identifier and position coordinates at multiple times, as well as the candidate ship's candidate number identifier and corresponding time for candidate ships whose distance from the target ship reaches or exceeds a preset field-of-view distance threshold; a calculation module for calculating the spatial distance between the target ship and candidate ships at multiple times based on the acquired movement trajectory data of the target ship and candidate ships by the processor of the computing device; a processing module for comparing the spatial distance with the preset field-of-view distance threshold by the processor, and updating the field-of-view index table when the comparison result meets the update conditions; and a query module for reading corresponding data from the field-of-view index table according to the input target number identifier and a pre-query time range by the processor, and outputting the candidate ship's candidate number identifier and corresponding time for candidate ships whose distance from the target ship reaches or exceeds the preset field-of-view distance threshold within the pre-query time range.

[0052] In the above technical solution, a module is established to generate and store the field of view index table, a calculation module calculates the spatial distance between ships at multiple time points, a processing module updates the field of view index table based on distance comparison results, and a query module performs data queries and outputs results. These modules work collaboratively, combining hardware and methods to filter out invalid data, ensure information accuracy, and improve query efficiency, thereby achieving efficient management and rapid querying of relative ship distance information and ensuring the timeliness and effectiveness of ship monitoring.

[0053] A third aspect of this application provides a ship relative distance indexing controller, comprising: a memory for storing programs or instructions and a data structure for a field of view index table; and a processor for executing programs or instructions to implement the ship relative distance indexing method provided in any of the above technical solutions, thus achieving all the same technical effects. To avoid repetition, further details are omitted here.

[0054] The fourth aspect of this application provides a readable storage medium having a program or instructions stored thereon. When the program or instructions are executed by a processor, they implement the steps of the indexing method for the relative distance between ships as provided in any of the above technical solutions, thus achieving all the same technical effects. To avoid repetition, further details are omitted here.

[0055] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0056] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0057] Figure 1 A flowchart illustrating the indexing method for relative ship distances provided in this application embodiment;

[0058] Figure 2 This is an application diagram illustrating the preset field of view distance threshold provided in the embodiments of this application;

[0059] Figure 3 A structural block diagram of a ship relative distance indexing device provided in this application embodiment;

[0060] Figure 4 This is a structural block diagram of a ship relative distance index controller provided in an embodiment of this application. Detailed Implementation

[0061] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0062] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below.

[0063] The following reference Figures 1 to 4 This application describes a method, apparatus, controller, and storage medium for indexing relative distances between ships according to some embodiments.

[0064] like Figure 1 As shown, the first aspect of this application provides a method for indexing relative distances between ships, the method being executed by a computing device, including:

[0065] S100: Generate and store the data structure of the field of view index table in the memory of the computing device. The field of view index table is used to record the target number identifier of the target ship and the position coordinates at multiple times, as well as the candidate number identifier and corresponding time of the candidate ship whose distance from the target ship reaches or exceeds the preset field of view distance threshold.

[0066] S120: The processor of the computing device calculates the spatial distance between the target ship and the candidate ship at multiple moments based on the acquired movement trajectory data of the target ship and the candidate ship.

[0067] S140: The processor compares the spatial distance with the preset field of view distance threshold, and updates the field of view index table when the comparison result meets the update conditions;

[0068] S160: The processor reads the corresponding data from the field of view index table based on the input target number identifier and the pre-query time range, and outputs the candidate number identifier and the corresponding time of the candidate ships whose distance from the target ship reaches or exceeds the preset field of view distance threshold within the pre-query time range.

[0069] In the above embodiments, the field-of-view index table serves as a data storage carrier, recording the target vessel's target identification number, position coordinates (e.g., latitude and longitude) at multiple times, and the time and candidate identification number of candidate vessels that meet the distance criteria. The target vessel is the vessel used as the monitoring benchmark. The target identification number uniquely identifies the target vessel. Candidate vessels are other vessels whose distance is calculated relative to the target vessel. The candidate identification number uniquely identifies the candidate vessel. The preset field-of-view distance threshold is a preset distance standard for determining whether a candidate vessel enters or leaves the target vessel's area of ​​interest. The movement trajectory data is a sequence of the vessel's position coordinates at multiple times, used to calculate spatial distance. This data can be directly obtained through a vessel monitoring system (e.g., real-time or historical trajectory data collected by an Automatic Identification System (AIS), Global Positioning System, etc.). The movement trajectory data includes at least the vessel's identification number and position coordinates at multiple times, and can be used for subsequent position sequence extraction and spatial distance calculation without additional secondary processing. The spatial distance is the actual distance between the target vessel and candidate vessels at multiple times. The pre-query time range is the query time interval specified by the user. The update condition refers to the situation where the spatial distance reaches or exceeds the preset field of view distance threshold and a state change occurs. Specifically, it includes situations where the spatial distance changes from being less than or greater than the preset field of view distance threshold to being equal to, or from being equal to to being greater than.

[0070] In the above embodiments, the method for indexing the relative distance of ships is executed by a computing device, which includes a memory and a processor. A data structure for the field-of-view index table is generated and stored in the memory of the computing device. Data is filtered using a preset field-of-view distance threshold, storing only the core information of the target ship and information of candidate ships that meet the distance criteria, thus eliminating invalid data and reducing storage and subsequent processing pressure. The processor calculates spatial distances at multiple times based on movement trajectory data, providing reliable support for updating the field-of-view index table and ensuring the accuracy of recorded information. The processor dynamically updates the field-of-view index table when the update conditions are met by comparing the spatial distance with the preset field-of-view distance threshold, ensuring that the ship relative distance information is consistent with the actual navigation status and avoiding information lag. The processor queries the field-of-view index table based on the target number identifier and the pre-query time range, which can quickly locate related data and narrow the query range without traversing massive amounts of raw data, greatly improving query efficiency and quickly obtaining target results. This achieves efficient management and rapid querying of ship relative distance information, ensuring the timeliness and effectiveness of ship monitoring work.

[0071] For example, in actual use, a field of view index table can be established for multiple target vessels; then, the fields of view index table can be compiled into a master field of view index table. When using the system, the corresponding target vessel can be directly queried from the master field of view index table, and the corresponding field of view index table can be retrieved.

[0072] In some embodiments, such as Figure 2 As shown, the hollow circle in the center represents the target vessel, and the solid circle represents candidate vessels. A represents the field of view corresponding to the preset field of view distance threshold, and B and C represent two warning field of view ranges, respectively. Whenever a candidate vessel enters or leaves the field of view corresponding to the preset field of view distance threshold, the corresponding candidate vessel is recorded, and its candidate number and time point are written into the field of view range index table. Therefore, during subsequent vessel monitoring, the field of view range index table can be used to directly query which candidate vessels have entered the field of view corresponding to the preset field of view distance threshold of the target vessel. Then, the movement trajectory data of these candidate vessels can be retrieved to further calculate which candidate vessels have entered the warning field of view range of the target vessel.

[0073] In some embodiments, the field of view index table may be as shown in List 1 below:

[0074] Table 1. Index of Field of View

[0075]

[0076] In some embodiments, optionally, the processor of the computing device calculates the spatial distance between the target ship and the candidate ship at multiple moments based on the acquired movement trajectory data of the target ship and the candidate ship, including:

[0077] The processor obtains the target position sequence from the trajectory data of the target vessel and the candidate position sequence from the trajectory data of the candidate vessels. Both the target position sequence and the candidate position sequence contain position coordinates corresponding to multiple time points.

[0078] The processor generates time-ordered data pairs based on the target position sequence and the candidate position sequence. Each data pair includes the target position coordinates of the target vessel and the candidate position coordinates of the candidate vessels at a given moment.

[0079] The processor calculates the spatial distance based on the data pairs.

[0080] In the above embodiments, the target position sequence is a set of position coordinates arranged by time in the target vessel's trajectory data. The candidate position sequence is a set of position coordinates arranged by time in the candidate vessel's trajectory data. The data pair is a combination of the position coordinates of the target vessel and the candidate vessels at the same moment.

[0081] In the above embodiments, the processor acquires the target position sequence and the candidate position sequence, which can clarify the position information of the ship at different times; based on the two types of position sequences, it obtains data pairs arranged by time, which can ensure the temporal consistency of distance calculation; the processor calculates the spatial distance according to the data pairs, which can accurately obtain the spatial distance between ships at multiple times, providing reliable data support for subsequent updates to the field of view index table.

[0082] In some embodiments, the ship's movement trajectory data may be as shown in List 2 below:

[0083] Table 2. Movement Trajectory Data Table

[0084]

[0085] In some embodiments, optionally, the processor compares the spatial distance with a preset field-of-view distance threshold, and updates the field-of-view index table when the comparison result meets the update conditions, including:

[0086] The processor compares the spatial distance calculated at the current moment with the preset field of view distance threshold in real time to determine the spatial distance status between the candidate ship and the target ship.

[0087] When the comparison result meets the update conditions, the processor records the time and corresponding candidate number of the candidate ship into the field of view index table.

[0088] The processor synchronously updates the current position coordinates of the target ship in the field of view index table.

[0089] In the above embodiments, the current time is the real-time point in time for distance calculation and field of view index table updates. The spatial distance status is the determination result of whether the distance between the candidate ship and the target ship meets the update conditions.

[0090] In the above embodiments, the processor compares the current spatial distance with the preset field of view distance threshold in real time, which can promptly grasp the distance changes between ships; when the update conditions are met, the relevant information of the candidate ship is recorded in the field of view index table to ensure that the field of view index table includes information that meets the conditions in a timely manner; the processor synchronously updates the current position coordinates of the target ship, which can ensure the real-time performance and accuracy of the target ship position information in the field of view index table.

[0091] In some embodiments, optionally, the processor compares the spatial distance with a preset field-of-view distance threshold, and updates the field-of-view index table when the comparison result meets the update conditions, including:

[0092] The processor compares the spatial distances at multiple pre-calculated historical moments with a preset field-of-view distance threshold to determine the spatial distance status between the candidate ship and the target ship at the corresponding historical moment.

[0093] When the comparison result meets the update conditions, the processor records the historical time and corresponding candidate number of the candidate ship into the field of view index table.

[0094] The processor synchronously updates the position coordinates of the target ship at the corresponding historical moment in the field of view index table.

[0095] In the above embodiments, historical moments are points in time that have already passed, corresponding to pre-calculated historical movement trajectory data. The processor compares the spatial distances of multiple historical moments with a preset field-of-view distance threshold to trace the distance relationships between historical vessels. When the update conditions are met, the historical information of candidate vessels is recorded in the field-of-view index table, which can improve the historical data of the field-of-view index table. The processor synchronously updates the position coordinates of the target vessel at the corresponding historical moment, which can ensure the integrity and accuracy of the historical position information of the target vessel in the field-of-view index table.

[0096] In some embodiments, the update conditions may optionally include at least one of the following:

[0097] The spatial distance changes from being less than the preset field of view distance threshold to being equal to the preset field of view distance threshold;

[0098] The spatial distance changes from being greater than the preset field of view distance threshold to being equal to the preset field of view distance threshold;

[0099] The spatial distance changes from being equal to the preset field of view distance threshold to being greater than the preset field of view distance threshold.

[0100] In the above embodiments, by clearly defining the specific circumstances of the update conditions, it is possible to accurately determine whether the candidate vessel has reached or exceeded the boundary conditions within the target vessel's scope of interest, thereby avoiding omissions or misjudgments in the update of the field of view index table and ensuring the accuracy and reliability of the data in the field of view index table.

[0101] In some embodiments, optionally, there are multiple preset field-of-view distance thresholds, and each preset field-of-view distance threshold corresponds to a monitoring range.

[0102] In the above embodiments, the monitoring range is the ship's area of ​​interest corresponding to different preset field-of-view distance thresholds. There are multiple preset field-of-view distance thresholds, and each preset field-of-view distance threshold corresponds to a monitoring range, which can realize the monitoring of different levels of interest range of the target ship, meet diverse ship monitoring needs, and improve the applicability and flexibility of the ship relative distance indexing method.

[0103] In some embodiments, such as Figure 2As shown, the hollow circle in the center represents the target vessel, and the solid circle represents the candidate vessels. A, B, and C represent the field of view corresponding to a preset field of view distance threshold. For example, A corresponds to 10 nautical miles, B to 7 nautical miles, and C to 5 nautical miles. Whenever a candidate vessel enters or leaves the field of view of any preset field of view distance threshold, the corresponding candidate vessel is recorded, and its candidate number and time are written into the field of view index table.

[0104] Understandably, the number of preset field-of-view distance thresholds can be set according to the actual number of ships.

[0105] In some embodiments, optionally, the processor reads corresponding data from the field of view index table based on the input target ID and the pre-query time range, and outputs the candidate IDs and corresponding times of candidate ships whose distance from the target ship reaches or exceeds a preset field of view distance threshold within the pre-query time range, including:

[0106] The processor filters out all records in the field of view index table that are within the pre-query time range corresponding to the target number identifier;

[0107] The processor deduplicates and sorts the selected records, and outputs the candidate IDs and their corresponding times in chronological order to form the query results.

[0108] In the above embodiments, filtering is the operation by which the processor extracts relevant records from the field-of-view index table based on the target number identifier and the pre-query time range. Deduplication is the operation by which the processor removes duplicate candidate ship information from the filtering results. Sorting is the operation by which the processor arranges the filtering results in chronological order. The query result is the final output set of candidate ship candidate number identifiers and their corresponding times, sorted by time.

[0109] In the above embodiments, the processor filters target-related records in the field of view index table to quickly locate data; after deduplication and sorting the filtering results, the output can ensure the uniqueness and temporal continuity of the query results, and improve the readability and usability of the query results.

[0110] In some embodiments, the field of view index table may optionally also store trajectory trend labels of candidate ships, which are calculated by the processor based on the position coordinates of the candidate ships at more than three consecutive time points.

[0111] If the spatial distance between consecutive moments shows a decreasing trend, the trajectory trend label is "approaching";

[0112] If the spatial distance at consecutive moments shows an increasing trend, the trajectory trend label is "moving away";

[0113] If the spatial distance fluctuation amplitude at consecutive times is less than the preset fluctuation threshold, the trajectory trend label is "stable";

[0114] When the processor outputs the query results, it synchronously outputs the trajectory trend labels. The query results include the candidate number identifier of the candidate ships, the corresponding time, and the trajectory trend labels.

[0115] In the above embodiments, trajectory trend labels are used to intuitively represent the motion trend of candidate ships relative to target ships, and the preset fluctuation threshold is a pre-set numerical standard for judging whether the spatial distance is stable. The processor calculates and stores the trajectory trend labels based on the position coordinates at multiple consecutive time points, and outputs them synchronously when querying. No additional calculation or analysis is required from the user, which can quickly grasp the motion direction of candidate ships, provide a more comprehensive reference for ship monitoring decisions, and further improve monitoring efficiency.

[0116] In some embodiments, the processor optionally employs a hierarchical incremental update mechanism to update the field of view index table:

[0117] For each preset field-of-view distance threshold corresponding to the monitoring range, the processor updates the record corresponding to the monitoring range only when the spatial distance state of the candidate ship relative to the monitoring range changes;

[0118] When the spatial distance status remains unchanged, the processor retains only the record of the candidate ship that most recently met the update conditions within the monitoring range, and deletes historical duplicate records with the same status;

[0119] Update records from different monitoring ranges are stored independently and do not interfere with each other.

[0120] In the above embodiments, the hierarchical incremental update mechanism is based on a differentiated update strategy across multiple monitoring ranges. Spatial distance status change refers to the situation where the spatial distance between a candidate vessel and a target vessel changes from meeting the update conditions to not meeting them, or vice versa. This mechanism avoids storing a large number of duplicate records in the field-of-view index table, significantly reducing storage usage. Simultaneously, it ensures that update data from different monitoring ranges is independent and clear, without affecting query accuracy. It is particularly suitable for application scenarios involving massive amounts of vessel trajectory data, improving the performance and stability of the indexing method.

[0121] like Figure 3As shown, the second aspect of this application provides a ship relative distance indexing device 300, comprising: a building module 302, used to generate and store a data structure of a field of view index table in the memory of a computing device, the field of view index table being used to record the target ship's target number identifier and position coordinates at multiple times, as well as the candidate ship's candidate number identifier and corresponding time when the distance between the target ship and the candidate ship reaches or exceeds a preset field of view distance threshold; a calculation module 304, used by the processor of the computing device to calculate the spatial distance between the target ship and the candidate ship at multiple times based on the acquired movement trajectory data of the target ship and the candidate ship; a processing module 306, used by the processor to compare the spatial distance with the preset field of view distance threshold, and update the field of view index table when the comparison result meets the update conditions; and a query module 308, used by the processor to read corresponding data from the field of view index table according to the input target number identifier and a pre-query time range, and output the candidate ship's candidate number identifier and corresponding time when the distance between the target ship and the candidate ship reaches or exceeds the preset field of view distance threshold within the pre-query time range.

[0122] In the above embodiments, by generating and storing the data structure of the field of view index table in the memory of the computing device, and combining it with a preset field of view distance threshold to filter data, only the core information of the target vessel and the information of candidate vessels that meet the distance conditions are stored, and invalid data is filtered out to reduce the storage and subsequent processing pressure; the processor calculates the spatial distance at multiple times based on the movement trajectory data, providing reliable support for updating the field of view index table and ensuring the accuracy of the recorded information; the processor dynamically updates the field of view index table when the update conditions are met by comparing the spatial distance with the preset field of view distance threshold, ensuring that the information related to the relative distance of the vessel is consistent with the actual navigation status and avoiding information lag; the processor queries the field of view index table according to the target number identifier and the pre-query time range, which can quickly locate related data and narrow the query range without traversing massive amounts of raw data, greatly improving query efficiency, quickly obtaining target results, realizing efficient management and rapid query of the relative distance information of the vessel, and ensuring the timeliness and effectiveness of the vessel monitoring work.

[0123] like Figure 4 As shown, the third aspect of this application provides a ship relative distance indexing controller 400, including: a memory 402 for storing programs or instructions and a data structure of a field of view index table; and a processor 404 for executing programs or instructions to implement the ship relative distance indexing method provided in any of the above embodiments, thus achieving all the same technical effects. To avoid repetition, it will not be described again here.

[0124] The fourth aspect of this application provides a readable storage medium having a program or instructions stored thereon. When the program or instructions are executed by a processor, they implement the steps of the indexing method for the relative distance between ships as provided in any of the above embodiments, thus achieving all the same technical effects. To avoid repetition, they will not be described again here.

[0125] The methods described above can be implemented in various ways depending on specific features and / or example applications. For example, these methods can be implemented through a combination of hardware, firmware, and / or software. For instance, in a hardware implementation, the processor can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, electronic devices, other device units for performing the functions described above, and / or combinations thereof.

[0126] A computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A computer-readable storage medium can be an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing, but is not limited thereto. A non-exhaustive list of more specific examples of computer-readable storage media includes: portable computer floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, static random-access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital video disc (DVD), memory cards, floppy disks, encoding mechanical devices (e.g., punched cards or grooves with raised structures for recording instructions), and any suitable combination of the foregoing. The computer-readable storage medium used herein should not be construed as the transmission signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media, or electrical signals transmitted through wires.

[0127] In the claims, description, and accompanying drawings of this application, the term "plural" refers to two or more objects. Unless otherwise explicitly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used solely for the convenience of describing this application and simplifying the descriptive process, and are not intended to indicate or imply that the device or element referred to must have the described specific orientation, or be constructed and operated in a specific orientation. Therefore, these descriptions should not be construed as limitations on this application. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection between multiple objects, a detachable connection between multiple objects, or an integral connection; it can be a direct connection between multiple objects or an indirect connection between multiple objects through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in this application can be understood based on the specific circumstances described above.

[0128] In the claims, description, and accompanying drawings of this application, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of this application. In the claims, description, and accompanying drawings of this application, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0129] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for indexing relative distances between ships, the method being executed by a computing device, characterized in that, include: The data structure of the field of view index table is generated and stored in the memory of the computing device. The field of view index table is used to record the target number identifier of the target ship and the position coordinates at multiple times, as well as the candidate number identifier and the corresponding time of the candidate ship whose distance from the target ship reaches or exceeds a preset field of view distance threshold. The processor of the computing device calculates the spatial distance between the target ship and the candidate ship at multiple times based on the acquired movement trajectory data of the target ship and the candidate ship; The processor compares the spatial distance with the preset field of view distance threshold, and updates the field of view index table when the comparison result meets the update conditions. The processor reads corresponding data from the field of view index table based on the input target number identifier and the pre-query time range, and outputs the candidate number identifier and the corresponding time of the candidate ship whose distance from the target ship reaches or exceeds the preset field of view distance threshold within the pre-query time range.

2. The method for indexing relative distances between ships according to claim 1, characterized in that, The processor of the computing device calculates the spatial distance between the target ship and the candidate ship at multiple times based on the acquired movement trajectory data of the target ship and the candidate ship, including: The processor acquires the target position sequence from the movement trajectory data of the target vessel and the candidate position sequence from the movement trajectory data of the candidate vessel. Both the target position sequence and the candidate position sequence contain position coordinates corresponding to multiple times. The processor generates time-ordered data pairs based on the target position sequence and the candidate position sequence. The data pairs include the target position coordinates of the target vessel and the candidate position coordinates of the candidate vessel at a certain moment. The processor calculates the spatial distance based on the data pair.

3. The method for indexing relative distances between ships according to claim 1, characterized in that, The step of comparing the spatial distance with the preset field-of-view distance threshold by the processor, and updating the field-of-view index table when the comparison result meets the update conditions, includes: The processor compares the spatial distance calculated at the current moment with the preset field of view distance threshold in real time to determine the spatial distance status between the candidate ship and the target ship. When the comparison result meets the update conditions, the processor records the time of the corresponding candidate ship and the corresponding candidate number identifier into the field of view index table. The processor synchronously updates the current position coordinates of the target ship in the field of view index table.

4. The method for indexing relative distances between ships according to claim 1, characterized in that, The step of comparing the spatial distance with the preset field-of-view distance threshold by the processor, and updating the field-of-view index table when the comparison result meets the update conditions, includes: The processor compares the spatial distances at multiple pre-calculated historical moments with the preset field-of-view distance threshold to determine the spatial distance status between the candidate ship and the target ship at the corresponding historical moment. When the comparison result meets the update conditions, the processor records the historical time of the corresponding candidate ship and the corresponding candidate number identifier into the field of view index table. The processor synchronously updates the position coordinates of the target ship at the corresponding historical time in the field of view index table.

5. The method for indexing relative distances between ships according to claim 3 or 4, characterized in that, The update conditions include at least one of the following: The spatial distance changes from being less than the preset field of view distance threshold to being equal to the preset field of view distance threshold; The spatial distance changes from being greater than the preset field of view distance threshold to being equal to the preset field of view distance threshold; The spatial distance changes from being equal to the preset field of view distance threshold to being greater than the preset field of view distance threshold.

6. The method for indexing relative distances between ships according to claim 5, characterized in that, There are multiple preset field-of-view distance thresholds, and each preset field-of-view distance threshold corresponds to a monitoring range.

7. The method for indexing relative distances between ships according to claim 1, characterized in that, The step of the processor reading corresponding data from the field of view index table based on the input target number identifier and pre-query time range, and outputting the candidate number identifier and corresponding time of the candidate ships whose distance from the target ship reaches or exceeds the preset field of view distance threshold within the pre-query time range, includes: The processor filters out all records in the field of view index table that fall within the pre-query time range corresponding to the target number identifier; The processor performs deduplication and sorting on the selected records, and outputs the candidate number identifier and the corresponding time in chronological order to form the query result.

8. A device for indexing the relative distance between ships, characterized in that, include: A module is established to generate and store a data structure of a field of view index table in the memory of a computing device. The field of view index table is used to record the target number identifier of the target ship and the position coordinates at multiple times, as well as the candidate number identifier and corresponding time of candidate ships whose distance from the target ship reaches or exceeds a preset field of view distance threshold. The calculation module is used by the processor of the computing device to calculate the spatial distance between the target ship and the candidate ship at multiple times based on the acquired movement trajectory data of the target ship and the candidate ship; The processing module is used to compare the spatial distance with the preset field of view distance threshold by the processor, and update the field of view index table when the comparison result meets the update condition; The query module is used by the processor to read corresponding data from the field of view index table based on the input target number identifier and the pre-query time range, and output the candidate number identifier and the corresponding time of the candidate ships whose distance from the target ship reaches or exceeds the preset field of view distance threshold within the pre-query time range.

9. A ship relative distance indexing controller, characterized in that, include: Memory is a data structure used to store programs or instructions, as well as a view scope index table. A processor, configured to implement the steps of the indexing method for relative distances between ships as described in any one of claims 1 to 7 when executing the program or instructions.

10. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the steps of the indexing method for the relative distances of ships as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Optimization method for ship target trajectory data access

    CN117520392A

  • Method and system for calculating navigation safety score

    WO2025234757A1