Ship traffic flow feature extraction method based on AIS deep learning
Through multi-layer nested CNN Bayesian learning and track state learning module based on AIS deep learning, combining the clustering of fuzzy track rules and port information matching, the accuracy of ship traffic flow feature extraction in the existing technology is solved and The problem of insufficient real-time performance has achieved more efficient maritime traffic analysis.
Patent Information
- Application Number
- CN202411137085.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-06
AI Technical Summary
The existing ship traffic flow feature extraction method has problems such as low data processing efficiency, poor real-time performance, and insufficient accuracy under complex sea conditions. It ignores the semantic background information of ship activities, resulting in the inconsistent feature analysis results.
Using AIS deep learning method, the three Gaussian hybrid DBSCAN clustering method combined with fuzzy track rules is designed using multi-layer nested CNN Bayesian learning and track state learning modules, and dynamic and static set weighting is performed in combination with the port platform API interface. Similarity estimates were used to extract ship tracks and traffic density analysis results.
It improves the accuracy and analysis capabilities of trajectory data, realizes more accurate and comprehensive extraction of ship traffic flow characteristics, and provides more practical maritime traffic analysis and management tools.
Smart Images

Figure CN119089170A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of AIS data processing, and specifically designs a ship traffic flow feature extraction method based on AIS deep learning. Background Art
[0002] With the development of the global shipping industry and the increasing busyness of maritime traffic, the monitoring and management of ships has become increasingly important. As a key technology, AIS data analysis improves navigation safety and shipping efficiency by sending and receiving real-time position, speed, heading and other information of ships. AIS data not only plays an important role in maritime safety management, but also has a wide range of applications in port management, environmental monitoring and marine research.
[0003] At present, the extraction of ship traffic flow features mainly relies on traditional rules and statistical models. These methods have certain limitations, such as low data processing efficiency, poor real-time performance, and insufficient accuracy in complex sea conditions. In particular, in the face of massive ship trajectories, the existing extraction methods are still insufficient in terms of adaptability to large sea areas, method complexity, and conformity with real ship tracks, which further aggravates the difficulty of ship track feature extraction. In addition, existing ship route extraction methods mostly focus on mining ship trajectory location information, ignoring the background context information that provides important semantic knowledge about ship activities.
[0004] In terms of algorithms, some scholars have tried to apply deep learning to ocean data analysis. For example, convolutional neural networks are used to identify ship images, and recursive neural networks are used to predict ship trajectories. However, these studies still have problems such as insufficient processing capabilities for complex environmental data and limited model generalization capabilities, resulting in a series of pain points such as feature analysis results not being consistent with reality. Therefore, it is necessary to explore targeted new methods to achieve accurate extraction of ship traffic behavior features. Summary of the invention
[0005] The problem to be solved by the present invention is to propose a ship traffic flow feature extraction method based on AIS deep learning, optimize the processing process of AIS data, improve the accuracy of ship track recognition and feature extraction and data utilization, so as to solve the problems encountered in the above-mentioned background technology.
[0006] The present invention adopts the following technical solution: a method for extracting ship traffic flow features based on AIS deep learning, comprising the following steps:
[0007] S10: Acquire AIS data of the waters with ship characteristics to be extracted, establish a ship information dataset, and generate a dual AIS deep learning scenario;
[0008] S20: First-level data feature learning module: Design a multi-layer nested CNN Bayesian learning method to learn information such as ship type, recording time, and longitude and latitude in AIS data, clean and normalize abnormal data, fill in missing sequences, and output complete track sequence data with global correlation information;
[0009] S30: Dual track state learning module: design a ship track similarity calculation formula, mark the AIS data with high similarity and conduct training, divide the ship track state into four types: stationary, turning, constant speed and acceleration and deceleration, establish a fuzzy state membership formula, and calculate the fuzzy weights under the four state characteristics respectively;
[0010] S40: According to the fuzzy state of the ship, a three-branch Gaussian mixture DBSCAN clustering method combined with track fuzzy rules is designed to divide the track sequence data into different clusters, and the track movement sets (moving points) of the ship at constant speed, acceleration and deceleration and the track stay sets (staying points) of the ship at rest and turning are output respectively, and the waters covered by each track point set are calculated;
[0011] S50: Combined with the API interface of the port platform, the port information in the waters of interest is obtained, a weighted similarity estimation method of the dynamic and static sets is designed, the coverage radius of the ship port stay set is adjusted, the matching relationship between the ship track stay set and the movement set is established, and the complete "starting port (stay) - passing sea area (movement) - destination port (stay)" ship track is extracted;
[0012] S60: Feedback the ship track extraction sequence and track status characteristics to the S10 data set, update the algorithm parameters, and repeat the training until the algorithm converges, output the final ship route chain and OD matrix, as well as the analysis results of maritime traffic density and hotspot detection.
[0013] Specifically, according to the characteristics of AIS data, the information recorded and stored in the S10 ship information data set includes: water mobile service identification code, ship number, ship size (ship length, ship width, draft), current ship's course and speed, current ship's operating status, timestamp of recording time, and location coordinates of recording time. The data records formed within a period of time can be expressed as follows:
[0014] DR(Ship1, Ship2, ..., Ship p )
[0015] S p (x) = {traj p (x), MMSI p ,(LL,sog,cog),Period,Time,ω(b)} T
[0016] In the formula, DR(S p) represents the full sample of all ship AIS, traj p (x) represents the xth track point in the pth ship track sequence, MMSI p represents the unique maritime mobile service identification code of the ship, LL represents the longitude and latitude of the ship, sog represents the ship speed value, cog represents the ship heading value, Period represents the time data of year / month / day, Time represents the time data of hour / minute / second, ω(b) represents the fuzzy weight of the b-th track state (stationary, turning, constant speed and acceleration / deceleration); T represents matrix transpose.
[0017] Specifically, in S20, abnormal data includes: erroneous data where the recorded information suddenly changes to an abnormal value and then switches back to the original value, statically similar or dynamically repeated data, and outlier data where the recorded information is missing in a large range. The first learning module in the double AIS deep learning, data feature learning, is used to improve the accuracy of AIS data and lay the foundation for subsequent ship status identification. The contents include the following:
[0018] S21: Use the Four-hot encoding format to perform multi-dimensional encoding on the AIS data in S10. Divide the average granularity values of the four attributes of longitude and latitude, speed, heading and timestamp according to the numerical interval, and establish a one-dimensional register group corresponding to each attribute. Normalize these four groups of one-dimensional vectors and perform vector splicing to ensure the consistency of the scale of each attribute;
[0019] S22: Design a multi-layer nested CNN learning algorithm to perform feature learning on AIS training data, score the AIS data for anomalies based on the training data results, and repair the anomaly data by combining Bayesian posterior estimation and dynamic segmentation threshold.
[0020] The multi-layer nested CNN learning algorithm includes the following:
[0021] S221: The multi-layer convolutional network takes the AIS multi-dimensional data as the input layer. First, a first-order convolution operation is performed on the speed input layer to obtain the characteristic results of the one-dimensional CNN data:
[0022]
[0023] Where F1(x) represents the one-dimensional feature result of the x-th trajectory point, w sog represents the speed weight, p sogl (x) represents the velocity loss coefficient at the x-th trajectory point, represents a one-dimensional input vector, d sog Indicates the speed offset;
[0024] S222: Perform a second-order convolution operation based on the heading input layer, and obtain the characteristic results of the two-dimensional CNN data:
[0025]
[0026] Where F2(x) represents the two-dimensional feature result of the x-th trajectory point, w sog represents the heading weight, p sogl (x) represents the probability of heading loss at the x-th trajectory point, represents a two-dimensional input vector, d cog Represents the heading offset, ε cog Indicates the heading balance coefficient;
[0027] S223: Perform a third-order convolution operation based on the time input layer, and obtain the characteristic results of the three-dimensional CNN data:
[0028]
[0029] Where F3(x) represents the three-dimensional feature result of the x-th trajectory point, w TIME represents the time weight, p TIMEl (x) represents the time loss probability of the x-th trajectory point, represents a three-dimensional input vector, d TIME represents the time offset, ε Time represents the time compensation coefficient;
[0030] S224: Perform a fourth-order convolution operation based on the latitude and longitude input layer, and obtain the characteristic results of the four-dimensional CNN data:
[0031]
[0032] Where F4(x) represents the four-dimensional CNN feature result of the x-th trajectory point, w LL Represents the latitude and longitude weight, P LLl (x) represents the longitude and latitude loss probability of the x-th track point, represents a four-dimensional input vector, d LL Indicates the latitude and longitude offset, ε LL It represents the longitude and latitude balance coefficient, and I, J, K, and M represent the amount of multi-dimensional information input data.
[0033] S225: Input the AIS training results and test set, calculate the degree of deviation between the test data and the training sample according to the scoring mechanism, and perform anomaly scoring on each ship track point:
[0034]
[0035] In the formula,
[0036]
[0037] Where CV(x) represents the ship Sp The anomaly score of the x-th trajectory point, σ n Represents the dimension index, CV n (x) represents the abnormal residual of the nth dimension, S px (sog), S px (cog), S px (TIME), S px (LL) represents the speed, heading, timestamp, longitude and latitude of the x-th track point, U qy (sog), U qy (cog), U qy (TIME), U qy (LL) respectively represent the speed value, heading value, timestamp and longitude and latitude of the yth track point of the qth ship track sequence in the test set, y = 1, 2, ..., Y; θ1, θ2, θ3, θ4 represent the correction weights;
[0038] S226: Use the Bayesian estimation formula to calculate the posterior distribution probability of each ship track point in different dimensions, and repair the AIS data in combination with the track anomaly score to finally obtain complete ship track data
[0039]
[0040] In the formula,
[0041]
[0042] in, represents the repaired ship track time series data, represents the abnormal threshold, θ, represents the weight coefficient; represents the dynamic segmentation threshold of the x-th track point, S′(S p (x)) represents the Bayesian correction of the x-th track point, P xy (S(x)|U(y)) represents the combination of U q The prior probability of (y) and the Bayesian formula give S p The posterior probability of (x).
[0043] Specifically, the second learning module in the dual AIS deep learning, track state learning, is used to identify ship tracks with high similarity in different states, including the following:
[0044] S31: Extract the ship track sequence obtained from the S10 dataset and S20 training, and calculate the track state similarity, which is expressed as follows:
[0045]
[0046] Where W p (x) represents the track state similarity between the AIS dataset and the ship track sequence obtained by training, ∈ μ represents the similarity scaling coefficient, represents the H information of the ship track sequence, HL(x) represents the H information of the i-th data set, It represents the cosine operation of the similarity between the speed value, heading value, timestamp and longitude and latitude, and ε represents the similarity attenuation coefficient;
[0047] S32: Setting similarity threshold W τ , select the ones that satisfy W(p)≥W τ Constrained data records, output set TP:
[0048] TP={TP1, TP2, TP3,..., TP z}
[0049] S33: Combine the similarity to establish the track state covariance matrix, expressed as follows:
[0050]
[0051] In the formula, R TP represents the covariance matrix, Cov represents the covariance, Z represents the amount of data contained in the TP matrix, z = 1, 2, ..., Z;
[0052] S34: DBSCAN clustering method for R TP Clustering is performed to divide the state characteristics of the ship's track into four types: stationary, turning, constant speed, and acceleration and deceleration. At the same time, the fuzzy weight ω(b) of each state is obtained, which is expressed as follows:
[0053]
[0054] Where ω(b) represents the fuzzy weights of the four states of stationary, turning, constant speed, and acceleration / deceleration, b = {1, 2, 3, 4}, ρ b Represents the fuzzy balance coefficient of each state, E={E1,E2,...,E Z} represents R TP The characteristic root vector, K b Represents the number of data records of the mth class in DBSCAN clustering;
[0055] S35: Combine the fuzzy weights under each state feature to establish the fuzzy state membership set A f (b) is expressed as follows:
[0056]
[0057] In the formula, A f(b) represents the fuzzy membership of the four states of stationary, turning, constant speed, and acceleration / deceleration, D||S x , S x-1 || represents the Euclidean distance between the track points in the ship track sequence, and α(b), β(b), and γ(b) represent the fuzzy matching coefficients of each travel state.
[0058] Specifically, in step S40, a three-branch Gaussian mixture DBSCAN clustering algorithm based on track fuzzy rules is used to analyze the activity patterns and uncertainties in different states to obtain the water area covered by each track. The contents are as follows:
[0059] S41: Combining the four state characteristics of the ship track and the three decision models, the posterior function of the three-branch Gaussian mixture model is established, the PSO algorithm is introduced to optimize the value of the function coefficient, and the three-branch Gaussian mixture posterior probability of each track point in the ship track sequence is calculated, which is expressed as follows:
[0060]
[0061] In the formula, Represents a sequence of ship tracks The x-th trajectory point is the posterior probability of the three-branch Gaussian mixture of the b-th component; px represents is the probability of the bth component, ∑ b represents the three-state covariance matrix of the bth component, ζ represents the data dimension, η b represents the dimensionless ablation mean coefficient of the b-th component;
[0062] S42: Based on the obtained ship status membership, three Gaussian mixture models are designed to divide the thresholds of different clusters, which are expressed as follows:
[0063]
[0064] In the formula, δ U , δ M , δ L Indicates the segmentation threshold for dividing the four states; Indicates the fuzzy state Clustering cost coefficients for stationary, turning, constant speed, and acceleration and deceleration, Indicates that it is in a determined state Clustering cost coefficients of stationary, turning, constant speed, and acceleration and deceleration; ψ represents the fuzzy decision exponent coefficient;
[0065] S43: Cluster the trajectory points of the ship and divide the track state characteristics into four clusters: stationary, turning, constant speed, and acceleration and deceleration, as expressed as follows:
[0066]
[0067] In the formula,
[0068] SZ all ={SZ1, SZ2, SZ3, SZ4}
[0069] Among them, SZ all Represents the clustering result set, SZ b They represent stationary, turning, constant speed, and acceleration and deceleration sets respectively;
[0070] S44: Combine the track movement sets (waypoints) of the ship at constant speed, acceleration and deceleration, and the track stop sets (stop points) of the ship at rest and turning, and calculate the water area O covered by the track point sets in each state. i , expressed as follows:
[0071] S OD ={SZ1}∪{SZ2}, S MOVE ={SZ3}∪{SZ4}
[0072]
[0073] In the formula, S stay and S move Respectively represent the set of all stay sets and the set of movement sets, CR x represents the weighted coverage radius of the xth stay set and movement set, cr xy represents the two-dimensional coverage radius of the y-th trajectory point in the x-th stay set and the movement set; F(·) represents the linear mapping operation, ξ x represents the clustering attribution coefficient, χ represents the transformation control coefficient, D||S y -S x || represents the Euclidean distance between the yth trajectory point in the xth stay set and the movement set and the trajectory point x.
[0074] Specifically, in step S50, the weighted similarity estimation method of the static and dynamic set is used to establish a matching relationship between the covered waters stop set and the motion set, so as to finally obtain a complete OD matrix and route chain. The following steps are included:
[0075] S51: Read the information of hub ports and feeder ports in the waters of interest, including port throughput, average daily navigation volume, and berth size, and calculate the matching domain density of the port's starting and ending points, expressed as follows:
[0076]
[0077] Where M OD represents the matching domain density of the port’s origin and destination, PTG represents the port’s throughput, AR represents the average daily number of voyages, and N B Indicates the berth size, represents the normalization coefficient;
[0078] S52: Combined with the matching domain density of the port origin and destination, the coverage radius of the ship track stop set is adjusted and updated, as expressed as follows:
[0079]
[0080] In the formula, OR stay represents the radius of the water area covered by the track stop set, CR(·) represents the calculation of the radius of the water area covered, or x represents the two-dimensional coverage radius of the x-th track point, ξ x represents the clustering attribution coefficient, G OD Indicates the density quantity division value;
[0081] S53: Taking the port location as the starting and ending points, the weighted similarity estimation values of the ship track stay set and the movement set are calculated, and the complete ship track is generated by matching the ship traffic map, which is expressed as follows:
[0082]
[0083] IUE i =max{IU(z)}
[0084] Route Sp = {IUE1, IUE2, ..., IUE n}
[0085] Where SIM(k) represents the similarity estimate of the z-th trajectory point in the matching domain corresponding to the x-th stay set and the motion set; Indicates the longitude and latitude of the zth point in the matching domain corresponding to the xth stay set and the movement set, The longitude and latitude of the yth trajectory point in the xth stay set and the motion set, ||·|| represents the vector operation expression, represents the coverage radius of the zth trajectory point; κ represents the weight parameter, ed(·) represents the adjustment of the Euclidean distance operation, and Route Sp Indicates the complete route chain of ship Sp.
[0086] Specifically, in step S60, after completing a round of training from S10 to S50, the ship track sequence is output The information such as the ship state fuzzy weight ω(b) is returned to S10 for parameter update and is used to repeat the AIS data training until convergence.
[0087] The technical solution of the present invention also provides: an electronic device, comprising:
[0088] A plurality of processors; and a memory connected to the plurality of processors in communication; when the plurality of programs are executed by the plurality of processors, the plurality of processors implement the ship traffic flow feature extraction method based on AIS deep learning described in the above scheme.
[0089] The technical solution of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the ship traffic flow feature extraction method based on AIS deep learning described in the above solution are implemented.
[0090] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0091] The present invention provides a method for extracting ship traffic flow features based on AIS deep learning, which improves the accuracy and analysis ability of track data through deep learning of dual data features and track status. A three-branch Gaussian mixture DBSCAN clustering method combined with track fuzzy rules is designed, and a dynamic and static set weighted similarity estimation method is designed to achieve more accurate and comprehensive ship traffic flow feature extraction. Compared with the prior art, the present invention optimizes multiple links such as data cleaning, feature learning, status classification, data clustering and port information matching, and can process AIS data more efficiently, accurately extract ship travel OD matrix and complete route chain, thereby providing a more practical maritime traffic analysis and management tool. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 is a flow chart of a method for extracting ship traffic flow features based on AIS deep learning provided in an embodiment of the present application;
[0093] Figure 2 This is an algorithm flow chart of the ship traffic flow feature extraction method based on AIS deep learning;
[0094] Figure 3 It is the realization diagram of the complete OD matrix and route chain finally obtained based on the AIS data source. DETAILED DESCRIPTION
[0095] In order to illustrate the purpose, technical scheme and advantages of the present invention, the technical scheme of the present application will be further described in detail with reference to the accompanying drawings. The embodiments described are only partial embodiments related to the present invention. All non-innovative embodiments performed by other researchers in the field are within the scope of protection of the present invention. At the same time, the step numbers in the embodiments of the present invention are only set for convenience of explanation, and the order between the steps is not limited in any way. The execution order of each step can be adaptively adjusted according to the understanding of those skilled in the art.
[0096] The present invention discloses a method for extracting ship traffic flow features based on AIS deep learning, such as Figure 1 The contents shown include the following:
[0097] S10: Acquire AIS data of the waters with ship characteristics to be extracted, establish a ship information dataset, and generate a dual AIS deep learning scenario;
[0098] S20: First-level data feature learning module: Design a multi-layer nested CNN Bayesian learning method to learn information such as ship type, recording time, and longitude and latitude in AIS data, clean and normalize abnormal data, fill in missing sequences, and output complete track sequence data with global correlation information;
[0099] S30: Dual track state learning module: design a ship track similarity calculation formula, mark the AIS data with high similarity and conduct training, divide the ship track state into four types: stationary, turning, constant speed and acceleration and deceleration, establish a fuzzy state membership formula, and calculate the fuzzy weights under the four state characteristics respectively;
[0100] S40: According to the fuzzy state of the ship, a three-branch Gaussian mixture DBSCAN clustering method combined with track fuzzy rules is designed to divide the track sequence data into different clusters, and the track movement sets (waypoints) of the ship at constant speed, acceleration and deceleration and the track stop sets (stop points) of the ship at rest and turning are output respectively, and the waters covered by each track point set are calculated;
[0101] S50: Combined with the API interface of the port platform, obtain the port information in the waters of interest, design a weighted similarity estimation method for the dynamic and static sets, adjust and update the coverage radius of the ship track stop set, establish the matching relationship between the ship track stop set and the motion set, and extract the complete "departure port (stop) → passing sea area (route) → destination port (stop)" ship track;
[0102] S60: Feedback the ship track extraction sequence and track status characteristics to the S10 data set, update the algorithm parameters, and repeat the training until the algorithm converges, output the ship tracks and OD matrix in the water area, as well as the analysis results of maritime traffic density and hotspot detection.
[0103] In one embodiment of the present invention, taking the AIS data of fishing vessels operating in the spatial range of the South China Sea (112°31′E~110°54′E, 15°20′E~19°53′E) as an example, a ship information data set is established based on the data source within one day, and a certain ship is used as an implementation sample to perform deep learning and feature extraction. The specific method is as follows:
[0104] Step 1: AIS preprocessing.
[0105] Ship information database construction and data acquisition: Combined with data characteristics, the information stored in AIS data records includes: maritime mobile service identification code, ship number, ship size (length, width, draft), current ship's course and speed, current ship's operating status, timestamp of recording time, and location coordinates of recording time. The data records formed within a period of time can be expressed as follows:
[0106] DR(Ship1, Ship2, ..., Ship p )
[0107] S p (x) = {traj p (x), MMSI p ,(LL,sog,cog),Period,Time,ω(b)} T
[0108] In the formula, DR(S p ) represents the full sample of all ship AIS, traj p (x) represents the xth track point in the pth ship track sequence, MMSI p represents the unique maritime mobile service identification code of the ship, LL represents the longitude and latitude of the ship, sog represents the ship speed value, cog represents the ship heading value, Period represents the time data of year / month / day, Time represents the time data of hour / minute / second, ω(b) represents the fuzzy weight of the b-th track state (stationary, turning, constant speed and acceleration / deceleration); T represents matrix transpose.
[0109] Step 2: Deep learning of dual AIS data.
[0110] In this embodiment, dual reinforcement learning is performed based on AIS data to obtain the ship port starting and ending points and the complete ship track, such as Figure 2 shown.
[0111] First, establish the first learning model - data feature learning.
[0112] First, the AIS data in S10 is multi-dimensionally encoded using the Four-hot encoding format. The average granularity values of the four attributes of longitude and latitude, speed, heading, and timestamp are divided according to the numerical interval, and the one-dimensional register group corresponding to each attribute is established. These four groups of one-dimensional vectors are normalized and vector splicing is performed to ensure the consistency of the scale of each attribute;
[0113] Then, a multi-layer nested CNN learning algorithm is designed, including the following:
[0114] In the first step, the multi-layer convolutional network uses the AIS multi-dimensional data as the input layer, and performs one to four order convolution operations on the speed input layer, heading input layer, time input layer, and longitude and latitude input layer in turn to obtain the characteristic results of one to four dimensional CNN data.
[0115] Next, input the AIS training results and test set, calculate the degree of deviation between the test data and the training sample according to the scoring mechanism, and perform anomaly scoring on each ship track point:
[0116]
[0117] Where CV(x) represents the ship S p The anomaly score of the x-th trajectory point, σ n Represents the dimension index, CV n (x) represents the abnormal residual of the nth dimension.
[0118] Next, the Bayesian estimation formula is used to calculate the posterior distribution probability of each ship track point in different dimensions, and the AIS data is repaired in combination with the track anomaly score value to finally obtain the complete ship track data.
[0119]
[0120] In the formula, represents the repaired ship track time series data, Indicates the abnormal threshold value; represents the dynamic segmentation threshold of the x-th track point, S′(S p (x)) represents the Bayesian correction of the x-th track point.
[0121] Then, the second learning module - track status learning is carried out.
[0122] First, the ship track sequences obtained by AIS dataset and S20 training are extracted, and the track state similarity is calculated, which is expressed as follows:
[0123]
[0124] Where W p (x) represents the track state similarity between the AIS dataset and the ship track sequence obtained by training, ∈ μ represents the similarity scaling coefficient, represents the H information of the ship track sequence, HL(x) represents the H information of the i-th data set, It represents the cosine operation of the similarity between the speed value, heading value, timestamp and longitude and latitude, and ε represents the similarity attenuation coefficient;
[0125] Secondly, set the similarity threshold W τ, select the ones that satisfy W(p)≥W τ Constrained data records, output set TP:
[0126] TP={TP1, TP2, TP3,..., TP Z}
[0127] Again, the track state covariance matrix is established by combining the similarity, which is expressed as follows:
[0128]
[0129] In the formula, R TP represents the covariance matrix, Cov represents the covariance, Z represents the amount of data contained in the TP matrix, z = 1, 2, ..., Z;
[0130] Finally, the DBSCAN clustering method was used to analyze the R TP Clustering is performed to divide the state characteristics of the ship's track into four types: stationary, turning, constant speed, and acceleration and deceleration. At the same time, the fuzzy weight ω(b) of each state is obtained. Combining the fuzzy weight under each state characteristic, the fuzzy state membership set A is established. f (b) is expressed as follows:
[0131]
[0132] In the formula, A f (b) represents the fuzzy membership of the four states of stationary, turning, constant speed, and acceleration / deceleration, D||S x , S x-1 || represents the Euclidean distance between the track points in the ship track sequence, and α(b), β(b), and γ(b) represent the fuzzy matching coefficients of each travel state.
[0133] Step 3: Track data clustering and track information matching.
[0134] Comparison of AIS data source with the obtained complete ship track, such as Figure 3 As shown, the following steps are included:
[0135] The first step is to cluster the track data:
[0136] In this embodiment, a three-branch Gaussian mixture DBSCAN clustering algorithm based on track fuzzy rules is designed, including the following contents:
[0137] Firstly, combining the four state characteristics of the ship track and the three-branch decision model, the posterior function of the three-branch Gaussian mixture model is established, the PSO algorithm is introduced to optimize the value of the function coefficient, and the three-branch Gaussian mixture posterior probability of each track point in the ship track sequence is calculated, which is expressed as follows;
[0138]
[0139] In the formula, Represents a sequence of ship tracks The x-th trajectory point is the posterior probability of the three-branch Gaussian mixture of the b-th component; p x express is the probability of the bth component, ∑ b represents the three-state covariance matrix of the bth component, ζ represents the data dimension, η b represents the dimensionless ablation mean coefficient of the b-th component;
[0140] Secondly, based on the obtained ship status membership, three Gaussian mixture models are designed to divide the thresholds of different clusters, which are expressed as follows:
[0141]
[0142] In the formula, δ U , δ M , δ L Indicates the segmentation threshold for dividing the four states; Indicates the fuzzy state Clustering cost coefficients for stationary, turning, constant speed, and acceleration and deceleration, Indicates that it is in a determined state Clustering cost coefficients of stationary, turning, constant speed, and acceleration and deceleration; ψ represents the fuzzy decision exponent coefficient;
[0143] Thirdly, cluster the trajectory points of the ship and divide the track state characteristics into four clusters: stationary, turning, constant speed, and acceleration and deceleration, as expressed as follows:
[0144]
[0145] In the formula,
[0146] SZ all ={SZ1, SZ2, SZ3, SZ4}
[0147] Among them, SZ all Represents the clustering result set, SZ b They represent stationary, turning, constant speed, and acceleration and deceleration sets respectively;
[0148] Finally, the track movement sets (waypoints) of the ship at constant speed, acceleration and deceleration, and the track stop sets (stop points) of the ship at rest and turning are combined, and the water area O covered by the track point sets in each state is calculated. i , expressed as follows:
[0149] S OD ={SZ1}∪{SZ2}, S MOVE ={SZ3}μ{SZ4}
[0150]
[0151] In the formula, S stay and S move Respectively represent the set of all stay sets and the set of movement sets, CR x represents the weighted coverage radius of the xth stay set and movement set, cr xy represents the two-dimensional coverage radius of the y-th trajectory point in the x-th stay set and the movement set; F(·) represents the linear mapping operation, ξ x represents the clustering attribution coefficient, χ represents the transformation control coefficient, D||S y -S x || represents the Euclidean distance between the yth trajectory point in the xth stay set and the movement set and the trajectory point x.
[0152] The second step is to match the ship track information:
[0153] Combined with the port platform API interface, the port information in the water area is obtained, and the matching relationship between the ship track stop set and the movement set is established. The weighted similarity estimation method of the static and dynamic set designed in this embodiment includes the following contents:
[0154] First, read the information of hub ports and feeder ports in the waters, including port throughput, average daily navigation volume, and berth size, and calculate the matching domain density of the port's starting and ending points, which is expressed as follows:
[0155]
[0156] Where M OD represents the matching domain density of the port’s origin and destination, PTG represents the port’s throughput, AR represents the average daily number of voyages, and N B Indicates the berth size, represents the normalization coefficient;
[0157] Secondly, combined with the matching domain density of the port origin and destination, the coverage radius of the ship track stop set is adjusted and updated, which is expressed as follows:
[0158]
[0159] In the formula, OR stay represents the radius of the water area covered by the track stop set, CR(·) represents the calculation of the radius of the water area covered, or x represents the two-dimensional coverage radius of the x-th track point, ξ x represents the clustering attribution coefficient, G OD Indicates the density quantity division value;
[0160] Again, taking the port location as the starting and ending points, the weighted similarity estimates of the ship track stay set and the movement set are calculated, and the complete ship track is generated by matching the ship traffic map, which is expressed as follows:
[0161]
[0162] IUE i =max{IU(z)}
[0163] Route Sp = {IUE1, IUE2, ..., IUE n}
[0164] Where SIM(k) represents the similarity estimate of the z-th trajectory point in the matching domain corresponding to the x-th stay set and the motion set; Indicates the longitude and latitude of the zth point in the matching domain corresponding to the xth stay set and the movement set, The longitude and latitude of the yth trajectory point in the xth stay set and the motion set, ||·|| represents the vector operation expression, represents the coverage radius of the zth trajectory point; κ represents the weight parameter, ed(·) represents the adjustment of the Euclidean distance operation, and Route Sp Indicates the complete route chain of ship Sp.
[0165] Step 4: Repeat the training of AlS data.
[0166] After completing a round of training from S10 to S50, the ship track OD matrix of different sea areas in the waters of interest, as well as the results of maritime traffic density and hotspot detection are extracted according to the time interval, and the ship track extraction sequence and track status characteristics are fed back to the S10 data set to update the algorithm parameters. The updated data includes the ship track sequence As well as the ship state fuzzy weight ω(b) and other information, it is used to repeat the AIS data training until convergence.
[0167] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for extracting ship traffic flow features based on AIS deep learning, It is characterized in that The steps include: S10: Acquire AIS data of the waters with ship characteristics to be extracted, establish a ship information dataset, and generate a dual AIS deep learning scenario; S20: First-level data feature learning module: Design a multi-layer nested CNN Bayesian learning method to learn information such as ship type, recording time, and longitude and latitude in AIS data, clean and normalize abnormal data, fill in missing sequences, and output complete track sequence data with global correlation information; S30: Dual track state learning module: design a ship track similarity calculation formula, mark the AIS data with high similarity and conduct training, divide the ship track state into four types: stationary, turning, constant speed and acceleration and deceleration, establish a fuzzy state membership formula, and calculate the fuzzy weights under the four state characteristics respectively; S40: According to the fuzzy weight results, a three-branch Gaussian mixture DBSCAN clustering method combined with track fuzzy rules is designed to divide the track sequence data into different clusters, output the track movement set of the ship at constant speed, acceleration and deceleration, and the track stop set of the ship at rest and turning, and calculate the water area covered by each track point set; S50: Combined with the API interface of the port platform, the port information in the waters is obtained, a weighted similarity estimation method of the dynamic and static sets is designed, the coverage radius of the ship port stay set is adjusted, the matching relationship between the ship track stay set and the motion set is established, and the complete "starting port - passing sea area - destination port" ship track is extracted; S60: Feedback the ship track extraction sequence and track status characteristics to the S10 data set, update the algorithm parameters, and repeat the training until the algorithm converges, output the final ship route chain and OD matrix, as well as the analysis results of maritime traffic density and hotspot detection.
2. According to the method for extracting ship traffic flow features based on AIS deep learning in claim 1, It is characterized in that The information stored in AIS data records includes: maritime mobile service identification code, ship number, ship size, current ship's course and speed, current ship's operating status, timestamp of recording time, and location coordinates of recording time. The data records formed within a period of time can be expressed as follows: DR(S 1 ,S 2 ,…,S p …,S P ) S p (x)={traj p (x),MMSI p ,(LL,sog,cog),Period,Time,ω(b)}T Where DR(·) represents the full sample of all ship AIS, p = {1, 2, …, P}, S p (x) represents the full information when the p-th ship generates the x-th trajectory point, where traj p (x) represents the xth track point in the pth ship track sequence, MMSI p represents the unique maritime mobile service identification code of the ship, LL represents the longitude and latitude, sog represents the ship speed value, cog represents the ship heading value, Period represents the year / month / day data, Time represents the hour / minute / second data, ω(b) represents the fuzzy weight of the b-th track state; T represents the matrix transpose.
3. According to claim 2, the ship traffic flow feature extraction method based on AIS deep learning, It is characterized in that The abnormal data described in S20 includes: erroneous data in which the recorded information suddenly changes to an abnormal value and then switches back to the original value, statically similar or dynamically repeated data, and outlier data in which the information is missing in a large range; the first learning module includes the following contents: S21: Use the Four-hot encoding format to perform multi-dimensional encoding on the AIS data in S10, divide the average granularity values of the four attributes of longitude and latitude, speed, heading and timestamp according to the numerical interval, and establish a one-dimensional register group corresponding to each attribute; normalize these four groups of one-dimensional vectors and perform vector splicing to ensure the consistency of the scale of each attribute; S22: Design a multi-layer nested CNN learning algorithm to perform feature learning on AIS training data, score the AIS data for anomalies based on the training data results, and repair the anomaly data by combining Bayesian posterior estimation and dynamic segmentation threshold.
4. According to claim 3, the ship traffic flow feature extraction method based on AIS deep learning, It is characterized in that A multi-layer nested CNN Bayesian learning method designed in S22 includes the following contents: S221: The multi-layer convolutional network takes the AIS multi-dimensional data as the input layer. First, a first-order convolution operation is performed on the speed input layer to obtain the characteristic results of the one-dimensional CNN data: In the formula, F 1 (x) represents the one-dimensional feature result of the x-th trajectory point, w sog represents the speed weight, p sogl (x) represents the speed loss coefficient at the x-th track point, represents a one-dimensional input vector, d sog Indicates the speed offset; I indicates the one-dimensional input data volume; S222: Perform a second-order convolution operation based on the heading input layer, and obtain the characteristic results of the two-dimensional CNN data: In the formula, F 2 (x) represents the two-dimensional feature result of the x-th trajectory point, w sog represents the heading weight, p sogl (x) represents the heading loss coefficient of the x-th track point, represents a two-dimensional input vector, d cog Represents the heading offset, ε cog represents the heading balance coefficient, J represents the amount of two-dimensional input data; S223: Perform a third-order convolution operation based on the time input layer, and obtain the characteristic results of the three-dimensional CNN data: In the formula, F 3 (x) represents the three-dimensional feature result of the x-th trajectory point, w TIME represents the time weight, p TIMEl (x) represents the time loss coefficient of the x-th trajectory point, represents a three-dimensional input vector, d TIME represents the time offset, ε Time represents the time compensation coefficient, K represents the amount of three-dimensional input data; S224: Perform a fourth-order convolution operation based on the latitude and longitude input layer, and obtain the characteristic results of the four-dimensional CNN data: In the formula, F 4 (x) represents the four-dimensional CNN feature result of the x-th trajectory point, w LL Represents the latitude and longitude weight, P LLl (x) represents the coordinate loss coefficient of the x-th trajectory point, represents a four-dimensional input vector, d LL Indicates the latitude and longitude offset, ε LL represents the latitude and longitude balance coefficient, M represents the amount of four-dimensional input data; S225: Input the AIS training results and test set, calculate the degree of deviation between the test data and the training sample according to the scoring mechanism, and perform anomaly scoring on each ship track point: In the formula, Where CV(x) represents the ship S p The anomaly score of the x-th trajectory point, σ n Represents the dimension index, CV n (x) represents the abnormal residual of the nth dimension, S px (sog), S px (cog), S px (TIME), S px (LL) represents the speed, heading, timestamp, longitude and latitude of the x-th track point, U qy (sog), U qy (cog), U qy (TIME), U qy (LL) represents the speed value, heading value, timestamp and longitude and latitude of the yth track point of the qth ship track sequence in the test set, y = 1, 2, ..., Y; θ1, θ2, θ3, θ4 represent the correction weights; S226: Use the Bayesian estimation formula to calculate the posterior distribution probability of each ship track point in different dimensions, and repair the AIS data in combination with the track anomaly score to finally obtain complete ship track data In the formula, in, represents the repaired ship track time series data, represents the abnormal threshold value, represents the weight coefficient; represents the dynamic segmentation threshold of the x-th track point, S'(S p (x)) represents the Bayesian correction of the x-th track point, P xy (S(x)|U(y)) represents the combination of U q The prior probability of (y) and the Bayesian formula give S p The posterior probability of (x).
5. According to claim 1, the method for extracting ship traffic flow features based on AIS deep learning, It is characterized in that The dual track state learning module described in S30 includes the following contents: S31: Extract the ship track sequence obtained from the S10 dataset and S20 training, and calculate the track state similarity, which is expressed as follows: Where W p (x) represents the track state similarity between the AIS dataset and the ship track sequence obtained by training, ∈ μ represents the similarity scaling coefficient, represents the H information of the ship track sequence, HL(x) represents the H information of the i-th data set, It represents the cosine operation of the similarity between the speed value, heading value, timestamp and longitude and latitude, and ε represents the similarity attenuation coefficient; S32: Setting similarity threshold W τ , select the ones that satisfy W(p)≥W τ Constrained data records, output set TP: TP={TP 1 ,TP 2 ,TP 3 ,…,TP Z } S33: Combine the similarity to establish the track state covariance matrix, expressed as follows: In the formula, R TP represents the covariance matrix, cov represents the covariance, Z represents the amount of data contained in the TP matrix, z = 1, 2, ..., Z; S34: DBSCAN clustering method for R TP Clustering is performed to divide the state characteristics of the ship's track into four types: stationary, turning, constant speed, and acceleration and deceleration. At the same time, the fuzzy weight ω(b) of each state is obtained, which is expressed as follows: Where ω(b) represents the fuzzy weights of the four states of stationary, turning, constant speed, and acceleration / deceleration, b = {1, 2, 3, 4}, ρ b Represents the fuzzy balance coefficient of each state, E={E 1 ,E 2 ,…,E Z } represents R TP The characteristic root vector, K b Represents the number of data records of the mth class in DBSCAN clustering; S35: Combine the fuzzy weights under each state feature to establish the fuzzy state membership set A f (b) is expressed as follows: In the formula, A f (b) represents the fuzzy membership of the four states of stationary, turning, constant speed, and acceleration / deceleration, D||S x ,S x-1 || represents the Euclidean distance between the track points in the ship track sequence, and α(b), β(b), and γ(b) represent the fuzzy matching coefficients of each travel state.
6. The ship traffic flow feature extraction method based on AIS deep learning according to claim 1, It is characterized in that The design described in S40 is based on a three-branch Gaussian mixture DBSCAN clustering algorithm based on track fuzzy rules, including the following contents: S41: Combining the four state characteristics of the ship track and the three decision models, the posterior function of the three-branch Gaussian mixture model is established, the PSO algorithm is introduced to optimize the value of the function coefficient, and the three-branch Gaussian mixture posterior probability of each track point in the ship track sequence is calculated, which is expressed as follows: In the formula, Represents a sequence of ship tracks The x-th trajectory point is the posterior probability of the three-branch Gaussian mixture of the b-th component; p x express is the probability of the bth component, Σ b represents the three-state covariance matrix of the bth component, ζ represents the data dimension, η b represents the dimensionless ablation mean coefficient of the b-th component; S42: Based on the obtained ship status membership, three Gaussian mixture models are designed to divide the thresholds of different clusters, which are expressed as follows: In the formula, δ U , δ M , δ L Indicates the segmentation threshold for dividing the four states; Indicates fuzzy state Clustering cost coefficients for stationary, turning, constant speed, and acceleration and deceleration, Indicates that it is in a determined state Clustering cost coefficients of stationary, turning, constant speed, and acceleration and deceleration; ψ represents the fuzzy decision exponent coefficient; S43: Cluster the trajectory points of the ship and divide the track state characteristics into four clusters: stationary, turning, constant speed, and acceleration and deceleration, as expressed as follows: In the formula, SZ all ={SZ 1 ,SZ 2 ,SZ 3 ,SZ 4 } Among them, SZ all Represents the clustering result set, SZ b They represent stationary, turning, constant speed, and acceleration and deceleration sets respectively; S44: Combine the track motion sets (moving points) of the ship at constant speed, acceleration and deceleration, and the track stop sets of the ship at rest and turning, and calculate the water area O covered by the track point sets in each state i , expressed as follows: S OD ={SZ 1 }∪{SZ 2 },S MOVE ={SZ 3 }∪{SZ 4 } In the formula, S stay and S move Respectively represent the set of all stay sets and the set of movement sets, CR x represents the weighted coverage radius of the xth stay set and movement set, cr xy represents the two-dimensional coverage radius of the y-th trajectory point in the x-th stay set and the movement set; F(·) represents the linear mapping operation, ξ x represents the clustering attribution coefficient, χ represents the transformation control coefficient, D||S y -S x || represents the Euclidean distance between the yth trajectory point in the xth stay set and the movement set and the trajectory point x.
7. The ship traffic flow feature extraction method based on AIS deep learning according to claim 1, It is characterized in that A weighted similarity estimation method for a dynamic and static set proposed in step S50 includes the following contents: S51: Read the information of hub ports and feeder ports in the waters of interest, including port throughput, average daily navigation volume, and berth size, and calculate the matching domain density of the port's starting and ending points, expressed as follows: Where M OD represents the matching domain density of the port’s origin and destination, PTG represents the port’s throughput, and N B represents the berth size, CR represents the average daily navigation volume, represents the normalization coefficient; S52: Combined with the matching domain density of the port origin and destination, the coverage radius of the ship track stop set is adjusted and updated, as expressed as follows: In the formula, OR stay represents the radius of the water area covered by the track stop set, CR(·) represents the calculation of the radius of the water area covered, or x represents the two-dimensional coverage radius of the x-th track point, ξ x represents the clustering attribution coefficient, G OD Indicates the density quantity division value; S53: Taking the port location as the starting and ending points, the weighted similarity estimation values of the ship track stay set and the movement set are calculated, and the complete ship track is generated by matching the ship traffic map, which is expressed as follows: IU i =max{IU(z)} Route Sp ={IUE 1 ,IUE 2 ,…,IUE n } Where SIM(k) represents the similarity estimate of the z-th trajectory point in the matching domain corresponding to the x-th stay set and the motion set; Indicates the longitude and latitude of the zth point in the matching domain corresponding to the xth stay set and the movement set, The longitude and latitude of the yth trajectory point in the xth stay set and the motion set, ||·|| represents the vector operation expression, represents the coverage radius of the zth trajectory point; κ represents the weight parameter, ed(·) represents the adjustment of the Euclidean distance operation, and Route Sp Indicates the complete route chain of ship Sp.
8. The ship traffic flow feature extraction method based on AIS deep learning according to claim 1, It is characterized in that After completing a round of training from S10 to S50, the ship track sequence is output As well as the ship state fuzzy weight ω(b) and other information, they are returned to S10 for parameter update and used to repeat the AIS data training until convergence.
9. An electronic device, It is characterized in that include: Multiple processors; and a memory communicatively coupled to the plurality of processors; When multiple processors execute multiple programs, these processors are enabled to implement the ship traffic flow feature extraction method based on AIS deep learning as described in any one of claims 1 to 8.
10. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and when the program is executed by a processor, the steps in the method for extracting characteristics of ship traffic flow described in any one of claims 1-8 are implemented.
