Training method, device, equipment and storage medium for distillation system

By separately deploying student models and teacher models in the knowledge distillation system and dynamically matching resources, the problem of high computing resource costs and low efficiency is solved, and more efficient computing resource utilization and cost savings are achieved.

CN112101545BActive Publication Date: 2024-09-03BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010887422.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-28
Publication Date
2024-09-03
Estimated Expiration
2040-08-28

AI Technical Summary

Technical Problem

Existing knowledge distillation systems suffer from high computing resource costs and low efficiency during the training process. Especially when dynamically matching student models and teacher models, it is difficult to fully utilize computing resources, resulting in low overall utilization.

Method used

By deploying the student model and the teacher model separately and dynamically matching the training requests through distillation, the idle resources of the PaaS platform are obtained and utilized, and the teacher model is dynamically deployed to improve computing efficiency and reduce computing resource costs.

Benefits of technology

It effectively reduces the computing resource cost of the first terminal device, improves the computing efficiency of the distillation system, improves the overall utilization of the PaaS platform, and saves computing power costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112101545B
    Figure CN112101545B
Patent Text Reader

Abstract

The present application discloses a training method, device, equipment and storage medium for a distillation system, which relates to artificial intelligence technology fields such as deep learning, cloud computing, image processing and natural language processing. The specific implementation scheme is: obtaining a distillation training request sent by a first terminal device, wherein the distillation training request includes a training sample set and a target type of a teacher resource; obtaining a target teacher model corresponding to the teacher resource according to the target type; inputting the training sample set into the target teacher model, generating a target training result, and sending the target training result to the first terminal device, so that the first terminal device trains a student model according to the training sample set and the target training result, effectively improving the computational efficiency of the distillation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, specifically to the field of artificial intelligence technology such as deep learning, cloud computing, image processing and natural language processing, and in particular to training methods, devices, equipment and storage media for distillation systems. Background Art

[0002] The knowledge distillation system usually places the teacher model and the student model in a large neural network. The teacher model only calculates the forward results without doing reverse updates, and the student model is trained using the signals provided by the teacher model. Summary of the invention

[0003] The present application provides a training method, apparatus, device and storage medium for a distillation system.

[0004] According to one aspect of the present application, a training method for a distillation system is provided, comprising: obtaining a distillation training request sent by a first terminal device, wherein the distillation training request includes a training sample set and a target type of a teacher resource;

[0005] Acquire a target teacher model corresponding to the teacher resource according to the target type;

[0006] The training sample set is input into the target teacher model to generate a target training result, and the target training result is sent to the first terminal device so that the first terminal device trains the student model according to the training sample set and the target training result.

[0007] According to another aspect of the present application, a training device for a distillation system is provided, comprising: an acquisition module, configured to acquire a distillation training request sent by a first terminal device, wherein the distillation training request includes a training sample set and a target type of a teacher resource;

[0008] An identification module, used for acquiring a target teacher model corresponding to the teacher resource according to the target type;

[0009] A training module is used to input the training sample set into the target teacher model, generate a target training result, and send the target training result to the first terminal device so that the first terminal device trains the student model according to the training sample set and the target training result.

[0010] According to another aspect of the present application, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the training method of the distillation system of the present application.

[0011] According to another aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the training method of the distillation system of the electronic device disclosed in the embodiment of the present application.

[0012] According to another aspect of the present application, a computer program product is provided, including a computer program, wherein the computer program is executed by a processor to perform the steps of the training method of the distillation system of the electronic device disclosed in the embodiment of the present application.

[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0015] Figure 1 is a flow chart of a training method for a distillation system according to a first embodiment of the present application;

[0016] Figure 2 is a flow chart of a training method for a distillation system according to a second embodiment of the present application;

[0017] Figure 3 is a schematic structural diagram of a distillation system according to a second embodiment of the present application;

[0018] Figure 4 is a flow chart of a training method for a distillation system according to a third embodiment of the present application;

[0019] Figure 5 is a block diagram of a training device for a distillation system according to an embodiment of the present application;

[0020] Figure 6 It is a block diagram of an electronic device used to implement the training method of the distillation system of an embodiment of the present application. DETAILED DESCRIPTION

[0021] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0022] The following describes the training method, device, equipment and storage medium of the distillation system of the embodiment of the present application with reference to the accompanying drawings.

[0023] Figure 1 It is a flow chart of the training method of the distillation system according to the first embodiment of the present application. It should be noted that the execution subject of the training method of the distillation system of this embodiment is the training device of the distillation system, which can be implemented by software and / or hardware. The training device of the distillation system in this embodiment can be configured in an electronic device, or in a server for controlling the electronic device, and the server communicates with the electronic device and controls it.

[0024] The electronic device in this embodiment may include but is not limited to personal computers, tablet computers, smart phones and other devices, and this embodiment does not specifically limit the electronic device.

[0025] like Figure 1 As shown, the training method of the distillation system may include:

[0026] Step 101: Obtain a distillation training request sent by a first terminal device.

[0027] Among them, the distillation training request includes the target type of the training sample set and the teacher resource.

[0028] It should be noted that the first terminal device may be a hardware device provided with a student training model, and the first terminal device may be provided with an elastic data reader for sending distillation training requests and / or receiving teacher model training results, that is, the training device of the distillation system may obtain the distillation training request through the first terminal device and / or the elastic data reader provided in the first terminal device. It should be understood that when the training device of the distillation system is an elastic data reader, the training device of the distillation system can obtain the distillation training request generated by itself, and when the training device of the distillation system is a management unit of an online platform for deploying teacher resources and / or a third-party management unit, the distillation training request is obtained by communicating with the elastic data reader.

[0029] It should also be noted that the distillation training request can be a request signal generated by the student model based on the training sample set and the target type of the requested teacher resource. Among them, the target type of the teacher resource can be the type of the required teacher model. For example, when the student model is a learning model for image recognition, the required teacher resource should also be a learning model for image recognition. When the learning model is a learning model for text recognition, the required teacher resource should also be a learning model for text recognition. When the learning model is a learning model for speech recognition, the required teacher resource should also be a learning model for speech recognition, etc. Further, the target type can further include the type of recognition content. For example, in image recognition, if the recognized image is a text-type image content, the required teacher resource can be a text recognition model, a table recognition model, etc. in image recognition. If the recognized image is an image collected during autonomous driving, the required teacher resource can be a face recognition model, a traffic signal recognition model, an obstacle recognition model, etc. in image recognition.

[0030] Step 102, obtaining a target teacher model corresponding to the teacher resource according to the target type.

[0031] That is, after obtaining the distillation training request, the target teacher model corresponding to the teacher resource in the current teacher model is obtained according to the target type in the distillation training request.

[0032] Step 103, input the training sample set into the target teacher model, generate a target training result, and send the target training result to the first terminal device, so that the first terminal device trains the student model according to the training sample set and the target training result.

[0033] Specifically, after obtaining the distillation training request sent by the first terminal device, the target type of the teacher resource and the training sample set used for distillation training are obtained through the distillation training request, the target teacher model corresponding to the teacher resource is obtained according to the target type of the teacher resource, and then the training sample set is input into the target teacher model to train the target teacher model through the training sample set to generate a target training result, and then the target training result is sent to the first terminal device, so that the first terminal device trains the student model according to the training sample set and the target training result.

[0034] Optionally, the target training result may be an intermediate hidden layer or prediction result that can provide a supervisory signal to the student model, so that the student model can learn information beyond its own training data, thereby accelerating the learning speed and improving the training effect of the student model.

[0035] Optionally, there may be at least one target teacher model obtained according to the target type, and at least one target teacher model is used to obtain target training results corresponding to the number of target teacher models, and all target training results are input into the first terminal device, so that the first terminal device trains the student model according to the training sample set and the target training results, so that the student model can be trained using multiple target teacher models at the same time, so as to improve the robustness of student model learning through the diversity of target teacher models.

[0036] Therefore, the embodiment of the present application deploys the student model and the teacher model in the distillation system separately, and dynamically matches the student model and the teacher model through distillation training requests to meet the needs of the distillation training task, thereby effectively reducing the computing resource cost of the first terminal device and improving the computing efficiency of the distillation system.

[0037] Figure 2 FIG. 1 is a flow chart of a training method for a distillation system according to a second embodiment of the present application. Figure 2 As shown, the training method of the distillation system includes:

[0038] Step 201, obtain the device resources of the second terminal device, deploy the teacher model on the second terminal according to the device resources, and generate a registration list of the teacher model.

[0039] It should be noted that the training device of the distillation system that executes the training method of the embodiment of the present application can be a service discovery and management module of the second terminal device, or it can be an elastic data reader in the first terminal device, or it can be a third-party management unit.

[0040] It should also be noted that the second terminal device may be a PaaS (Platform as a Service) platform, and the PaaS platform may include multiple computing servers, such as Figure 3 Different types of GPU cards are shown, including Baidu Kunlun computing cards, etc. Figure 3 K1200, P4, T4, XPU and V100 are models of various GPU processors. The device resources may be online service resources that can be provided by the PaaS platform, that is, computing resources that can be provided by the GPU card.

[0041] That is, after acquiring the device resources of the second terminal device, the training device of the distillation system deploys the teacher model on each GPU card that can provide the device resources according to the device resources that each GPU card in the current PaaS platform can provide, such as idle device resources, and generates a registration list of the teacher model. The registration list may include, but is not limited to, one or more attribute information such as the GPU card on which the teacher model is deployed, the target type, name, and computing power that the teacher model can provide.

[0042] It should be understood that the resources of the online PaaS platform have peak and trough effects, and there are many elastic resources available. This application can make full use of the idle resources of the platform by acquiring the device resources of the second terminal device in real time to deploy the teacher model, so that the overall utilization rate of the GPU in the PaaS platform is increased from about 20% to more than 40%, saving twice the computing power cost.

[0043] Step 202, sending a detection signal to each teacher model in the registration list, and generating a survival list based on the teacher models that have successfully detected activation.

[0044] It should be noted that since the PaaS platform will decide to adjust the GPU card resources according to its own platform operation requirements, for example, when other computing requirements in the GPU occupy a large amount of computing resources, the PaaS platform may forcibly recycle the teacher model on the GPU card, or other factors that affect the normal operation of the GPU card, such as the GPU card temperature is too high, will also prompt the PaaS platform to forcibly recycle the teacher model. Therefore. It is necessary to send a detection signal to each teacher model in the registration list, so as to determine the teacher models that are still alive in the registration list through the detection results, and generate a survival list based on these teacher models that have successfully detected activation.

[0045] Optionally, a detection signal may be sent to the teacher models in the registration list at a preset frequency. If a survival signal is received from the teacher model, the detection is determined to be successful, that is, the teacher model is still alive, and the teacher model is stored in the current survival list and / or continues to be saved in the registration list. If no survival signal is received from the teacher model, the detection fails, that is, the teacher model has been killed and cannot perform the distillation task, and the teacher model is deleted from the registration list and / or there is no need to store the teacher model in the survival list. The updated registration list may be used as the survival list, or the re-stored list containing the surviving teacher models may be used as the survival list.

[0046] Step 203, obtain the survival list of the teacher model sent by the second terminal device, and obtain the target teacher model from the survival list according to the target type.

[0047] That is to say, the surviving list of the teacher model sent by the second terminal device can be obtained in real time, and the target teacher model that meets the target type can be selected from the surviving list according to the target type in the distillation request, so as to obtain the target training result using the target teacher model, and send the target training result to the first terminal device, so that the first terminal device can train the student model according to the training sample set and the target training result.

[0048] Therefore, the present application can dynamically deploy the teacher model according to the resource situation of the second terminal device, thereby effectively improving the overall utilization rate of the second terminal device.

[0049] Furthermore, before sending the target training result to the first terminal device, the method may further include: identifying a duration of the target training result not being received, and if the duration reaches a preset time, re-obtaining a distillation training request.

[0050] That is to say, if the target training result is not received within the preset time, it means that there are no teacher resources that meet the target type in the PaaS platform, that is, the target teacher model has not been obtained. At this time, the request instruction can be obtained again to deploy the target teacher model according to the target type in the request instruction, and use the target teacher model to train the training sample set.

[0051] It should be understood that if the distillation training request includes at least one target type, it is necessary to obtain the target training results of the corresponding number of types, that is, it is necessary to identify the types of target training results received within the preset time. Specifically, it is necessary to identify the category to which the target teacher model that generates the target training result belongs. If the number of categories to which the target teacher model belongs is less than the number of target types, the target type that has not received the target training result is determined and marked as not receiving the target training result, and the distillation training request is obtained again. If the number of categories to which the target teacher model belongs is equal to the number of target types, it is determined that all target types have received the target training results. At this time, the student model can be trained according to the target training results.

[0052] That is to say, the target type in the distillation training request should correspond to the type of the target training result, that is, there should be no lack of target training results of the required type during student model training, thereby effectively ensuring the effectiveness of student model training and avoiding training deviations of the student model due to the lack of target training result types.

[0053] Figure 4 FIG. 1 is a flow chart of a training method for a distillation system according to a third embodiment of the present application. Figure 4 As shown, the training method of the distillation system includes:

[0054] Step 401, during the model training process of the student model, a target teacher model is deployed based on the device resources of the second terminal device.

[0055] It should be noted that since the calculation time of the teacher model is much longer than that of the student model, in order to improve the training speed of the distillation system, the calculation speed of the student model can be maximized by increasing the speed of feeding back the target training results to the student model. In other words, the computing power utilization of the student model can be maximized, thereby improving the overall utilization of the distillation system.

[0056] Specifically, after obtaining the distillation training request, the present application can obtain the target type of teacher resources that match the distillation training request, and then add the target teacher model belonging to the target type, so as to improve the operation speed of each target teacher model by reducing the number of training samples processed by each target teacher model, thereby increasing the speed of feeding back the target training results to the student model, thereby improving the utilization rate of the student model.

[0057] Optionally, inputting the training model into the target teacher model includes: obtaining the current number of target teacher models, dividing the training sample set according to the current number to generate training sample subsets, and inputting the training sample subsets into the target teacher model respectively.

[0058] That is to say, as the number of target teacher models increases, the current number of teacher models can be obtained in real time, and then the training sample set can be divided according to the current number of target teacher models, wherein the training sample set can be evenly divided according to the number of target teacher models, and the divided training sample subsets are input into each target teacher model respectively, so that each target teacher model can only process the training data in the training sample subset, which greatly reduces the amount of sample data that each target teacher model needs to process and improves the speed at which the target teacher model provides the target training results to the student model.

[0059] Step 402: Obtain, through the first terminal device, a first training speed of the student model before adding the target teacher model for deployment and a second training speed of the student model after adding the target teacher model for deployment.

[0060] Step 403, configuring the number of target teacher models according to the first training speed and the second training speed.

[0061] As a feasible embodiment, the number of target teacher models is configured according to the first training speed and the second training speed, including: if the first training speed is less than the second training speed, increasing the number of deployed target teacher models; if the first training speed is equal to the second training speed, reducing the number of deployed target teacher models.

[0062] It should be noted that in addition to increasing the target teacher model to speed up the feedback speed of the target training results, thereby increasing the training speed of the distillation system, increasing the target teacher model can also increase the number of target training results, so that the available data for the student model to be trained can also be increased, that is, the training speed of the student model itself can be increased. Therefore, before reaching the speed limit of the student model itself, increasing the number of target teacher models can effectively increase the training speed of the student model.

[0063] Specifically, during the distillation training process, after the target type of teacher resources is obtained, the number of deployed target teacher models can be gradually increased, and the training sample sets that have not yet been trained can be split to speed up the training speed of the target teacher model to improve the feedback speed of the target training results. At the same time, the first training speed of the student model before adding the target teacher model and the second training speed after adding the target teacher model are detected. If the first training speed is less than the second training speed, it means that the computing power of the student model can continue to be improved and the utilization rate has not yet reached the peak. The deployed target teacher models can continue to be added. If the first training speed is equal to the second training speed, it means that the training speed bottleneck of the student model is no longer in the teacher resources, that is, increasing the number of target teacher models will not continue to improve the training speed of the student model. At this time, the last added target teacher model can be recycled to reduce the resource occupancy rate of the second terminal device and effectively prevent resource waste.

[0064] Therefore, this application can dynamically expand and shrink the computing resources of the target teacher model to maximize the device resources belonging to the student model and the target teacher model, thereby maximizing the computing power utilization and effectively improving the overall utilization.

[0065] The training method of the distillation training system of the embodiment of the present application deploys the student model and the teacher model in the distillation system separately, and dynamically matches the student model and the teacher model through the distillation training request to meet the needs of the distillation training task, thereby effectively reducing the computing resource cost of the first terminal device and improving the computing efficiency of the distillation system.

[0066] In order to implement the above embodiment, the embodiment of the present application also provides a training device for a distillation system.

[0067] Figure 5 is a block diagram of a training device for a distillation system according to an embodiment of the present application. Figure 5 As shown, the training device 10 for the distillation system comprises:

[0068] An acquisition module 11 is used to acquire a distillation training request sent by a first terminal device, wherein the distillation training request includes a training sample set and a target type of a teacher resource;

[0069] An identification module 12, configured to obtain a target teacher model corresponding to the teacher resource according to the target type;

[0070] The training module 13 is used to input the training sample set into the target teacher model, generate a target training result, and send the target training result to the first terminal device so that the first terminal device trains the student model according to the training sample set and the target training result.

[0071] In some embodiments, the identification module is specifically used to: obtain a survival list of teacher models sent by the second terminal device, and obtain the target teacher model from the survival list according to the target type.

[0072] In some embodiments, the identification module 12 also includes: a registration sub-module, used to obtain the device resources of the second terminal device, deploy the teacher model on the second terminal device according to the device resources, and generate a registration list of the teacher model; an activity detection sub-module, used to send an activity detection signal to each of the teacher models in the registration list respectively, and generate the survival list according to the teacher model that has successfully detected activity.

[0073] In some embodiments, the identification module 12 also includes: a deployment sub-module, used to add the deployment of the target teacher model according to the device resources of the second terminal device during the model training process of the student model; an acquisition sub-module, used to obtain, through the first terminal device, a first training speed of the student model before adding the deployment of the target teacher model and a second training speed of the student model after adding the deployment of the target teacher model; a configuration sub-module, used to configure the number of the target teacher models according to the first training speed and the second training speed.

[0074] In some embodiments, the configuration submodule is specifically used to: if the first training speed is less than the second training speed, increase the deployment of the target teacher model; if the first training speed is equal to the second training speed, reduce the deployment of the target teacher model.

[0075] In some embodiments, the training module 13 is specifically used to: obtain the current number of the target teacher models; divide the training sample set according to the current number to generate training sample subsets; and input the training sample subsets into the target teacher models respectively.

[0076] In some embodiments, the training module 13 is specifically used to: identify the duration of the target training result that has not been received; if the duration reaches a preset time, re-acquire the distillation training request.

[0077] It should be noted that the above explanation of the embodiment of the training method for the distillation system is also applicable to the training device for the distillation system in this embodiment, and will not be repeated here.

[0078] The training device of the distillation training system of the embodiment of the present application deploys the student model and the teacher model in the distillation system separately, and dynamically matches the student model and the teacher model through the distillation training request to meet the needs of the distillation training task, thereby effectively reducing the computing resource cost of the first terminal device.

[0079] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0080] like Figure 6 , is a block diagram of an electronic device for a training method for a distillation system according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0081] like Figure 6 As shown, the electronic device includes: one or more processors 601, a memory 602, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 601 is taken as an example.

[0082] The memory 602 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the training method for the distillation system provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the training method for the distillation system provided in the present application.

[0083] The memory 602 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the CC method in the embodiment of the present application (for example, the attached Figure 5 The processor 601 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 602, that is, the training method of the distillation system in the above method embodiment is implemented.

[0084] The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the trained electronic device of the distillation system, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 602 may optionally include a memory remotely arranged relative to the processor 601, and these remote memories may be connected to the trained electronic device of the distillation system via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0085] The electronic device of the distillation system training method may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0086] The input device 603 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device for training the distillation system, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, and other input devices. The output device 604 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0087] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0088] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0089] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0090] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0091] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server for a distributed system, or a server combined with a blockchain.

[0092] The present application also provides a computer program product, including a computer program, wherein the computer program is executed by a processor to perform the steps of the training method of the distillation system of the electronic device disclosed in the embodiment of the present application.

[0093] According to the technical solution of the embodiment of the present application, the training method of the distillation training system of the embodiment of the present application deploys the student model and the teacher model in the distillation system separately, and dynamically matches the student model and the teacher model through the distillation training request to meet the needs of the distillation training task, thereby effectively reducing the computing resource cost of the first terminal device and improving the computing efficiency of the distillation system.

[0094] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0095] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A training method for a distillation system, comprising: Obtaining a distillation training request sent by the first terminal device, wherein the distillation training request includes a training sample set and a target type of a teacher resource; Acquire a target teacher model corresponding to the teacher resource according to the target type; Inputting the training sample set into the target teacher model, generating a target training result, and sending the target training result to the first terminal device, so that the first terminal device trains the student model according to the training sample set and the target training result; During the model training process of the student model, the target teacher model is additionally deployed according to the device resources of the second terminal device; Acquire, through the first terminal device, a first training speed of the student model before adding the target teacher model for deployment and a second training speed of the student model after adding the target teacher model for deployment; According to the first training speed and the second training speed, the number of the target teacher models is configured until the limit of the training speed of the student model is reached.

2. The training method for a distillation system according to claim 1, wherein: The step of acquiring a target teacher model corresponding to the teacher resource according to the target type includes: Obtain a survival list of the teacher model sent by the second terminal device, and obtain the target teacher model from the survival list according to the target type.

3. The training method for a distillation system according to claim 2, before obtaining the survival list of the teacher model sent by the second terminal device, further comprising: Acquire device resources of the second terminal device, deploy the teacher model on the second terminal device according to the device resources, and generate a registration list of the teacher model; Send a detection signal to each of the teacher models in the registration list respectively, and generate the survival list according to the teacher models that have successfully detected activation.

4. The training method for a distillation system according to claim 1, wherein: The configuring the number of the target teacher models according to the first training speed and the second training speed includes: If the first training speed is less than the second training speed, further deploying the target teacher model; If the first training speed is equal to the second training speed, reducing the deployment of the target teacher model.

5. The training method for a distillation system according to claim 1, wherein: The step of inputting the training sample set into the target teacher model comprises: Get the current number of the target teacher model; Dividing the training sample set according to the current number to generate training sample subsets; The training sample subsets are respectively input into the target teacher model.

6. The training method for a distillation system according to claim 1, wherein: Before sending the target training result to the first terminal device, the method further includes: identifying a duration of time during which the target training result was not received; If the duration reaches a preset time, the distillation training request is obtained again.

7. A training device for a distillation system, comprising: An acquisition module, configured to acquire a distillation training request sent by the first terminal device, wherein the distillation training request includes a training sample set and a target type of a teacher resource; An identification module, used for acquiring a target teacher model corresponding to the teacher resource according to the target type; A training module, used for inputting the training sample set into the target teacher model, generating a target training result, and sending the target training result to the first terminal device, so that the first terminal device trains the student model according to the training sample set and the target training result; The identification module further includes: A deployment submodule, used for adding and deploying the target teacher model according to the device resources of the second terminal device during the model training of the student model; An acquisition submodule, used to acquire, through the first terminal device, a first training speed of the student model before adding the target teacher model for deployment and a second training speed of the student model after adding the target teacher model for deployment; A configuration submodule is used to configure the number of the target teacher models according to the first training speed and the second training speed until the limit of the training speed of the student model is reached.

8. The training device for the distillation system according to claim 7, wherein the recognition module is specifically used for: Obtain a survival list of the teacher model sent by the second terminal device, and obtain the target teacher model from the survival list according to the target type.

9. The training device for a distillation system according to claim 8, wherein the recognition module further comprises: A registration submodule, used to obtain device resources of the second terminal device, deploy the teacher model on the second terminal device according to the device resources, and generate a registration list of the teacher model; The activity detection submodule is used to send an activity detection signal to each teacher model in the registration list respectively, and generate the survival list according to the teacher models that have successfully detected activity.

10. The training device for a distillation system according to claim 7, wherein: The configuration submodule is specifically used for: If the first training speed is less than the second training speed, further deploying the target teacher model; If the first training speed is equal to the second training speed, reducing the deployment of the target teacher model.

11. The training device for the distillation system according to claim 7, wherein the training module is specifically used for: Get the current number of the target teacher model; Dividing the training sample set according to the current number to generate training sample subsets; The training sample subsets are respectively input into the target teacher model.

12. The training device for the distillation system according to claim 7, wherein the training module is specifically used for: identifying a duration of time during which the target training result was not received; If the duration reaches a preset time, the distillation training request is obtained again.

13. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the training method for a distillation system according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the training method for a distillation system according to any one of claims 1 to 6.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the training method for a distillation system according to any one of claims 1 to 6 are implemented.