A multi-device model deployment method and system based on adaptive pruning optimization

CN122569956APending Publication Date: 2026-08-14THE FIRST AFFILIATED HOSPITAL ZHEJIANG UNIV COLLEGE OF MEDICINE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

且模型部署环境也存在较大差异,例如部署环境计算能力、部署环境内存容量、部署环境能耗,这些因素都对模型的部署和运行效果产生重要影响

Benefits of technology

[0048]首先基于所有模型部署请求中各自对应的模型功能信息,对所有模型部署请求进行分类操作,以得到多个模型部署请求簇;进一步确定多个模型部署请求簇各自对应的数据集;进一步分别基于多个模型部署请求簇各自对应的数据集训练得到多个模型部署请求簇各自对应的训练后助教网络模型;进一步针对每一模型部署请求簇,均基于模型部署请求簇中多个模型部署请求各自对应的模型部署环境信息,对模型部署请求簇对应的训练后助教网络模型进行多次剪枝操作,以获取模型部署请求簇中多个模型部署请求各自对应的学生网络模型。避免了每次都从原始模型开始训练,实现集中且高效的针对多台设备发起的不同模型部署请求进行模型部署。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122569956A_ABST
    Figure CN122569956A_ABST
Patent Text Reader

Abstract

This invention relates to a multi-device model deployment method and system based on adaptive pruning optimization. The model deployment method includes: classifying all model deployment requests based on the model functional information corresponding to each of the multiple model deployment requests to obtain multiple model deployment request clusters; determining the datasets corresponding to each of the multiple model deployment request clusters; training the corresponding post-trained teaching assistant network models for each of the multiple model deployment request clusters based on the datasets corresponding to each of the multiple model deployment request clusters; and performing multiple pruning operations on the post-trained teaching assistant network models corresponding to each model deployment request cluster based on the model deployment environment information corresponding to each of the multiple model deployment requests in the cluster to obtain the corresponding student network models for each of the multiple model deployment requests in the cluster. This achieves centralized and efficient model deployment for different model deployment requests initiated from multiple devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Several embodiments in this specification relate to the field of model deployment, specifically to a multi-device model deployment method and system based on adaptive pruning optimization. Background Technology

[0002] Currently, due to the widespread use of large-scale models, there are many situations where models guide staff in performing corresponding tasks.

[0003] However, different fields of work require different models. For example, the medical field needs models that can accurately answer medical-related questions, while the construction field needs models that can accurately answer construction-related questions. Furthermore, the deployment environments for these models also vary significantly, including factors such as computing power, memory capacity, and energy consumption. These factors all have a substantial impact on the deployment and performance of the models.

[0004] Therefore, in the face of the numerous different model deployment needs that have emerged, how to deploy models in a targeted and efficient manner to meet the specific needs of various fields and scenarios has become an urgent technical problem to be solved. Summary of the Invention

[0005] This specification provides an embodiment of a multi-device model deployment method and system based on adaptive pruning optimization.

[0006] The technical solution is as follows:

[0007] This specification provides an embodiment of a multi-device model deployment method based on adaptive pruning optimization, including:

[0008] Multiple datasets are acquired in advance, and each dataset corresponds to the model's functional information.

[0009] It receives model deployment requests from multiple devices, and each model deployment request includes model function information and model deployment environment information.

[0010] Based on the model function information corresponding to each of the model deployment requests, all model deployment requests are classified to obtain multiple model deployment request clusters, and each model deployment request cluster corresponds to a model function information.

[0011] Based on the model function information corresponding to each of the multiple model deployment request clusters, determine the dataset corresponding to each of the multiple model deployment request clusters.

[0012] Obtain the teaching assistant network model to be trained, and train the teaching assistant network model to be trained on the datasets corresponding to each of the multiple model deployment request clusters to obtain the trained teaching assistant network model corresponding to each of the multiple model deployment request clusters.

[0013] For each model deployment request cluster, based on the model deployment environment information corresponding to each of the multiple model deployment requests in the model deployment request cluster, multiple pruning operations are performed on the trained teaching assistant network model corresponding to the model deployment request cluster to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

[0014] Based on the student network model corresponding to each model deployment request, the model is deployed on multiple devices.

[0015] As a preferred embodiment, the step of performing multiple pruning operations on the trained teaching assistant network model corresponding to each model deployment request in the model deployment request cluster, based on the model deployment environment information corresponding to each model deployment request in the model deployment request cluster, to obtain the student network model corresponding to each model deployment request in the model deployment request cluster, includes:

[0016] Based on the model deployment environment information corresponding to each of the multiple model deployment requests in the model deployment request cluster, obtain the pruning target ratio corresponding to each of the multiple model deployment requests.

[0017] Based on the pruning target ratios corresponding to each of the multiple model deployment requests, multiple pruning operations are performed on the trained teaching assistant network model corresponding to the model deployment request cluster to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

[0018] As a preferred embodiment, the step of performing multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster based on the pruning target ratio corresponding to each of the multiple model deployment requests, to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster, includes:

[0019] Based on the pruning target ratios corresponding to each of the multiple model deployment requests, the pruning target ratios corresponding to each of the multiple model deployment requests are sorted from low to high to obtain a pruning target ratio sequence table.

[0020] Based on the pruning target ratio sequence list, multiple pruning operations are performed on the trained teaching assistant network model corresponding to the model deployment request cluster in sequence, so that the pruning target ratio of the trained teaching assistant network model reaches each pruning target ratio in the pruning target ratio sequence list in sequence, thereby obtaining the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

[0021] As a preferred embodiment, based on the pruning target ratio sequence list, multiple pruning operations are performed on the trained teaching assistant network model corresponding to the model deployment request cluster in sequence, so that the pruning target ratio of the trained teaching assistant network model sequentially reaches each pruning target ratio in the pruning target ratio sequence list, thereby obtaining the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster, including:

[0022] Obtain the ratio difference between each of the two adjacent pruning target ratios in the pruning target ratio sequence list;

[0023] Based on the ratio difference between each of the two adjacent pruning target ratios in the pruning target ratio sequence table, the iterative pruning ratio corresponding to each of the two adjacent pruning target ratios is obtained.

[0024] Based on the iterative pruning ratios corresponding to the two adjacent pruning target ratios in each sorting, a multi-scale progressive knowledge distillation method is used to perform multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster in sequence, so that the pruning target ratio of the trained teaching assistant network model reaches each pruning target ratio in the pruning target ratio sequence list in sequence, thereby obtaining the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

[0025] Furthermore, the ratio difference between two adjacent pruning target ratios is positively correlated with the iterative pruning ratio corresponding to the two adjacent pruning target ratios.

[0026] As a preferred embodiment, the step of obtaining the iterative pruning ratio corresponding to each of the two adjacent pruning target ratios based on the ratio difference between each of the two adjacent pruning target ratios in the pruning target ratio sequence table includes:

[0027] When the ratio difference between two adjacent pruning target ratios is less than a preset threshold, the iterative pruning ratio corresponding to the two adjacent pruning target ratios is equal to the ratio difference between the two adjacent pruning target ratios.

[0028] When the ratio difference between two adjacent pruning target ratios is not less than a preset threshold, the iterative pruning ratio corresponding to the two adjacent pruning target ratios is less than the ratio difference between the two adjacent pruning target ratios.

[0029] As a preferred embodiment, before obtaining the iterative pruning ratios corresponding to each of the two adjacent pruning target ratios, the method further includes:

[0030] Obtain the overall list position order of each pair of adjacent pruning target proportions in the pruning target proportion sequence table;

[0031] The step of obtaining the iterative pruning ratio corresponding to each of the two adjacent pruning target ratios in the pruning target ratio sequence table includes:

[0032] Based on the ratio difference between each pair of adjacent pruning target ratios in the pruning target ratio sequence table, and the overall list position of each pair of adjacent pruning target ratios in the pruning target ratio sequence table, the iterative pruning ratio corresponding to each pair of adjacent pruning target ratios is obtained.

[0033] As a preferred approach, the overall list position of two adjacent pruning target ratios in the pruning target ratio sequence table is negatively correlated with the iterative pruning ratios corresponding to the two adjacent pruning target ratios.

[0034] As a preferred embodiment, after obtaining the trained teaching assistant network model corresponding to each of the multiple model deployment request clusters, the method further includes:

[0035] Store multiple trained teaching assistant network models as a source for obtaining the teaching assistant network models to be trained during the next model deployment process.

[0036] As a preferred embodiment, the model deployment environment information includes deployment environment computing power information, deployment environment memory capacity information, and deployment environment energy consumption information.

[0037] Secondly, embodiments of this specification provide a multi-device model deployment system based on adaptive pruning optimization, including:

[0038] The first acquisition module pre-acquires multiple datasets, each of which corresponds to the model's functional information.

[0039] The receiving module receives model deployment requests initiated by multiple devices. Each model deployment request includes model function information and model deployment environment information.

[0040] The classification module classifies all model deployment requests based on the model function information corresponding to each of the model deployment requests, so as to obtain multiple model deployment request clusters, each of which corresponds to a model function information.

[0041] The determination module determines the dataset corresponding to each of the multiple model deployment request clusters based on the model function information corresponding to each cluster.

[0042] The second acquisition module acquires the teaching assistant network model to be trained, and trains the teaching assistant network model to be trained based on the datasets corresponding to each of the multiple model deployment request clusters, so as to obtain the trained teaching assistant network model corresponding to each of the multiple model deployment request clusters.

[0043] The third acquisition module performs multiple pruning operations on the trained teaching assistant network model corresponding to each model deployment request cluster based on the model deployment environment information corresponding to each of the multiple model deployment requests in the model deployment request cluster, in order to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

[0044] The deployment module deploys the student network model corresponding to each of the various model deployment requests to multiple devices.

[0045] Thirdly, embodiments of this specification provide an electronic device, including a processor and a memory; the processor is connected to the memory; the memory is used to store executable program code; the processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to perform the steps described in the first aspect of the above embodiments.

[0046] Fourthly, embodiments of this specification provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps described in the first aspect of the above embodiments.

[0047] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:

[0048] First, based on the model functional information corresponding to each model deployment request, all model deployment requests are classified to obtain multiple model deployment request clusters. Next, the datasets corresponding to each of these clusters are determined. Then, each cluster's trained teaching assistant network model is trained using its respective dataset. Finally, for each cluster, multiple pruning operations are performed on the trained teaching assistant network model based on the model deployment environment information of each deployment request within that cluster, to obtain the corresponding student network models. This avoids training from the original model each time, enabling centralized and efficient model deployment for different deployment requests initiated from multiple devices. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a flowchart illustrating a multi-device model deployment method based on adaptive pruning optimization provided in the embodiments of this specification.

[0051] Figure 2 This is a schematic diagram of the structure of a multi-device model deployment system based on adaptive pruning optimization provided in the embodiments of this specification.

[0052] Figure 3 This is a schematic diagram of the structure of an electronic device provided in the embodiments of this specification. Detailed Implementation

[0053] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings.

[0054] The terms "first," "second," "third," etc., in the description, claims, and accompanying drawings are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0055] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this specification. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.

[0056] Reference Figure 1 As shown, Figure 1 A flowchart illustrating a multi-device model deployment method based on adaptive pruning optimization provided in this specification embodiment may include at least:

[0057] Step 102: Pre-acquire multiple datasets, each of which corresponds to the model's functional information;

[0058] Step 104: Receive model deployment requests from multiple devices (Note: The devices initiating model deployment requests are mobile terminals, such as computers, mobile phones, etc.). Each model deployment request includes model function information (Note: Model function information indicates the functions that the model can perform, such as the function of guiding answers to questions in the medical field or the function of guiding answers to questions in the construction field) and model deployment environment information (Note: Model deployment environment information may include, but is not limited to, deployment environment computing power information, deployment environment memory capacity information, and deployment environment energy consumption information).

[0059] Step 106: Based on the model function information corresponding to each of the model deployment requests, classify all model deployment requests to obtain multiple model deployment request clusters, each of which corresponds to a model function information.

[0060] Step 108: Based on the model function information corresponding to each of the multiple model deployment request clusters, determine the datasets corresponding to each of the multiple model deployment request clusters (Note: for example, medical domain datasets, construction domain datasets).

[0061] Step 110: Obtain the teaching assistant network model to be trained. Train the teaching assistant network model to be trained based on the datasets corresponding to each of the multiple model deployment request clusters to obtain the trained teaching assistant network model corresponding to each of the multiple model deployment request clusters.

[0062] Step 112: For each model deployment request cluster, based on the model deployment environment information corresponding to each model deployment request in the model deployment request cluster, perform multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster to obtain the student network model corresponding to each model deployment request in the model deployment request cluster.

[0063] Step 114: Deploy the student network model corresponding to each of the various model deployment requests on multiple devices.

[0064] As is understandable, in the embodiments of this specification, firstly, based on the model functional information corresponding to each of the model deployment requests, all model deployment requests are classified to obtain multiple model deployment request clusters; further, the datasets corresponding to each of the multiple model deployment request clusters are determined; further, the trained teaching assistant network models corresponding to each of the multiple model deployment request clusters are trained based on the datasets corresponding to each of the multiple model deployment request clusters; further, for each model deployment request cluster, based on the model deployment environment information corresponding to each of the multiple model deployment requests in the cluster, multiple pruning operations are performed on the trained teaching assistant network models corresponding to the cluster to obtain the student network models corresponding to each of the multiple model deployment requests in the cluster. This avoids starting training from the original model each time, achieving centralized and efficient model deployment for different model deployment requests initiated from multiple devices.

[0065] In some embodiments of this specification, the step of performing multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster based on the model deployment environment information corresponding to each of the multiple model deployment requests in the model deployment request cluster, to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster, includes:

[0066] Step 1122: Based on the model deployment environment information corresponding to each of the multiple model deployment requests in the model deployment request cluster, obtain the pruning target ratio corresponding to each of the multiple model deployment requests;

[0067] Step 1124: Based on the pruning target ratios corresponding to each of the multiple model deployment requests, perform multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

[0068] Understandably, in the embodiments of this specification, the pruning target ratio is adjusted according to the model deployment environment information of each model deployment request, thereby generating student network models that meet different model deployment environments and achieving personalized deployment.

[0069] In some embodiments of this specification, the step of performing multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster based on the pruning target ratio corresponding to each of the multiple model deployment requests to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster includes:

[0070] Step 11242: Based on the pruning target ratios corresponding to each of the multiple model deployment requests, sort the pruning target ratios corresponding to each of the multiple model deployment requests from low to high to obtain a pruning target ratio sequence table.

[0071] Step 11244: Based on the pruning target ratio sequence list, perform multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster in sequence, so that the pruning target ratio of the trained teaching assistant network model reaches each pruning target ratio in the pruning target ratio sequence list in sequence, thereby obtaining the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

[0072] Understandably, in the embodiments of this specification, the pruning target ratios corresponding to multiple model deployment requests are sorted from low to high to obtain a pruning target ratio sequence table. Based on the pruning target ratio sequence table, multiple pruning operations are performed on the trained teaching assistant network models corresponding to the model deployment request clusters in sequence, so that the pruning target ratios of the trained teaching assistant network models sequentially reach each pruning target ratio in the pruning target ratio sequence table. This avoids starting the pruning operation from the original model each time, thereby improving the acquisition speed of the student network model.

[0073] The following example illustrates this: For instance, if the pruning target ratio sequence table includes three pruning target ratios, namely pruning target ratio 1: 5%, pruning target ratio 2: 10%, and pruning target ratio 3: 15%, then by performing multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster in sequence, the pruning target ratio of the trained teaching assistant network model can be made to reach 5%, 10%, and 15% respectively.

[0074] In some embodiments of this specification, the step of performing multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster based on the pruning target ratio sequence list, so that the pruning target ratio of the trained teaching assistant network model sequentially reaches each pruning target ratio in the pruning target ratio sequence list, thereby obtaining the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster, includes:

[0075] Step 112442: Obtain the ratio difference between each pair of adjacent pruning target ratios in the pruning target ratio sequence table;

[0076] Step 112444: Based on the ratio difference between each of the two adjacent pruning target ratios in the pruning target ratio sequence table, obtain the iterative pruning ratio corresponding to each of the two adjacent pruning target ratios.

[0077] Step 112446: Based on the iterative pruning ratios corresponding to the two adjacent pruning target ratios in each sorting, a multi-scale progressive knowledge distillation method is used to perform multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster in sequence, so that the pruning target ratio of the trained teaching assistant network model reaches each pruning target ratio in the pruning target ratio sequence list in sequence, thereby obtaining the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

[0078] Furthermore, the ratio difference between two adjacent pruning target ratios is positively correlated with the iterative pruning ratio corresponding to the two adjacent pruning target ratios.

[0079] Understandably, the embodiments in this specification employ a method of first fully training the teaching assistant network model to obtain a trained teaching assistant network model, and then sequentially acquiring the student network models corresponding to multiple model deployment requests through a progressive pruning approach (as the pruning target ratio of the trained teaching assistant network model successively reaches each pruning target ratio in the pruning target ratio sequence list). This avoids starting training and pruning operations from the original model each time, thus significantly improving model acquisition efficiency. However, this progressive pruning strategy also results in varying degrees of performance loss for the model after each pruning. Therefore, adopting a progressive pruning strategy places higher demands on the model's ability to quickly adapt to new structures and maintain performance. The use of a multi-scale progressive knowledge distillation method ensures effective knowledge transfer during the pruning process, guaranteeing the performance and generalization ability of the student network models. In this way, not only is efficient model deployment achieved, but each student network model also meets its corresponding performance requirements.

[0080] Furthermore, due to the progressive pruning strategy, multiple student network models cannot be acquired simultaneously; instead, they must be acquired sequentially. Therefore, in this embodiment, the larger the difference in proportions between two adjacent pruning target proportions, the larger the iterative pruning proportion corresponding to those two adjacent pruning target proportions. This reduces the number of iterative pruning iterations required for the model's pruning proportion to change from the higher-ranked pruning target proportion to the lower-ranked pruning target proportion among the two adjacent pruning target proportions. This ensures the speed of acquiring each student network model and avoids excessively slow deployment of subsequent student network models.

[0081] The following example illustrates this. Assume the pruning target ratio sequence contains three pruning target ratios: pruning target ratio 1: 5%, pruning target ratio 2: 10%, and pruning target ratio 3: 20%. Then, the ratio difference between pruning target ratio 1 and pruning target ratio 2 is 5%, and the ratio difference between pruning target ratio 2 and pruning target ratio 3 is 10%. Furthermore, the iterative pruning ratio corresponding to pruning target ratio 1 and pruning target ratio 2 can be 1%, meaning that pruning the model from pruning target ratio 1 to pruning target ratio 2 requires 5 iterative pruning operations. Similarly, the iterative pruning ratio corresponding to pruning target ratio 2 and pruning target ratio 3 can be 2%, meaning that pruning the model from pruning target ratio 2 to pruning target ratio 3 also requires 5 iterative pruning operations.

[0082] To further improve the speed of acquiring the student network model, in some embodiments of this specification, the step of obtaining the iterative pruning ratio corresponding to each of two adjacent pruning target ratios based on the ratio difference between each of the two adjacent pruning target ratios in the pruning target ratio sequence list includes:

[0083] When the ratio difference between two adjacent pruning target ratios is less than a preset threshold, the iterative pruning ratio corresponding to the two adjacent pruning target ratios is equal to the ratio difference between the two adjacent pruning target ratios.

[0084] When the ratio difference between two adjacent pruning target ratios is not less than a preset threshold, the iterative pruning ratio corresponding to the two adjacent pruning target ratios is less than the ratio difference between the two adjacent pruning target ratios.

[0085] The following example illustrates this. Suppose there are two adjacent pruning target ratios in the pruning target ratio sequence table, which are 10% and 12% respectively, and the preset threshold is 3%. Since 12%-10%<3%, the iterative pruning ratio corresponding to these two adjacent pruning target ratios is directly 12%-10%=2%.

[0086] In some embodiments of this specification, before obtaining the iterative pruning ratios corresponding to each of the two adjacent pruning target ratios, the method further includes:

[0087] Obtain the overall list position order of each pair of adjacent pruning target proportions in the pruning target proportion sequence table;

[0088] The step of obtaining the iterative pruning ratio corresponding to each of the two adjacent pruning target ratios in the pruning target ratio sequence table includes:

[0089] Based on the ratio difference between each pair of adjacent pruning target ratios in the pruning target ratio sequence table, and the overall list position of each pair of adjacent pruning target ratios in the pruning target ratio sequence table, the iterative pruning ratio corresponding to each pair of adjacent pruning target ratios is obtained.

[0090] Furthermore, the overall list order of two adjacent pruning target proportions in the pruning target proportion sequence table is negatively correlated with the iterative pruning proportions corresponding to those two adjacent pruning target proportions.

[0091] Understandably, the higher the overall ranking of two adjacent pruning target proportions in the pruning target proportion sequence list (note: a higher overall ranking indicates a later ranking in the pruning target proportion sequence list), the more pruning operations the model has undergone to reach the pruning target proportion that ranks higher among the two adjacent pruning target proportions. More redundant parameters have been removed from the model. Therefore, among the remaining parameters, it is necessary to more precisely select which parameters can actually be pruned. Thus, for two adjacent pruning target proportions with a higher overall ranking in the pruning target proportion sequence list, the corresponding iterative pruning proportion should be smaller to ensure that the model experiences less performance loss when pruning from the higher-ranked pruning target proportion to the lower-ranked pruning target proportion.

[0092] The following examples illustrate this:

[0093] Suppose there are three pruning target ratios in the pruning target ratio sequence list: pruning target ratio 1: 5%, pruning target ratio 2: 20%, and pruning target ratio 3: 35%. Then, the overall list position order corresponding to pruning target ratio 1 and pruning target ratio 2 is 1, and the overall list position order corresponding to pruning target ratio 2 and pruning target ratio 3 is 2. Furthermore, if the iterative pruning ratio corresponding to pruning target ratio 1 and pruning target ratio 2 is 2%, then the iterative pruning ratio corresponding to pruning target ratio 2 and pruning target ratio 3 can be 1%, because the overall list position order corresponding to pruning target ratio 2 and pruning target ratio 3 is higher than that corresponding to pruning target ratio 1 and pruning target ratio 2.

[0094] To further accelerate model training, in some embodiments of this specification, after obtaining the trained teaching assistant network model corresponding to each of the multiple model deployment request clusters, the method further includes:

[0095] Store multiple trained teaching assistant network models as a source for obtaining the teaching assistant network models to be trained during the next model deployment process.

[0096] Even if the teaching assistant network model to be trained initially has a certain training foundation, the subsequent training speed will be faster.

[0097] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0098] Please refer to the following. Figure 2 , Figure 2 This document illustrates a schematic diagram of a multi-device model deployment system based on adaptive pruning optimization, as provided in an embodiment of this specification.

[0099] like Figure 2 As shown, the model deployment system may include at least:

[0100] The first acquisition module pre-acquires multiple datasets, each of which corresponds to the model's functional information.

[0101] The receiving module receives model deployment requests initiated by multiple devices. Each model deployment request includes model function information and model deployment environment information.

[0102] The classification module classifies all model deployment requests based on the model function information corresponding to each of the model deployment requests, so as to obtain multiple model deployment request clusters, each of which corresponds to a model function information.

[0103] The determination module determines the dataset corresponding to each of the multiple model deployment request clusters based on the model function information corresponding to each cluster.

[0104] The second acquisition module acquires the teaching assistant network model to be trained, and trains the teaching assistant network model to be trained based on the datasets corresponding to each of the multiple model deployment request clusters, so as to obtain the trained teaching assistant network model corresponding to each of the multiple model deployment request clusters.

[0105] The third acquisition module performs multiple pruning operations on the trained teaching assistant network model corresponding to each model deployment request cluster based on the model deployment environment information corresponding to each of the multiple model deployment requests in the model deployment request cluster, in order to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

[0106] The deployment module deploys the student network model corresponding to each of the various model deployment requests to multiple devices.

[0107] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the model deployment system embodiment is basically similar to the model deployment method embodiment, so the description is relatively simple; relevant parts can be referred to the description of the model deployment method embodiment.

[0108] Please see Figure 3 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this specification.

[0109] like Figure 3 As shown, the electronic device 300 may include at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.

[0110] The communication bus 302 can be used to realize the connection and communication of the above components.

[0111] The user interface 303 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.

[0112] The network interface 304 may include, but is not limited to, Bluetooth modules, NFC modules, Wi-Fi modules, etc.

[0113] The processor 301 may include one or more processing cores. The processor 301 connects to various parts within the electronic device 300 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 301 may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.

[0114] The memory 305 may include RAM or ROM. Optionally, the memory 305 may include a non-transitory computer-readable medium. The memory 305 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. As a computer storage medium, the memory 305 may include an operating system, a network communication module, a user interface module, and a model deployment application. The processor 301 may be used to call the model deployment application stored in the memory 305 and execute the steps of the model deployment method mentioned in the foregoing embodiments.

[0115] This specification also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps in the above-described model deployment method embodiments. If the constituent modules of the above-described electronic device are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0116] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).

[0117] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and its implementation can be combined arbitrarily.

[0118] The embodiments described above are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Any modifications and improvements made by those skilled in the art to the technical solutions of this specification without departing from the spirit of this specification should fall within the protection scope defined by the claims of this specification.

Claims

1. A multi-device model deployment method based on adaptive pruning optimization, characterized in that, include: Multiple datasets are acquired in advance, and each dataset corresponds to the model's functional information. It receives model deployment requests from multiple devices, and each model deployment request includes model function information and model deployment environment information. Based on the model function information corresponding to each of the model deployment requests, all model deployment requests are classified to obtain multiple model deployment request clusters, and each model deployment request cluster corresponds to a model function information. Based on the model function information corresponding to each of the multiple model deployment request clusters, determine the dataset corresponding to each of the multiple model deployment request clusters. Obtain the teaching assistant network model to be trained, and train the teaching assistant network model to be trained on the datasets corresponding to each of the multiple model deployment request clusters to obtain the trained teaching assistant network model corresponding to each of the multiple model deployment request clusters. For each model deployment request cluster, based on the model deployment environment information corresponding to each of the multiple model deployment requests in the model deployment request cluster, multiple pruning operations are performed on the trained teaching assistant network model corresponding to the model deployment request cluster to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster. Based on the student network model corresponding to each model deployment request, the model is deployed on multiple devices.

2. The multi-device model deployment method based on adaptive pruning optimization according to claim 1, characterized in that, The process involves performing multiple pruning operations on the trained teaching assistant network model corresponding to each model deployment request within a model deployment request cluster, based on the model deployment environment information corresponding to each model deployment request in the cluster, to obtain the student network model corresponding to each model deployment request in the cluster. This includes: Based on the model deployment environment information corresponding to each of the multiple model deployment requests in the model deployment request cluster, obtain the pruning target ratio corresponding to each of the multiple model deployment requests. Based on the pruning target ratios corresponding to each of the multiple model deployment requests, multiple pruning operations are performed on the trained teaching assistant network model corresponding to the model deployment request cluster to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

3. The multi-device model deployment method based on adaptive pruning optimization according to claim 2, characterized in that, The step involves performing multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster, based on the pruning target ratios corresponding to each of the multiple model deployment requests, to obtain the student network models corresponding to each of the multiple model deployment requests in the model deployment request cluster, including: Based on the pruning target ratios corresponding to each of the multiple model deployment requests, the pruning target ratios corresponding to each of the multiple model deployment requests are sorted from low to high to obtain a pruning target ratio sequence table. Based on the pruning target ratio sequence list, multiple pruning operations are performed on the trained teaching assistant network model corresponding to the model deployment request cluster in sequence, so that the pruning target ratio of the trained teaching assistant network model reaches each pruning target ratio in the pruning target ratio sequence list in sequence, thereby obtaining the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster.

4. The multi-device model deployment method based on adaptive pruning optimization according to claim 3, characterized in that, Based on the pruning target ratio sequence list, multiple pruning operations are performed on the trained teaching assistant network models corresponding to the model deployment request clusters in sequence, so that the pruning target ratios of the trained teaching assistant network models sequentially reach each pruning target ratio in the pruning target ratio sequence list, thereby obtaining the student network models corresponding to each of the multiple model deployment requests in the model deployment request cluster, including: Obtain the ratio difference between each of the two adjacent pruning target ratios in the pruning target ratio sequence list; Based on the ratio difference between each of the two adjacent pruning target ratios in the pruning target ratio sequence table, the iterative pruning ratio corresponding to each of the two adjacent pruning target ratios is obtained. Based on the iterative pruning ratios corresponding to the two adjacent pruning target ratios in each sorting, a multi-scale progressive knowledge distillation method is used to perform multiple pruning operations on the trained teaching assistant network model corresponding to the model deployment request cluster in sequence, so that the pruning target ratio of the trained teaching assistant network model reaches each pruning target ratio in the pruning target ratio sequence list in sequence, thereby obtaining the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster. Furthermore, the ratio difference between two adjacent pruning target ratios is positively correlated with the iterative pruning ratio corresponding to the two adjacent pruning target ratios.

5. The multi-device model deployment method based on adaptive pruning optimization according to claim 4, characterized in that, The step of obtaining the iterative pruning ratio corresponding to each of the two adjacent pruning target ratios in the pruning target ratio sequence table includes: When the ratio difference between two adjacent pruning target ratios is less than a preset threshold, the iterative pruning ratio corresponding to the two adjacent pruning target ratios is equal to the ratio difference between the two adjacent pruning target ratios. When the ratio difference between two adjacent pruning target ratios is not less than a preset threshold, the iterative pruning ratio corresponding to the two adjacent pruning target ratios is less than the ratio difference between the two adjacent pruning target ratios.

6. The multi-device model deployment method based on adaptive pruning optimization according to claim 4, characterized in that, Before obtaining the iterative pruning ratios corresponding to each of the two adjacent pruning target ratios in each sorting, the process also includes: Obtain the overall list position order of each pair of adjacent pruning target proportions in the pruning target proportion sequence table; The step of obtaining the iterative pruning ratio corresponding to each of the two adjacent pruning target ratios in the pruning target ratio sequence table includes: Based on the ratio difference between each pair of adjacent pruning target ratios in the pruning target ratio sequence table, and the overall list position of each pair of adjacent pruning target ratios in the pruning target ratio sequence table, the iterative pruning ratio corresponding to each pair of adjacent pruning target ratios is obtained.

7. The multi-device model deployment method based on adaptive pruning optimization according to claim 6, characterized in that, The overall list order of two adjacent pruning target proportions in the pruning target proportion sequence table is negatively correlated with the iterative pruning proportions corresponding to the two adjacent pruning target proportions.

8. The multi-device model deployment method based on adaptive pruning optimization according to claim 1, characterized in that, After obtaining the trained teaching assistant network model corresponding to each of the multiple model deployment request clusters, the process also includes: Store multiple trained teaching assistant network models as a source for obtaining the teaching assistant network models to be trained during the next model deployment process.

9. The multi-device model deployment method based on adaptive pruning optimization according to claim 1, characterized in that, The model deployment environment information includes deployment environment computing power information, deployment environment memory capacity information, and deployment environment energy consumption information.

10. A multi-device model deployment system based on adaptive pruning optimization, based on the multi-device model deployment method based on adaptive pruning optimization according to any one of claims 1 to 9, characterized in that, include: The first acquisition module pre-acquires multiple datasets, each of which corresponds to the model's functional information. The receiving module receives model deployment requests initiated by multiple devices. Each model deployment request includes model function information and model deployment environment information. The classification module classifies all model deployment requests based on the model function information corresponding to each of the model deployment requests, so as to obtain multiple model deployment request clusters, each of which corresponds to a model function information. The determination module determines the dataset corresponding to each of the multiple model deployment request clusters based on the model function information corresponding to each cluster. The second acquisition module acquires the teaching assistant network model to be trained, and trains the teaching assistant network model to be trained based on the datasets corresponding to each of the multiple model deployment request clusters, so as to obtain the trained teaching assistant network model corresponding to each of the multiple model deployment request clusters. The third acquisition module performs multiple pruning operations on the trained teaching assistant network model corresponding to each model deployment request cluster based on the model deployment environment information corresponding to each of the multiple model deployment requests in the model deployment request cluster, in order to obtain the student network model corresponding to each of the multiple model deployment requests in the model deployment request cluster. The deployment module deploys the student network model corresponding to each of the various model deployment requests to multiple devices.