Inland ship turning behavior detection method and device based on sliding time window
By combining a sliding time window and a 9-dimensional extended intersection model with AIS data, the problems of insufficient real-time performance and cost-effectiveness in existing technologies for U-turn behavior detection are solved, achieving high-accuracy online identification and improving the efficiency of water traffic supervision.
Patent Information
- Application Number
- CN202310128132.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-13
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-02-13
AI Technical Summary
Existing ship behavior recognition methods suffer from insufficient real-time performance and low cost in detecting U-turn behavior. Furthermore, methods based on deep learning and CCTV video surveillance are inadequate in terms of accuracy and cost.
A sliding time window-based method for detecting U-turn behavior of inland waterway vessels is adopted. Combining trajectory-driven and spatial semantics, the method determines whether trajectory points meet the U-turn conditions by setting distance and orientation difference thresholds, and uses a 9-dimensional extended intersection model to perform topological calculations to filter U-turn features. The method is then combined with AIS data for detection.
It achieves high-accuracy online U-turn behavior recognition, improves the efficiency of port water traffic supervision, and provides semantic-level recognition results.
Smart Images

Figure CN116206267B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ship behavior recognition technology, specifically relating to a method and device for detecting the turning behavior of inland waterway vessels based on a sliding time window. Background Technology
[0002] The Yangtze River, known as the "Golden Waterway," plays an increasingly prominent role in my country's waterway transportation. Real-time acquisition of information such as inland waterway vessel traffic flow is crucial for ensuring smooth, efficient, safe, and environmentally friendly inland waterway transport. Vessel behavior research is a vital component of waterway transportation research. AIS (Automatic Identification System), composed of shore-based (base station) facilities and shipboard equipment, is a broadcast-style automatic information exchange device between ships and between ships and shore. It is currently a crucial means of acquiring vessel traffic flow information and analyzing vessel behavioral characteristics. Currently, maritime authorities have established multiple AIS base stations along the Yangtze River, greatly facilitating the collection of inland waterway vessel traffic flow data. AIS information mainly includes dynamic and static data of vessels, reflecting their on-board status and demonstrating the behavioral characteristics of inland waterway vessels. This plays a significant role in inland waterway transportation research; macroscopically, it allows for understanding the characteristics and patterns of vessel navigation and maneuvering, providing a basis for further research on other aspects of vessel traffic, the formulation of traffic management plans and relevant regulations, and the implementation of vessel traffic management. Researching methods for extracting ship behavior features based on AIS data can further improve the efficiency of maritime authorities in dynamically monitoring ships and provide theoretical support for safe navigation on inland waterways.
[0003] Currently, the main methods for ship behavior recognition include deep learning-based methods, rule-based methods, and CCTV video surveillance-based methods. First, deep learning-based methods offer high accuracy but cannot maintain real-time detection. Second, rule-based methods consider the impact of the ship's navigation environment on its behavior; however, these methods rely primarily on expert knowledge to establish behavioral rules, leading to inconsistent granularity and limiting the definition of a finite set of ship behaviors. Third, CCTV video surveillance-based methods require deploying cameras along the coast, resulting in high costs, and the accuracy of CCTV video analysis alone is generally low. The current methods' lack of real-time performance and cost-effectiveness are the main challenges facing U-turn behavior detection. Summary of the Invention
[0004] To address the problems existing in the prior art, this invention provides a method and device for detecting the turning behavior of inland waterway vessels based on a sliding time window. By combining trajectory-driven and spatial semantics, the turning behavior of inland waterway vessels can be identified.
[0005] To achieve the above objectives, the technical solution provided by this invention is as follows:
[0006] A method for detecting the turning behavior of inland waterway vessels based on a sliding time window includes the following steps:
[0007] Initialize the sliding window. Starting from the beginning of the trajectory, if the speed of the current trajectory point is greater than the dwell speed threshold, then the current trajectory point is used as the starting trajectory point of the sliding window; otherwise, the current trajectory point is moved one position backward.
[0008] Calculate the distance between the current trajectory point and the starting trajectory point of the current sliding window, and the azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window.
[0009] The distance and azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window are compared with the U-turn distance threshold and the U-turn azimuth difference threshold, respectively. If the distance between the current trajectory point and the starting trajectory point of the current sliding window is less than the U-turn distance threshold and the azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window is less than the U-turn azimuth difference threshold, the current trajectory point is added to the U-turn candidate trajectory point set. At the same time, the current trajectory point position and the total number of trajectory points are compared. If the current trajectory point position is less than the total number of trajectory points and the current trajectory point speed is greater than the dwell speed threshold, the current trajectory point is moved one position backward, and the distance and azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window are recalculated. Conversely, if the current trajectory point speed is less than the dwell speed threshold, the current trajectory point is designated as the end point of the sliding window. If the current trajectory point position is greater than or equal to the total number of trajectory points, the current trajectory point is designated as the end point of the sliding window. If the distance between the current trajectory point and the starting trajectory point of the current sliding window is less than the U-turn distance threshold and the azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window is less than the U-turn azimuth difference threshold cannot be satisfied simultaneously, the current trajectory point is designated as the end point of the sliding window.
[0010] Determine whether the turning of the candidate trajectory point set for U-turn meets the turning characteristics; if it does, then based on the 9-dimensional extended intersection model, filter the turning behaviors with U-turn characteristics through topological calculation, and determine the start and end times of the U-turn by calculating the azimuth difference change ratio.
[0011] Use the point after the end point of the sliding window as the starting point of the new sliding window trajectory, and repeat the above steps until all trajectory points have been determined.
[0012] Furthermore, the method specifically includes the following steps:
[0013] Step 1, assume the set of ship AIS data trajectories to be detected is P = {P} i}, where P iis the i-th trajectory point, where i ∈ [1, N] and N is the total number of trajectory points to be detected; let the sliding window be {P start , P temp , P end}, where P start and P end are the starting and ending trajectory points of the sliding window respectively, and start and end are the positions of the starting and ending trajectory points of the sliding window; P temp is the current trajectory point of the sliding window, temp is the position of the current trajectory point of the sliding window, temp1 is the position of the current trajectory point during the process of finding the starting point of the sliding window. Let D turn be the U-turn distance threshold, B turn be the U-turn azimuth difference threshold, V stop be the staying speed threshold, R s be the azimuth difference change rate threshold at the start point of a U-turn, and R e be the azimuth difference change rate threshold at the end point of a U-turn;
[0014] Step 2: Initialize the sliding window and find the starting point of the sliding window. Start from the starting point of the trajectory. If the speed V temp1 > V stop , then let the current sliding window start = temp1, temp = start + 1, end = start + 2; otherwise, move the current trajectory point one position backward, i.e., temp1 = temp1 + 1. At the same time, let the set of candidate U-turn trajectory points be Q turn_1 = {P start}, and the set of U-turn trajectory points be Q turn = {};
[0015] Step 3: Calculate the distance d and azimuth difference B temp and P start in the sliding window; diff ;
[0016] Step 4: Compare d and B diff with D stop and B turn respectively. If d < D stop and B diff < B turn , then add the current trajectory point to the set of candidate U-turn trajectory points Q turn_1 . At the same time, judge temp and N. If temp < N and if V temp > V stop , then move the current trajectory point one position backward, i.e., temp = temp + 1, and execute Step 3. If V temp <= V stopThen, the current trajectory point is taken as the end point of the sliding window, i.e., end = temp, and step five is executed. If d is less than D... stop And B diff turn If the conditions are not met simultaneously, the current trajectory point is taken as the end point of the sliding window, i.e., end = temp, and step five is executed;
[0017] Step 5: Calculate the set of candidate U-turn trajectory points Q. turn The direction of the turn, and whether it meets the characteristics of a U-turn;
[0018] Step 6: If the U-turn turning characteristics are met, then based on the 9-dimensional extended intersection model, the turning behavior with U-turn characteristics is screened through topological calculation.
[0019] Step 7: Calculate the azimuth difference change ratio r for each point in the candidate trajectory point set. c Combined with the threshold R of the rate of change of azimuth difference at the starting point of the U-turn s Threshold R for the rate of change of azimuth difference at the end point of the U-turn e To determine the start and end times of the U-turn;
[0020] Step 8, with P end The next point is used as the starting point of the new sliding window, that is, let start = end, temp = start + 1, end = start + 2, and proceed to step three;
[0021] Step 9: If end >= N, the detection is complete; otherwise, proceed to step 3.
[0022] Furthermore, the formula for calculating the distance d between two trajectory points is as follows:
[0023] d=R*arcos[cos(Y1)*cos(Y2)*cos(X1-X2)+sin(Y1)*sin(Y2)]
[0024] In the formula, R is the Earth's radius, X1 and X2 are the longitudes of the two points, and Y1 and Y2 are the latitudes of the two points.
[0025] Furthermore, the formula for calculating the bearing between two trajectory points is as follows:
[0026]
[0027] In the formula, Lon A Lon B For the longitude of the two points, Lat A Lat B The latitude of the two points;
[0028] The azimuth difference B between the two trajectory pointsdiff as follows:
[0029]
[0030] In the formula, bearing1 and bearing2 represent the orientations of the two points.
[0031] Furthermore, the U-turn distance threshold D stop =1000 meters, turning azimuth difference threshold B berth =160 degrees, dwell speed threshold V stop =0.5.
[0032] Furthermore, the threshold R for the rate of change of azimuth difference at the starting point of the turnaround. s =0.1, threshold R for the rate of change of azimuth difference at the end of the turn. e =0.9.
[0033] Furthermore, the computation matrix of the 9-dimensional extended intersection model DE-9IM is as follows:
[0034]
[0035] In the formula, A represents the interior of A, and A° represents the boundary of A. - This represents the outer region of A, and the same applies to B;
[0036] The 9-dimensional extended intersection model calculates the intersection between three regions of two spatial entities and obtains the DIM value; a DIM value of 0 indicates that the two entities intersect as a point, a DIM value of 1 indicates that the two entities intersect as a line, a DIM value of 2 indicates that the two entities intersect as a surface, and a DIM value of F indicates that the two entities intersect as an empty set;
[0037] The ship trajectory is abstracted as a line, and the turning area is abstracted as a surface. There are different topological relationships between the ship trajectory and the turning area, which are divided into: the ship crosses a certain surface area LA1, the ship sails close to a certain navigation area and part of the trajectory is tangent to the boundary of the area LA2, the ship sails outside the geographical area LA3, the ship sails into or out of a certain navigation geographical area LA4, the ship sails within a certain navigation geographical area LA5.
[0038] Based on the dimension-extended 9-intersection model, the turning behavior is formally represented as:
[0039]
[0040] turn={(Traj i =CLTC)∩(R DE-9IM (Traj i ,turn area )=LA1 / LA4)}
[0041] In the formula, Traj represents the ship's trajectory, i represents the ship (represented by the unique identifier MMSI), turn represents a turning action, and CLTC represents a continuous large-amplitude turn. area This represents the turning area; the meaning of this expression is that both the ship's trajectory has continuous large-amplitude turning behavior and the ship has a topological relationship that is separate from the turning area are satisfied at the same time. That is, the turning behavior contains two characteristics: first, the ship has continuous large-amplitude turning behavior; second, the ship is not located in the turning area.
[0042] The continuous, large-amplitude turning behavior can be formally expressed as:
[0043]
[0044]
[0045] In the formula, Traj represents the ship's trajectory, i represents the ship, and is represented by the unique identifier MMSI, P l Represents the l-th trajectory point, turn l ξ represents the steering ratio, and ξ represents the steering ratio threshold.
[0046] Furthermore, AIS data includes the ship's unique identifier MMSI, timestamp data, longitude coordinates, latitude coordinates, heading data, and speed data; the turning area refers to the latitude and longitude coordinates of the apex of the turning waterway.
[0047] A sliding time window-based inland waterway vessel mooring behavior detection device for implementing the above-described sliding time window-based inland waterway vessel turning behavior detection method is characterized by comprising a power supply, an AIS data interface, a user interface, a circuit board, a data processing module, and a turning behavior detection module.
[0048] The system includes a power supply for powering the system, a circuit board for mounting the various modules, an AIS data interface for importing external AIS data, a data processing module for preprocessing the input AIS data, a turning behavior detection module for detecting turning behavior in the preprocessed AIS data to obtain the ship's turning behavior, and a user interface for outputting the ship's turning behavior.
[0049] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0050] Based on traditional trajectory-driven methods, this invention combines trajectory-driven and environmental information, and through spatial geometric topology calculations, can provide inland waterway traffic regulators with semantic-level online U-turn behavior recognition results with high accuracy, greatly improving the efficiency of port waterway traffic supervision. Attached Figure Description
[0051] Figure 1 A flowchart illustrating the inland waterway vessel mooring behavior detection method provided by the present invention;
[0052] Figure 2 A topological diagram of the relationship between ships and the navigation geographical environment provided by this invention;
[0053] Figure 3 The 9-dimensional extended intersection calculation matrix provided by this invention;
[0054] Figure 4 A schematic diagram of the structure of the inland waterway vessel mooring behavior detection device provided by the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0056] This invention discloses a method for detecting the U-turn behavior of inland waterway vessels based on a sliding window. Before detection, spatial semantic data of the turning area is extracted. Then, a sliding time window algorithm is used to detect the U-turn behavior. The core step of this algorithm is to set an azimuth difference threshold and a distance threshold as the length of the sliding window, and then determine whether the trajectory points within the window meet the U-turn conditions. Next, based on a 9-dimensional extended intersection model, spatial geometric topology calculations are performed on the trajectory points within the window and the turning area to filter turning behaviors with U-turn characteristics. Finally, the start and end times of the U-turn are determined by the azimuth difference change ratio. This process is repeated until all trajectory points are identified. This invention also discloses an inland waterway vessel U-turn behavior detection device. Based on trajectory-driven operation, this method interacts with the environment to provide semantic-level online recognition of vessel behavior to waterway traffic regulators, achieving high accuracy and significantly improving the efficiency of waterway traffic supervision.
[0057] The present invention provides a method for detecting the turning behavior of inland waterway vessels based on a time sliding window, comprising the following steps:
[0058] Step 1: Initialize the sliding window. Starting from the starting point of the trajectory, if the speed of the current trajectory point is greater than the dwell speed threshold, then the current trajectory point is used as the starting trajectory point of the sliding window; otherwise, the current trajectory point is moved one position backward.
[0059] Step 2: Calculate the distance between the current trajectory point and the starting trajectory point of the current sliding window, and the azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window.
[0060] Step 3: Compare the distance and azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window with the turning distance threshold and the turning azimuth difference threshold, respectively. If the distance between the current trajectory point and the starting trajectory point of the current sliding window is less than the turning distance threshold and the azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window is less than the turning azimuth difference threshold, then add the current trajectory point to the set of candidate turning trajectory points. At the same time, determine the size of the current trajectory point position and the total number of trajectory points. If the current trajectory point position is less than the total number of trajectory points and the current trajectory point speed is greater than the dwell speed threshold, then move the current trajectory point one position backward and execute Step 2. Otherwise, if the current trajectory point speed is less than the dwell speed threshold, then the current trajectory point is the end point of the sliding window and execute Step 4. If the current trajectory point position is greater than or equal to the total number of trajectory points, then the current trajectory point is the end point of the sliding window and execute Step 4. If the distance between the current trajectory point and the starting trajectory point of the current sliding window is less than the turning distance threshold and the azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window is less than the turning azimuth difference threshold cannot be satisfied simultaneously, then the current trajectory point is the end point of the sliding window and execute Step 4.
[0061] Step four, next determine whether the turning direction of the set of candidate trajectory points for turning around meets the turning conditions;
[0062] Step 5: Based on the 9-dimensional extended intersection model, filter turning behaviors with U-turn characteristics through topological calculation;
[0063] Step 6: Determine the start and end times of the U-turn by calculating the ratio of changes in azimuth difference;
[0064] Step 7: Repeat steps 2 to 6 until all trajectory points have been determined;
[0065] Furthermore, such as Figure 1 As shown, the method specifically includes the following steps:
[0066] Step 1, assume the set of AIS data trajectories to be detected is P = {P} i}, where P i Let i be the i-th trajectory point, i∈[1,N], where N is the total number of trajectory points to be detected; let the sliding window be {P}. start ,P temp ,P end}, where P start and P end P represents the starting and ending trajectory points of the sliding window, where start and end are the positions of the starting and ending trajectory points, respectively. tempLet \(P\) be the current trajectory point of the sliding window, temp be the position of the current trajectory point of the sliding window, and temp1 be the position of the current trajectory point during the process of finding the starting point of the sliding window. Let \(D\) turn be the turning-around distance threshold, \(B\) turn be the turning-around azimuth difference threshold, \(V\) stop be the staying speed threshold, \(R\) s be the azimuth difference change rate threshold at the starting point of turning around, \(R\) e be the azimuth difference change rate threshold at the ending point of turning around;
[0067] Step 2: Initialize the sliding window and find the starting point of the sliding window. Start from the starting point of the trajectory. If the speed \(V\) of the current trajectory point temp1 \(>V\) stop , then let the starting point of the current sliding window start = temp1, temp = start + 1, end = start + 2; otherwise, move the current trajectory point one position backward, that is, temp1 = temp1 + 1. At the same time, let the set of candidate turning-around trajectory points be \(Q\) turn_1 \(=\{P\) start \}\), and the set of turning-around trajectory points be \(Q\) turn \(=\{\}\);
[0068] Step 3: Calculate the distance \(d\) and azimuth difference \(B\) temp and \(B\) start between \(P\) diff in the sliding window;
[0069] Step 4: Compare \(d\) and \(B\) diff with \(D\) stop and \(B\) turn respectively. If \(d < D\) stop and \(B\) diff \(< B\) turn , then add the current trajectory point to the set of candidate turning-around trajectory points \(Q\) turn_1 . At the same time, judge temp and \(N\). If temp < \(N\), and if \(V\) temp \(> V\) stop , then move the current trajectory point one position backward, that is, temp = temp + 1, and execute Step 3. If \(V\) temp \(\leq V\) stop , then take the current trajectory point as the ending point of the sliding window, that is, end = temp, and execute Step 5. If \(d\) is less than \(D\) stop and \(B\) diff \(< B\) turn do not satisfy simultaneously, then take the current trajectory point as the ending point of the sliding window, that is, end = temp, and execute Step 5;
[0070] Step 5: Calculate the turning direction of the obtained set of candidate turning-around trajectories \(Q\) turn and judge whether it meets the turning-around condition;
[0071] Step six: Finally, use topology calculations to filter out turning behaviors with U-turn characteristics;
[0072] Step 7: Calculate the azimuth difference change ratio r for each point in the candidate trajectory set. c To determine the start and end times of the U-turn;
[0073] Step 8, with P end The next point is used as the starting point of the new sliding window, that is, let start = end, temp = start + 1, end = start + 2, and proceed to step three;
[0074] Step 9: If end >= N, the detection is complete; otherwise, proceed to step 3.
[0075] The distance determination involves calculating the distance d between the starting point of the sliding window and the current trajectory point, and then comparing it with a dwell distance threshold D determined based on nautical experience. stop The distance between two trajectory points is calculated as follows:
[0076] d=R*arcos[cos(Y1)*cos(Y2)*cos(X1-X2)+sin(Y1)*sin(Y2)]
[0077] In the formula, R is the Earth's radius (km), X1 and X2 are the longitudes of the two points, and Y1 and Y2 are the latitudes of the two points.
[0078] The orientation between the two trajectory points is calculated as follows:
[0079]
[0080] In the formula, Lon A Lon B For the longitude and Lat of the two points A Lat B The latitudes of the two points are given.
[0081] When determining the azimuth difference, the azimuth difference B between the starting point of the sliding window and the current trajectory point is calculated. diff The difference between the turning bearing and the threshold B determined based on nautical experience. turn The azimuth difference between the two trajectory points is as follows:
[0082]
[0083] In the formula, bearing1 and bearing2 represent the orientations of the two points.
[0084] Preferably, the U-turn distance threshold D stop=1000 meters; U-turn azimuth difference threshold B berth =160 degrees; Dwell speed threshold V stop =0.5; Threshold R for the rate of change of azimuth difference at the starting point of the turnaround. s =0.1; Threshold R for the rate of change of azimuth difference at the end of the turn. e =0.9. The determination of the dwell point is based on the velocity of the trajectory point and the dwell velocity threshold V. stop The points where the speed is less than the dwell speed threshold are considered dwell points.
[0085] Furthermore, the interaction characteristics between ships and turning areas are primarily topological features; that is, ships are abstracted as points, ship trajectories as lines, and turning water areas as surfaces. Different topological relationships are determined based on the different characteristics of the topological interaction. Therefore, this invention uses a 9-dimensional extended intersection model to perform spatial geometric topological calculations on the ship trajectory points and the turning area.
[0086] The 9-dimensional extended intersection model determines the topological relationship between two spatial objects by judging the intersection results of their internal, external, and boundary regions. The 9-intersection model effectively distinguishes between four cases where the intersection of two spatial targets is empty, a point, a line, or a surface. It can be used to analyze the topological relationship between ship trajectories and the navigation environment. The calculation matrix of the 9-dimensional extended intersection model is as follows:
[0087]
[0088] In the matrix A represents the interior of A, and A° represents the boundary of A. - Let A represent the outer region. The 9-dimensional extended intersection model calculates the intersection between the three regions of the two spatial entities and obtains the value of DIM. A value of 0 indicates that the intersection result is a point, 1 indicates that the intersection result is a line, 2 indicates that the intersection result is a surface, and F indicates that the intersection result is an empty set.
[0089] Spatial geometric topology calculation refers to the different topological relationships arising from the different topological interaction characteristics between ships and their navigational geographical environment. Based on these topological relationships, they can be categorized into point-line, point-plane, line-line, and line-plane relationships, resulting in four types of 9-dimensional extended intersection matrix calculations between ships and their navigational geographical environment. These can be further divided into 15 types. The topological relationship involved in this invention is a line-plane relationship, wherein:
[0090] In line-surface relationships, the ship's trajectory is abstracted as a line, and the turning area is abstracted as a surface. There are different topological relationships between the ship's trajectory and the turning area, such as... Figure 2 and Figure 3As shown, the categories are: a ship traversing a certain area (LA1), a ship sailing close to a certain navigation area with part of its trajectory tangent to the boundary of the area (LA2), a ship sailing outside a geographical area (LA3), a ship entering or leaving a certain navigation geographical area (LA4), and a ship sailing within a certain navigation geographical area (LA5).
[0091] Continuous, large-amplitude turning behavior can be formally expressed as:
[0092]
[0093]
[0094] In the formula, Traj represents the ship's trajectory, i represents the ship, and is represented by the unique identifier MMSI, P l Represents the l-th trajectory point, turn l ξ represents the steering ratio, and ξ represents the steering ratio threshold.
[0095] Based on the 9-dimensional extended intersection model, the U-turn behavior can be formally represented as:
[0096]
[0097] turn={(Traj i =CLTC)∩(R DE-9IM (Traj i ,turn area )=LA1 / LA4)}
[0098] In the formula, Traj represents the ship's trajectory, i represents the ship (represented by the unique identifier MMSI), berth represents the turning behavior, CLTC represents the continuous large-amplitude turning behavior, and turn area The expression represents a turning area. It means that the ship's trajectory has a continuous large-amplitude turning behavior and the ship is topologically separated from the turning area. In other words, the turning behavior includes two characteristics: first, the ship has a continuous large-amplitude turning behavior; second, the ship is not located in the turning area.
[0099] Furthermore, AIS data includes the ship's unique identifier MMSI, timestamp data, longitude coordinates, latitude coordinates, heading data, and speed data; the turning area refers to the latitude and longitude coordinates of the apex of the turning waterway.
[0100] A sliding time window-based inland waterway vessel turning behavior detection device for implementing the above-described method includes a power supply, an AIS data interface, a user interface, a circuit board, a data processing module, and a turning behavior detection module.
[0101] The system includes a power supply for powering the system, a circuit board for mounting the various modules, an AIS data interface for importing external AIS data, a data processing module for preprocessing the input AIS data, a turning behavior detection module for detecting turning behavior in the preprocessed AIS data to obtain the ship's turning behavior, and a user interface for outputting the ship's turning behavior.
[0102] The technical solution of the present invention will be further described below with reference to specific embodiments:
[0103] The first step is to define the set of AIS data trajectories to be detected as P = {P1, P2, ..., P}. 29 ,P 25}, N=25, the coordinates of each trajectory point are as follows:
[0104] P1(114.32156, 30.60615333), P2(114.3221733, 30.60698333),
[0105] P3(114.3224133, 30.60728667), P4(114.32276, 30.60767333),
[0106] P5(114.32328, 30.60826333), P6(114.3235467, 30.60855),
[0107] P7(114.32428, 30.60939667), P8(114.3245333, 30.60967333),
[0108] P9(114.32476, 30.60993667), P10(114.3249867, 30.61018333),
[0109] P11(114.3252133, 30.61041333), P12(114.32568, 30.61085667),
[0110] P13(114.3258667, 30.61104333), P14(114.3260933, 30.61131667),
[0111] P15(114.3261733, 30.61144667), P16(114.3262267, 30.61158),
[0112] P17(114.3262533, 30.61188667), P18(114.3262, 30.61208),
[0113] P19(114.3260667, 30.61227), P20(114.3258, 30.61241333),
[0114] P21(114.3250667, 30.61197), P22(114.3246667, 30.61154333),
[0115] P23(114.3236933, 30.61065333), P24(114.32332, 30.61027333),
[0116] P25(114.32288,30.60988667);
[0117] Let the sliding window be {P} start ,P temp ,P end}, where P start and P end P represents the starting and ending trajectory points of the sliding window, where start and end are the positions of the starting and ending trajectory points, respectively. temp The current trajectory point of the sliding window is denoted as temp, the current position of the sliding window trajectory point is denoted as temp1, and the position of the current trajectory point during the process of finding the starting point of the sliding window is denoted as temp1. The threshold for the turning distance of the turning behavior detection is 1000 meters, the threshold for the dwell speed is 0.5, the threshold for the azimuth difference is 160 degrees, the threshold for the rate of change of the azimuth difference at the starting point of the turning is 0.1, and the threshold for the rate of change of the azimuth difference at the ending point of the turning is 0.9.
[0118] The second step is to initialize the sliding window, starting from P1, and compare V1 with V... stop V1 = 16.3, V1 ≥ 0.5, meaning temp1 = 1 is the starting point of the sliding window. Let start = 1, temp = 2, end = 3, P start =P1, P temp =P2, P end =P3, and let the set of candidate turning trajectory points be Q. turn_1 ={P1}, the set of turning trajectory points is Q turn ={};
[0119] The third step is to calculate the distance d and the azimuth difference B between P1 and P2. diff Therefore, step 2 is performed, and the calculated value is d = 90.207 meters, B diff =1.7982 degrees;
[0120] Fourth step, combine d and B diff respectively with D stop and B turnMake a comparison, so execute step 3, 90.207 < 1000 and 1.7982 < 160, that is, d < D stop and B diff < B turn , so add P2 to the candidate trajectory set Q turn_1 Among them, at the same time 2 < 25, that is, temp < N, and V2 = 16.4, that is, V2 > 0.5, P temp Move backward one point, that is, P temp = P3, and then execute step 2; [[ID=, so execute Step 2, and calculate to get d = 239.646 m, B diff = 6.2295 degrees;
[0126] Tenth step, compare d and B diff with D stop and B turn respectively. So execute Step 3, 239.646 < 1000 and 6.2295 < 160, that is, d < D stop and B diff < B turn , so add P4 to the candidate trajectory set Q turn_1 . At the same time, 5 < 25, that is, temp < N, and V5 = 13, that is, V5 > 0.5, P temp moves backward one point, that is, P temp = 6, and then execute Step 2;
[0127] Eleventh step, calculate the distance d and azimuth difference B diff between P1 and P6 diff = 4.2462 degrees;
[0128] Twelfth step, compare d and B diff with D stop and B turn respectively. So execute Step 3, 274.389 < 1000 and 4.2462 < 160, that is, d < D stop and B diff < B turn , so add P4 to the candidate trajectory set Q turn_1 . At the same time, 6 < 25, that is, temp < N, and V6 = 12.9, that is, V6 > 0.5, P temp moves backward one point, that is, P temp = 7, and then execute Step 2;
[0129] Thirteenth step, until temp = 21, calculate the distance d and azimuth difference B 21 between P1 and P diff , so execute Step 2, and calculate to get d = 585.586 m, B diff = 173.5569 degrees;
[0130] Fourteenth step, compare d and B diff with D stop and B turr respectively. So execute Step 3, 585.586 < 1000 and 173.5569 > 160, that is, d < D stop and B diff > B turn, then use the current trajectory point as the end point of the sliding window, i.e., end = 21, and execute Step 4;
[0131] Step 15. Calculate the set Q of candidate U-turn trajectory points turn_1 The overall turning direction can be known to be clockwise, meeting the U-turn feature;
[0132] Step 16. Perform topological calculation of the line and surface relationship between the candidate U-turn trajectory segment and the turning area of the U-turn water area, so as to filter out the turning behaviors with U-turn features. It can be known that there is no intersection relationship between the current candidate trajectory segment and the turning area of the U-turn water area.
[0133] Step 17. Calculate the azimuth difference change ratio r of each point in the candidate trajectory set c , it can be known that for P 15 the r c = 0.1214, that is, r c > R s , the U-turn start point is P 15 , and for P 21 the r c = 0.9213, that is, r c > R e , the U-turn end point is P 21 , add P 15~ P 21 to Q turn , and reset Q turn_1 = {};
[0134] Step 18. Since end = 21, that is, end < N, execute Step 2;
[0135] Step 19. Initialize the sliding window, start judging from P 22 , V 22 and V stop , V 22 = 11.6, V1 ≥ 0.5, that is, temp1 = 21 is the starting point of the sliding window, let start = 21, temp = 22, end = 23, P start = P 21 , P <00, so step 2 is executed, and d = 170.587 m is calculated, B diff = 1.3156 degrees;
[0137] Step 21, compare d and B diff with D stop and B turn respectively. So step 3 is executed, 170.587 < 1000 and 1.31556 < 160, that is, d < D stop and B diff < B turn , so P 22 is added to the candidate trajectory set Q turn_1 . At the same time, 22 < 25, that is, temp < N, and V 22 = 11.7, that is, V 22 > 0.5, P temp moves backward one point, that is, P temp = 23, and then step 2 is executed;
[0138] Step 22, and so on, until temp = 26, that is, temp > N, the detection ends, Q turn = {P 15 …P 21}, and according to Q turn , the U-turn behavior, U-turn start time, and U-turn end time are output.
[0139] The present invention also provides an inland river ship U-turn behavior detection device, as Figure 4 shown. The device includes an AIS data interface, a power supply, a data processing module, a behavior detection module, a circuit board, and a user interface.
[0140] The AIS data interface accesses external AIS data into the device.
[0141] The data processing module and the behavior detection module are arranged on the circuit board.
[0142] The data processing module performs data preprocessing on the input AIS data, including operations such as data denoising, duplicate removal, and interpolation.
[0143] The behavior detection module is used to detect the U-turn behavior of the preprocessed AIS data to obtain the ship U-turn behavior.
[0144] The power supply is used to supply power to each circuit or device of the above device.
[0145] The user interface is used to output the U-turn behavior of the ship.
[0146] This invention combines trajectory-driven and spatial semantics, and through spatial geometric topology calculations, it can provide inland waterway traffic regulators with semantic-level online U-turn behavior recognition with high accuracy.
[0147] It should be noted that, depending on the implementation needs, the various steps / components described in this application can be broken down into more steps / components, or two or more steps / components or parts of the operation of steps / components can be combined into new steps / components to achieve the purpose of this invention.
[0148] Those skilled in the art will readily understand that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting the turning behavior of inland waterway vessels based on a sliding time window, characterized in that, Includes the following steps: Initialize the sliding window. Starting from the beginning of the trajectory, if the speed of the current trajectory point is greater than the dwell speed threshold, then the current trajectory point is used as the starting trajectory point of the sliding window; otherwise, the current trajectory point is moved one position backward. Calculate the distance between the current trajectory point and the starting trajectory point of the current sliding window, and the azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window. The distance and azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window are compared with the turning distance threshold and the turning azimuth difference threshold, respectively. If the distance between the current trajectory point and the starting trajectory point of the current sliding window is less than the turning distance threshold and the azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window is less than the turning azimuth difference threshold, the current trajectory point is added to the set of candidate turning trajectory points. At the same time, the position of the current trajectory point and the total number of trajectory points are compared. If the position of the current trajectory point is less than the total number of trajectory points and the speed of the current trajectory point is greater than the dwell speed threshold, the current trajectory point is moved one position to the right and the distance and azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window are calculated again. Otherwise, if the speed of the current trajectory point is less than the dwell speed threshold, the current trajectory point is taken as the end point of the sliding window. If the current trajectory point position is greater than or equal to the total number of trajectory points, then the current trajectory point is taken as the end point of the sliding window; If the distance between the current trajectory point and the starting trajectory point of the current sliding window is less than the turning distance threshold and the azimuth difference between the current trajectory point and the starting trajectory point of the current sliding window is less than the turning azimuth difference threshold cannot be satisfied at the same time, then the current trajectory point will be taken as the end point of the sliding window. Determine whether the turning direction of the set of candidate U-turn trajectory points satisfies the U-turn turning characteristics; If satisfied, then based on the 9-dimensional extended intersection model, the turning behavior with U-turn characteristics is screened through topological calculation, and the start and end times of the U-turn are determined by calculating the azimuth difference change ratio. Use the point after the end point of the sliding window as the starting point of the new sliding window trajectory, and repeat the above steps until all trajectory points have been determined.
2. The method for detecting the turning behavior of inland waterway vessels based on a sliding time window according to claim 1, characterized in that, The method specifically includes the following steps: Step 1, assume the set of ship AIS data trajectories to be detected is P = {P} i }, where P i Let i be the i-th trajectory point, i∈[1,N], where N is the total number of trajectory points to be detected; let the sliding window be {P}. start ,P temp ,P end }, where P start and P end P represents the starting and ending trajectory points of the sliding window, where start and end are the positions of the starting and ending trajectory points, respectively. temp Let D be the current trajectory point of the sliding window, temp be the current position of the sliding window trajectory point, and temp1 be the position of the current trajectory point during the process of finding the starting point of the sliding window. turn B is the U-turn distance threshold. turn V is the threshold for the turning azimuth difference. stop R is the dwell speed threshold. s R is the threshold for the rate of change of azimuth difference at the starting point of the turnaround. e The threshold for the rate of change of azimuth difference at the end point of the U-turn; Step 2: Initialize the sliding window, find the starting point of the sliding window, and start judging from the starting point of the trajectory. If the velocity V of the current trajectory point is... temp1 >V stop If the current sliding window starts at start = temp1, temp = start + 1, and end = start + 2, then move the current trajectory point one position to the right, i.e., temp1 = temp1 + 1; simultaneously, let the set of candidate trajectory points for turning around be Q. turn_1 ={P start The set of turning trajectory points is Q. turn ={}; Step 3, calculate P in the sliding window. temp and P start Distance d and azimuth difference B diff ; Step 4, take d and B diff and compare them with D stop and B turn respectively. If d < D stop and B diff < B turn , add the current trajectory point to the set Q turn_1 of candidate turning trajectory points. At the same time, judge temp and N. If temp < N and if V temp > V stop , move the current trajectory point backward by one position, that is, temp = temp + 1, and execute Step 3. If V temp <= V stop , take the current trajectory point as the end point of the sliding window, that is, end = temp, and execute Step 5. If d is less than D stop and B diff < B turn do not satisfy simultaneously, take the current trajectory point as the end point of the sliding window, that is, end = temp, and execute Step 5; Step 5: Calculate the set of candidate U-turn trajectory points Q. turn The direction of the turn, and whether it meets the characteristics of a U-turn; Step 6: If the U-turn turning characteristics are met, then based on the 9-dimensional extended intersection model, the turning behavior with U-turn characteristics is screened through topological calculation. Step 7: Calculate the azimuth difference change ratio r for each point in the candidate trajectory point set. c Combined with the threshold R of the rate of change of azimuth difference at the starting point of the U-turn s Threshold R for the rate of change of azimuth difference at the end point of the U-turn e To determine the start and end times of the U-turn; Step 8, with P end The next point is used as the starting point of the new sliding window, that is, let start = end, temp = start + 1, end = start + 2, and proceed to step three; Step 9: If end >= N, the detection is complete; otherwise, proceed to step 3.
3. The method for detecting the turning behavior of inland waterway vessels based on a sliding time window according to claim 1 or 2, characterized in that, The formula for calculating the distance d between two trajectory points is as follows: d=R*arcos[cos(Y1)*cos(Y2)*cos(X1-X2)+sin(Y1)*sin(Y2)] In the formula, R is the Earth's radius, X1 and X2 are the longitudes of the two points, and Y1 and Y2 are the latitudes of the two points.
4. The method for detecting the turning behavior of inland waterway vessels based on a sliding time window according to claim 1 or 2, characterized in that, The formula for calculating the bearing between two trajectory points is as follows: In the formula, Lon A Lon B For the longitude of the two points, Lat A Lat B The latitude of the two points; The azimuth difference B between the two trajectory points diff as follows: In the formula, bearing1 and bearing2 represent the orientations of the two points.
5. The method for detecting the turning behavior of inland waterway vessels based on a sliding time window according to claim 1 or 2, characterized in that, U-turn distance threshold D stop =1000 meters, turning azimuth difference threshold B berth =160 degrees, dwell speed threshold V stop =0.
5.
6. The method for detecting the turning behavior of inland waterway vessels based on a sliding time window according to claim 2, characterized in that, Threshold R of the rate of change of azimuth difference at the starting point of the turn s =0.1, threshold R for the rate of change of azimuth difference at the end of the turn. e =0.
9.
7. The method for detecting the turning behavior of inland waterway vessels based on a sliding time window according to claim 1 or 2, characterized in that, The computation matrix for the 9-dimensional extended intersection model DE-9IM is as follows: In the formula, r represents the interior of A, A° represents the boundary of A, and A... - This represents the outer region of A, and the same applies to B; The 9-dimensional extended intersection model calculates the intersection between three regions of two spatial entities and obtains the DIM value; a DIM value of 0 indicates that the two entities intersect as a point, a DIM value of 1 indicates that the two entities intersect as a line, a DIM value of 2 indicates that the two entities intersect as a surface, and a DIM value of F indicates that the two entities intersect as an empty set; The ship trajectory is abstracted as a line, and the turning area is abstracted as a surface. There are different topological relationships between the ship trajectory and the turning area, which are divided into: the ship crosses a certain surface area LA1, the ship sails close to a certain navigation area and part of the trajectory is tangent to the boundary of the area LA2, the ship sails outside the geographical area LA3, the ship sails into or out of a certain navigation geographical area LA4, the ship sails within a certain navigation geographical area LA5. Based on the dimension-extended 9-intersection model, the turning behavior is formally represented as: turn={(Target i =CLTC)∩(R DE-9IM (Last i ,turn area )=LA1 / LA4)} In the formula, Traj represents the ship's trajectory, i represents the ship (represented by the unique identifier MMSI), turn represents a turning action, and CLTC represents a continuous large-amplitude turn. area This represents the turning area; the meaning of this expression is that both the ship's trajectory has continuous large-amplitude turning behavior and the ship has a topological relationship that is separate from the turning area are satisfied at the same time. That is, the turning behavior contains two characteristics: first, the ship has continuous large-amplitude turning behavior, and second, the ship is not located in the turning area. The continuous, large-amplitude turning behavior can be formally expressed as: In the formula, Traj represents the ship's trajectory, i represents the ship, and is represented by the unique identifier MMSI, P l Represents the l-th trajectory point, turn l ξ represents the steering ratio, and ξ represents the steering ratio threshold.
8. The method for detecting the turning behavior of inland waterway vessels based on a sliding time window according to claim 2, characterized in that, AIS data includes the vessel's unique identifier MMSI, timestamp data, longitude coordinates, latitude coordinates, heading data, and speed data; the turning area refers to the latitude and longitude coordinates of the apex of the turning waterway.
9. A sliding time window-based device for detecting the berthing behavior of inland waterway vessels, used to implement the sliding time window-based method for detecting the turning behavior of inland waterway vessels as described in claim 1 or 2, characterized in that, It includes a power supply, AIS data interface, user interface, circuit board, data processing module, and U-turn behavior detection module; The system includes a power supply for powering the system, a circuit board for mounting the various modules, an AIS data interface for importing external AIS data, a data processing module for preprocessing the input AIS data, a turning behavior detection module for detecting turning behavior in the preprocessed AIS data to obtain the ship's turning behavior, and a user interface for outputting the ship's turning behavior.
Citation Information
Patent Citations
Ship meeting intention identification method
CN111899489A
Semantic-based ship behavior dynamic reasoning method and device
CN114548411A