A method for matching the temporal position data of surface vessels and buoys
By using a timestamp-based method for matching the positions of surface vessels and buoys, the problems of data loss and frequency inconsistency in the matching of surface vessel and buoy data were solved, thereby improving the accuracy and efficiency of surface vessel trajectory replay.
Patent Information
- Application Number
- CN202111596761.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2041-12-24
AI Technical Summary
In matching the position data of surface vessels and buoys, existing technologies suffer from data loss or inconsistent collection frequencies, leading to inaccurate trajectory reconstruction.
A timestamp-based method for matching the positions of surface vessels and buoys is adopted. By acquiring and sorting their respective time-position data, the method matches the nearest buoy position one by one. The best matching matrix is stored in a two-dimensional array to reduce the time complexity.
It enables accurate acquisition of the position of each buoy at each timestamp in the trajectory replay of surface vessels, improving the accuracy and efficiency of trajectory replay and reducing the time complexity to O(n).
Smart Images

Figure CN114416818B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of underwater equipment detection and positioning technology, and mainly involves a time-stamp-based matching technology for time-series data from two or more different GPS acquisition frequencies, specifically a method for matching the time-series position data of a surface vessel and a buoy. Summary of the Invention
[0002] Sailing tests of surface vessels are a direct and effective way to evaluate their performance and functionality. For example, in tests assessing seaworthiness and endurance, the ability to safely enter the circling area of each of the four dynamic smart buoys within a rectangular test zone, and to complete circling maneuvers around multiple buoys, requires the surface vessel to have the ability to monitor the positions of the dynamic buoys in real time. In tests of multi-target avoidance capabilities, the surface vessel needs to identify buoys of three different colors and with different threat ranges. To obtain more accurate buoy classifications for threat areas while avoiding multiple threat areas with limited ranges, the surface vessel needs a more accurate ability to judge the real-time positions of the smart buoys. After a formal competition, when the evaluation system needs to review the race, the matching of the surface vessel's real-time position with the corresponding smart buoy positions is crucial. This is the core factor determining the fairness, professionalism, and rigor of the evaluation system.
[0003] The replay subsystem of the surface vessel shore-based assessment system primarily uses offline collected time-position data of the surface vessel to replay its trajectory. To ensure accuracy, buoy data at the corresponding time points needs to be loaded simultaneously with the vessel's trajectory points. However, in actual testing, offline data points may be lost, or the data acquisition frequencies of the surface vessel and the buoys may differ, and different types of buoys may also have different acquisition frequencies. Therefore, to enable the replay system to more accurately and quickly reproduce the buoy position data at each time point, a timestamp-based surface vessel-buoy position matching method is used, combining actual testing and replay data, to calculate the optimal matching position of each buoy at the vessel's time point. Summary of the Invention
[0005] To address the shortcomings and defects of the existing technologies, the inventors have developed and proposed a method for matching the time-series data of surface vessels and multiple smart buoys. This method addresses the matching problem between surface vessels and smart buoys in obstacle avoidance and other testing projects, and solves the problem in later applications, such as trajectory review of surface vessels, by accurately obtaining the precise position and other states of each buoy at each time point during the surface vessel's navigation.
[0006] Specifically, the present invention is implemented as follows: a method for matching the time-series position data of a surface vessel and a buoy, comprising the following steps: Step S1, acquiring all time-position data of both the unmanned surface vessel and the buoy; Step S2, filtering the time-series data of the two types of data in Step S1, removing duplicate data, and sorting them in ascending order by time; Step S3, acquiring the buoy time data closest to the current data point of the surface vessel from the timestamp of the unmanned surface vessel; Step S4, based on the time point of each surface vessel, the algorithm returns the buoy position data closest to the timestamp of the endpoint of each surface vessel corresponding to each buoy; Step S5, determining whether there is any unmatched unmanned surface vessel time-position data. If so, performing unmanned surface vessel time-position data matching for each buoy and then making the determination again, repeating Step S3; if not, completing the time-series data matching based on the buoy position data acquired in Step S4. The data acquired from the unmanned surface vessel's (USV) end face is array V, and the buoy data is array B_f (f = 1, 2, ..., F), with each array element being a tuple of [Tms, Pos]. The data in arrays V and B_f are sorted in ascending order of time. Let f = 1, and initialize S_i = 1, where i is used to iterate through the USV end face data. Initialize a two-dimensional array RES[F][Len_V] to store the position of buoy f corresponding to the i-th time point in V. Then check if the buoy has been traversed completely (f > F). If not, initialize S_i = 1, B_f = 1, and initialize RES[f][S_i] = B_f[B_fk].bPos, and lastTimeDiff = abs(V[S_i].uTms - B_f[B_fk].bTms). Then check if the surface USV end face data has been traversed completely and S_i is not greater than L. If en_V is not found, then f = f + 1 is used to check if the buoy has been traversed (f > F); if it is found, then abs(V[S_i].uTms-B_f[B_fk].bTms) is calculated and assigned to tempDiff. If tempDiff is less than lastTimeDiff, then tempDiff is assigned to lastTimeDiff and RES[F]S_i] is recorded as B_f[B_fk].bPos. Otherwise, S_i = S_i + 1 is updated and the surface boat end data is traversed again. If B_fk is less than lenB_f, then B_fk = B_fk + 1 is updated and tempDiff is checked again. If it is not found, S_i = S_i + 1 is updated and the surface boat end data is traversed again. This continues until the buoy has been traversed and f > F.
[0007] The working principle of this invention is as follows: The input is real-time navigation trajectory data of a surface vessel and multiple buoy position data; the output is the optimal matching matrix for each buoy corresponding to the surface vessel's trajectory time point. During trajectory review, the surface vessel can dynamically load accurate buoy positions by reading the optimal matching matrix, ultimately obtaining comprehensive environmental situation information about the surface vessel. This invention is an improved time-series data matching method. Specifically, it iterates through offline surface vessel time-position data and buoy time-position data, finding the buoy time closest to the current surface vessel data point time on the timestamp. Finally, for each surface vessel's time point, the algorithm returns the buoy position corresponding to the nearest buoy to each surface vessel endpoint timestamp on the timestamp.
[0008] The beneficial effects of this invention are as follows: Unlike traditional search and matching methods, since the input data has a temporal sequence and all sequences V and B_f are arrays sorted in ascending time, taking the S_i-th boat end time point as an example, the current best matching point of the f-th buoy is the B_fk-th position. Therefore, when iterating to the S_i+1-th boat end time point, the index of the current best matching point of the f-th buoy must be greater than or equal to B_fk. Based on this, when searching for the i+1-th nearest buoy matching point, the matching algorithm does not need to traverse from the starting buoy point. In actual application testing, the time complexity of the improved time matching algorithm is O(n), while the time complexity of the traditional search and matching algorithm is O(n^2). Attached Figure Description
[0009] Figure 1 This is a schematic diagram of the overall process of the method of the present invention;
[0010] Figure 2 This is a flowchart of the main algorithm of the method of the present invention. Detailed Implementation
[0011] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0012] Step (1): Read the test information and obtain the number of smart buoys F and the corresponding time series data B_f;
[0013] Step (2): Obtain the temporal position of the surface vessel in the current experiment as sequence V, and save the temporal position information from the start to the end of the experiment. The sequence length is lenV, and the elements of the sequence are tuples [uTms, uPos], where uTms represents the timestamp of the surface vessel end, uPos represents the current position of the surface vessel end, and uPos contains two elements: the longitude value uPos.lon and the latitude value uPos.lat.
[0014] Step (3): Sort the sequences V and B_f (f takes values of 1, 2, 3, ..., F) in ascending order of time;
[0015] Step (4): Obtain the sorted time-series position sequence B_f of the smart buoys, that is, the time-series position sequence corresponding to the F smart buoys is B_1, B_2, ... B_F, and their sequence lengths are lenB_1, lenB_2, ..., lenB_F respectively. The sequence elements are tuples [bTms, bPos], where bTms represents the smart buoy data timestamp, bPos represents the buoy coordinate information corresponding to the timestamp, and bPos contains two elements: geographical coordinate latitude and longitude bPos.lon and bPos.lat; initialize a two-dimensional array RES with dimensions [F, len_V], which is used to find the best matching position point between each buoy and each element in the sequence V on the time scale, where RES[f][S_i] represents the best matching point between the S_i element in the V sequence and the f-th buoy;
[0016] Step (5): Iterate through the number of floats f, starting from 1 and assigning values until f equals F+1, at which point the method ends; each time f is iterated, initialize two variables S_i and B_fk as pointers to the V sequence and the B_f sequence respectively, assign values of 1 to S_i and B_fk, and execute step (6).
[0017] Step (6): Initialize the variable lastTimeDiff to the absolute difference between the timestamps of the data pointed to by S_i and B_fk, that is, assign lastTimeDiff the value abs(V[S_i].uTms-B_f[B_fk].bTms);
[0018] Step (7): Calculate the absolute difference between the timestamps of the sequence elements pointed to by S_i and B_fk, which is tempDiff. That is, assign tempDiff the value abs(V[S_i].uTms-B_f[B_fk].bTms);
[0019] Step (8): If the value of tempDiff is less than or equal to lastTimeDiff, that is, lastTimeDiff is assigned the value of tempDiff, and the value of the corresponding position of RES is updated, that is, the element of RES[f][S_i] is assigned the value of B_f[B_fk].bPos, and the value of B_fk is updated to B_fk+1; otherwise, the value of S_i is updated, that is, S_i is updated to S_i+1, and the absolute difference between the timestamps of the elements pointed to by the new S_i and B_fk is saved, that is, lastTimeDiff is assigned the value of abs(V[S_i].uTms-B_f[B_fk].uTms);
[0020] When updating the pointer variable S_i, if S_i is assigned the value vLen+1, the method completes the matching of the current float, and then returns to step (5) to update the float number;
[0021] Step (9): If step (6) finds that B_fk is equal to lenB_f when updating B_fk, then the value of B_fk remains unchanged, and the position information B_f[B_fk].uPos of the element pointed to by the current B_fk is saved in RES as the best matching position of the float S_i and its subsequent elements in the V sequence. That is, RES[k][f] is assigned the value B_f[B_fk].uPos, where k=i,i+1,...,lenV; the method completes the matching of the current float and returns to step (4) to continue traversing the float number;
[0022] Step (10): When all the buoys have been traversed according to steps 5-8, i.e., when f equals F+1, all the elements in the RES matrix have been assigned values. The resulting RES matrix is the best matching matrix between the surface vessel and the buoy.
[0023] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. A method for matching the temporal position data of a surface vessel and a buoy, characterized in that, Includes the following steps: Step S1: Obtain all time-position data for both the unmanned surface vessel and the buoy; Step S2: Filter the two types of time series data from step S1, remove duplicate data, and sort them in ascending order according to time. Step S3: Obtain the buoy time data closest to the current surface vessel data point from the timestamp of the unmanned surface vessel; Step S4: Based on the time point of each surface vessel, the algorithm returns the buoy position data of the nearest buoy to the endpoint timestamp of each surface vessel corresponding to each buoy; Step S5: Determine if there is any unmatched unmanned surface vessel (USV) time-position data. If yes, perform USV time-position data matching for each buoy and then make the judgment again. Repeat step S3. If no, complete the time-position data matching based on the buoy position data obtained in step S4. in: Step S1 includes: reading the time-series position data of the surface vessel in the current test from the time-position data and storing it in the binary array V; reading the time-series position data of the buoys participating in the current test from the database and storing it in the binary array B_f, where f takes the value [1, F] and F is the total number of buoys participating in the test; Step S2 includes: filtering based on the start time T_start and end time T_end of the experiment, deduplicating and updating V and B_f; and initializing relevant parameters: the time frame of the surface vessel is S_i=1, and the time frames of the F buoys are initialized to B_fk=1, where f takes the value range [1,F], k takes the value [1, len_B_j], and len_B_j represents the length of the j-th buoy sequence; Step S3 includes: traversing the time-series data B_f of the buoys and traversing the time-series position data V of the surface vessels; for each buoy f, calculating the absolute difference between the timestamp of B_f[B_fk] and V[S_i].uTms; if the absolute difference is less than or equal to the absolute difference of the timestamp of the buoy at the previous moment, then saving the absolute time difference between the current corresponding B_fk and the index corresponding to S_i into the best matching matrix RES; when all F buoys have completed matching at the time of S_i, then updating S_i and repeating this step. Step S4 includes: repeating the above steps until for each data point in V, for each buoy, the nearest matching point can be found and saved to RES; by accessing the data of B_f data using the best matching result element as the index, the data of the nearest buoy in the data time scale of V can be obtained; The in-place operation of deduplication and sorting of the binary arrays V and B_f is performed. The length of array V and the length of array B_f depend on the sampling frequency of their respective time series data. When the sampling frequency of the buoy is less than the sampling frequency of the surface boat end data, the same buoy time series data is matched with multiple boat end time series data to meet the requirement of matching the minimum absolute time difference. When traversing the F-th buoy sequence, B_f[B_fk] represents the B_fk-th structural data of the current F-th buoy. If the absolute time difference between B_f[B_fk].bTms and V[S_i].uTms in step S4 is less than or equal to the absolute time difference (lastTimeDiff) between B_f[B_fk-1].bTms and V[S_i].uTms, then the value of RES[f][S_i] in the RES matching matrix is updated to B_f[B_fk-1].bPos; otherwise, it means that there is no optimal matching result for S_i and f, and the traversal continues to the next buoy until the time sequence point at the end of the boat for S_i is matched with all F buoys. After traversing all the timing points at the hull end and assigning values to all elements of the RES array, when B_fk is traversed to a value equal to lenB_f, the position information of the last point of the buoy, B_f[B_fk].bPos, is assigned to the subsequent elements of RES[f].
2. The method for matching the temporal position data of surface vessels and buoys according to claim 1, characterized in that, In step S1, F is set to the total number of buoys participating in the current experiment, which refers to the number of different buoy IDs corresponding to the experiment number buoy data that can be obtained from the offline buoy table of the current database; the element structure of the binary array V and B_f is [uTms, uPos], where uTms represents the timestamp of the surface boat end data or buoy data, and uPos represents the geographic coordinate location, containing two elements: geographic longitude value uPos.lon and geographic latitude value uPos.lat.
3. The method for matching the temporal position data of surface vessels and buoys according to claim 1, characterized in that, The time-series position sequence read from the start to the end of the experiment is named B_f; its sequence lengths are lenB_1, lenB_2, ..., lenB_F, and the sequence elements are tuples [bTms, bPos], where bTms represents the smart buoy data timestamp, bPos represents the buoy coordinate information corresponding to the timestamp, and bPos contains two elements: geographical coordinates latitude and longitude bPos.lon and bPos.lat; in step S3, the time frame S_i of the surface vessel data represents the index of the data traversed in step S4, and the time frame B_fk of the buoy data represents the index value of the F-th buoy.
4. The method for matching the temporal position data of surface vessels and buoys according to claim 1, characterized in that, After traversing all the buoys, when f equals F+1, all elements in the RES matrix have been assigned values. The resulting RES matrix is the best matching matrix between the surface vessel and the buoy.
5. The method for matching the temporal position data of surface vessels and buoys according to claim 1, characterized in that, Also includes: The data acquired from the unmanned surface vessel (USV) is arrayed as V, and the buoy data is arrayed as B_f (f=1,2,…F), with each array element being a tuple of [Tms, Pos]. The data in arrays V and B_f are sorted in ascending order of time. F is set to 1, and S_i is initialized to 1, where i is used to iterate through the USV data. A two-dimensional array RES[F][Len_V] is initialized to store the position of buoy f corresponding to the i-th time point in V. The buoy position is then checked to see if the traversal is complete (f>F). If not, S_i is initialized to 1, B_f to 1, and RES[f][S_i]=B_f[B_fk].bPos is initialized, and lastTimeDiff=abs(V[S_i].uTms - The process begins by checking if the surface boat end data S_i has been traversed and is not greater than Len_V. If not, f = f + 1 is used to check if the buoy has been traversed (f > F). If yes, abs(V[S_i].uTms - B_f[B_fk].bTms) is calculated and assigned the value tempDiff. If tempDiff is less than lastTimeDiff, tempDiff is assigned the value lastTimeDiff and RES[F][S_i] is recorded as B_f[B_fk].bPos. Otherwise, S_i is updated to S_i + 1, and the surface boat end data is traversed again. If B_fk is less than lenB_f, B_fk is updated to B_fk + 1, and tempDiff is checked if it is less than lastTimeDiff. If not, S_i is updated to S_i + 1, and the surface boat end data is traversed again. This continues until the buoy has been traversed and f > F.
Citation Information
Patent Citations
Automatic remote sensing data and buoy data matching method and system
CN105574206A
Unmanned ship evaluation system
CN111523771A