Ship navigation dangerous behavior identification and early warning method, device, equipment and medium

By preprocessing ship AIS data and using a multi-algorithm fusion model, the problem of identifying dangerous behaviors of ships in port waters has been solved, achieving accurate identification and early warning of dangerous behaviors, reducing computational complexity, and improving regulatory efficiency.

CN116740137BActive Publication Date: 2025-12-12WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310608775.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2025-12-12
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

Existing technologies are insufficient to identify and warn of dangerous behaviors of ships in port waters around the clock and in all directions, resulting in a heavy workload for maritime regulators and limited dynamic monitoring capabilities. Furthermore, the diversity of ship behavior patterns and the uncertainty of movement trajectories increase the difficulty of identification.

Method used

By acquiring and preprocessing ship AIS data, similar and dissimilar motion parameters of ships are extracted. Dimensionality reduction algorithms are used to screen high-contribution feature parameters, and a multi-algorithm fusion model for dangerous behavior identification and early warning is constructed, including BP neural network, support vector machine and random forest algorithms, to achieve accurate identification and early warning of dangerous behaviors in ship navigation.

Benefits of technology

It has enabled autonomous identification and early warning of dangerous behaviors of ships navigating in port waters, improving the identification rate, reducing computational complexity, and enhancing regulatory efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740137B_ABST
    Figure CN116740137B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of port water area ship navigation dangerous behavior identification and early warning method, device, electronic equipment and storage medium, its method includes: obtaining ship AIS data, and ship AIS data is preprocessed, obtain preprocessed data;Based on the similarity of ship motion parameter and the difference of ship motion parameter from the preprocessed data extraction first ship motion characteristic parameter;Based on the dimension reduction algorithm of pre-established first motion characteristic parameter is dimension reduced, obtain the second ship motion characteristic parameter of contribution rate greater than pre-set contribution rate;The second ship motion characteristic parameter is input into the dangerous behavior identification and early warning model of pre-constructed multi-algorithm fusion in learning, identify the normal behavior and dangerous behavior of ship navigation, and the dangerous behavior of ship navigation is early warned.The present application uses the dangerous behavior identification and early warning model of multi-algorithm fusion to identify and early warn port water area ship navigation dangerous behavior, further improves the ship navigation dangerous behavior identification rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of ship technology, and particularly relates to a port water area ship navigation dangerous behavior identification and early warning method and device, electronic equipment and storage medium. BACKGROUND

[0002] China's shipping industry is facing rapid growth in the number of ships, although in recent years, the Automatic Identification System (AIS), Vessel Traffic Service (VTS), Wireless Very High Frequency (VHF), Closed Circuit Television (CCTV) and other technologies have been widely used, but it is still difficult to achieve the safety supervision goal of "all-around coverage, all-weather operation, and rapid response", and it still needs maritime supervision personnel to monitor all day long. This not only greatly increases the workload of the duty personnel, but also restricts the dynamic monitoring capability of VTS.

[0003] The widespread use of a large number of devices on ships and shore-based facilities can provide a large amount of water traffic data in real time, providing a foundation for real-time dynamic identification of ship dangerous behavior. However, due to the sparsity and high dimensionality of water traffic data, and the multi-element nature of ship behavior patterns and the uncertainty of movement trajectories, it still brings great challenges to the identification of port water area ship navigation dangerous behavior, to some extent, restricting the development of intelligent maritime supervision, and is a bottleneck problem faced by the construction of smart ports. SUMMARY

[0004] Therefore, it is necessary to provide a port water area ship navigation dangerous behavior identification and early warning method, device, electronic equipment and storage medium, so as to improve the identification rate of port water area ship navigation dangerous behavior.

[0005] In order to achieve the above-mentioned purpose, in a first aspect, the present application provides a ship navigation dangerous behavior identification and early warning method, comprising:

[0006] Obtaining ship AIS data and preprocessing the ship AIS data to obtain preprocessed data;

[0007] Extracting first ship motion characteristic parameters from the preprocessed data based on ship similarity motion parameters and ship difference motion parameters;

[0008] Dimension reduction is performed on the first motion characteristic parameters based on a pre-set dimension reduction algorithm to obtain second ship motion characteristic parameters with a contribution rate greater than a pre-set contribution rate;

[0009] input the second ship motion characteristic parameter into a pre-constructed multi-algorithm fusion dangerous behavior recognition and early warning model for learning, identifying normal behavior and dangerous behavior of ship navigation, and early warning of dangerous behavior of ship navigation, wherein the network structure of the pre-constructed multi-algorithm fusion dangerous behavior recognition and early warning model comprises a BP neural network algorithm submodel, a support vector machine algorithm submodel and a random forest algorithm submodel.

[0010] Further, the first ship motion characteristic parameter is extracted from the preprocessed data based on the ship similarity motion parameter and the ship difference motion parameter, comprising:

[0011] For different ship behavior modes, corresponding judgment thresholds and judgment conditions of speed, heading and displacement factors are set;

[0012] The speed, heading and displacement of the ship are obtained based on the ship similarity motion parameter and the ship difference motion parameter;

[0013] The speed, heading and displacement of the ship are compared with the set judgment thresholds and judgment conditions to identify the current ship behavior mode, wherein the ship behavior mode comprises a straight sailing mode, a turning mode and a staying mode;

[0014] The first ship motion characteristic parameter corresponding to each ship behavior mode is determined.

[0015] Further, the pre-set dimension reduction algorithm comprises a principal component analysis algorithm, the first motion characteristic parameter is dimensionally reduced based on the pre-set dimension reduction algorithm, and a second ship motion characteristic parameter with a contribution rate greater than a pre-set contribution rate is obtained, comprising:

[0016] A characteristic parameter matrix corresponding to the first motion characteristic parameter is obtained, and the characteristic parameter matrix is standardized to obtain a plurality of characteristic values of the relationship between the motion characteristic parameters;

[0017] The plurality of characteristic values are orthogonally processed based on the Schmidt orthogonal method, and the principal component factors of the first motion characteristic parameter are calculated based on the orthogonally processed data;

[0018] The contribution rate of each first motion characteristic parameter is calculated according to the principal component factors of the first motion characteristic parameter, and the second ship motion characteristic parameter with a contribution rate greater than a pre-set contribution rate is determined in descending order.

[0019] Further, the training process of the pre-constructed multi-algorithm fusion dangerous behavior recognition and early warning model comprises:

[0020] The second ship motion feature parameters are divided into multiple ship motion feature data subsets, and the multiple subsets are respectively input into the BP neural network algorithm sub-model, the support vector machine algorithm sub-model and the random forest algorithm sub-model for training to obtain the first prediction result;

[0021] The first prediction result is compared with the actual navigation behavior of the ship to determine the prediction accuracy. If the accuracy does not meet the preset accuracy, the BP neural network algorithm sub-model, support vector machine algorithm sub-model and random forest algorithm sub-model are continuously trained until the output second prediction result meets the preset accuracy.

[0022] Furthermore, the support vector machine algorithm sub-model is trained, including:

[0023] The initial classifier set is obtained by training the central sample of each class using k-means clustering, and then the initial classifier set is divided into a ready classifier set and a restricted classifier set.

[0024] Preset samples are selected to train the ready classifiers, so that the ready classifier group and the restricted classifier group continue to provide feedback as the number of training samples increases, until all classification algorithms stop updating.

[0025] Furthermore, the BP neural network algorithm sub-model includes an input layer, an output layer, and a hidden layer. Training the BP neural network algorithm sub-model includes:

[0026] Number of input layer nodes, number of hidden layer nodes, and number of output layer nodes Initialize the neurons in the input layer, hidden layer, and output layer, and initialize the thresholds of the hidden layer and the output layer.

[0027] Based on the variables, the connection weights of the input layer and the hidden layer, and the threshold of the hidden layer, the output of the hidden layer is calculated through the activation function.

[0028] Based on the hidden layer output, connect the weights and thresholds to calculate the predicted output of the BP neural network.

[0029] Calculate the network prediction error based on the network's predicted output and expected output;

[0030] Update network connection weights based on network prediction errors;

[0031] Update node thresholds based on network prediction errors.

[0032] Furthermore, the random forest algorithm sub-model is trained, including:

[0033] Bootstrap resampling method is used to randomly draw a plurality of motion characteristic parameters from the second motion characteristic parameters with replacement to establish a characteristic parameter set;

[0034] Based on the characteristic parameter set as an input item, a plurality of decision trees are generated, and a random forest algorithm framework is constructed;

[0035] The ship motion characteristic parameter data set to be identified or regressed is input into the random forest, and the data of each tree structure is processed by mean value.

[0036] In a second aspect, the present application further provides a ship navigation dangerous behavior identification and early warning device, comprising:

[0037] A preprocessing module is configured to acquire ship AIS data and preprocess the ship AIS data to obtain preprocessed data;

[0038] A feature extraction module is configured to extract first ship motion characteristic parameters from the preprocessed data based on ship similarity motion parameters and ship difference motion parameters;

[0039] A dimension reduction module is configured to reduce the dimension of the first motion characteristic parameters based on a preset dimension reduction algorithm to obtain second ship motion characteristic parameters with a contribution rate greater than a preset contribution rate;

[0040] An identification and early warning module is configured to input the second ship motion characteristic parameters into a pre-constructed multi-algorithm fusion dangerous behavior identification and early warning model for learning, identify normal behavior and dangerous behavior of ship navigation, and warn of dangerous behavior of ship navigation, wherein the network structure of the pre-constructed multi-algorithm fusion dangerous behavior identification and early warning model includes a BP neural network algorithm submodel, a support vector machine algorithm submodel, and a random forest algorithm submodel.

[0041] In a third aspect, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned port water area ship navigation dangerous behavior identification and early warning method when executing the computer program.

[0042] In a fourth aspect, the present application further provides a computer storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned port water area ship navigation dangerous behavior identification and early warning method.

[0043] The beneficial effects of the above-mentioned embodiments are:

[0044] The application guarantees the authenticity of data by preprocessing the AIS data of the ship, extracts the first ship motion characteristic parameter of the trajectory sequence through the ship similarity motion parameter and the ship difference motion parameter from the preprocessed data, further reduces the dimension of the first motion characteristic parameter based on a preset dimension reduction algorithm, solves the calculation complexity and other problems caused by high-dimensional ship motion characteristics, realizes the screening of high-contribution-rate motion characteristic parameters, and finally, based on the improved Support Vector Machines (SVM), the improved Back Propagation (BP) neural network and the improved Random Forest (RF), constructs a port water area ship navigation dangerous behavior autonomous identification and early warning model under the fusion of multiple machine learning algorithms, and realizes the accurate identification and early warning of the port water area ship navigation dangerous behavior. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 A flowchart of an embodiment of a ship navigation dangerous behavior identification and early warning method provided by the application is shown.

[0046] Figure 2 A turning mode sub-trajectory feature map provided by an embodiment of the application is shown.

[0047] Figure 3 An autonomous identification and early warning diagram of a ship dangerous behavior provided by an embodiment of the application is shown.

[0048] Figure 4 A BP neural network structure diagram provided by an embodiment of the application is shown.

[0049] Figure 5 A random forest algorithm diagram provided by an embodiment of the application is shown.

[0050] Figure 6 A structure diagram of an embodiment of a ship navigation dangerous behavior identification and early warning device provided by the application is shown.

[0051] Figure 7 A structure diagram of an electronic device provided by an embodiment of the application is shown. DETAILED DESCRIPTION

[0052] The preferred embodiments of the application will be specifically described below with reference to the accompanying drawings, wherein the drawings constitute a part of the application and are used to illustrate the principles of the embodiments of the application, and are not used to limit the scope of the application.

[0053] In the description of the present application, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In addition, the meaning of "multiple" is two or more, unless otherwise specifically limited. In this paper, the reference to "embodiments" means that the specific features, structures or properties described in conjunction with the embodiments can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment to other embodiments. The skilled person explicitly and implicitly understands that the embodiments described herein can be combined with other embodiments.

[0054] The present application provides a port water area ship navigation dangerous behavior identification and early warning method, device, electronic equipment and storage medium, on the basis of ship behavior pattern identification, considering the ship motion characteristic parameter with high contribution rate, the port water area ship navigation dangerous behavior autonomous identification and early warning model is proposed by fusing multiple machine learning algorithms, realizing the autonomous discovery and early warning of port water area dangerous behavior.

[0055] The following will be described in detail:

[0056] Please refer to Figure 1 , Figure 1 The flowchart of an embodiment of a port water area ship navigation dangerous behavior identification and early warning method provided by the present application, one specific embodiment of the present application discloses a port water area ship navigation dangerous behavior identification and early warning method, comprising:

[0057] Step S101: acquiring ship AIS data and preprocessing the ship AIS data to obtain preprocessed data;

[0058] Step S102: extracting first ship motion characteristic parameters from the preprocessed data based on ship similarity motion parameters and ship difference motion parameters;

[0059] Step S103: dimension reduction of the first motion characteristic parameters based on a pre-set dimension reduction algorithm to obtain second ship motion characteristic parameters with a contribution rate greater than a pre-set contribution rate;

[0060] Step S104: inputting the second ship motion characteristic parameter into a pre-constructed multi-algorithm fusion dangerous behavior recognition and early warning model for learning, recognizing normal behavior and dangerous behavior of ship navigation, and warning dangerous behavior of ship navigation, wherein a network structure of the pre-constructed multi-algorithm fusion dangerous behavior recognition and early warning model comprises a BP neural network algorithm submodel, a support vector machine algorithm submodel and a random forest algorithm submodel.

[0061] The application guarantees the authenticity of data by preprocessing AIS data of a ship, realizes extraction of ship motion characteristic parameters of a trajectory sequence by extracting first ship motion characteristic parameters from the preprocessed data through ship similarity motion parameters and ship difference motion parameters, solves the problems of calculation complexity caused by high-dimensional ship motion characteristic parameters by performing dimension reduction on the first motion characteristic parameters based on a preset dimension reduction algorithm, realizes screening of high-contribution-rate motion characteristic parameters, and finally, based on improved Support Vector Machines (SVM), improved Back Propagation (BP) neural network and improved Random Forest (RF), constructs a port water area ship navigation dangerous behavior autonomous recognition and early warning model under multi-machine learning algorithm fusion, and realizes accurate recognition and early warning of port water area ship navigation dangerous behavior.

[0062] In an embodiment of the application, the first ship motion characteristic parameters are extracted from the preprocessed data based on ship similarity motion parameters and ship difference motion parameters, including:

[0063] For different ship behavior modes, corresponding judgment thresholds and judgment conditions of speed, heading and displacement factors are set;

[0064] The speed, heading and displacement of the ship are obtained based on ship similarity motion parameters and ship difference motion parameters;

[0065] The speed, heading and displacement of the ship are compared with the set judgment thresholds and judgment conditions to identify the current ship behavior mode, wherein the ship behavior mode includes a straight sailing mode, a turning mode and a staying mode;

[0066] The first ship motion characteristic parameters corresponding to each ship behavior mode are determined.

[0067] It can be understood that the ship operation process includes in-port berthing, leaving the berth and entering the channel, channel sailing, planned route sailing, anchoring in the port waiting for entering the port, channel sailing, berthing operation, etc. The ship will be at anchor or other stopping points when it is in port berthing and waiting for leaving the berth and berthing operation; the ship will have a steering operation when it is leaving the berth, berthing operation and channel sailing; the ship will sail along a fixed heading when it is in the port, outside the port channel and planned route sailing. Therefore, the ship behavior mode is divided into straight sailing mode, steering mode and staying mode in the present application.

[0068] In the formula, the ship similarity motion parameters are defined as the same space-time motion characteristic parameters, mainly including the space distance between each sub-trajectory point of the ship, speed, heading, turning angle, heading, angular velocity, time difference, acceleration, initial value, maximum value, minimum value, median value, mean value, standard deviation, variance and the variance and standard deviation of longitude and latitude, etc. totaling 67; the ship difference motion parameters are defined as the unique space-time motion characteristic parameters of the ship, including the staying center, error radius, straight sailing average direction, straight sailing speed standard deviation, straight sailing acceleration, turning equivalent center, turning equivalent radius and steering speed, etc. totaling 8.

[0069] Specifically, the similarity motion parameters of the ship sailing include the trajectory point space distance parameters: the position coordinates of the ship trajectory point usually adopt WGS-84 coordinate system. The distance between two geographical coordinate points can be calculated by Haversine formula. and

[0070] (1)

[0071] In the formula, R is the earth radius; d is the shortest distance between two points.

[0072] Trajectory speed parameters:

[0073] (2)

[0074] In the formula: is the average speed; is the maximum speed of the trajectory; is the minimum speed; is the median speed; is the speed variance; is the speed standard deviation.

[0075] Trajectory direction parameters:

[0076] (3)

[0077] In the formula: is the average direction; ​for the direction of maximum; for the direction of minimum; for the median of the directions; for the variance of the directions; for the standard deviation of the directions.

[0078] for the turn angle;

[0079] (4)

[0080] where: for the mean of the turn angles; for the maximum turn angle; for the minimum turn angle; for the median of the turn angles; for the variance of the turn angles; for the standard deviation of the turn angles.

[0081] for the time difference;

[0082] (5)

[0083] where: for the mean of the time differences; for the maximum time difference; for the minimum time difference; for the median of the time differences; for the variance of the time differences; for the standard deviation of the time differences.

[0084] for the acceleration;

[0085] (6)

[0086] where: for the mean of the accelerations; for the maximum acceleration; for the minimum acceleration; for the median of the accelerations; for the variance of the accelerations; for the standard deviation of the accelerations.

[0087] for the curvature;

[0088] (7)

[0089] where: for the mean of the curvatures; for the maximum curvature; for the minimum curvature; for the median of the curvatures; for the variance of the curvatures; for the standard deviation of the curvatures.

[0090] The differential motion parameters of ship navigation include differential motion characteristic parameters under different behavior modes, and the sub-trajectory segments under different behavior modes are... The differential motion characteristic parameters of the dwell pattern include the dwell center point and the error radius. Dwell Center Point The calculation uses the average of the positions of all dwelling sub-trajectories, that is:

[0091] (8)

[0092] Error radius This is the maximum distance between a point on the trajectory and the center point of the trajectory segment, i.e.:

[0093] (9)

[0094] In the formula: Represents the distance function.

[0095] The differential motion characteristic parameters of the straight flight mode include the straight flight mean direction, the straight flight speed standard deviation, and the straight flight acceleration.

[0096] The average direction of the straight flight, i.e., the overall heading of the straight flight sub-track:

[0097] (10)

[0098] Standard deviation of direct flight speed:

[0099] (11)

[0100] Straight-line acceleration:

[0101] (12)

[0102] The differential motion characteristic parameters of steering modes include the steering equivalent center, steering equivalent radius, steering angle, and steering speed. Let the steering origin be... The destination is The starting angle of the turn is The final steering angle is Please see. Figure 2 , Figure 2 This is a steering mode sub-trajectory feature map provided in an embodiment of the present invention. A straight line passing through the starting point and perpendicular to the direction of the starting point. and a straight line passing through the termination point and perpendicular to the direction of the termination point. ( Figure 3 The intersection of the two lines is the equivalent center point of the turning. Because the straight line... ;straight line Therefore It can be obtained from Equation 13:

[0103] (13)

[0104] Among them, the equivalent turning radius For the equivalent center Distance from the starting point or end point. Turning angle. This refers to the turning angle between the starting direction and the ending direction. Turning speed. This is the ratio between the total turning distance and the total time, i.e.:

[0105] (14)

[0106] Understandably, methods for identifying and warning about ship behavior patterns primarily rely on structurally representing ship behavior based on its motion characteristics. However, in reality, due to the influence of currents and wind, as well as ship positioning errors, a ship's speed is not necessarily zero when moored or anchored, and the hull experiences random displacement within a certain area. When a ship travels in a fixed direction, its trajectory is not necessarily a straight line; it may make small changes in its heading during navigation to correct its course. When turning, it may adjust its course back and forth, potentially resulting in a chaotic trajectory.

[0107] In order to determine the behavioral patterns of a ship's trajectory through its motion parameters, a set of... Trajectory segment within time The corresponding speed is The corresponding heading is The length of the ship's trajectory segment for:

[0108] (15)

[0109] The total change in the ship's course is:

[0110] (16)

[0111] For different behavior patterns, corresponding judgment thresholds and conditions are set for factors such as speed, heading, and displacement. Finally, a sliding window algorithm is used to identify ship behavior patterns. Specifically, trajectory segments are obtained. China Shipbuilding , Set window size If in Satisfy within a time limit and (i=1,2,…,m), then we can deduce The vessel's behavior pattern is a stay mode; if the above conditions are not met and it is in... Within a time Therefore, it can be inferred that... The behavior mode of all trajectory points in the trajectory segment is a straight sailing mode, and otherwise is a turning mode. Finally, on the basis of completing ship behavior mode identification, the first motion characteristic parameters of different behavior modes are extracted.

[0112] In an embodiment of the present application, the preset dimension reduction algorithm includes a principal component analysis algorithm, the first motion characteristic parameters are dimensionally reduced based on the preset dimension reduction algorithm, and second ship motion characteristic parameters with a contribution rate greater than a preset contribution rate are obtained, including:

[0113] A characteristic parameter matrix corresponding to the first motion characteristic parameters is obtained, and the characteristic parameter matrix is normalized to obtain a plurality of characteristic values of the relationship between the motion characteristic parameters;

[0114] The plurality of characteristic values are orthogonally processed based on the Schmidt orthogonal method, and the principal component factors of the first motion characteristic parameters are calculated based on the orthogonally processed data;

[0115] The contribution rate of each first motion characteristic parameter is calculated according to the principal component factors of the first motion characteristic parameters, and the second ship motion characteristic parameters with a contribution rate greater than a preset contribution rate are determined in descending order.

[0116] It can be understood that, in order to test the correlation between ship motion characteristics and optimize the ship motion characteristic parameter index, the principal component analysis method is used to analyze the correlation between ship motion characteristic parameters, and the principal components of the characteristic parameters affecting the identification of ship dangerous behaviors are extracted.

[0117] Specifically, it is assumed that there are ship sample data, each sample contains ship motion characteristics, that is , and the first motion characteristic parameter matrix is:

[0118] (17)

[0119] First, the first motion characteristic parameter matrix is subjected to z-socre standardization:

[0120] (18)

[0121] In the formula: is the average value of the motion characteristic parameters sampled in each row; is the variance of the first row of the characteristic parameter matrix.

[0122] Then, the first motion characteristic parameter matrix after standardization is calculated to obtain:

[0123] (19)

[0124] In the formula:

[0125] (20)

[0126] wherein, .

[0127] The Jacobian conversion method is used to obtain the relationship between the first motion characteristic parameters The Schmitt orthogonal method is used for unit orthogonalization of the first motion characteristic parameter vectors, and the following can be obtained:

[0128] (21)

[0129] In order to obtain the linear model based on the motion characteristic parameters The principal component factors of the motion characteristic parameter data set are calculated, that is:

[0130] (22)

[0131] The cumulative contribution rate of is calculated:

[0132] (23)

[0133] The contribution rates of the ship motion characteristic parameters are calculated, sorted from large to small, and the cumulative contribution rate of the first m characteristic parameters is judged. If the cumulative contribution rate of the first m characteristic parameters reaches the set contribution rate threshold, the first m principal component motion characteristics are selected as the influence parameters for ship dangerous behavior recognition.

[0134] In an embodiment of the present application, the training process of the pre-constructed multi-algorithm fusion dangerous behavior recognition and early warning model includes:

[0135] The second ship motion characteristic parameters are divided into multiple ship motion characteristic data subsets, and the multiple subsets are respectively input into the BP neural network algorithm submodel, the support vector machine algorithm submodel and the random forest algorithm submodel for training to obtain a first prediction result.

[0136] The first prediction result is compared with the real ship navigation behavior to determine the accuracy rate of the prediction.

[0137] It can be understood that the dangerous behavior of the ship in the port water area mainly refers to that the position, speed and heading of the ship during navigation are different from most ships, and the ship may have an accident risk or potential accident risk. And the motion characteristic data sets under different behavior modes have different characteristics: in the stay behavior mode, the data set may contain unprocessed noise data, and an algorithm with strong noise resistance should be used; in the straight navigation behavior mode, there are more motion characteristic parameters, and an algorithm good at processing high-dimensional data should be used for identification; in the turning behavior mode, the data set contains more missing data and outliers, and an algorithm with better robustness should be used.

[0138] In the machine learning algorithm, the SVM algorithm has good classification effect, can map to high-dimensional space and solve nonlinear classification using kernel function, but has large load when facing large-scale training samples, and is sensitive to missing data and parameters and selection of kernel function because SVM uses fixed penalty coefficient, the penalties caused by positive and negative samples are different; RF algorithm can process high-dimensional data, does not need to do feature selection, has strong anti-overfitting ability, and can monitor the influence between features, and can balance errors for unbalanced data set, and the algorithm can maintain accuracy even if some features of the data are missing, but RF algorithm does not effectively control the parameter adjustment of internal model, and can only be tested under multiple parameters and randomness, and can easily cause bad classification results for small sample data; BP algorithm realizes automatic extraction and output, and can adaptively assign learning content to network weights, the algorithm can correctly classify unobserved patterns and in data noise pollution, and has certain fault tolerance, but BP algorithm will eventually evolve into local minimization for classification problem, so different results can be obtained each time, and the convergence speed of the algorithm is slow, and the dependence on samples is strong.

[0139] Therefore, considering the characteristics of the motion characteristic data sets of different behavior modes and the advantages and disadvantages of different machine learning algorithms, the second ship motion characteristic parameters with high contribution rate are selected after principal component analysis of the ship motion characteristic parameter data sets of the straight navigation mode, the stay mode and the turning mode, and are input into the SVM algorithm sub-model, the RF algorithm sub-model and the BP algorithm sub-model for training.

[0140] Specifically, the ship navigation dangerous behavior recognition and early warning model based on multi-algorithm fusion divides the ship motion characteristic data set into multiple subsets, trains each subset using different algorithm classifiers, compares the prediction results with the true values, feeds back to the multi-classifier to obtain an optimized model, and through construction of the ship dangerous behavior recognition and early warning model based on multi-algorithm fusion, the data can be analyzed from different data spaces and data structures, and the prediction accuracy of a single algorithm is improved.

[0141] Further, it needs to be explained that the application adopts a Stacking hierarchy to construct a ship dangerous behavior recognition and early warning model of multi-algorithm fusion. Stacking can organically combine multiple prediction algorithms, and its core idea is to train a first-order classifier using the original ship motion characteristic parameters, combine the meta-classification result with the initial value label, feed back to train the meta-classifier, and then fit the original ship motion characteristic parameter data. Stacking enables the base classifier to have the functions of feature extraction and feature superposition, thereby improving the prediction accuracy of a single algorithm for ship motion characteristic parameters. In the learning stage of the base classifier, cross-validation is used in k-fold iteration to avoid overfitting in the learning stage. The method divides the original ship motion characteristic parameter data set into k subsets of similar size , , , , , , , , , , , , , , , Figure 3 , Figure 3 An embodiment of the application provides a ship dangerous behavior autonomous identification and early warning indication.

[0142] In an embodiment of the application, the support vector machine algorithm sub-model is trained, including: ​​​

[0143] The central sample of each category is trained by k-means clustering to obtain an initial classifier set, and the initial classifier set is divided into a ready classifier set and a limited classifier set;

[0144] The preset sample is selected to train the ready classifier, so that the ready classifier group and the limited classifier group continuously feedback as the training sample amount increases, until all classification algorithms no longer update.

[0145] It can be understood that after principal component analysis is performed on the ship motion characteristic parameter data set, the second ship motion characteristic parameter with a high contribution rate is selected and input into the SVM training model for training. The data includes an AIS data set marked as normal trajectory data and a noise data set marked as dangerous trajectory. A more efficient training model is obtained through training. When resources and time are relatively sufficient, the SVM multi-classification algorithm can solve the problem of large AIS data set of the ship and high accuracy requirement, and can also convert the ship motion characteristic parameters with high correlation into independent or non-correlated variables, and then identify the dangerous behavior of the ship.

[0146] The SVM multi-classification algorithm first trains the central sample of each category by k-means clustering to obtain an initial classifier set, and then divides it into a ready classifier set and a limited classifier set. On this basis, the optimal sample is selected to train the ready classifier. In the learning process, the ready classifier group and the limited classifier group will continuously feedback as the training sample amount increases, until all classification algorithms no longer update. The support vector machine multi-classification algorithm not only can reduce the number of required classifiers, but also can optimize the classifier and sample capacity, thereby reducing the complexity of algorithm construction and improving the efficiency of the algorithm. In this paper, the rbf kernel function is used to classify the dangerous behavior of the ship. Two classifiers are used in the identification process to mark the normal behavior of the ship as True and the dangerous behavior as False, and to classify the behavior of the ship. The SVM mainly calculates the distance between the ship motion characteristic parameter data and the hyperplane for classifying it, defines the hyperplane as , calculates the margin corresponding to different hyperplanes, and determines and so that the margin is maximum. The objective function of the optimization problem is as follows:

[0147] (24)

[0148] In the formula: is the length of the motion characteristic data vector. The two-dimensional data in the sample space is represented as , where are the first and second principal components, respectively; Y is the data sample space.

[0149] When the classification is accurate, there will be and two categories. Two categories are defined as support vector and non-support vector, respectively, and the hyperplane is defined as and The distance between the two vectors is as follows.

[0150] (25)

[0151] In the formula: is the margin of the support vector.

[0152] Solving the maximum margin , the appropriate hyperplane can be found. From equation (25), solving the maximum value of is to solve the minimum value of , so the basic type of SVM is obtained, as shown in the following formula:

[0153] (26)

[0154] The Lagrange multiplier is added to the constraint of the basic type of SVM . Through the Lagrange multiplier method, the conditional extreme value is solved, and the hyperplane can be represented by . Then let the partial derivative of the Lagrange function L with respect to and be 0, and then bring it into equation (26). Finally, according to the dual problem, the maximum margin hyperplane function can be solved , and .

[0155] (27)

[0156] In the formula: indicates the hyperplane of ship motion characteristic data; i is the number of ship motion characteristic data set.

[0157] When constructing the support vector machine classifier, the parameters of the system can be adjusted to have high precision and stable classification state. When learning the support vector machine, the error tolerance of the objective function is realized by adjusting the penalty factor ; When selecting the Rbf kernel function, the parameters are improved to adjust the continuity of the classification accuracy and the classification boundary. With the increase of , the classification boundary of the classifier becomes more and more discrete from smooth, and when it is fully discrete, the accuracy of the classifier can reach 1, which belongs to the overfitting state. On this basis, combined with the smoothness of the classification boundary of the classifier and the corresponding recognition accuracy, the appropriate determining an algorithm model.

[0158] In an embodiment of the present application, the BP neural network algorithm submodel comprises an input layer, an output layer and a hidden layer, and training the BP neural network algorithm submodel comprises:

[0159] initializing the number of nodes in the input layer, the number of nodes in the hidden layer and the number of nodes in the output layer, initializing the neurons in the input layer, the hidden layer and the output layer, and initializing the thresholds of the hidden layer and the output layer;

[0160] calculating the output of the hidden layer by an excitation function according to the variables, the connection weights between the input layer and the hidden layer and the thresholds of the hidden layer;

[0161] calculating the predicted output of the BP neural network according to the output of the hidden layer, the connection weights and the thresholds;

[0162] calculating the prediction error of the network according to the predicted output of the network and the expected output;

[0163] updating the connection weights of the network according to the prediction error of the network;

[0164] updating the thresholds of the nodes according to the prediction error of the network.

[0165] It can be understood that the second ship motion characteristic parameters with high contribution rate are screened out after the principal component analysis of the first ship motion characteristic parameters, and are input into the BP training model for training. The BP algorithm is a supervised learning method, and the idea is that the output data gradually approaches the expected data by using the back propagation method for the input of the learning sample, and the training is stopped when the sum of squares of the errors of the data of the network is lower than the specified threshold value while keeping the weights and biases of the network unchanged.

[0166] Please refer to Figure 4 , Figure 4 A BP neural network structure diagram provided by an embodiment of the present application. It reflects the input-output relationship of the sample. In order to avoid the situation of easily falling into local minimum due to slow convergence speed, the BP neural network is constructed in combination with the Gaussian elimination method. The BP neural network is composed of an input layer, an output layer and a hidden layer, is the input layer, is the output layer, and the rest is the hidden layer. Before the BP neural network performs prediction, it is preliminarily trained to have the functions of association, storage and prediction, and the training steps are as follows:

[0167] Step 1: Network initialization. The number of nodes n in the input layer, the number of nodes l in the hidden layer and the number of nodes m in the output layer are initialized, Initialization, initialization of neurons in input layer, hidden layer, output layer, threshold of hidden layer , threshold of output layer is initialized.

[0168] Step 2: Hidden layer calculation. According to the variable , input layer and hidden layer connection weight and hidden layer threshold , the hidden layer output is calculated by the excitation function f.

[0169] (28)

[0170] Using sigmoid function:

[0171] (29)

[0172] Step 3: Output layer calculation. According to the hidden layer output , connection weight and threshold , the BP neural network prediction output is calculated.

[0173] (k=1,2,…,m) (30)

[0174] Step 4: Error calculation. According to the network prediction output and expected output , the network prediction error is calculated.

[0175] (k=1,2,…,m) (31)

[0176] Step 5: Weight update. According to the network prediction error , the network connection weight , is updated.

[0177] (i=1,2,…,l; k=1,2,…,m) (32)

[0178] (j=1,2,…,l; k=1,2,…,m) (33)

[0179] In the formula, is the learning rate.

[0180] Step 6: Threshold update. According to the network prediction error e, the node threshold a, b is updated.

[0181] (j=1,2,…,l)(34)

[0182] (k=1,2,…,m)(35)

[0183] Step 7: If the loop of this method does not complete, return to step 2.

[0184] Understandably, many motion characteristic parameters are nonlinear and complex, and the powerful nonlinear characteristics of BP neural networks are well-suited to address problems with complex underlying mechanisms. Essentially, a BP neural network is a transformation function from input to output. Mathematical theory shows that a three-layer neural network can approximate any nonlinear continuous function with arbitrarily high precision. Therefore, machine learning-based ship target classification and recognition algorithms can utilize BP neural networks for classification.

[0185] In one embodiment of the present invention, training a sub-model of the random forest algorithm includes:

[0186] Using the bootstrap resampling method, multiple motion feature parameters are randomly extracted with replacement from the second motion feature parameters to establish a feature parameter set.

[0187] Based on the set of feature parameters as input, multiple decision trees are generated, and a random forest algorithm framework is constructed.

[0188] The dataset of ship motion feature parameters to be identified or regressed is input into a random forest, and the data of each tree structure is mean-processed.

[0189] This can be understood as follows: after performing principal component analysis on the first ship motion characteristic parameters, the second ship motion characteristic parameters with high contribution rates are selected and input into the RF training sub-model for training. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram of a random forest algorithm provided in an embodiment of the present invention. The RF algorithm first uses the Bootstrap algorithm to resample the initial set of motion feature parameters to obtain several different sample sets; based on this, a classification method based on decision trees is proposed, which processes each classification to obtain the classification result with the highest number of votes, and transforms it into the final output of the model.

[0190] The RF algorithm combines multiple weak classifiers to obtain a classifier with better performance. This represents the initial dataset of ship motion characteristic parameters, and uses... Indicates from Randomly sampled ship motion characteristic parameters. Constructing the RF algorithm involves three basic steps: First, using the bootstrap resampling method, from... Randomly draw with replacement Motion feature parameters Establish a new set of feature parameters The second step is to use a new sample set. The first step involves generating multiple decision trees as inputs, and constructing the basic framework of a random forest based on these trees. The second step involves inputting the dataset of ship motion feature parameters to be identified or regressed into the random forest, and averaging the data of each tree structure to obtain the final reconstruction result.

[0191] The Random Forest algorithm constructs a stronger behavior classifier by ensembles multiple weak ship behavior classifiers. Based on this, a method based on multiple decision trees is proposed. A behavior classifier was used. Finally, by synthesizing the decision trees of each ship's behavior, the final behavior attribution label was determined. This represents independent and identically distributed random vectors.

[0192] To build A tree model, then generate Each random vector is distinct from the other two, independent, identically distributed, somewhat similar, uncertain, and strongly correlated. Each random vector is then used to... A built The discriminant classification model. Given... Classifier The training set is randomly selected from the data, and the data is also randomly selected from the random vector. Samples are also extracted from the training set, where the distribution of the training set is defined by the marginal function as follows:

[0193] (36)

[0194] In the formula: I(•) is the indicator function. Indicates the vector Classified correctly The number exceeds the number of misclassifications The degree of quantity. It can be seen that the confidence level of the classification is proportional to the margin.

[0195] It can be seen that the confidence level of the classification is directly proportional to the marginal result. Therefore, the generalization error of the classifier is:

[0196] (37)

[0197] In the formula, the subscript This indicates that the error is in under the space.

[0198] The above results are extended to the random forest model, and we get . Combined with the law of large numbers, if the number of decision trees in the random forest is large, as the number of decision trees increases, all random vectors , will gradually approach the upper bound, so we get:

[0199] (38)

[0200] The random forest algorithm can effectively prevent overfitting, and has good scalability when dealing with unknown data. As the number of trees increases, the generalization error tends to the upper bound.

[0201] The edge function of the random forest is:

[0202] (39)

[0203] The intensity of is represented by:

[0204] (40)

[0205] Assuming , based on Chebyshev's inequality, from equations (40) and (41) we can get:

[0206] (41)

[0207] The form is as follows:

[0208] (42)

[0209] And

[0210] (43)

[0211] Combining the above formulas, we get:

[0212] The upper bound of the generalization error of the random forest can be derived by and :

[0213] (44)

[0214] In the formula: is the average correlation between multiple decision trees, reflecting the correlation between multiple decision trees; represents the classification accuracy of each decision tree.

[0215] It should be noted that regarding the selection of the sample set: assuming that there are N ship behavior samples in the original ship behavior data set, the Bootstraping method is used to extract N behavior samples from the original data set, and a training set of N behavior samples is output. Select k cycles for each sample, and the selected sample for each cycle is .

[0216] Suppose that there are D ship motion features in the feature space, then in the process of generating a decision tree in each round, randomly select ship motion features from the ship motion features ( ) to form a new feature set, and generate a decision tree by using the new feature set.

[0217] The decision trees generated by this method are independent of each other, and each decision tree has the same importance. Therefore, when they are combined, there is no need to consider the respective weights, and it can be assumed that the weights of the two are equal.

[0218] In order to better implement the port water area ship navigation dangerous behavior recognition and early warning method in the embodiment of the present application, on the basis of the port water area ship navigation dangerous behavior recognition and early warning method, please refer to Figure 6 , Figure 6 the structure diagram of an embodiment of the port water area ship navigation dangerous behavior recognition and early warning device provided by the present application, the embodiment of the present application provides a port water area ship navigation dangerous behavior recognition and early warning device 600, which comprises:

[0219] a preprocessing module 601, configured to acquire ship AIS data and preprocess the ship AIS data to obtain preprocessed data;

[0220] a feature extraction module 602, configured to extract first ship motion feature parameters from the preprocessed data based on ship similarity motion parameters and ship difference motion parameters;

[0221] a dimension reduction module 603, configured to perform dimension reduction on the first motion feature parameters based on a preset dimension reduction algorithm to obtain second ship motion feature parameters with a contribution rate greater than a preset contribution rate;

[0222] ​The identification and early warning module 604 is configured to input the second ship motion characteristic parameter into a trained multi-algorithm fusion dangerous behavior identification and early warning model to identify normal behavior and dangerous behavior of ship navigation and to early warn the dangerous behavior of ship navigation, wherein the trained multi-algorithm fusion dangerous behavior identification and early warning model is constructed based on a BP neural network algorithm, a support vector machine algorithm and a random forest algorithm.

[0223] It should be noted that the apparatus 600 provided in the above embodiments can implement the technical solutions described in the above method embodiments, and the principles of the implementation of the above modules or units can be referred to the corresponding content in the above method embodiments, which will not be described here.

[0224] Based on the above port water area ship navigation dangerous behavior identification and early warning method, the embodiments of the present application also correspondingly provide an electronic device, which comprises a processor and a memory and a computer program stored in the memory and executable on the processor; the processor executes the computer program to implement the steps in the port water area ship navigation dangerous behavior identification and early warning method of the above embodiments.

[0225] Figure 7 The structure of the electronic device 700 suitable for implementing the embodiments of the present application is shown in FIG. 7. The electronic device in the embodiments of the present application can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 7 The electronic device shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present application.

[0226] The electronic device includes a memory and a processor, wherein the processor here can be referred to as the processing device 701 below, and the memory can include at least one of a read-only memory (ROM) 702, a random access memory (RAM) 703 and a storage device 708, as shown below:

[0227] As shown in FIG. 7, the electronic device includes the processing device 701, the ROM 702, the RAM 703, a user interface 704, a display 705, a communication device 706 and the storage device 708. Figure 7As shown, the electronic device 700 can include a processing device (e.g., a central processor, a graphics processor, etc.) 701 that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 702 or loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0228] Generally, the following devices can be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication devices 709 can allow the electronic device 700 to communicate wirelessly or wired with other devices to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that not all of the shown devices are required to be implemented or present. More or fewer devices can alternatively be implemented or present.

[0229] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 709, or installed from the storage devices 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the methods of embodiments of the present application are performed.

[0230] Based on the above-mentioned port water area ship navigation dangerous behavior identification and early warning method, the embodiments of the present application also correspondingly provide a computer readable storage medium, the computer readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the port water area ship navigation dangerous behavior identification and early warning method of the above-mentioned embodiments.

[0231] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiments can be completed by instructing related hardware through a computer program, and the program can be stored in a computer readable storage medium. The computer readable storage medium is a disk, an optical disk, a read-only memory or a random access memory, etc.

[0232] The above description is only the preferred embodiment of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application.

Claims

1. A port water area ship navigation dangerous behavior identification and early warning method, characterized in that, The method comprises the following steps: acquiring ship AIS data and preprocessing the ship AIS data to obtain preprocessed data; extracting first ship motion characteristic parameters from the preprocessed data based on ship similarity motion parameters and ship difference motion parameters, including: setting corresponding judgment thresholds and conditions of speed, heading and displacement factors for different ship behavior modes; acquiring the speed, heading and displacement of the ship based on the ship similarity motion parameters and the ship difference motion parameters; comparing the speed, heading and displacement of the ship with the set judgment thresholds and conditions to identify the current ship behavior mode, wherein the ship behavior mode includes straight sailing mode, turning mode and staying mode; determining the first ship motion characteristic parameters corresponding to each ship behavior mode; dimension reduction is performed on the first ship motion characteristic parameters based on a principal component analysis algorithm to obtain second ship motion characteristic parameters with a contribution rate greater than a preset contribution rate, including: obtaining a characteristic parameter matrix corresponding to the first ship motion characteristic parameters, and performing standardization processing on the characteristic parameter matrix to obtain a plurality of characteristic values of the relationship between the motion characteristic parameters; performing orthogonal processing on the plurality of characteristic values based on the Schmidt orthogonal method, and calculating the principal component factors of the first ship motion characteristic parameters based on the data after orthogonal processing; calculating the contribution rate of each first ship motion characteristic parameter according to the principal component factors of the first ship motion characteristic parameters, and determining the second ship motion characteristic parameters with a contribution rate greater than a preset contribution rate in descending order; inputting the second ship motion characteristic parameters into a pre-constructed multi-algorithm fusion dangerous behavior recognition and early warning model for learning to identify normal behavior and dangerous behavior of ship navigation, and to warn the dangerous behavior of ship navigation, wherein the network structure of the pre-constructed multi-algorithm fusion dangerous behavior recognition and early warning model includes a BP neural network algorithm sub-model, a support vector machine algorithm sub-model and a random forest algorithm sub-model; the training process of the pre-constructed multi-algorithm fusion dangerous behavior recognition and early warning model includes: dividing the second ship motion characteristic parameters into a plurality of ship motion characteristic data subsets, and inputting the plurality of subsets into the BP neural network algorithm sub-model, the support vector machine algorithm sub-model and the random forest algorithm sub-model respectively for training to obtain a first prediction result; comparing the first prediction result with the real ship navigation behavior to determine the accuracy rate of the prediction, and if the accuracy rate does not meet the preset accuracy rate, continuously training the BP neural network algorithm sub-model, the support vector machine algorithm sub-model and the random forest algorithm sub-model until the second prediction result output meets the preset accuracy rate.

2. The port water area ship navigation dangerous behavior identification and early warning method according to claim 1, characterized in that, training the support vector machine algorithm sub-model, including: training the central sample of each category using k-means clustering to obtain an initial classifier set, and dividing the initial classifier set into a ready classifier set and a limited classifier set; The preset samples are selected to train the ready classifier, so that the ready classifier group and the limit classifier group continuously feedback as the training sample amount increases, until all the classification algorithms are no longer updated.

3. The port water area ship navigation dangerous behavior identification and early warning method according to claim 1, characterized in that, The BP neural network algorithm sub-model includes an input layer, an output layer and a hidden layer, and the training of the BP neural network algorithm sub-model includes: The number of nodes of the input layer, the number of nodes of the hidden layer and the number of nodes of the output layer Initialization is performed, and neurons of the input layer, the hidden layer and the output layer are initialized, and thresholds of the hidden layer and the output layer are initialized. According to the variables, the input layer and the hidden layer connection weights and the hidden layer threshold value, the hidden layer output is calculated through the excitation function; According to the hidden layer output, the connection weight and the threshold value, the BP neural network prediction output is calculated; According to the network prediction output and the expected output, the network prediction error is calculated; According to the network prediction error, the network connection weight is updated; According to the network prediction error, the node threshold value is updated.

4. The port water area ship navigation danger behavior identification and early warning method according to claim 1, characterized in that, The training of the random forest algorithm sub-model includes: Using the bootstrap resampling method, a plurality of motion characteristic parameters are randomly sampled with replacement from the second ship motion characteristic parameters to establish a characteristic parameter set; Based on the characteristic parameter set as an input item, a plurality of decision trees are generated, and a random forest algorithm framework is constructed; The ship motion characteristic parameter data set to be identified or regressed is input into the random forest, and the data of each tree structure is processed by averaging.

5. A device for identifying and warning of dangerous behavior of a ship navigating in a port water area, characterized in that, It includes: A preprocessing module is configured to obtain ship AIS data and preprocess the ship AIS data to obtain preprocessed data; A feature extraction module is configured to extract first ship motion characteristic parameters from the preprocessed data based on ship similarity motion parameters and ship difference motion parameters, including: setting corresponding judgment thresholds and conditions for speed, heading and displacement factors for different ship behavior modes; obtaining the speed, heading and displacement of the ship based on the ship similarity motion parameters and the ship difference motion parameters; comparing the speed, heading and displacement of the ship with the set judgment thresholds and conditions to identify the current ship behavior mode, wherein the ship behavior mode includes a straight sailing mode, a turning mode and a staying mode; determining the first ship motion characteristic parameters corresponding to each ship behavior mode; A dimension reduction module is configured to reduce the dimension of the first ship motion characteristic parameters based on a principal component analysis algorithm to obtain second ship motion characteristic parameters with a contribution rate greater than a preset contribution rate, including: obtaining a characteristic parameter matrix corresponding to the first ship motion characteristic parameters, and performing standardization processing on the characteristic parameter matrix to obtain a plurality of characteristic values of the relationship between the motion characteristic parameters; performing orthogonal processing on the plurality of characteristic values based on the Schmidt orthogonal method, and calculating the principal component factors of the first ship motion characteristic parameters based on the data after orthogonal processing; calculating the contribution rate of each first ship motion characteristic parameter according to the principal component factors of the first ship motion characteristic parameters, and determining the second ship motion characteristic parameters with a contribution rate greater than a preset contribution rate in descending order; The identification and early warning module is configured to input the second ship motion characteristic parameter into a trained multi-algorithm fusion dangerous behavior identification and early warning model to identify normal behavior and dangerous behavior of ship navigation and to give a warning for dangerous behavior of ship navigation, wherein the trained multi-algorithm fusion dangerous behavior identification and early warning model is constructed based on a BP neural network algorithm, a support vector machine algorithm and a random forest algorithm. The training process of the pre-constructed multi-algorithm fusion dangerous behavior identification and early warning model includes: The second ship motion characteristic parameter is divided into a plurality of ship motion characteristic data subsets, and the plurality of subsets are respectively input into a BP neural network algorithm submodel, a support vector machine algorithm submodel and a random forest algorithm submodel for training to obtain a first prediction result. The first prediction result is compared with a real ship navigation behavior to determine a prediction accuracy rate, and if the accuracy rate does not meet a preset accuracy rate, the BP neural network algorithm submodel, the support vector machine algorithm submodel and the random forest algorithm submodel are continuously trained until a second prediction result output meets the preset accuracy rate.

6. An electronic device, comprising: A computer readable storage medium storing a computer readable program or instructions, wherein the program or instructions, when executed by a processor, can implement the steps of the port water area ship navigation dangerous behavior identification and early warning method of any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, A computer readable storage medium storing a computer readable program or instructions, wherein the program or instructions, when executed by a processor, can implement the steps of the port water area ship navigation dangerous behavior identification and early warning method of any one of claims 1 to 4.