A multi-terminal large model compression strategy selection method based on swarm intelligence optimization

CN121683898BActive Publication Date: 2026-10-09SHENHUA HOLLYSYS INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511792800.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-10-09
Estimated Expiration
2045-12-01

AI Technical Summary

Technical Problem

现有技术往往缺乏一个综合性的、自适应的压缩策略选择机制,不能根据不同硬件平台的资源限制和需求,动态调整压缩策略

Benefits of technology

本发明通过提出一种基于群智能优化的多端大模型压缩策略选择方法,解决了现有技术中模型压缩方法在不同硬件平台上的适应性差、压缩效率低的问题。通过改进的DEPSO算法引入自适应步长控制机制,并结合DenseNet网络的特性,本发明能够针对不同硬件平台(如嵌入式设备、边缘设备、移动设备等)自适应选择最合适的压缩策略,使得大规模深度学习模型在资源受限的环境中得以高效部署。本方法的最大优点是能够根据硬件平台的计算能力、内存容量和带宽等资源特性,动态调整压缩策略,避免了传统方法中压缩策略的固定化和人工选择。通过对硬件资源的评估,本发明能够自动选择量化、稀疏化、深度剪枝或蒸馏等压缩方法,根据不同平台的需求动态优化压缩过程,确保在保持推理精度的同时,尽可能减少计算和存储开销。这种自适应选择机制不仅提高了压缩效率,还使得压缩后的模型能够更好地适应不同硬件平台,优化推理精度、计算效率和存储占用三者之间的平衡。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121683898B_ABST
    Figure CN121683898B_ABST
Patent Text Reader

Abstract

The application discloses a multi-terminal large model compression strategy selection method based on swarm intelligence optimization, which comprises the following steps: step one, collecting the resource characteristics of the target hardware platform and analyzing the resource restrictions; step two, initializing the improved DEPSO algorithm, and designing a particle encoder to generate the starting point of the compression strategy; step three, defining the compression strategy space and multi-objective optimization; step four, introducing an adaptive step control mechanism for global search of the particle swarm; step five, determining the priority and pruning ratio of each layer feature map through the feature selection and pruning mechanism; step six, performing feature recombination and hierarchical connection optimization to select the compression strategy for different hardware platforms; and step seven, applying the multi-terminal adaptive compression strategy to the target hardware platform for inference verification and optimizing the compression strategy. Through the improved DEPSO algorithm and the DenseNet network, the application realizes efficient compression and deployment of the multi-terminal large model and optimizes the hardware adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model compression technology, and in particular to a method for selecting multi-terminal large model compression strategies based on swarm intelligence optimization. Background Technology

[0002] With the rapid development of artificial intelligence technology, deep learning models have achieved remarkable results in various tasks. However, as the scale of models continues to increase, especially in large-scale deep neural networks, the computational and storage requirements become exceptionally large. Deploying these large-scale models on resource-constrained hardware platforms, such as embedded devices, edge computing platforms, and mobile devices, presents significant challenges. Therefore, how to reduce the computational and storage requirements of models while maintaining inference accuracy has become an urgent problem to be solved in the field of deep learning. Existing deep learning model compression techniques mainly include pruning, quantization, distillation, and sparsification. These methods reduce the number of model parameters and computational complexity through different strategies. Pruning methods reduce model complexity by removing redundant connections or neurons in the neural network; quantization methods reduce model size by reducing the number of weights and activation bits; distillation methods maintain high accuracy while reducing computational resource consumption by transferring knowledge from a large model to a smaller model; and sparsification methods further compress the model's storage requirements by resetting most weights to zero. While these methods alleviate the difficulties of deploying large models to some extent, they are typically static, rely on manually set rules, lack adaptability, and have poor compatibility with different hardware platforms.

[0003] A major problem with current model compression techniques is that they typically only consider the needs of a specific hardware platform or task, neglecting the differences between hardware platforms. For example, quantization might be the preferred solution for devices with limited memory, but deep pruning or distillation strategies might be more suitable for devices with higher computing power. Existing technologies often lack a comprehensive, adaptive compression strategy selection mechanism, failing to dynamically adjust compression strategies based on the resource constraints and requirements of different hardware platforms. Therefore, how to automatically select the most suitable compression strategy based on the computing power, memory capacity, and bandwidth characteristics of a hardware platform has become a pressing technical challenge.

[0004] Therefore, how to provide a method for selecting multi-terminal large model compression strategies based on swarm intelligence optimization is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a multi-device large model compression strategy selection method based on swarm intelligence optimization. This method adaptively selects the most suitable compression strategy for different hardware platforms through an improved DEPSO algorithm and DenseNet network optimization. This approach can dynamically adjust the compression strategy according to hardware resources (computing power, memory capacity, bandwidth, etc.), balancing compression ratio, computational overhead, and inference accuracy. This enables efficient compression and deployment of large models in resource-constrained environments such as embedded devices and edge computing platforms, optimizing inference performance and storage usage.

[0006] A method for selecting a multi-terminal large model compression strategy based on swarm intelligence optimization according to an embodiment of the present invention includes the following steps: Step 1: Collect the resource characteristics of the target hardware platform, including computing power, memory capacity and bandwidth, and analyze the resource limitations of the target hardware platform to generate hardware resource evaluation results; Step 2: Initialize the improved DEPSO algorithm based on the hardware resource evaluation results, design the particle encoder, refine the compression strategy of each layer through multi-dimensional feature representation, and generate the starting point of the compression strategy. Step 3: Based on the starting point of the compression strategy, define the compression strategy space and multi-objective optimization, and generate the compression strategy space and optimization objective setting results; Step 4: The improved DEPSO algorithm introduces an adaptive step size control mechanism to perform global particle swarm search, dynamically adjusts the step size of the particles, updates the compression strategy according to the current position of the particles, calculates the evaluation value of the current compression strategy, and adjusts the particle velocity and position to generate compression strategy parameters. Step 5: Based on the compression strategy parameters, optimize each layer of the DenseNet network through feature selection and cropping mechanisms, determine the priority and cropping ratio of the feature maps of each layer, and obtain the DenseNet optimization results; Step 6: Based on the DenseNet optimization results, perform feature recombination and hierarchical connection optimization, select compression strategies for different hardware platforms, and generate multi-end adaptive compression strategies; Step 7: Apply the multi-terminal adaptive compression strategy to the target hardware platform for inference verification, and optimize the compression strategy based on the actual feedback from the target hardware platform to generate compression model verification and optimization results.

[0007] Optionally, step one specifically includes: The computing power includes the processor type, number of cores and clock frequency of the target hardware platform; the memory capacity includes the total memory and available memory of the target hardware platform; and the bandwidth includes memory bandwidth and network bandwidth. Based on the collected resource characteristics, resource limits for the target hardware platform are generated, including the resource availability and occupancy range. Based on the aforementioned resource constraints and the specific requirements of different target hardware platforms, the compression requirements for each target hardware platform are determined. Based on the resource constraints and compression requirements of the target hardware platform, generate hardware resource assessment results.

[0008] Optionally, the compression requirement specifically includes: For target hardware platforms with computing power below a preset threshold, a compression strategy with the lowest computational overhead is adopted; Select the compression strategy with the lowest memory consumption for target hardware platforms with memory capacity less than a preset threshold; For target hardware platforms with bandwidth less than a preset threshold, select the compression strategy with the lowest bandwidth consumption.

[0009] Optionally, step two specifically involves: Based on the hardware resource evaluation results, the improved DEPSO algorithm is initialized. The initialization includes setting the number of particles in the particle swarm, the maximum number of iterations, and the learning factor parameters. Define the search space for each particle in the particle swarm; Design a particle encoder to represent the compression strategy of each layer. The compression strategy of each layer is refined by multi-dimensional feature representation. The encoding of each particle is a multi-dimensional vector, where each dimension corresponds to different parameters of the compression strategy of each layer. The initial position and velocity of each particle are initialized, the initial state of the compression strategy is represented by a particle encoder, and a fitness value is assigned to each particle to obtain the starting point of the compression strategy. The fitness value is based on the effect of the compression strategy, including compression ratio, computational overhead and inference accuracy.

[0010] Optionally, the search space specifically includes: The search space includes compression strategies for each layer; During the search process, particles optimize the compression effect by adjusting the parameters of the compression strategy; The compression strategy includes pruning ratio, quantization accuracy, and sparsity.

[0011] Optionally, step three specifically includes: Based on the starting point of the compression strategy, a compression strategy space is defined, which includes pruning compression method, quantization compression method, sparsification compression method and distillation compression method. Each compression method corresponds to multiple parameter settings, including pruning ratio, quantization accuracy, sparsification degree and distillation temperature. For each compression method, determine the corresponding parameter setting range, and adjust the parameter setting range according to the characteristics of the hardware platform and task requirements; A multi-objective optimization is set, which includes compression ratio, computational overhead and inference accuracy. The relationship between compression ratio, computational overhead and inference accuracy is balanced according to the resource limitations of different hardware platforms. Based on the compression strategy space and multi-objective optimization, the compression strategy space and optimization objective setting results are generated.

[0012] Optionally, step four specifically involves: An adaptive step size control mechanism is introduced to dynamically adjust the step size of particles in the improved DEPSO algorithm. The step size is adjusted according to the current search progress of the particles. When the particles are in the neighborhood of a local optimum, the step size is reduced to refine the search; when the particles are outside the neighborhood of a local optimum, the step size is increased to accelerate the global search and expand the search range. Based on the compression strategy at each particle's current position, the particle's velocity and position are updated. The particle's velocity represents the adjustment range of the compression strategy, and the particle's position represents the current state of the compression strategy. Based on the changes in the particle's current position and velocity, the particle searches for the globally optimal compression scheme in the compression strategy space. The evaluation value of the current compression strategy is calculated based on the compression ratio, computational overhead, and inference accuracy, and the performance of the current compression strategy on the target hardware platform is evaluated; the evaluation value is used to guide the movement direction of the particles in the search space. Based on the evaluation value of the current compression strategy, the particle velocity and position are adjusted. The particle velocity is updated according to the difference between the current optimal solution and the global optimal solution until the particle moves towards the direction of the global optimal solution. The optimal compression strategy parameters are generated through global particle swarm optimization, including pruning ratio, quantization accuracy, and sparsity.

[0013] Optionally, step five specifically includes: Based on the compression strategy parameters, feature selection and pruning mechanisms are used to optimize each layer in the DenseNet network; The feature selection dynamically adjusts the feature maps of each layer based on the importance evaluation results of each layer's feature maps; the pruning mechanism adjusts the number of feature maps in each layer and the connection method between feature maps by pruning layer by layer based on the contribution of the feature maps and the redundancy of each layer's feature maps. Specific steps include: The importance of the feature map at each layer is evaluated by calculating the contribution of each layer's feature map to the final inference accuracy, and by taking into account the redundancy, computational overhead, and memory consumption of the feature map to determine the priority of each layer's feature map. The pruning ratio of each layer's feature map is dynamically determined based on the priority of each layer's feature map, combined with the requirements for compression ratio, computational overhead, and inference accuracy. The pruning ratio is adjusted according to the importance of each layer's feature map and the set compression target. The number of feature maps in each layer and the allocation of computing resources are dynamically adjusted during the optimization process to generate the DenseNet optimized result.

[0014] Optionally, step six specifically includes: Based on the DenseNet optimization results, feature recombination and hierarchical connection optimization are performed. Feature recombination optimizes the representation capability of features by weighted fusion of feature maps of each layer. Hierarchical connection optimization optimizes information flow by adjusting the connection relationship between the layers of the DenseNet network. Based on the computing power, memory capacity, and bandwidth of the hardware platform, the most suitable compression strategy is adaptively selected for different hardware platforms; the process of selecting the most suitable compression strategy is determined through hardware resource evaluation results, specifically including: On a target hardware platform with memory capacity less than a preset threshold, quantization and sparsification methods are preferentially selected. The quantization methods include low-bit-width quantization and weight sharing methods, and the sparsification methods include weight sparsification and pruning. On a target hardware platform with computing power greater than a preset threshold, a compression strategy of deep pruning or distillation is selected. The deep pruning reduces the amount of computation by removing redundant parts while retaining key connection structures. After adaptively selecting a compression strategy through the hardware platform, a multi-terminal adaptive compression strategy is generated.

[0015] Optionally, step seven specifically includes: The multi-terminal adaptive compression strategy is applied to the target hardware platform for model deployment to obtain a compressed model. The target hardware platform includes embedded devices, edge devices, and mobile devices. Inference verification is performed on the target hardware platform to evaluate the inference accuracy, computational efficiency, and storage usage of the compressed model. The inference accuracy refers to the prediction accuracy of the compressed model, the computational efficiency refers to the computational resources consumed during the inference process, and the storage usage refers to the memory size occupied by the compressed model on the target hardware platform. Based on the actual feedback from the target hardware platform, the analysis and inference accuracy, computational efficiency, and storage usage are compared with the expected targets to obtain feedback results; Based on the feedback results, the compression strategy is further optimized and the compression model verification and optimization results are generated. The optimization includes adjusting the quantization accuracy, pruning ratio, sparsity degree and feature map pruning.

[0016] The beneficial effects of this invention are: This invention proposes a multi-platform large-scale model compression strategy selection method based on swarm intelligence optimization, solving the problems of poor adaptability and low compression efficiency of existing model compression methods on different hardware platforms. By introducing an adaptive step-size control mechanism through an improved DEPSO algorithm and combining it with the characteristics of the DenseNet network, this invention can adaptively select the most suitable compression strategy for different hardware platforms (such as embedded devices, edge devices, and mobile devices), enabling efficient deployment of large-scale deep learning models in resource-constrained environments. The greatest advantage of this method is its ability to dynamically adjust the compression strategy based on the resource characteristics of the hardware platform, such as computing power, memory capacity, and bandwidth, avoiding the fixed compression strategy and manual selection required in traditional methods. Through hardware resource evaluation, this invention can automatically select compression methods such as quantization, sparsification, depth pruning, or distillation, dynamically optimizing the compression process according to the needs of different platforms, ensuring that computational and storage overhead is minimized while maintaining inference accuracy. This adaptive selection mechanism not only improves compression efficiency but also allows the compressed model to better adapt to different hardware platforms, optimizing the balance between inference accuracy, computational efficiency, and storage usage.

[0017] Through DenseNet optimization and feature reorganization mechanisms, this invention enables fine-grained optimization of each layer's feature maps, dynamically adjusting the pruning ratio and the number of feature maps in each layer to reduce redundant computations and retain key features. This mechanism effectively reduces the model's computational complexity and memory consumption while ensuring that the compressed model's inference capabilities remain unaffected across different hardware platforms. Furthermore, by introducing the DEPSO algorithm with adaptive step size control, local optima are avoided during the global search process, making the compression strategy more efficient and intelligent in multi-objective optimization of compression ratio, computational overhead, and inference accuracy. This invention significantly improves the adaptability and inference performance of large models across different hardware platforms, providing strong technical support for the widespread adoption and application of deep learning technology in resource-constrained embedded devices, edge computing platforms, and mobile devices. Through this automated, flexible, and efficient compression strategy selection method, large models can meet the stringent requirements of various hardware platforms for inference accuracy and computational efficiency with lower computational costs and storage requirements. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0019] Figure 1 This is an overall flowchart of a multi-terminal large model compression strategy selection method based on swarm intelligence optimization proposed in this invention; Figure 2This is a schematic diagram of the particle swarm global search process of the improved DEPSO algorithm based on a multi-terminal large model compression strategy selection method proposed in this invention. Figure 3 This diagram illustrates the DenseNet feature recombination and hierarchical connection optimization of a multi-terminal large model compression strategy selection method based on swarm intelligence optimization proposed in this invention. Detailed Implementation

[0020] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0021] refer to Figure 1-3 A method for selecting a multi-terminal large model compression strategy based on swarm intelligence optimization includes the following steps: Step 1: Collect the resource characteristics of the target hardware platform, including computing power, memory capacity and bandwidth, and analyze the resource limitations of the target hardware platform to generate hardware resource evaluation results; Step 2: Initialize the improved DEPSO algorithm based on the hardware resource evaluation results, design the particle encoder, refine the compression strategy of each layer through multi-dimensional feature representation, and generate the starting point of the compression strategy. Step 3: Based on the starting point of the compression strategy, define the compression strategy space and multi-objective optimization, and generate the compression strategy space and optimization objective setting results; Step 4: The improved DEPSO algorithm introduces an adaptive step size control mechanism to perform global particle swarm search, dynamically adjusts the step size of the particles, updates the compression strategy according to the current position of the particles, calculates the evaluation value of the current compression strategy, and adjusts the particle velocity and position to generate compression strategy parameters. Step 5: Based on the compression strategy parameters, optimize each layer of the DenseNet network through feature selection and cropping mechanisms, determine the priority and cropping ratio of the feature maps of each layer, and obtain the DenseNet optimization results; Step 6: Based on the DenseNet optimization results, perform feature recombination and hierarchical connection optimization, select compression strategies for different hardware platforms, and generate multi-end adaptive compression strategies; Step 7: Apply the multi-terminal adaptive compression strategy to the target hardware platform for inference verification, and optimize the compression strategy based on the actual feedback from the target hardware platform to generate compression model verification and optimization results.

[0022] In this embodiment, step one specifically includes: The computing power includes the processor type, number of cores and clock frequency of the target hardware platform; the memory capacity includes the total memory and available memory of the target hardware platform; and the bandwidth includes memory bandwidth and network bandwidth. Based on the collected resource characteristics, resource limits for the target hardware platform are generated, including the resource availability and occupancy range. Based on the aforementioned resource constraints and the specific requirements of different target hardware platforms, the compression requirements for each target hardware platform are determined. Based on the resource constraints and compression requirements of the target hardware platform, generate hardware resource assessment results.

[0023] In this embodiment, the compression requirement specifically refers to: For target hardware platforms with computing power below a preset threshold, a compression strategy with the lowest computational overhead is adopted; Select the compression strategy with the lowest memory consumption for target hardware platforms with memory capacity less than a preset threshold; For target hardware platforms with bandwidth less than a preset threshold, select the compression strategy with the lowest bandwidth consumption.

[0024] In this embodiment, step two specifically includes: Based on the hardware resource evaluation results, the improved DEPSO algorithm is initialized. The initialization includes setting the number of particles in the particle swarm, the maximum number of iterations, and the learning factor parameters. Define the search space for each particle in the particle swarm; Design a particle encoder to represent the compression strategy of each layer. The compression strategy of each layer is refined by multi-dimensional feature representation. The encoding of each particle is a multi-dimensional vector, where each dimension corresponds to different parameters of the compression strategy of each layer. The initial position and velocity of each particle are initialized, the initial state of the compression strategy is represented by a particle encoder, and a fitness value is assigned to each particle to obtain the starting point of the compression strategy. The fitness value is based on the effect of the compression strategy, including compression ratio, computational overhead and inference accuracy.

[0025] In this embodiment, the search space specifically refers to: The search space includes compression strategies for each layer; During the search process, particles optimize the compression effect by adjusting the parameters of the compression strategy; The compression strategy includes pruning ratio, quantization accuracy, and sparsity.

[0026] In this embodiment, step three specifically includes: Based on the starting point of the compression strategy, a compression strategy space is defined, which includes pruning compression method, quantization compression method, sparsification compression method and distillation compression method. Each compression method corresponds to multiple parameter settings, including pruning ratio, quantization accuracy, sparsification degree and distillation temperature. For each compression method, determine the corresponding parameter setting range, and adjust the parameter setting range according to the characteristics of the hardware platform and task requirements; A multi-objective optimization is set, which includes compression ratio, computational overhead and inference accuracy. The relationship between compression ratio, computational overhead and inference accuracy is balanced according to the resource limitations of different hardware platforms. Based on the compression strategy space and multi-objective optimization, the compression strategy space and optimization objective setting results are generated.

[0027] In this embodiment, step four specifically includes: An adaptive step size control mechanism is introduced to dynamically adjust the step size of particles in the improved DEPSO algorithm. The step size is adjusted according to the current search progress of the particles. When the particles are in the neighborhood of a local optimum, the step size is reduced to refine the search; when the particles are outside the neighborhood of a local optimum, the step size is increased to accelerate the global search and expand the search range. Based on the compression strategy at each particle's current position, the particle's velocity and position are updated. The particle's velocity represents the adjustment range of the compression strategy, and the particle's position represents the current state of the compression strategy. Based on the changes in the particle's current position and velocity, the particle searches for the globally optimal compression scheme in the compression strategy space. The evaluation value of the current compression strategy is calculated based on the compression ratio, computational overhead, and inference accuracy, and the performance of the current compression strategy on the target hardware platform is evaluated; the evaluation value is used to guide the movement direction of the particles in the search space. Based on the evaluation value of the current compression strategy, the particle velocity and position are adjusted. The particle velocity is updated according to the difference between the current optimal solution and the global optimal solution until the particle moves towards the direction of the global optimal solution. The optimal compression strategy parameters are generated through global particle swarm optimization, including pruning ratio, quantization accuracy, and sparsity.

[0028] This step optimizes the particle search process of the improved DEPSO algorithm by introducing an adaptive step-size control mechanism, ensuring efficient and accurate convergence of particles in the search space. This mechanism dynamically adjusts the step size based on the particle's current position and the neighborhood relationship with local optima. This allows the particle to refine its search when near a local optimum, avoiding getting trapped in local optima, while increasing the step size when far from a local optimum, expanding the search range and improving global search capabilities. This improvement significantly enhances the algorithm's search efficiency and convergence speed. When optimizing the compression strategy, based on evaluations of compression ratio, computational cost, and inference accuracy, the particle dynamically adjusts its speed and position, achieving optimal selection of compression strategy parameters (such as pruning ratio, quantization accuracy, and sparsity), ensuring the best compression effect, computational efficiency, and inference accuracy on the target hardware platform. Through this method, model compression is not only more efficient but also adaptively adaptable to the resource constraints of different hardware platforms, providing a more flexible and intelligent solution.

[0029] In this embodiment, step five specifically includes: Based on the compression strategy parameters, feature selection and pruning mechanisms are used to optimize each layer in the DenseNet network; The feature selection dynamically adjusts the feature maps of each layer based on the importance evaluation results of each layer's feature maps; the pruning mechanism adjusts the number of feature maps in each layer and the connection method between feature maps by pruning layer by layer based on the contribution of the feature maps and the redundancy of each layer's feature maps. Specific steps include: The importance of the feature map at each layer is evaluated by calculating the contribution of each layer's feature map to the final inference accuracy, and by taking into account the redundancy, computational overhead, and memory consumption of the feature map to determine the priority of each layer's feature map. The pruning ratio of each layer's feature map is dynamically determined based on the priority of each layer's feature map, combined with the requirements for compression ratio, computational overhead, and inference accuracy. The pruning ratio is adjusted according to the importance of each layer's feature map and the set compression target. The number of feature maps in each layer and the allocation of computing resources are dynamically adjusted during the optimization process to generate the DenseNet optimized result.

[0030] This step achieves fine-grained optimization of each layer in the DenseNet network by introducing a feature selection and pruning mechanism. Based on the compression strategy parameters, the feature selection mechanism dynamically adjusts the feature maps of each layer to ensure that features that contribute significantly to inference accuracy are retained. Through layer-by-layer pruning, unnecessary feature maps are removed by considering their contribution and redundancy, thereby reducing computational and storage overhead and improving model efficiency. When evaluating the importance of each layer's feature maps, factors such as their contribution to inference accuracy, redundancy, computational overhead, and memory consumption are considered. The pruning ratio of the feature maps is determined based on these evaluation results to balance the requirements of compression ratio, computational overhead, and inference accuracy. Ultimately, the optimized DenseNet network structure not only significantly improves computational efficiency and memory consumption but also maintains high-precision inference capabilities. This feature pruning mechanism based on dynamic adjustment and adaptive optimization significantly improves the model's compression performance while ensuring efficient deployment and application of the model on various hardware platforms.

[0031] In this embodiment, step six specifically includes: Based on the DenseNet optimization results, feature recombination and hierarchical connection optimization are performed. Feature recombination optimizes the representation capability of features by weighted fusion of feature maps of each layer. Hierarchical connection optimization optimizes information flow by adjusting the connection relationship between the layers of the DenseNet network. Based on the computing power, memory capacity, and bandwidth of the hardware platform, the most suitable compression strategy is adaptively selected for different hardware platforms; the process of selecting the most suitable compression strategy is determined through hardware resource evaluation results, specifically including: On a target hardware platform with memory capacity less than a preset threshold, quantization and sparsification methods are preferentially selected. The quantization methods include low-bit-width quantization and weight sharing methods, and the sparsification methods include weight sparsification and pruning. On a target hardware platform with computing power greater than a preset threshold, a compression strategy of deep pruning or distillation is selected. The deep pruning reduces the amount of computation by removing redundant parts while retaining key connection structures. After adaptively selecting a compression strategy through the hardware platform, a multi-terminal adaptive compression strategy is generated.

[0032] This step effectively improves the compression performance and inference performance of the DenseNet network on different hardware platforms through feature recombination and hierarchical connection optimization. Feature recombination optimizes the representational power of features by weighted fusion of feature maps at each layer, ensuring the preservation of key features and improving the robustness of the model. Hierarchical connection optimization optimizes the information flow by adjusting the connection relationships between the layers of the DenseNet network, thereby enhancing the network's feature representation ability and computational efficiency. Based on this, this invention adaptively selects the most suitable compression strategy according to the resource characteristics of the hardware platform, such as computing power, memory capacity, and bandwidth. On platforms with memory capacity less than a preset threshold, quantization and sparsification methods, such as low-bit-width quantization and weight sharing methods, are preferred to reduce memory consumption; while on platforms with strong computing power, depth pruning or distillation strategies are selected to reduce computational overhead and improve inference speed. Finally, by adaptively selecting compression strategies for different hardware platforms, efficient optimization for different hardware platforms is achieved, and a multi-platform adaptive compression strategy is generated, ensuring the best performance of the model on resource-constrained platforms.

[0033] In this embodiment, step seven specifically includes: The multi-terminal adaptive compression strategy is applied to the target hardware platform for model deployment to obtain a compressed model. The target hardware platform includes embedded devices, edge devices, and mobile devices. Inference verification is performed on the target hardware platform to evaluate the inference accuracy, computational efficiency, and storage usage of the compressed model. The inference accuracy refers to the prediction accuracy of the compressed model, the computational efficiency refers to the computational resources consumed during the inference process, and the storage usage refers to the memory size occupied by the compressed model on the target hardware platform. Based on the actual feedback from the target hardware platform, the analysis and inference accuracy, computational efficiency, and storage usage are compared with the expected targets to obtain feedback results; Based on the feedback results, the compression strategy is further optimized and the compression model verification and optimization results are generated. The optimization includes adjusting the quantization accuracy, pruning ratio, sparsity degree and feature map pruning.

[0034] Example 1: To verify the feasibility of this invention in practice, it was applied to an edge computing platform, demonstrating how a multi-device large-model compression strategy selection method based on swarm intelligence optimization can solve the deployment problem of large-scale deep learning models on resource-constrained devices. DenseNet was used for compression optimization on embedded devices, and the results were compared with traditional compression methods to verify the effectiveness of the invention. In a real-world scenario, we used an embedded device with low computing power and limited memory capacity as the target hardware platform. This device has a 1.2 GHz single-core processor, 2 GB of memory, and a bandwidth of 200 MB / s. Due to the relatively limited computing and memory resources of this device, traditional model compression methods, such as deep pruning and distillation, cannot effectively reduce computing and storage requirements while maintaining inference accuracy. Typically, deep pruning significantly reduces network performance, while distillation, although maintaining some model accuracy, often requires high computing resources and has poor adaptability to hardware platforms.

[0035] To address this issue, we employ the swarm intelligence-based optimization method for selecting compression strategies for large multi-device models, as described in this invention. Combining hardware resource evaluation results, we first analyze the computing power, memory capacity, and bandwidth of the target device. Based on these evaluation results, the system adaptively selects quantization and sparsity strategies. These strategies demonstrate good performance on platforms with limited memory, maintaining high inference accuracy while reducing computational and memory consumption. In specific applications, the system first performs global optimization of the compression strategy using an improved DEPSO algorithm with an adaptive step-size control mechanism. During the search process, the algorithm dynamically adjusts the particle step size according to the resource constraints and performance requirements of the current hardware platform, thereby avoiding getting trapped in local optima. After multiple iterations of optimization, the final compression strategies include low-bit-width quantization (quantization ratio of 4-bit), weight sharing (sparseness of 60%), and pruning (pruning rate of 30%). These strategies effectively reduce the computational load and memory consumption of the model while maximizing inference accuracy.

[0036] After deploying the optimized model to the target hardware platform, we performed inference verification. Inference accuracy results show that the compressed model maintains the original accuracy while reducing inference accuracy by only 0.5%. Compared to traditional deep pruning methods, the compressed model improves computational efficiency by approximately 35% and reduces memory usage by 40% on the same hardware platform. To further verify the effectiveness of this invention, we compared the performance of traditional methods and the method of this invention on the same hardware platform; the specific data are as follows:

[0037] Table 1. Comparison of experimental data between traditional methods and the method of this invention.

[0038] As shown in Table 1, while traditional deep pruning improves upon traditional methods in reducing storage and computational overhead, it significantly reduces inference accuracy. Traditional distillation methods maintain accuracy to some extent, but their optimization of computational efficiency and memory usage is weak. In contrast, the compression strategy of this invention, by combining quantization, sparsification, and pruning methods, significantly reduces computational and storage requirements while maintaining almost the same inference accuracy as the original model, and its optimization of computational efficiency and memory usage is also more significant. Through the above experiments, we can conclude that the multi-terminal large-model compression strategy selection method based on swarm intelligence optimization proposed in this invention can effectively solve the deployment problem of large-scale deep learning models on resource-constrained platforms. Especially in hardware-constrained environments such as embedded devices, it can provide higher computational efficiency, lower memory usage, and maintain high inference accuracy, providing a practical solution for the application of deep learning models in edge computing and embedded platforms.

[0039] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for selecting a multi-terminal large model compression strategy based on swarm intelligence optimization, characterized in that, Includes the following steps: Step 1: Collect the resource characteristics of the target hardware platform, including computing power, memory capacity and bandwidth, and analyze the resource limitations of the target hardware platform to generate hardware resource evaluation results; Step 2: Initialize the improved DEPSO algorithm based on the hardware resource evaluation results, design the particle encoder, refine the compression strategy of each layer through multi-dimensional feature representation, and generate the starting point of the compression strategy. Step two specifically involves: Based on the hardware resource evaluation results, the improved DEPSO algorithm is initialized. The initialization includes setting the number of particles in the particle swarm, the maximum number of iterations, and the learning factor parameters. A search space is defined for each particle in the particle swarm, and the search space includes a compression strategy for each layer. During the search process, the particles optimize the compression effect by adjusting the parameters of the compression strategy. Design a particle encoder to represent the compression strategy of each layer. The compression strategy of each layer is refined by multi-dimensional feature representation. The encoding of each particle is a multi-dimensional vector, where each dimension corresponds to different parameters of the compression strategy of each layer. The initial position and velocity of each particle are initialized, the initial state of the compression strategy is represented by a particle encoder, and a fitness value is assigned to each particle to obtain the starting point of the compression strategy. The fitness value includes the compression ratio, computational overhead, and inference accuracy index. Step 3: Based on the starting point of the compression strategy, define the compression strategy space and multi-objective optimization, and generate the compression strategy space and optimization objective setting results; Step 4: The improved DEPSO algorithm introduces an adaptive step size control mechanism to perform global particle swarm search, dynamically adjusts the step size of the particles, updates the compression strategy according to the current position of the particles, calculates the evaluation value of the current compression strategy, and adjusts the particle velocity and position to generate compression strategy parameters. Step four specifically involves: An adaptive step size control mechanism is introduced to dynamically adjust the step size of particles in the improved DEPSO algorithm. The step size is adjusted according to the current search progress of the particles. When the particles are in the neighborhood of a local optimum, the step size is reduced to refine the search; when the particles are outside the neighborhood of a local optimum, the step size is increased to accelerate the global search and expand the search range. Based on the compression strategy at each particle's current position, the particle's velocity and position are updated. The particle's velocity represents the adjustment range of the compression strategy, and the particle's position represents the current state of the compression strategy. Based on the changes in the particle's current position and velocity, the particle searches for the globally optimal compression scheme in the compression strategy space. The evaluation value of the current compression strategy is calculated based on the compression ratio, computational overhead, and inference accuracy, and the performance of the current compression strategy on the target hardware platform is evaluated; the evaluation value is used to guide the movement direction of the particles in the search space. Based on the evaluation value of the current compression strategy, the particle velocity and position are adjusted. The particle velocity is updated according to the difference between the current optimal solution and the global optimal solution until the particle moves towards the direction of the global optimal solution. The optimal compression strategy parameters are generated through global particle swarm optimization, including pruning ratio, quantization accuracy, and sparsity. Step 5: Based on the compression strategy parameters, optimize each layer of the DenseNet network through feature selection and cropping mechanisms, determine the priority and cropping ratio of the feature maps of each layer, and obtain the DenseNet optimization results; Step 6: Based on the DenseNet optimization results, perform feature recombination and hierarchical connection optimization, select compression strategies for different hardware platforms, and generate multi-end adaptive compression strategies; Step six specifically involves: Based on the DenseNet optimization results, feature recombination and hierarchical connection optimization are performed. The feature recombination optimizes the representation capability of features by weighted fusion of feature maps at each layer. The hierarchical connectivity optimization optimizes information flow by adjusting the connectivity relationships between different layers of the DenseNet network. Based on the computing power, memory capacity, and bandwidth of the hardware platform, the most suitable compression strategy is adaptively selected for different hardware platforms. The process of selecting the most suitable compression strategy is determined based on hardware resource evaluation results, and specifically includes: On a target hardware platform with memory capacity less than a preset threshold, quantization and sparsification methods are preferentially selected. The quantization methods include low-bit-width quantization and weight sharing methods, and the sparsification methods include weight sparsification and pruning. On a target hardware platform with computing power greater than a preset threshold, a compression strategy of deep pruning or distillation is selected. The deep pruning reduces the amount of computation by removing redundant parts while retaining key connection structures. After adaptively selecting the compression strategy through the hardware platform, a multi-end adaptive compression strategy is generated. Step 7: Apply the multi-terminal adaptive compression strategy to the target hardware platform for inference verification, and optimize the compression strategy based on the actual feedback from the target hardware platform to generate compression model verification and optimization results.

2. The method for selecting a multi-terminal large model compression strategy based on swarm intelligence optimization according to claim 1, characterized in that, Step one specifically involves: The computing power includes the processor type, number of cores and clock frequency of the target hardware platform; the memory capacity includes the total memory and available memory of the target hardware platform; and the bandwidth includes memory bandwidth and network bandwidth. Based on the collected resource characteristics, resource limits for the target hardware platform are generated, including the resource availability and occupancy range. Based on the aforementioned resource constraints and considering the specific requirements of different target hardware platforms, the compression requirements for each target hardware platform are determined. These compression requirements specifically include: For target hardware platforms with computing power below a preset threshold, a compression strategy with the lowest computational overhead is adopted; Select the compression strategy with the lowest memory consumption for target hardware platforms with memory capacity less than a preset threshold; For target hardware platforms with bandwidth less than a preset threshold, select the compression strategy with the lowest bandwidth consumption; Based on the resource constraints and compression requirements of the target hardware platform, generate hardware resource assessment results.

3. The method for selecting a multi-terminal large model compression strategy based on swarm intelligence optimization according to claim 1, characterized in that, Step three specifically involves: Based on the starting point of the compression strategy, a compression strategy space is defined, which includes pruning compression method, quantization compression method, sparsification compression method and distillation compression method. Each compression method corresponds to multiple parameter settings, including pruning ratio, quantization accuracy, sparsification degree and distillation temperature. For each compression method, determine the corresponding parameter setting range, and adjust the parameter setting range according to the characteristics of the hardware platform and task requirements; A multi-objective optimization is set, which includes compression ratio, computational overhead and inference accuracy. The relationship between compression ratio, computational overhead and inference accuracy is balanced according to the resource limitations of different hardware platforms. Based on the compression strategy space and multi-objective optimization, the compression strategy space and optimization objective setting results are generated.

4. The method for selecting a multi-terminal large model compression strategy based on swarm intelligence optimization according to claim 1, characterized in that, Step five specifically involves: Based on the compression strategy parameters, feature selection and pruning mechanisms are used to optimize each layer in the DenseNet network; The feature selection dynamically adjusts the feature map of each layer based on the importance evaluation results of the feature map of each layer; The pruning mechanism adjusts the number of feature maps in each layer and the connection method between feature maps by pruning layer by layer based on the contribution of the feature maps and the redundancy of each layer. The specific steps include: The importance of the feature map at each layer is evaluated by calculating the contribution of each layer's feature map to the final inference accuracy, and by taking into account the redundancy, computational overhead, and memory consumption of the feature map to determine the priority of each layer's feature map. The pruning ratio of each layer's feature map is dynamically determined based on the priority of each layer's feature map, combined with the requirements for compression ratio, computational overhead, and inference accuracy. The pruning ratio is adjusted according to the importance of each layer's feature map and the set compression target. The number of feature maps in each layer and the allocation of computing resources are dynamically adjusted during the optimization process to generate the DenseNet optimized result.

5. The method for selecting a multi-terminal large model compression strategy based on swarm intelligence optimization according to claim 1, characterized in that, Step seven specifically involves: The multi-terminal adaptive compression strategy is applied to the target hardware platform for model deployment to obtain a compressed model. The target hardware platform includes embedded devices, edge devices, and mobile devices. Inference verification is performed on the target hardware platform to evaluate the inference accuracy, computational efficiency, and storage usage of the compressed model. The inference accuracy refers to the prediction accuracy of the compressed model, the computational efficiency refers to the computational resources consumed during the inference process, and the storage usage refers to the memory size occupied by the compressed model on the target hardware platform. Based on the actual feedback from the target hardware platform, the analysis and inference accuracy, computational efficiency, and storage usage are compared with the expected targets to obtain feedback results; Based on the feedback results, the compression strategy is further optimized and the compression model verification and optimization results are generated. The optimization includes adjusting the quantization accuracy, pruning ratio, sparsity degree and feature map pruning.

Citation Information

Patent Citations

  • Model quantification strategy determination method and device, model quantification method and device, medium and equipment

    CN118690871A

  • Large model reasoning efficiency dynamic optimization and hardware sensing compression method

    CN120494006A