Inland river vessel berthing behavior detection method and device based on sliding time window
By using sliding time window and spatial geometric topology methods in ship behavior recognition, combined with trajectory driving and environmental information, the problem of low accuracy and efficiency of parking behavior detection in the existing technology is solved, and a high-accurate parking behavior is achieved Identification has improved the efficiency of water transportation supervision of ports.
Patent Information
- Application Number
- CN202310120848.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-13
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2043-02-13
AI Technical Summary
The existing ship behavior recognition methods have problems such as trajectory drive dependence and insufficient environmental impact in mooring behavior detection, resulting in low recognition accuracy and efficiency.
The sliding time window-based method is adopted, combined with trajectory driving and environmental information, and the spatial geometric topology calculation is used to identify the mooring behavior of inland ships. The specific steps include initializing the sliding window, calculating the distance between the track point and the starting point, judging the staying distance, performing spatial geometric topology calculations, removing track points that are not in the berth area, and repeating the processing until the judgment of all track points is completed.
It improves the accuracy of ship mooring behavior detection, enhances the efficiency of port water traffic supervision, and provides semantic-level identification results.
Smart Images

Figure CN116092329B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ship behavior recognition, and in particular relates to a method and a device for detecting the berthing behavior of an inland river ship based on a sliding time window. Background Art
[0002] In recent years, the widespread application of the Automatic Identification System (AIS) on ships has gradually opened a new era of water traffic supervision. The Automatic Identification System is an open ship real-time data transmission system used between ships and ships and between ships and shores. Through the Automatic Identification System, ships broadcast their own dynamic information (including longitude, latitude, speed over the ground, course over the ground, navigation status, etc.) and static information (such as the ship's unique identifier MMSI, ship size, ship type, etc.). By exchanging ship status information to observe its navigation intentions, the risk of ship collision is reduced, and at the same time, it helps maritime-related personnel monitor the mobility of ships, which can provide very comprehensive data information for decisions such as ship operation management and safety monitoring.
[0003] At present, the main methods for ship behavior recognition are trajectory-driven methods and rule-based methods. First, the trajectory-driven method requires manual extraction of corresponding manual features from the data, which is highly dependent on expert experience and can easily ignore a lot of valid information; second, the rule-based method for behavior recognition can take into account the impact of the ship's navigation environment on the ship's behavior, but the problem with this type of method is that it mainly establishes corresponding ship behavior rules through expert knowledge, and there is a problem of inconsistent granularity of behavior division, so only a limited set of ship behaviors can be defined. The existing methods have high environmental requirements and are prone to ignore a lot of valid information when relying solely on trajectory driving, which is a problem currently faced by berthing behavior detection. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention provides a method and device for detecting the berthing behavior of inland vessels based on a sliding time window. On the basis of traditional trajectory driving, the method and device combine trajectory driving and environmental information, and realize the identification of the berthing behavior of inland vessels through spatial geometric topological calculation.
[0005] In order to achieve the above object, the technical solution provided by the present invention is:
[0006] A method for detecting inland river vessel berthing behavior based on a sliding time window comprises the following steps:
[0007] Initialize the sliding window, and set the window starting point to the starting trajectory point;
[0008] Calculate the distance between the current track point in the sliding window and the starting track point of the current sliding window;
[0009] Compare the distance between the current track point and the starting track point of the current sliding window with the stay distance threshold. If the distance value is less than the stay distance threshold, add the current track point to the stay track point set, and judge the track point position and the total number of track points at that time. If the track point position at that time is greater than or equal to the total number of track points, use the previous point of the track point as the end point of the sliding window. If the current track point position is less than the total number of track points, move the current track point position back by one position, and continue to calculate the distance between the current track point in the sliding window and the starting track point of the current sliding window; if the distance value is greater than or equal to the stay distance threshold, use the previous point of the track point as the end point of the sliding window.
[0010] Based on the dimensional extended 9-intersection model DE-9IM, the spatial geometric topology calculation is performed on the obtained stop trajectory point set and the port berth area to determine whether the trajectory point is located in the berth area;
[0011] According to the spatial geometric topology calculation, the trajectory points outside the berth area in the set of stop trajectory points are removed to obtain the ship berthing behavior;
[0012] The next point after the sliding window end point is used as the new sliding window start point, and the above steps are repeated until all trajectory points are judged.
[0013] Furthermore, the method specifically comprises the following steps:
[0014] Step 1: Assume that the AIS data trajectory set of the ship to be detected is P = {P i}, where P i is the i-th trajectory point, i∈[1,N], 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 track points of the sliding window, respectively. start and end are the starting and ending track points of the sliding window, respectively. temp is the current track point of the sliding window, temp is the position of the current track point of the sliding window; let D stop is the stay distance threshold;
[0015] Step 2: Initialize the sliding window, set start = 1, temp = start + 1, end = start + 2; and set the set of stop trajectory points to Q stop = {P1}, the set of parking trajectory points is Q berth ={};
[0016] Step 3: Calculate P in the sliding window temp and P startThe distance d;
[0017] Step 4: Replace d and D stop Compare, if d is less than D stop , then add the current trajectory point to the stop trajectory point set Q stop In the same time, judge temp and N. If temp ≥ N, end the sliding window and set P temp The previous point is used as the end point of the sliding window, that is, end = temp-1, and step 5 is executed. If temp < N, P temp Move back one position, that is, temp = temp + 1, and execute step 3; if d is greater than or equal to D stop , then P temp The previous point is used as the end point of the sliding window, that is, end = temp-1, and step 5 is executed;
[0018] Step 5: The obtained stop trajectory point set Q stop Make a topological judgment with the port berth area to determine whether the trajectory segment is within the port berth and the berth where it stops;
[0019] Step 6: removing the trajectory points outside the berth area from the set of stop trajectory points through spatial geometric topology calculation, and the detection of the set of stop trajectory points is completed;
[0020] Step 7: P end The next point is used as the new sliding window starting point, that is, start = end + 1, temp = start + 1, end = start + 2, and proceed to step 3;
[0021] Step 8: If end>=N, the detection is completed; otherwise, proceed to step 3.
[0022] Furthermore, the distance d between two trajectory points is calculated as follows:
[0023] d=R*arcos[cos(Y1)*cos(Y2)*cos(X1-X2)+sin(Y1)*sin(Y2)]
[0024] Where R is the radius of the earth, X1 and X2 are the longitudes of the two points, and Y1 and Y2 are the latitudes of the two points.
[0025] Furthermore, the stay distance threshold D stop =90 meters.
[0026] Furthermore, the calculation matrix of the dimensional extended 9-intersection model DE-9IM is as follows:
[0027]
[0028] In the formula, represents the interior of A, A° represents the boundary of A, and A - It represents the external area of A, and the same applies to B;
[0029] The 9-dimensional extended intersection model calculates the intersection between the three regions of two spatial entities respectively and obtains the value of DIM; a DIM value of 0 indicates that the intersection result of the two is a point, a DIM value of 1 indicates that the intersection result of the two is a line, a DIM value of 2 indicates that the intersection result of the two is a surface, and a DIM value of F indicates that the intersection of the two is an empty set;
[0030] Abstracting the ship as a point and the port berth area as a surface, there are three topological relationships, including: the ship is in the area PA1, the ship is outside the area PA2, and the ship is on the boundary line of the area PA3;
[0031] Based on the 9-dimensional extended intersection model, the parking behavior is formalized as:
[0032]
[0033] berth={(Traj i =stay)∩(R DE-9IM (Traj i , pier)=PA1)}
[0034] In the formula, Traj represents the ship trajectory, i represents the ship, which is represented by the unique identifier MMSI, berth represents the berthing behavior, stay represents the stay, and pier represents the berth. The meaning of this expression is that the ship trajectory has the stay behavior and the ship and the berth have an implicit topological relationship. That is, the berthing behavior contains two characteristics: first, the ship has the stay behavior, and second, the ship stays in the berth. The stay behavior is formally expressed as:
[0035]
[0036] Where Traj represents the ship trajectory, i represents the ship, represented by the unique identifier MMSI, and P l represents the lth trajectory point, v l represents the velocity of the lth trajectory point, v stop Indicates the dwell speed threshold.
[0037] Furthermore, AIS data includes the ship's unique identifier MMSI, timestamp data, longitude coordinates, latitude coordinates, ground heading data, and ground speed data; port berths refer to the spatial polygon enclosed by the longitude and latitude coordinates of the vertices of the berth area.
[0038] An inland river vessel berthing behavior detection device based on a sliding time window for implementing the above-mentioned inland river vessel berthing behavior detection method based on a sliding time window, comprising a power supply, an AIS data interface, a user interface, a circuit board, a data processing module and a berthing behavior detection module;
[0039] Among them, the power supply is used for power supply, the circuit board is used for installing various modules, the AIS data interface is used for introducing external AIS data, the data processing module is used for preprocessing the input AIS data, the berthing behavior detection module is used for berthing behavior detection of the preprocessed AIS data to obtain the ship's berthing behavior, and the user interface is used for outputting the ship's berthing behavior.
[0040] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0041] Based on traditional trajectory driving, the present invention combines trajectory driving and environmental information, and through spatial geometric topological calculations, can provide recognition results from a semantic level with high accuracy, greatly improving the efficiency of port water traffic supervision. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the process of the inland river vessel berthing behavior detection method provided by the present invention;
[0043] Figure 2 A topological relationship diagram between the ship and the navigation geographical environment provided by the present invention;
[0044] Figure 3 The dimensionally expanded 9-intersection calculation matrix provided by the present invention;
[0045] Figure 4 This is a schematic structural diagram of the inland river vessel berthing behavior detection device provided by the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0047] The invention discloses a method for detecting the berthing behavior of an inland river vessel. Before the method is used for detection, the spatial semantic data of a port berth is extracted first, and then the specific steps of the method are as follows: first, the distance between a current track point in a sliding window and a starting track point of the current sliding window is calculated; then, a judgment is made: if the distance value is less than a set stop distance threshold, the current track point position and the total number of track points are judged at the same time; if the current track point position is less than the total number of track points, the current track point is added to a stop point set, and the current track point moves backward by one position; if the current track point position is greater than or equal to the total number of track points, the previous point of the track point is used as the end point of the sliding window; if the distance is greater than or equal to the stop distance threshold, the previous point of the track point is used as the end point of the sliding window, and the current track point is used as the starting point of a new sliding window; then, based on a dimensional extended 9-intersection model (DE-9IM), a spatial topological calculation is performed on the obtained stop track point set and a port berth area to judge whether the track point is located in the berth; finally, the track points located outside the berth area in the stop track point set are removed to obtain the ship berthing behavior, and the above processing is repeated until all track points are judged. The present invention also discloses a device for detecting inland river vessel berthing behavior. Based on trajectory driving, the present invention can provide online recognition of vessel behavior at a semantic level to port water traffic supervisors through interaction with the environment, with high accuracy, greatly improving the efficiency of port water traffic supervision.
[0048] The inland river vessel berthing behavior detection method based on a sliding time window of the present invention comprises the following steps:
[0049] Step 1: Initialize the sliding window, and set the window starting point to the starting trajectory point;
[0050] Step 2: Calculate the distance between the current track point in the sliding window and the starting track point of the current sliding window;
[0051] Step 3: compare the distance between the current track point and the starting track point of the sliding window with the stop distance threshold. If the distance value is less than the set stop distance threshold, add the current track point to the candidate stop track point set, and determine the current track point position and the total number of track points. If the track point position is greater than or equal to the total number of track points, take the previous point of the track point as the end point of the sliding window, and execute step 4. If the current track point position is less than the total number of track points, move the current track point position back one position, and execute step 2. If the distance is greater than or equal to the stop distance threshold, take the previous point of the track point as the end point of the sliding window, and execute step 4.
[0052] Step 4: Based on the Dimensional Extended 9-Intersection Model (DE-9IM), the spatial geometric topology calculation is then performed on the obtained set of stop trajectory points and the port berth area to determine whether the trajectory point is located in the berth;
[0053] Step 5: Finally, according to the spatial geometric topology calculation, the trajectory points outside the berth area in the set of stop trajectory points are removed;
[0054] Step 6: Repeat steps 2 to 5 until all trajectory points are judged.
[0055] like Figure 1 As shown, the method specifically comprises the following steps:
[0056] Step 1: Assume that the AIS data trajectory set to be detected is P = {P i}, where P i is the i-th trajectory point, i∈[1,N], 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 track points of the sliding window, respectively. start and end are the starting and ending track points of the sliding window, respectively. temp is the current track point of the sliding window, temp is the position of the current track point of the sliding window, let D stop is the stay distance threshold, the stay distance threshold D stop =90 m;
[0057] Step 2: Initialize the sliding window, set start = 1, temp = start + 1, end = start + 2; and set the set of stop trajectory points to Q stop = {P1}, parking trajectory point set Q berth ={};
[0058] Step 3: Calculate P in the sliding window temp and P start The distance d;
[0059] Step 4: Replace d and D stop Compare, if d is less than D stop , then add the current trajectory point to the set of stop trajectory points Q, and judge temp and N at the same time. If temp>N, end the sliding window and add P temp The previous point is used as the end point of the sliding window, that is, end = temp-1, and step 5 is executed. If temp < N, P temp Move back one position, that is, temp = temp + 1, and execute step 3; if d is greater than or equal to D stop , then P temp The previous point is used as the end point of the sliding window, that is, end = temp-1, and step 5 is executed;
[0060] Step 5: The obtained stop trajectory point set Q stop Make a topological judgment with the port berth area to determine whether the trajectory segment is within the port berth and the berth where it stops;
[0061] Step 6: Finally, the trajectory points outside the berth area in the stop trajectory point set are removed by spatial geometric topology calculation, and the stop set detection is completed;
[0062] Step 7: P end The next point is used as the new sliding window starting point, that is, start = end + 1, temp = start + 1, end = start + 2, and proceed to step 3;
[0063] Step 8: If end>=N, the detection is completed; otherwise, proceed to step 3.
[0064] Furthermore, the distance calculation formula between two trajectory points is as follows:
[0065] d=R*aFcos[cos(Y1)*cos(Y2)*cos(X1-X2)+sin(Y1)*sin(Y2)]
[0066] Where R is the radius of the earth (km), X1 and X2 are the longitudes of the two points, and Y1 and Y2 are the latitudes of the two points.
[0067] Furthermore, the interaction characteristics between ships and port berths are mainly topological characteristics, that is, ships are abstracted as points, port berths are abstracted as surfaces, and ship trajectories are abstracted as lines. Different topological relationships can be determined based on different characteristics of topological interactions. The present invention performs spatial geometric topological calculations between ship trajectory points and port berths based on the 9-dimensional extended intersection model.
[0068] The 9-dimensional extended intersection model determines the topological relationship between two objects by judging the intersection results of the internal, external and boundary areas between the spatial objects. The 9-dimensional extended intersection model can well distinguish the four situations of the intersection of two spatial targets, namely, empty, point, line or surface, and can be used to analyze the topological relationship between the ship trajectory and the navigation environment. The calculation matrix of the 9-dimensional extended intersection model is as follows:
[0069]
[0070] In the Matrix represents the interior of A, A° represents the boundary of A, and A -Represents the external area of A. The 9-dimensional extended intersection model calculates the intersection between the three areas of the two spatial entities respectively and obtains the value of DIM. The value of 0 indicates that the intersection result of the two is a point, 1 indicates that the intersection result of the two is a line, 2 indicates that the intersection result of the two is a surface, and F indicates that the intersection of the two is an empty set.
[0071] Spatial geometric topological calculation refers to the different topological relationships generated due to the different topological interaction characteristics between the ship and the navigation geographical environment; the topological relationship between the ship and the navigation geographical environment can be divided into point-line relationship, point-surface relationship, line-line relationship and line-surface relationship, which can be specifically divided into 15 types of topological relationships. The topological relationship designed by the present invention is a point-surface relationship, among which:
[0072] In the point-surface relationship, the ship is abstracted as a point and the port berth area is abstracted as a surface, such as Figure 2 and Figure 3 As shown, there are three topological relationships, including the ship is in the area (PA1), the ship is outside the area (PA2) and the ship is on the boundary line of the area (PA3). Each topological relationship corresponds to a 9-dimensional extended intersection calculation matrix.
[0073] The stay behavior can be formally expressed as:
[0074]
[0075] Where Traj represents the ship trajectory, i represents the ship, represented by the unique identifier MMSI, and P l represents the lth trajectory point, v l represents the velocity of the lth trajectory point, v stop Stop speed threshold;
[0076] Based on the 9-dimensional extended intersection model, the parking behavior can be formally expressed as:
[0077]
[0078] berth={(Traj i =stay)∩(R DE-9IM (Traj i ,pier)=PA1)}
[0079] In the formula, Traj represents the ship trajectory, i represents the ship, which is represented by the unique identifier MMSI, berth represents the berthing behavior, stay represents the stay, and pier represents the berth. The meaning of this expression is that the ship trajectory has the stay behavior and the ship and the berth have an implicit topological relationship. That is to say, the berthing behavior contains two characteristics: first, the ship has the stay behavior, and second, the ship stays in the berth.
[0080] Furthermore, AIS data includes the ship's unique identifier MMSI, timestamp data, longitude coordinates, latitude coordinates, ground heading data, and ground speed data; port berth data refers to the spatial polygon enclosed by the longitude and latitude coordinates of the vertices of the berth area.
[0081] The present invention also provides an inland river vessel berthing behavior detection device based on a sliding time window for implementing the above method, the device comprises a power supply, an AIS data interface, a user interface, a circuit board, a data processing module and a behavior detection module; the power supply supplies power to the device, the AIS data interface accesses external AIS data, the circuit board installs various modules, the data processing module preprocesses the input data, the behavior detection module is used to perform berthing behavior detection on the preprocessed AIS data to obtain the ship berthing behavior, and the user interface is used to output the ship berthing behavior.
[0082] The present invention combines trajectory driving and environmental information, and through spatial geometric topological calculation, can provide semantic-level berthing behavior recognition to port water traffic supervisors with high accuracy.
[0083] The technical solution of the present invention is further described below in conjunction with specific embodiments:
[0084] In the first step, let the AIS data trajectory set to be detected be P = {P1, P2…P 29 ,P 30}, N = 30, the coordinates of each trajectory point are as follows:
[0085] P1(114.43328333333334, 30.66528333333333), P2(114.43308, 30.665223333333333),
[0086] P3(114.43295, 30.6651), P4(114.43281333333331, 30.66506333333333),
[0087] P5 (114.43268333333332, 30.66496666666667), P6 (114.43266666666666, 30.66495),
[0088] P7 (114.43253333333334, 30.66490333333333), P8 (114.4321, 30.664616666666667),
[0089] P9 (114.43189333333332, 30.66456), P10 (114.43157333333332, 30.66437),
[0090] P11(114.4315, 30.66425), P12(114.43148333333332, 30.66425),
[0091] P13(114.4306, 30.663576666666668), P14(114.43046666666666, 30.66345),
[0092] P15(114.43054666666669, 30.66344), P16(114.4305, 30.66336666666667),
[0093] P17(114.43046666666666, 30.6634), P18(114.4305, 30.66336666666667),
[0094] P19 (114.43048, 30.66336666666667), P20 (114.4305, 30.66338333333333),
[0095] P21 (114.4305, 30.66338333333333), P22 (114.4305, 30.66336666666667),
[0096] P23(114.43046666666666, 30.663386666666668), P24(114.4305, 30.6634),
[0097] P25(114.4305, 30.6634), P26(114.43046666666666, 30.66339),
[0098] P27(114.4305, 30.66338333333333), P28(114.4305, 30.66338333333333),
[0099] P29(114.43049333333332, 30.66338), P30(114.43051666666666, 30.66335);
[0100] Let the sliding window be {P start, P temp , P end}, where P start and P end are the starting and ending track points of the sliding window, respectively. start and end are the starting and ending track points of the sliding window, respectively. temp is the current track point of the sliding window, temp is the position of the current track point of the sliding window, and the stop distance threshold of parking behavior detection is 90 meters;
[0101] The second step is to initialize the sliding window, set start = 1, temp = 2, end = 3, P start =P1,P tem =P2,P end =P3, and let the set of stop trajectory points be Q stop = {P1}, the set of parking trajectory points is Q berth ={};
[0102] The third step is to calculate the distance d between P1 and P2, so execute step 2 and calculate d = 18.8731 meters;
[0103] Step 4: Replace d and D stop For comparison, execute step 3, 18.8731<90, that is, d<D stop , so add P2 to Q stop 2<30, that is, temp<N, P temp Move back one point, P temp =P3, then execute step 2;
[0104] Step 5: Calculate the distance between P1 and P3, and get d = 43.3680 meters;
[0105] Step 6: Replace d and D stop For comparison, execute step 3, 43.3680<90, that is, d<D stop , so add P3 to Q stop 3<30, that is, temp<N, P temp Move back one point, P temp =P4, then execute step 2;
[0106] Step 7: Calculate the distance between P1 and P4, and get d = 59.0268 meters;
[0107] Step 8: D and D stop For comparison, execute step 3, 59.0268<90, that is, d<D stop , so add P4 to Q stop 4<30, that is, temp<N, Ptemp Move back one point, P temp =P5, then execute step 2;
[0108] Step 9: Calculate the distance between P1 and P5, and get d = 75.4924 meters;
[0109] Step 10: Replace d and D stop For comparison, execute step 3, 75.4924<90, that is, d<D stop , so add P5 to Q stop 5<30, that is, temp<N, P temp Move back one point, P temp =P6, then execute step 2;
[0110] Step 11: Calculate the distance between P1 and P6, and get d = 80.6724 meters;
[0111] Step 12: Replace d and D stop For comparison, execute step 3, 80.6724<90, that is, d<D stop , so add P6 to Q stop 6<30, that is, temp<N, P temp Move back one point, P temp =P7, then execute step 2;
[0112] Step 13: Calculate the distance between P1 and P6, and get d = 85.8824 meters;
[0113] Step 14: Replace d and D stop For comparison, execute step 3, 85.8824<90, that is, d<D stop , so add P7 to Q stop 7<30, that is, temp<N, P temp Move back one point, P temp =P8, then execute step 2;
[0114] Step 15: Calculate the distance between P1 and P8, and get d = 109.2229 meters;
[0115] Step 16: Replace d and D stop For comparison, we execute step 3, 109.2229>90, that is, d>D stop , with P temp The previous point is used as the end point of the sliding window, that is, end = temp - 1 = 7;
[0116] Step 17: Q stop Perform topological operations with the port berth area. According to the topological results, the current stop segment set Qstop It is not in the port berth, so the sliding window is reset, start = 8, temp = 9, end = 10, Q stop ={P8};
[0117] Step 18: Calculate the distance d between P8 and P9, so execute step 2 and calculate d = 16.0620 meters;
[0118] Step 19: Replace d and D stop For comparison, execute step 3, 16.0620<90, that is, d<D stop , so add P9 to Q stop 9<30, that is, temp<N, P temp Move back one point, P temp =P 10 , then execute step 2;
[0119] Step 20: Calculate P7 and P 10 The distance d is calculated, so step 2 is executed and d = 6.4248 meters is obtained;
[0120] Step 21: Replace d and D stop For comparison, we execute step 3, 6.4248<90, that is, d<D stop , so P 10 Add to Q stop 10<30, that is, temp<N, P temp Move back one point, P temp =P 11 , then execute step 2;
[0121] Step 22: Calculate P7 and P 11 The distance d is calculated, so execute step 2 and calculate d = 12.0465 meters;
[0122] Step 23: Replace d and D stop For comparison, execute step 3, 12.0465<90, that is, d<D stop , 11<30, that is, temp<N, move back one point, that is, P temp =P 12 , then execute step 2;
[0123] Step 24: Repeat this process until temp=31, i.e. temp>N, end=temp-1=30, and execute step 4.
[0124] Step 25: Q stop Perform topological operations with the port berth area. According to the topological results, the current stop segment set Q stop = {P8, P9...P30}Located at Sino-Korean Petrochemical Terminal, Qingshan Port Area, Wuhan Port;
[0125] Step 26: Pass Q stop Perform topological operations on each trajectory point and the port berth area, and remove the trajectory points that are not in the Sino-Korean Petrochemical Terminal in Qingshan Port Area of Wuhan Port, namely P8, P9, P 10 , P 11 , P 12 ~P 30 Add to Q berth , that is, Q berth = {P 12 , P 13 …P 30};
[0126] Step 27: Since end>=30, the detection is finished, and the parking behavior, parking position, and parking start and end time are output;
[0127] The present invention also provides a device for detecting the berthing behavior of an inland river vessel, such as Figure 4 As 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.
[0128] The AIS data interface connects external AIS data to the device.
[0129] A data processing module and a behavior detection module are installed on the circuit board.
[0130] The data processing module performs data preprocessing on the input AIS data, including data denoising, deduplication, interpolation and other operations.
[0131] The behavior detection module is used to perform berthing behavior detection on the preprocessed AIS data to obtain the ship berthing behavior.
[0132] The power supply is used to supply power to each circuit or device of the above-mentioned device.
[0133] The user interface is used to output the berthing behavior of the ship.
[0134] It should be pointed out that, according to the needs of implementation, the various steps / components described in this application can be split into more steps / components, and two or more steps / components or partial operations of steps / components can be combined into new steps / components to achieve the purpose of the present invention.
[0135] It will be easily understood by those skilled in the art that the above are only 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 in the protection scope of the present invention.
Claims
1. A method for detecting inland river vessel berthing behavior based on sliding time window. It is characterized in that The following steps are involved: Initialize the sliding window, and set the window starting point to the starting trajectory point; Calculate the distance between the current track point in the sliding window and the starting track point of the current sliding window; Compare the distance between the current track point and the starting track point of the current sliding window with the stay distance threshold. If the distance value is less than the stay distance threshold, add the current track point to the stay track point set, and judge the track point position and the total number of track points at that time. If the track point position at that time is greater than or equal to the total number of track points, use the previous point of the track point as the end point of the sliding window. If the current track point position is less than the total number of track points, move the current track point position back by one position, and continue to calculate the distance between the current track point in the sliding window and the starting track point of the current sliding window; if the distance value is greater than or equal to the stay distance threshold, use the previous point of the track point as the end point of the sliding window. Based on the dimensional extended 9-intersection model DE-9IM, the spatial geometric topology calculation is performed on the obtained stop trajectory point set and the port berth area to determine whether the trajectory point is located in the berth area; According to the spatial geometric topology calculation, the trajectory points outside the berth area in the set of stop trajectory points are removed to obtain the ship berthing behavior; The next point after the sliding window end point is used as the new sliding window start point, and the above steps are repeated until all trajectory points are judged.
2. According to the method for detecting inland river vessel berthing behavior based on sliding time window in claim 1, It is characterized in that The method specifically comprises the following steps: Step 1: Assume that the AIS data trajectory set of the ship to be detected is P = {P i }, where P i is the i-th trajectory point, i∈[1,N], 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 track points of the sliding window, respectively. start and end are the starting and ending track points of the sliding window, respectively. temp is the current track point of the sliding window, temp is the position of the current track point of the sliding window; let D stop is the stay distance threshold; Step 2: Initialize the sliding window, set start = 1, temp = start + 1, end = start + 2; and set the set of stop trajectory points to Q stop = {P 1 }, the set of parking trajectory points is Q berth ={}; Step 3: Calculate P in the sliding window temp and P start The distance d; Step 4: Compare d and D stop If d is less than D stop , add the current trajectory point to the set Q of stay trajectory points stop . At the same time, judge temp and N. If temp ≥ N, end the sliding window, and use the previous point of P temp as the end point of the sliding window, i.e., end = temp - 1, and execute Step 5. If temp < N, move P temp one position backward, i.e., temp = temp + 1, and execute Step 3; If d is greater than or equal to D stop , use the previous point of P temp as the end point of the sliding window, i.e., end = temp - 1, and execute Step 5; Step 5: The obtained stop trajectory point set Q stop Make a topological judgment with the port berth area to determine whether the trajectory segment is within the port berth and the berth where it stops; Step 6: removing the trajectory points outside the berth area from the set of stop trajectory points through spatial geometric topology calculation, and the detection of the set of stop trajectory points is completed; Step 7: P end The next point is used as the new sliding window starting point, that is, start = end + 1, temp = start + 1, end = start + 2, and proceed to step 3; Step 8: If end>=N, the detection is completed; otherwise, proceed to step 3.
3. According to the inland river vessel berthing behavior detection method based on sliding time window according to claim 1 or 2, It is characterized in that The distance d between two trajectory points is calculated as follows: d=R*arcos[cos(Y1)*cos(Y2)*cos(X1-X2)+sin(Y1)*sin(Y2)] Where R is the radius of the earth, X1 and X2 are the longitudes of the two points, and Y1 and Y2 are the latitudes of the two points.
4. The inland river vessel berthing behavior detection method based on a sliding time window according to claim 1 or 2, It is characterized in that Stop distance threshold D stop =90 meters.
5. The inland river vessel berthing behavior detection method based on a sliding time window according to claim 1 or 2, It is characterized in that The calculation matrix of the dimensional extended 9-intersection model DE-9IM is as follows: In the formula, represents the interior of A, A ° represents the boundary of A, A - It represents the external area of A, and the same applies to B; The 9-dimensional extended intersection model calculates the intersection between the three regions of two spatial entities respectively and obtains the value of DIM; a DIM value of 0 indicates that the intersection result of the two is a point, a DIM value of 1 indicates that the intersection result of the two is a line, a DIM value of 2 indicates that the intersection result of the two is a surface, and a DIM value of F indicates that the intersection of the two is an empty set; Abstracting the ship as a point and the port berth area as a surface, there are three topological relationships, including: the ship is in the area PA1, the ship is outside the area PA2, and the ship is on the boundary line of the area PA3; Based on the 9-dimensional extended intersection model, the parking behavior is formalized as: berth={(Tray i =stay)∩(R DE-9IM (Three i ,pier)=PA1)} In the formula, Traj represents the ship trajectory, i represents the ship, which is represented by the unique identifier MMSI, berth represents the berthing behavior, stay represents the stay, and pier represents the berth. The meaning of this expression is that the ship trajectory has the stay behavior and the ship and the berth have an implicit topological relationship and they are satisfied at the same time, that is, the berthing behavior contains two characteristics: first, the ship has the stay behavior, and second, the ship stays in the berth. The stay behavior is formally expressed as: Where Traj represents the ship trajectory, i represents the ship, represented by the unique identifier MMSI, and P i represents the lth trajectory point, v l represents the velocity of the lth trajectory point, v stop Indicates the dwell speed threshold.
6. According to the method for detecting inland river vessel berthing behavior based on sliding time window in claim 2, It is characterized in that AIS data includes the ship's unique identifier MMSI, timestamp data, longitude coordinates, latitude coordinates, ground heading data, and ground speed data; port berths refer to the spatial polygon enclosed by the longitude and latitude coordinates of the vertices of the berth area.
7. A device for detecting the berthing behavior of an inland river vessel based on a sliding time window, for implementing the method for detecting the berthing behavior of an inland river vessel based on a sliding time window as claimed in claim 1 or 2, It is characterized in that It includes power supply, AIS data interface, user interface, circuit board, data processing module and parking behavior detection module; Among them, the power supply is used for power supply, the circuit board is used for installing various modules, the AIS data interface is used for introducing external AIS data, the data processing module is used for preprocessing the input AIS data, the berthing behavior detection module is used for berthing behavior detection of the preprocessed AIS data to obtain the ship's berthing behavior, and the user interface is used for outputting the ship's berthing behavior.
