Transfer learning model training method, computing device and computer readable storage medium

By using sampling models in the field of predictive maintenance, the sampling model is trained based on information gain, the data availability problem is solved, the accuracy and recall of the transfer learning model are improved, and the false positive rate is reduced.

CN119493987APending Publication Date: 2025-02-21HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311039014.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-16
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

There are data availability problems in the field of predictive maintenance, including sparse failure samples and data distribution offset, resulting in the inability to directly apply existing transfer learning and domain adaptive algorithms.

Method used

By using the sampling model, training is performed based on the information gain of the source and target domains, the sample sampling weights near the decision boundary are increased, ensuring the rationality and accuracy of the classification boundary of the classification model, and avoiding the problems of low recall and false positives.

Benefits of technology

The accuracy and accuracy of the transfer learning model is significantly improved, the false positive rate is reduced, and the recall rate of the model on the target domain is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493987A_ABST
    Figure CN119493987A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a transfer learning model training method. The method comprises the following steps: acquiring a source domain sample and a target domain sample; training a sampling model at least based on information gain of a first domain sample in the source domain sample and the target domain sample; sampling the first domain sample by a trained sampling model to obtain a sampled first domain sample; training a feature extraction model and a classification model based on the sampled first domain sample and a second domain sample in the source domain sample and the target domain sample; and determining the trained feature extraction model and classification model as a transfer learning model. According to the method, the sampling model is utilized, and the information gain of the samples in the sampling domain is considered in the sampling model training process, so that the sampling weights of the samples at the decision boundary and near the decision boundary can be increased, and the classification boundary obtained through the classification model is ensured not to excessively move towards subclasses; the problem of low recall rate of the classification model on the target domain is avoided, and the false alarm rate of the transfer learning model is remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence, and more specifically, to a transfer learning model training method, apparatus, computing device, and computer-readable storage medium. Background Art

[0002] Predictive maintenance technology uses various data such as equipment operation status information and environmental information to predict equipment failures. By discovering the potential failure risks of equipment, predictive maintenance can repair or replace equipment based on the prediction results before the equipment fails, thereby avoiding unexpected downtime accidents and ensuring the continuity of production operations. Predictive maintenance technology is applied to many fields, including communication networks, intelligent manufacturing, automation, industrial sites, etc. Current predictive maintenance continues to involve a number of advanced technologies with machine learning as the core. For example, transfer learning uses knowledge and data from similar fields to improve the accuracy of models in this field, and has gradually become popular in the direction of predictive maintenance.

[0003] Although a large number of transfer learning and domain adaptation methods and application cases have emerged in fields such as computer vision and natural language processing, the types of transfer learning problems faced by the field of predictive maintenance are different from those faced by fields such as computer vision and natural language processing. First, unlike the field of computer vision, the data in the field of predictive maintenance is mainly time series data, so the required feature extraction methods are different. Moreover, in the field of predictive maintenance, there are also challenges in data availability, which mainly include the scarcity of fault samples and data distribution offset. In other words, in the field of predictive maintenance, there are usually serious sample imbalance problems. Therefore, the existing transfer learning and domain adaptation algorithms in the fields of computer vision and natural language processing cannot be directly used on predictive maintenance problems. Summary of the invention

[0004] The example embodiments of the present disclosure provide a method for training a transfer learning model. The method can increase the sample sampling weight near the decision boundary by utilizing a sampling model and considering the information gain of samples in the sampling domain during the training of the sampling model, thereby ensuring that the classification boundary obtained by the classification model does not move excessively toward the small class, avoiding the low recall rate problem of the classification model in the target domain, and significantly reducing the false alarm rate of the transfer learning model.

[0005] In a first aspect, a method for training a transfer learning model is provided. The method includes: obtaining source domain samples and target domain samples; training a sampling model based on at least the information gain of a first domain sample from the source domain samples and the target domain samples; sampling the first domain sample by the trained sampling model to obtain a sampled first domain sample; training a feature extraction model and a classification model based on the sampled first domain sample and a second domain sample from the source domain samples and the target domain samples; and determining the trained feature extraction model and the classification model as a transfer learning model.

[0006] Thus, in the embodiments of the present disclosure, the sampling model is trained based on the information gain of the samples in the sampling domain, and the sampling weights of the samples at and near the decision boundary can be taken into account, thereby ensuring the rationality and accuracy of the classification boundary division of the classification model, thereby avoiding the problem of low recall rate of the classification model in the target domain, and can also greatly improve the accuracy and precision of the transfer learning model.

[0007] In some embodiments of the first aspect, before training the feature extraction model and the classification model based on the sampled first domain samples and the second domain samples, the method also pre-trains the feature extraction model and the classification model based on the source domain samples and the labels corresponding to the source domain samples. In this way, by pre-training the feature extraction model and the classification model using source domain samples with real labels, the accuracy of the feature extraction model and the classification model can be improved, so that the feature extraction model and the classification model can obtain a relatively more accurate target domain sample label estimate when processing the target domain samples.

[0008] In some embodiments of the first aspect, training the sampling model may include: performing training sampling on first domain samples to obtain first domain training samples that have been trained; determining relative entropy based on the label distribution of the first domain training samples that have been trained and the label distribution of the second domain samples that have been trained; determining weighted information gain based on the information gain of each first domain training sample and the number of training samplings; and training the sampling model based on the relative entropy and the weighted information gain.

[0009] In some embodiments of the first aspect, training the sampling model based on the relative entropy and the weighted information gain comprises: minimizing the relative entropy; and maximizing the weighted information gain.

[0010] In this way, by minimizing the relative entropy, the label distribution of the samples in the first domain can be matched with the label distribution of the samples in the second domain, and by maximizing the weighted information gain, the sampling weight of the samples at and near the decision boundary can be increased, ensuring that the classification boundary divided by the classification model will not move too much to the small category, avoiding the low recall rate problem in the target domain, thereby greatly reducing the false alarm rate of the trained transfer learning model.

[0011] In some embodiments of the first aspect, the second domain sample is a target domain sample, and the method further includes: generating, by the feature extraction model and the classification model based on the target domain sample, a label distribution estimate of the target domain sample as the label distribution of the second domain sample.

[0012] In some embodiments of the first aspect, the first domain sample is a target domain sample, and the method further includes: generating a label distribution of the first domain training sample based on the first domain training sample by a feature extraction model and a classification model.

[0013] In some embodiments of the first aspect, training the feature extraction model and the classification model includes: generating a cross entropy loss based on a source domain sample and a label of the source domain sample; generating an adversarial loss based on the sampled first domain sample and the second domain sample; generating a discriminant loss based on the sampled first domain sample and the second domain sample; and training the feature extraction model and the classification model based on the cross entropy loss, the adversarial loss, and the discriminant loss. In this way, the feature extractor can better extract domain invariant features, thereby achieving edge feature distribution alignment.

[0014] In some embodiments of the first aspect, the feature extraction model includes a target domain sample feature extractor and a source domain sample feature extractor, wherein model parameters of the target domain sample feature extractor at a corresponding moment are related to at least one of the following items: model parameters of the source domain sample feature extractor at the corresponding moment; or model parameters of the target domain sample feature extractor at a moment before the corresponding moment.

[0015] In this way, the target domain sample feature extractor can be made more stable, and as the number of training iterations increases, the target domain sample feature extractor will gradually converge to be consistent with the source domain sample feature extractor.

[0016] In some embodiments of the first aspect, the label distribution of the sampled source domain samples matches the label distribution estimate of the target domain samples, so that the trained transfer learning model can have better stability and robustness.

[0017] In some embodiments of the first aspect, the source domain samples include historical operating data or simulation data of one or more devices, and the type of the one or more devices is the same as the type of the device to be processed to which the transfer learning model is to be applied, and the target domain samples include operating data of the device to be processed collected by a sensor.

[0018] In a second aspect, a transfer learning model training device is provided. The device includes: an acquisition unit configured to acquire source domain samples and target domain samples; a sampling model training unit configured to train a sampling model based on at least the information gain of a first domain sample in the source domain samples and the target domain samples; a sampling unit configured to sample the first domain sample by the trained sampling model to obtain a sampled first domain sample; a transfer learning model training unit configured to train a feature extraction model and a classification model based on the sampled first domain sample and a second domain sample in the source domain samples and the target domain samples; and a determination unit configured to determine the trained feature extraction model and classification model as a transfer learning model.

[0019] Thus, in the embodiments of the present disclosure, the sampling model is trained based on the information gain of the samples in the sampling domain, and the sampling weights of the samples at and near the decision boundary can be taken into account, thereby ensuring the rationality and accuracy of the classification boundary division of the classification model, thereby avoiding the problem of low recall rate of the classification model in the target domain, and can also greatly improve the accuracy and precision of the transfer learning model.

[0020] In some embodiments of the second aspect, the apparatus further includes: a pre-training unit configured to pre-train the feature extraction model and the classification model based on source domain samples and labels corresponding to the source domain samples before training the feature extraction model and the classification model based on the sampled first domain samples and the second domain samples. In this way, by pre-training the feature extraction model and the classification model using source domain samples with real labels, the accuracy of the feature extraction model and the classification model can be improved, so that the feature extraction model and the classification model can obtain a relatively more accurate target domain sample label estimate when processing the target domain sample.

[0021] In some embodiments of the second aspect, the sampling model training unit is further configured to: perform training sampling on the first domain samples to obtain first domain training samples that have been trained; determine the relative entropy based on the label distribution of the first domain training samples that have been trained and the label distribution of the second domain samples; determine the weighted information gain based on the information gain of each first domain training sample and the number of training samplings; and train the sampling model based on the relative entropy and the weighted information gain.

[0022] In some embodiments of the second aspect, training the sampling model based on relative entropy and weighted information gain comprises: minimizing the relative entropy; and maximizing the weighted information gain.

[0023] In this way, by minimizing the relative entropy, the label distribution of the samples in the first domain can be matched with the label distribution of the samples in the second domain, and by maximizing the weighted information gain, the sampling weight of the samples at and near the decision boundary can be increased, ensuring that the classification boundary divided by the classification model will not move too much to the small category, avoiding the low recall rate problem in the target domain, thereby greatly reducing the false alarm rate of the trained transfer learning model.

[0024] In some embodiments of the second aspect, the second domain sample is a target domain sample, and the apparatus further includes: a label distribution estimate generating unit configured to generate a label distribution estimate of the target domain sample as the label distribution of the second domain sample based on the target domain sample by a feature extraction model and a classification model.

[0025] In some embodiments of the second aspect, the first domain sample is a target domain sample, and the apparatus further includes: a label distribution estimation generation unit configured to generate a label distribution of the first domain training sample based on the first domain training sample by a feature extraction model and a classification model.

[0026] In some embodiments of the second aspect, the transfer learning model training unit is further configured to: generate a cross entropy loss based on the source domain sample and the label of the source domain sample; generate an adversarial loss based on the sampled first domain sample and the second domain sample; generate a discriminant loss based on the sampled first domain sample and the second domain sample; and train a feature extraction model and a classification model based on the cross entropy loss, the adversarial loss, and the discriminant loss. In this way, the feature extractor can better extract domain invariant features, thereby achieving edge feature distribution alignment.

[0027] In some embodiments of the second aspect, the feature extraction model includes a target domain sample feature extractor and a source domain sample feature extractor, wherein model parameters of the target domain sample feature extractor at a corresponding moment are related to at least one of the following items: model parameters of the source domain sample feature extractor at the corresponding moment; or model parameters of the target domain sample feature extractor at a moment before the corresponding moment.

[0028] In this way, the target domain sample feature extractor can be made more stable, and as the number of iterations increases, it will gradually converge to be consistent with the source domain sample feature extractor.

[0029] In some embodiments of the second aspect, the label distribution of the sampled first domain samples matches the label distribution estimate of the second domain samples. In this way, the trained transfer learning model can have better stability and robustness.

[0030] In some embodiments of the first aspect, the source domain samples include historical operating data or simulation data of one or more devices, and the type of the one or more devices is the same as the type of the device to be processed to which the transfer learning model is to be applied, and the target domain samples include operating data of the device to be processed collected by a sensor.

[0031] In a third aspect, a fault prediction method is provided. The method comprises: obtaining data related to the operation of the device to be processed, the data being data in the target domain; and predicting whether there is a fault in the device to be processed based on the data by a fault prediction model, wherein the fault prediction model is trained according to the method in the first aspect or any of its embodiments.

[0032] In a fourth aspect, a fault prediction device is provided. The method includes: an acquisition unit configured to acquire data related to the operation of the device to be processed, the data being data in the target domain; and a prediction unit configured to predict whether there is a fault in the device to be processed according to the data by a fault prediction model, wherein the fault prediction model is trained according to the method in the first aspect or any one of its embodiments.

[0033] In a fifth aspect, a computing device is provided, comprising a processor and a memory, wherein the memory stores instructions executed by the processor, and when the instructions are executed by the processor, the computing device implements the operation according to the method in the above-mentioned first aspect or any one of its embodiments.

[0034] In a sixth aspect, a computing device is provided, comprising a processor and a memory, wherein the memory stores instructions executed by the processor, and when the instructions are executed by the processor, the computing device implements the operation according to the method in the third aspect or any one of its embodiments.

[0035] In a seventh aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the operation of the method according to the first aspect or any one of its embodiments is implemented.

[0036] In an eighth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the operation of the method according to the third aspect or any one of its embodiments is implemented.

[0037] In a ninth aspect, a chip or a chip system is provided, wherein the chip or the chip system comprises a processing circuit configured to perform the operation according to the method in the first aspect or any embodiment thereof.

[0038] In a tenth aspect, a chip or a chip system is provided, wherein the chip or the chip system comprises a processing circuit configured to perform the operations according to the method in the third aspect or any three embodiments thereof.

[0039] In an eleventh aspect, a computer program or a computer program product is provided. The computer program or computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions, which, when executed, cause a device to implement the operation of the method according to the first aspect or any of its embodiments.

[0040] In a twelfth aspect, a computer program or a computer program product is provided. The computer program or computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions, which, when executed, enable a device to implement the operation of the method according to the third aspect or any of its embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and other features, advantages and other aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0042] Figure 1 A schematic diagram showing an illustrative scenario of application of a transfer learning model in an industrial context;

[0043] Figure 2A and 2B A schematic diagram showing the comparison of feature distributions of the source domain and the target domain;

[0044] Figure 3 A comparison diagram of source domain data and target domain data before and after feature distribution alignment is shown;

[0045] Figure 4 The present invention can be applied to Figure 1 A schematic block diagram of the transfer learning process in a system;

[0046] Figure 5 An exemplary flow chart of a transfer learning model training method according to an embodiment of the present disclosure is shown;

[0047] Figure 6 A detailed example process for training a transfer learning model according to an embodiment of the present disclosure is shown;

[0048] Figure 7 A detailed block diagram of each feature extractor in the source domain sample feature extractor and the target domain sample feature extractor according to an embodiment of the present disclosure is shown;

[0049] Figure 8 A detailed example process for training a transfer learning model according to another embodiment of the present disclosure is shown;

[0050] Fig. 9A The statistics of the transfer learning model obtained by the training method according to the embodiment of the present disclosure and other methods in terms of recall rate and false alarm rate when the abnormal proportion of target domain data is 10% are shown;

[0051] Fig. 9B The statistics of the transfer learning model obtained by the training method according to the embodiment of the present disclosure and other methods in terms of recall rate and false alarm rate when the abnormal proportion of target domain data is 1% are shown;

[0052] Fig.10 A schematic block diagram of a training device for training a transfer learning model according to an embodiment of the present disclosure is shown;

[0053] Fig.11 A schematic flow chart showing a fault prediction method according to an embodiment of the present disclosure; and

[0054] Fig.12 A schematic block diagram of an example device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0055] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0056] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0057] Artificial Intelligence (AI) uses computing devices to simulate certain human thought processes and intelligent behaviors. The history of AI research has a natural and clear trajectory from focusing on "reasoning" to focusing on "knowledge" and then focusing on "learning". AI has been widely used in various industries such as security, medical care, transportation, education, finance, and industry.

[0058] Machine Learning is a branch of artificial intelligence that studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. In other words, machine learning studies how to improve the performance of specific algorithms in empirical learning.

[0059] Deep Learning is a type of machine learning technology based on deep neural network algorithms. Its main feature is the use of multiple nonlinear transformation structures to process and analyze data. It is mainly used in perception, decision-making and other scenarios in the field of artificial intelligence, such as image and speech recognition, image detection, natural language translation, computer games, etc.

[0060] Self-supervised learning is a method that uses auxiliary tasks to mine a large amount of self-information from unsupervised data and use it as a supervisory signal.

[0061] Predictive Maintenance (PM): refers to the use of some methods to predict and prevent equipment, avoid unexpected downtime accidents, ensure the continuity of production operations, use predictive minor repairs to replace medium / major repairs, improve equipment maintenance efficiency, ensure the continuity of equipment operation and production, and avoid production losses caused by unexpected equipment downtime.

[0062] Transfer Learning (TL): is a machine learning method that transfers knowledge from one domain (source domain) to another domain (target domain) so that the target domain can achieve better learning results. The core of transfer learning is to find the similarities between existing knowledge and new knowledge, and achieve the purpose of transfer learning through the transfer of this similarity.

[0063] Domain Adaptation (DA): Domain adaptation is a transfer learning technique. In machine learning, when the source domain and target domain have different data distributions but the tasks are the same, domain adaptation can be used to apply the model with higher accuracy trained on the source domain data to the target domain with less data. The core of domain adaptation is to find the differences between the source domain and the target domain and try to narrow the differences, so as to achieve data alignment between the two domains.

[0064] Imbalanced Classification: Imbalanced classification refers to the situation in which the number of samples of each category in the training dataset is unbalanced in the classification task. The degree of this imbalance may vary, but severe imbalance will bring challenges to the training and evaluation of the model, and may require some specialized techniques to deal with. Imbalanced classification problems occur in many practical classification problems, such as fault diagnosis, fraud detection, spam detection, customer churn prediction, etc.

[0065] Predictive maintenance technology is widely used in many fields such as communication networks, intelligent manufacturing, automation, industrial sites, etc. Predictive maintenance technology involves a number of advanced technologies with machine learning as the core, and is receiving more and more attention. Figure 1 A schematic diagram 100 shows an illustrative scenario of the application of transfer learning in the industrial field. Figure 1 The article uses the industrial field as an example to describe the application of machine learning models through transfer learning. However, it is understandable that this is only indicative. Through transfer learning, the trained model can be transferred to other fields to achieve various tasks with different goals.

[0066] exist Figure 1 In the figure, some electromechanical components are exemplarily illustrated, such as motor 112, reducer 114 and bearing 116. These electromechanical components can be deployed in industrial equipment such as large motor equipment, fan / pump, belt conveyor, crane / crane, etc. These electromechanical components are usually core components in industrial equipment and are crucial to the normal operation of the equipment. Therefore, by predicting the failure of these components, the equipment can be replaced or repaired before the equipment actually fails, thereby ensuring the continuity of production operations.

[0067] exist Figure 1 In the example, a time series data set 120 of operation data of electromechanical components such as a motor 112, a reducer 114, and a bearing 116 can be sent to a fault detection model 150 based on sensors. The fault detection model 150 can process the time series data set 120 to predict the faults of the electromechanical components, and send the fault prediction results to the active operation and maintenance model 160. In addition, when the electromechanical components may fail, the active operation and maintenance model 160 can implement active operation and maintenance of these electromechanical components, thereby avoiding unexpected downtime accidents and ensuring the continuity of production operations.

[0068] The fault detection model 150 is implemented through transfer learning 140. Transfer learning refers to the transfer of knowledge from one domain (source domain 130) to another domain (target domain) (for example, the data domain of the device to which the fault detection model 150 is applied), so that the target domain can achieve better learning results. The core of transfer learning is to find the similarity between existing knowledge and new knowledge, and to achieve the purpose of transfer learning through the transfer of such similarity.

[0069] However, predictive maintenance usually faces multiple challenges and difficulties during implementation, such as data availability, feature engineering, model selection and evaluation. The data availability issues mainly include the scarcity of fault samples and data distribution offset, which will make it difficult to reuse pre-trained models in new scenarios. Taking the predictive maintenance of mechanical or electromechanical equipment as an example, the life of a motor is generally 15 to 20 years. Therefore, it is costly or even impossible to collect data for a single type of equipment to train a model. However, the existing mechanical equipment failure samples (samples from other faulty equipment or laboratory simulated failure samples) may have different feature distributions from the target equipment due to differences in working conditions, models, etc., and depreciation makes the model unable to be directly reused. Figure 2A and 2B Schematic diagram showing the comparison of feature distributions of the source domain (e.g., pump type A from experimental data) and the target domain (e.g., pump type B from the actual environment). Figure 2A and Figure 2B As can be seen from the figure, there is a significant difference in the feature distribution of the data in the source domain and the target domain, which makes it difficult to reuse the pre-trained model in new scenarios.

[0070] Although a large number of transfer learning and domain adaptation methods and application cases have emerged in fields such as computer vision and natural language processing, the types of transfer learning problems faced by the field of predictive maintenance are different from those faced by fields such as computer vision and natural language processing. First, unlike the image field, the data in the field of predictive maintenance is mainly time series data, and the required feature extraction methods are different. Moreover, as mentioned above, there is usually a serious sample imbalance problem in the field of predictive maintenance. Therefore, the existing transfer learning and domain adaptation algorithms in the visual field cannot be directly used on the predictive maintenance problem.

[0071] There are some transfer learning methods in the prior art for rolling bearing fault diagnosis. For example, in the training stage, the prior art uses Fourier transform or deep neural network to extract the state features of sample rolling bearings in the source domain and the target domain, trains the fault diagnosis model based on the labels in the source domain, and uses the model to discriminate the target domain samples to generate pseudo labels or label estimates. When performing model migration, methods such as maximum mean discrepancy (MMD) are used to align the feature distributions of the source domain and the target domain. By continuously iterating the above steps, the cross entropy in the source domain and the distribution distance between the source domain and the target domain are minimized, and the model training is performed. When the results converge, the model training is terminated. In the model testing stage, the prior art uses Fourier transform or feature extraction network to extract the target domain data features, and then inputs them into the model after transfer learning, so as to obtain fault diagnosis on the target domain test data.

[0072] However, the existing technology has shortcomings: first, the pseudo-labels of the samples in the target domain need to be used when aligning the distribution. The pseudo-label is the result of predicting the samples in the target domain using the calibrated source domain model. In extremely unbalanced scenarios, the reliability of the transfer learning model is easily affected by the accuracy of the pseudo-labels of the target domain samples, which brings instability to the transfer learning model. Secondly, the impact of the small proportion of fault classes is not taken into account during the migration process. If only the feature distribution p(x) of the sample is aligned, then in order to match the excessively high proportion of fault samples in the source domain, the transfer learning model will bring a high false alarm rate in the target domain. If the label distribution p(x|y) of the aligned sample is used, as mentioned above, the pseudo-label distribution p(x|y) result in the target domain is unstable, and direct use will lead to instability and reduced accuracy of the transfer learning model.

[0073] Figure 3 The figure shows the comparison of source domain samples and target domain samples before and after feature distribution alignment. The source domain samples can come from historical accumulated data of other devices of the same type or laboratory simulation data. The source domain samples carry label information, which marks which samples are normal samples and which are faulty samples. Figure 3 It can be seen from Figure 2 that by aligning the feature distributions p(x) in the two domains, some samples that were originally normal in the target domain are classified as faulty samples, resulting in a high false positive rate in the target domain. This is undesirable for the task of fault prediction.

[0074] The prior art generally uses target domain pseudo labels generated by the source domain model, and does not fully consider the situation where the proportion of fault categories in the target domain is extremely low. The coupling of the above two problems can easily cause extremely high false alarm rates or error rates in the target domain after the transfer learning model. First, in the early stage of training, since the source domain model is not yet stable, the source domain model is used to predict the unlabeled target domain samples, and the pseudo labels obtained contain great inaccuracy. The prior art usually attaches pseudo labels to samples with high prediction confidence (for example, prediction probabilities greater than 0.9). However, in the case of class imbalance, a few incorrectly labeled fault samples will have a huge impact on the results. This results in the transfer learning model in the prior art having a high false alarm rate and error rate in the target domain, which is not desirable for fault prediction tasks.

[0075] In order to at least solve the above technical problems, the present invention proposes a transfer learning method under the condition of class imbalance. The method includes: obtaining source domain samples and target domain samples; training a sampling model based on at least the information gain of the first domain samples in the source domain samples and the target domain samples; sampling the first domain samples by the trained sampling model to obtain the sampled first domain samples; training a feature extraction model and a classification model based on the sampled first domain samples and the second domain samples in the source domain samples and the target domain samples; and determining the trained feature extraction model and the classification model as a transfer learning model. The method samples the first domain samples using the trained sampling model, and matches the label distribution of the first domain samples with the label distribution of the second domain samples (for example, the second domain can be the target domain), instead of directly using the pseudo-label on the target domain for analysis, to avoid introducing erroneous label information. In addition, for the target domain, whether it is the first domain or the second domain, since only the estimated information of the label distribution on the target domain is used instead of the specific label information of each sample, this also significantly reduces the requirements for model accuracy and the impact of label prediction errors. In the process of training the sampling model, this method increases the sampling weight of samples at and near the decision boundary by maximizing the information gain, ensuring that the classification boundary divided by the classification model does not move too much to the small category, thereby avoiding the problem of low recall rate on the target domain data. In addition, the transfer learning model training method according to the embodiment of the present disclosure uses two independent networks to respectively realize feature extraction and distribution alignment, decoupling feature alignment from label distribution alignment, reducing the complexity of transfer learning model training and improving the convergence speed.

[0076] Figure 4 The present invention can be applied to Figure 1 Schematic block diagram of the transfer learning process in system 100. Figure 4 Zhongyu Figure 1 Elements with similar reference numerals have similar functions and can be combined Figure 1 For the sake of brevity, we will not go into details here. Figure 4 As shown, the process of performing transfer learning based on the source domain data 130 according to an embodiment of the present disclosure can be represented as a process of training a transfer learning model in box 410. In some embodiments, the device for performing the training process 410 can be implemented as a computing device or a part of a computing device, wherein the computing device includes but is not limited to a desktop, a mobile terminal, a smart home device, a wearable device, a server, a cloud server, etc. For the sake of simplicity, hereinafter, the device performing the training process 410 is referred to as a "training device", but it can be understood that the "training device" may include any computing device suitable for performing the training process 410, and the present disclosure does not limit the specific implementation method or specific type of the "training device".

[0077] like Figure 4 As shown, in the training process 410, the training device may receive input source domain samples and target domain samples, as shown in box 411. The training device may extract features of the source domain samples and features of the target domain samples through a feature extraction model, as shown in box 413. The classification model may estimate the target domain samples and obtain a label distribution estimate of the target domain samples, as shown in box 412. Afterwards, the training device may train a sampling model based on the obtained target domain label distribution estimate and the label distribution of the source domain samples, as shown in box 414. For example, the training device may train a sampling model to sample on a sampling domain (source domain or target domain). The training device may sample the sampling domain samples using the trained sampling model, as shown in box 416. In box 418, the training device trains a feature extraction model and a classification model based on the sampled sampling domain samples by aligning the features of the non-sampled domain samples with the sampled sampling domain samples.

[0078] In some embodiments, during the process of training the sampling model, when the sampling domain is the source domain, the training device may perform training sampling on the source domain samples, and train the sampling model based on the label distribution of the source domain training samples sampled through training and the label distribution estimate of the target domain samples, as well as the information gain of each source domain training sample and the weighted information gain determined by the number of training samplings. When the sampling domain is the target domain, the training device may perform training sampling on the target domain samples, and train the sampling model based on the label distribution estimate of the target domain training samples sampled through training and the label distribution of the source domain samples, as well as the weighted information gain determined by the information gain of each target domain training sample and the number of training samplings.

[0079] The training device may perform the above training process in the training process 410 for multiple iterations to obtain a trained feature extraction model and a classification model. The training device may use the trained feature extraction model and the classification model as a transfer learning model.

[0080] The trained transfer learning model can be applied to Figure 4 In or Figure 1 In the scenario shown in , it is used to realize fault prediction of electromechanical or mechanical equipment in the industrial field. In some embodiments, the trained transfer learning model can be transmitted to another computing device 420 to realize tasks such as fault prediction. The other computing device 420 may include but is not limited to desktop computers, mobile terminals, smart home devices, wearable devices, servers, cloud servers, etc. In addition, the trained transfer learning model can realize tasks such as fault detection on the training device. The present disclosure does not limit the device that uses the trained transfer learning model to perform prediction tasks.

[0081] like Figure 4 As shown in , the trained transfer learning model can be identified as 430, and the model 430 can receive target domain data, for example, operation data of a time series representing equipment operation indicators from electromechanical components such as motors 112, reducers 114, and bearings 116 sensed by sensors. The transfer learning model 430 can process the received target domain data and output a prediction result. The prediction result can indicate whether the corresponding electromechanical equipment has the possibility of failure and prompt the equipment operator. Therefore, when the electromechanical components may fail, the active operation and maintenance model 160 can implement active operation and maintenance of these electromechanical components, thereby avoiding unexpected downtime accidents and ensuring the continuity of production operations.

[0082] The training method of the transfer learning model according to the embodiment of the present disclosure samples samples from the sampling domain (when the sampling domain is the source domain, the non-sampling domain is the target domain; when the sampling domain is the target domain, the non-sampling domain is the source domain) by using the trained sampling model, and matches the label distribution of the sampling domain samples with the label distribution of the non-sampling domain samples, which significantly reduces the requirements for model accuracy and the impact of label prediction errors. In the process of training the sampling model, this method increases the sampling weights of samples at and near the decision boundary by maximizing the information gain, ensuring that the classification boundary divided by the classification model does not move too much to the small category, avoiding the problem of low recall rate on the target domain data. In addition, the training method of the transfer learning model according to the embodiment of the present disclosure uses two independent networks to respectively realize feature extraction and distribution alignment, decouple feature alignment and label distribution alignment, reduce the complexity of transfer learning model training, and improve convergence speed.

[0083] Figure 5An exemplary flow chart of a transfer learning model training method 500 according to an embodiment of the present disclosure is shown. The transfer learning model training method 500 can be executed at any suitable computing device. The computing device includes but is not limited to a desktop computer, a mobile terminal, a smart home device, a wearable device, a server, a cloud server, etc. Figure 5 The various steps shown in the figure perform the corresponding functions of the transfer learning model training method in a specific order, but it can be understood that Figure 5 The steps in the method 500 may be performed in a different order relative to the order shown. For example, two or more steps shown in succession may be performed simultaneously or some steps may be performed simultaneously. In addition, certain steps in the method 500 may be omitted. In addition, other steps may be added to the method 500. Figure 5 It will be appreciated that all such variations are within the scope of the present disclosure.

[0084] In 502, the training device may obtain source domain samples and target domain samples. The source domain samples may be derived from historical accumulated data or laboratory simulation data of other devices of the same type. For example, the source domain samples include historical operating data or simulation data of one or more devices, and the type of the one or more devices is the same as the type of the device to be processed to which the transfer learning model is to be applied. The source domain samples carry label information, that is, the label information marks which samples are normal samples and which are fault samples. For example, when the training device trains the transfer learning model for predicting faults in the reducer, the source domain samples may be derived from historical data of other devices of the same type of reducer, or may also be from laboratory simulation data. In addition, the source domain samples carry label information, and the label information marks whether the samples are normal samples or fault samples. The target domain samples come from the operating data of the device to which the transfer learning model is to be applied. In some embodiments, the target domain samples include the operating data of the device to be processed collected by the sensor. For example, when the trained model is used to predict faults in the reducer, the target domain samples may be operating data from the reducer.

[0085] In 504, the training device may train the sampling model based on at least the information gain of the first domain samples in the source domain samples and the target domain samples. The first domain where the samples sampled by the trained sampling model are located may be referred to as the "sampling domain". In some embodiments, the sampling domain (i.e., the first domain) may be the source domain, i.e., the trained sampling model will perform sampling in the source domain, and accordingly, the target domain is referred to as the "non-sampling domain" (i.e., the second domain) in this case. In some embodiments, the sampling domain may be the target domain, i.e., the trained sampling model will perform sampling in the target domain, and accordingly, the source domain is referred to as the "non-sampling domain" (i.e., the second domain) in this case.

[0086] In some embodiments, samples located at or near the classification boundary can bring more information to the model for classification tasks, that is, the information gain is large. In other words, samples located at or near the classification boundary can bring more contributions to model training. Therefore, when training a sampling model, the training device according to an embodiment of the present disclosure can train the sampling model based on the information gain of the sampling domain (source domain or target domain) samples, so that the trained sampling model can assign a larger sampling weight to the samples at or near the classification boundary (that is, samples with large information gain), so that the sampled sampling domain samples can provide more contributions to the training of the model. The specific training process of the sampling model will be described in detail below. It can be understood that by training the sampling model, the label distribution of the sampled first domain or sampling domain samples can be matched or aligned with the label distribution of the second domain or non-sampling domain samples, and the trained sampling model can also sample samples that provide greater contributions to the training of the model.

[0087] In 506, the training device may sample the first domain samples by the trained sampling model to obtain sampled first domain samples. As described above, the trained sampling model may sample first domain or sampling domain samples that make greater contributions to model training, and the label distribution of the sampled first domain or sampling domain samples matches or aligns with the label distribution of the second domain or non-sampling domain samples.

[0088] In 508, the training device trains a feature extraction model and a classification model based on the sampled first domain samples and the second domain samples. In the process of training the feature extraction model and the classification model, the adversarial loss and the discriminant loss generated by the sampled first domain samples and the second domain samples can be used to train the feature extraction model and the classification model, so that the feature extraction model can better extract domain-invariant features and contain as few domain-related features as possible. In addition, the feature distribution alignment of the source domain sample and the target domain sample can be achieved on the basis of matching or aligning the label distribution estimation of the sampled first domain sample with the label distribution estimation of the second domain sample.

[0089] In 510, the training device determines the trained feature extraction model and classification model as a transfer learning model. In some embodiments, the trained transfer learning model can be used for fault prediction. In addition, in addition to the field of predictive maintenance, the trained transfer learning model can also be applied to various scenarios such as motion recognition, user churn prediction, user complaint prediction, and fraud detection. The present disclosure does not specifically limit the scenarios in which the trained transfer learning model is to be applied.

[0090] Since the labels of the target domain samples are estimated pseudo-labels rather than accurate labels, one or some labels of the target domain samples may be predicted incorrectly. Therefore, the transfer learning model training method according to the embodiment of the present disclosure uses the trained sampling model to sample the sampled domain samples to match the label distribution of the non-sampled domain samples, instead of directly using the pseudo-labels of the target domain for downstream analysis, to avoid introducing erroneous label information. Since only the estimated information of the distribution of the labels on the target domain is used, rather than the specific label information of each sample, this also significantly reduces the requirements for model accuracy and the impact of label prediction errors. In the process of training the sampling model, the method increases the sampling weights of samples at and near the decision boundary by maximizing the information gain, ensuring that the classification boundary divided by the classification model does not move too much to the small class, avoiding the problem of low recall rate on the target domain data. In addition, the transfer learning model training method according to the embodiment of the present disclosure uses two independent networks to respectively realize feature extraction and distribution alignment, decouple feature alignment and label alignment, reduce the complexity of transfer learning model training, and improve the convergence speed.

[0091] The following will describe in detail the embodiment of the present disclosure with reference to the accompanying drawings. Figure 5 The specific implementation methods of each step in . Figure 6 Detailed example process 600 for training a transfer learning model according to an embodiment of the present disclosure is shown. Figure 6 As shown, the process for training the transfer learning model utilizes four neural network models: feature extraction model 610, classification model 620, sampling model 630, and generative adversarial network model 640. In some embodiments, the goal of the training process 600 is to use the feature extraction model 610, classification model 620, sampling model 630, and generative adversarial network model 640 to perform training on source domain samples and target domain samples, and obtain the trained feature extraction model 610 and classification model 620 as the trained transfer learning model, so as to perform tasks such as fault prediction on target domain data.

[0092] In some embodiments, the feature extraction model 610 includes a source domain sample feature extractor 612 and a target domain sample feature extractor 614. The source domain sample feature extractor 612 is used to extract the source domain sample x s To extract features, the target domain sample feature extractor 614 is used to extract features from the target domain sample x t For example, the source domain sample feature extractor 612 may extract features from the source domain sample x s Perform feature extraction and obtain the feature Z of the source domain sample s , Z s =G θ (x s ). The target domain sample feature extractor 614 can extract the target domain sample xt Perform feature extraction and obtain the characteristics of the target domain samples

[0093] In some embodiments, each feature extractor in the source domain sample feature extractor 612 and the target domain sample feature extractor 614 respectively includes two network models to extract frequency domain information and time domain information of the sample, that is, each feature extractor may include a frequency domain feature extractor and a time domain feature extractor. Figure 7 Detailed block diagram of source domain sample feature extractor 612 according to an embodiment of the present disclosure is shown. For illustration purposes, Figure 7 The source domain sample feature extractor 612 is used as an example for explanation, but it can be understood that Figure 7 The block diagram and the corresponding description in FIG. 6 are also applicable to the target domain sample feature extractor 614. In other words, the frequency domain feature extractor 614 includes Figure 7 Similar structures and can perform similar operations.

[0094] like Figure 7 As shown, the source domain feature extractor 612 may include a frequency domain feature extractor 710, a time domain feature extractor 720, and a multi-layer perceptron 730. The frequency domain feature extractor 710 of the source domain sample feature extractor 612 is used to process the frequency domain information in the input signal. In some embodiments, the frequency domain feature extractor 710 includes a Fourier transform model 711, a first convolutional network 712, a second convolutional network 713, and a third convolutional network 714. For the input source domain sample x s The frequency domain information in the frequency domain feature extractor 710, the Fourier transform model 711 in the frequency domain feature extractor 710, is used to extract the input source domain samples x of the time series. s Discrete Fourier transform is performed. The first convolutional neural network 712 and the second convolutional neural network 714 respectively extract frequency information and amplitude information from the result after discrete Fourier transform. The extracted frequency information and amplitude information are subjected to a dot multiplication operation at 750, and the result after the dot multiplication operation is input into the third convolutional neural network 714.

[0095] The time domain feature extractor 720 of the source domain sample feature extractor 612 is used to process the time domain information in the input signal. s The time domain information in Figure 7 , N gated recurrent units GRU 721-1, ... 721-N are shown, where N is a positive integer. The N gated recurrent units GRU 721-1, ... 721-N are used as feature extractors to extract the input source domain sample x s Perform feature extraction. The feature extraction process can be expressed as formula (1):

[0096] f(x)=Wf GRU(x) (1)

[0097] Among them, f(x) is the feature representation vector, is a learnable transfer matrix.

[0098] Understandably, although Figure 7 In the figure, GRU is used as an example to illustrate the extraction of time domain information in the input signal. Alternatively, the time domain feature extractor 720 can also extract features of the time domain information in the input signal by using other types of neural network models such as convolutional neural network, long short-term memory network LSTM, or any suitable model, which is not limited in the present disclosure. After the feature output of N GRUs, the feature representation vector f(x) can be superimposed 760 with the output of the third convolutional neural network 714 in the frequency domain feature extractor 710 via the fully connected layer 722, as shown in FIG. Figure 7 The result after the superposition operation 760 is fused and outputted through the multi-layer perceptron 730. In some embodiments, the output result can be represented as the source domain sample x s Characteristics of Z s , Z s =G θ (x s ).

[0099] Similarly, for the target domain sample feature extractor 614, Figure 7 The structures and operations in are also applicable. The difference is that Figure 7 The input in will be the target domain sample x t , the output obtained will be the feature Z of the target domain sample t , For the target domain sample x t The feature extraction operation can be understood in conjunction with the detailed description above and will not be described again here for the sake of brevity.

[0100] return Figure 6 , the output feature Z of the source domain sample feature extractor 612 s and the output feature Z of the target domain feature extractor 614 t can be input into the classification model 620. In some embodiments, the classification model 620 can obtain the probability score of the sample corresponding to each class according to the representation vector output by the feature extractor: c(x)=Classifier(f(x)). Where x can be the source domain sample x s Or the target domain sample x t .

[0101] In some embodiments, one goal of the training transfer learning model of the present disclosure is to map the source domain samples and the target domain samples to the same latent space through the feature extraction model 610. In order to make the representation vector relevant to the downstream task, the present disclosure uses the classification model 620 to guide the feature extraction model 610 to capture such features. In some embodiments, through the classification model 620, the training device can obtain the label estimation of the source domain samples and the target domain samples respectively. 601 and label estimation of target domain samples 603.

[0102] In some embodiments, the present disclosure uses at least labeled source domain samples to train the classification model 620 to guide the feature extraction model 610 to capture task-related features. s The process of training the classification model 620 with the source domain samples of 603 is called the "task learning process". The loss function of the "task learning process" can be expressed as formula (2):

[0103]

[0104] In formula (2), L ce is the cross entropy, M s is the number of samples in the source domain. At least by minimizing the above formula (2), that is, at least minimizing L ce ( min L ce ),like Figure 6 As shown in 602, the training of the classification model 620 and the feature extraction model 610 can be implemented.

[0105] In some embodiments, the training device may pre-train the classification model 620 and the feature extraction model 610 based on formula (2), and obtain the pre-trained classification model 620 and the feature extraction model 610. The present disclosure does not limit whether to use source domain samples and their labels for pre-training.

[0106] In class-imbalanced domain adaptation, the label distributions of source domain samples and target domain samples are unbalanced, i.e., p(y s )≠p(y t ). Therefore, it is difficult to ensure that a classification model that performs well in the source domain will achieve equally good performance in the target domain. Due to the existence of label offset, some target domain samples will be misclassified (for example, the target domain samples that should be correct are misclassified as faulty samples). This is because the methods in the prior art only align the feature distributions of source domain samples and target domain samples, so that p(x s )=p(x t ). However, in the case of label shift, this ignores the conditional feature distribution, i.e., p(xs / y s )≠p(x t / y t ).

[0107] In order to at least solve this problem, according to the embodiment of the present disclosure, a method of first aligning the label distribution of the source domain sample and the target domain sample is adopted, so that p(y s )=p(y t ); on the basis of aligning the label distribution of the source domain samples and the target domain samples, align the feature distribution of the source domain samples and the target domain samples. In addition, since the target domain data is unlabeled data, the prior art uses a classifier to generate pseudo labels instead. However, as mentioned above, this will bring unstable results. Instead, according to an embodiment of the present disclosure, the label distribution of the source domain and the label distribution estimate of the target domain are matched. Since the distribution information of the pseudo labels of the target domain samples, that is, the estimated information of the label distribution of the target domain, is used according to the embodiment of the present disclosure, it has better stability.

[0108] In some embodiments, the process of aligning the label distribution of source domain samples and target domain samples may be referred to as a process of “label distribution alignment based on learnable sampling.” The specific implementation process of the process of “label distribution alignment based on learnable sampling” will be described in detail below.

[0109] Since samples near the classification boundary can bring more information to the model's classification task (that is, the information gain is large), these samples near the classification boundary can bring more contributions to the model training. Information gain can measure the amount of information reduction under a given random variable. The calculation formula is shown in formula (4):

[0110]

[0111] in, It represents the entropy of the prediction result of sample x given the neural network model parameters θ; D represents the data set to be sampled. When the sampling model samples the source domain samples, D is the source domain sample data; when the sampling model samples the target domain samples, D is the target domain sample data. Information gain The higher it is, the higher the contribution of sample x to model training.

[0112] In order to make more contributions to the training of the model during the training process, the sampling model of the training method of the transfer learning model according to the embodiment of the present disclosure is used to increase the sampling weights of samples near the classification boundary, so that the sampling model can sample the sampling domain samples (for example, source domain samples or target domain samples) as close to the classification boundary as possible, thereby sampling the sampling domain samples with the largest information gain. To this end, the training method according to the embodiment of the present disclosure is to train the sampling model to sample these sampling domain samples with the largest information gain, and the training device can align the label distribution of the sampled sampling domain samples with the label distribution of the non-sampling domain samples, thereby improving the prediction accuracy and precision of the transfer learning model. The training process of the sampling model will be described in detail below.

[0113] As described above, the training method according to the embodiment of the present disclosure trains the sampling model based on at least the information gain of the first domain (i.e., the sampling domain) samples in the source domain samples and the target domain samples. In some embodiments, the information gain of the sample can be calculated based on the following method. Specifically, for the classification model 620, the training device can obtain T prediction results of the sample x through T times of dropout, which is recorded as c j t (x), where t∈{1,…,T} represents the tth dropout among T dropouts, i∈{1,…,K} represents the probability that a sample is predicted to be of category i in the sampling model of the tth dropout, and K represents the total number of categories. The information gain of sample x can be calculated by the following formula (4): Estimated value:

[0114]

[0115] In some embodiments, the process of training the sampling model may include: training sampling of the first domain sample to obtain the first domain training sample after training; determining the relative entropy based on the label distribution of the first domain training sample after training and the label distribution of the second domain sample; determining the weighted information gain based on the information gain of each first domain training sample and the number of training sampling; and training the sampling model based on the relative entropy and the weighted information gain. In some embodiments, the training device may train the sampling model by minimizing the relative entropy and / or maximizing the weighted information gain. In some embodiments, the first domain according to the embodiment of the present disclosure may be a sampling domain, and the sampling domain may be a source domain, and accordingly, the second domain may be a non-sampling domain, and the non-sampling domain may be a target domain. Alternatively, the first domain according to the embodiment of the present disclosure may be a sampling domain, and the sampling domain may be a target domain, and accordingly, the second domain may be a non-sampling domain, and the non-sampling domain may be a source domain.

[0116] Figure 6In the example, the sampling domain is used as the source domain and the non-sampling domain is used as the target domain to illustrate the training process of the sampling model and the specific training process of the feature extraction model and the classification model. The following will describe in detail the training process of the sampling model and the training process of the feature extraction model and the classification model when the sampling domain is used as the source domain and the non-sampling domain is used as the target domain.

[0117] In some embodiments, at least one goal of the training sampling model 630 according to an embodiment of the present disclosure is to select appropriate sampling domain data to align the label distribution of non-sampling domain samples. Accordingly, when the sampling domain is the source domain and the non-sampling domain is the target domain, one goal of the training sampling model 630 is to select appropriate source domain data to align the label distribution estimation of the target domain samples.

[0118] The sampling model 630 according to the embodiment of the present disclosure may be a learnable sampling network (SampleNet), which can represent the source domain feature vector f(x s ), the learnable sampling network SampleNet can give its sampling weight w, as shown in formula (5):

[0119] w=SampleNet(f(x s )) (5)

[0120] In some embodiments, the sampling model 630 can be implemented by a multi-layer perceptron (MLP). s In addition, in order to ensure that the gradient can be passed back to the learnable sampling network SampleNet, the training method according to the embodiment of the present disclosure can use gumbel-softmax for training sampling, as shown in formula (6):

[0121]

[0122] Where ×M s Indicates a total of M samples s samples, n i Represents sample x i The number of times the sample is taken. The total number of samples taken for all samples is equal to the total number of original samples: That is, some samples were not sampled, and some other samples were sampled multiple times. The training device can obtain the source domain sample distribution after training sampling

[0123] In some embodiments, the label distribution of the target domain samples The pseudo labels of the target domain samples can be obtained by the classification model 620 after processing the target domain samples. That is, the label distribution of the target domain samples It can be obtained after the classification model 620 processes the target domain samples.

[0124] In some embodiments, in order to align the label distribution estimate of the target domain samples with the label distribution of the source domain samples sampled through training, the training method according to the embodiments of the present disclosure can minimize the relative entropy of the label distribution estimate of the target domain samples and the label distribution of the source domain samples sampled through training, such as the KL divergence, which is shown in formula (7):

[0125]

[0126] By minimizing the KL divergence in formula (7), as Figure 6 As shown in 604, the KL divergence of the label distribution of the source domain samples sampled through training and the label distribution estimation of the target domain samples is minimized, so that the trained sampling model 630 can be f(x s ) gives different sampling numbers to achieve learning sampling.

[0127] In some embodiments, when the sampling domain is the source domain, a trained sampling model may be used to sample source domain samples. In the process of training the sampling model, the sampling model may also be trained based on the information gain of the source domain samples.

[0128] In some embodiments, the training device needs to sample samples that contribute more to model training, that is, samples with greater information gain. Therefore, the training method according to the embodiment of the present disclosure can also achieve this goal by maximizing the total information gain after training sampling. The above description has given a calculation method for estimating information gain through formula (4), which is further combined with the number of training samples n i The weighted information gain can be obtained: The training method according to the embodiment of the present disclosure can guide the sampling model 630 to select samples with greater information gain in the source domain samples by minimizing formula (8), such as Figure 6 As shown in box 605:

[0129]

[0130] In some embodiments, the training device may train the sampling model 630 by formula (9), that is, optimize the objective function formula (9) of the sampling model 630:

[0131] L sample =β1L lable +β2L IG (9)

[0132] Among them, β1 and β2 gradually increase with training.

[0133] Through the above formula (9), the training device can realize the training of the sampling model 630, and after the sampling model is trained, the process of "label distribution alignment based on learnable sampling" is also realized. In other words, the trained sampling model 630 can realize "label distribution alignment based on learnable sampling", that is, the source domain samples are sampled using the trained sampling model 630, and the label distribution of the sampled source domain samples is estimated to match or align with the label distribution of the target domain samples.

[0134] After the sampling model 630 is trained, the label distribution of the sampled source domain samples can be estimated to match or align with the label distribution of the target domain samples. Furthermore, the trained sampling model 630 can be used to sample source domain samples. The training device can train the feature extraction model 610 and the classification model 620 through the sampled source domain samples, the labels of the sampled source domain samples, and the target domain samples to achieve feature distribution alignment of the source domain samples and the target domain samples. In some embodiments, the training method according to the embodiment of the present disclosure can sample a method for capturing invariant features to train the feature extraction model 610 and the classification model 620.

[0135] In some embodiments, features that can be used to distinguish which domain a sample belongs to are called domain-related features, and other features are called domain-invariant features. The training method according to an embodiment of the present disclosure uses a generative adversarial network model 640 to guide the feature extraction model 610 to better extract domain-invariant features so that it contains as few domain-related features as possible.

[0136] In some embodiments, Figure 6 As shown, the generative adversarial network model 640 includes a feature generator 642 and a domain discriminator 644. The domain discriminator 644 is used to learn the differences in domain invariant features extracted from different domains by the feature extraction model 610. Specifically, the goal of the domain discriminator 644 is to distinguish whether the feature f(x) extracted by the feature extraction model 610 comes from the source domain or the target domain. The training device can train the domain discriminator 644 by minimizing the cross entropy between the output of the domain discriminator 644 and the domain label. For the feature representation vector f(x) extracted by the feature extraction model 610, its corresponding domain discriminator output is d(x). For the i-th source domain sample (here is the sampled source domain sample after the trained sampling model 630 samples the source domain sample), its cross entropy is log d(x) s ). For the sampled source domain sample, it can be multiplied by the number of times the sample is sampled by the trained sampling model n i, thus, when the label distribution of the sampled source domain samples is aligned with the estimated label distribution of the target domain samples, the feature alignment of the source domain samples and the target domain samples is achieved, that is, n i log(1-d(x s )). Therefore, when the sampling domain is the target domain, the training device determines the discrimination loss L according to formula (10) dis To train the discriminator 644:

[0137]

[0138] Among them, M s and M t are the total number of source domain samples and the total number of target domain samples, respectively. In order to make the feature representation vector f(x) extracted by the feature extraction model 610 contain as few domain-related features as possible, that is, to make the extracted feature representation vector f(x) unable to be distinguished by the domain discriminator 644, the feature generator 642 is adopted and used to implement adversarial training with the discriminator 644. The objective function L of the feature generator 642 is adv and the objective function L of the discriminator 644 dis On the contrary. The objective function for the feature generator 642 according to the embodiment of the present disclosure may be referred to as adversarial loss, which is the adversarial training loss L adv It can be represented by formula (11):

[0139]

[0140] In some embodiments, the training device can train the feature extraction model 610, the classification model 620, and the feature generator 642 based on the task objective function (e.g., obtained in the "task learning process") and the adversarial loss through the objective function represented by formula (12).

[0141] L net =L task +γL adv (12)

[0142] Training equipment can further utilize L disTo train the domain discriminator 644. Moreover, the training device can alternately use the objective function (12) and the objective function (11) to train the feature extraction model 610, the classification model 620, the feature generator 642 and the domain discriminator 644. For example, the training device can fix the parameters of the training domain discriminator 644, and use the objective function (12) to train the feature extraction model 610, the classification model 620 and the feature generator 642; then fix the parameters of the feature extraction model 610, the classification model 620 and the feature generator 642, and use the objective function (11) to train the domain discriminator 644. The training device can iterate the above-mentioned training process of the feature extraction model 610, the classification model 620, the feature generator 642 and the domain discriminator 644 multiple times. In this way, the features extracted by the feature extraction model 610 only contain domain-invariant information. At the same time, in the task function L task Under the action of , the obtained domain-invariant features contain information relevant to downstream tasks.

[0143] The following will be combined Figure 8 Describes the training process of the sampling model when the sampling domain is the target domain and the non-sampling domain is the source domain, as well as the specific training process of the feature extraction model and the classification model. Figure 8 A detailed example process for training a transfer learning model according to another embodiment of the present disclosure is shown. Figure 8 In , the sampled domain is the target domain and the non-sampled domain is the source domain. Figure 8 With Figure 6 The components with the same reference numerals have the same or similar functions, and for the sake of brevity, they will not be described in detail here. Those skilled in the art can refer to the following examples in combination with the reference numerals in the drawings: Figure 6 Please refer to the relevant content in to understand this.

[0144] In some embodiments, at least one goal of the training sampling model 630 according to an embodiment of the present disclosure is to select appropriate sampling domain data to align the label distribution of non-sampling domain samples. Accordingly, when the sampling domain is the target domain and the non-sampling domain is the source domain, one goal of the training sampling model 630 is to select appropriate target domain data to align the label distribution of source domain samples.

[0145] As described above, the sampling model 630 according to the embodiment of the present disclosure may be a learnable sampling network (SampleNet), and for the target domain feature representation vector f(x s ), the learnable sampling network SampleNet can give its sampling weight w, as shown in formula (13):

[0146] w=SampleNet(f(x t )) (13)

[0147] In some embodiments, the sampling model 630 can be implemented by a multi-layer perceptron (MLP). t In addition, in order to ensure that the gradient can be passed back to the learnable sampling network SampleNet, the training method according to the embodiment of the present disclosure can use gumbel-softmax for training sampling, as shown in formula (14):

[0148]

[0149] Where ×M t Indicates a total of M samples t samples, n i Represents sample x i The number of times the training sample is taken. The total number of samples taken for all samples is equal to the total number of original samples: That is, some samples were not sampled, and some other samples were sampled multiple times. According to the processing of the sampling results by the classification model 620, the training device can obtain the estimated distribution of the target domain samples after training sampling. In other words, the label distribution of the target domain samples sampled during training is estimated The pseudo labels can be obtained by the pseudo labels of the sampled target domain samples after training. The pseudo labels of the sampled target domain samples after training can be obtained by the classification model 620 after processing the sampled target domain samples after training. That is, the label distribution of the sampled target domain samples after training is It can be obtained by processing the target domain samples sampled through training by the classification model 620.

[0150] In some embodiments, according to the labels of the source domain samples, the training device can also obtain the label distribution of the source domain samples. In some embodiments, in order to align the label distribution estimate of the target domain samples sampled through training and the label distribution of the source domain samples, the training method according to the embodiment of the present disclosure can minimize the relative entropy of the label distribution estimate of the target domain samples sampled through training and the label distribution of the source domain samples, such as the KL divergence, which is shown in formula (15):

[0151]

[0152] By minimizing the KL divergence in formula (15), as Figure 8 As shown in 804, the KL divergence between the label distribution estimation of the target domain samples sampled through training and the label distribution of the source domain samples is minimized, so that the trained sampling model 630 can be f(x t ) gives different sampling numbers to achieve learning sampling.

[0153] In some embodiments, when the sampling domain is the target domain, the trained sampling model may be used to sample samples from the target domain. In the process of training the sampling model, the sampling model may also be trained based on the information gain of the target domain samples.

[0154] In some embodiments, the training device needs to sample samples that contribute more to model training, that is, samples with greater information gain. Therefore, the training method according to the embodiment of the present disclosure can also achieve this goal by maximizing the total information gain after training sampling. The above description has given a calculation method for estimating information gain through formula (4), which is further combined with the number of training samples n i The weighted information gain can be obtained: The training method according to the embodiment of the present disclosure can guide the sampling model 630 to select samples with greater information gain in the target domain samples by minimizing formula (16), such as Figure 8 As shown in box 805:

[0155]

[0156] In some embodiments, the training device may train the sampling model 630 by formula (17), that is, optimize the objective function formula (17) of the sampling model 630:

[0157] L sample =β3L lablet +β4L IGt (17)

[0158] Among them, β3 and β4 gradually increase with training.

[0159] Through the above formula (17), the training device can implement the training of the sampling model 630, and after the sampling model is trained, the process of "label distribution alignment based on learnable sampling" is also implemented. In other words, the trained sampling model 630 can implement "label distribution alignment based on learnable sampling", that is, the trained sampling model 630 is used to sample the target domain samples, and the label distribution of the sampled target domain samples is estimated to match or align with the label distribution of the source domain samples.

[0160] After the sampling model 630 is trained, the label distribution of the sampled target domain samples can be matched or aligned with the label distribution estimate of the source domain samples. Furthermore, the trained sampling model 630 can be used to sample the target domain samples. The training device can train the feature extraction model 610 and the classification model 620 through the sampled target domain samples, the label estimates or pseudo labels of the sampled target domain samples, and the source domain samples to achieve the feature distribution alignment of the source domain samples and the target domain samples. In some embodiments, the training method according to the embodiment of the present disclosure can sample the method of capturing invariant features to train the feature extraction model 610 and the classification model 620.

[0161] In some embodiments, features that can be used to distinguish which domain a sample belongs to are called domain-related features, and other features are called domain-invariant features. The training method according to an embodiment of the present disclosure uses a generative adversarial network model 640 to guide the feature extraction model 610 to better extract domain-invariant features so that it contains as few domain-related features as possible.

[0162] In some embodiments, Figure 8 The feature generator 642 and domain discriminator 644 in the generative adversarial network model 640 shown in FIG. Figure 6 The feature generator 642 and the domain discriminator 644 in are similar. The domain discriminator 644 is used to learn the differences in domain invariant features extracted from different domains by the feature extraction model 610. Specifically, the goal of the domain discriminator 644 is to distinguish whether the feature f(x) extracted by the feature extraction model 610 comes from the source domain or the target domain. The training device can train the domain discriminator 644 by minimizing the cross entropy between the output of the domain discriminator 644 and the domain label. For the feature representation vector f(x) extracted by the feature extraction model 610, its corresponding domain discriminator output is d(x). For the i-th target domain sample (here is the sampled target domain sample after the trained sampling model 630 samples the target domain sample), its cross entropy is log d(x) t ). For the sampled target domain sample, it can be multiplied by the number of times the sample is sampled by the trained sampling model n i , thus, when the label distribution estimation of the sampled target domain samples is aligned with the label distribution of the source domain samples, the feature alignment of the source domain samples and the target domain samples can be achieved, that is, n i log(1-d(x t )). Therefore, when the sampling domain is the target domain, the training device determines the discriminant loss L according to formula (18) dist Training domain discriminator 644:

[0163]

[0164] Among them, Ms and M t are the total number of source domain samples and the total number of target domain samples, respectively. In order to make the feature representation vector f(x) extracted by the feature extraction model 610 contain as few domain-related features as possible, that is, to make the extracted feature representation vector f(x) unable to be distinguished by the domain discriminator 644, the feature generator 642 is adopted and used to implement adversarial training with the discriminator 644. The objective function L of the feature generator 642 is advt and the objective function L of the discriminator 644 dist On the contrary. The objective function for the feature generator 642 according to the embodiment of the present disclosure may be referred to as adversarial loss, which is the adversarial training loss L advt It can be represented by formula (19):

[0165]

[0166] In some embodiments, the training device can train the feature extraction model 610, the classification model 620, and the feature generator 642 based on the task objective function (e.g., obtained in the "task learning process") and the adversarial loss through the objective function represented by formula (20).

[0167] L nett =L task +γ t L advt (20)

[0168] Training equipment can utilize L dist To train the domain discriminator 644. Furthermore, the training device can alternately use the objective function (20) and the objective function (19) to train the feature extraction model 610, the classification model 620, the feature generator 642 and the domain discriminator 644. For example, the training device can fix the parameters of the training domain discriminator 644, and use the objective function (20) to train the feature extraction model 610, the classification model 620 and the feature generator 642; then fix the parameters of the feature extraction model 610, the classification model 620 and the feature generator 642, and use the objective function (19) to train the domain discriminator 644. In this way, the features extracted by the feature extraction model 610 only contain domain-invariant information. At the same time, in the task function L task Under the action of , the obtained domain-invariant features contain information relevant to downstream tasks.

[0169] Combination of the above Figure 6 and Figure 8 The following describes respectively the training process of the sampling model and the sampling process of the feature extraction model 610 and the classification model 620 based on the sampling of the sampling domain samples according to the embodiments of the present disclosure when the sampling domains are the source domain and the target domain respectively.

[0170] In some embodiments, in the process of training the feature extraction model, in order to make the pseudo-label of the target domain more stable and more robust, the training method according to the embodiment of the present disclosure uses an average model, that is, a momentum updated encoder as the target domain sample feature extractor 614. The parameters of the target domain sample feature extractor 614 at time t are related to the model parameters of the source domain sample feature extractor 612 at time t and the model parameters of the target domain sample feature extractor 614 at the previous time (t-1) of the corresponding time t, and can be expressed as formula (21):

[0171] θ m t =αθ m t-1 +(1-α)θ f t (twenty one)

[0172] Among them, θ m is the parameter of the target domain sample feature extractor 614, θ f is the parameter of the source domain sample feature extractor 612, and θ m t is the parameter of the target domain sample feature extractor 614 at time t, θ m t-1 is the parameter of the target domain sample feature extractor 614 at time (t-1), θ f t are the parameters of the source domain sample feature extractor 612 at time t.

[0173] By associating the parameters of the target domain sample feature extractor 614 at time t with the model parameters of the source domain sample feature extractor 612 at time t and the model parameters of the target domain sample feature extractor 614 at the previous time (t-1) of the corresponding time t, the target domain sample feature extractor 614 can be made more stable, and as the number of training iterations increases, it will gradually converge to be consistent with the source domain sample feature extractor, so that the label estimation (i.e., pseudo label) of the target domain sample obtained by the output of the target domain sample feature extractor 614 and the classification model 620 is also more accurate, that is:

[0174]

[0175] Advantageously, the training method of the transfer learning model according to the embodiment of the present disclosure solves the model migration problem when the target domain label distribution is unbalanced. By training the sampling model 630 and using adversarial training, the training method of the transfer learning model according to the embodiment of the present disclosure achieves distribution alignment and feature alignment between the source domain and the target domain. During the sampling process, the training method of the transfer learning model according to the embodiment of the present disclosure comprehensively considers the information gain brought by each sampling domain sample, thereby ensuring that the sampling result still has a clear classification interface.

[0176] In actual application cases, the transfer learning model obtained by the training method according to the embodiment of the present disclosure effectively reduces the false alarm rate when the target domain categories are highly unbalanced. Fig. 9A The transfer learning model obtained by the training method according to the embodiment of the present disclosure is illustrated in terms of recall rate and false alarm rate statistics compared with other methods when the abnormality ratio of target domain data is 10%. In the Case 1 scenario where the abnormality ratio of target domain data is 10%, the ratio of normal data to fault data is 9:1. In this case, the transfer learning model obtained by the training method according to the present disclosure is comparable to the results of the current mainstream algorithm, achieving similar recall rate and false alarm rate.

[0177] Fig. 9B The transfer learning model obtained by the training method according to the embodiment of the present disclosure shows the statistics of recall rate and false alarm rate compared with other methods when the abnormal ratio of target domain data is 1%. In the scenario where the abnormal ratio of target domain data is 1%, the ratio of normal data to fault data is 99:1. In this relatively extreme case of class imbalance, the transfer learning model obtained by the training method according to the present disclosure can greatly reduce the false alarm rate from 17.6% to 1.8% while being comparable to the recall rate of the current mainstream algorithm. The reduction in false alarm rate here is achieved by aligning the label distribution of source domain data and target data.

[0178] According to the method for training a transfer learning model in an embodiment of the present disclosure, sampling is performed on the source domain, which can avoid using inaccurate target domain pseudo-labels. By maximizing information gain, the decision boundary sample weight is increased to ensure that the classification boundary does not move excessively toward small classes. Combined with the source domain data and the target domain data and feature distribution alignment, the method for training a transfer learning model in an embodiment of the present disclosure can effectively achieve a low false alarm rate in high imbalance situations.

[0179] In network fault diagnosis applications, the present invention has better prediction results than other current methods, as shown in Table 1.

[0180] Table 1

[0181]

[0182] Fig.10 A schematic block diagram of a training device 900 for training a transfer learning model according to an embodiment of the present disclosure is shown. The training device 900 can be implemented by software, hardware, or a combination of the two. In some embodiments, the device 900 can be a device that implements a software device or a hardware device or a combination of hardware and software.

[0183] The device 900 includes: an acquisition unit 910, configured to acquire source domain samples and target domain samples; a sampling model training unit 920, configured to train a sampling model based on at least the information gain of a first domain sample from among the source domain samples and the target domain samples; a sampling unit 930, configured to sample the first domain samples by the trained sampling model to obtain sampled first domain samples; a transfer learning model training unit 640, configured to train a feature extraction model and a classification model based on the sampled first domain samples and second domain samples from among the source domain samples and the target domain samples; and a determination unit 950, configured to determine the trained feature extraction model and classification model as a transfer learning model.

[0184] In some embodiments, the device 900 also includes: a pre-training unit 960, which is configured to pre-train the feature extractor and the classifier based on the source domain samples and the labels corresponding to the source domain samples before training the feature extraction model and the classification model based on the sampled first domain samples and the second domain samples.

[0185] In some embodiments, the sampling model training unit 920 is further configured to: perform training sampling on the first domain samples to obtain first domain training samples that have been trained; determine the relative entropy based on the label distribution corresponding to the first domain training samples that have been trained and the label distribution corresponding to the second domain samples; determine the weighted information gain based on the information gain of each first domain training sample and the number of training samplings; and train the sampling model based on the relative entropy and the weighted information gain.

[0186] In some embodiments, training the sampling model based on relative entropy and weighted information gain includes: minimizing the relative entropy; and maximizing the weighted information gain.

[0187] In some embodiments, the second domain sample is a target domain sample, and the apparatus 900 further generates a label distribution estimate of the target domain sample as the label distribution of the second domain sample based on the target domain sample by a feature extraction model and a classification model.

[0188] In some embodiments, the first domain sample is a target domain sample, and the apparatus 900 further generates a label distribution of the first domain training sample based on the first domain training sample by using a feature extraction model and the classification model.

[0189] In some embodiments, the transfer learning model training unit is further configured to: generate a cross entropy loss based on source domain samples and labels of source domain samples; generate an adversarial loss based on the sampled first domain samples and the second domain samples; generate a discriminant loss based on the sampled first domain samples and the second domain samples; and train a feature extraction model and a classification model based on the cross entropy loss, the adversarial loss, and the discriminant loss.

[0190] In some embodiments, the feature extraction model includes a target domain sample feature extractor and a source domain sample feature extractor, wherein the model parameters of the target domain sample feature extractor at a corresponding moment are related to at least one of the following items: the model parameters of the source domain sample feature extractor at the corresponding moment; or the model parameters of the target domain sample feature extractor at a moment before the corresponding moment.

[0191] In some embodiments, the label distribution of the sampled first domain samples matches the pseudo label distribution of the second domain samples.

[0192] In some embodiments, the source domain sample includes historical operating data or simulation data of one or more devices, the type of the one or more devices is the same as the type of the device to be processed to which the transfer learning model is to be applied, and the target domain sample includes operating data of the device to be processed collected by the sensor.

[0193] Fig.10 The device 1000 shown in FIG. 2 can be used to implement the above-mentioned Figure 8 The training process is shown.

[0194] Fig.11 1100 is a schematic flow chart of a fault prediction method according to an embodiment of the present disclosure. The method 1100 can be executed at any suitable computing device. The computing device includes but is not limited to a desktop computer, a mobile terminal, a smart home device, a wearable device, a server, a cloud server, etc. Fig.10 The various steps shown in the figure perform the corresponding functions of the fault prediction method in a specific order, but it can be understood that Fig.11 The steps in the method 1100 may be performed in a different order relative to the order shown. For example, two or more steps shown in succession may be performed simultaneously or some steps may be performed simultaneously. In addition, certain steps in the method 1100 may be omitted. In addition, other steps may be added to the method 1100. Fig.11 It will be appreciated that all such variations are within the scope of the present disclosure.

[0195] In 1120, the computing device may obtain data related to the operation of the device to be processed, and the data may be data in the target domain. For example, the target domain data may be time series operation data collected by a sensor and representing the operation index of the device to be processed. The device to be processed may include, but is not limited to, Figure 1 or Figure 3 The various types of electromechanical or mechanical devices shown in . The data related to the operation of the device to be processed can be obtained by sensors in the device or associated with the device, and in some embodiments, the data related to the operation of the device to be processed can be time-series operation data.

[0196] In 1140, the computing device may use the fault prediction model to predict whether there is a fault in the device to be processed according to the data obtained in 1120. In some embodiments, the fault prediction model may be obtained according to the method for training the transfer learning model as described above. For the sake of simplicity, the specific training process is not described here.

[0197] Those skilled in the art will appreciate that, although predictive maintenance is used as an example to illustrate the application scenario of the transfer learning model according to the embodiments of the present disclosure, the transfer learning model trained according to the embodiments of the present disclosure can also be applied to various scenarios such as motion recognition, user churn prediction, user complaint prediction, and fraud detection. The present disclosure does not limit the application scenarios of the transfer learning model.

[0198] Fig.12 A schematic block diagram of an example device 1200 that can be used to implement an embodiment of the present disclosure is shown. The device 1200 can be implemented as or included in a training device for training a transfer learning model, or can also be implemented as or included in a computing device for performing, such as fault prediction, using a trained transfer learning model.

[0199] As shown in the figure, the device 1200 includes a processor 1201, a read-only memory (ROM) 1202 and a random access memory (RAM) 1203. The processor 1201 can perform various appropriate actions and processes according to the computer program instructions stored in the RAM 1202 and / or the RAM 1203 or the computer program instructions loaded from the storage unit 1208 into the ROM 1202 and / or the RAM 1203. In the ROM 1202 and / or the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The processor 1201 and the ROM 1202 and / or the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0200] A number of components in the device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0201] The processor 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples that may be implemented include, but are not limited to, a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc., which may be referred to as computing units accordingly. The processor 1201 performs the various methods and processes described above. For example, in some embodiments, the process described above may be implemented as a computer software program that is tangibly contained in a computer-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1200 via ROM 1202 and / or RAM 1203 and / or a communication unit 1209. When the computer program is loaded into ROM 1202 and / or RAM 1203 and executed by the processor 1201, one or more steps of the process described above may be performed. Alternatively, in other embodiments, the processor 1201 may be configured to perform the training process or prediction process described above in any other appropriate manner (for example, by means of firmware).

[0202] For example, Fig.12 The device 1200 in the embodiment may be implemented as a computing device, or may be implemented as a chip or a chip system in a computing device, which is not limited in the embodiments of the present disclosure.

[0203] The embodiment of the present disclosure further provides a chip, which may include an input interface, an output interface, and a processing circuit. In the embodiment of the present disclosure, the input interface and the output interface may complete the interaction of signaling or data, and the processing circuit may complete the generation and processing of signaling or data information to implement the training method or prediction method involved in any of the above embodiments.

[0204] The embodiments of the present disclosure also provide a chip system, including a processor, for supporting a user device to implement the functions involved in any of the above embodiments. In one possible design, the chip system may also include a memory for storing necessary program instructions and data, and when the processor runs the program instructions, the device on which the chip system is installed implements the training method or prediction method involved in any of the above embodiments. Exemplarily, the chip system may be composed of one or more chips, and may also include chips and other discrete devices.

[0205] An embodiment of the present application also provides a processor for coupling with a memory, wherein the memory stores instructions. When the processor executes the instructions, the processor executes the training method or prediction method involved in any of the above embodiments.

[0206] The embodiment of the present application also provides a computer-readable storage medium on which computer instructions or program codes are stored. When the processor runs the instructions or the program codes, the processor executes the training method or prediction method involved in any of the above embodiments. A computer-readable medium may be any tangible medium containing or storing a program for or related to an instruction execution system, device or device. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. Computer-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination thereof. The computer-readable storage medium may be any available medium that a computer can access or a data storage system such as a server or data center that includes one or more available media integrated. More detailed examples of computer-readable storage media include electrical connections with one or more wires, magnetic media (e.g., disks, floppy disks, hard disks, tapes, magnetic storage devices), optical media (e.g., optical storage devices, DVDs), semiconductor media (e.g., solid-state hard drives), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), or any suitable combination thereof, etc.

[0207] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The embodiment of the present application also provides at least one computer program product tangibly stored on a non-temporary computer-readable storage medium. The computer program product includes one or more computer executable instructions, such as instructions included in a program module, which are executed in a device on a real or virtual processor of the target to perform the process, method and function involved in any of the above embodiments. When the computer program instruction is loaded and executed on a computer, a process or function according to an embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.

[0208] According to the training method or prediction method provided in the embodiment of the present application, the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer performs the processes, methods and functions in the above-mentioned embodiments. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functions of program modules can be combined or divided between program modules as needed. Machine executable instructions for program modules can be executed in local or distributed devices. In distributed devices, program modules can be located in local and remote storage media.

[0209] The computer program code for realizing the method of the present disclosure can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by a computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partly on a computer, as an independent software package, partly on a computer and partly on a remote computer or completely on a remote computer or server. In the context of the present disclosure, the computer program code or related data can be carried by any appropriate carrier so that equipment, devices or processors can perform various processing and operations described above. The example of carrier includes signal, computer readable medium, etc. The example of signal can include electric, optical, radio, sound or other forms of propagation signals, such as carrier waves, infrared signals, etc.

[0210] In general, various embodiments of the present application may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software, which may be performed by a controller, microprocessor, or other user device. Although various aspects of the embodiments of the present disclosure are shown and described as block diagrams, flow charts, or using some other graphical representations, it should be understood that the boxes, devices, systems, techniques, or methods described herein may be implemented as, for example, non-limiting examples, hardware, software, firmware, dedicated circuits or logic, general hardware or controllers or other user devices, or some combination thereof.

[0211] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0212] The above has described various implementations of the present disclosure, and the above description is exemplary, not exhaustive, and is not limited to the disclosed implementations. Without departing from the scope and spirit of the various implementations described, many modifications and changes are obvious to those of ordinary skill in the art. The selection of terms used herein is intended to explain the principles of each implementation, practical application, or improvement of technology in the market, or to enable other ordinary skill in the art to understand the various implementations disclosed herein. The specific internal implementation may vary depending on the type of electronic device, the operating system carried, the program used, and the interface called. The present application embodiment does not impose any restrictions, and the characteristic functions described in the embodiment of the present application can be realized. The various implementation methods of the present application can be combined arbitrarily to achieve different technical effects.

[0213] The above specific implementation methods further explain in detail the purpose, technical solutions and beneficial effects of the embodiments of the present application. It should be understood that the above are only specific implementation methods of the embodiments of the present application and are not used to limit the protection scope of the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.

[0214] It should be noted that although the embodiments of the present application are described above in conjunction with the accompanying drawings, the above embodiments are not independent of each other, and they can also be combined to obtain other embodiments. The division of the modes, situations, categories and embodiments in the embodiments of the present application is only for the convenience of description and should not constitute a special limitation. The features in the various modes, categories, situations and embodiments can be combined with each other in a logical manner. The various implementation methods of the present application can be combined arbitrarily to achieve different technical effects. The embodiments of the present application no longer list various combinations.

[0215] In addition, although the operation of the method of the present disclosure is described in a particular order in the accompanying drawings, this does not require or imply that these operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flow chart can change the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution. It should also be noted that the features and functions of two or more devices according to the present disclosure can be embodied in one device. Conversely, the features and functions of a device described above can be further divided into being embodied by multiple devices.

[0216] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A transfer learning model training method, characterized in that: include: Obtain source domain samples and target domain samples; Training a sampling model based on at least the information gain of a first domain sample among the source domain samples and the target domain samples; Sampling the first domain samples by the trained sampling model to obtain sampled first domain samples; Training a feature extraction model and a classification model based on the sampled first domain samples and the second domain samples in the source domain samples and the target domain samples; as well as The trained feature extraction model and the classification model are determined as the transfer learning model.

2. The method according to claim 1, characterized in that Before training a feature extraction model and a classification model based on the sampled first domain samples and the second domain samples, the method further includes: The feature extraction model and the classification model are pre-trained based on the source domain samples and labels corresponding to the source domain samples.

3. The method according to claim 1, characterized in that Training the sampling model includes: Performing training sampling on the first domain samples to obtain training sampled first domain training samples; Determining relative entropy based on the label distribution of the first domain training samples and the label distribution of the second domain samples of the training sampling; Determining a weighted information gain based on the information gain of each first domain training sample and the number of training samples; and The sampling model is trained based on the relative entropy and the weighted information gain.

4. The method according to claim 3, characterized in that Training the sampling model based on the relative entropy and the weighted information gain includes: minimizing the relative entropy; and maximizing the weighted information gain.

5. The method according to claim 3, characterized in that: The second domain sample is the target domain sample, and the method further includes: The feature extraction model and the classification model generate a label distribution estimate of the target domain sample as the label distribution of the second domain sample based on the target domain sample.

6. The method according to claim 3, characterized in that The first domain sample is the target domain sample, and the method further includes: The label distribution of the first domain training samples is generated by the feature extraction model and the classification model based on the first domain training samples.

7. The method according to claim 1, characterized in that Training feature extraction models and classification models includes: Generate a cross entropy loss based on the source domain sample and the label of the source domain sample; generating an adversarial loss based on the sampled first domain samples and the second domain samples; generating a discriminative loss based on the sampled first domain samples and the second domain samples; and The feature extraction model and the classification model are trained based on the cross entropy loss, the adversarial loss and the discriminant loss.

8. The method according to claim 7, characterized in that The feature extraction model includes a target domain sample feature extractor and a source domain sample feature extractor, wherein the model parameters of the target domain sample feature extractor at a corresponding time are associated with at least one of the following items: Model parameters of the source domain sample feature extractor at the corresponding time; or The model parameters of the target domain sample feature extractor at a moment before the corresponding moment.

9. The method of any one of claims 1 to 8, wherein the label distribution of the sampled first domain samples matches an estimate of the label distribution of the second domain samples.

10. According to the method described in any one of claims 1 to 9, the source domain samples include historical operating data or simulation data of one or more devices, the type of the one or more devices is the same as the type of the device to be processed to which the transfer learning model is to be applied, and the target domain samples include operating data of the device to be processed collected by sensors.

11. A fault prediction method, characterized in that: include: Acquire data related to the operation of the device to be processed, wherein the data is data in the target domain; as well as The fault prediction model predicts whether there is a fault in the device to be processed based on the data, The fault prediction model is trained according to the transfer learning model training method according to any one of claims 1 to 10.

12. The method according to claim 11, characterized in that The data is time-series operation data collected by sensors and representing operation indicators of the equipment to be processed.

13. A computing device, comprising a processor and a memory, wherein the memory stores a computer program, and when the processor reads and executes the computer program, the computing device executes the method according to any one of claims 1 to 10 or 11 to 12.

14. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 10 or 11 to 12.

15. A chip, characterized in that: comprising at least one processor and an interface; The at least one processor obtains program instructions or data through the interface; The at least one processor is configured to execute the program line instructions to implement the method according to any one of claims 1 to 10 or 11 to 12.

Citation Information

Cited By

  • Transfer learning model and recommendation model training method and device

    CN121051468A