A Method for Extracting Multi-Ship Encounter Scenarios Based on Graph Model
Through the graph model-based method, the ship AIS trajectory data set is constructed and time sliced and topological structure transformation is performed, the Havinson distance and weight are calculated, and the graph model is clustered, which solves the representation problem of dynamic relationships in multiple ship encounter scenarios, and effectively extracts and classifications in multiple ship encounter scenarios.
Patent Information
- Application Number
- CN202310878965.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-18
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2043-07-18
AI Technical Summary
The existing technology is difficult to effectively characterize the dynamic relationship in the scene of multiple ships. The scene extraction method of multiple ships is usually simplified to multiple two ships to analyze the scene, which loses the coupling of the dynamic relationship between multiple ships.
Using a graph model-based method, the ship AIS trajectory dataset is constructed, time slice and topological structure diagram transformation is performed, the properties of nodes and edges are defined, the Havinson distance and weight are calculated, the graph model is clustered, and the scene clusters and representative diagrams of multiple ships are extracted, and the dynamic relationship between multiple ships is captured.
It realizes effective representation of multi-ship encounter scenarios, can better characterize the dynamic relationship changes between multiple ships, and provides basic support for the classification of multi-ship encounter scenarios.
Smart Images

Figure CN117312882B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to intelligent navigation technology, and particularly to a method for extracting multi-ship encounter scenarios based on a graph model. Background Art
[0002] With the development of intelligent navigation technology, the intelligent and autonomous technologies of the ship navigation environment have received the key attention of researchers. Complex navigable waters are characterized by high traffic density, high probability of ship encounter conflicts, and complex natural conditions, which increase the difficulty of identifying the navigation risks of ship encounters. Studying ship encounter problems can reduce the risk of ship collisions and enhance maritime transport safety. The multi-ship encounter scenario is a typical, important and complex situation in the study of ship navigation risks and one of the important and difficult problems in ship navigation risks. The multi-ship encounter scenario not only involves the mutual influence of current ship navigation conflicts, but also involves the mutual restriction of ship navigation decisions. Therefore, the study of multi-ship encounter scenarios is of great significance for ship navigation risk assessment, ship navigation avoidance decisions, etc.
[0003] A ship encounter usually refers to a situation where ships in sight meet and there is a risk of collision. In the International Regulations for Preventing Collisions at Sea, the encounter situations of two ships in sight are divided into three categories: head-on, crossing and overtaking. A multi-ship encounter means that in the target waters, when a ship faces multiple other ships at the same time, or the ship forms an encounter relationship with only one ship, but its collision avoidance action is restricted by other ships, three or more ships form a multi-ship encounter scenario. At present, domestic and foreign scholars have many achievements in the method for extracting two-ship encounter scenarios, including three methods based on ship domain, encounter motion parameters, and machine learning or deep learning. However, there are few research results on multi-ship encounters. Most of the ideas for extracting multi-ship encounter scenarios are to transform them into multiple two-ship encounter scenarios for analysis. Although the extraction difficulty of multi-ship encounters is simplified, the coupling of the dynamic relationships among multiple ships is lost, and the multi-ship encounter scenario cannot be well characterized. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method for extracting multi-ship encounter scenarios based on a graph model in view of the defects in the prior art.
[0005] The technical solution adopted by the present invention to solve its technical problems is as follows: A method for extracting multi-ship encounter scenarios based on a graph model, comprising the following steps:
[0006] 1) Construct an AIS trajectory data set of ships;
[0007] The AIS trajectory data set includes the MMSI number, longitude and latitude coordinates, true course, speed over the ground, and ship type of the ship;
[0008] 2) Data slicing: After dividing the AIS trajectory dataset according to the time slicing threshold, the AIS trajectory dataset for each time sub-segment i is obtained; the time slicing threshold is set so that the same ship appears only once in one sliced time sub-segment.
[0009] 3) Convert the AIS trajectory dataset for each time sub-segment i into a topological structure diagram according to the set constraint relationship.
[0010] Define the nodes and edges of the graph using an adjacency matrix. Use ships as the vertices (nodes) of the graph and the encounter relationship between ships as the edges of the graph; the node attributes are the MMSI and ship type of the ship, and the edge attribute is the Haversine distance between two ships.
[0011] 3.1) Calculate the Haversine distance between sample points in the AIS trajectory dataset for each time sub-segment i:
[0012]
[0013] In Equation (1), is the distance between the trajectory point of S a and the trajectory point of S b in time sub-segment i. is the trajectory point of trajectory S a in time sub-segment i; a smaller distance indicates a stronger connection relationship of the distance characteristics between vertices, and a larger distance indicates a weak connection relationship of the distance characteristics between vertices, that is, the distance between ships is too far to form a possible encounter relationship.
[0014] Set it to 1 when the distance connection relationship between nodes is strong, otherwise set it to 0.
[0015]
[0016] 3.2) Define the weight of the edge
[0017]
[0018] Matrix E i is the edge weight matrix in time sub-segment i. As shown in Equation (3), when there is a strong distance characteristic relationship between node pairs, use the Haversine distance between trajectory points to define the weight of the edge.
[0019] 4) Record the time sub-segment i where each graph model is located and convert the ship topological structure diagram into a dynamic graph model.
[0020] Define EGS = <G1, G2,..., G n >, and each G i is an undirected graph.
[0021] 4.1) Calculate the similarity of each state diagram;
[0022] Given two graphs G a and G b , the similarity ges(G a , G b );
[0023]
[0024] 4.2) Cluster each state diagram according to the similarity;
[0025] Two graphs G a and G b are considered to satisfy α - similarity if and only if ges(G a , G b ) ≥ α;
[0026] When the cluster C already contains a sufficient number of state diagrams, i.e., C = {G1,..., G k}, define two representative graphs of C: (1) G ∩ , the intersection of all state diagrams in the cluster C (including the largest common sub - graph); (2) G ∪ , the union of all state diagrams in the cluster C (including the smallest common super - graph). The graphs partitioned into the same cluster should satisfy a certain similarity threshold. G ∪ and G ∩ define the types of graphs in the cluster. The similarity within a cluster can be measured by G ∪ and G ∩ . Therefore, set the α - boundary to ensure that the newly inserted graph does not change the properties of the original cluster;
[0027] A graph cluster satisfies the α - boundary if and only if G ∩ and G ∪ are α - similar;
[0028] According to the above definition, EGS contains continuously changing graphs EGS = <G1, G2,..., G n >. Set a predefined threshold α to obtain the graph clusters C1, C2... in EGS;
[0029] 4.3) Define the set of all graphs i represents the time sub - segment where the graph is located, and x, y, z all represent the serial numbers of the graphs at the end position in the current sub - segment;
[0030] Obtain several meeting - scenario clusters SC that satisfy the β - boundary and the union R ∪ and the intersection R ∩ of the representative graphs that characterize the scenario clusters. The scenario cluster SC = {G 0 , G 1 , G2 ..., G i}, where i is the time sub - segment sequence in the cluster where graph G is located;
[0031] The final output multi - ship encounter scenario is the scenario cluster set SCSet and the scenario cluster representative graph set SGSet. Among them, SCSet = {SC1, SC2,..., SC n},
[0032] The graphs in the same scenario cluster depict the state of the multi - ship encounter scenario within a period of time. According to the graph structure and the attached time attributes in the encounter scenario cluster, the dynamic encounter scenario can be inverted.
[0033] The beneficial effects produced by the present invention are:
[0034] Taking the AIS data containing ship navigation information as the starting point, the present invention transforms the time - sliced AIS data into a graph model, and converts the graph data into encounter scenario clusters that meet the scenario constraints through the FVF model extraction algorithm. The extracted scenario result examples show that this method can better represent the multi - ship encounter scenario, depict the dynamic relationship changes among multiple ships, and provide basic support for the research on multi - ship encounter scenario classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The present invention will be further described below in conjunction with the drawings and embodiments. In the drawings:
[0036] Figure 1 is the flowchart of the method of the embodiment of the present invention;
[0037] Figure 2 is the principle diagram of the method of the embodiment of the present invention;
[0038] Figure 3 is the schematic diagram of the topological structure of the embodiment of the present invention;
[0039] Figures 4 to 7 is the statistical graph of hyperparameters of the embodiment of the present invention;
[0040] Figures 8 to 11 is the statistical graph of scenario parameters of the embodiment of the present invention;
[0041] Figure 12 is the display graph of scenario examples of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0043] As Figure 1 and Figure 2 shown, a method for extracting multi-ship encounter scenarios based on a graph model includes the following steps:
[0044] 1) Construct an AIS trajectory dataset of ships;
[0045] The AIS trajectory dataset includes the MMSI number, longitude and latitude coordinates, true course, speed over the ground, and ship type of the ship;
[0046] 2) Data slicing; after dividing the AIS trajectory dataset according to the time slicing threshold, obtain the AIS trajectory dataset of each time sub-segment i; the time slicing threshold is set so that the same ship only appears once in a sliced time sub-segment;
[0047] 3) Convert the AIS trajectory dataset of each time sub-segment i into a topological structure graph according to the set constraint relationship;
[0048] As Figure 3 , use the adjacency matrix to define the nodes and edges of the graph, with the ship as the vertex (node) of the graph and the encounter relationship between ships as the edge of the graph; the node attribute is the MMSI and ship type of the ship, and the edge attribute is the Haversine distance between two ships;
[0049] 3.1) Calculate the Haversine distance between sample points in the AIS trajectory dataset of each time sub-segment i:
[0050]
[0051] In formula (1), is the distance between the trajectory point of S a and the trajectory point of S b in time sub-segment i, is the trajectory point of trajectory S a in time sub-segment i; a smaller distance indicates a stronger connection relationship of the distance feature between vertices, and a larger distance indicates a weak connection relationship of the distance feature between vertices, that is, the distance between ships is too far to form a possible encounter relationship.
[0052] When the distance connection relationship between nodes is strong, set it to 1, otherwise set it to 0.
[0053]
[0054] 3.2) Define the weight of the edge
[0055]
[0056] Matrix E iLet \(W_i\) be the edge weight matrix in the time segment \(i\). As shown in Equation (3), when there is a strong distance feature relationship between node pairs, the Havens distance between trajectory points is used to define the weight of the edge.
[0057] 4) Record the time segment \(i\) where each graph model is located, and transform the ship topological structure graph into a dynamic graph model;
[0058] Define \(EGS = \lt G_1, G_2, \cdots, G\) n \(\gt\), where each \(G\) i is an undirected graph;
[0059] 4.1) Calculate the similarity of each state graph;
[0060] Given two graphs \(G\) a and \(G\) b , the similarity \(ges(G\) a , \(G\) b );
[0061]
[0062] 4.2) Cluster each state graph through similarity;
[0063] Two graphs \(G\) a and \(G\) b are considered to satisfy \(\alpha\)-similarity if and only if \(ges(G\) a , \(G\) b ) \(\geq \alpha\);
[0064] When the cluster \(C\) already contains a sufficient number of state graphs, i.e., \(C = \{G_1, \cdots, G\) k}\), define two representative graphs of \(C\): (1) \(G\) ∩ , the intersection of all state graphs in the cluster \(C\) (including the maximum common subgraph); (2) \(G\) ∪ , the union of all state graphs in the cluster \(C\) (including the minimum common supergraph). The graphs partitioned into the same cluster should satisfy a certain similarity threshold. \(G\) ∪ and \(G\) ∩ define the graph types in the cluster. The similarity in a cluster can be measured by \(G\) ∪ and \(G\) ∩ . Therefore, set the \(\alpha\) boundary to ensure that the newly inserted graph does not change the properties of the original cluster;
[0065] A graph cluster satisfies the \(\alpha\) boundary if and only if \(G\) ∩ and \(G\) ∪ are \(\alpha\)-similar;
[0066] According to the above definition, \(EGS\) contains continuously changing graphs \(EGS = \lt G_1, G_2, \cdots, G\) n \(\gt\). Set a predefined threshold \(\alpha\) to obtain the graph clusters \(C_1, C_2, \cdots\) in \(EGS\);
[0067] 4.3) Define the set of all time segment graphs i represents the time segment in which the graph is located, and x, y, and z all represent the serial numbers of the graphs at the end positions in the current segment;
[0068] Obtain several meeting scenario clusters SC that satisfy the β boundary and the union R of the representative graphs depicting the scenario clusters ∪ and the intersection R ∩ , the scenario cluster SC = {G 0 , G 1 , G 2 ..., G i}, where i is the time segment sequence of the graph G in the cluster;
[0069] The final output multi-ship meeting scenario is the scenario cluster set SCSet and the scenario cluster representative graph set SGSet. Among them, SCSet = {SC1, SC2,..., SC n},
[0070] The graphs in the same scenario cluster depict the state of the multi-ship meeting scenario within a period of time. The dynamic meeting scenario can be inverted based on the graph structure and the attached time attributes in the meeting scenario cluster.
[0071] Simulation experiment:
[0072] 1. Data preprocessing
[0073] Select a complex navigable water area in Zhoushan, Zhejiang for algorithm verification. In this area, the ship traffic volume is large and the meeting scenarios are complex, which belongs to a typical complex navigable water area and is of great significance for the study of ship meetings. The dataset consists of AIS messages on January 3, 2023 in the research area. After decoding the data, the types of AIS information to be retained include: Maritime Mobile Service Identity (MMSI), ship length, longitude, latitude, course over ground, speed over ground, and timestamp, etc. After preprocessing, passenger ships, cargo ships, and oil tankers with speeds between 2 and 20 knots are retained.
[0074] 2. Hyperparameters
[0075] 2.1 Time slice threshold
[0076] To confirm the threshold TT for slicing the data by time, randomly select 50 ships to count the time intervals of AIS message transmissions, Figure 5Bar chart of the average time for each ship to send AIS messages. Since there are significant differences in the average times, the mode value of the average time is obtained as Mode = 14.22 s, as shown Figure 4 by the horizontal line in Figure 5 . It can be seen from
[0077] that the time intervals for most ships to send AIS messages are slightly less than the Mode value. Therefore, TT = 10 s is taken. Figure 5 The original data is sliced by time according to TT = 10 s, and the number of ships in the time sub-segments is counted. Randomly select the number of ships in different sub-segments as shown
[0078] 2.2 Distance threshold
[0079] After dividing the AIS dataset according to the time slice threshold TT, calculate the Haversine distance for each time sub-segment. Given the longitude and latitude of any two points in the data, the distance between two points considering the curvature of the earth can be calculated. The longitude and latitude of trajectory points a and b are (lon1, lat1) and (lon2, lat2) respectively, and the radius of the earth is r. The formula for the Haversine distance is as follows:
[0080]
[0081] The average distance of each time sub-segment is as shown Figure 6 . The average value of the distances is 24519 m, as shown Figure 7 by the blue horizontal line in Figure 7 . Statistical analysis of the distance distribution shows that the proportion of distances less than 2000 m is 0.018, and the average distance in this range is 1276 m. The proportion of other distance segments is as shown
[0082] 3. Experimental results and analysis
[0083] 3.1 Scenario analysis
[0084] Through the multi-ship encounter scenario extraction algorithm, setting the scenario similarity threshold β = 0.5, there are a total of 794 scenario clusters. The maximum number of ships participating in the scenario cluster is 9. Among them, there are 429 two-ship encounter scenario clusters, 149 three-ship encounter scenario clusters, 58 four-ship encounter scenario clusters, 44 five-ship encounter scenario clusters, 44 six-ship encounter scenario clusters, 35 seven-ship encounter scenario clusters, 12 eight-ship encounter scenario clusters, and 5 nine-ship encounter scenario clusters.
[0085] The statistical results of the number of scenarios and the duration in each scenario cluster are as shown Figure 8 and 9as shown Figure 8 It is reflected that the number of scenarios in most scenario clusters is within 100, and the maximum number of scenarios can reach about 400. Figure 9 It is reflected that the duration of most scenario clusters is within 1000s, and the longest duration is about 6000s. The trend shapes of the vertical coordinates in the two figures are similar, and there is basically a corresponding relationship between the number of scenarios and the duration of scenarios.
[0086] The statistical results of the maximum number of participating ships in the scenario and the difference between the maximum and minimum number of participating ships between scenarios are as Figure 10 and Figure 11 . It can be seen from the results in the two figures that for the k-ship encounter scenario, the actual number of scenarios is relatively close to the actual number of scenarios when the difference in the number of ships is k-2. Therefore, it can be shown that the scenario similarity threshold β can ensure that the difference in the number of participating ships in most scenarios remains within the range of fluctuations of 2 ships, and this ship scenario extraction method is relatively stable.
[0087] 3.2 Scenario Instance Display
[0088] Some of the extracted scenarios are shown as examples. Randomly select the scenario diagrams of the 4-ship scenario cluster and draw them as follows:
[0089] This 4-ship scenario cluster has a total of 24 scenario diagrams, with a maximum number of ships of 4, a minimum number of ships of 2, a duration of 1410 seconds, and the MMSIs of the 4 ships s1, s2, s3, and s4 are 413212120, 413434740, 413827766, and 412351640 respectively. Figure 12 This is the instance diagram of the encounter scenario. This scenario cluster starts from the s1 and s2 scenarios, stabilizes in the 3-ship scenario composed of s1, s2, and s3 between 120s and 830s, forms a 4-ship scenario at 840s after experiencing a 2-ship scenario, then changes between 3- and 4-ship scenarios between 890s and 1330s, and starts to return to the 3-ship scenario composed of s1, s2, and s3 at 1340s, and finally gradually stabilizes in the 2-ship scenario composed of s1 and s2, as Figure 12 shown
[0090] It should be understood that those of ordinary skill in the art can make improvements or changes according to the above description, and all such improvements and changes should fall within the protection scope of the appended claims of the present invention.
Claims
1. A method for extracting multi-ship encounter scenarios based on a graph model, characterized in that It includes the following steps: 1) Construct the AIS trajectory dataset of the ship; The AIS trajectory dataset includes the MMSI number, longitude and latitude coordinates, true course, speed over ground, and ship type of the ship; 2) Data slicing; after dividing the AIS trajectory dataset according to the time slicing threshold, the AIS trajectory dataset of each time sub-segment i is obtained; 3) According to the AIS trajectory dataset of each time sub-segment i and based on the set constraint relationship, obtain the ship topology structure diagram of each time sub-segment i; The adjacency matrix is used to define the nodes and edges of the graph. The ship is used as the vertex of the graph, and the encounter relationship between ships is used as the edge of the graph; the node attribute is the MMSI and ship type of the ship, and the edge attribute is the Havens distance between two ships; 4) Record the time sub-segment i where each ship topology structure diagram is located, and extract the multi-ship encounter scenario according to the ship topology structure diagram; the specific steps are as follows: Define EGS = <G1, G2,..., G n >>, where each graph in the set is an undirected graph; 4.1) Calculate the similarity of each state graph; Given two graphs G a and G b , the similarity ges(G a , G b ); 4.2) Cluster each state graph through similarity; Two graphs G a and G b are considered to satisfy α-similar if and only if the similarity ges(G a , G b ) ≥ α; When the cluster C already contains a sufficient number of state diagrams, i.e., C = {G1,..., G k}, define two representative diagrams of C: (1) G ∩ , the intersection of all state diagrams in the cluster C; (2) G ∪ , the union of all state diagrams in the cluster C; The diagrams partitioned in the same cluster should satisfy a certain similarity threshold. G ∪ and G ∩ define the diagram types in the cluster. The similarity within a cluster can be measured by G ∪ and G ∩ . Therefore, set the α boundary to ensure that the newly inserted diagram does not change the properties of the original cluster; A family of graphs satisfies the α-boundary if and only if G ∩ and G ∪ are α-similar; According to the above definition, the EGS contains continuously changing graphs, EGS = <G1, G2,..., G n >. By setting a predefined threshold α, graph clusters C1, C2,... in the EGS can be obtained; 4.3) Define the set of all diagrams i represents the time sub - segment in which the diagram is located, and x, y, and z all represent the serial number of the diagram at the end position in the current sub - segment; Obtain several encounter scenario clusters SC that satisfy the β boundary, as well as the representative graph union G that depicts the scenario clusters ∪ and the intersection G ∩ , the scenario cluster SC = {G 0 , G 1 , G 2 ..., G i}, where i is the time sub-segment sequence in which the graph G in the cluster is located The final multi-ship encounter scenarios are the scenario cluster set SCSet and the scenario cluster representative graph set SGSet, where SCSet = {SC1, SC2,..., SC n}, The graphs in the same scenario cluster depict the state of the multi-ship encounter scenario within a period of time, and the dynamic encounter scenario is inverted according to the graph structure and the attached time attribute in the encounter scenario cluster.
2. The method for extracting multi-ship encounter scenarios based on a graph model according to claim 1, wherein In step 2), the time slicing threshold is set so that the same ship only appears once in a sliced time sub-segment.
3. The method for extracting multi-ship encounter scenarios based on a graph model according to claim 1, characterized in that In step 3), the edge attribute is calculated as follows: 3.1) Calculate the Havens distance between sample points in the AIS trajectory dataset of each time sub-segment i: In formula (1), is the distance between the trajectory points of S a in time segment i and the trajectory points of S b ; a distance less than the set distance threshold indicates a strong connection relationship of the distance feature between the vertices, and a distance greater than the set distance threshold indicates a weak connection relationship of the distance feature between the vertices, that is, the distance between ships is too far to form a possible encounter relationship; is the trajectory point of trajectory S a in time segment i; Set it to 1 when the distance connection relationship between nodes is strong, otherwise set it to 0; where DT is the distance threshold; 3.2) Define the weight of the edge Matrix E i is the edge weight matrix in time sub - segment i. As shown in Equation (3), when there is a strong distance - feature relationship between node pairs, the Havens distance between trajectory points is used to define the weight of the edge.
4. The method for extracting multi-ship encounter scenarios based on a graph model according to claim 1, wherein, In step 2), the time slicing threshold is set to 10s.
5. The method for extracting multi-ship encounter scenarios based on a graph model according to claim 3, wherein In step 2), the distance threshold is set to 2000m.
Citation Information
Patent Citations
Multi-ship meeting scene detection method, system and platform based on AIS data
CN114999231A
Data classifier for classifying pattern data into clusters
US20030169919A1