CN110888668B - Model updating system, method, device, terminal equipment and medium - Google Patents

Model updating system, method, device, terminal equipment and medium Download PDF

Info

Publication number
CN110888668B
CN110888668B CN201811046230.6A CN201811046230A CN110888668B CN 110888668 B CN110888668 B CN 110888668B CN 201811046230 A CN201811046230 A CN 201811046230A CN 110888668 B CN110888668 B CN 110888668B
Authority
CN
China
Prior art keywords
model
update
full
incremental
service module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811046230.6A
Other languages
Chinese (zh)
Other versions
CN110888668A (en
Inventor
范志军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201811046230.6A priority Critical patent/CN110888668B/en
Publication of CN110888668A publication Critical patent/CN110888668A/en
Application granted granted Critical
Publication of CN110888668B publication Critical patent/CN110888668B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a system, a method, a device, a terminal device and a medium for model updating, which belong to the technical field of computers, wherein the method comprises the steps that a training subsystem carries out model training based on a detected newly added sample and uploads incremental updating data obtained by training to a release server; and the release server merges the stored current full-quantity model with the incremental update data to obtain an updated incremental full-quantity model. Therefore, the full model does not need to be loaded, only model increment data with extremely small data quantity is uploaded to the release server, the time consumed in the uploading and loading processes is greatly reduced, and the processing efficiency is improved.

Description

Model updating system, method, device, terminal equipment and medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a system, a method, an apparatus, a terminal device, and a medium for updating a model.
Background
With the development of computer technology, a model training method based on big data has been widely used. In the prior art, a batch processing (batch) mode is generally adopted to train and update the model, namely, when the model is trained each time, the current full-quantity model is loaded from a disk to a memory, the full-quantity model obtained after training is uploaded to a release server for release, and finally, the resources occupied by the model are released.
However, since the full model needs to be loaded every time the training is updated, if the data amount of the full model is large, a lot of time is consumed for loading and uploading the model, and the efficiency of updating the model is low.
Disclosure of Invention
The embodiment of the application provides a system, a method, a device, a terminal device and a medium for model updating, which are used for improving the efficiency of model training and updating when the model is trained and updated.
In one aspect, a system for model update is provided, comprising: a training subsystem and a publication server, wherein,
the training subsystem is used for carrying out model training based on the new sample when the new sample is detected, obtaining incremental update data of the current full-quantity model and uploading the incremental update data to the release server;
and the release server is used for combining the received increment updating data with the stored current full-quantity model to obtain the increment full-quantity model.
Preferably, the training subsystem further comprises a scheduling service module, a gradient service module cluster and a parameter service module cluster, wherein the gradient service module cluster at least comprises one gradient service module, and the parameter service module cluster at least comprises one parameter service module;
The scheduling service module is used for dividing the newly added sample and then distributing the newly added sample to each gradient service module;
each gradient service module is used for carrying out gradient calculation processing based on the received newly added sample and sending the obtained gradient value to the parameter service module;
and each parameter service module is used for receiving the gradient value from at least one gradient service module respectively and performing parameter calculation processing based on the received gradient value to obtain incremental update data and sending the incremental update data to the release server respectively.
Preferably, the training subsystem further comprises a merging service module cluster, and the merging service module cluster at least comprises one merging service module;
the merging service module is used for: combining the increment updating data acquired through each parameter service module with the locally stored current full-quantity model to acquire an increment full-quantity model; acquiring updated information of each model parameter in the incremental full-scale model; screening out model parameters of which the corresponding updated information accords with preset screening conditions; based on the screened model parameters, obtaining clipping update data, and uploading the clipping update data to a release server;
the publishing server is also configured to: based on the received clipping update data, clipping update is carried out on the incremental full-scale model to obtain the target full-scale model.
Preferably, the combination service module is configured to:
acquiring current time and update time contained in update information of each model parameter, and screening each model parameter of which the time difference between the current time and the update time is higher than a preset update time threshold; and/or the number of the groups of groups,
based on the creation time, the update time and the update times contained in the obtained update information of each model parameter, the update frequency of each model parameter is respectively determined, and each model parameter with the update frequency lower than a preset update frequency threshold value is screened out.
Preferably, the merge service module is further configured to:
based on the clipping update data, clipping update is carried out on the locally stored incremental full-quantity model to obtain the target full-quantity model.
Preferably, the training subsystem further comprises an external storage device for: model parameters sent by the training subsystem are received and stored.
The parameter service module is further configured to:
and storing the designated model parameters into a memory, transmitting the unspecified model parameters with the use interval time higher than a preset storage time threshold or the use frequency lower than a preset storage frequency threshold to an external storage device, and storing the rest model parameters into a locally-arranged buffer module.
Preferably, the training subsystem further comprises a state storage device for: receiving and storing operation state information and operation instruction information sent by a scheduling service module;
the dispatch service module is also configured to: and sending the running state information and the running instruction information to the state storage device.
In one aspect, a method for updating a model includes:
when the new sample is determined to be detected, model training is carried out based on the new sample, and incremental update data of the current full-quantity model is obtained;
uploading the increment updating data to a release server, triggering the release server to combine the received increment updating data with the stored current full-quantity model to obtain the increment full-quantity model.
Preferably, the method further comprises:
combining the increment updating data with the stored current full-quantity model to obtain an increment full-quantity model;
acquiring updated information of each model parameter in the incremental full-quantity model;
screening out model parameters of which the corresponding updated information accords with preset screening conditions;
based on the screened model parameters, obtaining clipping update data;
and uploading the clipping update data to a release server, and triggering the release server to clip and update the incremental full-scale model based on the received clipping update data to obtain the target full-scale model.
Preferably, the screening of the model parameters of the corresponding updated information meeting the preset screening conditions specifically includes:
acquiring current time and update time contained in update information of each model parameter, and screening each model parameter of which the time difference between the current time and the update time is higher than a preset update time threshold; and/or the number of the groups of groups,
based on the creation time, the update time and the update times contained in the obtained update information of each model parameter, the update frequency of each model parameter is respectively determined, and each model parameter with the update frequency lower than a preset update frequency threshold value is screened out.
Preferably, the method further comprises:
based on the clipping update data, clipping update is carried out on the locally stored incremental full-quantity model to obtain the target full-quantity model.
Preferably, the method further comprises:
storing the designated model parameters into a memory;
among the unspecified model parameters, the unspecified model parameters with the use interval time higher than a preset storage time threshold or the use frequency lower than a preset storage frequency threshold are sent to an external storage device, and the rest model parameters are stored in a locally-arranged buffer module.
Preferably, the method further comprises:
And sending the running state information and the running instruction information to the state storage device, and triggering the state storage device to store the received running state information and the received running instruction information.
In one aspect, a method for updating a model includes:
receiving incremental update data sent by a training subsystem;
acquiring a stored current full-quantity model, and combining incremental updating data with the current full-quantity model to acquire an incremental full-quantity model;
the incremental update data is obtained by model training of the newly added sample by the training subsystem.
Preferably, the method further comprises:
receiving clipping update data sent by a training subsystem;
based on the received clipping update data, clipping update is carried out on the incremental full-quantity model to obtain a target full-quantity model;
the clipping update data is obtained based on the screened model parameters after the training subsystem screens out the model parameters of which the corresponding update information accords with the preset screening conditions.
In one aspect, an apparatus for model updating includes:
the obtaining unit is used for carrying out model training based on the new added sample when the new added sample is detected, and obtaining incremental update data of the current full-quantity model;
and the uploading unit is used for uploading the increment updating data to the release server and triggering the release server to combine the received increment updating data with the stored current full-quantity model to obtain the increment full-quantity model.
Preferably, the uploading unit is further configured to:
combining the increment updating data with the stored current full-quantity model to obtain an increment full-quantity model;
acquiring updated information of each model parameter in the incremental full-quantity model;
screening out model parameters of which the corresponding updated information accords with preset screening conditions;
based on the screened model parameters, obtaining clipping update data;
and uploading the clipping update data to a release server, and triggering the release server to clip and update the incremental full-scale model based on the received clipping update data to obtain the target full-scale model.
Preferably, when the model parameters of the corresponding updated information meeting the preset screening conditions are screened out, the uploading unit is further configured to:
acquiring current time and update time contained in update information of each model parameter, and screening each model parameter of which the time difference between the current time and the update time is higher than a preset update time threshold; and/or the number of the groups of groups,
based on the creation time, the update time and the update times contained in the obtained update information of each model parameter, the update frequency of each model parameter is respectively determined, and each model parameter with the update frequency lower than a preset update frequency threshold value is screened out.
Preferably, the uploading unit is further configured to:
based on the clipping update data, clipping update is carried out on the locally stored incremental full-quantity model to obtain the target full-quantity model.
Preferably, the uploading unit is further configured to:
storing the designated model parameters into a memory;
among the unspecified model parameters, the unspecified model parameters with the use interval time higher than a preset storage time threshold or the use frequency lower than a preset storage frequency threshold are sent to an external storage device, and the rest model parameters are stored in a locally-arranged buffer module.
Preferably, the uploading unit is further configured to:
and sending the running state information and the running instruction information to the state storage device, and triggering the state storage device to store the received running state information and the received running instruction information.
In one aspect, a model updating apparatus includes:
the receiving unit is used for receiving the increment update data sent by the training subsystem;
the merging unit is used for acquiring the stored current full-quantity model, merging the increment updating data with the current full-quantity model and obtaining an increment full-quantity model;
the incremental update data is obtained by model training of the newly added sample by the training subsystem.
Preferably, the merging unit is further configured to:
receiving clipping update data sent by a training subsystem;
based on the received clipping update data, clipping update is carried out on the incremental full-quantity model to obtain a target full-quantity model;
the clipping update data is obtained based on the screened model parameters after the training subsystem screens out the model parameters of which the corresponding update information accords with the preset screening conditions.
In one aspect, a terminal device is provided, including at least one processing unit, and at least one storage unit, where the storage unit stores a computer program, which when executed by the processing unit, causes the processing unit to perform the steps of any one of the above-mentioned methods of model updating.
In one aspect, a computer readable medium is provided, storing a computer program executable by a terminal device, which when run on the terminal device causes the terminal device to perform the steps of any one of the above described methods of model updating.
In the system, the method, the device, the terminal equipment and the medium for model updating provided by the embodiment of the application, a training subsystem carries out model training based on the detected newly added sample, and incremental updating data obtained by training is uploaded to a release server; and the release server merges the stored current full-quantity model with the incremental update data to obtain an updated incremental full-quantity model. Therefore, the full model does not need to be loaded, only model increment data with extremely small data quantity is uploaded to the release server, the time consumed in the uploading and loading processes is greatly reduced, and the processing efficiency is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a schematic architecture diagram of a model update system according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for updating a model according to an embodiment of the present application;
FIG. 3a is a data structure of update information according to an embodiment of the present application;
FIG. 3b is a schematic diagram illustrating a model update execution flow in an embodiment of the present application;
FIG. 4a is a schematic structural diagram of a device for updating a model according to an embodiment of the present application;
FIG. 4b is a schematic structural diagram of a device for updating a model according to the embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device in an embodiment of the present application.
Detailed Description
In order to improve model training and updating efficiency when training and updating a model, the embodiment of the application provides a system, a method, a device, terminal equipment and a medium for model updating.
First, some terms related to the embodiments of the present application will be described to facilitate understanding by those skilled in the art.
1. Terminal equipment: various kinds of applications can be installed, and an electronic device, which can be mobile or fixed, can display entities provided in the installed applications. Such as a cell phone, tablet, vehicle mounted device, personal digital assistant (personal digital assistant, PDA) or other electronic device capable of performing the functions described above, etc.
2. Updating information: the method at least comprises the following steps of: creation time, update time, and update times.
3. The full-scale model is a model obtained based on sample training of all window periods, wherein the current full-scale model, the incremental full-scale model and the target full-scale model are all full-scale models.
4. Incremental update data: the model is obtained based on a new sample of granularity window periods, which may be optionally within a training period.
5. Clipping update data: which may also be referred to as a clipping model, is a model that relates to the newly added samples of the granularity window period.
Because the model loading and the model uploading consume a large amount of time and occupy a large amount of memory resources during each training when the total model is large, the embodiment of the application provides a technical scheme for model updating, and the training subsystem carries out model training based on the detected newly added samples and uploads incremental updating data with extremely small data quantity obtained by training to the release server; the publishing server updates the full model based on the incremental update data, and further, the cache module stores part of model parameters to the external storage device, so that the full model does not need to be loaded, only model incremental data is uploaded to the publishing server, the time consumed by uploading and loading the model is greatly reduced, the data processing efficiency is improved, and the consumption of memory resources is greatly reduced.
Fig. 1 shows a schematic architecture of a model update system. Referring to fig. 1, the model updating system includes: training subsystem 100 and publication server 120.
The training subsystem 100 further includes: scheduling service module 101, gradient service module cluster 102, parameter service module cluster 103, external storage device 106, state storage device 108, and merge service module cluster 109. The gradient service module cluster 102 includes at least one gradient service module 104, and the parameter service module cluster 103 includes at least one parameter service module 105. The parameter service module 105 is provided with a buffer module 107. The merge service module cluster 109 includes at least one merge service module 110.
Since the model training and merging can be performed in a single mode or in a distributed and model mode, any module or any combination of the scheduling service module 101, the gradient service module 104, the parameter service module 105 and the merging service module 110 can be different devices, or the same device can be used.
The scheduling service module 101 is configured to periodically perform sample detection according to a training period, determine that a new sample is detected, segment the new sample, distribute the segmented new sample to each gradient service module 104, and further be configured to receive a message and issue an instruction, so as to perform state monitoring and system scheduling on the training subsystem 100, and further be configured to schedule the merging service module 110.
The gradient service module 104 is configured to perform deduplication processing and gradient calculation processing on the model parameters based on the newly added samples, and send the obtained gradient values to the parameter service module 105.
The parameter service module 105 is configured to perform parameter calculation processing based on the received gradient value, and obtain incremental update data.
The merging service module 110 is configured to, when determining that the merging period is reached, merge the incremental update data acquired by each parameter service module 105 with the locally stored current full-scale model to obtain an incremental full-scale model; and is further configured to obtain update information of each model parameter in the incremental full-scale model when the clipping period is determined to be reached, obtain clipping update data based on the update information, clip the incremental full-scale model based on the clipping update data, and upload the clipping update data to the distribution server 120.
The parameter service module 105 is provided with a buffer module 107, and the buffer module 107 is configured to perform classification storage processing on each model parameter. Alternatively, a virtual page storage algorithm (Least Recently Used, LRU) may be employed for classification processing. The elimination criteria of LRU are the use time and the use frequency, the longer the unused time (i.e., the current time is from the last time used) the easier the elimination, the lower the use frequency the easier the elimination.
An external storage module 106 is configured to store the received model parameters. Alternatively, the external storage module 106 may employ an external buffer system (SSDB) capable of storing kv, list, and set data of the same structure and type.
The state storage device 108 is configured to receive and store the operation state information and the operation instruction information sent by the dispatch service module 101.
The publishing server 120 is configured to receive the incremental update data sent by the training subsystem, and combine the locally stored current full-scale model and the incremental update data to obtain an incremental full-scale model; and the system is also used for receiving the clipping update data sent by the training subsystem, clipping the incremental full model based on the clipping update data and obtaining the target full model.
Those skilled in the art will appreciate that FIG. 1 is merely an example of a model update system and is not intended to limit the model update system, and may include more or fewer components than shown, or may combine certain components, or may be different components.
Referring to fig. 2, a flowchart of an implementation of a method for updating a model is provided. In the following description, the model update architecture diagram shown in fig. 1 is used to describe the specific implementation flow of the method as follows:
Step 200: and the training subsystem periodically detects the samples according to a preset training period.
Step 201: and when the training subsystem determines that the new sample is detected, model training is performed based on the new sample, and incremental update data of the current full-quantity model is obtained.
Specifically, first, when the scheduling service module 101 determines that a new sample is detected, the new sample is split, and the split new sample is distributed to each gradient service module 104. The newly added sample is a sample newly added in the training period.
Then, the gradient service module 104 performs a deduplication process and a gradient calculation process on the model parameters based on the newly added samples, and sends the obtained gradient values to the parameter service module 105.
Next, the parameter service module 105 is configured to perform parameter calculation processing based on the received gradient value, and obtain incremental update data.
The model training is a process of obtaining incremental update data through de-duplication processing, gradient calculation processing and parameter calculation processing based on the newly added samples. Model parameters include at least features and parameters. Each feature contains at least one parameter.
For example, a video preference featuring a user includes a history type parameter and a metropolitan type parameter.
In the embodiment of the application, the model training is executed according to the training period, the model training is not stopped after the model training is finished each time, and the model training is stopped under specific conditions only, if the conditions such as program abnormality or manual stopping occur, the resources occupied by the model are not released after the training is finished, namely, the full model is not required to be loaded during each training, and a large amount of time consumed during the full model loading during each model training is avoided.
Further, during the model training process, the state storage device 108 receives and stores the operation state information and the operation instruction information sent by the dispatch service module 101.
In this way, when data is lost (e.g., when an emergency such as a sudden power failure occurs to cause the data to be lost), the dispatch service module 101 may perform data recovery through the data stored in the state storage 108.
Further, the parameter service module 105 is provided with a buffer module 107, and the buffer module 107 is configured to perform classification storage processing on each model parameter.
Alternatively, a virtual page storage algorithm (Least Recently Used, LRU) may be employed for classification processing. The LRU elimination standard is the use time and the use frequency, the longer the unused time is, the easier the elimination is, and the lower the use frequency is, the easier the elimination is.
Specifically, when the classification storage processing is performed for each model parameter, the following manner may be adopted:
1) When the model parameters are determined to be the specified parameters, the model parameters are stored in a memory.
2) When the model parameter is determined to be an unspecified parameter, and the interval time between the current use time and the last use time of the model parameter is higher than a preset storage threshold or the use frequency in a unit is lower than a preset storage frequency threshold, the model parameter is sent to the external storage module 106.
3) When the model parameter is determined to be an unspecified parameter, and the interval time between the current use time and the last use time of the model parameter is not higher than a preset storage threshold and the use frequency in units is not lower than a preset storage frequency threshold, the model parameter is stored in the cache module 107.
In this way, a large amount of model parameters can be stored in the external storage module 106, memory resources are saved, the problem of resource consumption of a large amount of memory occupied by the model parameters for a long time is solved, and the data processing speed is low because only the external storage module 106 is adopted for data processing, so that the model parameters are stored in a classified manner by the buffer module 107, the speed of accessing the model parameters is improved, the capacity of the memory and the data processing speed are balanced, and the training subsystem 100 can operate for a long time without stopping under the condition of limited resources.
Step 202: the training subsystem uploads the delta update data to the publishing server.
Step 203: and the release server combines the stored current full-quantity model with the received increment updating data to obtain an increment full-quantity model.
Step 204: the training subsystem obtains trim update data based on the delta update data.
Specifically, first, when the merging service module 110 in the training subsystem determines that the merging period is reached, the incremental update data acquired by each parameter service module 105 is merged with the locally stored current full-scale model to obtain the incremental full-scale model.
Then, when the merge service module 110 determines that the clipping period is reached, update information of each model parameter in the incremental full-scale model is acquired, and clipping update data is obtained based on the update information.
Wherein, the update information at least comprises: creation time, update time, and update times. Referring to fig. 3a, a data structure of the update information is shown. The data structure includes features, parameters, creation time, last update time and update times.
Wherein, when the merge service module 110 obtains the clipping update data based on the update information, the steps may be performed:
firstly, based on each piece of updated information, screening out model parameters of which the corresponding updated information accords with preset screening conditions.
Then, based on the screened model parameters, clipping update data is determined.
Wherein, when screening model parameters, any one or combination of the following two modes can be adopted:
the first way is: and acquiring the current time and the update time contained in the update information of each model parameter, respectively calculating the time difference between the current time and the update time of each model parameter, and screening out each model parameter with the time difference higher than a preset update time threshold.
The second mode is as follows: the method comprises the steps of obtaining creation time, update time and update times contained in update information of each model parameter, respectively determining the ratio between the difference value of the update time and the creation time of each model parameter and the update times as update frequency, and screening each model parameter with the update frequency lower than a preset update frequency threshold value.
Step 205: the training subsystem uploads the clip update data to the publishing server.
Specifically, the merge service module 110 clips the incremental full model based on the clipping update data for uploading the clipping update data to the publishing server 120.
In this way, only the incremental update data and the trimming update data can be uploaded to the distribution server 120, and the data amount of the incremental update data and the trimming update data is smaller than that of the full-size model, so that the uploading time can be greatly reduced, and the uploading efficiency can be improved. Secondly, the training subsystem 100 merges and cuts the current full model through the merge service module 110, so as to meet the disaster recovery requirement, namely, if the data of the full model in the release server 120 is lost, the full model stored in the merge service module 110 can be recovered.
Further, model training, model merging and model clipping are respectively completed through different processes. The duration of the training period, the combining period and the clipping period can be the same or different, and generally the duration of the training period is shorter, and the duration of the combining period and the clipping period is generally the same and longer. The training period is shorter, so that the newly added samples can be continuously trained, the combining period and the cutting period are longer, and the data can be prevented from being uploaded to the release server too frequently.
For example, the training period is 15 minutes long, and the merging period and the clipping period are 1 hour long.
Step 206: and the release server cuts the incremental full-quantity model based on the received cutting update data to obtain the target full-quantity model.
The full-scale model is a model obtained based on sample training of all window periods, and the current full-scale model, the incremental full-scale model and the target full-scale model are all full-scale models. The incremental update data may also be used as an incremental model, which is a model related to samples during the training period. The clipping update data may also be used as a clipping model, which is a model related to samples in a clipping period.
In this way, the current full-scale model can be combined and cut and updated in the publishing server 120 to obtain the target full-scale model, and meanwhile, the model combination and cut and updated in the combining service module 109 are performed, so that the publishing server 120 and the target full-scale model in the training subsystem 100 are kept consistent, and the disaster recovery requirement is met.
Referring to fig. 3b, a schematic diagram of a model update execution flow is shown. The method comprises the following specific processes:
step 300: the training subsystem is started.
Step 301: the training subsystem periodically detects samples.
Specifically, when step 301 is performed, reference may be made to step 201 in the above embodiment.
Step 302: and when the training subsystem determines that the new sample is detected, model training is carried out, and incremental update data are obtained.
Step 303: the training subsystem uploads the increment updating data to the release server, and triggers the release server to perform model combination based on the increment updating data to obtain an increment full model.
Step 304: and the training subsystem performs model merging based on the increment updating data to obtain an increment full model.
Step 305: the training subsystem determines cutting update data based on the incremental full model, and sends the cutting update data to the release server, and triggers the release server to cut the incremental full model based on the cutting update data to obtain the target full model.
Specifically, step 305 is performed, see step 204 in the above embodiment.
Step 306: the training subsystem performs clipping on the incremental full model based on the clipping update data to obtain the target full model, and performs step 301.
Step 307: in the process of executing steps 301-306, the training subsystem determines that the operation is stopped when a stop instruction is received.
In this way, model training is performed based on the detected newly added samples to obtain incremental update data, the full-quantity model does not need to be loaded, only model incremental data with extremely small data quantity is uploaded to a release server, and determined clipping update data is uploaded to the server to trigger the server to clip the target full-quantity model based on the clipping update data to obtain the full-quantity model, so that time consumed in uploading and loading processes is greatly reduced, and processing efficiency is improved.
Based on the same inventive concept, the embodiment of the present application further provides a device for updating a model, and since the principle of solving the problem by using the device and the equipment is similar to that of a method for updating a model, the implementation of the device can refer to the implementation of the method, and the repetition is omitted.
Fig. 4a is a schematic structural diagram of a device for updating a model according to an embodiment of the present application, including:
An obtaining unit 410, configured to perform model training based on the new sample when it is determined that the new sample is detected, and obtain incremental update data of the current full-scale model;
and the uploading unit 411 is configured to upload the incremental update data to the publishing server, and trigger the publishing server to combine the received incremental update data with the stored current full-scale model to obtain the incremental full-scale model.
Preferably, the uploading unit 411 is further configured to:
combining the increment updating data with the stored current full-quantity model to obtain an increment full-quantity model;
acquiring updated information of each model parameter in the incremental full-quantity model;
screening out model parameters of which the corresponding updated information accords with preset screening conditions;
based on the screened model parameters, obtaining clipping update data;
and uploading the clipping update data to a release server, and triggering the release server to clip and update the incremental full-scale model based on the received clipping update data to obtain the target full-scale model.
Preferably, when the model parameters of the corresponding updated information meeting the preset screening conditions are screened out, the uploading unit 411 is further configured to:
acquiring current time and update time contained in update information of each model parameter, and screening each model parameter of which the time difference between the current time and the update time is higher than a preset update time threshold; and/or the number of the groups of groups,
Based on the creation time, the update time and the update times contained in the obtained update information of each model parameter, the update frequency of each model parameter is respectively determined, and each model parameter with the update frequency lower than a preset update frequency threshold value is screened out.
Preferably, the uploading unit 411 is further configured to:
based on the clipping update data, clipping update is carried out on the locally stored incremental full-quantity model to obtain the target full-quantity model.
Preferably, the uploading unit 411 is further configured to:
storing the designated model parameters into a memory;
among the unspecified model parameters, the unspecified model parameters with the use interval time higher than a preset storage time threshold or the use frequency lower than a preset storage frequency threshold are sent to an external storage device, and the rest model parameters are stored in a locally-arranged buffer module.
Preferably, the uploading unit 411 is further configured to:
and sending the running state information and the running instruction information to the state storage device, and triggering the state storage device to store the received running state information and the received running instruction information.
Fig. 4b is a schematic structural diagram of a device for updating a model according to an embodiment of the present application, including:
A receiving unit 420, configured to receive incremental update data sent by the training subsystem;
a merging unit 421, configured to obtain a stored current full-scale model, and merge the incremental update data with the current full-scale model to obtain an incremental full-scale model;
the incremental update data is obtained by model training of the newly added sample by the training subsystem.
Preferably, the merging unit 421 is further configured to:
receiving clipping update data sent by a training subsystem;
based on the received clipping update data, clipping update is carried out on the incremental full-quantity model to obtain a target full-quantity model;
the clipping update data is obtained based on the screened model parameters after the training subsystem screens out the model parameters of which the corresponding update information accords with the preset screening conditions.
In the system, the method, the device, the terminal equipment and the medium for model updating provided by the embodiment of the application, a training subsystem carries out model training based on the detected newly added sample, and incremental updating data obtained by training is uploaded to a release server; and the release server merges the stored current full-quantity model with the incremental update data to obtain an updated incremental full-quantity model. Therefore, the full model does not need to be loaded, only model increment data with extremely small data quantity is uploaded to the release server, the time consumed in the uploading and loading processes is greatly reduced, and the processing efficiency is improved.
Based on the same technical concept, the embodiment of the present application further provides a terminal device 500, referring to fig. 5, where the terminal device 500 is configured to implement the methods described in the above embodiments of the methods, for example, implement the embodiment shown in fig. 2, and the terminal device 500 may include a memory 501, a processor 502, an input unit 503, and a display panel 504.
A memory 501 for storing a computer program for execution by the processor 502. The memory 501 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the terminal device 500, and the like. The processor 502 may be a central processing unit (central processing unit, CPU), or a digital processing unit or the like. An input unit 503 may be used to obtain a user instruction input by a user. The display panel 504 is configured to display information input by a user or information provided to the user, where in this embodiment of the present application, the display panel 504 is mainly configured to display interfaces of applications in a terminal device and control entities displayed in the display interfaces. Alternatively, the display panel 504 may be configured in the form of a liquid crystal display (liquid crystal display, LCD) or an OLED (organic light-emitting diode) or the like.
The specific connection medium between the memory 501, the processor 502, the input unit 503, and the display panel 504 is not limited in the embodiment of the present application. In the embodiment of the present application, the memory 501, the processor 502, the input unit 503, and the display panel 504 are connected by the bus 505 in fig. 5, the bus 505 is shown by a thick line in fig. 5, and the connection manner between other components is only schematically illustrated, but not limited thereto. The bus 505 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 5, but not only one bus or one type of bus.
The memory 501 may be a volatile memory (RAM), such as a random-access memory (RAM); the memory 501 may also be a non-volatile memory (non-volatile memory), such as a read-only memory, a flash memory (flash memory), a Hard Disk Drive (HDD) or a Solid State Drive (SSD), or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. Memory 501 may be a combination of the above.
A processor 502 for implementing the embodiment shown in fig. 2, comprising:
a processor 502 for invoking a computer program stored in memory 501 to perform the embodiment shown in fig. 2.
The embodiment of the application also provides a computer readable storage medium which stores computer executable instructions required to be executed by the processor, and the computer readable storage medium contains a program for executing the processor.
In some possible embodiments, aspects of a method of model updating provided herein may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps of a method of model updating according to various exemplary embodiments of the present application as described herein above, when the program product is run on the terminal device. For example, the terminal device may perform the embodiment shown in fig. 2.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A program product for a model update of embodiments of the present application may employ a portable compact disc read-only memory (CD-ROM) and include program code and may run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an entity oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (13)

1. A model updating system, comprising: the system comprises a training subsystem and a release server, wherein the training subsystem further comprises a merging service module cluster, and the merging service module cluster at least comprises one merging service module;
the training subsystem is used for carrying out model training based on the new sample when the new sample is detected, obtaining incremental update data of the current full-quantity model, and uploading the incremental update data to the release server;
the merging service module is used for: combining the increment updating data with a locally stored current full-quantity model to obtain an increment full-quantity model; acquiring updated information of each model parameter in the incremental full model; screening out model parameters of which the corresponding updated information accords with preset screening conditions; based on the screened model parameters, obtaining clipping update data, and uploading the clipping update data to the release server;
The release server is used for combining the received increment updating data with the stored current full-quantity model to obtain an increment full-quantity model; and based on the received clipping update data, clipping update is carried out on the incremental full-scale model to obtain a target full-scale model.
2. The system of claim 1, wherein the training subsystem further comprises a dispatch service module, a gradient service module cluster, and a parameter service module cluster, wherein the gradient service module cluster comprises at least one gradient service module, and the parameter service module cluster comprises at least one parameter service module;
the scheduling service module is used for dividing the newly added samples and then distributing the newly added samples to each gradient service module;
each gradient service module is used for carrying out gradient calculation processing based on the received newly added sample and sending the obtained gradient value to the parameter service module;
and each parameter service module is used for receiving the gradient value from at least one gradient service module respectively and performing parameter calculation processing based on the received gradient value to obtain incremental update data and sending the incremental update data to the release server respectively.
3. The system of claim 1, wherein the merge service module is to:
Acquiring current time and update time contained in update information of each model parameter, and screening out each model parameter of which the time difference between the current time and the update time is higher than a preset update time threshold; and/or the number of the groups of groups,
based on the creation time, the update time and the update times contained in the obtained update information of each model parameter, the update frequency of each model parameter is respectively determined, and each model parameter with the update frequency lower than a preset update frequency threshold value is screened out.
4. The system of claim 1, wherein the merge service module is further to:
and based on the clipping update data, clipping update is carried out on the locally stored incremental full-quantity model to obtain the target full-quantity model.
5. The system of claim 2, wherein the training subsystem further comprises an external storage device for: receiving and storing model parameters sent by the training subsystem;
the parameter service module is further configured to:
and storing the designated model parameters into a memory, transmitting the unspecified model parameters with the use interval time higher than a preset storage time threshold or the use frequency lower than a preset storage frequency threshold to an external storage device, and storing the rest model parameters into a locally-arranged buffer module.
6. The system of claim 2, wherein the training subsystem further comprises a state storage device to: receiving and storing the operation state information and operation instruction information sent by the dispatching service module;
the dispatch service module is further configured to: and sending the running state information and the running instruction information to the state storage equipment.
7. A method of updating a model, comprising:
when determining that a new added sample is detected, performing model training based on the new added sample to obtain incremental update data of a current full-quantity model;
uploading the increment updating data to a release server, and triggering the release server to combine the received increment updating data with the stored current full-quantity model to obtain an increment full-quantity model;
combining the increment updating data with the stored current full-quantity model to obtain an increment full-quantity model;
acquiring updated information of each model parameter in the incremental full model;
screening out model parameters of which the corresponding updated information accords with preset screening conditions;
based on the screened model parameters, obtaining clipping update data;
and uploading the clipping update data to the release server, and triggering the release server to clip and update the incremental full-quantity model based on the received clipping update data to obtain a target full-quantity model.
8. The method of claim 7, wherein screening model parameters for which the corresponding updated information meets a preset screening condition specifically includes:
acquiring current time and update time contained in update information of each model parameter, and screening out each model parameter of which the time difference between the current time and the update time is higher than a preset update time threshold; and/or the number of the groups of groups,
based on the creation time, the update time and the update times contained in the obtained update information of each model parameter, the update frequency of each model parameter is respectively determined, and each model parameter with the update frequency lower than a preset update frequency threshold value is screened out.
9. A method of updating a model, comprising:
receiving incremental update data and clipping update data sent by a training subsystem;
acquiring a stored current full-quantity model, and combining the increment updating data with the current full-quantity model to obtain an increment full-quantity model; the incremental update data are obtained by model training of the newly added sample by the training subsystem;
based on the received clipping update data, clipping update is carried out on the incremental full-quantity model to obtain a target full-quantity model; the clipping update data are obtained based on the screened model parameters after the training subsystem screens out the model parameters of which the corresponding update information accords with the preset screening conditions.
10. An apparatus for updating a model, comprising:
the acquisition unit is used for carrying out model training based on the new added sample when the new added sample is detected, and acquiring incremental update data of the current full-quantity model;
the uploading unit is used for uploading the increment updating data to a release server and triggering the release server to combine the received increment updating data with the stored current full-quantity model to obtain an increment full-quantity model; combining the increment updating data with the stored current full-quantity model to obtain an increment full-quantity model; acquiring updated information of each model parameter in the incremental full-quantity model; screening out model parameters of which the corresponding updated information accords with preset screening conditions; based on the screened model parameters, obtaining clipping update data; and uploading the clipping update data to a release server, and triggering the release server to clip and update the incremental full-scale model based on the received clipping update data to obtain the target full-scale model.
11. A model updating apparatus, characterized by comprising:
the receiving unit is used for receiving the incremental update data and the clipping update data sent by the training subsystem;
The merging unit is used for acquiring the stored current full-quantity model, merging the increment updating data with the current full-quantity model and obtaining an increment full-quantity model; based on the received clipping update data, clipping update is carried out on the incremental full-quantity model to obtain a target full-quantity model;
the incremental update data are obtained by model training of the training subsystem on newly added samples, and the clipping update data are obtained based on the screened model parameters after the training subsystem screens out the model parameters of which the corresponding update information accords with preset screening conditions.
12. A terminal device comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program which, when executed by the processing unit, causes the processing unit to perform the steps of the method of any of claims 7 to 8 or 9.
13. A computer readable medium, characterized in that it stores a computer program executable by a terminal device, which program, when run on the terminal device, causes the terminal device to perform the steps of the method according to any of claims 7-8 or 9.
CN201811046230.6A 2018-09-07 2018-09-07 Model updating system, method, device, terminal equipment and medium Active CN110888668B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811046230.6A CN110888668B (en) 2018-09-07 2018-09-07 Model updating system, method, device, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811046230.6A CN110888668B (en) 2018-09-07 2018-09-07 Model updating system, method, device, terminal equipment and medium

Publications (2)

Publication Number Publication Date
CN110888668A CN110888668A (en) 2020-03-17
CN110888668B true CN110888668B (en) 2024-04-16

Family

ID=69744696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811046230.6A Active CN110888668B (en) 2018-09-07 2018-09-07 Model updating system, method, device, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN110888668B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113496286A (en) * 2020-03-18 2021-10-12 杭州海康威视数字技术股份有限公司 Model training control method and device
CN112418986A (en) * 2020-11-19 2021-02-26 定智衣(上海)服装科技有限公司 Algorithm upgrading solution for high-stability intelligent energy body
CN112613938B (en) * 2020-12-11 2023-04-07 上海哔哩哔哩科技有限公司 Model training method and device and computer equipment
CN112860303B (en) * 2021-02-07 2023-07-04 济南大学 Model incremental updating method and system
CN114706864B (en) * 2022-03-04 2022-11-01 阿波罗智能技术(北京)有限公司 Model updating method and device for automatically mining scene data and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294568A (en) * 2013-06-24 2013-09-11 国家电网公司 Distribution network model incremental storage method based on E language
CN105718490A (en) * 2014-12-04 2016-06-29 阿里巴巴集团控股有限公司 Method and device for updating classifying model
CN105843867A (en) * 2016-03-17 2016-08-10 畅捷通信息技术股份有限公司 Metadata model-based search method and search device based on metadata model
CN106980753A (en) * 2017-02-28 2017-07-25 浙江工业大学 A kind of data-driven machine learning method analyzed based on voxel for sacred disease
CN107527091A (en) * 2016-10-14 2017-12-29 腾讯科技(北京)有限公司 Data processing method and device
CN107688493A (en) * 2016-08-05 2018-02-13 阿里巴巴集团控股有限公司 Train the method, apparatus and system of deep neural network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8595154B2 (en) * 2011-01-26 2013-11-26 Google Inc. Dynamic predictive modeling platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294568A (en) * 2013-06-24 2013-09-11 国家电网公司 Distribution network model incremental storage method based on E language
CN105718490A (en) * 2014-12-04 2016-06-29 阿里巴巴集团控股有限公司 Method and device for updating classifying model
CN105843867A (en) * 2016-03-17 2016-08-10 畅捷通信息技术股份有限公司 Metadata model-based search method and search device based on metadata model
CN107688493A (en) * 2016-08-05 2018-02-13 阿里巴巴集团控股有限公司 Train the method, apparatus and system of deep neural network
CN107527091A (en) * 2016-10-14 2017-12-29 腾讯科技(北京)有限公司 Data processing method and device
WO2018068742A1 (en) * 2016-10-14 2018-04-19 腾讯科技(深圳)有限公司 Data processing method and device
CN106980753A (en) * 2017-02-28 2017-07-25 浙江工业大学 A kind of data-driven machine learning method analyzed based on voxel for sacred disease

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于增量式SVR学习的在线自适应建模方法;王平;田华阁;田学民;黄德先;;化工学报(第08期);全文 *

Also Published As

Publication number Publication date
CN110888668A (en) 2020-03-17

Similar Documents

Publication Publication Date Title
CN110888668B (en) Model updating system, method, device, terminal equipment and medium
US11093268B2 (en) Portable aggregated information calculation and injection for application containers
CN109857555B (en) Memory recovery method and device, storage medium and electronic equipment
US9870270B2 (en) Realizing graph processing based on the mapreduce architecture
US10572285B2 (en) Method and apparatus for elastically scaling virtual machine cluster
US9406023B2 (en) System recommendations based on incident analysis
CN109408205B (en) Task scheduling method and device based on hadoop cluster
CN109857556B (en) Memory recovery method and device, storage medium and electronic equipment
US20190050258A1 (en) System for providing function as a service (faas), and operating method of system
US11941451B2 (en) Orchestration of containerized applications
CN107729570B (en) Data migration method and device for server
US9547520B1 (en) Virtual machine load balancing
US11074134B2 (en) Space management for snapshots of execution images
CN111813545A (en) Resource allocation method, device, medium and equipment
CN104750538B (en) Method and system for providing virtual storage pool for target application
CN108769162B (en) Distributed message equalization processing method and device, electronic equipment and storage medium
CN111198754B (en) Task scheduling method and device
CN104580194A (en) Virtual resource management method and device oriented to video applications
CN115543965A (en) Cross-machine-room data processing method, device, storage medium, and program product
CN115827250A (en) Data storage method, device and equipment
US20200349258A1 (en) Methods and systems for preventing utilization of problematic software
CN113076224A (en) Data backup method, data backup system, electronic device and readable storage medium
US20190310920A1 (en) Pre-Fetching and Staging of Restore Data on Faster Tiered Storage
CN115981871B (en) GPU resource scheduling method, device, equipment and storage medium
CN114116790A (en) Data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40021557

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant