Model updating system and method based on sub-model migration

By detecting the update status of the main model and sub-model, and using sub-model migration technology to update based on single-dimensional device data, the problem of frequent sub-model updates in the model system is solved, recognition accuracy is improved and resources are saved.

CN120803485APending Publication Date: 2025-10-17SHANGHAI QIYUE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510657115.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In the existing technology, the attenuation problem caused by the distribution difference between actual samples and training samples in the model system leads to frequent updates of sub-models, increasing iteration and maintenance costs. At the same time, retraining the sub-model will lose recognition accuracy and resources.

Method used

By detecting the update status of the main model and sub-model, using sub-model migration technology to update based on single-dimensional device data, retaining the model file path and Booster instance for training, and combining the sub-model results to iteratively train the main model, the model's linkage update is achieved.

Benefits of technology

The recognition accuracy of the corresponding dimensions of the sub-model is improved, which saves training resources and time, and at the same time improves the recognition accuracy of the main model for non-safety devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803485A_ABST
    Figure CN120803485A_ABST
Patent Text Reader

Abstract

The invention discloses a model updating system and method based on sub-model migration. The method comprises the steps that updating states of a main model and all sub-models are detected respectively; when it is detected that a certain sub-model needs to be updated, continuing to train the sub-model according to the single-dimensional equipment data corresponding to the sub-model on the basis of the sub-model; when it is detected that the main model needs to be updated, the sub-results output by all the sub-models called by the main model serve as a training set to iteratively train the main model. When it is detected that a certain sub-model needs to be updated, the sub-model continues to be trained on the basis of the existing sub-model, the characteristics of an early-stage equipment sample and a later-stage equipment sample can be synthesized, the recognition accuracy of the sub-model on the corresponding dimension can be improved, meanwhile, retraining is not needed, and training resources and training time are saved. And when it is detected that the main model needs to be updated, linkage updating of the sub-model and the main model is completed, and the accuracy of the main model on security identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer application, in particular to a model updating system and method based on sub-model migration. BACKGROUND

[0002] With the development of the Internet, various Internet service platforms have emerged, such as online shopping platforms, online car-hailing platforms, sharing platforms, maps, music, etc. These platforms have brought great convenience to people's lives, but because they are closely related to the Internet, there are various security risks such as network transmission interception, network storage malicious acquisition, platform illegal access, resource service illegal occupation, etc. For example, data fraud, illegal data / resource acquisition by untrustworthy persons, data / resource theft or malicious interception, abnormal access to the platform, etc.

[0003] Currently, machine learning models (referred to as models) are mainly used to identify devices that pose security risks, predict device security, i.e., whether it is an unsafe device, an illegal device, etc., to avoid irreversible security risks on platforms, networks, data, resources, etc., and prevent risks in advance. With higher requirements for identification speed and accuracy, model systems containing main models and sub-models have emerged. In this system, each sub-model can process device data of a single dimension and output results, and the main model can select and call multiple sub-models to output and process according to the type of the actual risk control task to obtain the identification result.

[0004] Under normal circumstances, after a model is put into operation for a period of time, there will be a problem of model degradation due to the distribution difference between actual samples and training samples, so the model needs to be updated. In the above model system, the same sub-model may be frequently called by multiple sub-models, and if the sub-model is iteratively updated, the iteration frequency will be high, resulting in relatively high iteration and maintenance costs. In another way, the previous sub-model is discarded when updating the sub-model, and a new sub-model is retrained. This way not only loses the foundation of the previous training and affects the accuracy of identifying unsafe devices, but also requires more time and training resources for retraining. SUMMARY

[0005] Therefore, the present application mainly aims to provide a model updating system and method based on sub-model migration to at least partially solve at least one of the above technical problems.

[0006] To solve the above technical problems, the first aspect of the present application provides a model updating system based on sub-model migration, characterized in that the system is used to update a main model and multiple sub-models under the main model, and the system comprises: a detection module for detecting the update state of the main model and each sub-model, respectively; The first updating module is configured to, when detecting that a certain sub-model needs to be updated, continue training the sub-model according to the single-dimension device data corresponding to the sub-model on the basis of the sub-model, to obtain an updated sub-model. The second updating module is configured to, when detecting that the master model needs to be updated, iteratively train the master model by taking the sub-results output by each sub-model called by the master model as a training set, to obtain an updated master model.

[0007] According to a preferred embodiment of the present application, the sub-model is a LightGBM model, and the first updating module is configured to retain the model file path, the Booster instance, or the serialized dictionary of the sub-model, and continue training the sub-model according to the single-dimension device data corresponding to the sub-model, to obtain an updated sub-model.

[0008] According to a preferred embodiment of the present application, the sub-model includes multiple layers, and the first updating module includes: The dividing module is configured to divide the single-dimension device data into a first training set and a second training set. The adding module is configured to freeze each layer of the sub-model, and add a trainable training layer to the topmost frozen layer. The first sub-training module is configured to train the training layer through the first training set. The second sub-training module is configured to unfreeze each frozen layer, and train all layers through the second training set, to obtain an updated sub-model.

[0009] According to a preferred embodiment of the present application, the detecting module includes: The sub-determining module is configured to determine the model indicators of the master model and each sub-model, respectively. The judging module is configured to determine whether the master model and each sub-model need to be updated according to the model indicators, respectively, to obtain the update states of the master model and each sub-model. Alternatively, the detecting module includes: The configuring module is configured to configure the update time points of the master model and each sub-model, respectively. The sub-determining module is configured to determine the update states of the master model and each sub-model according to the update time points.

[0010] To solve the above technical problem, the second aspect of the present application provides a model updating method based on sub-model migration, which is used to update a master model and multiple sub-models under the master model, and includes: Respectively detecting the update states of the master model and each sub-model; When it is detected that a certain sub-model needs to be updated, the sub-model is continuously trained based on the sub-model and the single-dimension device data corresponding to the sub-model, to obtain an updated sub-model. When it is detected that the main model needs to be updated, the sub-results output by each sub-model called by the main model are taken as a training set to iteratively train the main model, to obtain an updated main model.

[0011] According to a preferred embodiment of the present application, the sub-model is a LightGBM model, and the model file path, Booster instance, or serialized dictionary of the sub-model is retained, and the sub-model is continuously trained based on the sub-model and the single-dimension device data corresponding to the sub-model, to obtain an updated sub-model.

[0012] According to a preferred embodiment of the present application, the sub-model includes multiple layers, and the sub-model is continuously trained based on the sub-model and the single-dimension device data corresponding to the sub-model, to obtain an updated sub-model, including: The single-dimension device data is divided into a first training set and a second training set; Each layer of the sub-model is frozen, and a trainable training layer is added to the topmost frozen layer; The training layer is trained by the first training set; Each frozen layer is unfrozen, and all layers are trained by the second training set, to obtain an updated sub-model.

[0013] According to a preferred embodiment of the present application, the detection of the update states of the main model and each sub-model respectively includes: The model indicators of the main model and each sub-model are determined respectively; It is determined whether the main model and each sub-model need to be updated according to the model indicators, to obtain the update states of the main model and each sub-model; Alternatively, The update time points of the main model and each sub-model are configured respectively; The update states of the main model and each sub-model are determined according to the update time points.

[0014] To solve the above technical problems, the third aspect of the present application provides an electronic device, including: a processor; and a memory storing computer-executable instructions that, when executed, cause the processor to perform the method according to any one of the above.

[0015] To solve the above technical problems, the fourth aspect of the present application provides a computer program product, including a computer program, characterized in that the computer program is executed by a processor to implement the method according to any one of the above.

[0016] To sum up, the application detects the update state of the master model and each sub-model; when detecting that a certain sub-model needs to be updated, the sub-model is continuously trained according to the equipment data of the single dimension corresponding to the sub-model on the basis of the existing sub-model, the characteristics of the early equipment samples and the late equipment samples can be comprehensively considered, the recognition accuracy of the sub-model to the corresponding dimension is improved, and meanwhile, the training resources and the training time are saved without retraining. When detecting that the master model needs to be updated, the sub-results output by each sub-model called by the master model are taken as a training set to iteratively train the master model, the linkage update of the sub-model and the master model is completed, and the accuracy of the master model in recognizing the non-safe equipment is further improved. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to make the technical problems solved by the application, the technical means adopted and the technical effects obtained more clear, the specific embodiments of the application will be described in detail below with reference to the drawings. However, it should be declared that the drawings described below are only the drawings of the exemplary embodiments of the application, and for those skilled in the art, other drawings of embodiments can be obtained from these drawings without creative labor.

[0018] Figure 1 is a structural framework schematic diagram of a model update system based on sub-model migration provided by an embodiment of the application; Figure 2 is a flow schematic diagram of a model update method based on sub-model migration provided by an embodiment of the application; Figure 3 is a structural diagram of an exemplary embodiment of an electronic device according to the application; Figure 4 is a schematic diagram of a computer readable medium embodiment of the application. DETAILED DESCRIPTION

[0019] Under the premise of conforming to the technical concept of the application, the structures, performances, effects or other features described in a certain specific embodiment can be combined into one or more other embodiments in any suitable manner.

[0020] In the process of introducing the specific embodiments, the detailed description of the structures, performances, effects or other features is to enable those skilled in the art to fully understand the embodiments. However, it does not exclude that those skilled in the art can implement the application without the above-mentioned structures, performances, effects or other features in specific cases. The drawings in the drawings are only exemplary demonstrations, and do not represent that all the contents, operations and steps in the scheme of the application must be included, nor must they be executed in the order shown in the drawings.

[0021] REFERENCEFigure 1 , Figure 1 is a structural framework diagram of a model updating system based on sub-model migration provided by an embodiment of the present application, which is used to update a master model and multiple sub-models under the master model, as shown in Figure 1 The system comprises: a detection module 21 configured to detect updating states of the master model and each sub-model, respectively; a first updating module 22 configured to, when detecting that a certain sub-model needs to be updated, continue training the sub-model according to single-dimension device data corresponding to the sub-model on the basis of the sub-model, to obtain an updated sub-model; the single-dimension device data comprises one of a region where a device is located, a device purchase record, a device return record, device information, or device behavior information; a second updating module 23 configured to, when detecting that the master model needs to be updated, iteratively train the master model by taking sub-results output by each sub-model called by the master model as a training set, to obtain an updated master model.

[0022] In a specific embodiment, the sub-model is a LightGBM model, and the first updating module 22 is configured to retain a model file path, a Booster instance, or a serialized dictionary of the sub-model, and continue training the sub-model according to single-dimension device data corresponding to the sub-model, to obtain an updated sub-model.

[0023] In a specific embodiment, the sub-model comprises multiple layers, and the first updating module 22 comprises: a division module configured to divide the single-dimension device data into a first training set and a second training set; an addition module configured to freeze each layer of the sub-model, and add a trainable training layer to a topmost frozen layer; a first sub-training module configured to train the training layer through the first training set; a second sub-training module configured to unfreeze each frozen layer, and train all layers through the second training set, to obtain an updated sub-model.

[0024] Further, the detection module 21 comprises: a sub-determination module configured to determine model indicators of the master model and each sub-model, respectively; a judgment module configured to determine whether the master model and each sub-model need to be updated according to the model indicators, respectively, to obtain updating states of the master model and each sub-model; Alternatively, the detection module comprises: a configuration module configured to configure updating time points of the master model and each sub-model, respectively; The sub determination module is configured to determine the update state of the master model and each sub model according to an update time point.

[0025] Based on Figure 1 The model update system based on sub model migration provided in the application also provides a business risk control system, which comprises: The acquisition module is configured to acquire target device features of the device in response to a service request of the device. The identification module is configured to input the target device features into a pre-updated security identification model, so as to identify a security identification result of the device according to an output result of the security identification model; the security identification model is obtained by updating the model update method. The execution module is configured to execute a monitoring service or task according to the security identification result.

[0026] Based on Figure 1 The model update system based on sub model migration provided in the application also provides a model update method based on sub model migration, which is used to update a master model and a plurality of sub models under the master model, such as Figure 2 The model update method based on sub model migration comprises: S1, detecting the update state of the master model and each sub model, respectively; In this embodiment, each sub model can correspond to processing single-dimensional device data and outputting a result. The single-dimensional device data can include one of the following: a device location, a device purchase record, a device return record, device information, or device behavior information. Wherein: each sub model corresponds to processing only one single-dimensional device data, for example: sub model 1 can process the device location, sub model 2 can process the device purchase record, sub model 3 can process the device return record, and so on. And the master model can select to call the output of multiple sub models for processing according to the type of the actual monitoring task (such as: identifying and rejecting devices with security risks, identifying and recalling devices without security risks, etc.), to obtain an identification result. That is, in this embodiment, there is a master model set and a sub model set, and any master model in the master model set can select and call the output result of multiple sub models from the sub model set as its input according to the task requirement, so as to improve the accuracy of the master model input data and the accuracy of the master model identification through the processing of single-dimensional device data by the sub model.

[0027] Among them, the device purchase record refers to the record of the device purchasing goods on the platform. The device return record refers to the record of whether the goods are returned on time after the device applies for platform goods. The goods can be physical goods, virtual goods, services, etc., and the present invention does not make specific limitations. The device communication record may include the device's address book contacts, communication records stored by the device, and other communication-related information. The device information may include: the device's gender, age, education level, fraud record, violation record, etc. The device behavior information refers to the device's operation information on the platform, such as: browsing, visiting, collecting, clicking, etc. The device can be: a mobile phone, a computer, etc.

[0028] In this embodiment, the update status of the main model and each sub-model can be detected in real time. For example, in one example, the model indicators of the main model and each sub-model can be determined respectively; then, based on the model indicators, it is determined whether the main model and each sub-model need to be updated, thereby obtaining the update status of the main model and each sub-model. The update status may include two states: need to update and do not need to update. The model indicator is used to reflect the degree of attenuation of the model, such as AUC. The ACU of each model can be calculated as the initial ACU when each model is online, and the ACU of each model can be calculated in real time as the current ACU during the model operation process. Whether each model needs to be updated is determined based on the difference between the initial ACU and the current AUC. For example, when the difference between the initial ACU and the current AUC is greater than a threshold, it is determined that the model needs to be updated. When the difference between the initial ACU and the current AUC is less than a threshold, it is determined that the model does not need to be updated.

[0029] Alternatively, the update status of the main model and each sub-model can be regularly checked. For example, in another example, the update time points for the main model and each sub-model can be configured separately; the update status of the main model and each sub-model can be determined based on the update time point. In this example, the update status of each model can be set to "not requiring update" by default. At each update time point, the model corresponding to that update time point can be found and its update status set to "requiring update" can be set.

[0030] S2. When it is detected that a sub-model needs to be updated, the sub-model is further trained based on the device data of a single dimension corresponding to the sub-model to obtain an updated sub-model; When the present invention detects that a sub-model needs to be updated, it continues to train the sub-model based on the device data of a single dimension corresponding to the sub-model. It can integrate the characteristics of early device samples and later device samples to improve the recognition accuracy of the sub-model for its corresponding dimension. At the same time, there is no need for retraining, saving training resources and training time.

[0031] The process of continuing training in this embodiment is related to the type of sub-model. In an example, the sub-model is a LightGBM model. In this case, the model file path, the Booster instance, or the serialized dictionary of the sub-model can be retained as the basis for continuing training, the sub-model is loaded, and the single-dimension device data corresponding to the sub-model is input into the sub-model to continue training the sub-model according to the single-dimension device data corresponding to the sub-model, thereby obtaining an updated sub-model.

[0032] In an example, the sub-model includes multiple layers, such as a deep learning model. In this case, the single-dimension device data corresponding to the sub-model can be divided into a first training set and a second training set. The layers of the sub-model that have been trained before are obtained and frozen to avoid destroying any information contained therein in subsequent training rounds. A new trainable training layer is added to the topmost layer that has been frozen. The training layer is trained by the first training set. The training layer learns to convert old device data into a prediction of new device data. After training, fine-tuning is performed. The frozen layers are unfrozen, and all layers are trained by the second training set at a learning rate lower than a threshold, thereby obtaining an updated sub-model.

[0033] S3. When it is detected that the main model needs to be updated, the sub-results output by the sub-models called by the main model are used as a training set to iteratively train the main model, thereby obtaining an updated main model.

[0034] In this embodiment, the sub-results output by the sub-models can be model scores. The historical model scores output by the sub-models called by the main model and the incremental model scores generated between the current update and the last update can be used as a training set to iteratively train the main model. Alternatively, the historical results output by the main model can be supplemented to the incremental model scores generated between the current update and the last update to be used as a training set to iteratively train the main model.

[0035] Based on Figure 2 The business risk control method provided by the embodiment of the present application comprises the following steps: S101. In response to a service request of a device, target device features of the device are obtained. S103. The target device features are input into a pre-trained security identification model to identify a security identification result of the device according to an output result of the security identification model; the security identification model is obtained by updating the model update method described in any one of the preceding embodiments. S103. According to the security identification result, a monitored business (task) is executed.

[0036] Those skilled in the art can understand that the modules in the above system embodiments can be distributed in the system as described, or can be changed accordingly and distributed in one or more systems different from the above embodiments. The modules of the above embodiments can be combined into one module, or can be further split into multiple sub-modules.

[0037] The electronic device embodiments of the present application are described below, which can be regarded as the physical form of the embodiments of the above method and system embodiments of the present application. The details described in the electronic device embodiments of the present application should be regarded as a supplement to the above method or system embodiments; for the details not disclosed in the electronic device embodiments of the present application, reference can be made to the above method or system embodiments.

[0038] Figure 3 is a structural block diagram of an exemplary embodiment of an electronic device according to the present application. Figure 3 The electronic device shown is only an example and should not bring any limitation to the function and use range of the embodiments of the present application.

[0039] As shown in Figure 3 , the electronic device 300 of the exemplary embodiment is in the form of a general data processing device. The components of the electronic device 300 can include but are not limited to: at least one processing unit 310, at least one storage unit 320, a bus 330 connecting different electronic device components (including the storage unit 320 and the processing unit 310), a display unit 340, etc.

[0040] The storage unit 320 stores a computer readable program, which can be a source program or a code of a read-only program. The program can be executed by the processing unit 310, so that the processing unit 310 performs the steps of various embodiments of the present application. For example, the processing unit 310 can perform the steps as shown in Figure 1 .

[0041] The bus 330 can be one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus structures.

[0042] The electronic device 300 can also communicate with one or more external devices 100 such as a keyboard, a display, a pointing device, a satellite radio, a Bluetooth device, and so on. This communication can occur via the input / output (I / O) interface 350. Still yet, the electronic device 300 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet via the network adapter 360. These and other input / output devices can be connected to the electronic device 300 by various wired or wireless connections, and still yet can communicate with one another via input / output interfaces 350 that can be included in the electronic device 300.

[0043] Figure 4 is a schematic diagram of one computer-readable medium embodiment of the present application. As shown in Figure 4 the computer program can be stored on one or more computer-readable media. The computer-readable medium can be a readable signal medium or a readable storage medium. When the computer program is executed by one or more data processing devices, the computer-readable medium can implement the above-mentioned method of the present application, i.e., respectively detecting the update state of the master model and each sub-model; when it is detected that a certain sub-model needs to be updated, continuing to train the sub-model on the basis of the sub-model according to the single-dimension device data corresponding to the sub-model to obtain an updated sub-model; the single-dimension device data includes one of the following: the region where the device is located, the device purchase record, the device return record, the device information, or the device behavior information; when it is detected that the master model needs to be updated, taking the sub-results output by each sub-model called by the master model as a training set to iteratively train the master model to obtain an updated master model.

[0044] In summary, the present application can be implemented by a method, a system, an electronic device, or a computer-readable medium. Some or all of the functions of the present application can be implemented in practice using a general-purpose data processing device such as a microprocessor or a digital signal processor (DSP).

[0045] The above-described specific embodiments further illustrate the purpose, technical solutions, and beneficial effects of the present application. It should be understood that the present application is not inherently related to any specific computer, virtual system, or electronic device, and various general-purpose systems can also implement the present application. The above-described specific embodiments are merely examples of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, and the like made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A model updating system based on sub-model migration, characterized in that: The system is used to update a main model and multiple sub-models under the main model, and the system includes: The detection module is used to detect the update status of the main model and each sub-model respectively; A first updating module is configured to, when detecting that a sub-model needs to be updated, continue training the sub-model based on the sub-model according to the single-dimensional device data corresponding to the sub-model to obtain an updated sub-model; The second updating module is used to iteratively train the main model using the sub-results output by each sub-model called by the main model as a training set when it is detected that the main model needs to be updated, so as to obtain an updated main model.

2. The system according to claim 1, wherein: The sub-model is a LightGBM model, and the first update module is used to retain the model file path, Booster instance, or serialized dictionary of the sub-model, and continue to train the sub-model according to the single-dimensional device data corresponding to the sub-model to obtain an updated sub-model.

3. The system according to claim 1, wherein: The sub-model includes multiple layers, and the first update module includes: A partitioning module, configured to divide the single-dimensional device data into a first training set and a second training set; Add a module to freeze the layers of the sub-model and add a trainable training layer to the top frozen layer. A first sub-training module, configured to train the training layer using a first training set; The second sub-training module is used to unfreeze the frozen layers and train all layers using the second training set to obtain an updated sub-model.

4. The system according to claim 1, wherein: The detection module includes: A sub-determination module is used to determine the model indicators of the main model and each sub-model respectively; A judgment module is used to judge whether the main model and each sub-model need to be updated according to the model indicators, and obtain the update status of the main model and each sub-model; Alternatively, the detection module includes: Configuration module, used to configure the update time points of the main model and each sub-model respectively; The sub-determination module is used to determine the update status of the main model and each sub-model according to the update time point.

5. A model updating method based on sub-model migration, characterized in that: The method is used to update a main model and multiple sub-models under the main model, and the method includes: Check the update status of the main model and each sub-model respectively; When it is detected that a sub-model needs to be updated, the sub-model is further trained based on the sub-model according to the single-dimensional device data corresponding to the sub-model to obtain an updated sub-model; When it is detected that the main model needs to be updated, the sub-results output by each sub-model called by the main model are used as training sets to iteratively train the main model to obtain an updated main model.

6. The method according to claim 5, characterized in that The sub-model is a LightGBM model. The model file path, Booster instance, or serialized dictionary of the sub-model is retained, and the sub-model is continued to be trained according to the single-dimensional device data corresponding to the sub-model to obtain an updated sub-model.

7. The method according to claim 5, characterized in that The sub-model includes multiple layers, and the sub-model is further trained based on the single-dimensional device data corresponding to the sub-model to obtain an updated sub-model including: The single-dimensional device data is divided into a first training set and a second training set; Freeze each layer of the sub-model and add a trainable training layer to the frozen top layer; Training the training layer using a first training set; Unfreeze the frozen layers and train all layers using the second training set to obtain the updated sub-model.

8. The method according to claim 5, characterized in that The step of detecting the update status of the main model and each sub-model separately includes: Determine the model indicators of the main model and each sub-model respectively; Determine whether the main model and each sub-model need to be updated according to the model indicators, and obtain the update status of the main model and each sub-model; or, Configure the update time points of the main model and each sub-model separately; The update status of the main model and each sub-model is determined according to the update time point.

9. An electronic device comprising: processor; as well as A memory storing computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 5 to 8.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 5 to 8 is implemented.