A Radio Frequency Fingerprint Extraction Method and System Based on Contrastive Learning of Context Representations
Through the context-based comparison learning method, the intra-signal symbol changes and positive and negative sample settings of the signal frame are used to solve the stability problem of the existing RF fingerprint extraction method in different signal environments, and stable RF fingerprint extraction and device classification under single-frame signals are realized.
Patent Information
- Application Number
- CN202411556985.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-11-04
AI Technical Summary
The existing RF fingerprint extraction method cannot stably extract the distinguishable RF fingerprints of devices under different signal environments, and relies on statistical characteristics and multi-frame superposition, and lacks practicality and security, and does not fully utilize the channel similar characteristics of adjacent symbols within the signal frame.
Using a method of context-based characterization comparison learning, the channel changes of the symbols before and after the signal frame are extracted through the network, three positive and negative sample settings are used to force the radio frequency fingerprints related to the network learning device to calculate the improved normalized temperature scaling cross entropy loss, and the network parameters are updated using gradient descent to obtain a stable radio frequency fingerprint.
It realizes data-independent stable RF fingerprint extraction under a single frame signal, avoids dependence on a large number of fixed data, improves the practicality and security of extraction, and significantly improves the accuracy of classification tasks.
Smart Images

Figure CN119421163B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of physical layer security of wireless communications, and in particular to a radio frequency fingerprint extraction method and system. Background Art
[0002] RF fingerprints are inherent characteristics of the hardware, independent of the transmitted data or transmission channel. They arise from subtle hardware-induced signal distortions and specific signal characteristics. RF fingerprints arise from subtle physical and electrical defects introduced during the manufacturing process or due to component aging. These defects typically stem from non-ideal characteristics of power amplifiers, mixers, and filters, which introduce nonlinear errors because they do not fully conform to their design specifications. This unpredictable hardware degradation ensures that RF fingerprints are unique and virtually impossible to replicate. RF fingerprints can be extracted by analyzing and matching subtle differences in the RF signals emitted by a device. RF fingerprint recognition systems then use the extracted RF fingerprint to verify the authenticity of the device.
[0003] Existing public RF fingerprint extraction methods are limited to fixed signal symbol sequences, typically fixed preambles and synchronization signal symbols that are designed, transmitted, and collected manually. For example, preambles formed by cyclic shifts of ZC sequences vary across base station cells in practice, making existing RF fingerprint extraction methods unable to cover all acquisition environments. Even with training on diverse data, it is difficult to cover all data scenarios and ensure stable and distinguishable RF fingerprints under different signal conditions. Even data-independent methods rely on the statistical properties of multi-frame superposition, which inherently lacks interpretability. Furthermore, simple signal superposition removes some information that can be used for RF fingerprint extraction. Furthermore, existing data-independent solutions require a large amount of training data with similar channels, and in practice, require a long period of data frames to perform device authentication together, resulting in limited practicality and security. Furthermore, existing RF fingerprint extraction solutions do not fully exploit the channel similarity of adjacent symbols within a signal frame, and lack RF fingerprint extraction methods that incorporate data frame context to eliminate interference such as channel interference.
[0004] Therefore, it is urgent to develop a model that can extract stable and device-distinguishing RF fingerprints from random single-frame signal data. Summary of the Invention
[0005] Objective of the Invention: To address the deficiencies of existing radio frequency fingerprinting solutions, the present invention provides a radio frequency fingerprint extraction method and system based on contrastive learning of context representations. By making full use of the excitation condition that the channel changes less between adjacent symbols in the same signal frame, the network extracts context representations and uses three settings of positive and negative samples to force the network to learn radio frequency fingerprints that are only relevant to device classification. This enables the network to focus on decoupling data from radio frequency fingerprints, thereby solving the problem that existing radio frequency fingerprints fail to achieve stable data-independent radio frequency fingerprint extraction for a single frame and providing a fast, effective, practical, and stable radio frequency fingerprint extraction solution.
[0006] Technical Solution: To achieve the above objective, the present invention adopts the following technical solutions:
[0007] A radio frequency fingerprint extraction method based on contrastive learning of context representations, comprising the following steps:
[0008] (1) Receive a wireless signal frame and preprocess it;
[0009] (2) Segment the preprocessed wireless signal frame by symbol, perform short-time Fourier transform and logarithmic discrete cosine transform on each symbol, and splice the results by symbol to obtain a preliminary transformed domain representation of the wireless signal frame, which together with its corresponding device number forms a training data set;
[0010] (3) Pass the preliminary transformed domain representation of the wireless signal frame through a context representation network to obtain a radio frequency fingerprint representation of the signal frame;
[0011] (4) Extract symbols from the positive and negative sample pairs and calculate their normalized probabilities. The settings of the positive and negative sample pairs are divided into three categories according to the device and the symbol data content, including: adjacent symbols of all wireless signal frames with context information, symbols with different content data of wireless signal frames of the same device, and symbols with the same content data of wireless signal frames of different devices;
[0012] (5) Use the normalized probabilities of the positive and negative samples to calculate an improved normalized temperature-scaled cross-entropy loss and perform learning on the context representation network. Iteratively update the parameters of the context representation network using the gradient descent algorithm to obtain stable radio frequency fingerprints that can be distinguished between devices.
[0013] Further, step (2) includes:
[0014] (2.1) Divide the preprocessed wireless signal frame into windows by symbol and perform short-time Fourier transform on the q-th symbol:
[0015]
[0016] where, is the i-th wireless signal frame after preprocessing, t is the index of the data point in the current symbol, T is the total length of each symbol, w[t-λ] is the Hamming window of length T, λ is the window index, and ξ is the frequency index;
[0017] (2.2) For the short-time Fourier transform result S i,q Perform logarithmic discrete cosine transform to obtain the transform domain signal of each symbol in the wireless signal frame:
[0018]
[0019] (2.3) The preliminary transform domain representation of each symbol in the wireless signal frame is x i,q Splice to x i , and its corresponding device number y i Constructing the training data set Where P is the total number of wireless signal frames after preprocessing, y i is the pre-processed wireless signal frame Corresponding device number.
[0020] Furthermore, in step (3), the preliminary transform domain representation of the wireless signal frame is x i Each data point in the network passes through a fully connected network to increase the number of channels, and then passes through a convolutional neural network to obtain the output radio frequency fingerprint representation z i .
[0021] Furthermore, step (4) includes:
[0022] (4.1) The preliminary transform domain representation x of each wireless signal frame in step (3) i The corresponding radio frequency fingerprint is represented by z i , z i Consists of n symbols of length l, for each of the jth symbols, the data point z with index m in the entire data frame i,m , the data point z corresponding to the adjacent symbol i,m+l is regarded as a positive sample pair, and different positions in adjacent symbols are marked as negative sample pairs. The normalized probability of the positive sample is calculated according to the following formula:
[0023]
[0024] Where k is the data point z in the adjacent symbol i,m+l+k Relative to data point z i,m+l The index offset of s pos (i,m) is the similarity of positive samples, s neg (i, m, k) is the negative sample similarity, which is the normalized cosine similarity, specifically:
[0025]
[0026] where, -((m - l(j - 1)) % l) ≤ k ≤ l - 1 - ((m - l(j - 1)) % l), k ≠ 0; || || represents the Euclidean norm;
[0027] (4.2) Extract the radio frequency fingerprint representation z where the symbol data changes between different frames from the same device i and z j , regarded as a positive sample pair; the remaining radio frequency fingerprint representations with the same symbol data from the same device are regarded as corresponding negative sample pairs; use the normalized cosine similarity Calculate the normalized probability of the data point with index m in the data frame for the sample pair:
[0028]
[0029] where, O is the number of all extracted sample pairs, and o is the index of each sample pair;
[0030] (4.3) Extract the radio frequency fingerprint representations z with the same symbol data content but from different devices i and z j , regarded as negative samples; use the normalized cosine similarity Calculate the normalized probability of the negative sample pair, where m is the index of each data point in z i and z j :
[0031]
[0032] where, O′ is the number of all extracted sample pairs, and o′ is the index of each sample pair.
[0033] Furthermore, step (5) includes:
[0034] (5.1) Calculate the improved normalized temperature-scaled cross-entropy loss of positive and negative samples between symbols within the corresponding frame in step (4.1) as follows:
[0035]
[0036] where, B is the number of samples in the taken dataset;
[0037] (5.2) Calculate the corresponding cross-entropy loss of the positive samples with the same device but changing symbol data in step (4.2) as follows, where, 1(y i = y j ) is an indicator function, which has a value of 1 when y i and y j are from the same device, and 0 otherwise:
[0038]
[0039] (5.3) Calculate the corresponding cross - entropy loss of negative samples with the same symbol data but different devices in step (4.3) as follows:
[0040]
[0041] (5.4) Calculate the overall loss function according to the losses in steps (5.1), (5.2), and (5.3):
[0042]
[0043] where α, β, and γ are hyperparameters;
[0044] (5.5) According to the loss function in step (5.4), use the gradient descent method to iteratively update the context representation network F in step (3):
[0045]
[0046] where η is the learning rate, is the gradient of the loss function with respect to the parameter weights of the context representation network F.
[0047] Furthermore, repeatedly execute steps (3), (4), and (5) until the performance of the context representation network F converges on the validation set to obtain the final context representation network F * , and its extracted RF fingerprint is expressed as:
[0048] z = F * (x) (13)
[0049] where z is the RF fingerprint corresponding to the preliminary transformed - domain representation x of the wireless signal frame s.
[0050] An RF fingerprint extraction system based on context - representation contrast learning includes:
[0051] A signal acquisition and pre - processing module, which is used to receive a wireless signal frame and perform pre - processing;
[0052] A signal transformation module, which is used to segment the pre - processed wireless signal frame by symbol, perform short - time Fourier transform and logarithmic discrete cosine transform on a per - symbol basis, splice by symbol to obtain a preliminary transformed - domain representation of the wireless signal frame, and form a training data set with its corresponding device number;
[0053] A context representation network module, which is used to obtain the RF fingerprint representation of the signal frame through the context representation network for the preliminary transformed - domain representation of the wireless signal frame;
[0054] A network training module is used to extract symbols from positive and negative sample pairs and calculate their normalized probabilities. The settings of positive and negative sample pairs are divided into three categories according to devices and symbol data content, including: adjacent symbols of all wireless signal frames with context information, symbols with different wireless signal frame content data of the same device, and symbols with the same wireless signal frame data content of different devices; using the normalized probabilities of positive and negative samples, calculate the improved normalized temperature-scaled cross-entropy loss and perform learning of the context representation network, and use the gradient descent algorithm to iteratively update the parameters of the context representation network to obtain a stable radio frequency fingerprint that can be distinguished between devices.
[0055] A computer system includes a memory, a processor, and a computer program / instructions stored on the memory and executable on the processor. When the computer program / instructions are executed by the processor, the steps of the radio frequency fingerprint extraction method based on context representation contrast learning are implemented.
[0056] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the radio frequency fingerprint extraction method based on context representation contrast learning are implemented.
[0057] A computer program product includes computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the radio frequency fingerprint extraction method based on context representation contrast learning are implemented.
[0058] Advantageous effects: Compared with the prior art, the present invention has the following advantages:
[0059] 1. A context-based representation network provided by the present invention can perform data-independent radio frequency fingerprint extraction using a single-frame signal, without requiring the use of fixed and unchanging data lacking practical significance for data collection and radio frequency fingerprint extraction, nor the use of difficult-to-verify statistical features of multi-frame superposition.
[0060] 2. The present invention calculates three loss functions based on the improved normalized temperature-scaled cross-entropy and fuses them with different weights to obtain the total loss to guide the network to learn effective signal representations. Using the front and back symbols of the same frame signal as positive samples to guide the network to remove channel interference, using data frames with different symbols of the same device as positive samples, and using data frames with the same symbols of different devices as negative samples to guide the network to learn a stable transform domain representation directly related to the device itself. Description of the Drawings
[0061] Figure 1 It is a schematic flowchart of the radio frequency fingerprint extraction method based on context representation contrast in an embodiment of the present invention;
[0062] Figure 2This is the result graph after average pooling of the RF fingerprints extracted from 3 devices under test in the test set in the LTE-V2X embodiment scenario of the present invention. The abscissa is the dimension of the RF fingerprint, and the ordinate is the value on each dimension. (a) is the result graph of the RF fingerprint extracted by the device under test 1, (b) is the result graph of the RF fingerprint extracted by the device under test 2, and (c) is the result graph of the RF fingerprint extracted by the device under test 3. Detailed implementation manners
[0063] To make the problems, technical solutions, and beneficial effects to be solved by the present invention clearer, a complete description of an embodiment is given below. The present invention can be implemented in different forms and is not limited to the embodiments described below.
[0064] As Figure 1 shown, an RF fingerprint extraction method based on contrastive learning of context representation in an embodiment of the present invention includes the following steps:
[0065] (1) A receiver receives and preprocesses a wireless signal.
[0066] Specifically, in this embodiment, step (1) includes:
[0067] (1.1) Collect wireless signals. Specifically, in this embodiment, 12 LTE-V2X communication protocol terminal development boards are deployed as RF signal transmitters, and the physical direct link broadcast channel synchronization subframe is received as the received signal. Each device operates at a carrier frequency of 5.9 GHz, the total available bandwidth is 20 MHz, the subcarrier spacing is 15 KHz, and an effective baseband bandwidth of 1.08 MHz is generated. The receivers used are equipped with power amplifiers. These receivers collect signals at a sampling rate of 30.72 Msps, and the fast Fourier transform (FFT) size is 2048. 1000 frames of data are collected for each type of device.
[0068] (1.2) Perform data preprocessing, which includes: down-conversion, synchronization, frequency offset and phase offset estimation and compensation, and normalization. The normalization adopts: where s is the wireless signal frame, and a ∈ [1, A], and A is the total number of sampling points.
[0069] (2) Segment the preprocessed wireless signal frame by symbols, perform short-time Fourier transform and further logarithmic discrete cosine transform on the symbols, and splice by symbols to obtain a preliminary transformed domain representation of the wireless signal frame. For the i-th wireless signal frame obtain its preliminary transformed domain representation x i , and combine it with the device number as a sample to form a training set.
[0070] Specifically, in this embodiment, step (2) includes:
[0071] (2.1) Window the preprocessed wireless signal frames by symbol and perform short-time Fourier transform on the q-th symbol:
[0072]
[0073] Where, is the i-th wireless signal frame after preprocessing, t is the index of the data point in the current symbol, T is the total length of each symbol, w[t - λ] is the Hamming window of length T, λ is the window index, and ξ is the frequency point index;
[0074] Specifically, in this embodiment, 6 data symbols of the physical direct link broadcast channel synchronization subframe are used, and the symbol length T is 2048.
[0075] (2.2) Perform logarithmic discrete cosine transform on the short-time Fourier transform result S i,q to obtain the transform domain signal of each symbol in the wireless signal frame:
[0076]
[0077] (2.3) Concatenate the preliminary transform domain representations x i,q of each symbol in the wireless signal frame into x i , and form a training dataset with its corresponding device number y i Where P is the total number of preprocessed wireless signal frames, and y i is the preprocessed wireless signal frame corresponding device number.
[0078] Specifically, in this embodiment, the length of x i is 72×6 = 432, there are 12 values for y i in the dataset, which are 0 - 11, and P is 12×1000 = 12000.
[0079] (3) Obtain the RF fingerprint representation z of the signal frame by passing the preliminary transform domain representation x of the wireless signal frame through the context characterization network F(x).
[0080] Specifically, in this embodiment, the context characterization network F is a convolutional neural network structure, and this step (3) includes:
[0081] (3.1) Take out B samples from the dataset Pass each data point of x i of each sample independently through the fully connected network FC(channel_o), which is used to convert the number of channels of each data point in the preliminary transform domain representation x i of the wireless signal frame to channel_o.
[0082] Specifically, in this embodiment, B is set to 256; channel_o is set to 128.
[0083] (3.2) For the preliminary transform domain representation x of 256 wireless signal frames i After the results of step (3.1), the convolutional neural network is connected and the output RF fingerprint representation z is obtained. i .
[0084] Specifically, in this embodiment, the convolutional neural network is a dilated convolutional network, which includes 5 convolutional layers:
[0085] The first convolutional layer is Conv1D(128, 3×3, 1), with a dilation rate of 1, followed by batch normalization (BN), activation function ReLU, and dropout with a drop probability of 0.3;
[0086] The second convolutional layer is Conv1D(128, 3×3, 1), with a dilation rate of 3, followed by batch normalization (BN), activation function ReLU, and dropout with a drop probability of 0.3;
[0087] The third convolutional layer is Conv1D(128, 3×3, 1), with a dilation rate of 5, followed by batch normalization (BN), activation function ReLU, and dropout with a drop probability of 0.3;
[0088] The fourth convolutional layer is Conv1D(128, 3×3, 1), with a dilation rate of 7, followed by batch normalization (BN), activation function ReLU, and dropout with a drop probability of 0.3;
[0089] The fifth convolutional layer is Conv1D(128, 3×3, 1), with a dilation rate of 9, followed by batch normalization (BN), activation function ReLU, and dropout with a drop probability of 0.3;
[0090] Output feature vector Specifically, in this embodiment, L is set to 432.
[0091] (4) According to the positive and negative samples, the symbols are extracted and their normalized probabilities are calculated. The settings of positive and negative samples are divided into three categories according to the device and the symbol data content, including: adjacent symbols of all wireless signal frames with context information (positive samples), symbols with different content data of wireless signal frames of the same device (positive samples), and symbols with the same data content of wireless signal frames of different devices (negative samples).
[0092] Specifically, in this embodiment, step (4) includes:
[0093] (4.1) The preliminary transform domain representation x of each frame of wireless signal frame in step (3) i The corresponding radio frequency fingerprint representation z i , z i consists of 6 symbols with a length of 72. For each data point z with index m in the entire data frame in the j-th symbol i,m , the data point z at the corresponding position in the adjacent symbol i,m+72 is regarded as a positive sample pair, and different positions in the adjacent symbols are marked as negative sample pairs. The normalized probability of the positive sample is calculated according to the following formula:
[0094]
[0095] In formula (3), k is the index offset of the data point z in the adjacent symbol i,m+72+ relative to the data point z i,m+72 , s pos (i, m) is the positive sample similarity, and s neg (i, m, k) is the negative sample similarity, both of which are normalized cosine similarities, specifically:
[0096]
[0097] where, -((m - 72(j - 1)) % l) ≤ k ≤ 72 - 1 - ((m - 72(j - 1)) % l), k ≠ 0; || || represents the Euclidean norm.
[0098] (4.2) For the radio frequency fingerprint representation of 256 samples in step (3), extract the radio frequency fingerprint representations z i and z j from the same device but with symbol data changing between different frames, and regard them as positive sample pairs; the remaining radio frequency fingerprint representations from the same device but with the same symbol data are regarded as corresponding negative sample pairs; use the normalized cosine similarity to calculate the normalized probability of the data point with index m in the sample pair in the data frame:
[0099]
[0100] where, O is the number of all extracted sample pairs, and o is the index of each sample pair.
[0101] (4.3) For the radio frequency fingerprint representation of 256 samples in step (3), extract the radio frequency fingerprint representations z i and z j with the same symbol data content but from different devices, and regard them as negative samples; use the normalized cosine similarity to calculate the normalized probability of the negative sample pair, where m is for z i and z jThe index of each data point in:
[0102]
[0103] Where O′ is the number of all sample pairs extracted, and o′ is the index of each sample pair.
[0104] (5) Using the normalized probabilities of the positive and negative samples mentioned above, the improved normalized temperature-scaled cross entropy loss is calculated and the context representation network is learned. The parameters of the context representation network are iteratively updated using the gradient descent algorithm to obtain a stable RF fingerprint that can be distinguished between devices.
[0105] Specifically, in this embodiment, step (5) includes:
[0106] (5.1) For each frame of 256 samples of the wireless signal frame in step (3), the initial transform domain representation x i The corresponding radio frequency fingerprint is represented by z i , calculate the improved normalized temperature scaled cross entropy loss of positive and negative samples between symbols in the corresponding frame in step (4.1), as follows:
[0107]
[0108] (5.2) For the representation of the RF fingerprint of 256 samples in step (3), the corresponding cross entropy loss of the positive samples of the same device but with changed symbol data in step (4.2) is calculated as follows, where 1(y i =y j ) is an indicator function, when y i and y j If they are the same device, the value is 1, otherwise it is 0:
[0109]
[0110] (5.3) For the representation of the RF fingerprint of the 256 samples in step (3), the corresponding cross entropy loss of the negative samples of different devices but the same symbol data in step (4.3) is calculated as follows, where O′ represents the number of negative sample sets between different devices in the 256 samples:
[0111]
[0112] (5.4) Calculate the overall loss function based on the losses in steps (5.1), (5.2), and (5.3):
[0113]
[0114] In formula (11), α, β, and γ are hyperparameters.
[0115] Specifically, in this embodiment, α is set to 1, β is set to 0.9, and γ is set to 0.7.
[0116] (5.5) According to the loss function in step (5.4), use the gradient descent method to iteratively update the context representation network F in step (3):
[0117]
[0118] In formula (12), η is the learning rate, is the gradient of the loss function with respect to the parameter weights of the context representation network F.
[0119] Specifically, in this embodiment, the Adam optimizer with the learning rate η set to 0.001 is used.
[0120] (6) Repeat steps (3), (4), and (5) until the performance of F converges on the validation set to obtain the final context representation network F * , and the extracted RF fingerprint is expressed as:
[0121] z = F * (x) (13)
[0122] In formula (13), z is the RF fingerprint corresponding to the wireless signal frame s.
[0123] Specifically, after the above steps, the total number of data sets obtained is 12,000, and the training set, validation set, and test set are divided according to the ratio of 7:1:2.
[0124] To prove the effectiveness of the extracted RF fingerprint z, the present invention uses a fully connected network as a classifier for testing.
[0125] Specifically, the structure of the fully connected network used as the classifier is as follows:
[0126] The first layer: average pooling, AvgPooling(), output dimension: 128*1;
[0127] The second layer: FC(128, 128), followed by batch normalization (BN), and the activation function ReLU;
[0128] The third layer: FC(128, 64), followed by batch normalization (BN), and the activation function ReLU;
[0129] The fourth layer: FC(64, 12), followed by Softmax to obtain the classification vector;
[0130] Specifically, Figure 2The results are at the position after the first layer here, and the radio frequency fingerprint characterization results corresponding to the radio frequency fingerprints z extracted from 3 devices to be tested in the test set after average pooling are given.
[0131] Specifically, in this embodiment, for the finally obtained classification vector, the position of the vector component corresponding to the maximum value is the classification category of the device.
[0132] Through the method of the present invention, the extraction quality of radio frequency fingerprints in a single frame can be effectively improved. As shown in Table 1, compared with using the directly transformed in-band signal data in step (2) as the radio frequency fingerprint, the accuracy of the classification task using the radio frequency fingerprints obtained by context representation learning in the present invention is significantly improved.
[0133] Table 1. Comparison table of classification effects
[0134]
[0135]
[0136] In summary, the embodiment of the present invention provides a context-based representation network, which can perform data-independent radio frequency fingerprint extraction using single-frame signals, and jointly uses three loss functions with different fusion weights. Among them, the front and back symbols of the same frame signal are used as positive samples to guide the network to remove channel interference, the data frames with different symbols of the same device are used as positive samples, and the data frames with the same symbols of different devices are used as negative samples to provide strong regularization, guiding the network to get rid of the interference caused by data changes and learn a stable transformed domain representation directly related to the device itself.
[0137] Based on the same inventive concept, the embodiment of the present invention discloses a radio frequency fingerprint extraction system based on context representation contrast learning, including:
[0138] A signal acquisition and preprocessing module, configured to receive a wireless signal frame and perform preprocessing;
[0139] A signal transformation module, configured to split the preprocessed wireless signal frame by symbol, perform short-time Fourier transform and logarithmic discrete cosine transform on a symbol-by-symbol basis, splice the symbol-by-symbol basis to obtain a preliminary transformed domain representation of the wireless signal frame, and form a training data set with its corresponding device number;
[0140] A context representation network module, configured to obtain a radio frequency fingerprint representation of the signal frame by passing the preliminary transformed domain representation of the wireless signal frame through the context representation network;
[0141] A network training module is used to extract symbols from positive and negative sample pairs and calculate their normalized probabilities. The settings of positive and negative sample pairs are divided into three categories according to devices and symbol data content, including: adjacent symbols of all wireless signal frames with context information, symbols with different wireless signal frame content data of the same device, and symbols with the same wireless signal frame data content of different devices; using the normalized probabilities of positive and negative samples, calculate the improved normalized temperature-scaled cross-entropy loss and perform learning on the context representation network, and use the gradient descent algorithm to iteratively update the parameters of the context representation network to obtain a stable radio frequency fingerprint that can be distinguished between devices.
[0142] An embodiment of the present invention also discloses a computer system, including a memory, a processor, and a computer program / instructions stored on the memory and executable on the processor. When the computer program / instructions are executed by the processor, the steps of the radio frequency fingerprint extraction method based on context representation contrast learning are implemented.
[0143] An embodiment of the present invention also discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by the processor, the steps of the radio frequency fingerprint extraction method based on context representation contrast learning are implemented.
[0144] An embodiment of the present invention also discloses a computer program product, including computer program / instructions. When the computer program / instructions are executed by the processor, the steps of the radio frequency fingerprint extraction method based on context representation contrast learning are implemented.
[0145] For the sake of concisely explaining the technical implementation of the present invention, some details are not introduced in detail, and they are all technologies well-known to researchers in this field.
[0146] The above detailed description is only a preferred embodiment of the present invention. Therefore, it should be understood that the scope of the rights of the present invention cannot be limited by this. Any technical solution obtained through simple analysis and reasoning and without departing from the spirit of the present invention through equivalent replacement or modification should be within the protection scope determined by the claims of the present invention.
Claims
1. A radio frequency fingerprint extraction method based on contrastive learning of context representations, characterized in that, It includes the following steps: (1) Receive a wireless signal frame and perform preprocessing; (2) Segment the preprocessed wireless signal frame by symbol, perform short-time Fourier transform and logarithmic discrete cosine transform on a per-symbol basis, and splice by symbol to obtain a preliminary transformed domain representation of the wireless signal frame, which together with its corresponding device number constitutes a training data set; including: (2.1) Divide the preprocessed wireless signal frame into windows by symbol, and perform short-time Fourier transform on the q-th symbol: Among them, is the i-th wireless signal frame after preprocessing, t is the index of the data point in the current symbol, T is the total length of each symbol, w[t - λ] is the Hamming window of length T, λ is the window index, and ξ is the frequency point index; (2.2) Perform logarithmic discrete cosine transform on the short-time Fourier transform result S i,q to obtain the transform-domain signal of each symbol in the wireless signal frame: (2.3) Concatenate the preliminary transform domain representation x of each symbol in the wireless signal frame i,q to form x i , and combine it with its corresponding device number y i to form a training data set where P is the total number of preprocessed wireless signal frames, and y i is the preprocessed wireless signal frame corresponding device number; (3) Obtain the radio frequency fingerprint representation of the signal frame by passing the preliminary transformed domain representation of the wireless signal frame through a context characterization network; (4) Extract symbols therefrom according to positive and negative sample pairs and calculate their normalized probabilities. The settings of positive and negative sample pairs are divided into three categories according to devices and symbol data content, including: adjacent symbols of all wireless signal frames with context information, symbols with different content data of wireless signal frames of the same device, and symbols with the same content data of wireless signal frames of different devices; (5) Use the normalized probabilities of positive and negative samples to calculate the improved normalized temperature-scaled cross-entropy loss and perform learning on the context characterization network, and use the gradient descent algorithm to iteratively update the parameters of the context characterization network to obtain a stable radio frequency fingerprint distinguishable between devices.
2. The radio frequency fingerprint extraction method based on contrastive learning of context representations according to claim 1, wherein, In step (3), each data point in the preliminary transform domain representation x of the wireless signal frame is successively passed through a fully connected network to increase the number of channels, and then successively passed through a convolutional neural network to obtain the output radio frequency fingerprint representation z i i . 3. The radio frequency fingerprint extraction method based on contrastive learning of context representation according to claim 1, wherein Step (4) includes: (4.1) The preliminary transform domain representation x of each wireless signal frame in step (3) i The corresponding radio frequency fingerprint representation z i , z i is composed of n symbols of length l. For each data point z at index m in the entire data frame in the j-th symbol i,m , the data point z at the corresponding position in the adjacent symbol i,m+l is regarded as a positive sample pair, and different positions in adjacent symbols are marked as negative sample pairs. The normalized probability of positive samples is calculated according to the following formula: where k is the data point z in adjacent symbols i,m+l+k The index offset relative to the data point z i,m+l is s pos (i, m) is the positive sample similarity, s neg (i, m, k) is the negative sample similarity, both are normalized cosine similarities, specifically: where, -((m - l(j - 1)) % l) ≤ k ≤ l - 1 - ((m - l(j - 1)) % l), k ≠ 0; |||| represents the Euclidean norm; (4.2) Extract radio frequency fingerprint representations z from the same device but with symbol data varying between different frames i and z j , regarded as positive sample pairs; the remaining radio frequency fingerprint representations from the same device but with the same symbol data are represented as corresponding negative sample pairs; use normalized cosine similarity to calculate the normalized probability of the data points with index m in the data frame for the sample pairs: where, O is the number of all sample pairs extracted, and o is the index of each sample pair; (4.3) Extract radio frequency fingerprints that have the same symbolic data content but come from different devices, denoted as z i and z j , and regard them as negative samples; use normalized cosine similarity to calculate the normalized probability of negative sample pairs, where m is the index of the data points in z i and z j : where, O′ is the number of all sample pairs extracted, and o′ is the index of each sample pair.
4. The radio frequency fingerprint extraction method based on contrastive learning of context representations according to claim 3, wherein: Step (5) includes: (5.1) Calculate the improved normalized temperature-scaled cross-entropy loss between positive and negative samples of symbols within the corresponding frame in step (4.1) as follows: where, B is the number of samples in the taken data set; (5.2) The corresponding cross-entropy loss of the positive samples with the same device but different symbolic data in calculation step (4.2) is as follows, where 1(y i =y j ) is an indicator function that has a value of 1 when y i and y j are the same device, and 0 otherwise: (5.3) Calculate the corresponding cross-entropy loss of negative samples with the same symbol data but different devices in step (4.3) as follows: (5.4) Calculate the overall loss function according to the losses in steps (5.1), (5.2), and (5.3): where, α, β, γ are hyperparameters; (5.5) According to the loss function in step (5.4), use the gradient descent method to iteratively update the context characterization network F in step (3): where η is the learning rate, is the gradient of the loss function with respect to the parameter weights of the context representation network F.
5. The radio frequency fingerprint extraction method based on contrastive learning of context representation according to claim 1, wherein: Repeat steps (3), (4), and (5) until the performance of the context representation network F converges on the validation set to obtain the final context representation network F * , and its extracted RF fingerprint is represented as: z = F * (x) (13) where, z is the radio frequency fingerprint corresponding to the preliminary transformed domain representation x of the wireless signal frame s.
6. A radio frequency fingerprint extraction system based on contrastive learning of context representation, characterized in that, It includes: A signal acquisition and preprocessing module, used to receive a wireless signal frame and perform preprocessing; A signal transformation module, used to segment the preprocessed wireless signal frame by symbol, perform short-time Fourier transform and logarithmic discrete cosine transform on a per-symbol basis, and splice by symbol to obtain a preliminary transformed domain representation of the wireless signal frame, which together with its corresponding device number constitutes a training data set; It includes: Divide the preprocessed wireless signal frame into windows by symbol, and perform short-time Fourier transform on the q-th symbol: Among them, is the i-th wireless signal frame after preprocessing, t is the index of the data point in the current symbol, T is the total length of each symbol, w[t - λ] is the Hamming window of length T, λ is the window index, and ξ is the frequency point index; Perform a logarithmic discrete cosine transform on the short-time Fourier transform result S i,q to obtain the transform-domain signal of each symbol in the wireless signal frame: The preliminary transform domain representation x of each symbol in the wireless signal frame i,q is concatenated into x i , and its corresponding device number y i constitutes a training data set where P is the total number of preprocessed wireless signal frames, and y i is the preprocessed wireless signal frame corresponding device number; A context characterization network module, used to obtain the radio frequency fingerprint representation of the signal frame by passing the preliminary transformed domain representation of the wireless signal frame through a context characterization network; A network training module is used to extract symbols from positive and negative sample pairs and calculate their normalized probabilities. The setting of positive and negative sample pairs is divided into three categories according to devices and symbol data content, including: adjacent symbols of all wireless signal frames with context information, symbols with different wireless signal frame content data of the same device, and symbols with the same wireless signal frame data content of different devices; using the normalized probabilities of positive and negative samples, calculate the improved normalized temperature-scaled cross-entropy loss and perform learning on the context representation network, and use the gradient descent algorithm to iteratively update the parameters of the context representation network to obtain a stable radio frequency fingerprint that can be distinguished between devices.
7. A computer system, comprising a memory, a processor, and a computer program / instructions stored on the memory and executable on the processor, characterized in that, When the computer program / instructions are executed by a processor, the steps of the radio frequency fingerprint extraction method based on context representation contrast learning according to any one of claims 1-5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the steps of the radio frequency fingerprint extraction method based on context representation contrast learning according to any one of claims 1-5 are implemented.
9. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by a processor, the steps of the radio frequency fingerprint extraction method based on context representation contrast learning according to any one of claims 1-5 are implemented.
Citation Information
Patent Citations
Radio frequency fingerprint decoupling method and device based on channel incoherent time interval
CN117792853A
Radio frequency fingerprint authentication and identification method based on multi-domain feature fusion and deep learning
CN118354322A