Electromagnetic signal reconstruction method based on potential diffusion model, electronic equipment and medium
Through the electromagnetic signal reconstruction method based on the latent diffusion model, using SENet in the latent layer semantic space to embed the UNet network, the problem of signal processing noise interference in the prior art is solved, the accuracy and stability of signal reconstruction are improved, and communication is enhanced System security.
Patent Information
- Application Number
- CN202411247248.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-01-17
AI Technical Summary
Existing electromagnetic signal processing methods are difficult to effectively deal with complex noise and interference, resulting in insufficient accuracy and stability of signal reconstruction, affecting the security of communication and information systems.
Using the electromagnetic signal reconstruction method based on the latent diffusion model, SENet in the latent layer semantic space is used to embed the UNet network, train the latent diffusion model by adding noise signals, and set up the multi-loss function optimization training process to improve the accuracy and stability of signal reconstruction. .
It improves the processing efficiency and adaptability of electromagnetic signals, enhances the security of communication and information systems, effectively prevents malicious electromagnetic signal intrusion, and provides higher-quality signal reconstruction results.
Smart Images

Figure CN119322942A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to electromagnetic signal processing, and in particular to an electromagnetic signal reconstruction method, electronic equipment, and medium based on a potential diffusion model. Background Art
[0002] In the current digital age, communication and information transmission have become the key cornerstones of social and commercial operations. With the popularization of the Internet, the Internet of Things and various smart devices, the demand for electromagnetic signal processing has become increasingly prominent. However, with it comes increasingly complex noise and interference, which poses a severe challenge to traditional electromagnetic signal processing methods. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides an electromagnetic signal reconstruction method, electronic device, and medium based on a potential diffusion model.
[0004] In a first aspect, an embodiment of the present invention provides an electromagnetic signal reconstruction method based on a potential diffusion model, the method comprising:
[0005] Adding noise to the original electromagnetic signal;
[0006] The noisy electromagnetic signal is input into the latent diffusion model; a total loss function is set, and the latent diffusion model is trained using the total loss function so that the reconstructed electromagnetic signal output by the latent diffusion model is consistent with the original electromagnetic signal;
[0007] The latent diffusion model includes an encoder, a latent semantic space, and a decoder connected in sequence; the backbone network of the latent semantic space adopts UNet embedded with SENet;
[0008] During the training of the latent diffusion model, the output end of the latent semantic space is also connected to a classifier;
[0009] The total loss function is a weighted sum of the first loss function, the second loss function, the third loss function, and the fourth loss function; the first loss function is a cross entropy loss set according to the predicted electromagnetic signal output by the classifier; the second loss function is used to minimize the intra-class variation in the latent semantic space; the third loss function is used for the difference between the original electromagnetic signal and the reconstructed electromagnetic signal; the fourth loss function is set according to the mean square error between the reconstructed electromagnetic signal and the original electromagnetic signal, and the signal-to-noise ratio;
[0010] The electromagnetic signal to be processed is input into the trained potential diffusion model to obtain a reconstructed electromagnetic signal.
[0011] In a second aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned electromagnetic signal reconstruction method based on the potential diffusion model.
[0012] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the method for reconstructing electromagnetic signals based on a potential diffusion model is implemented.
[0013] In a fourth aspect, an embodiment of the present invention provides a computer program product, including a computer program / instruction, which implements the above-mentioned electromagnetic signal reconstruction method based on the potential diffusion model when the computer program / instruction is executed by a processor.
[0014] Compared with the prior art, the present invention has the following beneficial effects:
[0015] The present invention provides an electromagnetic signal reconstruction method based on a potential diffusion model. By using a normal electromagnetic signal data set and adopting a potential diffusion model to restore the noisy electromagnetic signal, the backbone network of the latent semantic space in the potential diffusion model adopts UNet embedded with SENet. After two convolutions, the channel weight vector is obtained through the SENet module, and the original feature map is multiplied by the weight vector to obtain a new feature map, thereby improving the processing efficiency and adaptability of the model. The present invention sets a loss function to focus on the electromagnetic signal task, accurately measures the difference between the reconstructed signal and the original signal, optimizes the training, and improves the accuracy and stability of the restoration. The present invention also improves the security of communication and information systems, can prevent the intrusion of malicious electromagnetic signals, and provides effective protection for communication systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 A schematic diagram of an electromagnetic signal reconstruction method based on a potential diffusion model provided by an embodiment of the present invention;
[0018] Figure 2 A schematic diagram of SENet provided by an embodiment of the present invention;
[0019] Figure 3 A schematic diagram of UNet provided by an embodiment of the present invention;
[0020] Figure 4 A schematic diagram of UNet embedded with SENet provided by an embodiment of the present invention;
[0021] Figure 5 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] It should be noted that, in the absence of conflict, the features in the following embodiments and implementations may be combined with each other.
[0024] like Figure 1 As shown, an embodiment of the present invention provides an electromagnetic signal reconstruction method based on a potential diffusion model, the method comprising:
[0025] Step S1, adding noise to the original electromagnetic signal.
[0026] Specifically, in this example, the original electromagnetic signal adopts the RML2016 electromagnetic signal dataset, which includes actual scene data of various frequencies and complexities.
[0027] Furthermore, the process of adding noise to the original electromagnetic signal includes:
[0028] Select the appropriate noise type: for example, Gaussian noise, uniform noise, etc. The specific choice depends on the simulated noise environment. Determine the noise intensity: define the intensity of the noise or the signal-to-noise ratio (SNR), which will determine the relative strength of the noise in the signal. Finally, based on the selected noise type and intensity, generate a noise signal in the corresponding frequency or time domain.
[0029] Step S2, inputting the noisy electromagnetic signal into a potential diffusion model; setting a total loss function, and using the total loss function to train the potential diffusion model, so that the reconstructed electromagnetic signal output by the potential diffusion model is consistent with the original electromagnetic signal;
[0030] The latent diffusion model includes an encoder, a latent semantic space, and a decoder connected in sequence; the backbone network of the latent semantic space adopts UNet embedded with SENet.
[0031] Furthermore, the structure diagram of the Unet network is as follows Figure 3 As shown, the schematic diagram of the UNet network embedded with SENet is as follows Figure 4 As shown. This network is a neural network architecture that introduces an attention mechanism, which aims to enhance the network's attention to important features and improve performance. This module effectively predicts the noise components in the noisy signal by learning the noise pattern in the signal. Subsequently, through the prediction of noise, this example successfully removes the noise from the noisy signal and obtains an approximately noise-free signal. This process is actually to learn the complex structure and noise distribution in the signal through a neural network. After the prediction and removal of noise, this example obtains an output that is close to the original signal. This output signal has been processed by the UNet module embedded with SENet, and various added noises have been removed, achieving high-quality restoration of the original signal. During the entire processing process, this example maximizes its adaptability to different noise types and intensities by adjusting the parameters and network structure of the UNet module embedded with SENet.
[0032] During the training of the latent diffusion model, the output end of the latent semantic space is also connected to a classifier.
[0033] Furthermore, the encoder is modeled by a CNN architecture that projects the input signal into a latent semantic space representation. The classifier is modeled by a fully connected neural network that takes the latent semantic space representation as input and determines the label of the data. The decoder is modeled by another CNN architecture that aims to produce a reconstructed signal that is expected to be as similar as possible to the input signal.
[0034] Considering the unique characteristics of the signal, the input shape of the encoder should be a 2-row rectangular matrix instead of a square matrix. In this example, the encoder consists of 4 convolutional layers and 2 fully connected layers. The encoder can be represented as a mapping from the input space X to the latent semantic space Z. The classifier C will discriminate the label of the sample based on the semantic features and consists of several fully connected layers. The decoder D is used to reconstruct X from Z, which consists of a deconvolution layer, a depooling layer, and a fully connected layer.
[0035] The total loss function is the weighted sum of the first loss function, the second loss function, the third loss function, and the fourth loss function; the first loss function is the cross entropy loss set according to the predicted electromagnetic signal output by the classifier; the second loss function is used to minimize the intra-class changes in the latent semantic space; the third loss function is used for the difference between the original electromagnetic signal and the reconstructed electromagnetic signal; the fourth loss function is set according to the mean square error between the reconstructed electromagnetic signal and the original electromagnetic signal, and the signal-to-noise ratio.
[0036] Among them, the first loss function is:
[0037]
[0038] Where N represents the number of samples of the original electromagnetic signal, x i represents the i-th original electromagnetic signal, E(x i ) represents the encoded electromagnetic signal, C(E(x i )) represents the classification prediction result of the encoded electromagnetic signal, y i Indicates the actual category corresponding to the encoded electromagnetic signal.
[0039] In order to minimize the intra-class variation in the latent semantic space Z while maintaining a good separation of semantic features between classes, the center loss is used as the second loss function, which is:
[0040]
[0041] Where N represents the number of samples of the original electromagnetic signal, x i represents the i-th original electromagnetic signal, E(x i ) represents the encoded electromagnetic signal, Represents class y i The semantic center vector in the latent semantic space. i When the semantic features of Ideally, the entire training dataset should be considered and the features of each class need to be averaged in each iteration.
[0042] category according to Make updates;
[0043] Among them, α is the learning rate, Calculated according to the following formula:
[0044]
[0045] Where j is the jth sample; if the condition in () holds, then δ(·) = 0; if the condition in () does not hold, then δ(·) = 1.
[0046] The third loss function is:
[0047]
[0048] Where N represents the number of samples of the original electromagnetic signal, x i represents the i-th original electromagnetic signal, E(x i ) represents the encoded electromagnetic signal, D(E(x i )) represents the reconstructed electromagnetic signal.
[0049] It should be noted that the more complete the reconstructed electromagnetic signal is, the more effective information is carried in the latent semantic space Z. Therefore, the encoder greatly helps the model to generate appropriate semantic features.
[0050] The fourth loss function is:
[0051] L 4 =MSE(x i ,x i ')-λ 1 SNR
[0052] In the formula, x i represents the i-th original electromagnetic signal, x i ' represents the i-th reconstructed electromagnetic signal, MSE(x i ,x i ') represents the mean square error between the original electromagnetic signal and the reconstructed electromagnetic signal, λ 1 It represents the weight coefficient used to balance the mean square error and SNR terms, where SNR represents the signal-to-noise ratio.
[0053] The calculation process of the signal-to-noise ratio includes:
[0054]
[0055] For the original electromagnetic signal and the reconstructed electromagnetic signal, their powers are calculated respectively:
[0056]
[0057] Where N represents the number of samples of the original electromagnetic signal.
[0058] The expression of the total loss function is as follows:
[0059] L t =L 1 +λ 2 L 2 +λ 3 L 3 +λ 4 L 4
[0060] In the formula, λ 2 ,λ 3 ,λ 4 Both represent weight coefficients.
[0061] Step S3: input the electromagnetic signal to be processed into the trained potential diffusion model to obtain a reconstructed electromagnetic signal.
[0062] like Figure 5As shown, an embodiment of the present application provides an electronic device, which includes a memory 101 for storing one or more programs and a processor 102. When the one or more programs are executed by the processor 102, any method in the first aspect described above is implemented.
[0063] The memory 101, the processor 102 and the communication interface 103 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used to communicate signaling or data with other node devices.
[0064] Among them, the memory 101 can be, but is not limited to, a random access memory 101 (Random Access Memory, RAM), a read only memory 101 (Read Only Memory, ROM), a programmable read-only memory 101 (Programmable Read-Only Memory, PROM), an erasable read-only memory 101 (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable read-only memory 101 (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0065] The processor 102 may be an integrated circuit chip having signal processing capability. The processor 102 may be a general-purpose processor 102, including a central processing unit 102 (CPU), a network processor 102
[0066] (Network Processor, NP), etc.; it can also be a digital signal processor 102 (Digital Signal Processing, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0067] In the embodiments provided in the present application, it should be understood that the disclosed method and system can also be implemented in other ways. The method and system embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the method and system, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0068] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0069] On the other hand, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by the processor 102, a method as in any one of the first aspects described above is implemented. If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory 101 (ROM, Read-Only Memory), a random access memory 101 (RAM, RandomAccess Memory), a disk or an optical disk.
[0070] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.
Claims
1. A method for reconstructing electromagnetic signals based on a potential diffusion model, characterized in that: The method comprises: Adding noise to the original electromagnetic signal; The noisy electromagnetic signal is input into the latent diffusion model; a total loss function is set, and the latent diffusion model is trained using the total loss function so that the reconstructed electromagnetic signal output by the latent diffusion model is consistent with the original electromagnetic signal; The potential diffusion model includes an encoder, a latent semantic space, and a decoder connected in sequence; the backbone network of the latent semantic space adopts a UNet module embedded with a SENet module; During the training of the latent diffusion model, the output end of the latent semantic space is also connected to a classifier; The total loss function is a weighted sum of the first loss function, the second loss function, the third loss function, and the fourth loss function; the first loss function is a cross entropy loss set according to the predicted electromagnetic signal output by the classifier; the second loss function is used to minimize the intra-class variation in the latent semantic space; the third loss function is used for the difference between the original electromagnetic signal and the reconstructed electromagnetic signal; the fourth loss function is set according to the mean square error between the reconstructed electromagnetic signal and the original electromagnetic signal, and the signal-to-noise ratio; The electromagnetic signal to be processed is input into the trained potential diffusion model to obtain a reconstructed electromagnetic signal.
2. The electromagnetic signal reconstruction method based on the potential diffusion model according to claim 1 is characterized in that: The first loss function is: Where N represents the number of samples of the original electromagnetic signal, x i represents the i-th original electromagnetic signal, E(x i ) represents the encoded electromagnetic signal, C(E(x i )) represents the classification prediction result of the encoded electromagnetic signal, y i Indicates the actual category corresponding to the encoded electromagnetic signal.
3. The electromagnetic signal reconstruction method based on the potential diffusion model according to claim 1 is characterized in that: The second loss function is: Where N represents the number of samples of the original electromagnetic signal, x i represents the i-th original electromagnetic signal, E(x i ) represents the encoded electromagnetic signal, c yi Represents class y i Semantic center vector in the latent semantic space.
4. The electromagnetic signal reconstruction method based on the potential diffusion model according to claim 3 is characterized in that: category according to Make updates; Among them, α is the learning rate, Calculated according to the following formula: Where j is the jth sample; if the condition in () holds, then δ(·) = 0; if the condition in () does not hold, then δ(·) = 1.
5. The electromagnetic signal reconstruction method based on the potential diffusion model according to claim 1, characterized in that: The third loss function is: Where N represents the number of samples of the original electromagnetic signal, x i represents the i-th original electromagnetic signal, E(x i ) represents the encoded electromagnetic signal, D(E(x i )) represents the reconstructed electromagnetic signal.
6. The electromagnetic signal reconstruction method based on the potential diffusion model according to claim 1, characterized in that: The fourth loss function is: L4=MSE(x i ,x i ’)-λ1·SNR In the formula, x i represents the i-th original electromagnetic signal, x i ' represents the i-th reconstructed electromagnetic signal, MSE(x i ,x i ') represents the mean square error between the original electromagnetic signal and the reconstructed electromagnetic signal, λ1 represents the weight coefficient, and SNR represents the signal-to-noise ratio.
7. The electromagnetic signal reconstruction method based on the potential diffusion model according to claim 6, characterized in that: The calculation process of the signal-to-noise ratio includes: Where N represents the number of samples of the original electromagnetic signal.
8. An electronic device, comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the electromagnetic signal reconstruction method based on the potential diffusion model as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the electromagnetic signal reconstruction method based on the potential diffusion model as described in any one of claims 1 to 7 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the method for reconstructing electromagnetic signals based on a potential diffusion model described in any one of claims 1 to 7 is implemented.