Track query method, system and device based on AIS data
By conducting multi-level indexing of ship AIS trajectory and channel topology and using segment matching algorithms, the track query process is optimized, the complexity of massive AIS data query is solved, and the fast and accurate track query is achieved.
Patent Information
- Application Number
- CN202411355330.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-09-27
AI Technical Summary
When processing massive AIS data, the calculation complexity of track query is high, making it difficult to meet the real-time query needs, especially when the inland waterway network is sparse.
By multi-level indexing of the point data of the ship's AIS trajectory with the waterway topology, path event data is generated, and segment matching algorithm is used for real-time correlation matching, the track query process and algorithm are optimized.
It realizes a fast fuzzy query of ship tracks, ensures that the error value is within the control range, greatly improves the efficiency of track query, and solves the complexity of massive trajectory points matching and query.
Smart Images

Figure CN118885506B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of ship navigation technology, and in particular, relates to a track query method, system and device based on AIS data. Background Art
[0002] With the introduction and implementation of relevant decisions in the field of water transport, economic activities on water are becoming increasingly frequent, which puts forward higher requirements on the ability to perceive and process traffic information in busy waters. In order to improve the efficiency and safety of navigation, the International Maritime Organization has vigorously built the ship automatic identification system AIS (Automatic Identification System), which has achieved full coverage of AIS signals in key maritime waters and major ports, and can monitor ships in real time.
[0003] At present, all inland waterway ships are equipped with the Automatic Identification System (AIS), which sends data to the management department through positioning equipment. The historical trajectory of the ship can be queried through AIS data.
[0004] However, due to the high density of AIS data track points, when there are many ships in the area, the matching and query of massive track points are currently based on point-line-surface matching algorithms, which have high computational complexity and large amount of calculations, and are difficult to meet the needs of real-time business queries; at the same time, compared with the road network, inland waterways have the characteristics of sparse waterway networks, fewer intersections, and longer waterway lengths. Therefore, a new track query method is urgently needed to solve the above technical defects.
[0005] The above statements are only used to provide background technical information related to the present application. Unless otherwise stated herein, the contents described in this section are not prior art for the contents of other parts of the present application. Summary of the invention
[0006] The track query method, system and device based on AIS data proposed in the present invention optimize the process and algorithm of traditional channel track query, realize fast fuzzy query of ship track, and ensure that its error value is within the control range, greatly improving the efficiency of track query based on AIS data. To a certain extent, it solves the above technical defects of current channel query.
[0007] The present invention combines the point data of the ship's AIS track with the channel topology for multi-level indexing, and generates path event data while collecting the track data, thereby improving the query efficiency of subsequent area query and path query.
[0008] According to a first aspect of an embodiment of the present application, a track query method based on AIS data is provided, comprising:
[0009] Traversing each channel of the channel network, dividing the channel into fixed length segments to obtain multiple segments, determining the segment index and the offset distance of each point in the channel relative to the starting point of the segment; the channel includes multiple channel centerline points;
[0010] The point of interest data is associated and matched with the flight segments through the flight segment matching algorithm, and the offset distance of the point of interest is calculated;
[0011] The track point data in the AIS data is matched with the flight segments in real time through the flight segment matching algorithm, and the offset distance of the track point is calculated to obtain the real-time flight segment matching result of the track point data;
[0012] According to the real-time matching results of the flight segments of the trajectory point data, the route event data corresponding to the trajectory point data is determined; the route events include the route of the flight segment, the route of the intersection and the route of the point of interest;
[0013] The route event data is searched according to the query request to obtain the track query result.
[0014] In some embodiments of the present application, determining the segment index and the offset distance of each point in the route relative to the starting point of the segment includes:
[0015] The channel index where the flight segment is located is used as the first-level index of the flight segment, and the second-level index of the flight segment is set; the flight segment index is composed of the first-level index of the flight segment and the second-level index of the flight segment;
[0016] According to the position of the starting point of the segment and the position of each point in the channel, the offset distance of each point in the channel relative to the starting point of the segment is calculated in sequence according to the first offset formula.
[0017] In some embodiments of the present application, according to the position of the starting point of the segment and the position of each point in the channel, the offset distance of each point in the channel relative to the starting point of the segment is calculated in sequence according to the first offset formula, including:
[0018] Assume that the flight segment includes multiple centerline points (p1, p 2... p n ), the coordinates are (x1,y1),(x2,y2)...(x n ,y n ); p1 is the starting point of the centerline of the flight segment;
[0019] The p n Offset distance relative to the flight segment It is calculated by the following first offset formula:
[0020] ;
[0021] in, Is the loop variable.
[0022] In some embodiments of the present application, the point of interest data is associated and matched with the flight segments through a flight segment matching algorithm, including:
[0023] Determine the two channel centerline points closest to the target point of interest, and form a matching line by the two closest channel centerline points;
[0024] According to the perpendicular line from the interest point to the matching line, determine the matching point closest to the interest point on the matching line;
[0025] Find the target channel centerline point closest to the matching point;
[0026] According to the segment where the target channel centerline point is located, the segment index of the target point of interest is determined.
[0027] In some embodiments of the present application, the offset distance of the target interest point and the offset distance of the trajectory point are calculated by a second offset formula;
[0028] Assume that the two closest centerline points to the target point of interest are p1 and p2, with coordinates (x1, y1) and (x2, y2) respectively; the offset of p1 relative to the starting point of the segment is l0; the point of interest or trajectory point is a, with coordinates (x0, y0);
[0029] Calculate the offset parameter m using the following formula:
[0030] ;
[0031] Calculate the offset distance of the target interest point or trajectory point through the second offset calculation formula :
[0032] When m<0,
[0033] ;
[0034] When m>0,
[0035] .
[0036] In some embodiments of the present application, determining the route event data corresponding to the trajectory data according to the real-time matching result of the flight segments of the trajectory point data includes the following steps in sequence:
[0037] Monitor the real-time matching process of flight segments of trajectory point data;
[0038] When the matched course is different from the previous course, the track intersection is searched and the data field of the intersection approach event is added;
[0039] When the matched route is different from the previous segment, the end time of the previous segment is calculated and the data field of the segment path event is added;
[0040] When passing a certain point of interest, add the data field of the point of interest passing event.
[0041] In some embodiments of the present application, the following steps are also included:
[0042] When the matched route is different from the previous route, determine whether the current route is adjacent to the previous route;
[0043] If the current flight segment is not adjacent to the previous flight segment, find the passing flight segment between the current flight segment and the previous flight segment and add the data field of the flight segment passing event.
[0044] According to a second aspect of an embodiment of the present application, a track query system based on AIS data is provided, comprising:
[0045] The channel network preprocessing module preprocesses the channel network based on the channel topology data and the channel centerline data, divides the channel into multiple segments with fixed lengths, determines the index data of each point in the segment and the offset distance of each point relative to the starting point of the segment;
[0046] The point of interest data is associated and matched with the flight segments through the flight segment matching algorithm, and the offset distance of the point of interest is calculated;
[0047] The flight segment matching module associates and matches the trajectory data of the AIS data with the flight segment through the flight segment matching algorithm, and calculates the offset distance data of the trajectory data to obtain the real-time flight segment matching result of the trajectory data;
[0048] The route calculation module determines the route event data corresponding to the trajectory data according to the real-time matching results of the flight segments of the trajectory point data; the route events include the route of the flight segment, the route of the intersection and the route of the point of interest;
[0049] The track query module searches for route event data according to the query request and obtains the track query result.
[0050] According to a third aspect of an embodiment of the present application, a track query device based on AIS data is provided, including: a memory for storing executable instructions; and a processor for connecting to the memory to execute the executable instructions to complete a track query method based on AIS data of an all-flash system.
[0051] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement a track query method based on AIS data in an all-flash memory system.
[0052] The track query method, system and device based on AIS data of the present application include traversing each channel of the channel network, dividing the channel into fixed length segments to obtain multiple segments, determining the segment index and the offset distance of each point in the channel relative to the starting point of the segment; the channel includes multiple channel centerline points; the point of interest data is associated and matched with the segment through the segment matching algorithm, and the offset distance of the point of interest is calculated; the track point data in the AIS data is associated and matched with the segment in real time through the segment matching algorithm, and the offset distance of the track point is calculated to obtain the real-time segment matching result of the track point data; according to the real-time segment matching result of the track point data, the path event data corresponding to the track data is determined; the path event includes the segment path, the intersection path and the point of interest path; according to the query request, the path event data is searched to obtain the track query result. The present application optimizes the process and algorithm of the traditional channel track query, realizes the fast fuzzy query of the ship track, and can ensure that its error value is within the control range, which greatly improves the efficiency of the track query based on AIS data. To a certain extent, the above-mentioned technical defects of the current channel query are solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0054] Figure 1 A schematic diagram of the structure of the track query method based on AIS data according to an embodiment of the present application is shown in FIG.
[0055] Figure 2 The schematic diagram of the steps of waterway network preprocessing according to an embodiment of the present application is shown in Figure 1 ;
[0056] Figure 3 The schematic diagram of the steps of waterway network preprocessing according to an embodiment of the present application is shown in Figure 2 ;
[0057] Figure 4 A schematic diagram of the steps of determining pathway event data according to an embodiment of the present application is shown in FIG.
[0058] Figure 5 A schematic diagram of the steps of performing a track search query 1 according to an embodiment of the present application is shown in FIG.
[0059] Figure 6 A schematic diagram of the process of waterway network preprocessing according to an embodiment of the present application is shown in FIG.
[0060] Figure 7 A schematic diagram of a process for determining pathway event data according to an embodiment of the present application is shown in FIG.
[0061] Figure 8 A schematic diagram of the structure of a track query system based on AIS data according to an embodiment of the present application is shown in FIG.
[0062] Fig. 9 A schematic diagram of the structure of a track query device according to an embodiment of the present application is shown in FIG. DETAILED DESCRIPTION
[0063] Regarding this application, considering that the traditional AIS data trajectory points are relatively dense, when there are a large number of ships in the area, the matching and query of massive trajectory points are currently based on point-line-surface matching algorithms, which have high calculation complexity and large amount of calculation, and it is difficult to meet the needs of real-time business queries; at the same time, compared with the road network, the inland waterway has the characteristics of a relatively sparse channel network, fewer intersections, and a longer channel length.
[0064] Therefore, a new track query method is urgently needed to optimize the traditional method and achieve fast query.
[0065] The present invention pre-processes the ship track points and channel topology, divides the channel network into segments of relatively fixed lengths in multiple levels, associates and matches the points of interest with the segments, and processes the track point data into path event data in the subsequent AIS acquisition process, thereby achieving rapid fuzzy query of the ship's track while ensuring that the error value is within a control range.
[0066] The present invention combines the point data of the ship's AIS track with the channel topology for multi-level indexing, and generates path event data while collecting the track data, thereby improving the query efficiency of subsequent area query and path query.
[0067] The track query method, system and device based on AIS data of the present application include traversing each channel of the channel network, dividing the channel into fixed-length segments to obtain multiple segments, determining the segment index and the offset distance of each point in the channel relative to the starting point of the segment; the channel includes multiple channel centerline points; the point of interest data is associated and matched with the segment through a segment matching algorithm, and the offset distance of the point of interest is calculated; the track point data in the AIS data is associated and matched with the segment in real time through a segment matching algorithm, and the offset distance of the track point is calculated to obtain the real-time segment matching result of the track point data; according to the real-time segment matching result of the track point data, the path event data corresponding to the track data is determined; the path event includes the segment path, the intersection path and the point of interest path; the path event data is searched according to the query request to obtain the track query result.
[0068] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0069] Example 1
[0070] Figure 1 A structural schematic diagram of a track query method based on AIS data according to an embodiment of the present application is shown in FIG.
[0071] like Figure 1 As shown, the track query method based on AIS data includes the following steps:
[0072] S1: traverse each channel of the channel network, divide the channel into fixed length segments to obtain multiple segments, determine the segment index and the offset distance of each point in the channel relative to the starting point of the segment; the channel includes multiple channel centerline points;
[0073] S2: Associating and matching the POI data with the flight segments through the flight segment matching algorithm, and calculating the offset distance of the POI;
[0074] S3: The track point data in the AIS data is matched with the flight segments in real time through the flight segment matching algorithm, and the offset distance of the track point is calculated to obtain the flight segment real-time matching result of the track point data;
[0075] S4: According to the real-time matching result of the flight segments of the trajectory point data, the route event data corresponding to the trajectory data is determined; the route events include the flight segment route, the intersection route and the point of interest route;
[0076] S5: Searching for route event data according to the query request to obtain a track query result.
[0077] The present invention combines the point data of the ship's AIS track with the channel topology for multi-level indexing, and generates path event data while collecting the track data, thereby improving the query efficiency of subsequent area query and path query.
[0078] Figure 2 The schematic diagram of the steps of waterway network preprocessing according to an embodiment of the present application is shown in Figure 1 .
[0079] like Figure 2 As shown, next, S1 determines the segment index and the offset distance of each point in the route relative to the starting point of the segment, specifically including:
[0080] S11: The channel index where the flight segment is located is used as the first-level index of the flight segment, and the second-level index of the flight segment is set; the flight segment index is composed of the first-level index of the flight segment and the second-level index of the flight segment;
[0081] S12: According to the position of the starting point of the flight segment and the position of each point in the channel, the offset distance of each point in the channel relative to the starting point of the flight segment is calculated in sequence according to the first offset formula.
[0082] Among them, S12 calculates the offset distance of each point in the channel relative to the starting point of the segment according to the position of the starting point of the segment and the position of each point in the channel according to the first offset formula, specifically including:
[0083] Assume that the flight segment includes multiple centerline points (p1, p 2... p n ), the coordinates are (x1,y1),(x2,y2)...(x n ,y n ); p1 is the starting point of the centerline of the flight segment;
[0084] The p n Offset distance relative to the flight segment It is calculated by the following first offset formula:
[0085] ;
[0086] in, Is the loop variable.
[0087] Figure 3 The schematic diagram of the steps of waterway network preprocessing according to an embodiment of the present application is shown in Figure 2 .
[0088] like Figure 3 As shown, next, S2 associates and matches the POI data with the flight segments through the flight segment matching algorithm, including:
[0089] S21: Determine the two channel centerline points closest to the target point of interest, and form a matching line by the two closest channel centerline points;
[0090] S22: determining a matching point on the matching line that is closest to the interest point according to a perpendicular line from the interest point to the matching line;
[0091] S23: Find the target channel centerline point closest to the matching point;
[0092] S24: Determine the segment index of the target point of interest according to the segment where the target channel centerline point is located.
[0093] In a specific implementation, the offset distance of the target interest point is calculated by a second offset formula, and the second offset formula is calculated as follows:
[0094] Assume that the two closest centerline points to the target point of interest are p1 and p2, with coordinates (x1, y1) and (x2, y2) respectively; the offset of p1 relative to the starting point of the segment is l0; the point of interest is a, and its coordinates are (x0, y0);
[0095] Calculate the offset parameter m using the following formula:
[0096] ;
[0097] Calculate the offset distance of the target point of interest by using the second offset calculation formula :
[0098] When m<0,
[0099] ;
[0100] When m>0,
[0101] .
[0102] After the channel network preprocessing is completed, the next step S3 is to associate and match the track points in the AIS data with the flight segments through the flight segment matching algorithm, and calculate the offset distance of the track points to obtain the flight segment real-time matching results of the track points.
[0103] The process of associating and matching the trajectory point data in the AIS data with the flight segments in real time through the flight segment matching algorithm in S3 is the same as the process of associating and matching the point of interest data with the flight segments through the flight segment matching algorithm in S2, and specifically includes the following steps: determining the two channel centerline points closest to the target trajectory point, and forming a matching line by the two closest channel centerline points; determining the matching point closest to the point of interest on the matching line based on the perpendicular line from the point of interest to the matching line; finding the target channel centerline point closest to the matching point; and determining the flight segment index of the target trajectory point based on the flight segment where the target channel centerline point is located.
[0104] In a specific implementation, the offset distance of the target trajectory point is also calculated by the second offset formula, and the second offset formula is calculated as follows:
[0105] Assume that the two closest centerline points to the target trajectory point are p1 and p2, with coordinates (x1, y1) and (x2, y2) respectively; the offset of p1 relative to the starting point of the segment is l0; the trajectory point is a, and its coordinates are (x0, y0);
[0106] Calculate the offset parameter m using the following formula:
[0107] ;
[0108] Calculate the offset distance of the target trajectory point using the second offset calculation formula :
[0109] When m<0,
[0110] ;
[0111] When m>0,
[0112] .
[0113] Figure 4 A schematic diagram of the steps for determining pathway event data according to an embodiment of the present application is shown in FIG.
[0114] like Figure 4 As shown, in step S3, the track point data in the AIS data is matched with the flight segment in real time, and S4 is performed according to the real-time matching result of the flight segment of the track point data to determine the path event data corresponding to the track point data, which includes the following steps in sequence:
[0115] S41: Real-time matching process of flight segments of monitoring trajectory point data;
[0116] S42: When the matched channel is different from the previous channel, the track intersection is searched and the data field of the intersection passage event is added;
[0117] S43: When the matched route is different from the previous flight segment, the end time of the previous flight segment is calculated, and a data field of the flight segment path event is added;
[0118] S44: When passing through a certain point of interest, a data field of the point of interest passage event is added.
[0119] Preferably, determining the path event data corresponding to the trajectory data further comprises the following steps:
[0120] When the matched route is different from the previous route, determine whether the current route is adjacent to the previous route;
[0121] If the current flight segment is not adjacent to the previous flight segment, find the passing flight segment between the current flight segment and the previous flight segment and add the data field of the flight segment passing event.
[0122] When calculating the path event, the time interval between AIS track points is relatively long. When the ship enters the next leg, or passes through an intersection or point of interest, the time it takes to pass the path point needs to be calculated.
[0123] Assume that the previous AIS track point is (a1, t1), the next track point is (a2, t2), and the waypoint is a (a is the end of the segment or intersection or point of interest). The time t of the waypoint is as follows:
[0124] According to the matching algorithm, a1 corresponds to the offset distance l1 of the starting point of the flight segment, and the corresponding passage time is t1; a2 corresponds to the offset distance l2 of the starting point of the flight segment, and the corresponding passage time is t2; the passage point a corresponds to the distance l from the starting point of the flight segment (if the above 3 points match different flight segments, the distances need to be spliced).
[0125] Time of waypoint: t=t1+(t2-t1)×(l-l1) / (l2-l1);
[0126] The route event data includes different event types such as route segment starting point, route segment end point, route intersection, route point of interest, etc.
[0127] Specific data fields include route time, route type, segment index, ship MMIS number (maritime mobile service identification code), point of interest index and other data.
[0128] Figure 5 A schematic diagram of the steps of performing track search query one according to an embodiment of the present application is shown in FIG.
[0129] like Figure 5 Finally, based on the pathway data, the following fuzzy search can be performed:
[0130] (1) Area query for a specific time period, such as querying ships passing through area Z between time t1 and t2.
[0131] The specific query steps include:
[0132] S51: First, the starting point of the flight segment in the target area Z is queried according to the ray method to determine the relevant flight segments in the area Z.
[0133] Determine whether the starting point and end point of the flight segment are within area Z. The calculation formula is as follows:
[0134] Let the point coordinates be targetPoint(x,y), and the vertices of the polygon area be combined into ptList, with a total of n vertices.
[0135] The calculation algorithm for whether a point is inside a polygon is as follows:
[0136] If inside evaluates to true, the polygon is inside the polygon, otherwise it is outside the polygon.
[0137] var inside = false;
[0138] for (var index = 0; index <n; index++)
[0139] {var p1 = ptList[index];
[0140] var p2 = ptList[(index + 1) % n];
[0141] if((targetPoint.Y <p1.Y != targetPoint.Y<p2.Y))
[0142] {var vec = p2-p1;
[0143] var t = (targetPoint.Y- p1.Y) / (p2.Y - p1.Y);
[0144] var x = t * (p2.X - p1.X) + p1.X;
[0145] if(x>targetPoint.X&&t>0&&t<1)
[0146] {inside = !inside;
[0147] }
[0148] }
[0149] }
[0150] S52: After determining the relevant flight segments in area Z through the above steps, query the route data of all flight segments included in area Z based on the time period.
[0151] Because the flight segment is in units of 1KM, there may be a certain error. For example, at time t1, the ship actually just passed the starting point of the flight segment and did not enter the area. However, according to the algorithm, since the flight segment is within the range, the ship will appear in the query results. Therefore, there is a certain time error. The error value is Δt. The formula is:
[0152] Δt=Δl / v;
[0153] Among them, Δl is the interval length, usually 1KM; v is the average speed of the channel, usually 20KM / h.
[0154] Therefore, Δt is about 3 minutes. In actual business operations, the query time period can be adjusted according to this error value.
[0155] (2) Query of ships passing through a specific waterway, a specific route, a specific point of interest, or a specific intersection during a specific time period.
[0156] Considering that the present invention adopts the secondary index of waterway and flight segment, when querying the waterway, the primary index can be used for query; when querying the flight segment, the secondary index can be used for query, and the points of interest associated with the flight segment can be quickly queried.
[0157] Similarly, because the flight segments are in units of 1KM, the query results have a certain degree of ambiguity.
[0158] (3) Similar route ship query: query the similarity of specific ships on a specific route within a certain time period. If the similarity is high, there may be a companion relationship.
[0159] Similarity can be used to query the sequence of a specific ship passing through a channel or intersection during the time period. If the sequences of other ships overlap a lot with that of the ship, it can be determined that the paths are similar.
[0160] To further illustrate the track query method based on AIS data of this embodiment, the following is further explained and supplemented in conjunction with the flow chart.
[0161] Firstly, the AIS data collection module uses the KAFKA message queue to receive AIS data from different sources and store them in the queue for use by the subsequent waterway network matching module.
[0162] At the same time, the waterway network preprocessing module is used to preprocess the waterway topology data, waterway centerline data and key points of interest data, and divide the long-distance waterways into relatively fixed-length segments (the segment length is usually 1KM), ultimately forming multi-level index data for the segments.
[0163] Figure 6 A schematic diagram of the process of waterway network preprocessing according to an embodiment of the present application is shown in FIG.
[0164] like Figure 6 As shown, in a specific implementation, each channel of the channel network is traversed in S1, and the channel is segmented into fixed lengths to obtain multiple segments, which includes the following steps in sequence:
[0165] Receiving a preprocessing command, traversing the channel centerline points of each channel of the channel network, starting from the channel starting point;
[0166] Set the fixed length of the segment to n. When the channel length is greater than twice the fixed length n, that is, when the channel is greater than 2n, calculate the distance from the starting point to the current centerline point; if the distance from the starting point to the current centerline point is greater than 1 times the fixed length, segment and generate new segment data; otherwise, move the current centerline point downward and recalculate the distance until the distance is greater than 1 times the fixed length;
[0167] If the route length is not greater than twice the fixed length n, new segment data is generated; thereby avoiding segmenting very short segments to form segment fragments. If it is a very short segment, it is not easy to match the segment.
[0168] After the current channel ends, start traversing the next channel.
[0169] On this basis, the locations of points of interest are matched and associated with the flight segments.
[0170] In the specific implementation, the original topological data of the waterway includes the intersection set (V, E), where V is the node, i.e., the intersection set (v1,v 2... v n ), E is a channel set, each channel is composed of a channel centerline (p1, p 2... p n ) composition.
[0171] For inland waterways, the length of the channel is usually more than tens of kilometers. Through segmentation processing, the long channel is processed into segments of relatively fixed length, and the corresponding channel centerline point set is redivided into the centerlines of each segment. The offset of each point on the segment centerline relative to the starting point of the segment is calculated in the preprocessing. At the same time, virtual nodes are added to the topological network. The segment adopts a two-level index (I1, I2), I1 is the channel index, and I2 is the segment index within the same channel.
[0172] Suppose the centerline point p of a flight segment n There are several points (p1, p 2... p n ), whose coordinates are (x1,y1),(x2,y2)...(x n ,y n ), then p n Offset distance relative to the flight segment The formula is as follows:
[0173] ;
[0174] The point of interest a(x0,y0) needs to be matched to the centerline of the flight segment.
[0175] First, find the channel centerline 1km near the point of interest, obtain the two nearest channel centerline points p1(x1,y1) and p2(x2,y2), connect the two channel centerlines into a matching line, and determine the matching point closest to the point of interest on the matching line based on the perpendicular line from the point of interest to the matching line; then find the target channel centerline point closest to the matching point; finally, determine the segment index of the target point of interest based on the segment where the target channel centerline point is located. In this way, the segment index corresponding to the point of interest and the offset distance from the starting point of the segment are determined, and the corresponding association relationship is stored.
[0176] Regarding the offset distance of the point of interest, let the offset of p1 relative to the starting point of the segment be l0 (already calculated in preprocessing).
[0177] Calculate the offset parameter m using the following formula:
[0178] ;
[0179] Calculate the offset distance of the target point of interest by the second offset calculation formula :
[0180] When m<0,
[0181] ;
[0182] When m>0,
[0183] .
[0184] After AIS data collection, the channel / segment matching algorithm is first performed to match the track point data to the corresponding segment. The offset distance calculation formula is the same as the interest point offset calculation formula.
[0185] Next, the track path calculation module performs real-time distribution processing after receiving the AIS data. According to the segment index and relative offset distance obtained by the segment matching algorithm, the track data is converted into path event data through the path calculation method. The path events include segment paths, intersection paths and point of interest paths.
[0186] Figure 7 A schematic diagram of a process for determining pathway event data according to an embodiment of the present application is shown in FIG.
[0187] like Figure 7 As shown in the figure, considering that the AIS data interval is long, there may be a situation where the adjacent point trajectories span multiple segments. In this case, the route calculation method completes the segment data and generates intersection route data based on the channel topology data when crossing different channels. The route calculation process is as follows:
[0188] 1) Real-time matching process of flight segments of monitoring trajectory point data;
[0189] 2) When the matched channel is different from the previous channel, find the track intersection and add the data field of the intersection approach event;
[0190] 3) When the matched route is different from the previous segment, calculate the end time of the previous segment and add the data field of the segment path event;
[0191] 4) When passing a certain point of interest, add the data field of the point of interest passing event.
[0192] 5) When the matched route is different from the previous route, determine whether the current route is adjacent to the previous route;
[0193] 6) If the current flight segment is not adjacent to the previous flight segment, find the passing flight segment between the current flight segment and the previous flight segment and add the data field of the flight segment passing event.
[0194] Taking into account the long time interval between AIS track points, when the ship enters the next leg, or passes through an intersection or point of interest, it is necessary to calculate the time it takes to pass the waypoint.
[0195] Assume that the previous AIS track point is (a1, t1), the next track point is (a2, t2), and the waypoint is a (a is the end of the segment or intersection or point of interest). The time t of the waypoint is as follows:
[0196] According to the matching algorithm, a1 corresponds to the offset distance l1 of the starting point of the segment; a2 corresponds to the offset distance l2 of the starting point of the segment; the waypoint a corresponds to the distance l of the starting point of the segment (if the above 3 points match different segments, the distances need to be spliced).
[0197] Waypoint time: t = t1 + (t2 − t1) × (l − l1) / (l2 − l1);
[0198] The route event data includes different event types such as route segment starting point, route segment end point, route intersection, route point of interest, etc.
[0199] Specific data fields include route time, route type, segment index, ship NMIS number, point of interest index and other data.
[0200] Finally, based on the pathway data, the following fuzzy searches can be performed:
[0201] (1) Area query for a specific time period, such as querying ships passing through area Z between time t1 and t2.
[0202] (2) Query of ships passing through a specific waterway, a specific route, a specific point of interest, or a specific intersection during a specific time period.
[0203] (3) Similar route ship query: query the similarity of specific ships on a specific route within a certain time period. If the similarity is high, there may be a companion relationship.
[0204] The present invention can greatly improve the efficiency of ship query in waterway network, especially for large areas and massive AIS data, in query scenarios such as area query and path query, it can greatly improve the service response time and reduce the cost of computing resources.
[0205] In summary, the track query method, system and device based on AIS data of the present application include traversing each channel of the channel network, dividing the channel into fixed-length segments to obtain multiple segments, determining the segment index and the offset distance of each point in the channel relative to the starting point of the segment; the channel includes multiple channel centerline points; the point of interest data is associated and matched with the segment through a segment matching algorithm, and the offset distance of the point of interest is calculated; the track point data in the AIS data is associated and matched with the segment in real time through a segment matching algorithm, and the offset distance of the track point is calculated to obtain the real-time matching result of the segment of the track point data; according to the real-time matching result of the segment of the track point data, the path event data corresponding to the track data is determined; the path event includes the segment path, the intersection path and the point of interest path; the path event data is searched according to the query request to obtain the track query result.
[0206] This application optimizes the process and algorithm of traditional channel track query, realizes fast fuzzy query of ship track, and ensures that its error value is within the control range, greatly improving the efficiency of track query based on AIS data. To a certain extent, it solves the above technical defects of current channel query.
[0207] The present invention pre-processes the ship track points and channel topology, divides the channel network into segments of relatively fixed lengths in multiple levels, associates and matches the points of interest with the segments, and processes the track point data into path event data in the subsequent AIS acquisition process, thereby achieving rapid fuzzy query of the ship's track while ensuring that the error value is within a control range.
[0208] The present invention combines the point data of the ship's AIS track with the channel topology for multi-level indexing, and generates path event data while collecting the track data, thereby improving the query efficiency of subsequent area query and path query.
[0209] Example 2
[0210] This embodiment provides a track query system based on AIS data. For details not disclosed in the track query system based on AIS data in this embodiment, please refer to the specific implementation content of the track query method based on AIS data in other embodiments.
[0211] Figure 8 A structural schematic diagram of a track query system based on AIS data according to an embodiment of the present application is shown in FIG.
[0212] like Figure 8 As shown, the track query system based on AIS data includes a waterway network preprocessing module 10 , a segment matching module 20 , a route calculation module 30 and a track query module 40 .
[0213] Specifically,
[0214] A channel network preprocessing module 10 preprocesses the channel network based on the channel topology data and the channel centerline data, divides the channel into multiple segments by fixed length, determines the index data of each point in the segment and the offset distance of each point relative to the starting point of the segment;
[0215] The point of interest data is associated and matched with the flight segments through the flight segment matching algorithm, and the offset distance of the point of interest is calculated;
[0216] The flight segment matching module 20 associates and matches the trajectory data of the AIS data with the flight segment through a flight segment matching algorithm, and calculates the offset distance data of the trajectory data to obtain a real-time flight segment matching result of the trajectory data;
[0217] The route calculation module 30 determines the route event data corresponding to the trajectory data according to the real-time matching result of the flight segments of the trajectory point data; the route events include the flight segment routes, intersection routes and points of interest routes;
[0218] The track query module 40 searches for route event data according to the query request to obtain a track query result.
[0219] Finally, the track query system based on AIS data of the present application is adopted, the channel network preprocessing module 10 traverses each channel of the channel network, divides the channel into fixed-length segments to obtain multiple segments, determines the segment index and the offset distance of each point in the channel relative to the starting point of the segment; the channel includes multiple channel centerline points; the point of interest data is associated and matched with the segment through the segment matching algorithm, and the offset distance of the point of interest is calculated; the segment matching module 20 associates and matches the trajectory point data in the AIS data with the segment in real time through the segment matching algorithm, and calculates the offset distance of the trajectory point to obtain the real-time segment matching result of the trajectory point data; the route calculation module 3 determines the route event data corresponding to the trajectory data according to the real-time segment matching result of the trajectory point data; the route event includes the segment route, the intersection route and the point of interest route; the track query module 40 searches for the route event data according to the query request to obtain the track query result.
[0220] This application optimizes the process and algorithm of traditional channel track query, realizes fast fuzzy query of ship track, and ensures that its error value is within the control range, greatly improving the efficiency of track query based on AIS data. To a certain extent, it solves the above technical defects of current channel query.
[0221] The present invention pre-processes the ship track points and channel topology, divides the channel network into segments of relatively fixed lengths in multiple levels, associates and matches the points of interest with the segments, and processes the track point data into path event data in the subsequent AIS acquisition process, thereby achieving rapid fuzzy query of the ship's track while ensuring that the error value is within a control range.
[0222] The present invention combines the point data of the ship's AIS track with the channel topology for multi-level indexing, and generates path event data while collecting the track data, thereby improving the query efficiency of subsequent area query and path query.
[0223] Example 3
[0224] This embodiment provides a track query device based on AIS data. For details not disclosed in the track query device of this embodiment, please refer to the specific implementation content of the track query method or system based on AIS data in other embodiments.
[0225] Fig. 9 Schematic diagram of the structure of the track query device 400 according to an embodiment of the present application is shown in FIG.
[0226] like Fig. 9 As shown, the track query device 400 includes:
[0227] Memory 402: used to store executable instructions; and
[0228] Processor 401: used to connect with memory 402 to execute executable instructions to complete the track query method or image recognition method based on AIS data.
[0229] Those skilled in the art will understand that Figure 7 It is only an example of the track query device 400 and does not constitute a limitation of the track query device 400. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the track query device 400 may also include input and output devices, network access devices, buses, etc.
[0230] The processor 401 (Central Processing Unit, CPU) may also be other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general processor may be a microprocessor or the processor 401 may also be any conventional processor, etc. The processor 401 is the control center of the track query device 400, and uses various interfaces and lines to connect various parts of the entire track query device 400.
[0231] The memory 402 can be used to store computer-readable instructions. The processor 401 implements various functions of the track query device 400 by running or executing the computer-readable instructions or modules stored in the memory 402 and calling the data stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the track query device 400, etc. In addition, the memory 402 can include a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM) or other non-volatile / volatile storage devices.
[0232] If the module integrated in the track query device 400 is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware to complete it through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-mentioned various method embodiments can be implemented.
[0233] Example 5
[0234] This embodiment provides a computer-readable storage medium on which a computer program is stored; the computer program is executed by a processor to implement the track query method based on AIS data in other embodiments.
[0235] The track query device and storage medium of the embodiment of the present application include traversing each channel of the channel network, dividing the channel into fixed-length segments to obtain multiple segments, determining the segment index and the offset distance of each point in the channel relative to the starting point of the segment; the channel includes multiple channel centerline points; the point of interest data is associated and matched with the segment through a segment matching algorithm, and the offset distance of the point of interest is calculated; the track point data in the AIS data is associated and matched with the segment in real time through the segment matching algorithm, and the offset distance of the track point is calculated to obtain the real-time segment matching result of the track point data; according to the real-time segment matching result of the track point data, the path event data corresponding to the track data is determined; the path event includes the segment path, the intersection path and the point of interest path; the path event data is searched according to the query request to obtain the track query result.
[0236] This application optimizes the process and algorithm of traditional channel track query, realizes fast fuzzy query of ship track, and ensures that its error value is within the control range, greatly improving the efficiency of track query based on AIS data. To a certain extent, it solves the above technical defects of current channel query.
[0237] The present invention pre-processes the ship track points and channel topology, divides the channel network into segments of relatively fixed lengths in multiple levels, associates and matches the points of interest with the segments, and processes the track point data into path event data in the subsequent AIS acquisition process, thereby achieving rapid fuzzy query of the ship's track while ensuring that the error value is within a control range.
[0238] The present invention combines the point data of the ship's AIS track with the channel topology for multi-level indexing, and generates path event data while collecting the track data, thereby improving the query efficiency of subsequent area query and path query.
[0239] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0240] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0241] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0242] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0243] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0244] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0245] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0246] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A track query method based on AIS data, characterized in that: include: Traversing each channel of the channel network, dividing the channel into fixed-length segments to obtain a plurality of segments, and determining a segment index and an offset distance of each point in the channel relative to a starting point of the segment; the channel includes a plurality of channel centerline points; The point of interest data is associated and matched with the flight segments through the flight segment matching algorithm, and the offset distance of the point of interest is calculated; The track point data in the AIS data is matched with the flight segments in real time by using the flight segment matching algorithm, and the offset distance of the track point is calculated to obtain the flight segment real-time matching result of the track point data; Determine the route event data corresponding to the trajectory point data according to the real-time matching result of the flight segment of the trajectory point data; the route event includes the route of the flight segment, the route of the intersection and the route of the point of interest; Search the route event data according to the query request to obtain a track query result; The step of associating and matching the point of interest data with the flight segments by using a flight segment matching algorithm includes: Determine two channel centerline points closest to the target point of interest, and form a matching line by the two closest channel centerline points; Determine, on the matching line, a matching point closest to the target interest point according to a perpendicular line from the target interest point to the matching line; Find the target channel centerline point closest to the matching point; The segment index of the target point of interest is determined according to the segment where the target channel centerline point is located.
2. The track query method based on AIS data according to claim 1, characterized in that: Determining the segment index and the offset distance of each point in the route relative to the starting point of the segment includes: The route index where the flight segment is located is used as the first-level index of the flight segment, and the second-level index of the flight segment is set; the flight segment index is composed of the first-level index of the flight segment and the second-level index of the flight segment; According to the position of the starting point of the segment and the position of each point in the channel, and the first offset formula, the offset distance of each point in the channel relative to the starting point of the segment is calculated in sequence.
3. The track query method based on AIS data according to claim 1, characterized in that: According to the position of the starting point of the segment and the position of each point in the channel, and the first offset formula, the offset distance of each point in the channel relative to the starting point of the segment is calculated in sequence, including the following steps: Assume that the flight segment includes multiple centerline points (p1, p 2... p n ), the coordinates are (x1,y1),(x2,y2)...(x n ,y n ); p1 is the starting point of the flight segment centerline; Then p n Offset distance relative to the flight segment It is calculated by the following first offset formula, where the first offset formula is: 。 4. The track query method based on AIS data according to claim 1, characterized in that: The offset distance of the calculated interest point and the offset distance of the calculated trajectory point are calculated by the second offset formula; the calculation process is as follows: Assume that the two closest centerline points of the channel to the target point of interest or target trajectory point are p1 and p2, with coordinates (x1, y1) and (x2, y2) respectively; the offset of p1 relative to the starting point of the segment is l0; the point of interest or trajectory point is a, and its coordinates are (x0, y0); Calculate the offset parameter m using the following formula: ; Calculate the offset distance of the target interest point or target trajectory point by the second offset calculation formula : When m<0, ; When m>0, 。 5. The track query method based on AIS data according to claim 1, characterized in that: Determining the route event data corresponding to the trajectory point data according to the real-time matching result of the flight segments of the trajectory point data comprises the following steps in sequence: Monitor the real-time matching process of flight segments of trajectory point data; When the matched course is different from the previous course, the track intersection is searched and the data field of the intersection approach event is added; When the matched route is different from the previous segment, the end time of the previous segment is calculated and the data field of the segment path event is added; When passing a certain point of interest, add the data field of the point of interest passing event.
6. The track query method based on AIS data according to claim 5, characterized in that: The following steps are also included: When the matched route is different from the previous route, determine whether the current route is adjacent to the previous route; If the current flight segment is not adjacent to the previous flight segment, find the passing flight segment between the current flight segment and the previous flight segment and add the data field of the flight segment passing event.
7. A track query system based on AIS data, characterized in that: include: The channel network preprocessing module preprocesses the channel network based on the channel topology data and the channel centerline data, divides the channel into multiple segments with fixed lengths, determines the index data of each point in the segment and the offset distance of each point relative to the starting point of the segment; The point of interest data is associated and matched with the flight segments through the flight segment matching algorithm, and the offset distance of the point of interest is calculated; The flight segment matching module associates and matches the trajectory data of the AIS data with the flight segment through the flight segment matching algorithm, and calculates the offset distance data of the trajectory data to obtain the flight segment real-time matching result of the trajectory point data; The step of associating and matching the point of interest data with the flight segments by using a flight segment matching algorithm includes: Determine two channel centerline points closest to the target point of interest, and form a matching line by the two closest channel centerline points; Determine, on the matching line, a matching point closest to the target interest point according to a perpendicular line from the target interest point to the matching line; Find the target channel centerline point closest to the matching point; According to the flight segment where the target channel centerline point is located, the flight segment index of the target point of interest is determined; the route calculation module determines the route event data corresponding to the trajectory point data according to the real-time matching result of the flight segment of the trajectory point data; the route event includes the route of the flight segment, the route of the intersection and the route of the point of interest; The track query module searches the route event data according to the query request to obtain the track query result.
8. A track query device based on AIS data, characterized in that: include: A storage unit for storing executable instructions; as well as A processing unit, configured to be connected to the memory to execute executable instructions to complete the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Global path planning method based on navigation channel information
CN111857140A
Intelligent route recommendation method and system based on global historical ship tracks
CN114066354A
