A method, system and medium for automatic identification of marine tracks based on machine learning
Data processing and model optimization of maritime tracks is solved through machine learning methods, and the high-dimensional and noise interference problems of maritime track data is solved, accurate classification and identification of maritime targets is achieved, and the automation and real-time nature of the identification system is improved.
Patent Information
- Application Number
- CN202411194527.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-29
AI Technical Summary
In the prior art, machine learning models are difficult to effectively overcome the problems of high-dimensionality, noise interference and dynamic changes of maritime track data, resulting in insufficient accuracy and reliability of maritime target recognition.
Using machine learning-based approaches, biclassification and subclassification of maritime tracks through data input, processing, model training and classification steps, including data cleaning, feature engineering, hyperparameter optimization and multi-process inference strategy. , optimize model performance.
It significantly improves the accuracy and automation level of maritime track recognition, can quickly identify new tracks, meet real-time requirements, and improves the efficiency and accuracy of maritime safety management.
Smart Images

Figure CN118734194B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method, system and medium for automatic identification of marine tracks, in particular to a method, system and medium for automatic identification of marine tracks based on machine learning, belonging to the technical field of track identification. Background Art
[0002] Maritime track identification technology plays a vital role in many fields such as marine scientific research, maritime traffic management, environmental monitoring, and national defense security. With the continuous increase in global maritime activities, the need for real-time monitoring and accurate identification of maritime targets is becoming increasingly urgent.
[0003] Traditional track recognition methods mainly rely on manual observation and empirical judgment, which is inefficient and easily affected by subjective factors and environmental conditions, making it difficult to ensure the accuracy and reliability of recognition results. At the same time, the diversification of marine target types and the expansion of their activity range have also posed new challenges to existing recognition methods.
[0004] In recent years, the rapid development of artificial intelligence and machine learning technologies has brought new hope to track recognition technology. Machine learning models can automatically extract features from large amounts of data and process high-dimensional data and complex nonlinear relationships, which provides new possibilities for improving the accuracy and automation level of track recognition. However, the high dimensionality, noise interference, and dynamic changes of marine track data have brought considerable challenges to the design and training of machine learning models. Summary of the invention
[0005] The purpose of the present invention is to solve the problem that the design and training of machine learning models in the prior art cannot overcome the high dimensionality, noise interference and dynamic changes of marine track data, and to provide a method, system and medium for automatic identification of marine tracks based on machine learning. The method can effectively classify marine targets and distinguish between military and civilian ships; the system uses machine learning algorithms to automatically classify marine targets, including civilian ships and military ships.
[0006] In order to solve the above problems, the present application is implemented through the following technical solutions:
[0007] A method for automatic identification of marine tracks based on machine learning, which is special in that it includes the following steps:
[0008] Step 1: Data input: obtain original track data;
[0009] Step 2, data processing: Process the original track data of step S1 to construct a multidimensional data set containing time series and spatial information;
[0010] Step 3, model training: set up three types of models: binary classification, military ship subclassification, and civilian ship subclassification. Each type of model uses a tree model, and the hyperparameters of the tree model are optimized. After optimization, the model is trained and verified to obtain a model with the highest score;
[0011] Step 4: Track classification and evaluation: Use the model with the highest score in step S3 to classify the data obtained in step S2, and evaluate the classification results;
[0012] Step 5, data output: update the weights of the categories of track classification in step S4, and output the category with the highest probability of use as the result.
[0013] Furthermore, the original track data is obtained in step 1 as follows: at time t, the original track data ,in, , , represents the partial track points of the ith track at time t, which is less than or equal to 50;
[0014] in is a track point, that is x j = [ time , lat , ln g , h , v , c ] , which are time, latitude, longitude, altitude, speed and heading respectively.
[0015] Furthermore, the step 2 specifically includes the following steps:
[0016] Step 2.1, data cleaning and preprocessing: the data cleaning and preprocessing include timestamp standardization and outlier detection and removal;
[0017] Step 2.2, feature engineering: the feature engineering includes feature selection, feature enhancement and feature conversion;
[0018] Step 2.3, data enhancement: The data enhancement specifically refers to generating new training samples by transforming the original data, thereby increasing the diversity of the data set, specifically using the time series difference method and feature perturbation method.
[0019] Furthermore, the timestamp standardization in step 2.1 is specifically as follows:
[0020] First, all timestamps are converted into a unified format. For invalid timestamps, cubic spline interpolation is used to estimate the difference between the previous and next valid timestamps.
[0021] The outlier detection and elimination are specifically as follows:
[0022] Box plot analysis, standard score analysis or interquartile range (IQR) were used to detect outliers. For the detected outliers, minor outliers whose absolute values of standard scores were between 1.5 and 3 or whose points in the box plot analysis were between Q1-1.5×IQR to Q1-3×IQR or Q3+1.5×IQR to Q3+3×IQR were smoothed by the moving average method. Severe outliers whose absolute values of standard scores were greater than 3 or whose points in the box plot analysis were less than Q1-3×IQR or greater than Q3+3×IQR were eliminated.
[0023] Furthermore, the feature selection in step 2.2 is specifically as follows: performing exploratory data analysis on the original features, calculating the conditional entropy of the features, determining the four features with the strongest correlation with the target category, and not using other features in the training stage;
[0024] The feature enhancement is specifically as follows: the data set is enhanced by calculating new features, and the new features include: track curvature: estimating the curvature of the track by calculating the change in the angle between track points; speed change rate: calculating the rate of change of speed over time to capture the acceleration or deceleration behavior of the ship;
[0025] Altitude change rate: For track data containing altitude information, calculate the rate of change of altitude over time;
[0026] The feature conversion is specifically as follows: using the percentile of each feature to replace the original track data can ensure that each track point contains the track information of the entire track.
[0027] Furthermore, the time series difference method in step 2.3 is specifically as follows: in the time series data, new track points are generated by linear interpolation or spline interpolation method to simulate the behavior of the ship at different speeds;
[0028] The feature perturbation method is specifically as follows: Randomly perturbing the selected features helps the model learn more robust feature representations.
[0029] Furthermore, the step 3 includes the following specific steps:
[0030] Step 3.1. Initialize the tree model: Select LightGBM or XGBoost model as the machine learning algorithm and set the basic parameters as follows:
[0031] Set the basic parameters of LightGBM and XGBoost models as follows:
[0032] Among them, the basic parameter search space of the LightGBM model: number of decision trees: 50 to 1000; maximum depth: 3 to 15; maximum number of leaf nodes: 5 to 80; learning rate: 0.001 to 0.1;
[0033] The basic parameter search space of the XGBoost model is as follows: number of decision trees: 100 to 1000; maximum depth: 3 to 25; L2 regularization term coefficient: 0.8 to 10; sample sampling ratio: 0.5 to 1.0; feature sampling ratio: 0.5 to 1.0; learning rate: 0.001 to 0.05;
[0034] Step 3.2: Hyperparameter optimization: Optuna is used to optimize hyperparameters, which includes the following steps:
[0035] Step 3.2.1. Determine the evaluation indicators of hyperparameters: Design a set of hyperparameters and use the accuracy and F1 score of binary classification and sub-classification as the evaluation indicators of this set of hyperparameters;
[0036] For each track in the original track data, binary classification and sub-classification are required. The data set includes 14 sub-classification categories, of which 10 categories are civil and 4 categories are military.
[0037] The accuracy of the binary classification and sub-classification is as follows: The binary classification results and sub-classification results in the final discrimination results of each track are statistically analyzed, including the following sub-indicators:
[0038] TP: If a sample is in the positive class and is judged as positive, the sample is recorded as TP (True Positive); FN: If a sample is in the positive class but is judged as negative, the sample is recorded as FN (False Negative); FP: If a sample is in the negative class but is judged as positive, the sample is recorded as FP (False Positive);
[0039] TN: If a sample is a negative class and is judged to be a negative class, the sample is recorded as TN (True Negative);
[0040] The recognition accuracy of the kth category is expressed as: ,
[0041] Therefore, if there are a total of K types of samples, the recognition accuracy of all categories is calculated as: ,
[0042] Where N represents the number of all samples, n k Represents the total number of samples in the kth category;
[0043] Precision precision indicates the proportion of positive samples judged as positive in the classifier: ,
[0044] The recall rate indicates the proportion of positive examples predicted to be positive to the total positive examples: ,
[0045] The F1 score can be viewed as the harmonic mean of precision and recall, where the F1 score for the kth category is calculated as: ,
[0046] The average F1 f-score of the K categories is calculated as: ;
[0047] Step 3.2.2. Set up the hyperparameter search space for Optuna and search: Select the TPE searcher. The TPE searcher guides the search process by building a probabilistic model to predict the performance of hyperparameter combinations. When Optuna completes the hyperparameter search, it returns the best hyperparameter combination.
[0048] Step 3.3, model training and validation: After determining the hyperparameters, use the training set data to train the model, and use the validation set data to monitor the generalization ability of the model;
[0049] During the training process, in order to prevent overfitting caused by using all the training data, the early stopping strategy is adopted, that is, the training is stopped when the performance on the validation set no longer improves to prevent overfitting; and in order to prevent the performance degradation caused by the validation set containing important learning samples, ten models are trained using ten-fold cross validation, and the model with the highest score in the validation set is selected; the learning rate decay strategy is used to gradually reduce the learning rate as the training progresses to help the model stabilize near the optimal solution; in order to ensure the model's recognition accuracy for tracks of different lengths, each type of model is trained for tracks of lengths of 50, 200, 500, 1000, and 2000 respectively.
[0050] Furthermore, the step 4 specifically includes the following steps:
[0051] Step 4.1, track classification:
[0052] Step 4.2: Evaluate the classification results of step 4.1.
[0053] Furthermore, the specific process of step 4.1 is as follows: each track in step 2 is divided into several segments with 50 points in each segment, and one of the segments and the sequence number of the corresponding track are sent in sequence each time;
[0054] Inside the track identification system, the track is stored in the data pool according to the serial number, so that the track becomes longer as the data is received. Each time a track is received, the received data of the track with the corresponding serial number is input into the binary classification model for classification to obtain the binary classification result. According to the binary classification result, the data is then input into the military sub-classification model or the civilian sub-classification model for sub-classification;
[0055] During classification, all model inference results are weighted according to the length of the input track to obtain the final result;
[0056] Different weights are assigned to different models. The weight calculation formula for each model is as follows: , ,in, is the current predicted track length, Represents the track length used by the i-th model during training.
[0057] Furthermore, the step 4.2 is as follows: the classification result of step 4.1 is evaluated by using the evaluation indicators of binary classification and sub-classification accuracy, F1 score and category consistency; wherein the binary classification and sub-classification accuracy and F1 score are calculated by the calculation method of step 3.2.1,
[0058] The category consistency refers to the consistency between the binary classification result and the detailed classification result. When the binary classification result and the detailed classification result do not match, the classification result is wrong and a penalty score is performed. Specifically, the penalty object err is divided into two categories: binary classification error, detailed classification correct and binary classification correct, detailed classification error;
[0059] If used and Indicates the binary classification results and sub-classification results of the sample; and Represents the binary classification label and the detailed classification label of the sample, and the two errors are counted as follows: ,
[0060] If you use and Represent the penalty parameters of the two types of situations respectively, and the penalty item score is:
[0061] The penalty parameter is set to ;
[0062] According to the above, the overall evaluation score is: .
[0063] Further, the step S5 is specifically as follows: for the classification result of S4, the sub-classification prediction result is 14 probability values, and the binary classification is 2 probability values;
[0064] The results of the last sub-classification and binary classification are saved according to the track ID, and then the probability prediction value of the corresponding track ID is updated as follows: in the binary classification, the weight of the historical results accounts for 0.1, and the weight of the current results accounts for 0.9; in the sub-classification, the weight of the historical results accounts for 0.4, and the weight of the current results accounts for 0.6. Finally, the category with the largest probability is used as the result for output.
[0065] A marine track automatic identification system based on machine learning, which is special in that it includes a control module configured to receive data input by a data input module and coordinate the working progress of other modules;
[0066] A data input module, which is configured to input raw track data;
[0067] A data processing module is configured to process the original track data, specifically data cleaning and preprocessing, feature engineering, and data enhancement, to obtain a diverse data set without ultrasound and outliers and suitable for the model;
[0068] The classification model is configured to process the track data in the data set obtained by the data processing module to complete the classification of the track;
[0069] The data output module is configured to update the weight of the track data classified by the tree model and output the category with the highest probability of use.
[0070] Furthermore, the classification model includes three types of models: binary classification, military ship subclassification, and civilian ship subclassification, and each type of model adopts a tree model.
[0071] A computer-readable storage medium having a computer program stored therein, characterized in that when the computer program is executed by a processor, at least one step of the method for automatic identification of marine tracks based on machine learning is executed.
[0072] The method and system for automatic identification of marine tracks based on machine learning proposed in this application have achieved significant performance improvements in both binary classification and sub-classification tasks; the system can quickly complete the identification of new tracks and meet the real-time requirements. It has improved the automation level of marine track identification and has important practical significance for improving the efficiency and accuracy of maritime safety management. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 is a flow chart of the method of the present invention;
[0074] Figure 2 It is a schematic diagram of the multi-process reasoning strategy of the present invention;
[0075] Figure 3It is a schematic diagram of the system structure of the present invention;
[0076] Figure 4 is the binary classification confusion matrix;
[0077] Figure 5 is the confusion matrix for sub-classification. DETAILED DESCRIPTION
[0078] The following is a specific implementation of the present invention with reference to the accompanying drawings to further illustrate the composition of the present invention.
[0079] In order to facilitate understanding of the embodiments of the present invention, abbreviations and key terms that may be involved in the embodiments of the present invention are first explained or defined.
[0080] Embodiment 1. A method for automatic identification of marine tracks based on machine learning, the process of which is as follows: Figure 1 As shown, the following steps are included:
[0081] Step 1: Data input: obtain original track data;
[0082] Step 2, data processing: Process the original track data of step S1 to construct a multidimensional data set containing time series and spatial information;
[0083] Step 3, model training: set up three types of models: binary classification, military ship subclassification, and civilian ship subclassification. Each type of model uses a tree model, and the hyperparameters of the tree model are optimized. After optimization, the model is trained and verified to obtain a model with the highest score;
[0084] Step 4: Track classification and evaluation: Use the model with the highest score in step S3 to classify the data obtained in step S2, and evaluate the classification results;
[0085] Step 5, data output: update the weights of the categories of track classification in step S4, and output the category with the highest probability of use as the result.
[0086] Furthermore, the original track data is obtained in step 1 as follows: at time t, the original track data ,in, , , represents the partial track points of the ith track at time t, which is less than or equal to 50;
[0087] in is a track point, that is x j = [ time , lat , ln g , h , v , c ] , which are time, latitude, longitude, altitude, speed and heading respectively.
[0088] Furthermore, the step 2 specifically includes the following steps:
[0089] Step 2.1, data cleaning and preprocessing: the data cleaning and preprocessing include timestamp standardization and outlier detection and removal;
[0090] Step 2.2, feature engineering: the feature engineering includes feature selection, feature enhancement and feature conversion;
[0091] Step 2.3, data enhancement: The data enhancement specifically refers to generating new training samples by transforming the original data, thereby increasing the diversity of the data set, specifically using the time series difference method and feature perturbation method.
[0092] Furthermore, the timestamp standardization in step 2.1 is specifically as follows: first, all timestamps are converted into a unified format, and for invalid timestamps, a cubic spline interpolation method is used to estimate the difference between the previous and next valid timestamps;
[0093] The outlier detection and elimination are specifically as follows: outliers are detected using box plot analysis, standard score analysis or interquartile range (IQR). For the detected outliers, slight outliers whose absolute values of standard scores are between 1.5 and 3 or whose points in the box plot analysis are between Q1-1.5×IQR and Q1-3×IQR or Q3+1.5×IQR and Q3+3×IQR are smoothed by the moving average method. Severe outliers whose absolute values of standard scores are greater than 3 or whose points in the box plot analysis are less than Q1-3×IQR or greater than Q3+3×IQR are eliminated.
[0094] Furthermore, the feature selection in step 2.2 is specifically as follows: perform exploratory data analysis on the original features, calculate the conditional entropy of the features, determine the four features with the strongest correlation with the target category, and do not use other features in the training stage; the feature enhancement is specifically as follows: enhance the data set by calculating new features, and the new features include:
[0095] Track curvature: Estimate the curvature of the track by calculating the change in the angle between track points; Speed change rate: Calculate the rate of change of speed over time to capture the acceleration or deceleration of the ship; Altitude change rate: For track data containing altitude information, calculate the rate of change of altitude over time;
[0096] The feature conversion is specifically as follows: using the percentile of each feature to replace the original track data can ensure that each track point contains the track information of the entire track.
[0097] Furthermore, the time series difference method in step 2.3 is specifically as follows: in the time series data, new track points are generated by linear interpolation or spline interpolation method to simulate the behavior of the ship at different speeds;
[0098] The feature perturbation method is specifically as follows: Randomly perturbing the selected features helps the model learn more robust feature representations.
[0099] Furthermore, the step 3 includes the following specific steps:
[0100] Step 3.1. Initialize the tree model: Select LightGBM or XGBoost model as the machine learning algorithm and set the basic parameters as follows:
[0101] Set the basic parameters of the LightGBM and XGBoost models as follows: The basic parameter search space of the LightGBM model: number of decision trees: 50 to 1000; maximum depth: 3 to 15; maximum number of leaf nodes: 5 to 80; learning rate: 0.001 to 0.1;
[0102] The basic parameter search space of the XGBoost model is as follows: number of decision trees: 100 to 1000; maximum depth: 3 to 25; L2 regularization coefficient: 0.8 to 10; sample sampling ratio: 0.5 to 1.0; feature sampling ratio: 0.5 to 1.0; learning rate: 0.001 to 0.05; the LightGBM model performs well in processing large-scale data sets, with efficient training speed and good prediction performance;
[0103] Step 3.2: Hyperparameter optimization: Optuna is used to optimize hyperparameters, which includes the following steps:
[0104] Step 3.2.1, determine the evaluation index of hyperparameters: design a set of hyperparameters, and use the accuracy and F1 score of binary classification and sub-classification as the evaluation index of this set of hyperparameters; for each track in the original track data, binary classification and sub-classification are required. The data set includes 14 sub-classification categories, of which 10 categories are civilian and 4 categories are military;
[0105] The accuracy of the binary classification and sub-classification is as follows: The binary classification results and sub-classification results in the final discrimination results of each track are statistically analyzed, including the following sub-indicators:
[0106] TP: If a sample is in the positive class and is judged as positive, the sample is recorded as TP (True Positive); FN: If a sample is in the positive class but is judged as negative, the sample is recorded as FN (False Negative); FP: If a sample is in the negative class but is judged as positive, the sample is recorded as FP (False Positive);
[0107] TN: If a sample is a negative class and is judged to be a negative class, the sample is recorded as TN (True Negative);
[0108] The recognition accuracy of the kth category is expressed as: ,
[0109] Therefore, if there are a total of K types of samples, the recognition accuracy of all categories is calculated as: ,
[0110] Where N represents the number of all samples, n k Represents the total number of samples in the kth category;
[0111] Precision precision indicates the proportion of positive samples judged as positive in the classifier: ,
[0112] The recall rate indicates the proportion of positive examples predicted to be positive to the total positive examples: ,
[0113] The F1 score can be viewed as the harmonic mean of precision and recall, where the F1 score for the kth category is calculated as: ,
[0114] The average F1 score of the K categories is calculated as: ;
[0115] Step 3.2.2. Set the hyperparameter search space for Optuna and search: Select TPE searcher. TPE searcher guides the search process by building a probabilistic model to predict the performance of hyperparameter combinations.
[0116] When Optuna completes the hyperparameter search, it returns the best hyperparameter combination; analyzes the parameters in the hyperparameter combination to understand which factors have the greatest impact on model performance; analyzes the performance distribution of different hyperparameter combinations to evaluate the stability and robustness of the model;
[0117] Step 3.3, model training and validation: After determining the hyperparameters, use the training set data to train the model, and use the validation set data to monitor the generalization ability of the model;
[0118] During the training process, in order to prevent overfitting caused by using all the training data, an early stopping strategy is adopted, that is, training is stopped when the performance on the validation set no longer improves to prevent overfitting; and in order to prevent the performance from degrading due to the validation set containing important learning samples, ten models are trained using ten-fold cross validation, and the model with the highest score on the validation set is selected; a learning rate decay strategy is used to gradually reduce the learning rate as the training progresses to help the model stabilize near the optimal solution;
[0119] In order to ensure the recognition accuracy of the model for tracks of different lengths, each type of model is trained for tracks of lengths of 50, 200, 500, 1000, and 2000 respectively.
[0120] Furthermore, the step 4 specifically includes the following steps:
[0121] Step 4.1, track classification:
[0122] Step 4.2: Evaluate the classification results of step 4.1.
[0123] Furthermore, the specific process of step 4.1 is as follows:
[0124] Divide each track in step 2 into several segments of 50 points each, and send one segment and the corresponding track number in sequence each time;
[0125] Inside the track identification system, the track is stored in the data pool according to the serial number, so that the track becomes longer as the data is received. Each time a track is received, the received data of the track with the corresponding serial number is input into the binary classification model for classification to obtain the binary classification result. According to the binary classification result, the data is then input into the military sub-classification model or the civilian sub-classification model for sub-classification;
[0126] During classification, all model inference results are weighted according to the length of the input track to obtain the final result;
[0127] Different weights are assigned to different models. The weight calculation formula for each model is as follows: , ,
[0128] in, is the current predicted track length, represents the track length used by the i-th model during training;
[0129] Furthermore, the step 4.2 is specifically as follows: the classification result of step 4.1 is evaluated using the evaluation indicators of binary classification and sub-classification accuracy, F1 score and category consistency;
[0130] The accuracy and F1 score of the binary classification and sub-classification are calculated using the calculation method of step 3.2.1. In the task, there is an obvious hierarchical relationship between the binary classification results and the sub-classification results. Therefore, according to the actual application scenario, the binary classification results and the sub-classification results are required to be consistent. For example, if a ship is considered to be civilian in the binary classification, then its sub-classification result should only be a civilian ship such as a ship; similarly, if it is considered to be a ship in the multi-classification, its binary classification result should be a civilian ship;
[0131] The category consistency refers to the consistency between the binary classification result and the detailed classification result. When the binary classification result does not match the detailed classification result, the classification result is wrong and a penalty score is given.
[0132] The details are as follows: The total number of penalized objects err is divided into two categories: binary classification error, sub-classification correct and binary classification correct, sub-classification error; if using and Indicates the binary classification results and sub-classification results of the sample; and Represents the binary classification label and the detailed classification label of the sample, and the two errors are counted as follows:
[0133] , ,
[0134] If using and Represent the penalty parameters of the two types of situations respectively, and the penalty item score is: ,
[0135] The penalty parameter is set to ;
[0136] According to the above, the overall evaluation score is: .
[0137] Further, the step S5 is specifically as follows: for the classification result of S4, the sub-classification prediction result is 14 probability values, and the binary classification is 2 probability values;
[0138] The results of the last sub-classification and binary classification are saved according to the track ID, and then the probability prediction value of the corresponding track ID is updated as follows: in the binary classification, the weight of the historical results accounts for 0.1, and the weight of the current results accounts for 0.9; in the sub-classification, the weight of the historical results accounts for 0.4, and the weight of the current results accounts for 0.6. Finally, the category with the largest probability is used as the result for output.
[0139] In order to improve the real-time performance of the track identification system, a multi-process reasoning strategy is adopted, such as Figure 2 As shown in the figure, in this strategy, tasks such as data processing and track classification are assigned to different processes, and the parallel computing capabilities of multi-core processors are utilized to significantly improve the processing speed of the system.
[0140] The machine learning-based automatic identification method for maritime tracks in this application performs well in processing complex maritime data sets and achieving efficient classification. First, a systematic data processing process is proposed, including data cleaning, feature engineering, and data enhancement. These steps significantly improve the availability of data and the predictive ability of the model. Secondly, Optuna, a powerful hyperparameter optimization tool, is used to automatically find the best model configuration. This process not only saves a lot of time for manual parameter adjustment, but also improves the generalization ability of the model. Finally, the study provides a new machine learning method for the field of maritime track identification, and provides valuable experience and reference for subsequent research.
[0141] Example 2. This example is an experiment on the method of Example 1.
[0142] The data set uses the preliminary data of the second "Golden Dolphin" algorithm challenge. The method selects the sea and air target track data as input. It is necessary to complete the binary classification of 14 types of targets (military and civilian ships). On this basis, the military targets are subclassified. The experiment was carried out according to the method proposed in Example 1. The experimental results show that the proposed track recognition system has achieved an accuracy of 96.52% in the binary classification task, see Figure 4 As shown in Table 1, the accuracy of 85.29% was also achieved in the sub-classification task. Figure 5 and Table 2. With the support of the multi-process reasoning strategy, i.e., the control module, which is configured to receive the data input by the data input module and coordinate the working processes of the remaining modules, the system can complete the identification of the new track within 50 milliseconds, which can meet the real-time requirements.
[0143] like Figure 4 The binary classification confusion matrix shown, and the binary classification indicators are shown in Table 1;
[0144] Table 1 Binary classification indicators
[0145] .
[0146] like Figure 5 The sub-classification confusion matrix is shown in Figure 2, and the sub-classification indicators are shown in Table 2.
[0147] Table 2: Sub-categorized indicators
[0148] .
[0149] Result consistency test: Since the binary classification is more accurate, the penalty for consistency test is lower. , , the overall consistency penalty is 0.0057.
[0150] Embodiment 3. A marine track automatic identification system based on machine learning, such as Figure 3As shown, it includes a control module, which is configured to receive data input by the data input module and coordinate the working processes of other modules;
[0151] A data input module, which is configured to input raw track data;
[0152] A data processing module is configured to process the original track data, specifically data cleaning and preprocessing, feature engineering, and data enhancement, to obtain a diverse data set without ultrasound and outliers and suitable for the model;
[0153] The classification model is configured to process the track data in the data set obtained by the data processing module to complete the classification of the track;
[0154] The data output module is configured to update the weight of the track data classified by the tree model and output the category with the highest probability of use.
[0155] Furthermore, the classification model includes three types of models: binary classification, military ship subclassification, and civilian ship subclassification, and each type of model adopts a tree model.
[0156] Embodiment 4. A computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, characterized in that: when the computer program is executed by a processor, at least one step of the method for automatic identification of marine tracks based on machine learning is executed, and the same technical effect can be achieved, which will not be described here to avoid repetition.
[0157] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the defined scope.
Claims
1. A method for automatic identification of marine tracks based on machine learning, characterized in that: The following steps are involved: Step 1: Data input: obtain original track data; Step 2, data processing: Process the original track data in step 1 to construct a multidimensional data set containing time series and spatial information; Step 3, model training: set up three types of models: binary classification, military ship subclassification, and civilian ship subclassification. Each type of model uses a tree model, and the hyperparameters of the tree model are optimized. After optimization, the model is trained and verified to obtain a model with the highest score; Step 4: Track classification and evaluation: Use the model with the highest score in step 3 to classify the data obtained in step 2 and evaluate the classification results, which specifically includes the following steps: Step 4.1, track classification: divide each track in step 2 into several segments of 50 points each, and send one segment and the corresponding track number in sequence each time; Inside the track identification system, the track is stored in the data pool according to the serial number, so that the track becomes longer as the data is received. Each time a track is received, the received data of the track with the corresponding serial number is input into the binary classification model for classification to obtain the binary classification result. According to the binary classification result, the data is then input into the military sub-classification model or the civilian sub-classification model for sub-classification; During classification, all model inference results are weighted according to the length of the input track to obtain the final result; Different weights are assigned to different models. The weight calculation formula for each model is as follows: , , in, is the current predicted track length, represents the track length used by the i-th model during training; Step 4.2, evaluate the classification results of step 4.1: use the evaluation indicators of binary classification and sub-classification accuracy, F1 score and category consistency to evaluate the classification results of step 4.1; The accuracy and F1 score of the binary classification and sub-classification are calculated using the calculation method of step 3.2.
1. The category consistency refers to the consistency between the binary classification result and the detailed classification result. When the binary classification result does not match the detailed classification result, the classification result is wrong and a penalty score is given. The details are as follows: the total number of penalized objects err is divided into two categories: binary classification error, sub-classification correct and binary classification correct, sub-classification error; If used and Indicates the binary classification results and sub-classification results of the sample; and Represents the binary classification label and the detailed classification label of the sample, and the two errors are counted as follows: , , If using and Represent the penalty parameters of the two types of situations respectively, and the penalty item score is: , the penalty parameter is set to ; The overall evaluation score is: ; Step 5, data output: Update the weights of the categories of track classification in step 4, and output the category with the highest probability as the result.
2. The method for automatic identification of marine tracks based on machine learning according to claim 1, characterized in that: The specific steps of obtaining the original track data in step 1 are as follows: at time t, the original track data ,in , , represents the partial track points of the ith track at time t, which is less than or equal to 50; in is a track point, that is , which are time, latitude, longitude, altitude, speed and heading respectively.
3. A method for automatic identification of marine tracks based on machine learning according to claim 1 or 2, characterized in that: The step 2 specifically includes the following steps: Step 2.1, data cleaning and preprocessing: the data cleaning and preprocessing include timestamp standardization and outlier detection and removal; Step 2.2, feature engineering: the feature engineering includes feature selection, feature enhancement and feature conversion; Step 2.3, data enhancement: The data enhancement specifically refers to generating new training samples by transforming the original data to increase the diversity of the data set.
4. The method for automatic identification of marine tracks based on machine learning according to claim 3, characterized in that: The timestamp standardization in step 2.1 is as follows: First, all timestamps are converted into a unified format. For invalid timestamps, cubic spline interpolation is used to estimate the difference between the previous and next valid timestamps. The outlier detection and elimination are specifically as follows: outliers are detected by box plot analysis, standard score analysis or interquartile range (IQR). For the detected outliers, slight outliers whose absolute values of standard scores are between 1.5 and 3 or whose points in the box plot analysis are between Q1-1.5×IQR and Q1-3×IQR or Q3+1.5×IQR and Q3+3×IQR are smoothed by moving average method. Severe outliers whose absolute values of standard scores are greater than 3 or whose points in the box plot analysis are less than Q1-3×IQR or greater than Q3+3×IQR are eliminated. The feature selection in step 2.2 is as follows: perform exploratory data analysis on the original features, calculate the conditional entropy of the features, determine the four features with the strongest correlation with the target category, and do not use other features in the training stage; The feature enhancement in step 2.2 is as follows: the data set is enhanced by calculating new features, and the new features include: track curvature: estimating the curvature of the track by calculating the change in the angle between track points; speed change rate: calculating the rate of change of speed over time to capture the acceleration or deceleration behavior of the ship; Altitude change rate: For track data containing altitude information, calculate the rate of change of altitude over time; The feature conversion is specifically as follows: using the percentile of each feature to replace the original track data can ensure that each track point contains the track information of the entire track.
5. The method for automatic identification of marine tracks based on machine learning according to claim 3, characterized in that: The step 2.3 specifically adopts the time series difference method and the characteristic perturbation method, wherein the time series difference method is specifically as follows: in the time series data, new track points are generated by linear interpolation or spline interpolation method to simulate the behavior of the ship at different speeds; The feature perturbation method is specifically as follows: randomly perturb the selected features.
6. The method for automatic identification of marine tracks based on machine learning according to claim 3, characterized in that: The step 3 comprises the following specific steps: Step 3.
1. Initialize the tree model: Select LightGBM or XGBoost model as the machine learning algorithm and set the basic parameters respectively; Step 3.2: Hyperparameter optimization: Optuna is used to optimize hyperparameters, which includes the following steps: Step 3.2.
1. Determine the evaluation indicators of hyperparameters: Design a set of hyperparameters and use the accuracy and F1 score of binary classification and sub-classification as the evaluation indicators of this set of hyperparameters; The accuracy of the two-class classification and sub-classification is as follows: The recognition accuracy of the kth category is expressed as: , Therefore, if there are a total of K types of samples, the recognition accuracy of all categories is calculated as: , Where N represents the total number of samples, n k Represents the total number of samples in the kth category; Precision precision indicates the proportion of positive samples judged as positive in the classifier: , The recall rate recall represents the proportion of positive examples predicted to be positive examples to the total positive examples: , The F1 score can be viewed as the harmonic mean of precision and recall, where the F1 score for the kth category is calculated as: , The average F1 f-score of the K categories is calculated as: ; Step 3.2.
2. Set the hyperparameter search space for Optuna and search: Select TPE searcher. TPE searcher guides the search process by building a probabilistic model to predict the performance of hyperparameter combinations. When Optuna completes the hyperparameter search, it returns the best hyperparameter combination. Step 3.3, model training and verification: After determining the hyperparameters, use the training set data to train the model, and use the validation set data to monitor the generalization ability of the model; During the training process, a learning rate decay strategy is used to gradually reduce the learning rate as the training progresses, and an early stopping strategy is adopted, that is, training is stopped when the performance on the validation set no longer improves; Use ten-fold cross validation to train ten models and select the model with the highest score on the validation set; Each type of model is trained for tracks with lengths of 50, 200, 500, 1000, and 2000 respectively.
7. The method for automatic identification of marine tracks based on machine learning according to claim 3, characterized in that: The step 5 is specifically as follows: for the classification result of step 4, the prediction result of the sub-classification is 14 probability values, and the prediction result of the binary classification is 2 probability values; The results of the last sub-classification and binary classification are saved according to the track ID, and then the probability prediction value of the corresponding track ID is updated as follows: in the binary classification, the weight of the historical results accounts for 0.1, and the weight of the current results accounts for 0.9; in the sub-classification, the weight of the historical results accounts for 0.4, and the weight of the current results accounts for 0.
6. Finally, the category with the largest probability is used as the result for output.
8. A system for automatic identification of marine tracks based on machine learning, used to implement a method for automatic identification of marine tracks based on machine learning as claimed in any one of claims 1 to 7, characterized in that: It includes a control module, which is configured to receive data input by the data input module and coordinate the working processes of other modules; A data input module, which is configured to input raw track data; A data processing module is configured to process the original track data, specifically data cleaning and preprocessing, feature engineering, and data enhancement, to obtain a diverse data set without ultrasound and outliers and suitable for the model; A classification model, which is configured to process the track data in the data set obtained by the data processing module to complete the classification of the track; The classification model includes three types of models: binary classification, military ship subclassification, and civilian ship subclassification, and each type of model adopts a tree model; The data output module is configured to update the weight of the track data classified by the tree model and output the category with the highest probability of use.
9. A computer-readable storage medium having a computer program stored therein, characterized in that: When the computer program is executed by a processor, at least one step of the method for automatic identification of marine tracks based on machine learning described in any one of claims 1 to 7 is performed.
