An electromagnetic signal multi-task oversampling classification method and system based on shared weight features
Patent Information
- Application Number
- CN202611008751.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-09-25
AI Technical Summary
类别高度倾斜时,神经网络学习的隐层嵌入空间易出现 “多数类包围少数类” 现象,传统 K 近邻插值易在异质标签样本间生成样本,加剧类别边界混淆,引入语义噪声
[0018]与现有技术相比,本发明的有益效果为:本发明有效规避了原始信号空间过采样易产生伪影、传统单任务过采样无法适配多任务耦合约束、多标签过采样易引发任务冲突等问题,大幅提升低信噪比、极端样本不平衡场景下电磁信号调制分类与信号类别分类的综合识别精度,可广泛应用于雷达探测、无线通信、电子对抗、频谱监测等场景。
Smart Images

Figure CN122818072A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electromagnetic signal processing and deep learning technology, specifically relating to a multi-task oversampling classification method and system for electromagnetic signals based on shared weight features. Background Technology
[0002] With the development of modern electronic information technology, electromagnetic signals are widely used in radar, wireless communication, electronic countermeasures, and other fields. Electromagnetic signal multi-task classification is a core foundational technology for spectrum monitoring, signal interference suppression, and signal source identification. Electromagnetic signal multi-task classification mainly includes two core sub-tasks: one is modulation signal classification, used to identify the signal modulation mode; the other is signal category classification, used to distinguish the signal function types such as radar and communication signals. The two tasks are strongly physically coupled.
[0003] Current electromagnetic signal multi-task classification techniques are mainly divided into two categories: traditional machine learning methods and deep learning methods. Traditional methods rely on manual extraction of statistical features such as high-order cumulants and cyclic spectra, combined with decision trees and support vector machines to complete classification. These methods suffer from drawbacks such as low signal-to-noise ratio performance, reliance on expert knowledge for feature engineering, and weak generalization ability. End-to-end recognition methods based on deep learning have become mainstream, automatically extracting time-frequency features through convolutional neural networks and residual networks, significantly improving recognition accuracy. However, they still face several core technical bottlenecks in engineering implementation and practical deployment. On-site data acquisition is challenging, and the raw signals suffer from severe noise interference. The electromagnetic environment at the engineering site is complex, with multiple path fading, Doppler shift, additive white Gaussian noise, carrier frequency offset, and other interferences superimposed, resulting in low signal-to-noise ratio and severe waveform distortion in the directly acquired raw IQ signals. At the same time, the signal acquisition parameters for different frequency bands and different scenarios are not uniform, and there is a lack of standardized preprocessing procedures, which makes it impossible to directly use the raw data for model training.
[0004] The scarcity of labeled samples and sample skewness are prominent issues. Due to the difficulty of electromagnetic signal acquisition, the confidentiality of signal sources, and the complexity of channel environments, the cost of acquiring labeled samples is extremely high. Data sets generally suffer from severe class imbalance, insufficient feature learning for minority class samples, and model bias towards the majority class, which directly leads to a significant drop in the accuracy of rare signal identification.
[0005] Oversampling of the original signal space can easily violate electromagnetic physical constraints. Traditional oversampling methods such as SMOTE and MLSMOTE directly interpolate to generate samples in the original high-dimensional IQ signal space, which can easily disrupt physical laws such as the phase continuity of electromagnetic signals and the conservation of spectral energy, producing artifacts and distribution shift noise. This not only fails to improve model performance but also reduces generalization ability.
[0006] The diverse feature distributions across multiple tasks make traditional oversampling poorly adaptable. Modulation classification and signal category classification focus on different features, resulting in a diversified distribution of samples in the original feature space. Single-task oversampling cannot meet the needs of dual tasks, and general multi-label oversampling easily breaks the label coupling relationship between tasks, generating invalid samples that violate electromagnetic principles (such as associating radar-specific FMCW modulation with communication signals).
[0007] The hidden space of the minority class is prone to structural distortion. When the class is highly skewed, the hidden embedding space learned by the neural network is prone to the phenomenon of "majority class surrounding minority class". Traditional K-nearest neighbor interpolation is prone to generating samples among heterogeneous labeled samples, which aggravates class boundary confusion and introduces semantic noise.
[0008] Multi-task training is prone to overfitting, and fine-tuning strategies are often inappropriate. Most multi-task network training does not distinguish between shared features and task-specific features, and the fine-tuning process can easily destroy the general representation across tasks; at the same time, no loss function is designed for imbalanced samples, which further amplifies the recognition bias caused by class skew.
[0009] In existing technologies, various improved SMOTE algorithms, variational autoencoders, generative adversarial networks, and other data augmentation methods do not integrate with on-site engineering data acquisition and standardized preprocessing processes. Furthermore, they fail to simultaneously address the four major challenges: multi-task coupling constraints, electromagnetic physical rules, extreme sample imbalance, and low signal-to-noise ratio robustness. Therefore, there is an urgent need to design a multi-task oversampling classification method for electromagnetic signals that integrates data acquisition, preprocessing, sample augmentation, model training, and on-site deployment, and is suitable for engineering implementation. Summary of the Invention
[0010] To address the above problems, the present invention provides the following solution: A multi-task oversampling classification method for electromagnetic signals based on shared weight features includes: The collected raw IQ signals are standardized to construct a standardized dataset with dual labels; Based on a multi-task deep network, shared embedding features are extracted from a standardized dataset to construct a four-element dataset in the embedding space; wherein, the multi-task deep network includes a shared weight feature backbone, a modulation recognition branch, and a signal category recognition branch; For minority class samples in the embedding space four-dimensional data set, K-nearest neighbor search and multi-task label consistency adaptive interpolation are performed to generate synthetic embedding samples; A multi-task deep network and an electromagnetic domain knowledge base are used to perform bidirectional cross-validation on the synthetic embedded samples to construct an enhanced multi-task training set. Based on the enhanced multi-task training set, the parameters of the shared weight feature backbone network are frozen, and a category-weighted loss function is used to update the parameters only for the modulation recognition branch and the signal category recognition branch to obtain the fine-tuned multi-task deep network. Based on the finely tuned multi-task deep network, multi-task oversampling classification is performed on the standardized preprocessed field-acquired electromagnetic signals to obtain classification results that include modulation type and signal category.
[0011] Preferred methods for constructing standardized datasets with dual labels include: IQ quadrature baseband signals are continuously acquired according to a preset sampling duration to obtain the original time-domain IQ sequence, and on-site environmental parameters are recorded simultaneously; the on-site environmental parameters include signal-to-noise ratio, number of multipath signals, Doppler frequency shift, and signal source label; The original time-domain IQ sequence is sequentially subjected to time-domain filtering, frequency-domain denoising, and channel impairment compensation to obtain the denoised IQ sequence. The amplitude of the denoised IQ sequence is normalized to obtain a standardized IQ sequence. Based on the signal type and modulation method of synchronous recording, standardized IQ sequences are labeled with both manual and semi-automatic labels to construct a standardized dataset.
[0012] Preferably, the shared weighted feature backbone is used to encode the input standardized IQ sequence into a 256-dimensional shared embedding vector, which simultaneously encodes modulation features and signal category features; The shared weight feature backbone includes four sequentially stacked convolutional layers and a global average pooling layer.
[0013] Preferably, both the modulation recognition branch and the signal category recognition branch include two hidden fully connected layers and one output fully connected layer. A Dropout layer is added after the first fully connected layer, and a Softmax function is configured at the output.
[0014] Preferably, the method for generating synthetic embedding samples includes: Based on the embedding space quadruple dataset, the number of samples in each class in the modulation recognition task and signal type recognition task is counted, and the minority class sampling target samples are constructed. Based on the minority class target sample, perform a K-nearest neighbor search to obtain the nearest neighbor set; The consistency level is divided according to the matching status of the target sample and its neighboring samples in terms of modulation tag and signal category tag, and the interpolation amplitude coefficient is configured differently. Within the corresponding interval, the interpolation amplitude coefficients are randomly sampled, and synthetic embedded samples are generated according to the linear interpolation formula. The dual labels of the target samples are inherited, and the oversampling factor is adaptively adjusted according to the signal-to-noise ratio to expand the scale of minority class sampling target samples in batches.
[0015] Preferred methods for constructing enhanced multi-task training sets include: Construct an electromagnetic domain knowledge base, which includes an electromagnetic signal rule base and stores the binding relationship between legal modulation types and signal categories. If a synthetic embedded sample is generated with modulation task as the guide, the signal category recognition branch is called to predict the signal category probability distribution of the synthetic sample. The legality of the tag combination inherited by the synthetic sample is determined by combining the electromagnetic domain knowledge base. The comprehensive confidence score is calculated together with the legality determination result and the signal category prediction probability. If a synthetic embedded sample is generated based on a signal category task, the modulation recognition branch is called to predict the modulation type probability distribution of the synthetic sample. The legality of the tag combination inherited by the synthetic sample is determined by combining the electromagnetic domain knowledge base. The comprehensive confidence score is calculated together with the legality determination result and the modulation type prediction probability. All synthetic embedding samples are sorted in descending order based on the overall confidence score. The top 70% of high-reliability samples are retained, and the remaining low-confidence samples are removed to obtain the filtered synthetic embedding samples. The selected synthetic embedded samples are fused with the original training set samples to obtain an enhanced multi-task training set, and the dataset index is updated synchronously.
[0016] The present invention also provides an electromagnetic signal multi-task oversampling classification system based on shared weight features, for implementing the method, comprising: The dataset construction module is used to standardize the collected raw IQ signals and build a standardized dataset with dual labels. The feature extraction module is used to extract shared embedding features from a standardized dataset based on a multi-task deep network and construct a four-element dataset in the embedding space; wherein, the multi-task deep network includes a shared weight feature backbone, a modulation recognition branch, and a signal category recognition branch; The oversampling module is used to perform K-nearest neighbor search and multi-task label consistency adaptive interpolation on minority class samples in the embedding space four-element data set to generate synthetic embedding samples; The sample selection module is used to perform bidirectional cross-validation on the synthetic embedded samples using a multi-task deep network and an electromagnetic domain knowledge base to construct an enhanced multi-task training set. The network fine-tuning module is used to freeze the shared weight feature backbone network parameters based on the enhanced multi-task training set, and use a category-weighted loss function to update the parameters only for the modulation recognition branch and the signal category recognition branch to obtain the fine-tuned multi-task deep network. The classification module is used to perform multi-task oversampling classification on the standardized preprocessed electromagnetic signals acquired in the field based on the fine-tuned multi-task deep network, and obtain classification results that include modulation type and signal category.
[0017] Preferably, the dataset construction module includes: The signal acquisition unit is used to continuously acquire IQ quadrature baseband signals according to a preset sampling duration to obtain the original time-domain IQ sequence, and simultaneously record the field environmental parameters; the field environmental parameters include signal-to-noise ratio, number of multipath signals, Doppler frequency shift, and signal source label; The noise reduction unit is used to sequentially perform time-domain filtering, frequency-domain denoising, and channel impairment compensation on the original time-domain IQ sequence to obtain the noise-reduced IQ sequence. The normalization unit is used to normalize the amplitude of the denoised IQ sequence to obtain a standardized IQ sequence. The annotation unit is used to perform manual and semi-automatic dual-label annotation on standardized IQ sequences based on the signal type and modulation method of synchronous recording, and to construct a standardized dataset.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention effectively avoids the problems of artifacts easily generated by oversampling of the original signal space, the inability of traditional single-task oversampling to adapt to multi-task coupling constraints, and the easy occurrence of task conflicts caused by multi-label oversampling. It significantly improves the comprehensive recognition accuracy of electromagnetic signal modulation classification and signal category classification in low signal-to-noise ratio and extreme sample imbalance scenarios, and can be widely used in radar detection, wireless communication, electronic countermeasures, spectrum monitoring and other scenarios. Attached Figure Description
[0019] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of a method according to an embodiment of the present invention; Figure 2 This is a structural diagram of the electromagnetic signal multi-task oversampling network based on shared weight features in an embodiment of the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] Example 1 like Figure 1 , Figure 2 As shown, a multi-task oversampling classification method for electromagnetic signals based on shared weight features includes: S1: Standardize the collected raw IQ signals to construct a standardized dataset with dual labels. This step completes the acquisition of electromagnetic signals from the engineering site, noise suppression, format standardization, sample labeling, and dataset partitioning, providing a standardized data source for model training. A further implementation method for constructing the standardized dataset with dual labels includes: IQ quadrature baseband signals are continuously acquired according to a preset sampling duration to obtain the original time-domain IQ sequence, and on-site environmental parameters are recorded simultaneously. These parameters include signal-to-noise ratio (SNR), multipath propagation, Doppler shift, and signal source labels, used for subsequent sample labeling and data analysis. Specifically, a software-defined radio (SDR) acquisition terminal is used as the acquisition hardware. This terminal is configured with a uniform sampling rate of 2MHz to ensure that all signals have consistent time resolution. Acquisition parameters are configured according to the monitoring scenario: sampling rate, center frequency, bandwidth, and sampling duration. In this embodiment, each acquisition lasts 64ms, corresponding to 128K IQ sampling points, which is sufficient to capture the complete signal burst envelope. To address the differences in the distribution characteristics of radar and communication signals in the spectrum, a time-segmented polling acquisition strategy is adopted. Specifically, the system first stays in the radar band for 30 seconds, then switches to the communication band for 30 seconds, alternating between the two. During the acquisition process, the terminal simultaneously records the real-time SNR, channel multipath delay spread, Doppler shift, and other physical parameters of the current environment, providing a quantitative basis for subsequent channel impairment compensation. All acquired data is stored in the form of IQ baseband complex sequence, and metadata such as timestamp, center frequency, and sampling rate are recorded.
[0024] The original time-domain IQ sequence is sequentially subjected to time-domain filtering, frequency-domain denoising, and channel impairment compensation to obtain a denoised IQ sequence. Specifically, firstly, a sliding mean filter with a window length of 5 sampling points is used to address impulse clutter interference. This filter suppresses transient spike noise through local smoothing while preserving the main energy distribution of the signal. For Gaussian white noise, an adaptive threshold filtering technique is used in the frequency domain: the IQ sequence is transformed to the frequency domain via Fast Fourier Transform, the statistical distribution of spectral energy is calculated, a dynamic threshold is set to the mean plus 1.5 times the standard deviation, and frequencies below the threshold are set to zero before inverse transformation back to the time domain. This method effectively suppresses broadband background noise while avoiding signal distortion caused by over-filtering. Secondly, algorithmic compensation is performed for systemic impairments introduced by the channel. Carrier frequency offset is estimated using the phase difference method and phase rotation correction is performed in the time domain; multipath delay is detected using the maximum likelihood delay estimation algorithm and compensated using an equalizer; fading impairment is normalized using an automatic gain control algorithm. After the above compensation processing, the signal waveform distortion is effectively repaired, and the waveform profile approaches the ideal transmission state.
[0025] The denoised IQ sequence is then normalized to obtain a standardized IQ sequence. Specifically, firstly, the maximum absolute value of the real and imaginary parts of the IQ sequence is calculated, and the larger of the two values is used as the normalization benchmark. Each complex sample point of the IQ sequence is divided by this benchmark value, ensuring that the normalized amplitude strictly falls within the interval [-1, 1]. This normalization method preserves the relative amplitude relationship of the signal while avoiding the risk of numerical overflow.
[0026] Secondly, the standardized sample length is 128 dimensions. For short sequences with fewer than 128 sampling points, zero-padding is used to bring them to 128 dimensions; for long sequences with more than 128 sampling points, 64 points are truncated before and after the signal energy peak position to ensure that the truncated segments contain the main features of the signal. The standardized sample format is a (2, 128) tensor, where the first dimension is the I / Q dual channel and the second dimension is the time sampling points.
[0027] Based on the synchronously recorded signal type and modulation scheme, standardized IQ sequences are labeled with dual labels manually and semi-automatically to construct a standardized dataset. Specifically, after signal processing, dual labeling is performed using metadata recorded during acquisition. Modulation labels are categorized into 12 classes, such as BPSK, QPSK, and 8PSK, based on the known modulation scheme of the signal source; signal category labels are labeled as radar signals or communication signals based on the signal's functional attributes. Each sample carries two labels, constituting the annotation information required for multi-task learning.
[0028] All labeled samples are randomly divided into training, validation, and test sets in a 7:2:1 ratio. To accommodate extreme class imbalance scenarios in real-world situations, if the dataset labels are evenly distributed, sample removal can be performed on specific classes in the training set; for example, 20% of the samples in the signal class can be randomly retained. After the removal operation, the number of minority class samples in the training set is significantly reduced, resulting in an extremely imbalanced dataset with a majority class to minority class ratio of 8:1.
[0029] Finally, a dataset index table is created to record metadata such as the file path, label information, and partition type of each sample, and is persistently stored on the local disk in JSON format. The index table supports fast retrieval and batch loading, providing an efficient data access interface for subsequent training processes.
[0030] S2: Based on a multi-task deep network, shared embedding features are extracted from a standardized dataset to construct a four-element embedding space dataset. The multi-task deep network includes a shared weight feature backbone, a modulation recognition branch, and a signal category recognition branch. A further implementation involves using a standardized 128-dimensional IQ sequence as a unified input. The shared weight feature backbone encodes the input standardized IQ sequence into a 256-dimensional shared embedding vector, which simultaneously encodes modulation features and signal category features. The shared weight feature backbone includes four sequentially stacked convolutional layers and a global average pooling layer. Specifically, the first-level convolutional layer uses a 7×7 kernel with a stride of 2 for downsampling and padding of 3 to maintain feature map boundary integrity, resulting in 32 output channels. The second-level convolutional layer uses a 5×5 kernel with a stride of 2 and padding of 2, expanding the output channels to 64. The third and fourth-level convolutional layers both use 3×3 kernels with a stride of 1 to preserve resolution and padding of 1, increasing the output channels to 128 and 256 respectively. Each convolutional layer is strictly followed by a batch normalization layer and a ReLU activation function. The former accelerates convergence by normalizing the internal covariate shift, while the latter introduces nonlinear transformations to enhance expressive power.
[0031] After four levels of convolution, the feature map space is compressed to (256, 8, 8). A global average pooling layer aggregates the 8×8 feature maps of each channel into a single scalar, outputting a 256-dimensional compact embedding vector, denoted as Emb. This embedding vector simultaneously encodes modulation features and signal category features, serving as the shared input for subsequent dual branches.
[0032] A further implementation involves both the modulation recognition branch and the signal category recognition branch comprising two hidden fully connected layers and one output fully connected layer. A Dropout layer is added after the first fully connected layer, and a Softmax function is configured at the output. Specifically, the modulation recognition branch contains three fully connected layers, with hidden layer dimensions of 128 and 64 respectively, and an output layer dimension of 12 (corresponding to 12 modulation types). A Dropout layer is inserted after the first fully connected layer, with a dropout rate of 0.25 to prevent overfitting. The signal category recognition branch adopts the same three-layer structure, with hidden layer dimensions of 128 and 64, and an output layer dimension of 2 (corresponding to radar / communication signals). The Dropout rate is set to 0.5 to impose stronger regularization constraints on this task. The output layers of both branches are configured with a Softmax activation function to convert Logits into a normalized category probability distribution.
[0033] The loss function adopts a weighted multi-task cross-entropy form, which incorporates modulation recognition loss. and signal type recognition loss A linear weighted combination is used, with all weights set to 0.5, to ensure that the two tasks have equal optimization priority during gradient backpropagation. The specific formula is as follows: = 0.5 × + 0.5 × The optimizer uses stochastic gradient descent with momentum (SGD). The initial learning rate is set to 0.01, determined through grid search to strike a balance between convergence speed and stability. The momentum coefficient is set to 0.9 to smooth the direction update using historical gradient information, accelerating convergence and reducing oscillations. The batch size is set to 64, a compromise between memory usage and gradient estimation accuracy. The total number of training epochs is set to 100, with each epoch traversing the entire training set once.
[0034] The learning rate scheduling employs a cosine annealing strategy, where the learning rate gradually decays from its initial value to near zero according to a cosine function curve, achieving fine-tuning in the later stages of training. Simultaneously, an early stopping mechanism is enabled, with a patience value of 15. This means that if the validation set loss does not improve for 15 consecutive rounds, training is terminated early to avoid overfitting and wasting computational resources.
[0035] The standardized IQ samples from the training set constructed in step one are input into the network in batches. Forward propagation is performed to calculate the predicted output, multi-task loss is calculated, and backpropagation updates all network parameters. During training, the loss and accuracy are evaluated on the validation set after each round, and the optimal model checkpoint is recorded. After approximately 85 rounds of training, the validation set loss reaches its minimum and remains unchanged for 15 consecutive rounds, triggering the early stopping mechanism and completing the pre-training phase.
[0036] Immediately after pre-training, all parameters of the shared convolutional backbone are frozen, including the kernel weights of the four-level convolutional layers and the mean and variance statistics of the batch normalization layers. The purpose of freezing the shared backbone is to preserve the cross-task general feature representation capabilities learned during the pre-training phase and avoid catastrophic forgetting during the fine-tuning process.
[0037] All samples in the training set (including original samples and subsequently generated synthetic samples) are re-input into the frozen shared backbone network. For each sample, a forward propagation to a global average pooling layer is performed to extract a 256-dimensional embedding vector (Emb). The extracted embedding vector, along with the corresponding modulation label, signal category label, sample ID, and other information, is organized into a quadruple (Emb, ...). , , ), mod and sig represent modulation recognition and signal type recognition tasks, respectively, and an embedding space quadrigram dataset is constructed.
[0038] This dataset is stored in HDF5 format, supporting efficient random access and batch reading. The embedding space dataset is the core data structure for subsequent oversampling operations. All interpolation generation, neighborhood search, and sample selection are performed in this 256-dimensional embedding space, eliminating the need to repeatedly call deep networks for feature extraction and significantly improving computational efficiency.
[0039] S3: For minority class samples in the embedding space four-element data set, perform K-nearest neighbor search and multi-task label consistency adaptive interpolation to generate synthetic embedding samples; a further implementation method is that the method for generating synthetic embedding samples includes: Based on the embedding space quadruple dataset, the number of samples in each category in the modulation recognition task and signal type recognition task is counted to construct the minority class sampling target samples; specifically, for the modulation recognition task, the ratio of the number of samples of each modulation type to the majority class is calculated, and the category with a ratio less than 0.5 is marked as the minority class.
[0040] The embedding vectors and label information of all the minority class samples are extracted to construct a minority class sampling target list.
[0041] Based on the minority class target samples, a K-nearest neighbor search is performed to obtain the nearest neighbor set; specifically, for each minority class target, a dedicated neighborhood topology for that class is constructed in the embedding space.
[0042] Taking the minority class BPSK as an example, 300 embedding vectors of this class are extracted to form the BPSK sampling subspace. For each sample in the subspace The algorithm searches for K=5 nearest neighbors across the entire embedding space dataset using Euclidean distance. The search algorithm is accelerated using a KD-tree (K-Dimensional Tree), with a time complexity of O(log N), where N is the total number of samples in the dataset. The five nearest neighbors obtained are denoted as the set. .
[0043] For large-scale datasets (more than 100,000 samples), an approximate nearest neighbor algorithm (such as Annoy or FAISS) can be used to further improve search efficiency. The recall rate of approximate search is set to above 95% to ensure neighborhood quality.
[0044] The consistency level is determined based on the matching status between the target sample and its nearest neighbors in terms of modulation tag and signal category tag, and the interpolation amplitude coefficient is configured differently accordingly; specifically, for the target sample... and each of its nearest neighbor samples Extract the labels of both in the modulation recognition task and the signal type recognition task, and denote them as follows: and By comparing the matching status of the two labels, the neighborhood samples are divided into four consistency levels: Grade A (Completely identical): = and = This indicates that the labels for the two tasks are identical, resulting in a consistency score of C=2.
[0045] Level B (Modulation Consistency): = and ≠ , indicating that only the modulation tag matches, and the consistency score is C=1.
[0046] Level C (Signal category consistent): ≠ and = This indicates that only the signal category label matches, and the consistency score is C=1.
[0047] Grade D (Completely Inconsistent): ≠ and ≠ This indicates that the two task labels are different, and the consistency score is C=0.
[0048] Based on the consistency score C, the interpolation range coefficients are determined using a pre-defined mapping function. : The specific mapping relationship is as follows: Level A (C=2) corresponds to... =0.6, allowing for larger-scale interpolation exploration between the target sample and its nearest neighbors; level B / C (C=1) corresponds to =0.4, using medium amplitude interpolation; level D (C=0) corresponds to =0.2, generated only in a small area adjacent to the target sample to avoid introducing noise across the decision boundary.
[0049] This hierarchical mechanism explicitly embeds multi-task prior knowledge into the oversampling process, making the interpolation magnitude positively correlated with semantic similarity, which is one of the core innovations of this invention.
[0050] Within the corresponding interval, interpolation amplitude coefficients are randomly sampled, and synthetic embedded samples are generated according to the linear interpolation formula. These samples inherit the dual labels of the target samples, and the oversampling factor is adaptively adjusted based on the signal-to-noise ratio (SNR) to expand the scale of minority class target samples in batches. Specifically, the oversampling factor is adaptively determined based on the SNR conditions of the current dataset. For high SNR scenarios (SNR ≥ 0dB), the oversampling factor is set to 1, meaning the number of minority class samples generated reaches 50% of the majority class samples. For medium SNR scenarios (SNR = -10dB), the oversampling factor is set to 3, corresponding to 150% of the majority class samples. For low SNR scenarios (SNR ≤ -20dB), the oversampling factor is set to 2-3, with the optimal value determined through cross-validation.
[0051] For selected neighbors Determined based on its consistency level In the interval [0, Uniform sampling random interpolation coefficients λ ~ Uniform(0, Generate the synthetic embedding vector according to the interpolation formula: Synthetic samples inherit target samples double tags ( , The dataset is generated by recording metadata such as the source (original sample ID, nearest neighbor ID, interpolation coefficients). This process is repeated for all minority class targets, expanding the dataset to 1.5 times the size of the original training set.
[0052] The hierarchical classification rule of this invention is not an abstract rule of intellectual activity, but a technical constraint based on the coupling relationship between dual-task labels in electromagnetic signal multi-task classification. This rule quantifies the label matching state into upper limits of interpolation coefficients for different levels. It can also be combined with validation set results and actual evaluation metrics to divide the interpolation range coefficients. This solves the technical problem of physical rule destruction caused by traditional oversampling interpolation between heterogeneous labels. It is a technical means embedded in the deep network training process and has clear technical effects.
[0053] S4: A multi-task deep network and an electromagnetic domain knowledge base are used to perform bidirectional cross-validation on the synthesized embedded samples to construct an enhanced multi-task training set; a further implementation method includes the following steps for constructing the enhanced multi-task training set: An electromagnetic domain knowledge base is constructed, containing a built-in electromagnetic signal rule base that stores the binding relationships between legal modulation types and signal categories; specifically, it stores legal modulation-signal category tag combinations in a dictionary structure. The knowledge base inputs prior rules based on electromagnetic physics mechanisms, such as: FMCW modulation only appears in radar signals: (FMCW, radar) is legal, (FMCW, communication) is illegal; AM-SSB modulation is mainly used for shortwave communication: (AM-SSB, communication) is legal, (AM-SSB, radar) has low confidence. BPSK modulation is common in both radar and communications: (BPSK, radar) and (BPSK, communications) are both valid. The knowledge base supports manual rule addition on-site. For newly discovered signal types or special modulation methods, operators can add tag combination rules through configuration files or a web interface. The system automatically updates the knowledge base and applies the changes in subsequent filtering. The knowledge base is persistently stored in JSON format, version-managed, and supports rollback and auditing.
[0054] If the synthetic embedding samples are generated with modulation task as the guiding principle, the signal category recognition branch is invoked to predict the signal category probability distribution of the synthetic samples. The legality of the label combinations inherited by the synthetic samples is then determined using the electromagnetic domain knowledge base. The comprehensive confidence score is calculated together with the legality determination result and the predicted signal category probability. Alternatively, if the synthetic embedding samples are generated with signal category task as the guiding principle, the modulation recognition branch is invoked to predict the modulation type probability distribution of the synthetic samples. The legality of the label combinations inherited by the synthetic samples is then determined using the electromagnetic domain knowledge base. The comprehensive confidence score is calculated together with the legality determination result and the predicted modulation type probability. Specifically, for each generated synthetic embedding sample... and its inherited tags Perform two-way cross-validation.
[0055] First, Input the pre-trained modulation recognition branch and perform forward inference to obtain a 12-dimensional modulation type probability distribution. .from Extract target labels Corresponding probability value .
[0056] Secondly, The input signal type identification branch performs forward inference to obtain a 2D signal category probability distribution. Extract target tags Corresponding probability value .
[0057] Search the knowledge base to determine tag combinations Is it valid? If valid, physical consistency indicator function. If illegal, Calculate the overall confidence score: This formula incorporates hard constraints on domain knowledge ( ) and model soft judgment This combination ensures that the screening results simultaneously meet the requirements of physical feasibility and classifier confidence. For tag combinations not covered by the knowledge base, the default is... = 1, relying solely on model probability screening.
[0058] All synthetic embedding samples are sorted in descending order based on physical consistency confidence. The top 70% of high-reliability samples are retained, while the remaining low-confidence samples are discarded, resulting in the filtered synthetic embedding samples. Specifically, for all 900 synthetic samples generated for a specific minority class (e.g., BPSK), a confidence score is calculated for each sample, forming a confidence sequence. These are then sorted in descending order of confidence, and the top 70% (630 samples) are added to the augmented training set. The retention ratio p=70% was determined through cross-validation, achieving a balance between sample diversity and quality.
[0059] The 30% of low-confidence samples that are eliminated are not included in subsequent training to avoid noise samples interfering with model learning. The metadata of the eliminated samples (original ID, nearest neighbor ID, confidence score) is recorded in a log file for subsequent analysis and algorithm optimization.
[0060] The selected synthetic embedding samples are fused with the original training set samples to obtain an enhanced multi-task training set, and the dataset index is updated synchronously. Specifically, the dataset index table is updated with the selected high-confidence samples, a unique ID is assigned to each synthetic sample, and information such as its embedding vector, dual labels, confidence score, and generation source is recorded. The index table supports fast retrieval of samples of a specified category, providing an efficient interface for class weighting and batch sampling in the subsequent fine-tuning stage. The validation and test sets remain unchanged to ensure the fairness of the evaluation.
[0061] S5: Based on the enhanced multi-task training set, freeze the shared weight feature backbone network parameters, adopt the category-weighted loss function, and only perform parameter updates on the modulation recognition branch and the signal category recognition branch to obtain the fine-tuned multi-task deep network; specifically, this step uses the enhanced training set to fine-tune the task-specific branches to strengthen the minority class discrimination ability, while keeping the shared backbone parameters frozen to avoid catastrophic forgetting.
[0062] 1. Configuration of category-aware weighted loss function.
[0063] To address the residual class bias remaining in the augmented training set, a class-aware weighted cross-entropy loss function is employed. For each class in the modulation recognition task, the loss function is calculated based on the number of samples in the augmented training set. Calculate the weighting coefficients : Where β=0.9999 is the equilibrium hyperparameter, and this formula is derived from the Effective Number of Samples theory.
[0064] The weighting coefficients are calculated in the same way for the signal type identification task. The final weighted multi-task loss function is: in For cross-entropy loss, mod and sig represent modulation recognition and signal type recognition tasks, respectively.
[0065] 2. Fine-tuning optimizer and hyperparameter configuration.
[0066] The optimizer is switched from SGD to Adam, utilizing an adaptive learning rate mechanism to accelerate fine-tuning convergence. The initial learning rate is set to... Compared to the pre-training stage, it reduces performance by 100 times, and uses refined parameter updates to avoid destroying existing feature representations. Adam's Set it to 0.9. Set to 0.999, epsilon set to The default configuration is used.
[0067] The learning rate is scheduled using a StepLR strategy, where the learning rate is decayed to 0.5 times its original value every 10 rounds, gradually decreasing until convergence. The batch size remains constant at 64, and the total number of training rounds is set to 50 (half the number compared to pre-training, as the dataset has been expanded and features have been extracted).
[0068] The patience threshold for the early stopping mechanism is set to 5 rounds, and the monitoring metric is changed from validation set loss to weighted Macro-F1. Macro-F1 is more sensitive to minority class performance and better aligns with the optimization goals of the fine-tuning phase. If the weighted Macro-F1 fails to improve for 5 consecutive rounds, fine-tuning is terminated early, and the optimal checkpoint is loaded.
[0069] 3. Parameter selective update and freeze strategy During the fine-tuning phase, the parameters of the shared backbone network (four levels of convolutional layers and global average pooling layers) remain completely frozen and do not receive any gradient updates. This strategy is based on the principle of parameter isolation optimization: the shared backbone has already learned cross-task general representation capabilities during the pre-training phase, and freezing the parameters can effectively avoid the risk of catastrophic forgetting during the fine-tuning process, ensuring that the model's ability to recognize the majority class is not impaired.
[0070] Gradient updates are performed only on the fully connected layer parameters of the two task-specific branches (modulation recognition and signal type recognition). Specifically, the three fully connected layers (including the weight matrix W and bias vector b) and the Dropout layer of the modulation recognition branch are all set to a trainable state. The parameter update rule is the same for the signal type recognition branch.
[0071] During each backpropagation, the loss gradient flows backward from the output layer, accumulates in the fully connected layers of the task branches, and stops at the interface of the shared backbone. The Adam optimizer only updates the trainable parameters, enabling branch-level directional fine-tuning.
[0072] 4. Iterative Training and Model Export The enhanced training set is input into the network in batches, and forward propagation is performed to calculate the weighted multi-task loss. Backpropagation is then used to update the task branch parameters. After each training round, the weighted Macro-F1 and Micro-F1 metrics are evaluated on the validation set, the optimal model checkpoint is recorded, and the final model is exported.
[0073] Steps one through five describe the construction of a multi-task oversampling network for electromagnetic signals based on shared weight features. Figure 2 As shown.
[0074] S6: Based on the finely tuned multi-task deep network, multi-task oversampling classification is performed on the standardized preprocessed field-acquired electromagnetic signals to obtain classification results that include modulation type and signal category.
[0075] Specifically, the trained multi-task classification model is deployed to a cloud server to build a centralized inference service system. The cloud server is configured with two NVIDIA Tesla V100 GPUs, 256GB of memory, and 2TB of SSD storage, and runs Ubuntu 20.04 and CUDA 11.8. After converting the PyTorch model to ONNX format, it is deeply optimized using the TensorRT inference engine, including layer fusion, INT8 quantization, and automatic kernel tuning. A RESTful API service is deployed to listen on TCP port 8080, receiving JSON requests from the on-site terminals, including the terminal ID, timestamp, IQ data sequence, and metadata. The server performs format validation and normalization preprocessing on the IQ data, converting it to (2, 128) tensor format before sending it to the inference engine. A batch processing strategy is adopted, triggering batch inference every 10ms or when 64 samples are reached, fully utilizing the parallel capabilities of the GPU.
[0076] The inference engine outputs the probability distributions for modulation recognition and signal type recognition, extracts the category labels corresponding to the highest probabilities, and calculates the comprehensive confidence score as the geometric mean of the probabilities of the two tasks. Based on confidence level, results are categorized into three levels: high confidence (≥0.85) is directly adopted, medium confidence (0.65-0.85) is marked as pending confirmation, and low confidence (<0.65) triggers a manual review alarm. Results are written to a PostgreSQL database, stored in monthly time partitions, using batch insertion to improve write speed. Raw IQ data is compressed using Gzip, and only low-confidence samples and 10% randomly sampled samples are saved. The system maintains a 24-hour sliding counter to monitor rare signals; when a category combination occurs less than 5 times, an alarm is triggered via WebSocket, email, and Webhook. A web management console provides real-time monitoring dashboards, historical data queries, and model version management functions, supporting grayscale switching and dynamic parameter adjustment.
[0077] For scenarios without stable network coverage, such as in the field or remote sites, a fully localized deployment is implemented at the edge. A lightweight student model is trained using knowledge distillation technology, simplifying the network to three levels of convolutions (16 / 32 / 64 channels) and a single fully connected layer, compressing the number of parameters from 12M to 0.8M. INT8 training is followed by quantization, with quantization parameters determined based on 1000 calibration samples. Batch normalization layers are fused into the convolutional layers, and an inference engine optimized for the Jetson platform is built using TensorRT, enabling FP16 mixed-precision inference.
[0078] The computationally intensive precise K-nearest neighbor search was replaced with the HNSW approximation algorithm, and a graph index of 6000 embedding vectors (index file 15MB) was built in the cloud. The entire process was localized at the edge: signal acquisition, noise reduction, normalization, and inference were all completed locally on the edge terminal. Local inference results were written to an SQLite database, and classification result statistical summaries (only a few KB) and alarm information were periodically uploaded to the cloud via a narrowband channel, without needing to send back complete IQ data. After periodic model iterations in the cloud, the edge model was updated via offline copy or OTA push. The edge terminal triggered local fine-tuning for accumulated low-confidence samples (more than 100), updating only task branch parameters. If the performance improvement after fine-tuning exceeded 2%, a new model was switched, achieving edge-cloud co-evolution.
[0079] Example 2 This invention also provides an electromagnetic signal multi-task oversampling classification system based on shared weight features, used to implement the method of Embodiment 1, comprising: The dataset construction module is used to standardize the collected raw IQ signals and build a standardized dataset with dual labels. The feature extraction module is used to extract shared embedding features from a standardized dataset based on a multi-task deep network and construct a four-element dataset in the embedding space; wherein, the multi-task deep network includes a shared weight feature backbone, a modulation recognition branch, and a signal category recognition branch; The oversampling module is used to perform K-nearest neighbor search and multi-task label consistency adaptive interpolation on minority class samples in the embedding space four-element data set to generate synthetic embedding samples; The sample selection module is used to perform bidirectional cross-validation on the synthetic embedded samples using a multi-task deep network and an electromagnetic domain knowledge base to build an enhanced multi-task training set. The network fine-tuning module is used to freeze the parameters of the backbone network with shared weight features based on the enhanced multi-task training set, and to perform parameter updates only on the modulation recognition branch and the signal category recognition branch using a category-weighted loss function to obtain the fine-tuned multi-task deep network. The classification module is used to perform multi-task oversampling classification on the standardized preprocessed electromagnetic signals acquired in the field based on the fine-tuned multi-task deep network, and obtain classification results that include modulation type and signal category.
[0080] A further implementation method includes a dataset construction module comprising: The signal acquisition unit is used to continuously acquire IQ quadrature baseband signals according to a preset sampling duration to obtain the original time-domain IQ sequence, and simultaneously record the field environmental parameters, including signal-to-noise ratio, number of multipath signals, Doppler frequency shift, and signal source label. The noise reduction unit is used to sequentially perform time-domain filtering, frequency-domain denoising, and channel impairment compensation on the original time-domain IQ sequence to obtain the denoised IQ sequence. The normalization unit is used to normalize the amplitude of the denoised IQ sequence to obtain a standardized IQ sequence. The annotation unit is used to perform manual and semi-automatic dual-label annotation on standardized IQ sequences based on the signal type and modulation method of synchronous recording, and to construct a standardized dataset.
[0081] The above embodiments are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A multi-task oversampling classification method for electromagnetic signals based on shared weight features, characterized in that, include: The collected raw IQ signals are standardized to construct a standardized dataset with dual labels; Based on a multi-task deep network, shared embedding features are extracted from a standardized dataset to construct a four-element dataset in the embedding space; wherein, the multi-task deep network includes a shared weight feature backbone, a modulation recognition branch, and a signal category recognition branch; For minority class samples in the embedding space four-dimensional data set, K-nearest neighbor search and multi-task label consistency adaptive interpolation are performed to generate synthetic embedding samples; A multi-task deep network and an electromagnetic domain knowledge base are used to perform bidirectional cross-validation on the synthetic embedded samples to construct an enhanced multi-task training set. Based on the enhanced multi-task training set, the parameters of the shared weight feature backbone network are frozen, and a category-weighted loss function is used to update the parameters only for the modulation recognition branch and the signal category recognition branch to obtain the fine-tuned multi-task deep network. Based on the finely tuned multi-task deep network, multi-task oversampling classification is performed on the standardized preprocessed field-acquired electromagnetic signals to obtain classification results that include modulation type and signal category.
2. The method according to claim 1, characterized in that, Methods for constructing standardized datasets with two labels include: IQ quadrature baseband signals are continuously acquired according to a preset sampling duration to obtain the original time-domain IQ sequence, and on-site environmental parameters are recorded simultaneously; the on-site environmental parameters include signal-to-noise ratio, number of multipath signals, Doppler frequency shift, and signal source label; The original time-domain IQ sequence is sequentially subjected to time-domain filtering, frequency-domain denoising, and channel impairment compensation to obtain the denoised IQ sequence. The amplitude of the denoised IQ sequence is normalized to obtain a standardized IQ sequence. Based on the signal type and modulation method of synchronous recording, standardized IQ sequences are labeled with both manual and semi-automatic labels to construct a standardized dataset.
3. The method according to claim 2, characterized in that, The shared weighted feature backbone is used to encode the input standardized IQ sequence into a 256-dimensional shared embedding vector, which simultaneously encodes modulation features and signal category features; The shared weight feature backbone includes four sequentially stacked convolutional layers and a global average pooling layer.
4. The method according to claim 1, characterized in that, Both the modulation recognition branch and the signal category recognition branch contain two hidden fully connected layers and one output fully connected layer. A Dropout layer is added after the first fully connected layer, and the output is configured with a Softmax function.
5. The method according to claim 1, characterized in that, Methods for generating synthetic embedding samples include: Based on the embedding space quadruple dataset, the number of samples in each class in the modulation recognition task and signal type recognition task is counted, and the minority class sampling target samples are constructed. Based on the minority class target sample, perform a K-nearest neighbor search to obtain the nearest neighbor set; The consistency level is divided according to the matching status of the target sample and its neighboring samples in terms of modulation tag and signal category tag, and the interpolation amplitude coefficient is configured differently. Within the corresponding interval, the interpolation amplitude coefficients are randomly sampled, and synthetic embedded samples are generated according to the linear interpolation formula. The dual labels of the target samples are inherited, and the oversampling factor is adaptively adjusted according to the signal-to-noise ratio to expand the scale of minority class sampling target samples in batches.
6. The method according to claim 1, characterized in that, Methods for constructing enhanced multi-task training sets include: Construct an electromagnetic domain knowledge base, which includes an electromagnetic signal rule base and stores the binding relationship between legal modulation types and signal categories. If a synthetic embedded sample is generated with modulation task as the guide, the signal category recognition branch is called to predict the signal category probability distribution of the synthetic sample. The legality of the tag combination inherited by the synthetic sample is determined by combining the electromagnetic domain knowledge base. The comprehensive confidence score is calculated together with the legality determination result and the signal category prediction probability. If a synthetic embedded sample is generated based on a signal category task, the modulation recognition branch is called to predict the modulation type probability distribution of the synthetic sample. The legality of the tag combination inherited by the synthetic sample is determined by combining the electromagnetic domain knowledge base. The comprehensive confidence score is calculated together with the legality determination result and the modulation type prediction probability. All synthetic embedding samples are sorted in descending order based on the overall confidence score. The top 70% of high-reliability samples are retained, and the remaining low-confidence samples are removed to obtain the filtered synthetic embedding samples. The selected synthetic embedded samples are fused with the original training set samples to obtain an enhanced multi-task training set, and the dataset index is updated synchronously.
7. A multi-task oversampling classification system for electromagnetic signals based on shared weight features, used to implement the method described in any one of claims 1-6, characterized in that, include: The dataset construction module is used to standardize the collected raw IQ signals and build a standardized dataset with dual labels. The feature extraction module is used to extract shared embedding features from a standardized dataset based on a multi-task deep network and construct a four-element dataset in the embedding space; wherein, the multi-task deep network includes a shared weight feature backbone, a modulation recognition branch, and a signal category recognition branch; The oversampling module is used to perform K-nearest neighbor search and multi-task label consistency adaptive interpolation on minority class samples in the embedding space four-element data set to generate synthetic embedding samples; The sample selection module is used to perform bidirectional cross-validation on the synthetic embedded samples using a multi-task deep network and an electromagnetic domain knowledge base to construct an enhanced multi-task training set. The network fine-tuning module is used to freeze the shared weight feature backbone network parameters based on the enhanced multi-task training set, and use a category-weighted loss function to update the parameters only for the modulation recognition branch and the signal category recognition branch to obtain the fine-tuned multi-task deep network. The classification module is used to perform multi-task oversampling classification on the standardized preprocessed electromagnetic signals acquired in the field based on the fine-tuned multi-task deep network, and obtain classification results that include modulation type and signal category.
8. The system according to claim 7, characterized in that, The dataset building module includes: The signal acquisition unit is used to continuously acquire IQ quadrature baseband signals according to a preset sampling duration to obtain the original time-domain IQ sequence, and simultaneously record the field environmental parameters; the field environmental parameters include signal-to-noise ratio, number of multipath signals, Doppler frequency shift, and signal source label; The noise reduction unit is used to sequentially perform time-domain filtering, frequency-domain denoising, and channel impairment compensation on the original time-domain IQ sequence to obtain the denoised IQ sequence. The normalization unit is used to normalize the amplitude of the denoised IQ sequence to obtain a standardized IQ sequence. The annotation unit is used to perform manual and semi-automatic dual-label annotation on standardized IQ sequences based on the signal type and modulation method of synchronous recording, and to construct a standardized dataset.