Target signal enhancement method based on generative adversarial network
By using target signal enhancement methods of generating adversarial networks and attention mechanisms in industrial IoT environments, the problem of difficulty in signal extraction in complex noise environments is solved, and efficient signal extraction and repair is achieved, suitable for resource-constrained environments application.
Patent Information
- Application Number
- CN202411644128.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-18
AI Technical Summary
In a complex industrial Internet of Things environment, the extraction and enhancement of target signals are affected by noise interference, resulting in a decrease in signal quality and making it difficult to achieve effective signal recognition and extraction.
Using a target signal enhancement method based on a generative adversarial network, the generator and discriminator are trained by adversarially, and the attention mechanism and audio repair module are introduced to optimize the model through model pruning and retraining to improve performance.
Effectively extract target signals from complex noise signals, improve signal extraction effect, overcome the shortcomings of traditional signal processing technology in complex noise environments, and output more complete and clear signals through signal repair mechanism, reducing resource consumption, suitable for resource limitation operating in an industrial environment.
Smart Images

Figure CN119479675A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of signal processing technology and relates to a target signal enhancement method based on a generative adversarial network. Background Art
[0002] In actual industrial environments, there are often a large number of different types of noise interference in the acquisition and transmission of target signals. There will be strong background noise mixed in the target signal, which causes the essential characteristics of the target signal to be seriously obscured. Therefore, in most engineering application fields, noise is considered to be useless and harmful, and is the main cause of errors or errors in system output. Signal enhancement is the process of improving signal quality by eliminating noise (generated by surrounding sources or from the same source in the form of echoes) and filling in gaps caused by damage or intrusion. Traditional signal enhancement methods for typical communication systems include four types of algorithms: spectral subtraction algorithm, subspace algorithm, statistical model-based algorithm, and Wiener algorithm. The participation of different noises puts higher requirements on target signal detection and enhancement methods.
[0003] With the development of the Internet of Things and artificial intelligence, the detection and enhancement technology of target signals is currently developing in the direction of intelligence, and the level of its intelligence mainly depends on the analysis method or means adopted by itself. The use of methods such as deep learning can greatly improve the ability of data collection and feature extraction. It is more sensitive than traditional methods and manual methods in processing signal feature information under noise background. In addition, deep learning can also process a variety of data, learn and classify the information contained in different scenarios and different types of signals, avoiding the misjudgment caused by the experience of manual detection in traditional methods. The industrial Internet of Things environment is complex, and the recording equipment deployed in different areas needs to record the on-site sound environment in real time, which makes the recorded signal data also complex. On the one hand, the complex environmental noise interference of the industrial site will have a great impact on the clarity and accuracy of the real-time signal data. On the other hand, the requirement for real-time recording of signal data makes each signal data uncontrollable, which brings difficulties and challenges to the recognition and extraction of target signals. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a target signal enhancement method based on a generative adversarial network to solve the problem of difficulty in effectively extracting target signals in complex industrial Internet of Things scenarios.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A target signal enhancement method based on a generative adversarial network comprises the following steps:
[0007] S1: Use the training set to perform adversarial training on the generator and discriminator of the generative adversarial network. During the training process, an attention mechanism and an audio restoration module are added to obtain a trained target signal enhancement model.
[0008] S2: Use the trained target signal enhancement model to identify, extract, denoise and repair complex signal samples to obtain the target signal;
[0009] S3: Pruning and retraining the trained target signal enhancement model to optimize the target signal enhancement model.
[0010] Furthermore, the generator of the generative adversarial network uses MobileNetV3-Large as the base network.
[0011] Further, the training set in step S1 is constructed by the following steps:
[0012] The complex noisy signal r is preprocessed to extract the spectral features of the signal, and then the signal features are normalized. At the same time, the attention weight A and the correction coefficient C are added to each spectral feature point so that the preprocessed eigenvalues are suitable for different signal amplitudes. The preprocessed signal eigenvalues are:
[0013]
[0014] in, It is expressed as the normalization processing formula of the complex noisy signal r, and C(r,c) is expressed as the correction coefficient under the influence of the input signal r and the correction label c.
[0015] Further, the training process in step S1 is as follows:
[0016] S11: Generate the corresponding feature matrix R from the spectral feature value r' of the preprocessed complex noisy signal in the training set and input it into the generator G to obtain the output generated data s, where the matrix R = [r1', r2', r3', ..., r n '], n represents the number of sampling points of the spectral characteristic input of the complex noisy signal, r i ' represents the signal spectrum value of the i-th sampling point after data preprocessing;
[0017] The loss function of the generator is:
[0018] L G =L GAN +λ1L ss +λ2L rs +λ3L corr
[0019] Where L GANis the adversarial loss between the generator and the discriminator, L ss is the signal separation loss, L rs is the reconstruction loss, L corr To repair the damage;
[0020] The signal separation loss function is:
[0021] L ss =||f(s)-y(x)|| p
[0022] Where f(s) represents the generated signal of the generator, y(x) is the target signal, ||·|| p Expressed as L1 or L2 norm;
[0023] The reconstruction loss function is:
[0024]
[0025] In the formula, x[n] represents the target signal, s[n] represents the generated signal, and n represents the characteristic sampling point;
[0026] The repair loss function is:
[0027] L corr =f(s)+C(r,c)·(f(s)-y(x))
[0028] S12: Extract the target signal spectrum feature value x[n] and the generated data s[n] of the generator and input them into the discriminator D to perform identification training of the signal data. The loss function of the discriminator D is:
[0029] L D =BinaryCrossEntropy(z(x),z(f(s))
[0030] S13: Feedback the training result z(x) of the discriminator D to the generator G to affect its learning effect, and update the attention weight parameter A and the correction coefficient C at the same time; the attention weight is:
[0031]
[0032] Where Q represents the query matrix of attention weights, K represents the key matrix of attention weights, V represents the value matrix of attention weights, and V j It is represented as the j-th value matrix, σ is the sigmoid function, Q i 'Represented as a linear transformation of the attention weight of the ith query, K' j It is expressed as the linear transformation of the j-th key of the attention weight, expressed as:
[0033] Qi '=(QW q ) i
[0034] K j '=(KW k ) j
[0035] Where W q and W k is a trainable weight matrix, updated by the loss function L:
[0036]
[0037] and is the weight matrix at the tth iteration, μ is the learning rate, and is the gradient of the loss function with respect to the weight, and ω is the smoothing coefficient;
[0038] The correction coefficient C is initialized to 1, and the loss function L is repaired. corr Guidance Update:
[0039]
[0040] In the formula, C i t is the correction coefficient at the tth update;
[0041] The loss function L = αL in the update formula G +βL D , which is expressed as the loss combination of the generator and the discriminator, where α and β are weight coefficients.
[0042] Furthermore, the model pruning and retraining in step S3 specifically includes the following steps:
[0043] S31: Calculate the importance of weights: traverse all convolutional layers, obtain weights and calculate the gradient of weights, and then calculate the importance of weights, where the importance of weights is calculated as follows:
[0044]
[0045] Where w i is the i-th weight value, is the loss function L with respect to weight w i The gradient of , γ and δ are dynamic weight adjustment factors, and the weight calculation formula is optimized by adopting multiple dynamic weight adjustment strategies;
[0046] S32: Calculate the pruning threshold: combine all weight importance calculation results into a tensor I, and then calculate the pruning threshold θ according to the set weight importance percentage m%, so as to filter out weights whose importance is lower than this threshold, where the pruning threshold formula is:
[0047] θ=percentile(I(w),m%)
[0048] In the formula, I(w) is the importance set of all weights, and m% is the importance percentage of the weights;
[0049] S33: Pruning and retraining: After pruning weights with importance lower than m%, the generator is retrained to adjust the pruned parameters.
[0050] The beneficial effects of the present invention are:
[0051] 1. The signal enhancement method provided by the present invention can effectively extract the target signal from complex noisy signals. Based on the effective combination of generative adversarial networks, attention mechanisms and signal repair mechanisms, it can automatically identify and accurately extract key signal features, significantly improve the signal extraction effect in complex signal scenes, and overcome the problem that traditional signal processing technology has poor effects under complex noise interference.
[0052] 2. The signal repair mechanism provided by the present invention can adaptively repair distorted or data-missing signals, and ultimately output a more complete and clear target signal, thereby improving the overall effect of signal enhancement.
[0053] 3. The model designed by the present invention adopts model pruning and retraining technology to lightweight the model, optimize model redundancy, reduce model complexity and computational overhead, and reduce the load pressure of server deployment. This improvement not only improves the real-time processing capability of the signal processing system but also reduces resource consumption, making it more suitable for long-term stable operation in resource-constrained industrial environments.
[0054] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0056] Figure 1 The overall framework diagram of the target signal enhancement method provided by the embodiment of the present invention;
[0057] Figure 2 A schematic diagram of the structure of a signal enhancement method in an embodiment of the present invention;
[0058] Figure 3 The present invention is a flowchart of the model optimization design of the signal enhancement method in the embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0060] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0061] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0062] See also Figure 1 , which is an overall framework diagram of a target signal enhancement method based on a generative adversarial network. The present invention designs a generative adversarial network model, extracts complex signal features from the training set as the generator input, and then extracts the target signal features together with the generator's output signal as the discriminator input. The discriminator output is fed back to the generator as a result, and the target signal is enhanced through adversarial training of the generator and the discriminator.
[0063] Optionally, the neural network MobileNetV3-Large is used as the basic network of the generator. Through its efficient convolution structure, it reduces the computational complexity while maintaining good feature extraction capabilities, so that the generator can effectively recover a purer target signal from the complex noisy input signal. On the other hand, the discriminator can also quickly and accurately determine the authenticity of the generated signal, and pass the feedback information back to the generator through back propagation, thereby optimizing the generator performance.
[0064] Optionally, during the training process, an attention mechanism is added to the data preprocessing stage to increase the anti-interference ability of signal processing and improve the accuracy of signal processing. At the same time, the signal repair module is used to repair the distortion of the target signal. The discriminator output and the loss function during training are used to guide the update of attention weights and correction coefficients; in the model, the generator is responsible for extracting the target signal from the input complex noisy signal, while removing noise and repairing the original sound; the discriminator is responsible for evaluating the output of the generator;
[0065] In this embodiment, the target signal enhancement method model training process can be referred to Figure 2 , specifically including:
[0066] A1: Perform data preprocessing on the complex noisy signal r, extract the spectral features of the signal, and then normalize the signal features. At the same time, add attention weight A and correction coefficient C to each spectral feature point so that the preprocessed eigenvalue is suitable for different signal amplitudes. The formula for the preprocessed signal eigenvalue is:
[0067]
[0068] in, It is expressed as the normalization processing formula of the complex noisy signal r, and C(r,c) is expressed as the correction coefficient under the influence of the input signal r and the correction label c;
[0069] A2: Generate the corresponding feature matrix R from the preprocessed complex noisy signal spectrum feature value r' and input it into the generator G to obtain the output generated data s, where the matrix R = [r1', r2', r3', ..., r n '], n represents the number of sampling points of the spectral characteristic input of the complex noisy signal, r i ' represents the signal spectrum value of the i-th sampling point after data preprocessing; the loss function of the generator is:
[0070] L G =L GAN +λ1L ss +λ2L rs +λ3L corr
[0071] In the formula, L GAN is the adversarial loss between the generator and the discriminator, which is used to guide the generator to generate more accurate and realistic target signals. ss is the signal separation loss, L rs is the reconstruction loss, L corr To repair the damage;
[0072] The signal separation loss function L ss It is used to measure the separation effect of the generated signal and the background noise to ensure that the generated signal is clearly separated from the noise. The specific formula is:
[0073] L ss =||f(s)-y(x)|| p
[0074] In the formula, f(s) represents the generated signal of the generator, y(x) is the target signal, ||·|| p Expressed as L1 or L2 norm.
[0075] The reconstruction loss function L rs It is used to measure the reconstruction effect of the generated signal to ensure that the generator can more accurately reconstruct a generated signal that is closer to the target signal from a complex noisy signal. The specific formula is:
[0076]
[0077] In the formula, x[n] represents the target signal, s[n] represents the generated signal, and n represents the characteristic sampling point;
[0078] The repair loss function L corr It is used to measure the effect of the generator in repairing distorted or missing data signals. The specific formula is:
[0079] L corr =f(s)+C(r,c)·(f(s)-y(x))
[0080] In the formula, f(s) represents the generated signal, C(r,c) represents the correction coefficient, and y(x) represents the target signal;
[0081] A3: Extract the target signal spectrum feature value x[n] and the generator's generated data s[n] and input them into the discriminator D for signal data identification training; the loss function of the discriminator is:
[0082] L D =BinaryCrossEntropy(z(x),z(f(s))
[0083] It is used to measure the difference between real data and generated data in the discriminator. z(x) represents the output of the discriminator on the real data, and z(f(s) represents the judgment of the discriminator on the output of the generator.
[0084] A4: Feedback the training result z(x) of the discriminator D to the generator G to affect its learning effect, and update the attention weight parameter A and the correction coefficient C at the same time;
[0085] The attention weight is calculated using the scaled dot product attention mechanism calculation formula, and an activation function is added during the calculation process to optimize the applicability and flexibility of the weight calculation. The specific formula is:
[0086]
[0087] In the formula, Q represents the query matrix of attention weights, K represents the key matrix of attention weights, V represents the value matrix of attention weights, and V j It is represented as the j-th value matrix, σ(x) is the sigmoid function, Q i 'Represented as a linear transformation of the attention weight of the ith query, K' j It is expressed as a linear transformation of the j-th key of the attention weight:
[0088] Q i '=(QW q ) i
[0089] K j '=(KW k ) j
[0090] Where W q and W k It is a trainable weight matrix, which is updated through the loss function L. It uses the standard gradient descent and momentum term to avoid the oscillation in the gradient descent process, making the optimization process smoother and faster, and making it more efficient to extract relevant features. The specific formula is:
[0091]
[0092] in the formula and is the weight matrix at the tth iteration, μ is the learning rate, and is the gradient of the loss function with respect to the weight, and ω is the smoothing coefficient; in the above update formula, the loss function L = αL G +βL D , which is expressed as the loss combination of the generator and the discriminator, where α and β are weight coefficients;
[0093] The correction coefficient C is initialized to 1, and the loss function L is repaired. corr Guidance update, specific formula:
[0094]
[0095] in the formula is the correction coefficient at the tth update, μ is the learning rate;
[0096] A5: Use the trained generator and discriminator to identify, extract, denoise and repair complex signal samples to obtain the target signal, and compare and verify the enhanced target signal with the target signal sample;
[0097] Optionally, use pruning and retraining techniques to optimize the model, reduce model redundancy, and further improve model performance and computational efficiency. Finally, use the trained and optimized model to identify, extract, denoise, and repair target signals in complex signals to achieve enhanced target signal functions. This method improves the accuracy and effect of target signal processing in complex signals, and provides more real-time and reliable signal data processing capabilities for complex signal scenario applications.
[0098] For more information on the optimization process of model pruning and retraining, please refer to Figure 3 , specifically:
[0099] B1: Calculate the importance of weights: traverse all convolutional layers, obtain weights and calculate the gradient of weights, and then calculate the importance of weights. Multiple dynamic weight adjustment strategies are used to optimize the weight calculation formula. The weight size and gradient loss are combined to measure the contribution of weights to loss changes, and the weights that have a greater impact on the model are further amplified. At the same time, logarithmic penalty terms are used to constrain weights to maintain the stability of the model. The specific calculation formula is:
[0100]
[0101] W in the formula i is the i-th weight value, is the loss function L on the weight W i The gradient of , γ and δ are dynamic weight adjustment factors, which are dynamically adjusted according to the needs of model training at different stages;
[0102] B2: Calculate the pruning threshold: combine all weight importance calculation results into a tensor I, and then calculate the pruning threshold θ according to the set weight importance percentage m% to filter out weights with importance lower than this threshold. The pruning threshold formula is:
[0103] θ=percentile(I(w),m%)
[0104] In the formula, I(w) is the importance set of all weights, and m% is the importance percentage of the weights;
[0105] B3: Pruning and retraining: After pruning weights with importance lower than m%, the generator is retrained to adjust the pruned parameters.
[0106] In the above embodiments, the description's reference to "this embodiment" indicates that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least some embodiments, but not necessarily all embodiments. Multiple occurrences of "this embodiment" do not necessarily all refer to the same embodiment.
[0107] In the above-described embodiments, although the invention has been described in conjunction with specific embodiments of the invention, many substitutions, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other storage structures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed. Embodiments of the invention are intended to encompass all such substitutions, modifications, and variations that fall within the broad scope of the appended claims.
[0108] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in this embodiment is implemented.
[0109] This embodiment also provides an electronic terminal, including: a processor and a memory;
[0110] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes any one of the methods in this embodiment.
[0111] The computer-readable storage medium in this embodiment can be understood by ordinary technicians in this field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0112] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes each step of the above method.
[0113] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0114] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0115] The present invention can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
[0116] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A target signal enhancement method based on a generative adversarial network, characterized in that: The following steps are involved: S1: Use the training set to perform adversarial training on the generator and discriminator of the generative adversarial network. During the training process, an attention mechanism and an audio restoration module are added to obtain a trained target signal enhancement model. S2: Use the trained target signal enhancement model to identify, extract, denoise and repair complex signal samples to obtain the target signal; S3: Pruning and retraining the trained target signal enhancement model to optimize the target signal enhancement model.
2. The target signal enhancement method based on generative adversarial network according to claim 1, characterized in that: The generator of the generative adversarial network uses MobileNetV3-Large as the base network.
3. The target signal enhancement method based on generative adversarial network according to claim 1, characterized in that: The training set in step S1 is constructed by the following steps: The complex noisy signal r is preprocessed to extract the spectral features of the signal, and then the signal features are normalized. At the same time, the attention weight A and the correction coefficient C are added to each spectral feature point so that the preprocessed eigenvalues are suitable for different signal amplitudes. The preprocessed signal eigenvalues are: in, It is expressed as the normalization processing formula of the complex noisy signal r, and C(r,c) is expressed as the correction coefficient under the influence of the input signal r and the correction label c.
4. The target signal enhancement method based on generative adversarial network according to claim 3 is characterized in that: The training process in step S1 is as follows: S11: Generate the corresponding feature matrix R from the spectral feature value r' of the preprocessed complex noisy signal in the training set and input it into the generator G to obtain the output generated data s, where the matrix R = [r1', r2', r3', ..., r n '], n represents the number of sampling points of the spectral characteristic input of the complex noisy signal, r i ' represents the signal spectrum value of the i-th sampling point after data preprocessing; The loss function of the generator is: L G =L GAN +λ1L ss +λ2L rs +λ3L corr Where L GAN is the adversarial loss between the generator and the discriminator, L ss is the signal separation loss, L rs is the reconstruction loss, L corr To repair the damage; The signal separation loss function is: L ss =||f(s)-y(x)|| p Where f(s) represents the generated signal of the generator, y(x) is the target signal, ||·|| p Expressed as L1 or L2 norm; The reconstruction loss function is: In the formula, x[n] represents the target signal, s[n] represents the generated signal, and n represents the characteristic sampling point; The repair loss function is: L corr =f(s)+C(r,c)·(f(s)-y(x)) S12: Extract the target signal spectrum feature value x[n] and the generated data s[n] of the generator and input them into the discriminator D to perform identification training of the signal data. The loss function of the discriminator D is: L D =BinaryCrossEntropy(z(x),z(f(s)) S13: Feedback the training result z(x) of the discriminator D to the generator G to affect its learning effect, and update the attention weight parameter A and the correction coefficient C at the same time; the attention weight is: Where Q represents the query matrix of attention weights, K represents the key matrix of attention weights, V represents the value matrix of attention weights, and V j It is represented as the j-th value matrix, σ is the sigmoid function, Q i 'Represented as a linear transformation of the attention weight of the ith query, K' j It is expressed as the linear transformation of the j-th key of the attention weight, expressed as: Where W q and W k is a trainable weight matrix, updated by the loss function L: and is the weight matrix at the tth iteration, μ is the learning rate, and is the gradient of the loss function with respect to the weight, and ω is the smoothing coefficient; The correction coefficient C is initialized to 1, and the loss function L is repaired. corr Guidance Update: in the formula is the correction coefficient at the tth update; The loss function L = αL in the update formula G +βL D , which is expressed as the loss combination of the generator and the discriminator, where α and β are weight coefficients.
5. The target signal enhancement method based on generative adversarial network according to claim 1, characterized in that: The model pruning and retraining in step S3 specifically includes the following steps: S31: Calculate the importance of weights: traverse all convolutional layers, obtain weights and calculate the gradient of weights, and then calculate the importance of weights, where the importance of weights is calculated as follows: Where w i is the i-th weight value, is the loss function L with respect to weight w i The gradient of , γ and δ are dynamic weight adjustment factors, and the weight calculation formula is optimized by adopting multiple dynamic weight adjustment strategies; S32: Calculate the pruning threshold: combine all weight importance calculation results into a tensor I, and then calculate the pruning threshold θ according to the set weight importance percentage m%, so as to filter out weights whose importance is lower than this threshold, where the pruning threshold formula is: θ=percentile(I(w),m%) In the formula, I(w) is the importance set of all weights, and m% is the importance percentage of the weights; S33: Pruning and retraining: After pruning weights with importance lower than m%, the generator is retrained to adjust the pruned parameters.