AIS radiation source identification model generation method, device and AIS radiation source identification method and device

By constructing an AIS radiation source identification network based on gating mechanism and sliding window attention, the problem of lack of universality in existing AIS radiation source identification methods is solved, achieving higher identification accuracy and lower computational complexity, and is applicable to the identification of AIS radiation sources.

CN115905808BActive Publication Date: 2025-09-05XIAMEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211454482.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2025-09-05
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

Existing methods for identifying AIS radiation sources rely on artificially designed features, lack universality, and are difficult to effectively identify illegitimate AIS signals.

Method used

An AIS radiation source identification network based on gating mechanism and sliding window attention is adopted. The AIS radiation source identification model is constructed by sequence encoding, single-head gating attention unit, sliding window self-attention module and classifier, and trained using the dataset of transient and steady state parts of AIS.

Benefits of technology

It improves the performance of Transformer networks, reduces the number of parameters and computational complexity, and increases the accuracy of radiation source identification, making it suitable for the identification of transient and steady-state signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115905808B_ABST
    Figure CN115905808B_ABST
Patent Text Reader

Abstract

The present application relates to a method for generating an AIS emitter identification model, which includes: S101: collecting AIS signals, preprocessing the AIS signals, locating AIS signal frames, and constructing a dataset based on the AIS transient part and the AIS steady-state part, wherein the preprocessing includes AIS signal correlation detection, GMSK demodulation, NRZI decoding, and dividing the AIS signal into a transient part and a steady-state part; S102: constructing an AIS emitter identification network based on a gating mechanism and sliding window attention, wherein the AIS emitter identification network based on a gating mechanism and sliding window attention includes a sequence encoding module, a single-head gated attention unit module, a sliding window self-attention module, and a classifier module; S103: using the dataset based on the AIS transient part and the AIS steady-state part to train the AIS emitter identification network based on the gating mechanism and sliding window attention to obtain an AIS emitter identification model. The present application has lower complexity when identifying AIS emitters while achieving better recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of AIS radiation source identification, and in particular to an AIS radiation source identification model generation method and an AIS radiation source identification method. Background Art

[0002] The Automatic Identification System (AIS) is an automatic tracking system that uses transceivers on ships. Through this system, ships continuously transmit their identity, location, and heading data over VHF public radio channels to nearby ships and shore authorities. This data supplements ocean radars and helps prevent collisions with water transport, playing a crucial role in maritime traffic safety. However, if someone modifies the Maritime Mobile Service Identity (MMSI) representing a ship's identity information in the AIS system, it poses a significant threat to navigation safety. The radio frequency fingerprint (RFF) of the signal is an essential physical layer characteristic of the AIS terminal transmitter and is difficult to tamper with. Therefore, RF fingerprint-based radiator individual identification technology can detect illegal AIS signals and build a low-cost, simpler, and more secure identification and authentication system for AIS communications.

[0003] Traditional radiation source identification methods often leverage knowledge from signal processing and related fields, such as fractal dimension, higher-order spectrum, Hilbert transform, and wavelet transform, to extract signal features. These methods then use models like support vector machines for classification. However, these methods rely heavily on artificially designed features and are not universally applicable. Summary of the Invention

[0004] In response to the above technical problems, this application proposes an AIS radiation source identification model generation method and an AIS radiation source identification method.

[0005] In a first aspect, the present application proposes a method for generating an AIS emitter identification model, comprising the following steps:

[0006] S101: Acquire AIS signals, pre-process the AIS signals, locate AIS signal frames, and construct a data set based on the AIS transient part and the AIS steady-state part. The pre-processing includes AIS signal correlation detection, GMSK demodulation, NRZI decoding, and dividing the AIS signal into the transient part and the steady-state part.

[0007] S102: constructing an AIS emitter identification network based on a gating mechanism and sliding window attention, wherein the AIS emitter identification network based on a gating mechanism and sliding window attention includes a sequence encoding module, a single-head gated attention unit module, a sliding window self-attention module, and a classifier module;

[0008] S103: Using the dataset based on the AIS transient part and the AIS steady-state part, an AIS emitter recognition network based on a gating mechanism and sliding window attention is trained to obtain an AIS emitter recognition model.

[0009] Preferably, the S101 specifically includes:

[0010] S1011: Control the transmission specification of the AIS terminal transmitter so that the AIS terminal transmitter transmits the original signal that meets the specification requirements;

[0011] S1012: Receive the original signal and intercept the AIS signal from the original signal. The algorithm used to intercept the AIS signal is:

[0012] The original signal received can be expressed as:

[0013] ;

[0014] in, represents the time-varying envelope caused by channel fading, , is the carrier frequency, is the phase shift caused by the multipath effect, is GMSK modulation information, is an imaginary unit;

[0015] Then only the real part of the received original signal is taken for training and recognition:

[0016] ;

[0017] Then calculate the correlation between the synchronization sequence and the original signal:

[0018] ;

[0019] in, Indicates the synchronization sequence The sequence obtained after NRZI encoding and GMSK modulation is , j represents the sampling point, M = 256N 1bit Indicates the length of one AIS signal frame, N 1bit Indicates the number of sampling points of 1 bit;

[0020] Then from Filter out the K signal segments with the highest correlation:

[0021] st=argtopk j∈C (Corr j );

[0022] Where argtopk(·) means taking the largest K elements from the sequence, and C represents the size of Corr;

[0023] Then the intercepted signal segment is as follows:

[0024] ;

[0025] Where i represents the index of the st sequence;

[0026] S1013: Determine whether the intercepted signal segment is an AIS signal segment, specifically including:

[0027] First intercept The signal segment is GMSK demodulated. The GMSK demodulation algorithm is:

[0028]

[0029] Where W(t′) represents the intercepted signal After 1 bit delay and π / 2 phase shift, T 1bit is the duration of 1 bit, 0≤t′≤M-1;

[0030]

[0031] Where x(t′) represents Multiply by W(t′);

[0032] ;

[0033] Where y(t′) represents x(t′) after filtering out the high-frequency components through a low-pass filter;

[0034] ;

[0035] Where b(k) represents the symbol decision of y(t′), and k represents the modulation symbol index;

[0036] S1014: intercepted signal after GMSK demodulation Perform NRZI decoding to determine whether the synchronization sequence is followed by a start flag to determine whether the intercepted signal is an AIS signal;

[0037] S1015: Confirm interception signal After the AIS signal is detected, its transient part including the rising edge, training sequence and start mark is located, and the remaining part is regarded as the steady-state part;

[0038] S1016: Constructing data sets of the AIS transient part and the AIS steady-state part.

[0039] Preferably, the algorithm used by the sequence encoding module in S102 is:

[0040] S=[s1,s2,…,s M ] 1×M ;

[0041] Where S represents a signal sequence consisting of M sampling points;

[0042] ;

[0043] Among them, P represents dividing each k sampling points into a patch;

[0044] ;

[0045] Here, X represents a linear transformation of each 1×k-dimensional patch into a 1×C-dimensional token sequence. is element-wise multiplication, is the parameter matrix;

[0046] Preferably, the algorithm used by the single-head gated attention unit module in S102 is:

[0047] X 1 =(U⊙AV)W o +X l-1 ;

[0048] U=φ(X l-1 W u );

[0049] V=φ(X l-1 W v );

[0050] Among them, X l-1 is the output of the previous layer, X l is the output of the current layer, and , ⊙ is the Hadamard product, W is the parameter matrix, and is the attention matrix, U and V represent a linear transformation of the output of the previous layer, and φ represents the SiLU activation function;

[0051] ;

[0052] Among them, A is the attention matrix, which is used to fuse the information between tokens and enable U and V to interact with each other, Z=φz(XWz), is the parameter matrix, 1 / d is the scaling factor, and is a simple affine transformation function, and .

[0053] Preferably, the algorithm adopted by the sliding window self-attention module in S102 is:

[0054] ;

[0055] in, Represents the token contained in the wi-th window;

[0056] ;

[0057] ;

[0058] ;

[0059] ;

[0060] Among them, Z is the token sequence input by the attention matrix, represents the token sequence after the position encoding is introduced, and Z' represents the sequence after the sequence Z is reordered. Represents a sequence of position information, is element-wise multiplication, θ i =10000 -2i / d ;

[0061] After obtaining the self-attention of only the tokens in the window, let it be GLAU, and then do the following calculation:

[0062] X l =GLAU(X l-1 );

[0063] X l+1 =GSLAU(X l );

[0064] Among them, GLAU means that only the self-attention of the token in the window is calculated, and GSLAU means that all windows are first slid to the right by 1 / 2 window size, and then GLAU is used to calculate the window attention. After sliding with GSLAU, two windows of 1 / 2 window size will appear at the beginning and end of the token sequence. They need to be spliced ​​into a complete window, and then the information of irrelevant windows is filtered out when calculating the window attention by adding a mask matrix. The details are as follows:

[0065] ;

[0066] ;

[0067] in, It represents the attention matrix calculated by two 1 / 2 windows. is the query sequence of the k-1th and 0th windows, is the Key sequence of the k-1th and 0th windows, is the Mask matrix, w is the window size, and 0 represents an all-zero matrix of size w / 2.

[0068] Preferably, in S103, the Adam algorithm is used to optimize the AIS emitter identification network based on the gating mechanism and the sliding window attention. The Adam algorithm is specifically as follows:

[0069] ;

[0070] m t ←β1m t-1 +(1-β1)g t ;

[0071] G t ←γG t +(1-γ)g t ⊙g t ;

[0072] ;

[0073] ;

[0074] Among them, J is the loss function, is the derivative symbol, g and G represent the current gradient, θ is the parameter to be optimized, η is the learning rate, m is the momentum, β and γ are hyperparameters with a default value of 0.0001, ⊙ is the Hadamard product, and ε is a decimal that approaches 0 infinitely to prevent division by zero errors.

[0075] Preferably, in S103, the loss function used to train the AIS emitter identification network based on the gating mechanism and sliding window attention is:

[0076] H(p,q)=-∑ x (p(x)logq(x)+(1-p(x))log(1-q(x)));

[0077] Among them, q(x) and p(x) are two different distributions.

[0078] In a second aspect, the present application further proposes a method for identifying an AIS emitter, the method comprising the following steps:

[0079] S201: Acquire AIS emitter signal data to be identified;

[0080] S202: Inputting the AIS emitter signal data into an AIS emitter identification model, wherein the AIS emitter identification model is pre-trained based on the method of the first aspect;

[0081] S203: Outputting the recognition result of the AIS emitter recognition model.

[0082] In a third aspect, the present application further proposes a device for generating an AIS radiation source identification model, the device comprising:

[0083] AIS signal processing module: configured to collect AIS signals, pre-process AIS signals, locate AIS signal frames, and construct a data set based on AIS transient and steady-state parts. The pre-processing includes AIS signal correlation detection, GMSK demodulation, NRZI decoding, and dividing the AIS signal into transient and steady-state parts.

[0084] AIS radiation source identification network construction module: configured to construct an AIS radiation source identification network based on a gating mechanism and a sliding window attention, wherein the AIS radiation source identification network based on a gating mechanism and a sliding window attention includes a sequence

[0085] Encoding module, single-head gated attention unit module, sliding window self-attention module and classifier module;

[0086] AIS emitter identification model generation module: configured to train an AIS emitter identification network based on a gating mechanism and sliding window attention using a dataset based on an AIS transient part and an AIS steady-state part to obtain an AIS emitter identification model.

[0087] In a fourth aspect, the present application further proposes an AIS radiation source identification device, the device comprising:

[0088] An acquisition module configured to acquire AIS emitter signal data that needs to be identified;

[0089] an identification module configured to input the AIS emitter signal data into an AIS emitter identification model, wherein the AIS emitter identification model is pre-trained based on the method of the first aspect;

[0090] The output module is configured to output the recognition result of the AIS emitter recognition model.

[0091] In a fifth aspect, the present application further proposes a computer-readable storage medium having a computer program stored thereon, which implements the method described in the first aspect when the program is executed by a processor.

[0092] In summary, this application has at least the following beneficial technical effects:

[0093] 1. This application proposes a method for generating an AIS emitter identification model that effectively improves the performance of the Transformer network and verifies the potential of the Transformer architecture network in emitter identification tasks.

[0094] 2. This application organically combines the gated attention unit and the sliding window attention, which greatly reduces the number of parameters and computational complexity while improving the recognition performance. In particular, the computational complexity is reduced from O(n 2 ) is reduced to O(n);

[0095] 3. Existing methods for identifying AIS emitters are highly complex. This application achieves lower complexity and better recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and, together with the description, serve to explain the principles of the present application. Other embodiments and many of the expected advantages of the embodiments will be readily apparent as they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale with respect to each other. Like reference numerals designate corresponding similar parts.

[0097] Figure 1 The figure is a flow chart of a method for generating an AIS emitter identification model in one embodiment of the present application.

[0098] Figure 2 4 is a schematic diagram of a specific embodiment of step S101 of the AIS emitter identification model generation method according to the present application.

[0099] Figure 3 This is a structural diagram of an AIS transmission information frame according to a specific embodiment of the present invention;

[0100] Figure 4 is a flow chart of effective data location according to a specific embodiment of the present invention;

[0101] Figure 5 This is a result diagram of valid data interception according to a specific embodiment of the present invention;

[0102] Figure 6 is a network structure diagram of a specific embodiment of the present invention;

[0103] Figure 7 is a flow chart of a gating mechanism according to a specific embodiment of the present invention;

[0104] Figure 8 is an attention matrix calculation and sliding window attention calculation diagram of a specific embodiment of the present invention;

[0105] Figure 9 is a schematic diagram of local attention calculation according to a specific embodiment of the present invention;

[0106] Figure 10 is a sliding window attention calculation flow chart of a specific embodiment of the present invention;

[0107] Figure 11 This is a comparison chart of the accuracy of individual radiation source identification according to a specific embodiment of the present invention;

[0108] Figure 12 This is a performance comparison diagram of radiation source individual identification according to a specific embodiment of the present invention;

[0109] Figure 13 This is a schematic diagram of the module structure of an AIS radiation source identification model generation device in one embodiment of the present application;

[0110] Figure 14 is a flow chart of an AIS emitter identification method in one embodiment of the present application;

[0111] Figure 15 This is a schematic diagram of the module structure of an AIS radiation source identification device in one embodiment of the present application;

[0112] Figure 16 It is a structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present application. DETAILED DESCRIPTION

[0113] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.

[0114] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0115] Figure 1 A flowchart of a method for generating an AIS radiation source identification model is shown in the present application. Figure 1 , the method specifically comprises the following steps:

[0116] S101: Acquire AIS signals, pre-process the AIS signals, locate AIS signal frames, and construct a data set based on the AIS transient part and the AIS steady-state part. The pre-processing includes AIS signal correlation detection, GMSK demodulation, NRZI decoding, and dividing the AIS signal into the transient part and the steady-state part.

[0117] In a specific embodiment, reference Figure 2 , the S101 specifically includes the following steps:

[0118] S1011: Controls the transmission specifications of the AIS terminal transmitter so that it transmits an original signal that meets the specification requirements. The AIS terminal transmitter follows certain transmission specifications, with a rate of 9600 KBd, GMSK modulation, and a burst format of 256 bits of data, which lasts for 26.67 milliseconds.

[0119] S1012: Receive the original signal and intercept the AIS signal from the original signal. The algorithm used to intercept the AIS signal is:

[0120] The original signal received can be expressed as:

[0121] ;

[0122] in, represents the time-varying envelope caused by channel fading, , is the carrier frequency, is the phase shift caused by the multipath effect, is GMSK modulation information, is an imaginary unit;

[0123] Then only the real part of the received original signal is taken for training and recognition:

[0124] ;

[0125] The AIS synchronization sequence, consisting of 12 repetitions of "01," can be used to locate AIS signal frames from the original received signal. Let S_TS = [0, 1, 0, 1, ..., 0, 1]_(1 × 24) represent the synchronization sequence. NRZI encoding and GMSK modulation are performed on it to obtain the sequence S~_TS. The correlation between S~_TS and the original signal r_re(t) is then calculated:

[0126] ;

[0127] in, Indicates the synchronization sequence The sequence obtained after NRZI encoding and GMSK modulation is , j represents the sampling point, M = 256N 1bit Indicates the length of one AIS signal frame, N 1bit Indicates the number of sampling points of 1 bit;

[0128] Then from Corrj Filter out the K signal segments with the highest correlation:

[0129] st=argtopk j∈C (Corr j );

[0130] Where argtopk(·) means taking the largest K elements from the sequence, and C represents the size of Corr;

[0131] Then the intercepted signal segment is as follows:

[0132] ;

[0133] Where i represents the index of the st sequence;

[0134] S1013: Determine whether the intercepted signal segment is an AIS signal segment, specifically including:

[0135] First intercept The signal segment is GMSK demodulated. The GMSK demodulation algorithm is:

[0136]

[0137] Where W(t′) represents the intercepted signal After 1 bit delay and π / 2 phase shift, T 1bit is the duration of 1 bit, 0≤t′≤M-1;

[0138]

[0139] Where x(t′) represents Multiply by W(t′);

[0140] ;

[0141] Where y(t′) represents x(t′) after filtering out the high-frequency components through a low-pass filter;

[0142] ;

[0143] Where b(k) represents the symbol decision of y(t′), and k represents the modulation symbol index;

[0144] S1014: intercepted signal after GMSK demodulation Perform NRZI decoding to determine whether the synchronization sequence is followed by a start flag to determine whether the intercepted signal is an AIS signal;

[0145] S1015: Confirm interception signal After the AIS signal is detected, its transient part including the rising edge, training sequence and start mark is located, and the remaining part is regarded as the steady-state part;

[0146] S1016: Constructing data sets of the AIS transient part and the AIS steady-state part.

[0147] The following embodiment specifically describes step S101:

[0148] According to the requirements of the International Maritime Organization, the AIS terminal transmitter must comply with the ITU-RM.1371-4 specification and use Gaussian Minimum Shift Keying (GMSK) modulation with a rate of 9600kBd. AIS signals are transmitted in burst form, such as Figure 3 As shown, each burst structure lasts 26.67ms and can transmit 256 symbols. Initially, the AIS terminal transmitter turns on, sending transient information, namely the rising edge of 8 symbols. This is followed by a training sequence (TS) consisting of "01" repeated 12 times, totaling 24 symbols. After the training sequence, the start flag (SF) consisting of "01111110" (8 symbols) is sent. This is followed by 168 bits of data to be transmitted, including the MsgID and MMSI, followed by a 16-bit frame check sequence (FCS), an 8-bit end flag (EF), and a 24-bit buffer. Each bit undergoes NRZI (No Return Zero-Inverse) encoding.

[0149] Since AIS signals have strict transmission specifications, there is no need to detect signal changes to locate relevant data. It is more efficient to directly use the key sequences within the signal to locate relevant data.

[0150] In order to locate the AIS signal frame from the received original signal, it is necessary to use the training sequence in the AIS specification to detect the relevant signal segment, such as Figure 5 As shown. Assume that the original signal received is expressed as:

[0151] ;

[0152] in, represents the time-varying envelope caused by channel fading, , is the carrier frequency, is the phase shift caused by the multipath effect, is GMSK modulation information, defined as follows:

[0153] ;

[0154] Among them, sk∈-1,1 is the symbol to be modulated, K represents the length of the modulation sequence, q(t) is the phase response function, and T is the pulse period.

[0155] Then only the real part of the received original signal is used for training and recognition, that is, ;

[0156] The synchronization sequence in AIS, which consists of 12 repetitions of "01", can be used to locate the AIS signal frame from the original received signal. Represents the synchronization sequence, and performs NRZI encoding and GMSK modulation on it to obtain the sequence , then calculate Correlation with the original signal rre(t):

[0157] ;

[0158] Where j represents the sampling point, M=256N1bit represents the length of one frame of AIS signal, and N1bit represents the number of sampling points of 1 bit. j Filter out the K signal segments with the highest correlation

[0159] st = argtopkj∈c(Corrj);

[0160] Where argtopk(·) represents taking the largest K elements from the sequence, and C represents the size of Corr. The intercepted signal segment is as follows:

[0161] ;

[0162] Where i represents the index of the st sequence;

[0163] In order to determine whether the intercepted signal segment is an AIS signal frame, it is necessary to determine whether the intercepted signal segment is an AIS signal frame. The signal segment is GMSK demodulated, and the demodulation process is as follows Figure 4 As shown, the GMSK demodulation algorithm is:

[0164]

[0165] Where W(t) represents the intercepted signal After a 1-bit delay and a π / 2 phase shift, T1bit is the duration of 1 bit, and 0≤t′≤M-1.

[0166]

[0167] Where x(t′) represents Multiply by W(t′);

[0168] ;

[0169] Where y(t) represents x(t) after filtering out the high-frequency components through a low-pass filter;

[0170] ;

[0171] Where b(k) represents the symbol decision of y(t′), and k represents the modulation symbol index;

[0172] After sampling and judgment, NRZI decoding is used to check whether the start mark follows the synchronization sequence, thereby determining whether the signal segment is an AIS signal frame. The 32 bits before the start mark are the training sequence and the rising edge, respectively, thereby determining the starting position of an AIS signal segment.

[0173] The sampling frequency during the measurement is 48KHz, and the transmission rate of the AIS signal is 9600bit / s. It can be seen that 1bit is composed of 5 sampling points, and a frame of AIS signal has 256×5=1280 sampling points. Figure 5 shown.

[0174] Then the first 256 sampling points are used as the transient part, and 512 sampling points from 688 to 1200 are used as the steady-state part to verify the recognition ability of the recognition network for different signal parts.

[0175] AIS signals transmitted by 50 ships were collected from the Xiamen Ocean Administration Public Dock to construct a dataset based on transient and steady-state components. 260 samples were collected from each ship, 80 of which were divided into a training set, and the remaining 180 samples were divided into a test set. Following the aforementioned method, the first 256 samples in each frame were used as the transient component to construct the transient dataset, while the 512 samples from 688 to 1200 were used as the steady-state component, as shown in the table below. Furthermore, to verify the universality of the model, 10 Software Defined Radio (USRP) devices were used: 7 USRP-N210s and 3 USRP-B210s. Each device transmitted a random signal at a frequency of 4.2 GHz using QPSK modulation. The receiver collected the raw I / Q signals and used only the I component for recognition. For the signals collected from each device, 1024 sampling points are randomly intercepted and divided into one sample. Each device is divided into 750 samples, of which 250 samples are used to construct the training set and the remaining 500 samples are used to construct the test set, as shown in the following table:

[0176]

[0177] Since the amplitudes of the measured signals often vary greatly, the following method is needed to normalize the data set:

[0178] ;

[0179] in, Represents a dataset, N is the number of samples in the dataset, and M is the length of each sample.

[0180] S102: constructing an AIS emitter identification network based on a gating mechanism and sliding window attention, wherein the AIS emitter identification network based on a gating mechanism and sliding window attention includes a sequence encoding module, a single-head gated attention unit module, a sliding window self-attention module, and a classifier module;

[0181] In a specific embodiment, the present application adopts the Transformer recognition network. As an advanced sequence model, Transformer was first applied to machine translation to solve the defect that recurrent neural networks (such as RNN, LSTM, etc.) cannot be calculated in parallel. It only uses the self-attention mechanism to extract global features in sequence data in one step. It has strong global modeling capabilities and time series modeling capabilities, and has advantages such as larger model capacity and stronger scalability. However, it has the defects of quadratic computational complexity and poor learning ability of multi-head self-attention features, which hinder the learning of fingerprint features. In order to solve this problem, obtain stronger sequence modeling capabilities while greatly reducing computational complexity, the present application organically combines single-head gated attention units and sliding window attention, while obtaining higher recognition capabilities and reducing spatiotemporal complexity to linear.

[0182] In step S102, the input one-dimensional original signal is first divided into patches, and then the patch encoding layer is tokenized through the PatchEmbedding sequence encoding layer. Then, the GLAU and GSLAU layers constructed by the gated attention unit and the sliding window attention are used to extract the potential fingerprint features in the token sequence. Then, the token sequence is subjected to the GlobalAvgPooling global pooling operation in the time dimension to obtain a one-dimensional feature vector. Finally, the probability of the category to which the fingerprint feature belongs is output through the FC classification layer. The AIS radiation source recognition network based on the gating mechanism and sliding window attention of this application is as follows: Figure 6 shown.

[0183] In a specific embodiment, the algorithm used by the sequence encoding module in S102 is:

[0184] S=[s1,s2,…,sM]1×M;

[0185] Where S represents a signal sequence consisting of M sampling points;

[0186] ;

[0187] Among them, P represents dividing each k sampling points into a patch;

[0188] ;

[0189] Here, X represents a linear transformation of each 1×k-dimensional patch into a 1×C-dimensional token sequence. is element-wise multiplication, is the parameter matrix.

[0190] The main function of the sequence encoding module is to divide the input signal sequence into patches.

[0191] The gated attention unit is a lightweight encoding module that combines a gating mechanism with self-attention and a feedforward neural network. It aims to address the problems of Transformer's multi-head self-attention being inefficient and having a large number of parameters.

[0192] In a specific embodiment, the algorithm used by the single-head gated attention unit module in S102 is:

[0193] X 1 =(U⊙AV)W o +X l-1 ;

[0194] U=φ(X l-1 W u );

[0195] V=φ(X l-1 W v );

[0196] in, is the output of the previous layer, is the output of the current layer, and ,X'eRxd, is the Hadamard product, meaning the gate operation, W is the parameter matrix, and weRxd, U and V represent a linear transformation of the previous layer output, φ represents the SiLU activation function, is the attention matrix, which is used to fuse the information between tokens so that U and V can interact with each other. Z=φz(XWz), is the parameter matrix, 1 / d is the scaling factor, Q and X are simple affine transformation functions, and Q(x)=k(x)=xy+B;

[0197] The following examples specifically describe the single-head gated attention unit module:

[0198] The gated attention unit is a lightweight encoding module that combines the gating mechanism with self-attention and feedforward neural networks, and can strengthen more important fingerprint information and weaken unimportant additional information, such as Figure 7 The calculation method is as follows:

[0199] ;

[0200] Where ⊙ is the Hadamard product, which means the gate operation, is the output of the previous layer, is a parameter matrix, n and d are the number of tokens and encoding dimensions respectively, U and V represent a linear transformation of the output of the previous layer, For the SiLU activation function:

[0201] ;

[0202] A is the attention matrix, which is responsible for fusing information between tokens and enabling U and V to interact with each other, as follows:

[0203] ;

[0204] in is the parameter matrix, 1 / d is the scaling factor, and Q, K are simple affine transformation functions:

[0205] ;

[0206] On this basis, the attention matrix A will be a very sparse matrix, introducing a certain sparsity. Unlike the standard multi-head self-attention, the calculation of the Q and K matrices under the gated attention unit is only an affine transformation, without multiplying the additional parameter matrix W. Secondly, the softmax(·) is replaced by a simpler calculation , making the attention matrix more sparse and the calculation simpler. At the same time, due to the introduction of the gating mechanism, only one head can achieve very excellent performance, greatly reducing the number of parameters and computational complexity. That is, compared with the multi-head self-attention The number of parameters and The computational complexity is , where h is the number of heads, and a single-head gated attention unit has only and The computational complexity of .

[0207] The introduction of a gating mechanism allows information flow to better align with the information processing process. This mechanism uses current information to determine which information can flow next, and then, by stacking more layers, it filters the more important fingerprint information from the chaotic signal. This method of selecting the finest and the coarseest information is very important for the original signal, which carries a lot of additional information.

[0208] In a specific embodiment, the algorithm used by the sliding window self-attention module in S102 is:

[0209] ;

[0210] in, Representative The tokens contained in the window; relative position encoding is used to model the position information in the token sequence Z, as follows:

[0211] ;

[0212] ;

[0213] Among them, Z is the token sequence input by the attention matrix, Represents the token sequence after the position encoding is introduced. For element-by-element multiplication, Z' represents the sequence after reordering the token sequence Z. Represents a sequence of position information, ;

[0214] The above calculation method can be used to obtain the self-attention of only the tokens in the window, which is called GLAU. Then the following calculation is performed:

[0215] ;

[0216] GLAU only calculates the self-attention of tokens within the window, which is different from the standard GAU. GSLAU first slides all windows to the right by 1 / 2 the window size, and then uses GLAU to calculate the window attention. After sliding with GSLAU, two 1 / 2 window-size windows will appear at the beginning and end of the token sequence. These need to be spliced ​​into a complete window, and then the information of irrelevant windows is filtered out when calculating the window attention by adding a mask matrix.

[0217] ;

[0218] ;

[0219] in, It represents the attention matrix calculated by two 1 / 2 windows. is the query sequence of the k-1th and 0th windows, is the Key sequence of the k-1th and 0th windows.

[0220] is the Mask matrix, w is the window size, and 0 represents an all-zero matrix of size w / 2.

[0221] The following example describes the sliding window self-attention module in detail:

[0222] Window attention and relative position encoding. Although it is used to gate the attention unit, the computational complexity is still , and cannot effectively extract local information. To this end, by limiting the calculation of attention to a window, on the one hand, local information is introduced, and further sparsity is introduced, on the other hand, the computational complexity is greatly reduced, such as Figure 8 and Figure 9 As shown, the calculation speed is improved:

[0223] ;

[0224] in Representative On this basis, the computational complexity is optimized to linear, improving the recognition speed.

[0225] At this time, the computational complexity is determined by The computation speed can be greatly improved when the sequence length is particularly long.

[0226] In addition, when calculating local attention, RoPE (RotatyPositionEncoding) relative position encoding is introduced to ensure the temporal nature of the model. RoPE relative position encoding is a solution that uses absolute position encoding in conjunction with the attention mechanism to achieve relative position encoding effects. It not only combines the advantages of simple implementation of absolute position encoding, but also the advantages of higher performance of relative position encoding, allowing the calculation of self-attention to distinguish different tokens. Specifically, for the sequence ,have:

[0227] ;

[0228] ;

[0229] Among them, Z is the token sequence input by the attention matrix, Represents the token sequence after the position encoding is introduced. For element-by-element multiplication, Z' represents the sequence after reordering the token sequence Z. Represents the position information vector, In the choice, still use , it can bring certain long-range attenuation.

[0230] Sliding window self-attention module. The local window can capture local information and improve computational efficiency, but limiting the attention calculation to the local area makes it impossible to obtain global information, which affects the recognition performance. Therefore, for one-dimensional signal sequences, a sliding window that is simple to implement and can effectively integrate global information is used to solve the defect of not being able to obtain global information, such as Figure 10 Specifically, two special modules, GLAU and GSLAU, are designed and constructed in an alternating manner to fuse global information:

[0231] ;

[0232] GLAU: ​​Only calculates the self-attention of the token within the window.

[0233] GSLAU: First, all windows are shifted to the right by 1 / 2 window size, and then GLAU is used to calculate window attention. However, it should be noted that after the window is shifted, two windows of only 1 / 2 window size will appear at the beginning and end of the token sequence. They need to be spliced ​​into a complete window first, and then when calculating the window attention, the irrelevant window information in the attention matrix is ​​masked out through the mask. In this way, the attention calculation of the two 1 / 2 windows is completed in one forward process, as follows:

[0234] ;

[0235] ;

[0236] in, It represents the attention matrix calculated by two 1 / 2 windows. is the query sequence of the k-1th and 0th windows, is the Key sequence of the k-1th and 0th windows.

[0237] is the Mask matrix, w is the window size, and 0 represents an all-zero matrix of size w / 2.

[0238] The network inputs a 1×M-dimensional raw signal and first divides every k sampling points into a patch, with a total of M / K patches. Then, through the sequence encoding module, each 1×k-dimensional patch is encoded into a 1×C-dimensional token, which is then sent to several feature extraction layers constructed by single-head gated attention units and sliding window attention modules to extract the latent fingerprint features in the token sequence. Finally, the output feature map is globally pooled to obtain a 1×C-dimensional feature vector, which is sent to the fully connected layer to output the category.

[0239] S103: Using the dataset based on the AIS transient part and the AIS steady-state part, an AIS emitter identification network based on a gating mechanism and sliding window attention is trained to obtain an AIS emitter identification model.

[0240] In a specific embodiment, in S103, the Adam algorithm is used to optimize the AIS emitter identification network based on the gating mechanism and sliding window attention. The Adam algorithm is specifically:

[0241]

[0242] Among them, J is the loss function, is the derivative symbol, g and G represent the current gradient, θ is the parameter to be optimized, η is the learning rate, m is the momentum, β and γ are both hyperparameters, the default value is 0.0001, is the Hadamard product, and ε is a decimal that approaches 0 infinitely, which is used to prevent division by zero errors.

[0243] In a specific embodiment, in S103, the loss function used to train the AIS emitter identification network based on the gating mechanism and sliding window attention is:

[0244] ;

[0245] Among them, q(x) and p(x) are two different distributions.

[0246] The following embodiment specifically describes step 103:

[0247] The recognition network is trained using the training set, where the loss function is the cross entropy function. The hyperparameters during training are shown in the following table:

[0248]

[0249] The batch size is set to 64, the learning rate is set to 0.0005, the number of training rounds is set to 60 or 90 rounds, and the Adam algorithm is selected as the optimization algorithm; the Adam algorithm is as follows:

[0250]

[0251] Where J is the loss function, θ is the parameter to be optimized, η is the learning rate, and m is the momentum.

[0252] The cross entropy loss function is used as the loss function of this application; the cross entropy loss function is expressed as follows:

[0253] ;

[0254] Where q(x) and p(x) are the distributions of the target distribution and the output distribution respectively.

[0255] The network parameter settings are as follows:

[0256]

[0257] The dimension of each token is 144, the model depth is 5 layers, the patch size is 4, the window size is 16, and the Dropout is 0.1.

[0258] Finally, the test set is sent to the above steps to test the trained recognition model.

[0259] To demonstrate the effectiveness and efficiency of this method, the model was fully tested on different constructed datasets, and the number of parameters and complexity required to achieve higher accuracy among traditional Transformer networks, Resnet networks, and time series classification networks InceptionTime were compared.

[0260] Figure 11 and Figure 12 A comparison chart of the recognition accuracy of a specific embodiment of the present application under different data sets is shown, using three methods: Transformer, Resnet, and InceptionTime+SEAttention, and comparing them with the lightweight and high-performance Transformer network based on the gating mechanism and sliding window attention disclosed in this application. It can be seen that on the AIS transient signal dataset, the present application is superior to other methods in terms of both parameter quantity and computational complexity, that is, with only 0.52M parameters and 33M Flops (floating-point operations per second), a recognition accuracy of 96.31% can be achieved. In the AIS steady-state dataset, the present application not only achieved a higher recognition accuracy, but also had a very low complexity compared to other methods. In the USRPRandom dataset, the present application achieved a recognition accuracy of 99.60, which is superior to other methods in all aspects.

[0261] This application discloses a novel Transformer-based radiation source identification method, which has fewer parameters, lower computational complexity and higher accuracy, and provides a reliable physical layer authentication method for AIS systems. Transformer is a sequence model that can effectively capture the timing relationship in time series signals to learn more representative fingerprint features. However, it has quadratic complexity and an extremely high number of parameters. To this end, this application combines a single-head gated attention unit and a sliding window attention. On the one hand, the gating mechanism filters out most of the irrelevant information in the information sequence and increases the representation of the fingerprint information. On the other hand, the window attention is used to capture key local information and bring a certain sparsity. The above method learns deeper and more discriminative fingerprint features from the original signal under the premise of lower parameter quantity and linear computational complexity, and achieves a higher accuracy rate. In addition, this method is not only applicable to the recognition of transient signals, but also to the recognition of steady-state signals, and has a certain degree of universality.

[0262] The beneficial effects of this application are: this application effectively improves the performance of the Transformer network and verifies the potential of the Transformer architecture network in radiation source tasks; the organic combination of gated attention units and sliding window attention significantly reduces the number of parameters and computational complexity while improving recognition performance, especially reducing the computational complexity from O(n2) to O(n); existing AIS radiation source recognition methods have high complexity, and this application can achieve better recognition accuracy while having lower complexity.

[0263] Further references Figure 13 As an implementation of the above-mentioned method, the present application provides an embodiment of an AIS radiation source identification model generation device, which is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0264] refer to Figure 13 , an AIS radiation source identification model generation device, comprising:

[0265] AIS signal processing module 301: configured to collect AIS signals, pre-process the AIS signals, locate AIS signal frames, and construct a data set based on the AIS transient part and the AIS steady-state part. The pre-processing includes AIS signal correlation detection, GMSK demodulation, NRZI decoding, and dividing the AIS signal into the transient part and the steady-state part.

[0266] AIS emitter identification network construction module 302: configured to construct an AIS emitter identification network based on a gating mechanism and sliding window attention, wherein the AIS emitter identification network based on a gating mechanism and sliding window attention includes a sequence encoding module, a single-head gated attention unit module, a sliding window self-attention module, and a classifier module;

[0267] The AIS emitter identification model generation module 303 is configured to train an AIS emitter identification network based on a gating mechanism and sliding window attention using a data set based on an AIS transient part and an AIS steady-state part to obtain an AIS emitter identification model.

[0268] Further references Figure 14 The present application also discloses an embodiment of an AIS emitter identification method, which specifically includes the following steps:

[0269] S201: Acquire AIS emitter signal data to be identified;

[0270] S202: Inputting the AIS emitter signal data into an AIS emitter identification model, wherein the AIS emitter identification model is pre-trained based on the method of the first aspect;

[0271] S203: Outputting the recognition result of the AIS emitter recognition model.

[0272] Further references Figure 15 As an implementation of the above-mentioned method, the present application provides an embodiment of an AIS radiation source identification device, which is similar to Figure 14 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0273] refer to Figure 15 , an AIS radiation source identification device, comprising:

[0274] An acquisition module 401 is configured to acquire AIS emitter signal data that needs to be identified;

[0275] An identification module 402 is configured to input the AIS emitter signal data into an AIS emitter identification model, wherein the AIS emitter identification model is pre-trained based on the method described in the first aspect;

[0276] The output module 403 is configured to output the recognition result of the AIS emitter recognition model.

[0277] Reference below Figure 16 , which shows a structural diagram of a computer system 500 suitable for implementing an electronic device of an embodiment of the present application. Figure 16The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0278] like Figure 16 As shown, computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage unit 508 into a random access memory (RAM) 503. Various programs and data required for the operation of system 500 are also stored in RAM 503. CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to bus 504.

[0279] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output section 507 including a liquid crystal display (LCD) and speakers; a storage section 508 including a hard disk; and a communication section 509 including a network interface card such as a LAN card or a modem. The communication section 509 performs communication processing via a network such as the Internet. The drive 150 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 150 as needed, so that computer programs read therefrom can be installed in the storage section 508 as needed.

[0280] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 509, and / or installed from a removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the method of the present application are performed.

[0281] As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device implements the following when executing. Figure 1 The method shown in .

[0282] It should be noted that the computer-readable storage medium described in this application may be a computer-readable signal medium or

[0283] or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code contained on a computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical cable, RF, or any suitable combination thereof.

[0284] Computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0285] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions. The above describes the specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of changes or substitutions within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application. Therefore, the protection scope of this application should be based on the protection scope of the claims.

[0286] In the description of this application, it should be understood that the terms "upper", "lower", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limiting this application. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The simple fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used for improvement. Any reference signs in the claims should not be interpreted as limiting the scope.

Claims

1. A method for generating an AIS emitter identification model, characterized by: The method comprises the following steps: S101: Acquire AIS signals, pre-process the AIS signals, locate AIS signal frames, and construct a data set based on the AIS transient part and the AIS steady-state part. The pre-processing includes AIS signal correlation detection, GMSK demodulation, NRZI decoding, and dividing the AIS signal into the transient part and the steady-state part. S102: constructing an AIS emitter identification network based on a gating mechanism and sliding window attention, wherein the AIS emitter identification network based on a gating mechanism and sliding window attention includes a sequence encoding module, a single-head gated attention unit module, a sliding window self-attention module, and a classifier module; The algorithm used by the sequence encoding module in S102 is: S=[s1,s2,…,s M ] 1×M ; Where S represents a signal sequence consisting of M sampling points; ; Among them, P represents dividing each k sampling points into a patch; ; Here, X represents a linear transformation of each 1×k-dimensional patch into a 1×C-dimensional token sequence. is element-wise multiplication, is the parameter matrix; S103: Using the dataset based on the AIS transient part and the AIS steady-state part, an AIS emitter recognition network based on a gating mechanism and sliding window attention is trained to obtain an AIS emitter recognition model.

2. The method for generating an AIS emitter identification model according to claim 1, wherein: The S101 specifically includes: S1011: Control the transmission specification of the AIS terminal transmitter so that the AIS terminal transmitter transmits the original signal that meets the specification requirements; S1012: Receive the original signal and intercept the AIS signal from the original signal. The algorithm used to intercept the AIS signal is: The original signal received can be expressed as: ; in, represents the time-varying envelope caused by channel fading, , is the carrier frequency, is the phase shift caused by the multipath effect, is GMSK modulation information, is an imaginary unit; Then only the real part of the received original signal is taken for training and recognition: ; Then calculate the correlation between the synchronization sequence and the original signal: ; in, Indicates the synchronization sequence The sequence obtained after NRZI encoding and GMSK modulation is , j represents the sampling point, M = 256N 1bit Indicates the length of one AIS signal frame, N 1bit Indicates the number of sampling points of 1 bit; Then from Corr j Filter out the K signal segments with the highest correlation: st=argtopk j∈C (Corr. j ); Where argtopk(·) means taking the largest K elements from the sequence, and C represents the size of Corr; Then the intercepted signal segment is as follows: ; Where i represents the index of the st sequence; S1013: Determine whether the intercepted signal segment is an AIS signal segment, specifically including: First intercept The signal segment is GMSK demodulated. The GMSK demodulation algorithm is: ; Where W(t′) represents the intercepted signal After 1 bit delay and π / 2 phase shift, T 1bit is the duration of 1 bit, 0≤t′≤M-1; ; Where x(t′) represents Multiply by W(t′); ; Where y(t′) represents x(t′) after filtering out the high-frequency components through a low-pass filter; ; Where b(k) represents the symbol decision of y(t′), and k represents the modulation symbol index; S1014: intercepted signal after GMSK demodulation Perform NRZI decoding to determine whether the synchronization sequence is followed by a start flag to determine whether the intercepted signal is an AIS signal; S1015: Confirm interception signal After the AIS signal is detected, its transient part including the rising edge, training sequence and start mark is located, and the remaining part is regarded as the steady-state part; S1016: Constructing data sets of the AIS transient part and the AIS steady-state part.

3. The method for generating an AIS emitter identification model according to claim 1, wherein: The algorithm used by the single-head gated attention unit module in S102 is: X 1 =(U⊙AV)W o +X l-1 ; U=φ(X l-1 W u ); V=φ(X l-1 W v ); Among them, X l-1 is the output of the previous layer, X l is the output of the current layer, and ⊙ is the Hadamard product, W is the parameter matrix, and is the attention matrix, U and V represent a linear transformation of the output of the previous layer, and φ represents the SiLU activation function; ; Among them, A is the attention matrix, which is used to fuse the information between tokens and enable U and V to interact with each other, Z = φ z (XW z ), is the parameter matrix, 1 / d is the scaling factor, and is a simple affine transformation function, and 。 4. The method for generating an AIS emitter identification model according to claim 1, wherein: The algorithm used by the sliding window self-attention module in S102 is: ; in, Represents the token contained in the wi-th window; ; ; Among them, Z is the token sequence input by the attention matrix, represents the token sequence after the position encoding is introduced, and Z' represents the sequence after the sequence Z is reordered. Represents a sequence of position information, is element-wise multiplication, θ i =10000 -2i / d ; After obtaining the self-attention of only the tokens in the window, let it be GLAU, and then do the following calculation: X l =GLAU(X l-1 ); X l+1 =GSLAU(X l ); Among them, GLAU means that only the self-attention of the token in the window is calculated, and GSLAU means that all windows are first slid to the right by 1 / 2 window size, and then GLAU is used to calculate the window attention. After sliding with GSLAU, two windows of 1 / 2 window size will appear at the beginning and end of the token sequence. They need to be spliced ​​into a complete window, and then the information of irrelevant windows is filtered out when calculating the window attention by adding a mask matrix. The details are as follows: ; in, It represents the attention matrix calculated by two 1 / 2 windows. is the query sequence of the k-1th and 0th windows, is the Key sequence of the k-1th and 0th windows, is the Mask matrix, w is the window size, and 0 represents an all-zero matrix of size w / 2.

5. The method for generating an AIS emitter identification model according to claim 1, wherein: In S103, the Adam algorithm is used to optimize the AIS emitter identification network based on the gating mechanism and sliding window attention. The Adam algorithm is specifically as follows: ; ; ; Among them, J is the loss function, is the derivative symbol, g and G represent the current gradient, θ is the parameter to be optimized, η is the learning rate, m is the momentum, β and γ are hyperparameters with a default value of 0.0001, ⊙ is the Hadamard product, and ε is a decimal that approaches 0 infinitely to prevent division by zero errors.

6. The method for generating an AIS emitter identification model according to claim 1, wherein: In S103, the loss function used to train the AIS emitter identification network based on the gating mechanism and sliding window attention is: ; Among them, q(x) and p(x) are two different distributions.

7. A method for identifying an AIS emitter, characterized by: The method comprises the following steps: S201: Acquire AIS emitter signal data to be identified; S202: Inputting the AIS emitter signal data into an AIS emitter identification model, wherein the AIS emitter identification model is pre-trained based on the method according to any one of claims 1 to 6; S203: Outputting the recognition result of the AIS emitter recognition model.

8. An AIS emitter identification model generation device, characterized by: The device comprises: AIS signal processing module: configured to collect AIS signals, pre-process AIS signals, locate AIS signal frames, and construct a data set based on AIS transient and steady-state parts. The pre-processing includes AIS signal correlation detection, GMSK demodulation, NRZI decoding, and dividing the AIS signal into transient and steady-state parts. AIS emitter identification network construction module: configured to construct an AIS emitter identification network based on a gating mechanism and sliding window attention. The AIS emitter identification network based on a gating mechanism and sliding window attention includes a sequence encoding module, a single-head gated attention unit module, a sliding window self-attention module, and a classifier module. The algorithm used by the sequence encoding module is: S=[s1,s2,…,s M ] 1×M ; Where S represents a signal sequence consisting of M sampling points; ; Among them, P represents dividing each k sampling points into a patch; ; Here, X represents a linear transformation of each 1×k-dimensional patch into a 1×C-dimensional token sequence. is element-wise multiplication, is the parameter matrix; AIS emitter identification model generation module: configured to train an AIS emitter identification network based on a gating mechanism and sliding window attention using a dataset based on an AIS transient part and an AIS steady-state part to obtain an AIS emitter identification model.

9. An AIS radiation source identification device, characterized by: The device comprises: An acquisition module configured to acquire AIS emitter signal data that needs to be identified; an identification module configured to input the AIS emitter signal data into an AIS emitter identification model, wherein the AIS emitter identification model is pre-trained based on the method according to any one of claims 1 to 6; The output module is configured to output the recognition result of the AIS emitter recognition model.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.