Unmanned ship navigation state multi-classification detection method based on dynamic coupling graph structure
By adopting a multi-classification detection method with dynamic coupled graph structure and SMOTE technology in the navigation status monitoring of unmanned boats, the problems of complex data processing and poor abnormal detection in traditional methods are solved, and more efficient and accurate navigation status abnormal detection is achieved.
Patent Information
- Application Number
- CN202510071121.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-13
AI Technical Summary
Traditional unmanned boat navigation status monitoring methods have problems such as complex data processing, poor real-time performance and poor abnormal detection results, especially in navigation status abnormalities caused by equipment failures, extreme weather and abnormal speeds.
A multi-classification detection method based on dynamic coupled graph structure is adopted, sample balance is performed through SMOTE oversampling technology, coupled attention mechanism and gated units are introduced into the DyGCN dynamic graph convolution network, and the window size is dynamically adjusted to capture the dependencies in the timing data.
The model's ability to detect abnormalities is improved, the processing ability of time sequence data is enhanced, and the dependencies between different time steps can be accurately captured in real-time monitoring, which improves the accuracy and real-timeness of navigation state abnormalities detection.
Smart Images

Figure CN119992474A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of unmanned boat navigation anomaly detection, and in particular relates to an unmanned boat navigation state multi-classification detection method based on a dynamic coupling graph structure. Background Art
[0002] When an unmanned boat is performing a mission, its three-axis attitude angle may be abnormal due to its own faults, abnormal speed and weather factors (such as abnormal waves and wind speed). For unmanned boats, timely and accurate diagnosis of the type of abnormal navigation status is crucial, which can effectively improve the operational safety and mission execution efficiency of unmanned boats. However, traditional navigation status monitoring methods often rely on manual monitoring and simple threshold judgment, which have problems of delayed response and insufficient accuracy.
[0003] In recent years, with the rapid development of intelligent technology, data-driven methods have gradually become a research hotspot for unmanned boat navigation status monitoring. By introducing machine learning and deep learning technologies, potential abnormal patterns can be mined in large-scale data, thereby realizing intelligent status monitoring and anomaly detection.
[0004] At present, although some scholars have studied the detection methods of abnormal navigation status of unmanned boats, most methods are still limited to static models and fail to fully consider the dynamic characteristics of the navigation status.
[0005] In addition, in the abnormal evaluation of the navigation status of unmanned boats, it is difficult to collect abnormal state data when collecting data through sensors, and the abnormal data of unmanned boats is scarce, which leads to the imbalance of positive and negative samples, resulting in the reduction of the accuracy of the existing anomaly detection algorithm and the inability to respond to abnormal changes in the navigation status in a timely manner. The navigation status may cause abnormalities in the three-axis attitude angle of the unmanned boat due to equipment failure, abnormal weather, and abnormal speed during the navigation process, and may capsize. Therefore, it is necessary to determine the cause of the abnormal navigation status during the navigation process and take corresponding abnormal measures in time. The existing methods fail to fully analyze the navigation abnormality problems caused by equipment failure, extreme weather anomalies, and speed anomalies in the navigation status. These abnormal conditions have an important impact on the navigation status and need to be considered and solved in the design and implementation of the navigation status abnormality classification detection algorithm. Summary of the invention
[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a multi-classification detection method for the navigation status of an unmanned boat based on a dynamic coupling graph structure, which solves the problems of complex data processing, poor real-time performance and poor anomaly detection effect of traditional methods.
[0007] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a multi-classification detection method for the navigation state of an unmanned boat based on a dynamic coupling graph structure, comprising:
[0008] Obtain the unmanned boat navigation data, perform sample balance on the unmanned boat navigation data based on the SMOTE oversampling technology, and obtain the unmanned boat navigation training data set;
[0009] Performing time series processing on the unmanned boat navigation training data set to obtain an unmanned boat navigation time series data set;
[0010] The coupled attention mechanism and gating unit are introduced into the DyGCN dynamic graph convolutional network to obtain a dynamic coupled graph structure model for diagnosing and classifying unmanned boat anomalies.
[0011] According to the unmanned boat navigation time series data set, a dynamic coupling graph structure model is trained to obtain a trained dynamic coupling graph structure model;
[0012] The real-time navigation data of the unmanned boat is collected, and the abnormal results of the three-axis attitude angle of the unmanned boat are obtained by using the trained dynamic coupling graph structure model.
[0013] Furthermore, the unmanned boat navigation data is obtained, and the unmanned boat navigation data is sample balanced based on the SMOTE oversampling technology to obtain the unmanned boat navigation training data set, which is specifically:
[0014] The unmanned boat navigation data is divided into a minority sample set and a majority sample set; the minority sample set is abnormal data; the majority sample set is normal data;
[0015] Divide the minority class sample set into several abnormal type data sets based on the abnormal type;
[0016] Randomly select a sample in each abnormal type data set as the root sample;
[0017] Calculate the distance between each root sample and the samples other than the root sample in the abnormal type data set corresponding to the root sample:
[0018]
[0019] Where d is the distance between the root sample and each sample in the corresponding anomaly type data set; x0 is the root sample; y i is the i-th sample in the abnormal type data set corresponding to the root sample, excluding the root sample; i is the sample number; m is the total number of samples in the abnormal type data set corresponding to the root sample, excluding the root sample;
[0020] According to the distance d, the imbalance degree of the corresponding abnormal type data set is calculated, and the upsampling ratio is selected according to the imbalance degree:
[0021] n=g(I L )
[0022]
[0023] Where n is the upsampling factor; g(·) is the rounding function; I L is the degree of imbalance;
[0024] Extract k nearest neighbor samples of the root sample in each anomaly type data set respectively;
[0025] Based on the up-sampling ratio, n samples are extracted from the k nearest neighbor samples of the root sample as auxiliary samples;
[0026] According to each auxiliary sample, n synthetic samples are obtained:
[0027] p j =x0+r(y j -x0),j=1,2,…,n
[0028] Among them, p j is the synthetic sample generated corresponding to the jth auxiliary sample; r is a random number in the range of (0,1); y j is the jth auxiliary sample;
[0029] Add each synthetic sample to the corresponding abnormal type data set, and integrate each abnormal type data set to obtain a balanced minority class sample set;
[0030] The balanced minority class sample set and majority class sample set are integrated to obtain the unmanned boat navigation training data set.
[0031] Furthermore, the unmanned boat navigation training data set is subjected to time series processing to obtain the unmanned boat navigation time series data set, specifically:
[0032] Initialize the window size and preset the variance threshold;
[0033] Calculate the variance of the unmanned boat navigation training data in the current window:
[0034]
[0035] Among them, σ 2 (i1) is the variance of the unmanned boat navigation training data in the current window; is the average value in the i1th window; is the size of the i1th window; j1 is the index of the data point in the window; w is the total number of data points in the window; is the j1th data point in the i1th window;
[0036] According to the variance of the unmanned boat navigation training data in the current window, the size of the current window is dynamically adjusted:
[0037]
[0038] in, The current window size after dynamic adjustment; is the variance threshold; Δw is the step size of window adjustment;
[0039] Limit the boundary of the dynamically adjusted current window size to obtain the final size of the current window
[0040]
[0041] Among them, w min is the lower limit of the window size; w max The upper limit of the window size;
[0042] According to the final size of the current window The data of the unmanned boat navigation training data set is divided until the unmanned boat navigation training data set is divided, and the unmanned boat navigation time series data set is obtained.
[0043] Furthermore, the coupled attention mechanism includes a self-attention mechanism and an interactive attention mechanism;
[0044] The self-attention mechanism is used to obtain the node self-attention weight according to the node feature vector learned by the DyGCN dynamic graph convolutional network, and to capture the time change of the node's own characteristics in the DyGCN dynamic graph convolutional network according to the node self-attention weight, and obtain the self-attention output H s ;
[0045] The interactive attention mechanism is used to obtain the interactive attention weights between nodes based on the node feature vectors learned by the DyGCN dynamic graph convolutional network, capture the time changes of the features between nodes in the DyGCN dynamic graph convolutional network, and obtain the interactive attention output H i ;
[0046] The gating unit is used to dynamically fuse the output of the self-attention mechanism and the output of the interactive attention mechanism to obtain a final fused feature matrix.
[0047] Furthermore, the expression of the self-attention weight of the node is:
[0048]
[0049] Among them, α rr is the self-attention weight of node r; N(r) is the neighbor set of node r; f(h r ,h r ) is used to measure the eigenvector of node r against its own eigenvector h rThe function of the similarity between r is the feature vector of node r learned through the DyGCN dynamic graph convolutional network; h z is the feature vector of node z obtained by learning the DyGCN dynamic graph convolutional network; f(h r ,h z ) is used to measure h r and h z A function of the similarity between two feature vectors.
[0050] Furthermore, the expression of the interaction attention weight between the nodes is:
[0051]
[0052] Among them, α rz is the interaction attention weight of node r to neighbor node z; f(h r ,h k ) is used to measure h r and h k A function of the similarity between two feature vectors; h k is the feature vector of node k learned by DyGCN dynamic graph convolutional network; f(h r ,h z ) is used to measure h r and h z The function of the similarity between two feature vectors; f(h z ,h l ) is used to measure h z and h l A function of the similarity between two feature vectors; h l is the feature vector of node l learned by DyGCN dynamic graph convolutional network; N(r) is the neighbor set of node r; N(z) is the neighbor set of node z.
[0053] Furthermore, the method for dynamically fusing the self-attention mechanism output and the interactive attention mechanism output to obtain the final fused feature matrix is specifically:
[0054] The self-attention output H s and the interactive attention output H i Connect to form the fusion input H c :
[0055] H c =[H s ,H i ]
[0056]
[0057] Based on the fused input, a fully connected layer is used to calculate the gate value g:
[0058] g=σ(W g H c +b g )
[0059] Where σ is the Sigmoid activation function; W g and b g All are learnable parameters;
[0060] Use the gate value g to dynamically fuse the outputs of self-attention and interactive attention:
[0061] H f =g☉H s +(1-g)⊙H i
[0062] Among them, H f is the final fused feature matrix; ⊙ is the element-level product.
[0063] The beneficial effects of the present invention are as follows: the present invention successfully overcomes the shortcomings of traditional data analysis methods and solves the problems of complex data processing, poor real-time performance, and poor anomaly detection effect. In view of the problem of sparse anomaly categories, the SMOTE method is used to expand the data of anomaly categories. By generating new synthetic samples, it is ensured that the model can capture sufficient abnormal data features, thereby improving the model's ability to detect anomalies and optimizing the training data set. By embedding time information, dynamically adjusting the window size, and introducing a coupled attention mechanism (gated unit) to adaptively adjust the weight of information transmission, the performance of the model in time series data is effectively improved, ensuring that the model can capture the dependencies between different time steps. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0065] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0066] Example 1
[0067] like Figure 1 As shown, in one embodiment of the present invention, a multi-classification detection method for the navigation state of an unmanned boat based on a dynamic coupling graph structure includes:
[0068] Obtain the unmanned boat navigation data, perform sample balance on the unmanned boat navigation data based on the SMOTE oversampling technology, and obtain the unmanned boat navigation training data set;
[0069] Performing time series processing on the unmanned boat navigation training data set to obtain an unmanned boat navigation time series data set;
[0070] The coupled attention mechanism and gating unit are introduced into the DyGCN dynamic graph convolutional network to obtain a dynamic coupled graph structure model for diagnosing and classifying unmanned boat anomalies.
[0071] According to the unmanned boat navigation time series data set, a dynamic coupling graph structure model is trained to obtain a trained dynamic coupling graph structure model;
[0072] The real-time navigation data of the unmanned boat is collected, and the abnormal results of the three-axis attitude angle of the unmanned boat are obtained by using the trained dynamic coupling graph structure model.
[0073] In this embodiment, the present invention firstly inserts new abnormal sample instances into the feature space through the SMOTE method to improve data balance;
[0074] Secondly, we use the DyGCN dynamic graph convolutional network to redefine the graph structure according to the changes in time series data, embed time information into the graph structure, and ensure that the message transmission between different time segments can accurately reflect the time dependency.
[0075] Furthermore, the window size is dynamically adjusted according to the window variance to capture the dependencies between similar time steps;
[0076] Finally, a coupled attention mechanism is proposed. By designing a gating unit to dynamically weigh the weights of different attentions and adaptively adjust the weight of information transmission, the DyGCN dynamic graph convolutional network can better capture the relationship between the previous and next sequences according to the importance of different nodes and edges in the time series.
[0077] In this embodiment, DyGCN dynamic graph convolutional network refers to DyGCN: Dynamic graph embedding using graph convolutional networks: An effective dynamic graph embedding method, namely dynamic graph convolutional network (DyGCN), is proposed, which is an extension of the GCN-based method. It is natural to generalize the embedding propagation scheme of GCN to a dynamic setting in an effective way, which is to propagate changes along the graph to update node embeddings. The most affected nodes are updated first, and then their changes are propagated to other nodes, causing them to be updated.
[0078] The unmanned boat navigation data is obtained, and the unmanned boat navigation data is sample balanced based on the SMOTE oversampling technology to obtain the unmanned boat navigation training data set, which is specifically:
[0079] The unmanned boat navigation data is divided into a minority sample set and a majority sample set; the minority sample set is abnormal data; the majority sample set is normal data;
[0080] Divide the minority class sample set into several abnormal type data sets based on the abnormal type;
[0081] Randomly select a sample in each abnormal type data set as the root sample;
[0082] Calculate the distance between each root sample and the samples other than the root sample in the abnormal type data set corresponding to the root sample:
[0083]
[0084] Where d is the distance between the root sample and each sample in the corresponding anomaly type data set; x0 is the root sample; y i is the i-th sample in the abnormal type data set corresponding to the root sample, excluding the root sample; i is the sample number; m is the total number of samples in the abnormal type data set corresponding to the root sample, excluding the root sample;
[0085] According to the distance d, the imbalance degree of the corresponding abnormal type data set is calculated, and the upsampling ratio is selected according to the imbalance degree:
[0086] n=g(I L )
[0087]
[0088] Where n is the upsampling factor; g(·) is the rounding function; I L is the degree of imbalance;
[0089] Extract k nearest neighbor samples of the root sample in each anomaly type data set respectively;
[0090] Based on the up-sampling ratio, n samples are extracted from the k nearest neighbor samples of the root sample as auxiliary samples;
[0091] According to each auxiliary sample, n synthetic samples are obtained:
[0092] p j =x0+r(y j -x0),j=1,2,…,n
[0093] Among them, p j is the synthetic sample generated corresponding to the jth auxiliary sample; r is a random number in the range of (0,1); y j is the jth auxiliary sample;
[0094] Add each synthetic sample to the corresponding abnormal type data set, and integrate each abnormal type data set to obtain a balanced minority class sample set;
[0095] The balanced minority class sample set and majority class sample set are integrated to obtain the unmanned boat navigation training data set.
[0096] In this embodiment, an unbalanced data set refers to a data set with extremely unbalanced numbers of samples of various types. Unmanned ships usually have fewer navigation anomalies during navigation, and the frequency of occurrence of various types of faults varies greatly, resulting in a small amount of data detected by the monitoring equipment, and a large difference in the amount of data corresponding to different types of faults. In this experiment, the navigation data obtained by simulating anomalies by unmanned surface vessels in the Qiandao Lake waters was used to create the USVAD-DATA data set. In the original USVAD-DATA data set, all abnormal samples accounted for 7.8%, which is much lower than the number of samples under normal conditions. Therefore, the USVAD-DATA data set meets the conditions of an unbalanced data set and belongs to an unbalanced data set. Most existing USV anomaly detection models require balanced input data, so it is necessary to expand several types of samples in the USVAD-DATA data set to balance the number of various types of abnormal samples.
[0097] In this embodiment, the root sample x0 of the minority class abnormal type of the heading abnormal data and the randomly selected auxiliary sample y j Random interpolation is performed between them. n corresponding minority class navigation anomaly samples p are synthesized respectively j , in order to expand the minority samples of navigation anomaly types, and all the expansions are multi-dimensional, that is, the three characteristic navigation data of each minority anomaly type are expanded to achieve the purpose of data balance. The sampling of the SMOTE algorithm is to perform random interpolation operations on the line connecting the minority data sample points and their nearest data samples. This method can be regarded as straight line interpolation, which is a purposeful data construction according to certain mathematical rules, which can effectively avoid blindness and limitations, and thus improve the overfitting problem caused by random oversampling.
[0098] The unmanned boat navigation training data set is subjected to time series processing to obtain an unmanned boat navigation time series data set, which is specifically:
[0099] Initialize the window size and preset the variance threshold;
[0100] Calculate the variance of the unmanned boat navigation training data in the current window:
[0101]
[0102] Among them, σ 2 (i1) is the variance of the unmanned boat navigation training data in the current window; is the average value in the i1th window; is the size of the i1th window; j1 is the index of the data point in the window; w is the total number of data points in the window; is the j1th data point in the i1th window;
[0103] According to the variance of the unmanned boat navigation training data in the current window, the size of the current window is dynamically adjusted:
[0104]
[0105] in, The current window size after dynamic adjustment; is the variance threshold; Δw is the step size of window adjustment;
[0106] Limit the boundary of the dynamically adjusted current window size to obtain the final size of the current window
[0107]
[0108] Among them, w min is the lower limit of the window size; w max The upper limit of the window size;
[0109] According to the final size of the current window The data of the unmanned boat navigation training data set is divided until the unmanned boat navigation training data set is divided, and the unmanned boat navigation time series data set is obtained.
[0110] In this embodiment, the fixed window strategy may not be able to adapt to the changes in different time periods in the time series data. For example, in some periods, the data changes faster, while in other periods, the data changes slower, and the fixed window cannot adapt to both situations at the same time. Therefore, a dynamic time window strategy is proposed, which uses an initial fixed window size on the time series data to calculate the variance of the data in the window. As the time series data changes, the variance of each window is calculated rollingly. A variance threshold is set. If the variance in the window exceeds this threshold, it is considered that the data in the current window fluctuates greatly and the window size needs to be reduced. If the variance in the window is lower than this threshold, it is considered that the data in the current window fluctuates less and the window size can be increased. In this way, the window size is dynamically adjusted to increase or decrease the window to adapt to the fluctuation of the current data. The minimum and maximum values of the window size are set to prevent the window from becoming too small or too large. A smaller sliding step size is used in areas with faster changes, and a larger sliding step size is used in areas with slower changes. The model is made to dynamically adjust the sliding step size during feature extraction, which improves the calculation efficiency and model accuracy and can dynamically adapt to data changes.
[0111] The coupled attention mechanism includes a self-attention mechanism and an interactive attention mechanism;
[0112] The self-attention mechanism is used to obtain the node self-attention weight according to the node feature vector learned by the DyGCN dynamic graph convolutional network, and to capture the time change of the node's own characteristics in the DyGCN dynamic graph convolutional network according to the node self-attention weight, and obtain the self-attention output H s ;
[0113] The interactive attention mechanism is used to obtain the interactive attention weights between nodes based on the node feature vectors learned by the DyGCN dynamic graph convolutional network, capture the time changes of the features between nodes in the DyGCN dynamic graph convolutional network, and obtain the interactive attention output H i ;
[0114] The gating unit is used to dynamically fuse the output of the self-attention mechanism and the output of the interactive attention mechanism to obtain a final fused feature matrix.
[0115] The expression of the self-attention weight of the node is:
[0116]
[0117] Among them, α rr is the self-attention weight of node r; N(r) is the neighbor set of node r; f(h r ,h r ) is used to measure the eigenvector of node r against its own eigenvector h r The function of the similarity between r is the feature vector of node r learned through the DyGCN dynamic graph convolutional network; h z is the feature vector of node z obtained by learning the DyGCN dynamic graph convolutional network; f(h r ,h z ) is used to measure h r and h z A function of the similarity between two feature vectors.
[0118] The expression of the interaction attention weight between the nodes is:
[0119]
[0120] Among them, α rz is the interaction attention weight of node r to neighbor node z; f(h r ,h k ) is used to measure h r and h k A function of the similarity between two feature vectors; h k is the feature vector of node k learned by DyGCN dynamic graph convolutional network; f(hr ,h z ) is used to measure h r and h z The function of the similarity between two feature vectors; f(h z ,h l ) is used to measure h z and h l A function of the similarity between two feature vectors; h l is the feature vector of node l learned by DyGCN dynamic graph convolutional network; N(r) is the neighbor set of node r; N(z) is the neighbor set of node z.
[0121] The method is used to dynamically fuse the output of the self-attention mechanism and the output of the interactive attention mechanism to obtain the final fused feature matrix, specifically:
[0122] The self-attention output H s and the interactive attention output H i Connect to form the fusion input H c :
[0123] H c =[H s ,H i ]
[0124]
[0125] Based on the fused input, a fully connected layer is used to calculate the gate value g:
[0126] g=σ(W g H c +b g )
[0127] Where σ is the Sigmoid activation function; W g and b g All are learnable parameters;
[0128] Use the gate value g to dynamically fuse the outputs of self-attention and interactive attention:
[0129] H f =g☉H s +(1-g)⊙H i
[0130] Among them, H f is the final fused feature matrix; ⊙ is the element-level product.
[0131] In this embodiment, in the dynamic graph convolutional network (DyGCN), the features of nodes and edges change dynamically over time. In order to fully capture the temporal dependency of nodes and the interaction between nodes, a coupled attention mechanism is proposed. This mechanism combines self-attention and interactive attention, and dynamically controls the contribution of the two attention outputs through a gating mechanism to better capture the complex dynamic features of dynamic graphs. The detailed implementation and mathematical representation of this mechanism are given below.
[0132] The self-attention mechanism focuses on the temporal changes of the node's own features and captures the temporal dynamics of the node by building dependencies between nodes at different time steps.
[0133] In order to dynamically fuse the outputs of self-attention and interactive attention, a gating mechanism is designed. The gating mechanism adaptively adjusts the weights of the two attention mechanisms according to the characteristics of the input data. Through this dynamic fusion mechanism, the advantages of self-attention and interactive attention can be adaptively combined to better capture the complex dynamic characteristics of dynamic maps.
[0134] Example 2
[0135] A multi-classification detection method for unmanned boat navigation status based on a dynamic coupling graph structure comprises the following steps:
[0136] S1. Obtaining navigation data of unmanned boats in extreme weather conditions;
[0137] S2, using the SMOTE method to expand the data of unmanned boat navigation in extreme weather conditions for the sparse data of abnormal categories;
[0138] S3, using the processed unmanned boat navigation data under extreme weather conditions to train the dynamic coupling graph structure model;
[0139] S4. Obtain the final classification category and overall accuracy for the navigation data of the test set.
[0140] The specific steps are as follows:
[0141] S1. Obtaining unmanned boat navigation data in extreme weather conditions:
[0142] S11. Select test areas under specific extreme weather conditions (such as storms, strong winds, big waves, etc.) and set the data collection time range to ensure that the data covers different meteorological conditions;
[0143] S12. Use the sensors of the unmanned boat (GPS, inertial measurement unit, wind speed sensor, depth sensor, etc.) to monitor the navigation status of the unmanned boat in real time and record data, and collect information such as navigation speed, heading, attitude angle, depth, etc.;
[0144] S13, perform time series processing on the collected navigation data to ensure that the data matches the timestamp, and filter out valid data according to the actual situation, and remove noise and abnormal data;
[0145] S14. Standardize the collected data and save it as a csv file for subsequent analysis and modeling.
[0146] S2. The acquired unmanned boat navigation data under extreme weather conditions is used to expand the data with sparse abnormal categories through the smote method:
[0147] S21. First, the acquired unmanned boat navigation data is classified to distinguish normal data from abnormal data, ensuring that the sparse problem of the abnormal category is correctly identified;
[0148] S22. Perform statistical analysis on the navigation data of abnormal categories to determine the degree of data sparsity and the proportion of abnormal categories in the sample, and evaluate the necessity of SMOTE expansion;
[0149] S23, using the SMOTE method to synthesize the navigation data of the abnormal category, and generate new data samples by interpolation to ensure that the newly generated data can effectively capture the characteristics of the abnormal category;
[0150] S24. Check whether the new data generated by SMOTE conforms to the distribution characteristics of the original data, and ensure that the new data is highly consistent with the original data to avoid overfitting;
[0151] S25, merging the original data and the data expanded by the SMOTE method to form a new training data set to prepare for subsequent modeling and training;
[0152] S26. Save the expanded data set to ensure that the data format meets the needs of subsequent analysis, and perform standardization to facilitate model training.
[0153] S3. Use the processed extreme weather unmanned boat navigation data to train the dynamic coupling graph structure model:
[0154] S31. First, based on the processed time series data, the graph structure is redefined through the DyGCN dynamic graph convolutional network. The data of each time step is regarded as a node in the graph, and the relationship between time steps is regarded as an edge. The information of nodes and edges is updated through the dynamic graph;
[0155] S32. Embed time information into the graph structure to ensure that the graph structure can capture time dependencies. In each time segment, the information transfer between nodes can reflect the correlation between different time steps;
[0156] S33, adopt a dynamic window adjustment mechanism based on window variance to dynamically adjust the window size according to the changes in time series data, ensuring that the dependencies between similar time steps can be captured and reducing information loss;
[0157] S34. Design and introduce a coupled attention mechanism. Based on the graph structure, introduce a gating unit to dynamically adjust the attention weights of different nodes and edges. Through adaptive trade-offs, enhance the information transmission of important nodes and edges, and obtain a dynamic coupled graph structure model.
[0158] S35. Train the dynamic coupling graph structure model, optimize it based on the processed data, and adjust the network parameters so that the model can fully learn the important patterns in the time series data, especially the difference between abnormal data and normal data;
[0159] S36. Evaluate the training effect and use appropriate evaluation indicators (such as accuracy, F1 value, AUC, etc.) to verify the effectiveness of the model to ensure that the dynamic coupling graph structure model can accurately capture the navigation behavior and anomaly detection capabilities of the unmanned boat in extreme weather conditions;
[0160] S37. The trained DyGCN dynamic graph convolutional network is used for actual testing to ensure its robustness and accuracy under different extreme weather conditions.
[0161] S4. Obtain the final classification category and total accuracy for the navigation data of the test set:
[0162] S41. First, apply the trained dynamic coupling graph structure model to the test set, use the test data to infer the model, and obtain the predicted category of each sample (such as normal or abnormal);
[0163] S42. According to the categories output by the model, the prediction results of each category in the test set are counted, and the precision, recall and F1 score of each category are calculated;
[0164] S43. Calculate the overall accuracy, that is, the correct classification ratio of the model on the test set;
[0165] S44. Further evaluate the classification effect of the model through the confusion matrix, and calculate the number of true positives, false positives, true negatives, and false negatives of the classification results;
[0166] S45. Evaluate the overall performance of the model based on accuracy, precision, recall, and F1 score to ensure that the model has balanced performance on different categories, especially the predictive ability for abnormal categories;
[0167] S46. Record and save the test results, including various evaluation indicators (such as accuracy, precision, recall, F1 value, etc.), for subsequent analysis and comparison of model performance;
[0168] S47. Depending on the test set results, further tuning may be required, such as improving the performance of the model by adjusting model parameters or introducing other techniques (such as data augmentation, regularization, etc.).
[0169] Therefore, the present invention successfully overcomes the shortcomings of traditional data analysis methods and solves the problems of complex data processing, poor real-time performance and poor anomaly detection effect. The unmanned boat sensor collects navigation data under extreme weather conditions and records navigation status, attitude angle, speed, depth and other information. The process uses time series data to collect data and formats the data into a standard format suitable for subsequent analysis, providing high-quality input data for model training. In view of the problem of sparse abnormal categories, the SMOTE method is used to expand the data of abnormal categories. By generating new synthetic samples, it is ensured that the model can capture enough abnormal data features, thereby improving the model's ability to detect anomalies and optimizing the training data set. Using the processed navigation data, modeling is performed through the DyGCN dynamic graph convolutional network with dynamic time step changes. By embedding time information, dynamically adjusting the window size, and introducing a coupled attention mechanism (gated unit) to adaptively adjust the weight of information transmission, the performance of the model in time series data is effectively improved, ensuring that the model can capture the dependencies between different time steps, especially abnormal behaviors under extreme weather conditions. In the testing phase, the model is used to classify and predict the test set data, output the predicted category of each sample, and calculate the overall accuracy of the model and various evaluation indicators (such as precision, recall rate, F1 score, etc.). The classification effect of the model is evaluated by confusion matrix and other methods to ensure that its performance in different categories is balanced, especially the accurate detection of abnormal categories, so as to optimize the real-time and robustness of the model. The present invention effectively improves the data processing efficiency, accuracy and real-time performance in the analysis of unmanned boat navigation data under extreme weather conditions, and has high application value and technical innovation.
Claims
1. A multi-classification detection method for unmanned boat navigation status based on dynamic coupling graph structure, characterized in that: include: Obtain the unmanned boat navigation data, perform sample balance on the unmanned boat navigation data based on the SMOTE oversampling technology, and obtain the unmanned boat navigation training data set; Performing time series processing on the unmanned boat navigation training data set to obtain an unmanned boat navigation time series data set; The coupled attention mechanism and gating unit are introduced into the DyGCN dynamic graph convolutional network to obtain a dynamic coupled graph structure model for diagnosing and classifying unmanned boat anomalies. According to the unmanned boat navigation time series data set, a dynamic coupling graph structure model is trained to obtain a trained dynamic coupling graph structure model; The real-time navigation data of the unmanned boat is collected, and the abnormal results of the three-axis attitude angle of the unmanned boat are obtained by using the trained dynamic coupling graph structure model.
2. According to claim 1, the multi-classification detection method for unmanned boat navigation status based on dynamic coupling graph structure is characterized in that: The unmanned boat navigation data is obtained, and the unmanned boat navigation data is sample balanced based on the SMOTE oversampling technology to obtain the unmanned boat navigation training data set, which is specifically: The unmanned boat navigation data is divided into a minority sample set and a majority sample set; the minority sample set is abnormal data; the majority sample set is normal data; Divide the minority class sample set into several abnormal type data sets based on the abnormal type; Randomly select a sample in each abnormal type data set as the root sample; Calculate the distance between each root sample and the samples other than the root sample in the abnormal type data set corresponding to the root sample: Where d is the distance between the root sample and each sample in the corresponding anomaly type data set; x0 is the root sample; y i is the i-th sample in the abnormal type data set corresponding to the root sample, excluding the root sample; i is the sample number; m is the total number of samples in the abnormal type data set corresponding to the root sample, excluding the root sample; According to the distance d, the imbalance degree of the corresponding abnormal type data set is calculated, and the upsampling ratio is selected according to the imbalance degree: n=g(I L ) Where n is the upsampling factor; g(·) is the rounding function; I L is the degree of imbalance; Extract k nearest neighbor samples of the root sample in each anomaly type data set respectively; Based on the up-sampling ratio, n samples are extracted from the k nearest neighbor samples of the root sample as auxiliary samples; According to each auxiliary sample, n synthetic samples are obtained: p j =x0+r(y j -x0),j=1,2,…,n Among them, p j is the synthetic sample generated corresponding to the jth auxiliary sample; r is a random number in the range of (0,1); y j is the jth auxiliary sample; Add each synthetic sample to the corresponding abnormal type data set, and integrate each abnormal type data set to obtain a balanced minority class sample set; The balanced minority class sample set and majority class sample set are integrated to obtain the unmanned boat navigation training data set.
3. The multi-classification detection method for unmanned boat navigation status based on dynamic coupling graph structure according to claim 1 is characterized in that: The unmanned boat navigation training data set is subjected to time series processing to obtain an unmanned boat navigation time series data set, which is specifically: Initialize the window size and preset the variance threshold; Calculate the variance of the unmanned boat navigation training data in the current window: Among them, σ 2 (i1) is the variance of the unmanned boat navigation training data in the current window; is the average value in the i1th window; is the size of the i1th window; j1 is the index of the data point in the window; w is the total number of data points in the window; is the j1th data point in the i1th window; According to the variance of the unmanned boat navigation training data in the current window, the size of the current window is dynamically adjusted: in, The current window size after dynamic adjustment; is the variance threshold; Δw is the step size of window adjustment; Limit the boundary of the dynamically adjusted current window size to obtain the final size of the current window Among them, w min is the lower limit of the window size; w max The upper limit of the window size; According to the final size of the current window The data of the unmanned boat navigation training data set is divided until the unmanned boat navigation training data set is divided, and the unmanned boat navigation time series data set is obtained.
4. The multi-classification detection method for unmanned boat navigation status based on dynamic coupling graph structure according to claim 1 is characterized in that: The coupled attention mechanism includes a self-attention mechanism and an interactive attention mechanism; The self-attention mechanism is used to obtain the node self-attention weight according to the node feature vector learned by the DyGCN dynamic graph convolutional network, and to capture the time change of the node's own characteristics in the DyGCN dynamic graph convolutional network according to the node self-attention weight, and obtain the self-attention output H s ; The interactive attention mechanism is used to obtain the interactive attention weights between nodes based on the node feature vectors learned by the DyGCN dynamic graph convolutional network, capture the time changes of the features between nodes in the DyGCN dynamic graph convolutional network, and obtain the interactive attention output H i ; The gating unit is used to dynamically fuse the output of the self-attention mechanism and the output of the interactive attention mechanism to obtain a final fused feature matrix.
5. The multi-classification detection method for unmanned boat navigation status based on dynamic coupling graph structure according to claim 4 is characterized in that: The expression of the self-attention weight of the node is: Among them, α rr is the self-attention weight of node r; N(r) is the neighbor set of node r; f(h r ,h r ) is used to measure the eigenvector of node r against its own eigenvector h r The function of the similarity between r is the feature vector of node r learned through the DyGCN dynamic graph convolutional network; h z is the feature vector of node z obtained by learning the DyGCN dynamic graph convolutional network; f(h r ,h z ) is used to measure h r and h z A function of the similarity between two feature vectors.
6. The multi-classification detection method for unmanned boat navigation status based on dynamic coupling graph structure according to claim 5 is characterized in that: The expression of the interaction attention weight between the nodes is: Among them, α rz is the interaction attention weight of node r to neighbor node z; f(h r ,h k ) is used to measure h r and h k A function of the similarity between two feature vectors; h k is the feature vector of node k learned by DyGCN dynamic graph convolutional network; f(h r ,h z ) is used to measure h r and h z The function of the similarity between two feature vectors; f(h z ,h l ) is used to measure h z and h l A function of the similarity between two feature vectors; h l is the feature vector of node l learned by DyGCN dynamic graph convolutional network; N(r) is the neighbor set of node r; N(z) is the neighbor set of node z.
7. The multi-classification detection method for unmanned boat navigation status based on dynamic coupling graph structure according to claim 6 is characterized in that: The method is used to dynamically fuse the output of the self-attention mechanism and the output of the interactive attention mechanism to obtain the final fused feature matrix, specifically: The self-attention output H s and the interactive attention output H i Connect to form the fusion input H c : H c =[H s ,H i ] Based on the fused input, the gate value g is calculated using a fully connected layer: g=σ(W g H c +b g ) Among them, σ is the Sigmoid activation function; W g and b g All are learnable parameters; Use the gate value g to dynamically fuse the outputs of self-attention and interactive attention: H f =g☉H s +(1-g)☉H i Among them, H f is the final fused feature matrix; ⊙ is the element-level product.
Citation Information
Cited By
Unmanned aerial vehicle detection method based on bidirectional modern time convolutional network
CN120180243A