Edge deployment-oriented neural network video coding model lightweight method
By introducing structured sparsity constraints and feature guidance mechanisms into the neural network video coding model, redundant structures are automatically identified and reduced, solving the problem of high computing resources and storage overhead on edge devices, and achieving efficient video compression and preservation of reconstruction quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUHAI XINLINGYU COMMUNICATIONS CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-01
AI Technical Summary
Existing neural network video coding models incur high computational and storage overhead when deployed on edge devices, and existing lightweight technologies struggle to maintain stability and efficiency in terms of reconstruction quality and channel correlation.
By introducing structured sparsity constraints and feature guidance mechanisms into the model, and using sparsity loss function and rate distortion loss to jointly train the mask parameters, redundant structures are automatically identified and reduced. Combined with the features of the target benchmark model for collaborative training, channel-level structure optimization is achieved.
It significantly reduces computing and storage costs on edge devices while maintaining good compression efficiency and video quality, improving the feasibility of deploying the model in resource-constrained environments.
Smart Images

Figure CN121967701A_ABST
Abstract
Description
A Lightweight Method for Neural Network Video Coding Models for Edge Deployment Technical Field
[0001] This invention belongs to the field of lightweight neural network video coding model and structural optimization technology, and particularly relates to a lightweight method for neural network video coding models for edge deployment. Background Technology
[0002] With the rapid development of digitalization and 5G technology, image and video acquisition equipment has become increasingly widespread, leading to an explosive growth in video data volume. Traditional video coding technologies are gradually struggling to keep pace with the demands of this data growth, especially in terms of further improving compression efficiency, where they face significant bottlenecks. In recent years, video compression methods based on deep convolutional neural networks have attracted widespread attention due to their powerful ability to model complex spatiotemporal correlations. They can achieve superior visual quality compared to traditional methods at the same or lower bitrates, demonstrating enormous application potential.
[0003] However, such neural network models typically have a large number of parameters and complex structures, resulting in extremely high computational and storage costs during training and inference. This characteristic severely limits their real-time deployment and application on mobile terminals and edge devices where computing power, storage space, and power consumption are all limited. Therefore, how to effectively reduce the computational and storage costs of neural network video coding models while maintaining compression quality has become a key challenge in promoting the practical application of this technology.
[0004] Currently, the main lightweight model techniques include model compression (such as pruning) and knowledge distillation. However, in the specific task of video compression, existing techniques have significant shortcomings: 1) Model compression methods (such as structured pruning) struggle to maintain stable structured sparsity in video compression tasks, easily leading to a significant decrease in reconstruction quality; 2) While knowledge distillation methods can alleviate performance loss, existing solutions are mostly designed for semantic tasks such as image classification and object detection, and have limited adaptability to video compression models with strict bitrate constraints and high sensitivity to channel structure; 3) Because video compression tasks are extremely dependent on the correlation between channels, general sparsity training methods often suffer from unstable convergence and substandard compression efficiency in this scenario.
[0005] In summary, while existing lightweighting techniques have made progress in improving model inference efficiency, their main optimization targets are focused on tasks such as classification and detection, failing to adequately address the stringent requirements of video compression models in terms of reconstruction quality, channel correlation, and structural stability. This results in traditional methods exhibiting common drawbacks when applied to video compression models, including unstable sparse training, insufficient lightweighting effects, or significant performance degradation. These problems are particularly pronounced in resource-constrained edge computing scenarios.
[0006] Therefore, there is an urgent need in this field for a lightweight method that can achieve controllable sparsity, structural stability, and high compression performance, in order to promote the effective deployment of neural network video coding technology in resource-constrained environments. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention provides a lightweight method for neural network video coding models designed for edge deployment. This method introduces structured sparsity constraints into the model and promotes the preservation of important channels and the automatic reduction of redundant structures through a feature-guided mechanism. Furthermore, by combining features from the target baseline model, it achieves collaborative training that optimizes channel-level structure and maintains performance. The method proposed in this invention can reduce the energy consumption and computational resource overhead of deploying video compression models on edge devices while maintaining good compression efficiency and video quality, thereby improving user experience and increasing the feasibility of deploying the model on resource-constrained edge devices.
[0008] This invention provides a lightweight method for edge-deployed neural network video coding models, comprising the following steps:
[0009] A video compression model based on neural networks was constructed as a baseline model to be optimized.
[0010] Several mask layers are inserted at preset positions in the baseline model to be optimized. The mask parameters are jointly trained using the sparsity loss function and the rate distortion loss to obtain a mask parameter distribution with channel importance discrimination.
[0011] When the proportion of mask parameters compressed to zero in any mask layer reaches the preset target sparsity, the sparse update of the corresponding mask layer is stopped, and the mask layer state that has reached the sparsity target is obtained.
[0012] Based on the mask layer state that achieves the sparsity target, each mask layer is fused with the adjacent network layer to obtain a structurally compressed neural network model.
[0013] By removing all mask layers from the compressed neural network model, a lightweight video coding model is obtained and deployed on an edge device to perform video compression tasks.
[0014] Optionally, several mask layers are inserted at preset positions in the baseline model to be optimized, including:
[0015] In the baseline model to be optimized, a mask layer is inserted between adjacent first and second convolutional layers;
[0016] Based on the number of input channels of the mask layer, initialize the same number of mask parameters, and initialize each mask parameter to 1.
[0017] Optionally, the mask parameters can be jointly trained using a sparsity loss function and a rate-distortion loss, including:
[0018] The sparsification gradient of the mask parameters is calculated based on the absolute value of the difference between the value of each mask parameter and 1.
[0019] The mask parameters are updated together based on the gradient of the sparsification gradient and the gradient of the rate-distortion loss with respect to the mask parameters.
[0020] Optionally, the sparsification gradient is configured as follows:
[0021] When the mask parameter value is equal to 1, the gradient is zero;
[0022] When the mask parameter value is between 0 and 1, the gradient value increases as the mask parameter deviates from 1.
[0023] When the mask parameter value is greater than 1, the gradient value is positive.
[0024] Optionally, each mask layer is merged with the adjacent network layer, including:
[0025] For channels whose mask parameter values approach zero, delete the output of the corresponding channel in the previous convolutional layer and the input of the corresponding channel in the next convolutional layer.
[0026] For channels with mask parameter values greater than zero, the corresponding mask parameter value is multiplied into the kernel weights of the corresponding channel in the next convolutional layer.
[0027] Optionally, after removing all masking layers from the structurally compressed neural network model to obtain a lightweight video coding model, the model further includes:
[0028] Based on the aforementioned lightweight video coding model, parameter fine-tuning is performed using training data in a limited number of rounds to optimize model performance.
[0029] This invention also proposes a lightweight system for edge-deployed neural network video coding models, used to implement the method, comprising:
[0030] The model building module is used to build a video compression model based on a neural network, which serves as a baseline model to be optimized.
[0031] A mask insertion module is used to insert several mask layers at preset positions in the baseline model to be optimized;
[0032] The joint training module is used to jointly train the mask parameters of the mask layer using a sparsity loss function and a rate-distortion loss to obtain a mask parameter distribution with channel importance discrimination.
[0033] The sparsity monitoring module is used to monitor the proportion of mask parameters that are compressed to zero in each mask layer. When the proportion of mask parameters that are compressed to zero in any mask layer reaches the preset target sparsity, the sparsity update of the corresponding mask layer is stopped, and the state of the mask layer that has reached the sparsity target is obtained.
[0034] The structure fusion module is used to fuse each mask layer with the adjacent network layer based on the mask layer state that has achieved the sparsity target, so as to obtain a structure-compressed neural network model.
[0035] The mask removal module is used to remove all mask layers from the compressed neural network model and output a lightweight video coding model for performing video compression tasks on edge devices.
[0036] The present invention also proposes a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0037] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method.
[0038] The present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of the method.
[0039] Compared with the prior art, the present invention has the following advantages and technical effects:
[0040] This invention introduces a trainable mask layer and designs a guided sparse loss function to drive the mask parameters to automatically evolve towards a "preserved" or "pruned" state during joint training. This mechanism can automatically and accurately select the most critical feature channels for video compression during training, thereby maximizing the preservation of the model's expressive power when implementing structured pruning. Its technical effect is that it significantly alleviates the performance degradation problem caused by traditional channel pruning methods, enabling the compressed lightweight model to maintain excellent reconstruction quality and compression performance even in complex scenes.
[0041] This invention combines a scalable encoder structure based on residual representation learning to achieve smooth model capability transfer. By integrating a mask attenuation mechanism with residual representation learning, the encoder can adaptively generate feature representations that match the target size of the final lightweight model. This technique enables smooth structural and knowledge transfer from a large-capacity baseline model to a small-scale deployment model. Its technical advantage lies in providing the model with excellent scalability and deployment flexibility, allowing lightweight models generated using the same method to adapt to platforms with different computing power constraints, from mobile phones to edge devices, while maintaining high compression efficiency and stable reconstruction quality at the same bitrate.
[0042] This invention, based on automatic convergence control of target sparsity, achieves a stable and low-complexity lightweight process. By setting a preset target sparsity and monitoring the sparsification progress of the mask layer, the training process automatically stops sparsity optimization when a preset pruning ratio is reached. This technique replaces the traditional method's reliance on repeated manual adjustments to the pruning threshold. Its advantages lie in significantly reducing the design difficulty and parameter tuning cost of the model lightweighting process, while ensuring stable convergence during training and the determinism of the final model structure, making the lightweighting process more efficient and reliable.
[0043] Through the aforementioned synergistic technical means, this invention can significantly reduce model complexity, improve inference speed and deployment efficiency of edge devices, and is applicable to compression, acceleration and real-time processing tasks in resource-constrained scenarios of deep learning video compression models. Attached Figure Description
[0044] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0045] Figure 1 is a schematic diagram of the insertion method of the mask layer between two convolutional layers in an embodiment of the present invention and the parameter evolution from initialization to decay completion;
[0046] Figure 2 is a schematic diagram of the changes in the convolutional structure after the mask layer channels are compressed and fused according to an embodiment of the present invention. Detailed Implementation
[0047] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0048] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0049] Example 1
[0050] This embodiment provides a lightweight method for neural network video coding models deployed at the edge, including the following steps:
[0051] A video compression model based on neural networks was constructed as a baseline model to be optimized.
[0052] Several mask layers are inserted at preset positions in the baseline model to be optimized. The mask parameters are jointly trained using the sparsity loss function and the rate-distortion loss to obtain a mask parameter distribution with channel importance discrimination. During the joint training process, the model parameters are updated only based on the rate-distortion loss to optimize video coding performance. The mask parameters are updated by introducing a mask attenuation term on the basis of the rate-distortion loss gradient to gradually achieve channel sparsity.
[0053] When the proportion of mask parameters compressed to zero in any mask layer reaches the preset target sparsity, the sparse update of the corresponding mask layer is stopped, and the mask layer state that has reached the sparsity target is obtained. In this embodiment, "compressed to zero" means that after the mask parameters are subjected to sparsity constraints during the training process, their values decay to below a preset threshold, so that the corresponding channels are deleted in the structure fusion stage.
[0054] Based on the mask layer state that achieves the sparsity target, each mask layer is fused with the adjacent network layer to obtain a structurally compressed neural network model.
[0055] By removing all mask layers from the compressed neural network model, a lightweight video coding model is obtained and deployed on an edge device to perform video compression tasks.
[0056] As a feasible implementation, this method utilizes structured parameter masks and mask decay mechanisms to achieve synergistic optimization of compression quality and model complexity. First, structured masks are inserted between several channel transformation positions in the video compression model network to be optimized, compressing the channel dimensions of the intermediate representations. The mask consists of a set of trainable scalars, each corresponding to a channel. Input features are multiplied with the mask channel-by-channel in the forward computation, thus achieving explicit control over the channel contribution. During training, the mask not only participates in normal gradient updates but is also constrained by a sparsity regularization term, gradually converging into a distribution with significant structured sparsity, automatically distinguishing channel importance. Masks for important channels tend to be preserved, while masks for redundant channels gradually decay to near zero. After training, the retention of channels is determined based on the values of the parameters in the mask. Channels with smaller weights are removed, thereby simultaneously reducing the output channels of the previous layer and the input channels of the next layer, achieving compression of the overall network structure. To eliminate the additional computational burden during deployment, this embodiment further merges the mask layer into adjacent convolutional layers: that is, by multiplying the mask coefficients with the corresponding channel weights of the next layer's convolutional kernel, the two are merged, so that the final model no longer explicitly contains a mask structure. This "mask decay—sparserization—structured pruning—weight merging" mechanism can achieve efficient channel compression without changing the original forward inference path, enabling the neural network video coding model to have a lower parameter size, smaller memory footprint, and higher inference efficiency on edge devices.
[0057] Specifically, the following steps are included:
[0058] Step 1): Select a target baseline model and insert mask layers. First, construct or determine a neural network video compression model with a high number of channels and a large network capacity as the baseline model for subsequent structural compression. Then, insert several mask layers at predetermined positions on this baseline model. As shown in Figure 1, each mask layer is placed between adjacent first and second convolutional layers to perform channel-level compression on the intermediate features between them. Each mask layer contains the number of input channels corresponding to its input channel count. The same number of mask parameters, all initialized to 1.
[0059] Step 2): Optimize the mask parameters based on the sparsity objective. This involves adjusting the inserted mask vector... Apply a channel offset penalty function as a sparse loss. This sparsity loss guides the convergence of mask parameters to two stable points (0 and 1), leading to controllable sparsity and a clear channel selectivity. The sparsity loss gradually reduces the mask parameters corresponding to non-critical channels to near zero, effectively suppressing unimportant channels. Simultaneously, it keeps the mask parameters corresponding to critical channels close to 1 to avoid unnecessary impact on the original model's performance. Through continuous optimization of this sparsity loss, a mask parameter distribution with clear channel selectivity can be obtained without significantly reducing model accuracy.
[0060] The gradient of this sparse loss is defined as follows:
[0061]
[0062] in Representing vectors The gradient value of a single scalar component within the mask reflects the direction and magnitude of the mask parameters that should be updated.
[0063] when When the gradient is 0, the mask parameters remain stable, indicating that this channel should be preserved;
[0064] when When, the gradient value follows and As the difference increases, the mask parameter gradually decreases to near 0.
[0065] when When the gradient value is positive, it falls back to the point where... nearby.
[0066] Through the gradient design described above, critical channels and non-critical channels can be automatically distinguished during training.
[0067] The mask parameters are updated according to the following iterative formula:
[0068]
[0069] in Let be the learning rate for sparse terms. To reduce distortion loss, For rate distortion loss Weights of the influence on mask parameters.
[0070] Formula (2) shows that:
[0071] First item Push the mask to become sparse (0 or 1);
[0072] Second item Ensure the model maintains its original performance during compression;
[0073] The two work together to enable the mask to automatically differentiate the importance of channels while maintaining reconstruction accuracy.
[0074] Through the above joint optimization mechanism, a mask distribution that combines sparsity and performance stability can be obtained, providing a basis for subsequent structured channel pruning.
[0075] Step 3): Determine the sparsity completeness of the mask layer and stop the mask decay process. During training, when the proportion of mask parameters compressed to zero in a certain mask layer reaches the preset target sparsity, i.e., the number of effective channels increases from zero, the sparsity decreases from zero. converge to the target value If the sparsity completeness is not achieved, then sparse updates to the mask layer will cease, and its current parameter state will be maintained without further decay. By monitoring the sparsity completeness, the network structure can be gradually converged to the number of channels required by the target compressed model during training, thereby ensuring that the compression process automatically terminates when the "optimal channel size" is reached.
[0076] Step 4): As shown in Figure 2, the mask layer is fused back into the network structure. When the mask parameters reach the preset sparsity, the decay process of the corresponding mask layer stops, and a mask fusion operation is performed to construct the final simplified network structure. Specifically: For channels with a mask value of zero, they are simultaneously deleted from the output channel of the previous convolutional layer and the input channel of the next convolutional layer, thereby achieving channel-level structured pruning and effectively reducing the network size. For channels with a mask value greater than zero, the mask value is directly multiplied into the convolutional kernel weights of the next convolutional layer to absorb the scaling effect of the original mask layer, thus ensuring that the network function remains consistent before and after fusion. After the above fusion is completed, the mask layer can be removed as a whole, and the model structure is solidified into the final compressed model form.
[0077] Before fusion, the effect of the mask layer between the two convolutional layers can be represented by equation (3):
[0078]
[0079] Formula (3) represents the function of the mask layer between two convolutional layers, where and These are the kernel weights of the previous and next convolutional layers, respectively. For activation function, This is a mask parameter vector that corresponds one-to-one with the intermediate feature channels. This indicates that multiplication is performed channel by channel. This is the feature representation output to the next layer after masking and modulation, which is the final output of this structural block.
[0080] Step 5): Construct and fine-tune the compressed model. After mask fusion, remove all mask layers from the network to obtain the final structured, compressed, and simplified model. At this point, the number of network channels has been effectively reduced, significantly shrinking the overall structure while retaining most of the effective feature representations of the original baseline model. Subsequently, fine-tune the simplified model with a few training epochs to further restore model performance on the compressed structure. The fine-tuned model can then be used as the final lightweight network structure for inference and deployment.
[0081] The above steps can be summarized as Algorithm 1:
[0082] Algorithm 1 Mask Attenuation Joint Training Process 1. Initialization: 2. Initialize model parameters for a large-capacity base model 3. Insert the corresponding mask vector for each layer that requires compression. 4. Initialize all of them to 1; 5. Set the mask decay learning rate to 1. The rate-distortion gradient learning rate of the mask parameters The model parameters, rate-distortion loss, and learning rate are... 6. Set sparse targets 7. For round = 1 to do8. Randomly sample a batch from the training data. 9. Propagate forward and calculate rate distortion loss 10. For each mask do11. Calculate the gradient 12. Update mask parameters. 13. 14. End For 15. Update model parameters based on rate-distortion loss: 16. 17. For each do18. If Then freeze the mask update. 19. End For 20. End For 21. Perform small batch fine-tuning on the lightweight model after freezing the structure; 22. Return the compressed lightweight model parameters. ; surface
[0083] in, This represents the proportion of parameters in the mask vector that are close to 0, and is used to measure the sparsity completeness of the mask layer.
[0084] This embodiment provides a lightweight method for video coding models based on sparse regularization loss and mask decay mechanisms. By introducing structured parameter masks into the model and autonomously learning channel importance during training, it achieves automatic identification and gradual reduction of redundant channels. This method utilizes sparse regularization loss to drive mask parameters towards structured sparsity, and combines a mask fusion strategy to solidify effective channels into the model structure in the later stages of training, thereby significantly reducing computational load and parameter count. Simultaneously, the channel fusion strategy during training further reduces model size and inference computation overhead, achieving efficient acceleration while maintaining compression performance and video quality. While maintaining essentially the same video compression quality, this embodiment can significantly reduce model complexity, improve inference speed and deployment efficiency on edge devices, and is suitable for compression, acceleration, and real-time processing tasks in resource-constrained scenarios for deep learning video compression models.
[0085] On the other hand, this embodiment also proposes a lightweight system for edge-deployed neural network video coding models to implement the method, including:
[0086] The model building module is used to build a video compression model based on a neural network, which serves as a baseline model to be optimized.
[0087] A mask insertion module is used to insert several mask layers at preset positions in the baseline model to be optimized;
[0088] The joint training module is used to jointly train the mask parameters of the mask layer using a sparsity loss function and a rate-distortion loss to obtain a mask parameter distribution with channel importance discrimination.
[0089] The sparsity monitoring module is used to monitor the proportion of mask parameters that are compressed to zero in each mask layer. When the proportion of mask parameters that are compressed to zero in any mask layer reaches the preset target sparsity, the sparsity update of the corresponding mask layer is stopped, and the state of the mask layer that has reached the sparsity target is obtained.
[0090] The structure fusion module is used to fuse each mask layer with the adjacent network layer based on the mask layer state that has achieved the sparsity target, so as to obtain a structure-compressed neural network model.
[0091] The mask removal module is used to remove all mask layers from the compressed neural network model and output a lightweight video coding model for performing video compression tasks on edge devices.
[0092] On the other hand, this embodiment also proposes a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0093] On the other hand, this embodiment also proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method.
[0094] On the other hand, this embodiment also proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of the method.
[0095] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A lightweight method for edge-deployed neural network video coding models, characterized in that, Includes the following steps: A video compression model is constructed based on a neural network as a baseline model to be optimized. Several mask layers are inserted at preset positions in the baseline model to be optimized. The mask parameters are jointly trained using a sparsity loss function and a rate-distortion loss to obtain a mask parameter distribution with channel importance discrimination. When the proportion of mask parameters compressed to zero in any mask layer reaches the preset target sparsity, the sparse update of the corresponding mask layer is stopped, and the mask layer state that has reached the sparsity target is obtained. Based on the mask layer state that achieves the sparsity target, each mask layer is fused with the adjacent network layer to obtain a structurally compressed neural network model. All mask layers in the structurally compressed neural network model are then removed to obtain a lightweight video coding model, which is deployed on an edge device to perform video compression tasks.
2. The method according to claim 1, characterized in that, Inserting several mask layers at preset positions in the baseline model to be optimized includes: inserting a mask layer between adjacent first and second convolutional layers in the baseline model to be optimized; initializing the same number of mask parameters based on the number of input channels of the mask layer, and initializing each mask parameter to 1.
3. The method according to claim 1, characterized in that, Joint training of mask parameters using a sparsity loss function and a rate-distortion loss includes: calculating the sparsity gradient of the mask parameters based on the absolute value of the difference between the value of each mask parameter and 1; and updating the mask parameters together based on the sparsity gradient and the gradient of the mask parameters with respect to the rate-distortion loss.
4. The method according to claim 3, characterized in that, The sparsification gradient is configured such that: when the mask parameter value is equal to 1, the gradient is zero; when the mask parameter value is between 0 and 1, the absolute value of the gradient increases as the mask parameter deviates from 1; and when the mask parameter value is greater than 1, the gradient value is positive.
5. The method according to claim 1, characterized in that, The mask layers are fused with adjacent network layers, including: for channels with mask parameter values close to zero, the output of the corresponding channel in the previous convolutional layer and the input of the corresponding channel in the next convolutional layer are deleted; for channels with mask parameter values greater than zero, the corresponding mask parameter values are multiplied into the convolutional kernel weights of the corresponding channel in the next convolutional layer.
6. The method according to claim 1, characterized in that, After removing all mask layers from the compressed neural network model to obtain a lightweight video coding model, the process further includes: using training data to fine-tune the parameters in a limited number of rounds based on the lightweight video coding model to optimize model performance.
7. A lightweight system for edge-deployed neural network video coding models, used to implement the method of any one of claims 1 to 6, characterized in that, include: The model building module is used to build a video compression model based on a neural network, which serves as a baseline model to be optimized. A mask insertion module is used to insert several mask layers at preset positions on the baseline model to be optimized. The joint training module is used to jointly train the mask parameters of the mask layer using a sparsity loss function and a rate-distortion loss to obtain a mask parameter distribution with channel importance discrimination. The sparsity monitoring module is used to monitor the proportion of mask parameters that are compressed to zero in each mask layer. When the proportion of mask parameters that are compressed to zero in any mask layer reaches the preset target sparsity, the sparsity update of the corresponding mask layer is stopped, and the state of the mask layer that has reached the sparsity target is obtained. The structure fusion module is used to fuse each mask layer with the adjacent network layer based on the mask layer state that has achieved the sparsity target, so as to obtain a structure-compressed neural network model. The mask removal module is used to remove all mask layers from the compressed neural network model and output a lightweight video coding model for performing video compression tasks on edge devices.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-6.