Open set shortwave communication protocol identification method, system, electronic device and computer-readable storage medium based on metric learning

Through a deep neural network based on metric learning, the problem of difficulty in identifying unknown protocols in short-wave communication protocol recognition is solved, and the open set identification of short-wave communication protocols is realized, which alleviates the risk of open space.

CN119766704APending Publication Date: 2025-04-04WUHAN SHIP COMM RES INST (NO 722 RES INST OF CHINA STATE SHIPBUILDING CORP)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411823341.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify unknown short-wave communication protocols, resulting in open space risks and unable to effectively identify the open set of short-wave communication protocols.

Method used

A deep neural network based on metric learning is adopted to realize open set recognition of shortwave communication protocols through data preprocessing, model training and protocol recognition steps. Specific steps include data preprocessing, building a metric learning network, training a model, statistical feature map mean, inputting protocol data to be classified, and obtaining protocol categories according to the feature matching method.

Benefits of technology

Through the training of the metric learning network, the output feature map has the ability to "measure" the protocol data characteristics, which can accurately identify the similarity between the protocol to be identified and the known categories, effectively alleviate the risk of open space, and realize the open set identification of shortwave communication protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766704A_ABST
    Figure CN119766704A_ABST
Patent Text Reader

Abstract

The present invention provides an open-set shortwave communication protocol identification method, system, electronic device and computer-readable storage medium based on metric learning. The open-set shortwave communication protocol identification method based on metric learning preprocesses the shortwave protocol data to obtain training data in a standard format, then builds a metric learning network and inputs the training data into the metric learning network for training, statistically calculates the mean of the feature graph output after each category of training data passes through the metric learning network, and finally inputs the protocol data to be classified, obtains the protocol category according to the feature matching method, and realizes the open-set identification of the communication protocol. After the training converges, the output feature graph has the ability to "measure" the features of the protocol data. In the application process, the protocol data to be identified is input to obtain the feature graph for feature graph matching, and the similarity between the protocol to be identified and the average feature graph of each known class is calculated to know which category the protocol to be identified is most "like" after "measurement".
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication and deep learning technology, and in particular relates to an open set shortwave communication protocol identification method, system, electronic device and computer-readable storage medium based on metric learning. Background Art

[0002] Shortwave communication protocol identification technology is extremely important in shortwave frequency band communication confrontation, and it is the premise of signal detection, screening, demodulation and decoding. Although the current research on protocol identification has achieved considerable success, the electromagnetic environment is becoming more and more complex, and new communication protocols are constantly emerging. The currently known classic protocol identification algorithms (such as synchronization header matching algorithms) can only recognize communication protocols with known synchronization information. The synchronization information of unknown communication protocols is often non-public in the field of communication confrontation; the protocol identification algorithms based on deep learning are also mostly closed set identification algorithms, that is, when a new communication protocol signal appears, the closed set identification method can only mistakenly identify it as one of the known communication protocols, and cannot accurately identify it as an unknown communication protocol. This risk of labeling an unknown category in space as a known category is called open space risk. In the field of shortwave communication reconnaissance and communication confrontation, the identification and cognition of unknown category shortwave communication protocols is very important.

[0003] Therefore, open set identification of communication protocols becomes a technical problem that needs to be solved urgently. Summary of the invention

[0004] The object of the present invention is to provide an open set shortwave communication protocol identification method, system, electronic device and computer-readable storage medium based on metric learning, which can solve the open set identification problem of communication protocols.

[0005] The first aspect of the present invention provides an open set shortwave communication protocol identification method based on metric learning, the method comprising:

[0006] Step S1, data preprocessing: obtaining shortwave protocol data for training, and preprocessing the shortwave protocol data to obtain training data in a standard format;

[0007] Step S2, model training: building a metric learning network and inputting training data into the metric learning network for training;

[0008] Step S3, protocol identification: first fix the parameters of the metric learning network, then count the mean of the feature graphs output after each category of training data passes through the metric learning network, and finally input the protocol data to be classified, and obtain the protocol category according to the feature matching method.

[0009] Optionally, in step S1, data preprocessing includes:

[0010] Data domain conversion: The input data is two-way data in I / Q domain, and the real data is converted into I / Q;

[0011] Data unitization: divide the data into n units, each unit is of length L, and the remaining data that is less than one unit is filled with 0 to the length L;

[0012] Energy normalization: Normalizes protocol data with different signal strengths to data with an energy of 1 to reduce the impact of signal energy strength on protocol types.

[0013] Optionally, in step S2, the metric learning network includes an encoder network for metric learning and a fully connected network for classification.

[0014] Optionally, in step S2, the training process of the metric learning network includes:

[0015] 1) Input the training data into the encoder network to obtain the training data feature map and calculate the metric learning loss value;

[0016] 2) Input the training data into the fully connected network to calculate the classification cross entropy loss;

[0017] 3) The objective loss function of the metric learning network consists of the metric learning loss and the classification cross entropy loss. Each round of training updates the metric learning network based on the feedback of the objective loss function.

[0018] Optionally, in step S2, the objective loss function is:

[0019] The training data read in a training unit is X, which contains N types of protocol data (x i , i=1,2,…,N), each category has M samples; the pairs of non-repeating positive sample data of the same type are {(x im ,x im‘ ),i=1,2,…,N}, different types of negative sample data pairs are {(x im ,x jm‘ ),i,j=1,2,…,N}, the metric learning network is denoted as A, the fully connected network is denoted as B, and the similarity calculation function is D;

[0020] Then the metric learning loss value is:

[0021]

[0022] The cross entropy loss is:

[0023]

[0024] where y i is the probability distribution of the true label, x iis the predicted probability output by the fully connected network;

[0025] Then the target loss function of the model update is: Loss = c × L SCE +(1-c)×L CE

[0026] Where c is an adjustable parameter ranging from 0 to 1.

[0027] Optionally, in step S3, the protocol identification application process includes:

[0028] 1) Calculation of feature maps of known classes: Input various types of training data into the encoder network, count the feature maps of each training data and calculate the average feature map of each class;

[0029] 2) Selection of decision threshold: Setting the unknown class decision threshold based on the feature map statistics of each class of training data;

[0030] 3) Calculation of unknown class feature map: Input the data to be classified and obtain the data feature map through the encoder network;

[0031] 4) Feature graph matching: Calculate the similarity between the class to be identified and the average feature graph of each known class; if the similarity is less than the decision threshold, it is judged as an unknown protocol category. Otherwise, the category with the largest similarity is recorded, and the feature graph is continued to pass through the fully connected network to obtain a closed set classification result; if the closed set classification result is the same category as the category with the largest similarity, it is judged as the protocol category, if different, it is judged as an unknown protocol category.

[0032] Optionally, inputting various types of training data into the encoder network, counting the feature map of each training data and calculating the average feature map of each category includes: assuming that the nth type of protocol data X in all training data n YesL n Samples, namely X n =(x i ,i=1,2,…,L n ); the feature map of the sample after the encoding network is A(X n ), then the average feature map of the nth type of protocol data is F n =∑A(X n ) / L n ;

[0033] Setting the unknown class decision threshold according to the feature map statistics of each class of training data includes: using the feature map inner product to calculate the similarity between the average feature maps of each class.

[0034] A second aspect of the present invention provides an open set shortwave communication protocol identification system based on metric learning, the system comprising:

[0035] The data preprocessing module is configured to obtain shortwave protocol data for training, and obtain training data in a standard format by preprocessing the shortwave protocol data;

[0036] The model training module is configured to build a metric learning network and input training data into the metric learning network for training;

[0037] The protocol identification module is configured to first fix the parameters of the metric learning network, then count the mean of the feature graphs output after the training data of each category passes through the metric learning network, and finally input the protocol data to be classified to obtain the protocol category according to the feature matching method.

[0038] The third aspect of the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of an open set shortwave communication protocol identification method based on metric learning according to any one of the first aspects of the present invention are implemented.

[0039] The fourth aspect of the present invention provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of an open set shortwave communication protocol identification method based on metric learning of any one of the first aspects of the present invention are implemented.

[0040] The beneficial effects brought by the present invention are as follows:

[0041] The present invention aims at the deficiencies of shortwave communication protocol identification technology in the field of open set identification technology, and studies a deep neural network based on a metric learning method. After the shortwave protocol data is subjected to data preprocessing to obtain training data in a standard format, a metric learning network is built and the training data is input into the metric learning network for training. The feature graph averages of each category of training data output after passing through the metric learning network are statistically analyzed, and finally the protocol data to be classified is input, and the protocol category is obtained according to the feature matching method, thereby realizing the open set identification of the communication protocol. After the training converges, the output feature graph has the ability to "measure" the features of the protocol data. In the application process, the protocol data to be identified is input to obtain a feature graph for feature graph matching. By calculating the similarity between the protocol to be identified and the average feature graph of each known class, it can be known which category the protocol to be identified is most "like" after "measurement". BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A flow chart of an open set shortwave communication protocol identification method based on metric learning provided by the present invention;

[0043] Figure 2 An application scenario diagram of the open set shortwave communication protocol identification method based on metric learning provided by the present invention;

[0044] Figure 3 is a diagram of the coding network structure provided by the present disclosure;

[0045] Figure 4 A diagram of the classification network decision process provided for the present disclosure;

[0046] Figure 5 The addition L provided for this disclosure CE Comparison of protocol feature visualization metrics before and after loss. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] See also Figure 1 The first aspect of the present invention provides an open set shortwave communication protocol identification method based on metric learning, the method comprising:

[0049] Step S1, data preprocessing: obtaining shortwave protocol data for training, and preprocessing the shortwave protocol data to obtain training data in a standard format;

[0050] Data preprocessing includes:

[0051] Data domain conversion: The input data is two-way data in I / Q domain, and the real data is converted into I / Q;

[0052] Data unitization: divide the data into n units, each unit has a length of L, and fill the remaining data that is less than one unit with 0 to the length of L;

[0053] Energy normalization: Normalizes protocol data with different signal strengths to data with an energy of 1 to reduce the impact of signal energy strength on protocol types.

[0054] Step S2, model training: build a metric learning network and input training data into the metric learning network for training; the metric learning network includes an encoder network for metric learning and a fully connected network for classification.

[0055] In step S2, the training process of the metric learning network includes:

[0056] 1) Input the training data into the encoder network to obtain the training data feature map and calculate the metric learning loss value;

[0057] 2) Input the training data into the fully connected network to calculate the classification cross entropy loss;

[0058] 3) The objective loss function of the metric learning network consists of the metric learning loss and the classification cross entropy loss. Each round of training updates the metric learning network based on the feedback of the objective loss function.

[0059] The target loss function is: Let the training data read in a training unit be X, which contains N categories of protocol data (x i , i=1,2,…,N), each category has M samples; the pairs of non-repeating positive sample data of the same type are {(x im ,x im‘ ),i=1,2,…,N}, different types of negative sample data pairs are {(x im ,x jm‘ ),i,j=1,2,…,N}, the metric learning network is denoted as A, the fully connected network is denoted as B, and the similarity calculation function is D;

[0060] Then the metric learning loss value is:

[0061]

[0062] The cross entropy loss is:

[0063]

[0064] where y i is the probability distribution of the true label, x i is the predicted probability output by the fully connected network;

[0065] Then the target loss function of the model update is: Loss = c × L SCE +(1-c)×L CE

[0066] Where c is an adjustable parameter ranging from 0 to 1.

[0067] Step S3, protocol identification: first fix the parameters of the metric learning network to apply the network, then count the mean of the feature graphs output after each category of training data passes through the metric learning network, and finally input the protocol data to be classified, and obtain the protocol category according to the feature matching method.

[0068] The protocol identification application process includes:

[0069] 1) Calculation of known class feature maps: Input various types of training data into the encoder network, count the feature maps of each training data and calculate the average feature map of each category; the method is: Assume that the nth type of protocol data X in all training data n YesL n Samples, namely X n=(x i ,i=1,2,…,L n ); the feature map of the sample after the encoding network is A(X n ), then the average feature map of the nth type of protocol data is F n =∑A(X n ) / L n ;

[0070] 2) Selection of decision threshold: Set the unknown class decision threshold based on the feature graph statistics of each class of training data; the method is: use the feature graph inner product to calculate the similarity between the average feature graphs of each class. For example, the average feature graph F of class n1 n1 And the average feature map F of n2 classes n2 Calculate the vector inner product S (n1,n2) =F n1 ·F n2 .

[0071] Then the decision threshold is the minimum value of all similarities:

[0072] T=min(S (na,nb) ,na,nb=1,2,…,n).

[0073] 3) Calculation of unknown class feature map: Input the data to be classified and obtain the data feature map through the encoder network;

[0074] 4) Feature graph matching: Calculate the similarity between the class to be identified and the average feature graph of each known class; if the similarity is less than the decision threshold, it is judged as an unknown protocol category. Otherwise, the category with the largest similarity is recorded, and the feature graph is continued to pass through the fully connected network to obtain a closed set classification result; if the closed set classification result is the same category as the category with the largest similarity, it is judged as the protocol category, if different, it is judged as an unknown protocol category.

[0075] A second aspect of the present invention provides an open set shortwave communication protocol identification system based on metric learning, the system comprising:

[0076] The data preprocessing module is configured to obtain shortwave protocol data for training, and obtain training data in a standard format by preprocessing the shortwave protocol data;

[0077] The model training module is configured to build a metric learning network and input training data into the metric learning network for training;

[0078] The protocol identification module is configured to first fix the parameters of the metric learning network, then count the mean of the feature graphs output after the training data of each category passes through the metric learning network, and finally input the protocol data to be classified to obtain the protocol category according to the feature matching method.

[0079] The third aspect of the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of an open set shortwave communication protocol identification method based on metric learning according to any one of the first aspects of the present invention are implemented.

[0080] The fourth aspect of the present invention provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of an open set shortwave communication protocol identification method based on metric learning of any one of the first aspects of the present invention are implemented. Specific embodiment:

[0082] See also Figure 2 ,The open set shortwave communication protocol recognition method based on ,metric learning is divided into training process and application process in ,process, and is divided into data end, coding network end and classification network end in ,structure.

[0083] During the training process, the preprocessed batch training data is input into the encoding network to obtain the batch feature map. The batch feature map is output through the fully connected network to predict the protocol category, and the training is performed by calculating the target loss value Loss. The target loss value is L CE and L ECE Composition, among which L CE L is the clustering loss value, and the goal is to make the protocols of the same category closer. SCE is the classification loss value, and the goal is to make the protocols of different categories farther apart. To balance the weights of the two target loss values, a weight hyperparameter c is added for training adjustment.

[0084] After training convergence, the feature map output by the encoding network has the ability to "measure" the characteristics of the protocol data. The average feature map of each type of protocol in the training data is calculated as F n It is used as the feature representative of this type of protocol for subsequent feature map matching.

[0085] In the application process, the protocol data to be identified is input into the encoding network to obtain the feature map for feature map matching. By calculating the similarity between the protocol to be identified and the average feature map of each known class, it can be known which class the protocol to be identified is most "similar" to after "measurement". If the similarity between the protocol to be identified and all known classes is very low, the protocol to be identified is considered to be a new "unknown class". In this way, open set identification containing unknown protocols can be achieved.

[0086] See also Figure 3 , the input of the model is the unitized shortwave protocol data. The tensor input to the network Divided into T units (Token), i.e. tensors Where S is the input data length, B is the batch reading size, and L is the length of each unit. The tensor I is directly input into the model structure.

[0087] The model includes category encoding layer, position encoding layer, normalization layer and network layer.

[0088] The category encoding layer encodes the waveform category into a category unit in the input unit sequence, which plays the role of focusing the model's sequence output on the protocol signal category. The value of the category unit is initialized randomly, and its length is the same as the length of each unit in the input unit sequence, that is, the category unit is Splicing the category unit to the starting position of the input tensor is the output of the category encoding layer:

[0089]

[0090] Cat is a sequence splicing method.

[0091] The position encoding layer maps each unit to a vector containing the unit position information. In this way, the model can learn both the unit content information and the unit position information. The output of the position encoding layer is:

[0092]

[0093] where f t () is the vector mapping function, and t is the unit sequence index.

[0094] The normalization layer is used to normalize the data transmitted in the network to data with a mean of 0 and a variance of 1, which is beneficial for model training.

[0095] The network layer consists of 12 attention network layers connected in series. Each attention network layer contains a multi-head attention layer and two fully connected layers, which are connected by normalization and residual to learn the differences in protocol categories.

[0096] I A =I+LayerNormal(AN(I))

[0097] Out=I A +LayerNormal(F2(Relu(F1(I A ))))

[0098] Among them, AN(I) is the output of the multi-head attention layer, Out is the output of each attention network layer, F1 and F2 are the first and second layers of the fully connected layer respectively.

[0099] See also Figure 4 ,The decision of the classification network relies on the feature graph matching method. The specific process is as follows;

[0100] The protocol data to be identified X passes through the encoding network A to obtain the feature map A(X n ).

[0101] The feature map A(X) and the average feature maps F1, F2, ..., F n Calculate the similarity in sequence and get S1, S2, ..., S n .

[0102] The maximum value of the similarity (the index of the maximum value is the k-th type of protocol) is compared with the decision threshold T. If it is less than the decision threshold, it is judged as an unknown class.

[0103] If it is greater than the decision threshold, the feature map A(X) continues to pass through the fully connected network B to obtain the predicted category B(A(X)).

[0104] The predicted category B(A(X)) is compared with the index k at the maximum similarity value. If they are not equal, it is judged as an unknown class; if they are equal, it is judged as the kth class.

[0105] See also Figure 5 , the present invention aims to add clustering loss L CE It promotes the encoding network to better measure the distance between data, making the distance between samples of the same type closer and the features more distinguishable between classes. CE Feature visualization of loss, L is not included in the right figure CE Feature visualization of the loss. Different categories of features are marked with different colors, known categories are marked with an “×” shape, and unknown categories are marked with a “●” shape.

[0106] You can see that adding L CE After the loss, the feature communities of similar known samples become more “compact” in the feature space, and the features of unknown samples are less likely to fall into the feature communities of known samples by mistake, thus alleviating the open space risk.

[0107] In summary, the present invention aims at at least one defect or improvement demand of the prior art, provides an open set shortwave communication protocol identification method based on metric learning, and studies a deep neural network based on a metric learning method in view of the shortcomings of shortwave communication protocol identification technology in the field of open set identification technology. By learning a distance measurement method for a communication protocol, the distance between protocols of the same category is closer, and the distance between protocols of different categories is farther. In this way, the features learned by the classification model are more distinguishable between classes, and the distribution of features of each category in the probability space is more concentrated. The risk of open space can be alleviated by narrowing the distance within the class and widening the distance between classes, and it is easier to judge unknown categories by setting a decision threshold. Thereby, open set identification of shortwave communication protocols is achieved.

[0108] A second aspect of the present invention provides an open set shortwave communication protocol identification system based on metric learning, the system comprising:

[0109] The data preprocessing module is configured to obtain shortwave protocol data for training, and obtain training data in a standard format by preprocessing the shortwave protocol data;

[0110] The model training module is configured to build a metric learning network and input training data into the metric learning network for training;

[0111] The protocol identification module is configured to first fix the parameters of the metric learning network, then count the mean of the feature graphs output after the training data of each category passes through the metric learning network, and finally input the protocol data to be classified to obtain the protocol category according to the feature matching method.

[0112] The third aspect of the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of an open set shortwave communication protocol identification method based on metric learning according to any one of the first aspects of the present invention are implemented.

[0113] The fourth aspect of the present invention provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of an open set shortwave communication protocol identification method based on metric learning of any one of the first aspects of the present invention are implemented.

[0114] The above are preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. An open set shortwave communication protocol identification method based on metric learning, characterized in that: The method comprises: Step S1, data preprocessing: obtaining shortwave protocol data for training, and subjecting the shortwave protocol data to data preprocessing to obtain training data in a standard format; Step S2, model training: building a metric learning network and inputting the training data into the metric learning network for training; Step S3, protocol identification: first fix the parameters of the metric learning network, then count the mean of the feature graphs output after the training data of each category passes through the metric learning network, and finally input the protocol data to be classified, and obtain the protocol category according to the feature matching method.

2. The open set shortwave communication protocol identification method based on metric learning according to claim 1 is characterized in that: In the step S1, the data preprocessing includes: Data domain conversion: The input data is two-way data in I / Q domain, and the real data is converted into I / Q; Data unitization: divide the data into n units, each unit is of length L, and the remaining data that is less than one unit is filled with 0 to the length L; Energy normalization: Normalizes protocol data with different signal strengths to data with an energy of 1 to reduce the impact of signal energy strength on protocol types.

3. The open set shortwave communication protocol identification method based on metric learning according to claim 1 or 2, characterized in that: In step S2, the metric learning network includes an encoder network for metric learning and a fully connected network for classification.

4. The open set shortwave communication protocol identification method based on metric learning according to claim 3 is characterized in that: In step S2, the training process of the metric learning network includes: 1) Inputting the training data into the encoder network to obtain a training data feature map, and calculating a metric learning loss value; 2) inputting the training data into a fully connected network to calculate the classification cross entropy loss; 3) The target loss function of the metric learning network consists of a metric learning loss and a classification cross entropy loss, and each round of training updates the metric learning network based on feedback from the target loss function.

5. The open set shortwave communication protocol identification method based on metric learning according to claim 4 is characterized in that: In step S2, the objective loss function is: The training data read in a training unit is X, which contains N types of protocol data (x i , i = 1, 2, ..., N), each category has M samples; the pairs of non-repeating positive sample data of the same type are {(x im , x im‘ ), i = 1, 2, ..., N}, different types of negative sample data pairs are {(x im , x jm‘ ), i, j = 1, 2, ..., N}, the metric learning network is denoted as A, the fully connected network is denoted as B, and the similarity calculation function is denoted as D; Then the metric learning loss value is: The cross entropy loss is: where y i is the probability distribution of the true label, x i is the predicted probability output by the fully connected network; Then the target loss function of the model update is: Loss = c × L SCE +(1-c)×L CE Where c is an adjustable parameter ranging from 0 to 1.

6. The open set shortwave communication protocol identification method based on metric learning according to claim 5 is characterized in that: In step S3, the protocol identification application process includes: 1) Calculation of feature maps of known classes: Input various types of training data into the encoder network, count the feature maps of each training data and calculate the average feature map of each class; 2) Selection of decision threshold: Setting the unknown class decision threshold based on the feature map statistics of each class of training data; 3) Calculation of unknown class feature map: Input the data to be classified and obtain the data feature map through the encoder network; 4) Feature graph matching: Calculate the similarity between the class to be identified and the average feature graph of each known class; if the similarity is less than the decision threshold, it is judged as an unknown protocol category. Otherwise, the category with the largest similarity is recorded, and the feature graph is continued to pass through the fully connected network to obtain a closed set classification result; if the closed set classification result is the same category as the category with the largest similarity, it is judged as the protocol category, if different, it is judged as an unknown protocol category.

7. The open set shortwave communication protocol identification method based on metric learning according to claim 6 is characterized in that: The method of inputting various types of training data into the encoder network, counting the feature graph of each training data and calculating the average feature graph of each category includes: assuming that the nth type of protocol data X n YesL n Samples, namely X n =(x i , i = 1, 2, ..., L n ); the feature map of the sample after the encoding network is a(X n ), then the average feature map of the nth type of protocol data is F n =∑A(X n ) / L n ; The step of setting the unknown class decision threshold according to the feature graph statistical information of each class of training data includes: using the feature graph inner product to calculate the similarity between the average feature graphs of each class.

8. An open set shortwave communication protocol identification system based on metric learning, characterized in that: The system comprises: The data preprocessing module is configured to obtain shortwave protocol data for training, and obtain training data in a standard format by performing data preprocessing on the shortwave protocol data; A model training module is configured to build a metric learning network and input the training data into the metric learning network for training; The protocol identification module is configured to first fix the parameters of the metric learning network, then count the mean of the feature graphs output after the training data of each category passes through the metric learning network, and finally input the protocol data to be classified to obtain the protocol category according to the feature matching method.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the open set shortwave communication protocol identification method based on metric learning described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the open set shortwave communication protocol identification method based on metric learning described in any one of claims 1 to 7 are implemented.