Continuous learning method and device of model, storage medium and electronic device

By optimizing the original model with the target domain data set and source domain features in the second computer room, the privacy leakage problem in the continuous learning of the model is solved, and the privacy security and cost-effective model update is achieved.

CN120373412APending Publication Date: 2025-07-25ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510443797.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

There is a problem of privacy leakage during the continuous learning of the model, and the existing technology has not been effectively solved.

Method used

Receive source domain features in the first computer room and continuously learn the original model in the second computer room using the target domain data set. Through feature distillation, feature reconstruction and supervised learning to optimize the model, avoid privacy leakage caused by direct data transmission.

Benefits of technology

It realizes the privacy security of continuous learning of the model, avoids privacy leakage during data transmission, and reduces labeling costs and improves the generalization ability of the model in new scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373412A_ABST
    Figure CN120373412A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a continuous learning method and device of a model, a storage medium and an electronic device, and the method comprises the steps: receiving a source domain feature transmitted from a first machine room; continuously learning the original model in a second machine room by using a target domain data set collected in a second scene; the step of continuously learning the original model by using a target domain data set collected in a second scene comprises the following steps: inputting the target domain data set into the original model to obtain a first target domain feature; marking a sub-data set included in the target domain data set to obtain a marked data set; and optimizing the original model based on the target domain data set, the source domain feature, the first target domain feature and the annotation data set to obtain a target tuning model. According to the method and the device, the problem of privacy disclosure caused by continuous learning of the model is solved, and the effect of privacy security of continuous learning of the model is further achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computers, and more particularly, to a method, apparatus, storage medium, and electronic device for continuous learning of a model. Background Art

[0002] In the related art, during the continuous learning process of a model, it is necessary to train the original model based on source domain images in a central computer room and then transfer the source domain images to a node computer room. However, during the image transfer process, privacy leakage may occur.

[0003] It can be seen that there is a technical problem in the related art that continuous learning of a model may lead to privacy leakage.

[0004] In view of the above problems existing in the related art, no effective solution has been proposed yet. Summary of the Invention

[0005] The embodiments of the present invention provide a method, apparatus, storage medium, and electronic device for optimizing a model to at least solve the problem that continuous learning of a model in the related art may lead to privacy leakage.

[0006] According to an embodiment of the present invention, a method for continuous learning of a model is provided, including: receiving source domain features sent from a first computer room, where the source domain features are features obtained by extracting features from a source domain data set collected in a first scenario using an original model, the original model is a model trained using training data in the first scenario in the first computer room, and the original model cannot be trained using data in other scenarios in the first computer room; performing continuous learning on the original model using a target domain data set collected in a second scenario in a second computer room; performing continuous learning on the original model using the target domain data set collected in the second scenario includes: inputting the target domain data set into the original model to obtain first target domain features, where the second scenario is different from the first scenario, and the target domain data set is an unlabeled data set; labeling a sub-data set included in the target domain data set to obtain a labeled data set, where the number of data included in the sub-data set is less than the number of data included in the target domain data set; optimizing the original model based on the target domain data set, the source domain features, the first target domain features, and the labeled data set to obtain a target tuned model.

[0007] In an exemplary embodiment, optimizing the original model based on the target domain dataset, the source domain features, the first target domain features, and the labeled dataset to obtain a target tuned model includes: inputting the target domain dataset into an initial tuned model to obtain second target domain features, where the initial tuned model is a model obtained by optimizing the original model, and the initial state of the initial tuned model is the same as that of the original model; determining a target loss value based on the source domain features, the first target domain features, the labeled dataset, and the second target domain features; and iteratively updating the model parameters of the initial tuned model based on the target loss value to obtain the target tuned model.

[0008] In an exemplary embodiment, determining a target loss value based on the source domain features, the first target domain features, the labeled dataset, and the second target domain features includes: performing feature distillation on the first target domain features and the second target domain features to obtain a first loss value; performing feature reconstruction on the second target domain features and the source domain features to obtain a second loss value; performing supervised learning on the labeled dataset using the initial tuned model to obtain a third loss value; and determining the target loss value based on the first loss value, the second loss value, and the third loss value.

[0009] In an exemplary embodiment, performing feature distillation on the first target domain features and the second target domain features to obtain a first loss value includes: performing the following operations for each first sub-target domain feature included in the first target domain features: determining the first sub-target domain feature included in the first target domain features, and determining the second sub-target domain feature corresponding to the first sub-target domain feature included in the second target domain features, where the first sub-target domain feature and the second sub-target domain feature are features of the same target domain data; determining the first sub-target domain feature as the teacher network feature, and determining the second sub-target domain feature as the student network feature; and determining the first loss value based on the teacher network feature and the student network feature.

[0010] In an exemplary embodiment, performing feature reconstruction on the second target domain features and the source domain features to obtain a second loss value includes: inputting the second target domain features into a reconstruction model included in the initial tuned model to obtain a first reconstructed feature; inputting the source domain features into the reconstruction model to obtain a second reconstructed feature; and determining the second loss value based on the first reconstructed feature and the second reconstructed feature.

[0011] In an exemplary embodiment, after optimizing the original model based on the target domain dataset, the source domain features, the first target domain features, and the labeled dataset to obtain a target tuned model, the method further includes: obtaining a target image; inputting the target image into the target tuned model to identify the biological information included in the target image.

[0012] According to another embodiment of the present invention, there is provided a continuous learning device for a model, including: a receiving module, configured to receive source domain features sent from a first computer room, where the source domain features are features obtained by extracting features from a source domain dataset collected in a first scenario using an original model, and the original model is a model trained using training data in the first scenario in the first computer room, and the original model cannot be trained using data in other scenarios in the first computer room; a learning module, configured to perform continuous learning on the original model using a target domain dataset collected in a second scenario in a second computer room; performing continuous learning on the original model using the target domain dataset collected in the second scenario includes: inputting the target domain dataset into the original model to obtain first target domain features, where the second scenario is different from the first scenario, and the target domain dataset is an unlabeled dataset; labeling a sub-dataset included in the target domain dataset to obtain a labeled dataset, where the number of data included in the sub-dataset is less than the number of data included in the target domain dataset; optimizing the original model based on the target domain dataset, the source domain features, the first target domain features, and the labeled dataset to obtain a target tuned model.

[0013] According to still another embodiment of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0014] According to still another embodiment of the present invention, there is also provided an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0015] According to still another embodiment of the present invention, there is also provided a computer program product, including a computer program, where the steps of the methods described in various embodiments of the present application are implemented when the computer program is executed by a processor.

[0016] Through the present invention, source domain features sent from the first computer room can be received. The source domain features can be understood as features obtained by extracting features from the source domain data set collected in the first scenario through the original model. Among them, the original model is a model trained using the training data in the first scenario in the first computer room, and the original model cannot be trained using the data in other scenarios in the first computer room. After receiving the original model sent from the first computer room, continuous learning can be performed on the original model in the second computer room using the target domain data set collected in the second scenario, that is, it can include: inputting the target domain data set into the original model for feature extraction to obtain the first target domain features, where the first scenario and the second scenario are two different scenarios. The sub-data set in the target domain data set in the second scenario can also be labeled to obtain the labeled data set. Using the above-obtained target domain data set, source domain features, first target domain features, and labeled data set to optimize the original model, a target tuning model can be obtained. Since after receiving the source domain features sent from the first computer room, continuous learning can be performed on the original model in the second computer room using the target domain data set, source domain features, first target domain features, and labeled data set, the technical problem of privacy leakage caused by continuous learning of the model in the related art can be solved, and the effect of privacy security in continuous learning of the model can be achieved. Description of the Drawings

[0017] Figure 1 is a block diagram of the hardware structure of a mobile terminal for a method of continuous learning of a model according to an embodiment of the present invention;

[0018] Figure 2 is a flowchart of a method of continuous learning of a model according to an embodiment of the present invention;

[0019] Figure 3 is a schematic diagram of a method of continuous learning of a model according to a specific embodiment of the present invention;

[0020] Figure 4 is a schematic diagram of a method of continuous learning of a biometric recognition model in the related art;

[0021] Figure 5 is a block diagram of a device for continuous learning of a model according to an embodiment of the present invention. Detailed Embodiments

[0022] In the following, embodiments of the present invention will be described in detail with reference to the drawings and in conjunction with the embodiments.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.

[0024] The method embodiments provided in the embodiments of the present application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal for a continuous learning method of a model according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processors 102 may include, but are not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown in the figure.

[0025] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the continuous learning method of the model in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely set relative to the processor 102, and these remote memories can be connected to the mobile terminal through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and their combinations.

[0026] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC for Network Interface Controller), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (abbreviated as RF) module, which is used to communicate with the Internet wirelessly.

[0027] In this embodiment, an optimization method of a model is provided. Figure 2 is a flowchart of a continuous learning method of a model according to an embodiment of the present invention. As Figure 2As shown in the figure, the process includes the following steps:

[0028] Step S202: Receive the source domain features sent from the first computer room. The source domain features are the features obtained by extracting features from the source domain dataset collected in the first scenario using the original model. The original model is a model trained using the training data in the first scenario in the first computer room, and the original model cannot be trained using data in other scenarios in the first computer room.

[0029] Step S204: Continuously learn the original model using the target domain dataset collected in the second scenario in the second computer room.

[0030] Continuously learning the original model using the target domain dataset collected in the second scenario includes:

[0031] Input the target domain dataset into the original model to obtain the first target domain features. The second scenario is different from the first scenario, and the target domain dataset is an unlabeled dataset.

[0032] Label the sub-datasets included in the target domain dataset to obtain a labeled dataset, where the number of data included in the sub-dataset is less than the number of data included in the target domain dataset.

[0033] Optimize the original model based on the target domain dataset, the source domain features, the first target domain features, and the labeled dataset to obtain a target tuned model.

[0034] In the above embodiments, the first scenario can be understood as the scenario from which the training data for the original model has been trained, and the second scenario can be understood as a new scenario in which the original model has not been trained. That is, the source domain dataset is the data collected in the first scenario, and the target domain dataset is the new data collected in the second scenario. The collection and processing processes of the source domain dataset and the target domain dataset can be referred to Figure 3 , Figure 3 is a schematic diagram of the continuous learning method of the model according to a specific embodiment of the present invention. As Figure 3 shown, the source domain features can be obtained by extracting features from the source domain dataset collected in the first scenario using the original model in the central computer room (i.e., the above-mentioned first computer room), and the first target domain features can also be obtained by extracting features from the unlabeled target domain images (i.e., the above-mentioned target domain dataset) collected in the second scenario using the original model in the node computer room (i.e., the above-mentioned second computer room).

[0035] In the above embodiments, part of the data (i.e., the above-mentioned sub-dataset) can be extracted from the target domain dataset for manual annotation, and an annotated dataset can be obtained. The original model can be optimized in a multi-task learning manner using the target domain dataset, the source domain dataset, the first target domain dataset, and the annotated dataset, and an optimized target optimized model can be obtained. That is, in the second computer room, the target domain dataset collected in the second scenario, the source domain features obtained by feature extraction of the source domain dataset in the first scenario, the first target domain features obtained by feature extraction of the target domain dataset through the original model, and the annotated dataset obtained by annotating the sub-dataset included in the target domain dataset can be used to continuously learn the original model to obtain the target optimized model. In order to maintain the effects of the source domain scenario (i.e., the above-mentioned first scenario) and the target domain scenario (i.e., the above-mentioned second scenario) simultaneously, the traditional method often transmits and analyzes the source domain images (i.e., the above-mentioned source domain dataset), which may lead to privacy leakage. This application can maintain the effect of the source domain, avoid the forgetting problem, and will not leak the original images, having the advantage of privacy security.

[0036] In the above embodiments, the source domain dataset and the target domain dataset can be connected in different computer rooms respectively. Continuing to refer to Figure 3, the source domain dataset can be used in the central computer room (i.e., the above-mentioned first computer room) to extract features through the original model to obtain source domain features, and the source domain features are transmitted to the node computer room (i.e., the above-mentioned second computer room). In the node computer room, the original model can be used to extract features from the unannotated target domain images (i.e., the above-mentioned target domain dataset) to obtain the first target domain features. Among them, the central computer room can be understood as a device for storing and managing data and connecting to other networks, and the node computer room can be understood as a device for aggregating service data from different regions and distributing the data to different terminals. Figure 4 It is a schematic diagram of the continuous learning method of the biometric recognition model in the related art. As Figure 4 shown, usually the original model is trained based on the source domain images in the central computer room, and then the source domain dataset is transmitted to the node computer room. Since the source domain images are directly transmitted to the node computer room, there is a risk of privacy leakage during the transmission process. In addition, a large number of images will be collected in the target domain and manually annotated, which requires a large amount of annotation cost. In the present invention, however, the source domain features are transmitted from the central computer room to the node computer room, avoiding the leakage problem of the source domain dataset during the transmission process. At the same time, the effect of the source domain can also be maintained through feature distillation in the node computer room. In addition, part of the data in the target domain data is annotated for supervised learning, and the unannotated data is subjected to unsupervised learning. Through the semi-supervised scheme combining unsupervised domain adaptation and supervised training, the cost problem of full-scale data annotation is avoided.

[0037] Through the present invention, source domain features sent from the first computer room can be received. The source domain features can be understood as features obtained by extracting features from the source domain data set collected in the first scenario through an original model. Among them, the original model is a model trained using the training data in the first scenario in the first computer room, and the original model cannot be trained using data in other scenarios in the first computer room. After receiving the original model sent from the first computer room, continuous learning can be performed on the original model in the second computer room using the target domain data set collected in the second scenario, that is, it can include: inputting the target domain data set into the original model for feature extraction to obtain first target domain features, where the first scenario and the second scenario are two different scenarios. It is also possible to label a sub-data set in the target domain data set in the second scenario to obtain a labeled data set. Using the above-obtained target domain data set, source domain features, first target domain features, and labeled data set to optimize the original model, a target tuned model can be obtained. Since after receiving the source domain features sent from the first computer room, continuous learning can be performed on the original model in the second computer room using the target domain data set, source domain features, first target domain features, and labeled data set, the technical problem of privacy leakage caused by continuous learning of the model in the related art can be solved, and the effect of privacy security in continuous learning of the model can be achieved.

[0038] Optionally, the execution subject of the above steps can be a background processor, or a terminal, a server, etc., but not limited thereto.

[0039] In an exemplary embodiment, optimizing the original model based on the target domain data set, the source domain features, the first target domain features, and the labeled data set to obtain a target tuned model includes: inputting the target domain data set into an initial tuned model to obtain second target domain features, where the initial tuned model is a model obtained by optimizing the original model, and the initial state of the initial tuned model is the same as that of the original model; determining a target loss value based on the source domain features, the first target domain features, the labeled data set, and the second target domain features; and iteratively updating the model parameters of the initial tuned model based on the target loss value to obtain the target tuned model.

[0040] In the above embodiment, the original model may include a feature extraction model and an original reconstruction model. The original reconstruction model may further include an encoder-decoder model. In the first scenario, the optimization training of the original model M s can be completed based on supervised learning. For example Figure 3As shown, the optimization training of the original model may include training a feature extraction model (e.g., arcface model) and an encoder-decoder model (e.g., Auto-Encoder architecture). After completing the optimization of the original model, an initial tuned model can be obtained. The initial tuned model and the source domain features are transmitted to the second scenario. In the second scenario, the target domain data can be input into the initial tuned model, and the second target domain features can be obtained through feature extraction. Using the obtained second target domain features, source domain features, first target domain features, and the labeled dataset, the model is optimized in a multi-task learning manner in the second scenario to determine an optimized loss function (i.e., the above-mentioned target loss value). By continuously iteratively updating the model parameters of the initial tuned model with the target loss value, the final target tuned model can be obtained.

[0041] In an exemplary embodiment, determining the target loss value based on the source domain features, the first target domain features, the labeled dataset, and the second target domain features includes: performing feature distillation on the first target domain features and the second target domain features to obtain a first loss value; performing feature reconstruction on the second target domain features and the source domain features to obtain a second loss value; performing supervised learning on the labeled dataset using the initial tuned model to obtain a third loss value; and determining the target loss value based on the first loss value, the second loss value, and the third loss value.

[0042] In the above embodiment, the target loss value may include three parts: a first loss value L1 obtained by processing the first target domain features and the second target domain features through feature distillation; a second loss value L2 obtained by processing the second target domain features and the source domain features through feature reconstruction; and a third loss value L3 obtained by performing supervised learning on the labeled dataset using the initial tuned model. The first loss value L1, the second loss value L2, and the third loss value L3 can be used to calculate the target loss value through the following formula: L = αL1 + βL2 + γL3, where α, β, and γ can be understood as three weight coefficients for determining the loss values and can be set through experimental methods. The present invention does not limit this.

[0043] In an exemplary embodiment, performing feature distillation on the first target domain feature and the second target domain feature to obtain a first loss value includes: performing the following operations for each first sub-target domain feature included in the first target domain feature: determining the first sub-target domain feature included in the first target domain feature, and determining the second sub-target domain feature corresponding to the first sub-target domain feature included in the second target domain feature, where the first sub-target domain feature and the second sub-target domain feature are features of the same target domain data; determining the first sub-target domain feature as the teacher network feature, and determining the second sub-target domain feature as the student network feature; and determining the first loss value based on the teacher network feature and the student network feature.

[0044] In the above embodiment, it is possible to first determine the first sub-target domain feature included in the first target domain obtained from the original model and the second sub-target domain feature included in the second target domain obtained from the initial tuning model in a target domain image, and train to obtain a first loss value L1 through a pure feature distillation method (Knowledge Distillation, KD). The calculation formula of the first loss value L1 is as follows: where M can be understood as the number of unlabeled samples in the target domain, can be understood as the teacher network feature of the i-th sample (i.e., the first sub-target domain feature output by the above original model), can be understood as the student network feature of the i-th sample (i.e., the second sub-target domain feature output by the above initial tuning model). By training through a pure feature distillation method, label annotation is not required, unsupervised domain adaptation of the target domain can be achieved, which helps to improve the generalization ability of the model in new scenarios. It can also solve the forgetting problem and avoid the privacy leakage problem caused by directly transmitting the original data set.

[0045] In an exemplary embodiment, performing feature reconstruction on the second target domain feature and the source domain feature to obtain a second loss value includes: inputting the second target domain feature into a reconstruction model included in the initial tuning model to obtain a first reconstructed feature; inputting the source domain feature into the reconstruction model to obtain a second reconstructed feature; and determining the second loss value based on the first reconstructed feature and the second reconstructed feature.

[0046] In the above embodiment, the reconstruction model may include an encoder and a decoder. The reconstruction model can be trained through a source domain data set in a first scenario. In the first scenario, a feature extraction model included in the original model can be used to extract features from the source domain data set, and the extracted features are input into the original reconstruction model to train the original reconstruction model.

[0047] In the above embodiments, the second target domain features and the source domain features can be trained by means of feature reconstruction to obtain the second loss value L2. For example, the Mean Squared Error (MSE) feature reconstruction method can be used for calculation. The calculation formula of the second loss value L2 is as follows: Among them, N1 and N2 can be understood as the number of source domain samples and the number of target domain samples, can be understood as the original features input to the encoder in the i-th sample, that is, the second target domain features and the source domain features, can be understood as the reconstructed features output by the decoder in the i-th sample, that is, the first reconstructed feature and the second reconstructed feature. can represent the loss value determined according to the second target domain features. In , represents the second target domain features, represents the first reconstructed feature. can represent the loss value determined according to the source domain features. In , represents the source domain features, represents the second reconstructed feature. By training through the encoder-decoder architecture, it is possible not to rely on the original image data, and to constrain the new model to maintain affinity with the original model, so as to take into account the comprehensive performance in both general scenarios and new scenarios.

[0048] In the above embodiments, the labeled dataset can be trained through supervised learning using an initial tuning model, and can be used for supervised domain adaptation of the target domain, which helps to improve the generalization ability of the model for new scenarios. In addition, the semi-supervised scheme combining unsupervised domain adaptation and supervised training can also effectively avoid the cost problem of full-scale data annotation. For example, the margin-based softmax of the boundary loss function or metric learning such as metric learning can be used for learning, such as arcface for image feature extraction, triplet loss function, etc. Taking arcface as an example: the calculation formula of the third loss value L3 is as follows: Among them, m can be understood as the number of labeled samples in the target domain. The value of m is much smaller than M, that is, only a small part of the samples are labeled. y i can be understood as the corresponding label, s can represent the adjustment parameter, and j can represent excluding other categories except y i , can be understood as the cosθ i value of the y i -th category, where, cosθ iIt can represent the angle between the feature vector and the weight vector of each category. In the model tuning stage, traditional supervised training methods usually require a large number of sample annotations, which are costly. However, through the semi-supervised scheme of the present invention, only the deployment samples need to be annotated, and then combined with feature distillation and classification methods, the effect optimization of the target domain can be achieved, and the cost is more controllable.

[0049] In an exemplary embodiment, after optimizing the original model based on the target domain dataset, the source domain features, the first target domain features, and the annotated dataset to obtain a target tuned model, the method further includes: obtaining a target image; inputting the target image into the target tuned model to identify the biological information included in the target image.

[0050] In the above embodiment, after obtaining the optimized target tuned model, the obtained target image can be input into the target tuned model, so that the biological information included in the target image can be accurately identified without leaking the information in the target image. Compared with the traditional method, it avoids the risk of information leakage during the transmission of the target image from the first scenario to the second scenario, and has extremely high privacy security.

[0051] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0052] In this embodiment, an optimization device for a model is further provided. The device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0053] Figure 5 is a structural block diagram of a continuous learning device for a model according to an embodiment of the present invention, as Figure 5 shown, the device includes:

[0054] A receiving module 52, configured to receive source domain features sent from a first computer room, where the source domain features are features obtained by using an original model to extract features from a source domain data set collected in a first scenario, the original model is a model trained by using training data in the first scenario in the first computer room, and the original model cannot be trained by using data in other scenarios in the first computer room;

[0055] A learning module 54, configured to continuously learn the original model by using a target domain data set collected in a second scenario in a second computer room;

[0056] Continuously learning the original model by using a target domain data set collected in a second scenario includes:

[0057] Inputting the target domain data set into the original model to obtain first target domain features, where the second scenario is different from the first scenario, and the target domain data set is an unlabeled data set;

[0058] Labeling a sub-data set included in the target domain data set to obtain a labeled data set, where the number of data included in the sub-data set is less than the number of data included in the target domain data set;

[0059] Optimizing the original model based on the target domain data set, the source domain features, the first target domain features, and the labeled data set to obtain a target tuning model.

[0060] In an exemplary embodiment, the learning module 54 may optimize the original model based on the target domain data set, the source domain features, the first target domain features, and the labeled data set in the following manner to obtain a target tuning model: Inputting the target domain data set into an initial tuning model to obtain second target domain features, where the initial tuning model is a model obtained by optimizing the original model, and the initial state of the initial tuning model is the same as that of the original model; Determining a target loss value based on the source domain features, the first target domain features, the labeled data set, and the second target domain features; Iteratively updating the model parameters of the initial tuning model based on the target loss value to obtain the target tuning model.

[0061] In an exemplary embodiment, the learning module 54 may determine a target loss value based on the source domain features, the first target domain features, the labeled data set, and the second target domain features in the following manner: perform feature distillation on the first target domain features and the second target domain features to obtain a first loss value; perform feature reconstruction on the second target domain features and the source domain features to obtain a second loss value; use the initial tuning model to perform supervised learning on the labeled data set to obtain a third loss value; and determine the target loss value based on the first loss value, the second loss value, and the third loss value.

[0062] In an exemplary embodiment, the learning module 54 may perform feature distillation on the first target domain features and the second target domain features to obtain a first loss value in the following manner: for each first sub-target domain feature included in the first target domain features, perform the following operations: determine the first sub-target domain feature included in the first target domain features, and determine the second sub-target domain feature corresponding to the first sub-target domain feature included in the second target domain features, where the first sub-target domain feature and the second sub-target domain feature are features of the same target domain data; determine the first sub-target domain feature as the teacher network feature, and determine the second sub-target domain feature as the student network feature; and determine the first loss value based on the teacher network feature and the student network feature.

[0063] In an exemplary embodiment, the learning module 54 may perform feature reconstruction on the second target domain features and the source domain features to obtain a second loss value in the following manner: input the second target domain features into the reconstruction model included in the initial tuning model to obtain a first reconstructed feature; input the source domain features into the reconstruction model to obtain a second reconstructed feature; and determine the second loss value based on the first reconstructed feature and the second reconstructed feature.

[0064] In an exemplary embodiment, after optimizing the original model based on the target domain data set, the source domain features, the first target domain features, and the labeled data set to obtain a target tuning model, the device may be used to: obtain a target image; and input the target image into the target tuning model to identify the biological information included in the target image.

[0065] It should be noted that the above-mentioned various modules may be implemented by software or hardware. For the latter, it may be implemented in the following manner, but not limited thereto: the above-mentioned modules are all located in the same processor; or, the above-mentioned various modules are respectively located in different processors in any combination form.

[0066] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0067] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.

[0068] Embodiments of the present invention also provide an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.

[0069] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device, where the transmission device is connected to the above processor, and the input / output device is connected to the above processor.

[0070] Embodiments of the present invention also provide a computer program product including a computer program, where the steps of the methods in various embodiments of the present application are implemented when the computer program is executed by a processor.

[0071] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.

[0072] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to implement. Thus, the present invention is not limited to any specific combination of hardware and software.

[0073] The above are only preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A continuous learning method for a model, characterized in that, Including: Receiving source domain features sent from a first computer room, where the source domain features are features obtained by using an original model to extract features from a source domain data set collected in a first scenario, the original model is a model trained by using training data in the first scenario in the first computer room, and the original model cannot be trained by using data in other scenarios in the first computer room; Continuously training the original model by using a target domain data set collected in a second scenario in a second computer room; Continuously training the original model by using a target domain data set collected in a second scenario includes: Inputting the target domain data set into the original model to obtain first target domain features, where the second scenario is different from the first scenario, and the target domain data set is an unlabeled data set; Labeling a sub-data set included in the target domain data set to obtain a labeled data set, where the number of data included in the sub-data set is less than the number of data included in the target domain data set; Optimizing the original model based on the target domain data set, the source domain features, the first target domain features, and the labeled data set to obtain a target tuned model.

2. The method according to claim 1, wherein Optimizing the original model based on the target domain data set, the source domain features, the first target domain features, and the labeled data set to obtain a target tuned model includes: Inputting the target domain data set into an initial tuned model to obtain second target domain features, where the initial tuned model is a model obtained by optimizing the original model, and the initial state of the initial tuned model is the same as that of the original model; Determining a target loss value based on the source domain features, the first target domain features, the labeled data set, and the second target domain features; Iteratively updating the model parameters of the initial tuned model based on the target loss value to obtain the target tuned model.

3. The method according to claim 2, characterized in that, Determining a target loss value based on the source domain features, the first target domain features, the labeled data set, and the second target domain features includes: Performing feature distillation on the first target domain features and the second target domain features to obtain a first loss value; Performing feature reconstruction on the second target domain features and the source domain features to obtain a second loss value; Performing supervised learning on the labeled data set by using the initial tuned model to obtain a third loss value; Determining a target loss value based on the first loss value, the second loss value, and the third loss value.

4. The method according to claim 3, wherein Performing feature distillation on the first target domain features and the second target domain features to obtain a first loss value includes: Performing the following operations on each first sub-target domain feature included in the first target domain features: determining the first sub-target domain feature included in the first target domain features, and determining the second sub-target domain feature corresponding to the first sub-target domain feature included in the second target domain features, where the first sub-target domain feature and the second sub-target domain feature are features of the same target domain data; Determine the first sub-target domain feature as the teacher network feature, and determine the second sub-target domain feature as the student network feature; Determine the first loss value based on the teacher network feature and the student network feature.

5. The method according to claim 3, characterized in that Performing feature reconstruction on the second target domain feature and the source domain feature to obtain a second loss value, including: Input the second target domain feature into the reconstruction model included in the initial tuning model to obtain a first reconstructed feature; Input the source domain feature into the reconstruction model to obtain a second reconstructed feature; Determine the second loss value based on the first reconstructed feature and the second reconstructed feature.

6. The method according to claim 1, wherein After optimizing the original model based on the target domain dataset, the source domain feature, the first target domain feature, and the labeled dataset to obtain a target tuning model, the method further includes: Obtain a target image; Input the target image into the target tuning model to identify the biological information included in the target image.

7. A continuous learning device for a model, characterized in that, Including: A receiving module, configured to receive the source domain feature sent from the first computer room, where the source domain feature is a feature obtained by using the original model to extract features from the source domain dataset collected in the first scenario, the original model is a model trained by using the training data in the first scenario in the first computer room, and the original model cannot be trained by using data in other scenarios in the first computer room; A learning module, configured to continuously learn the original model by using the target domain dataset collected in the second scenario in the second computer room; Continuously learning the original model by using the target domain dataset collected in the second scenario includes: Input the target domain dataset into the original model to obtain a first target domain feature, where the second scenario is different from the first scenario, and the target domain dataset is an unlabeled dataset; Label the sub-dataset included in the target domain dataset to obtain a labeled dataset, where the number of data included in the sub-dataset is less than the number of data included in the target domain dataset; Optimize the original model based on the target domain dataset, the source domain feature, the first target domain feature, and the labeled dataset to obtain a target tuning model.

8. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, where the computer program is configured to execute the method described in any one of claims 1 to 6 when running.

9. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method described in any one of claims 1 to 6 are implemented.