Federal learning method and device, equipment, storage medium and program product
By using known abnormal data categories and clustering processing to generate pseudo labels and update the federated model, it solves the problem of identifying new abnormal data categories in incremental monitoring data and achieves timely updates of the federated model and more accurate anomaly detection.
Patent Information
- Application Number
- CN202410724238.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-10
AI Technical Summary
In anomaly data detection scenarios based on federated learning, incremental monitoring data is usually unlabeled, and when there are new categories of abnormal data, the federated model cannot be updated in a timely manner and cannot adapt to the model update needs in anomaly detection scenarios.
By using known abnormal data categories to determine new abnormal data categories in the incremental monitoring data, perform clustering processing, determine the number of categories, generate pseudo labels, mark the data, and update the federated model to realize the detection of new categories. Identify.
Anomaly category annotation and model update can be achieved without category labeling, allowing the updated federated model to identify more anomalies, adapt to data update needs, and get rid of the dependence on manual annotation.
Smart Images

Figure CN118627595A
Abstract
Description
Technical Field
[0001] The present application relates to the field of deep learning technology, and in particular to a federated learning method, apparatus, device, storage medium and program product. Background Art
[0002] In many anomaly data detection scenarios based on federated learning, such as medical scenarios and traffic scenarios, the data class distribution often changes dynamically. In order to enable the federated learning-based model to accurately classify the abnormal data in the above scenarios, it is necessary to perform incremental learning on the federated model, that is, to update the federated model with incremental monitoring data.
[0003] Incremental monitoring data is usually unlabeled, and there are new abnormal data categories in the incremental monitoring data. However, for the newly added categories, most of them rely on prior knowledge of data distribution or category structure. Without this prior knowledge, it is impossible to know the newly added categories, and it is impossible to update the federated model in time, so it is impossible to adapt to the model update needs in the anomaly detection scenario. Summary of the invention
[0004] In order to solve the above problems, the present application proposes a federated learning method, apparatus, device, storage medium and program product that can adapt to the data update needs in anomaly detection scenarios.
[0005] According to a first aspect of an embodiment of the present application, a federated learning method is provided, including:
[0006] In the case where there is incremental monitoring data in the execution of a federated learning task, first data corresponding to a newly added abnormal data category is determined in the incremental monitoring data using a known abnormal data category; wherein the known abnormal data category represents an abnormal monitoring data category corresponding to the sample monitoring data in the federated learning task;
[0007] Performing clustering processing on the first data to determine the number of categories of the newly added monitoring data category;
[0008] Determine corresponding pseudo labels according to the number of categories of the newly added abnormal data categories, and mark the first data according to the pseudo labels to obtain marked incremental monitoring data;
[0009] The parameters of the federated model are updated according to the marked incremental monitoring data to obtain an updated federated model, wherein the federated model is used to identify abnormal data categories of the monitoring data.
[0010] According to a second aspect of an embodiment of the present application, a federated learning device is provided, including:
[0011] A determination module, configured to determine, when there is incremental monitoring data in the execution of a federated learning task, first data corresponding to a newly added abnormal data category in the incremental monitoring data using a known abnormal data category; wherein the known abnormal data category represents an abnormal monitoring data category corresponding to the sample monitoring data in the federated learning task;
[0012] A clustering module, used to perform clustering processing on the first data to determine the number of categories of the newly added monitoring data categories;
[0013] A marking module, used to determine corresponding pseudo labels according to the number of categories of the newly added abnormal data categories, and mark the first data according to the pseudo labels to obtain marked incremental monitoring data;
[0014] The training module is used to update the parameters of the federated model according to the labeled incremental monitoring data to obtain an updated federated model, wherein the federated model is used to identify abnormal data categories of the monitoring data.
[0015] A third aspect of the present application provides an electronic device, including:
[0016] Memory and processor;
[0017] The memory is connected to the processor and is used to store programs;
[0018] The processor implements the above-mentioned federated learning method by running the program in the memory.
[0019] A fourth aspect of the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned federated learning method is implemented.
[0020] A fifth aspect of the present application provides a computer program product, including a computer program, which implements the above-mentioned federated learning method when executed by a processor.
[0021] One embodiment of the above application has the following advantages or beneficial effects:
[0022] In the case of incremental monitoring data in the execution of a federated learning task, the first data corresponding to the newly added abnormal data category is determined in the incremental monitoring data using the known abnormal data category; wherein the known abnormal data category represents the abnormal monitoring data category corresponding to the sample monitoring data in the federated learning task; the first data is clustered to determine the number of categories of the newly added monitoring data category; the corresponding pseudo-label is determined according to the number of categories of the newly added abnormal data category, and the first data is labeled according to the pseudo-label to obtain the labeled incremental monitoring data; the parameters of the federal model are updated according to the labeled incremental monitoring data to obtain the updated federal model. In this way, there is no need to perform category labeling on the incremental monitoring data, and the abnormal category can still be labeled, thereby updating the monitoring data of the federal model, so that the updated federal model can identify more abnormal situations. In this way, it can meet the data update needs in the anomaly detection scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0024] Figure 1 A schematic diagram of a federated learning system provided in an embodiment of the present application;
[0025] Figure 2 A flowchart of a federated learning method provided in an embodiment of the present application;
[0026] Figure 3 A schematic diagram of the process of dividing incremental monitoring data provided in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of a specific process of the federated learning method provided in the embodiment of the present application;
[0028] Figure 5 A schematic diagram of the structure of a federated learning device provided in an embodiment of the present application;
[0029] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] The federated learning method provided in the embodiment of the present application relates to a federated learning technology in the machine learning technology of artificial intelligence, wherein:
[0032] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0033] Machine Learning (ML) is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning and other technologies. Pre-trained models are the latest development of deep learning, integrating the above technologies.
[0034] Federated learning (Federated machine learning / Federated Learning), also known as federated machine learning, joint learning, and alliance learning, is a machine learning framework that can effectively help multiple institutions use data and conduct machine learning modeling while meeting the requirements of user privacy protection, data security, and government regulations. According to the distribution characteristics of data, federated learning can be divided into horizontal federated learning and vertical federated learning. As a distributed machine learning paradigm, federated learning can effectively solve the "data island" problem, allowing participants to jointly model without sharing data, thereby breaking the "data island" technically and realizing AI collaboration. The federated learning method mainly solves data privacy and security issues and is suitable for application scenarios involving sensitive information. It allows all parties to maintain the locality of data while sharing learning results, thereby enhancing cross-border data cooperation while ensuring privacy.
[0035] Incremental learning refers to a machine learning method that can gradually accept new data and update the model without retraining the entire model. This learning strategy allows the model to continuously learn and adapt to new data or emerging patterns, thereby maintaining its timeliness and accuracy. This is very useful for processing data streams or in resource-constrained environments, especially in scenarios where data is constantly changing or gradually available, such as online learning systems, recommendation systems, or predictive models in dynamic environments. Incremental learning emphasizes memory efficiency and computational efficiency, allowing the model to flexibly cope with the continuous growth and changes of data without the need to frequently train from scratch.
[0036] The federated learning method provided in the embodiment of the present application can be applied to Figure 1 In the federated learning system 100 shown, Figure 1 The federated learning system shown in includes at least two participants, such as Figure 1 Participants 102, 104, 106 and 108 shown in the figure, each participant may include at least one working node, each participant may store the corresponding data that needs to be processed, and the data storage system used by each participant to store data is set locally, or may be integrated on the server, or may be placed on the cloud or other network servers and only support self-access, and there is a communication connection between any two participants among participants 102, 104, 106 and 108, and data is transmitted between the participants through the communication connection. It can be understood that the above-mentioned communication connection does not limit the connection method, and can be directly or indirectly connected through wired communication, directly or indirectly connected through wireless communication, or through other methods, and this application does not limit it here.
[0037] It can be understood that the above-mentioned participants can be different teams, departments or companies. That is to say, each participant can store its own data. When training a model based on federated learning, federated learning does not need to centrally collect data distributed among various participants. Instead, it directly uses the data distributed among various participants and cooperates and interacts within the federated learning system to eventually learn a trained model. During the model training process, the data exchanged by each participant is encrypted, and no participant can guess the private data content of other participants. The data exchanged by each participant can be some data generated during the model training process (such as gradients), rather than the initial data stored by the participants.
[0038] Participants who perform federated learning tasks include Figure 1 Taking the participants 102 and 104 in the example, the federated learning process is explained. Participants 102 and 104 respectively store their own training data for model training. After receiving the instructions related to model training, participants 102 and 104 respectively build models locally, and then use the local training data to train the models. In the process of model training, participant 102 trains the model based on the data stored locally (training data A), and some data generated during the training process (such as parameters such as gradients or partial derivatives, recorded as parameters A) are generated by participant 104 based on the local The stored data (training data B) is used to train the model. Some data (such as parameters such as gradients or partial derivatives, recorded as parameters B) are generated during the training process. During the training process, participant 102 continuously sends the parameters A generated by it to participant 104 to assist participant 104 in training its locally stored data. Participant 104 continuously sends the parameters B generated by it to participant 102 to assist participant 102 in training its locally stored data. Through this cooperative interaction, a trained model is finally obtained, and the final model can be used to jointly provide corresponding services later.
[0039] It is understandable that the working nodes of the above-mentioned participants can be various computer devices, and the computer devices can be terminals or servers, wherein the terminals can be but are not limited to various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.
[0040] Exemplary Methods
[0041] Figure 2 This is a flow chart of a federated learning method according to an embodiment of the present application. The technical solution of the embodiment of the present application is applicable to various abnormal monitoring data classification task scenarios, such as traffic scenarios, medical scenarios, financial scenarios, network security scenarios, manufacturing and logistics scenarios, etc. By adopting the technical solution of the embodiment of the present application, there is no need to mark the category of incremental monitoring data, and the abnormal category can still be marked, thereby realizing the data update demand of the federated model.
[0042] In the related art, in the federated learning system, the abnormal monitoring data classification task is to classify abnormal monitoring data. It can be to classify abnormal monitoring data for different scenarios, for example, it can classify abnormal data of traffic monitoring data, network monitoring data, health monitoring data, etc. Taking the traffic scenario as an example, the traffic monitoring data is input into the federated model to determine the abnormal data category to which the traffic monitoring data belongs, such as road congestion, road construction, traffic accidents, etc.
[0043] In each scenario, new categories of data often exist, and the model needs to perform incremental learning on the new categories of data. Such learning relies on prior knowledge of data distribution or category structure. Therefore, it is not easy to implement incremental federated learning of classification models in the face of incremental monitoring data of unlabeled categories.
[0044] Based on the above technical problems, the embodiment of the present application proposes a federated learning method in the above scenario, including:
[0045] S210, in the case where there is incremental monitoring data in the execution of the federated learning task, using the known abnormal data category to determine the first data corresponding to the newly added abnormal data category in the incremental monitoring data; wherein the known abnormal data category represents the abnormal monitoring data category corresponding to the sample monitoring data in the federated learning task;
[0046] S220, performing clustering processing on the first data to determine the number of categories of the newly added monitoring data categories;
[0047] S230, determining corresponding pseudo labels according to the number of categories of the newly added abnormal data categories, and marking the first data according to the pseudo labels to obtain marked incremental monitoring data;
[0048] S240. Update parameters of the federated model according to the marked incremental monitoring data to obtain an updated federated model, wherein the federated model is used to identify abnormal data categories of the monitoring data.
[0049] In step S210, illustratively, the federated learning task represents the process of using the federated model to perform the data classification task in the anomaly detection scenario. The federated model is a model pre-trained based on sample monitoring data, and the sample monitoring data includes positive samples and negative samples, which can be pre-collected data or sample data synthesized based on the model, which is not limited here.
[0050] The incremental monitoring data is a data set including monitoring data of the newly added abnormal data category. That is, the incremental monitoring data may be monitoring data of the newly added abnormal data category, or a mixture of monitoring data of the newly added abnormal data category and monitoring data of the known abnormal data category.
[0051] Optionally, the incremental monitoring data is different types of monitoring data in different anomaly detection scenarios. For example, the incremental monitoring data may be traffic monitoring data, network monitoring data, user behavior monitoring data, sensor monitoring data, etc. In this embodiment, in the intelligent traffic scenario, the incremental monitoring data is the newly added traffic monitoring data, which may be road anomaly images taken by cameras on various roads, or road anomaly information uploaded by vehicle users, which is not limited here. The known abnormal data category may be accidents, congestion, road maintenance, etc. In the network security scenario, the incremental monitoring data is the newly added network monitoring data, which may be the collected network anomaly information, and the known abnormal data category may be different types of attack modes. In the medical scenario, the incremental monitoring data is the newly added patient physical examination data, which may be uploaded by the patient himself, or obtained in a physical examination center, and the known abnormal data category may be different types of diseases. In the financial scenario, the incremental monitoring data is the newly added user behavior monitoring data, which may be the consumption behavior of users in various financial institutions, and the known abnormal data category may be consumption anomaly. In manufacturing and logistics scenarios, incremental monitoring data refers to newly added sensor monitoring data, which can come from various factories. The known abnormal data category can be the type of equipment failure.
[0052] Optionally, the existence of incremental monitoring data in the execution of the federated learning task includes determining the monitoring data to be processed as incremental monitoring data when there is monitoring data that cannot be classified by the federated model in the monitoring data to be processed; and / or the monitoring data to be processed carries an incremental mark. Specifically, the incremental mark can be set according to actual conditions and is not limited here.
[0053] Specifically, when there is incremental monitoring data in the execution of a federated learning task, it is determined that the abnormal monitoring data category corresponding to the sample monitoring data in the federated learning task is a known abnormal data category, and the monitoring data belonging to the known abnormal data category is determined in the incremental monitoring data according to the known abnormal data category, and then the monitoring data belonging to the known abnormal data category is filtered out in the incremental monitoring data to obtain the first data corresponding to the newly added abnormal data category.
[0054] In step S220, clustering is illustratively dividing a data set into different classes or clusters according to a certain specific standard (such as a distance criterion), so that the similarity of data in the same cluster is as large as possible, and the difference of data objects not in the same cluster is as large as possible. That is, after clustering, data of the same class are clustered together as much as possible, and different data are separated as much as possible. Clustering processing can be K-Means clustering, mean shift clustering, density-based clustering methods, and maximum expectation (EM) clustering using Gaussian mixture model (GMM) and other parameter-free clustering methods.
[0055] Specifically, K-Means clustering is used to perform clustering processing on the first data to classify the monitoring data in the first data, that is, monitoring data of the same category is a cluster, and the number of clusters is determined as the number of abnormal categories of the newly added monitoring data category.
[0056] In step S230, illustratively, the number of pseudo labels required is determined according to the number of categories of the newly added abnormal data categories. The pseudo labels can be represented by any characters and are set according to actual needs. For example, if the number of categories of the newly added abnormal data categories is 2, two pseudo labels are required, which can be set as the first pseudo label and the second pseudo label respectively. Then, the correspondence between the set pseudo labels and the newly added abnormal data categories is saved, and then the pseudo labels are marked for each monitoring data in the first data according to the above correspondence, so as to obtain the marked first data, and the first data in the incremental monitoring data is updated according to the marked first data to obtain the marked incremental monitoring data.
[0057] In step S240, illustratively, the framework of the federated model includes multiple bottom-level models and top-level models. For the model structure of vertical federated learning, the bottom-level model is that the participant k uses its own bottom-level model f k 0 , extract feature z from the data k For text data, network structures such as Transformer encoder and RNN structure can be used for feature extraction. For other types of data, network structures such as CNN and DNN can also be used. It is also possible to fine-tune the encoder that has been preliminarily trained. In short, this case does not limit the specific network structure, as long as it can effectively encode the features.
[0058] After multiple participants have outputted features, the features are aggregated. That is, the participants use technologies such as secure multi-party computing or homomorphic encryption to securely share feature information. These technologies can ensure that the specific data of each party is not leaked during the calculation process. Local features can be spliced, stacked, or aggregated in more complex ways.
[0059] The purpose of the top-level model is to learn the relationship between the features extracted from different data sources and complete the final federated task. The coordinator or a designated participant collects the encrypted features and trains the top-level model on these aggregated features. For the model structure of horizontal federated learning, after training the bottom-level model, each participant only needs to upload the model parameters and aggregate and update them on the central server.
[0060] The vertical federated model training method is as follows: each participant uses its own data to independently train its own underlying model. This step is performed entirely locally, without sharing data or model details with other participants. Each participant shares the model's feature output to the top model in a secure manner. The top model is responsible for integrating the information provided by all participants, performing global optimization, and generating feedback (for example, gradient information or model error) to each participant. This process involves some secure computing techniques to ensure that the information sharing process does not leak the data of the participants. The above process is repeated in multiple training rounds, and each participant further updates its underlying model based on the feedback provided by the top model to better match the optimization goal of the global model. When the model performance reaches a satisfactory level or the preset number of training rounds is reached, the training process terminates. The horizontal federated model training method differs from the vertical federated model training method in that feature aggregation is not required, but parameter aggregation is performed in the central server.
[0061] Specifically, the labeled incremental monitoring data is input into the federated model for iterative optimization, that is, the labeled incremental monitoring data is input into each underlying model for feature extraction to obtain data features. The data features are then input into the top model for classification training, the top model is optimized according to the loss of the training results, and feedback (for example, gradient information or model error) is generated and provided to each underlying model, so that each underlying model further updates parameters according to the feedback provided by the top model, thus obtaining an updated federated model that can identify more abnormal situations.
[0062] In the technical solution of the present application, when there is incremental monitoring data in the execution of a federated learning task, the first data corresponding to the newly added abnormal data category is determined in the incremental monitoring data using the known abnormal data category; wherein the known abnormal data category represents the abnormal monitoring data category corresponding to the sample monitoring data in the federated learning task; the first data is clustered to determine the number of categories of the newly added monitoring data category; the corresponding pseudo-label is determined according to the number of categories of the newly added abnormal data category, and the first data is labeled according to the pseudo-label to obtain the labeled incremental monitoring data; the parameters of the federal model are updated according to the labeled incremental monitoring data to obtain the updated federal model. In this way, there is no need to perform category labeling on the incremental monitoring data, and the labeling of the abnormal category can still be achieved, thereby updating the monitoring data of the federal model, so that the updated federal model can identify more abnormal situations. This gets rid of the dependence of the new data on manual labeling, so that it can adapt to the data update needs in the anomaly detection scenario.
[0063] In one embodiment, the determining, in the incremental monitoring data, first data corresponding to a newly added abnormal data category by using a known abnormal data category includes:
[0064] Determine candidate data belonging to the known abnormal data category in the incremental monitoring data by using the similarity between the center point corresponding to each known abnormal data category and the incremental monitoring data;
[0065] The first data corresponding to the newly added abnormal data category is determined in the incremental monitoring data according to the candidate data belonging to the known abnormal data category.
[0066] Exemplarily, the center point corresponding to each known abnormal data category represents a vector that can represent the abnormal data category. Optionally, the center point corresponding to each known abnormal data category can be obtained by performing feature extraction on the sample monitoring data of each known abnormal data category to obtain the sample monitoring data features of each known abnormal data category. A point is selected from the sample monitoring data features of each known abnormal data category as its center point.
[0067] Preferably, the method for determining the center point corresponding to each known abnormal data category includes:
[0068] Feature extraction is performed on the sample monitoring data of each known abnormal data category to obtain the sample monitoring data features of each known abnormal data category; and the corresponding center point of each known abnormal data category is determined among the candidate center points using the similarity between the sample monitoring data features of each known abnormal data category and the candidate center points.
[0069] Exemplarily, the candidate center points are several points pre-set for each known abnormal data category, which can be randomly selected from the sample monitoring data corresponding to each known abnormal data category. It is also possible to map each sample monitoring data corresponding to each known abnormal data category according to a preset formula, and use all mapping results as the candidate center points of each known abnormal data category. It is also possible to extract features from the sample monitoring data corresponding to each known abnormal data category, and then input the extracted features into the center point determination model to output the center point of each known abnormal data category. The center point determination model is pre-trained based on the sample monitoring data and the corresponding center point samples.
[0070] In this embodiment, since each known abnormal data category needs to have a proxy anchor point (i.e., center point) P 0 , whose number is the number of categories of known abnormal data categories |y 0 |.
[0071] Therefore, the underlying model f 0 For the sample data set D 0 Extract features from the sample monitoring data in the image to obtain the embedding vector z corresponding to each sample monitoring data. Then use p = g 0(z) Map z to each proxy anchor point. Then define the loss function for training. The loss function can aggregate p and its different but strongly positive data together, and separate p and its similar but strongly negative data. The formula is:
[0072]
[0073] Among them, δ>0 is the marginal value, α>0 is the scaling factor, s(·,·) represents the cosine similarity, and Z 0 The embedding vector corresponding to the sample monitoring data. 0+ represents the surrogate anchors of the same category in the batch (e.g., positive), represents the same class embedding point as the proxy anchor point p. Each proxy anchor point p will be embedded in the vector Z 0 The set is divided into and It should be noted that for vertical federated learning and horizontal federated learning, each participant needs to train a proxy anchor for feature data.
[0074] Furthermore, after determining the center point corresponding to each known abnormal data category, since it is necessary to distinguish between the known abnormal data categories and the newly added abnormal data categories in the incremental monitoring data, each monitoring data in the incremental monitoring data is first input into the underlying model for feature extraction to obtain the corresponding feature data (i.e., embedding vector), and then the cosine similarity between the center point corresponding to each known abnormal data category and the feature data corresponding to each monitoring data in the above incremental monitoring data is calculated. If the calculated cosine similarity is greater than a preset similarity threshold, it is candidate data belonging to the known abnormal data category, wherein the similarity threshold is set according to actual conditions and is not limited here. After determining the candidate data belonging to the known abnormal data category, the candidate data belonging to the known abnormal data category is filtered out in the incremental monitoring data to obtain the first data corresponding to the newly added abnormal data category. In this way, the classification of the incremental monitoring data can still be achieved without manual labeling.
[0075] In one embodiment, determining first data corresponding to a newly added abnormal data category in the incremental monitoring data according to the candidate data belonging to the known abnormal data category includes:
[0076] Screening out candidate data belonging to the newly added abnormal data category from the incremental monitoring data according to the candidate data belonging to the known abnormal data category;
[0077] Noise detection is performed on the candidate data belonging to the newly added abnormal data category and the candidate data belonging to the known abnormal data category, and the candidate data belonging to the newly added abnormal data category and the candidate data belonging to the known category are classified according to the noise detection result to obtain second data corresponding to the known abnormal data category and first data corresponding to the newly added abnormal data category.
[0078] Exemplarily, noise detection is used to determine whether there is noise in the candidate data belonging to the newly added abnormal data category and the candidate data belonging to the known abnormal data category. If there is no noise, it means that the category division is accurate, and if there is noise, it means that the category division is inaccurate. Specifically, after determining the candidate data belonging to the known abnormal data category, the candidate data belonging to the known abnormal data category is filtered out in the incremental monitoring data to obtain the candidate data belonging to the newly added abnormal data category. A classifier can then be used to perform noise judgment on the candidate data belonging to the newly added abnormal data category and the candidate data belonging to the known abnormal data category. The candidate data with noise is cleaned and classified again, and the category division result of the candidate data without noise is retained to obtain the second data corresponding to the known abnormal data category and the first data corresponding to the newly added abnormal data category. In this way, the influence of noise on the analogy division result is avoided, making the category division more accurate.
[0079] In this embodiment, the above classification division and pseudo-label annotation execution process for vertical federated learning and horizontal federated learning are the same.
[0080] like Figure 3 As shown, pre-division is performed first to calculate the proxy anchor point P for each known anomaly category. 0 The embedding vector (i.e., feature data) z corresponding to each monitoring data in the incremental monitoring data i =f 0 (x i )∈Z 1 The cosine similarity of the proxy anchor point set P 0 Represents a known anomaly category, and the maximum similarity score is greater than the threshold λ z i It is classified as a known abnormal category. Let ∈ = 0 represent the median of the indicator range, and the pre-division process is:
[0081]
[0082] Then, the categories are divided again. Since the pre-segmentation may be affected by noise and lead to inaccurate division, in order to perform category division more effectively, a multi-layer perceptron is used to detect noise on the embedding vector corresponding to each monitoring data in the incremental monitoring data. The noisy embedding vector is cleaned and the pseudo-label is reallocated.
[0083] The training method of the multilayer perceptron includes iterative training of the multilayer perceptron classifier m(·) on the binarized dataset, and the segmentation network loss is defined as:
[0084]
[0085] Among them, z c is the clean embedding vector, For clean vector collection. After pre-training, the classifier is trained with the reallocated pseudo labels and data with more cleaning times, and the classifier is divided with the Gaussian mixture model to improve the classification accuracy of the classifier.
[0086] Furthermore, by inputting the second data corresponding to the known abnormal data categories into the federated model, the categories of the second data can be determined, and then the number of pseudo labels is set according to the number of abnormal data categories, and the second data are labeled with the pseudo labels in turn. The first data corresponding to the newly added abnormal data categories are assigned pseudo labels using the parameter-free K-Means clustering method, and other parameter-free clustering methods can also be used instead. Finally, the estimated value of the number of categories of the newly added abnormal data categories is obtained from the clustering results.
[0087] In one embodiment, updating the parameters of the federation model according to the marked incremental monitoring data to obtain an updated federation model includes:
[0088] The parameters of the federated model are optimized using the labeled incremental monitoring data and a preset loss function to obtain an updated federated model; wherein the preset loss function at least includes a first loss function composed of the similarities between the known abnormal data categories and the newly added abnormal data categories and the incremental monitoring data respectively.
[0089] Exemplarily, the labeled incremental monitoring data is input into the federated model for category classification training, the embedding vector corresponding to each monitoring data output by the underlying model is substituted into the first loss function, the top model is optimized by the result of the first loss function, and feedback (for example, gradient information or model error) is generated and provided to each underlying model, so that each underlying model further updates parameters according to the feedback provided by the top model, thereby realizing data update of the federated model.
[0090] Specifically, since it is incremental data learning, it is necessary to improve the model's performance in discovering new categories, update the model, and set the first loss function:
[0091]
[0092] Among them, δ>0 is the marginal value, α>0 is the scaling factor, s(·,·) represents the cosine similarity, and Z 1 The embedding vector corresponding to each monitoring data in the incremental monitoring data. 1+ represents the surrogate anchors of the same category in the batch (e.g., positive), represents an embedding point of the same class as the proxy anchor point p.
[0093] Preferably, the preset loss function also includes:
[0094] Determine the known abnormal data category features corresponding to the center points of the known abnormal data categories according to the Gaussian distribution;
[0095] The known abnormal data category features are calculated according to the first loss function to generate a second loss function.
[0096] Exemplarily, the preset loss function is a fusion of the first loss function and the second loss function. For example, the preset loss function is the sum of the first loss function and the second loss function, or can be obtained by weighted calculation of the first loss function and the second loss function.
[0097] The labeled incremental monitoring data is input into the federated model for category classification training, and the embedding vector corresponding to each monitoring data output by the underlying model is substituted into the first loss function and the second loss function, and the result of the preset loss function is calculated. The top-level model is optimized according to the above results, and feedback (for example, gradient information or model error) is generated and provided to each underlying model, so that each underlying model can further update the parameters according to the feedback provided by the top-level model, thereby realizing the data update of the federated model. In this way, the federated model is optimized from two aspects: model updating and avoiding forgetting old features, so that the updated federated model can more accurately classify abnormal data.
[0098] Specifically, the loss function not only needs to improve the model's performance in discovering new categories, but also needs to prevent old features from being forgotten. Therefore, feature backtracking is used to alleviate catastrophic forgetting. 0 ,σ 2 ),p 0 ∈P 0 To generate features using the center point (i.e., proxy anchor) of each known abnormal data category. The generated features are concatenated into a batch and the model and the center point determination model are trained using the following loss function:
[0099]
[0100] Preferably, the preset loss function also includes:
[0101] The third loss function is obtained by comparing the data features obtained by extracting the sample monitoring data using the federated model with the data features obtained by extracting the sample monitoring data using the updated federated model.
[0102] Exemplarily, the preset loss function is a fusion of the first loss function, the second loss function and the third loss function. For example, the preset loss function is the sum of the first loss function, the second loss function and the third loss function, or it can be obtained by weighted calculation of the first loss function, the second loss function and the third loss function.
[0103] Using the current underlying model f 1 and the previous underlying model f 0 Distillation of the embedding vector extracted from . The distillation loss L kd The description is as follows:
[0104]
[0105] Among them, z o Represents a fixed previous feature network f 0 The embedding vector of . express Incremental monitoring data.
[0106] The default loss function is:
[0107]
[0108] Specifically, Figure 4 As shown in the figure, taking the unsupervised incremental learning framework in the vertical federated learning scenario as an example, assuming that there are K local clients C1, C2, …, C K As a participant, the kth participant C k Contains a sample monitoring data D k =*x k ,y+,where D=*D1∪D2…∪D K + indicates that the features held by different participants together form a complete feature. Each participant needs to train an underlying model based on its own feature data and upload the trained features of the tth round to the central server (i.e. Figure 4 In the vertical federation scenario, one of the participants is pre-selected as the coordinator and needs to provide class labels for training with aggregated features. The training goal is to minimize the aggregation loss. In addition, for horizontal federated learning, there is no need to select a coordinator. It is only necessary to aggregate the local model parameters in the central server. In this way, a trained federated model is obtained.
[0109] If there is incremental monitoring data in the execution of the federated learning task, each monitoring data in the incremental monitoring data is first input into the underlying model for feature extraction to obtain the corresponding feature data (i.e., embedding vector), and then the cosine similarity between the center point corresponding to each known abnormal data category and the feature data corresponding to each monitoring data in the above incremental monitoring data is calculated. If the calculated cosine similarity is greater than the preset similarity threshold, it is the candidate data belonging to the known abnormal data category. After determining the candidate data belonging to the known abnormal data category, the candidate data belonging to the known abnormal data category is filtered out in the incremental monitoring data to obtain the candidate data belonging to the newly added abnormal data category. Then, a classifier can be used to perform noise judgment on the candidate data belonging to the newly added abnormal data category and the candidate data belonging to the known abnormal data category. The candidate data with noise is re-cleaned and classified, and the category division results of the candidate data without noise are retained to obtain the second data corresponding to the known abnormal data category (i.e., Figure 4 old data in the ) and the first data corresponding to the newly added abnormal data category (i.e. Figure 4 The first data is clustered to determine the number of categories of the newly added monitoring data category, pseudo labels are set according to the number of categories, and the first data is labeled in sequence. The second data is input into the federated model to determine the number of categories of the known abnormal data category of the second data, pseudo labels are set according to the number of categories, and the second data is labeled in sequence, so as to obtain the labeled incremental monitoring data.
[0110] Finally, the labeled incremental monitoring data is input into the federated model for category classification training, the top model is optimized through a preset loss function, and feedback (e.g., gradient information or model error) is generated and provided to each bottom model, so that each bottom model further updates parameters according to the feedback provided by the top model, thereby realizing data update of the federated model. In addition, since the federated model is optimized from two aspects, namely, model update and avoiding forgetting old features, the updated federated model can more accurately classify abnormal data.
[0111] In this way, by using the above method to perform incremental learning and applying unsupervised incremental learning in a federated learning environment, the generalization ability of the model can be enhanced by using data from different devices, especially when processing unlabeled data and discovering new categories. At the same time, the model can be incrementally updated on different devices without sharing local data on the device or new data, thus protecting the privacy of users.
[0112] Moreover, continuous generalized new category discovery in federated scenarios eliminates the constraint that unlabeled data only belongs to new categories, making incremental learning in federated scenarios more widely used. At the same time, there is no need to know the number of new categories or the proportion of new category data in advance, so that the model can adapt to data changes more flexibly, get rid of the dependence of new data on manual labeling, and reduce manual labeling costs. Unlabeled data is divided into known abnormal data categories and new abnormal data categories, and examples based on deep metrics are used to alleviate catastrophic forgetting. This improves the effectiveness of incremental learning in federated scenarios.
[0113] Exemplary Devices
[0114] Accordingly, Figure 5 is a schematic diagram of a federated learning device according to an embodiment of the present application. In an exemplary embodiment, a federated learning device is provided, comprising:
[0115] A determination module 510 is used to determine, when there is incremental monitoring data in the execution of a federated learning task, first data corresponding to a newly added abnormal data category in the incremental monitoring data using a known abnormal data category; wherein the known abnormal data category represents an abnormal monitoring data category corresponding to the sample monitoring data in the federated learning task;
[0116] A clustering module 520, configured to perform clustering processing on the first data to determine the number of categories of the newly added monitoring data category;
[0117] A marking module 530 is used to determine corresponding pseudo labels according to the number of categories of the newly added abnormal data categories, and mark the first data according to the pseudo labels to obtain marked incremental monitoring data;
[0118] The training module 540 is used to update the parameters of the federated model according to the labeled incremental monitoring data to obtain an updated federated model, wherein the federated model is used to identify abnormal data categories of the monitoring data.
[0119] In one implementation, the determination module 510 includes:
[0120] A first processing module, configured to determine candidate data belonging to a known abnormal data category in the incremental monitoring data by using a similarity between a center point corresponding to each known abnormal data category and the incremental monitoring data;
[0121] The second processing module is used to determine the first data corresponding to the newly added abnormal data category in the incremental monitoring data according to the candidate data belonging to the known abnormal data category.
[0122] In one embodiment, the second processing module is further used to:
[0123] Screening out candidate data belonging to the newly added abnormal data category from the incremental monitoring data according to the candidate data belonging to the known abnormal data category;
[0124] Noise detection is performed on the candidate data belonging to the newly added abnormal data category and the candidate data belonging to the known abnormal data category, and the candidate data belonging to the newly added abnormal data category and the candidate data belonging to the known category are classified according to the noise detection result to obtain second data corresponding to the known abnormal data category and first data corresponding to the newly added abnormal data category.
[0125] In one embodiment, a method for determining a center point corresponding to each known abnormal data category includes:
[0126] Extract features from the sample monitoring data of each known abnormal data category to obtain features of the sample monitoring data of each known abnormal data category;
[0127] The corresponding center point of each known abnormal data category is determined among the candidate center points by using the similarity between the sample monitoring data features of each known abnormal data category and the candidate center points.
[0128] In one embodiment, the training module 540 includes:
[0129] An updating module is used to optimize the parameters of the federated model using the marked incremental monitoring data and a preset loss function to obtain an updated federated model; wherein the preset loss function at least includes a first loss function composed of the similarities between the known abnormal data categories and the newly added abnormal data categories and the incremental monitoring data respectively.
[0130] In one embodiment, the preset loss function further includes:
[0131] Determine the known abnormal data category features corresponding to the center points of the known abnormal data categories according to the Gaussian distribution;
[0132] The known abnormal data category features are calculated according to the first loss function to generate a second loss function.
[0133] In one embodiment, the preset loss function further includes:
[0134] The third loss function is obtained by comparing the data features obtained by extracting the sample monitoring data using the federated model with the data features obtained by extracting the sample monitoring data using the updated federated model.
[0135] The federated learning device provided in this embodiment belongs to the same application concept as the federated learning method provided in the above embodiments of this application, can execute the federated learning method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the federated learning method. For technical details not fully described in this embodiment, please refer to the specific processing content of the federated learning method provided in the above embodiments of this application, which will not be repeated here.
[0136] The functions implemented by the above determination module 510, clustering module 520, labeling module 530 and training module 540 can be implemented by the same or different processors respectively, which is not limited in the embodiment of the present application.
[0137] It should be understood that the modules in the above devices can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the unit in the device can be implemented in the form of a hardware circuit, and the functions of some or all units can be realized by designing the hardware circuit. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by a configuration file, so as to realize the functions of some or all of the above units. All units of the above devices can be implemented in the form of a processor calling software, or in the form of a hardware circuit, or in part by a processor calling software, and the remaining part is implemented in the form of a hardware circuit.
[0138] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.
[0139] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
[0140] In addition, all or part of the units in the above device can be integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.
[0141] Exemplary Electronic Devices
[0142] Another embodiment of the present application also provides an electronic device, see Figure 6 As shown, the device includes:
[0143] Memory 600 and processor 610;
[0144] The memory 600 is connected to the processor 610 and is used to store programs;
[0145] The processor 610 is configured to implement the dialog response processing method disclosed in any of the above embodiments by running the program stored in the memory 600 .
[0146] Specifically, the electronic device may further include: a bus, a communication interface 620 , an input device 630 and an output device 640 .
[0147] The processor 610, the memory 600, the communication interface 620, the input device 630 and the output device 640 are connected to each other via a bus.
[0148] A bus may include a pathway that transfers information between components of a computer system.
[0149] The processor 610 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0150] The processor 610 may include a main processor, and may also include a baseband chip, a modem, and the like.
[0151] The memory 600 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 600 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.
[0152] The input device 630 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.
[0153] Output device 640 may include a device that allows information to be output to a user, such as a display screen, printer, speaker, etc.
[0154] The communication interface 620 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.
[0155] The processor 610 executes the program stored in the memory 600 and calls other devices, which can be used to implement each step of any federated learning method provided in the above embodiments of the present application.
[0156] Exemplary computer program products and storage media
[0157] In addition to the above-mentioned method and device, an embodiment of the present application may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes each step of the federated learning method provided in the above-mentioned embodiment.
[0158] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0159] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes each step of the federated learning method provided in the above embodiment.
[0160] The computer readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0161] Specifically, the specific working contents of each part of the above-mentioned electronic device, computer program product and storage medium, as well as the specific processing contents of the computer program product or the computer program on the above-mentioned storage medium when being executed by the processor, can all be found in the contents of the various embodiments of the above-mentioned federated learning method, which will not be repeated here.
[0162] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0163] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0164] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
[0165] The modules and sub-modules in the devices and terminals in the various embodiments of the present application can be combined, divided and deleted according to actual needs.
[0166] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, such as multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0167] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0168] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.
[0169] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0170] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0171] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0172] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A federated learning method, characterized in that: include: In the case where there is incremental monitoring data in the execution of a federated learning task, first data corresponding to a newly added abnormal data category is determined in the incremental monitoring data using a known abnormal data category; wherein the known abnormal data category represents an abnormal monitoring data category corresponding to the sample monitoring data in the federated learning task; Performing clustering processing on the first data to determine the number of categories of the newly added monitoring data category; Determine corresponding pseudo labels according to the number of categories of the newly added abnormal data categories, and mark the first data according to the pseudo labels to obtain marked incremental monitoring data; The parameters of the federated model are updated according to the marked incremental monitoring data to obtain an updated federated model, wherein the federated model is used to identify abnormal data categories of the monitoring data.
2. The method according to claim 1, characterized in that The determining, in the incremental monitoring data, first data corresponding to the newly added abnormal data category by using the known abnormal data category includes: Determine candidate data belonging to the known abnormal data category in the incremental monitoring data by using the similarity between the center point corresponding to each known abnormal data category and the incremental monitoring data; The first data corresponding to the newly added abnormal data category is determined in the incremental monitoring data according to the candidate data belonging to the known abnormal data category.
3. The method according to claim 2, characterized in that The determining, in the incremental monitoring data, first data corresponding to the newly added abnormal data category according to the candidate data belonging to the known abnormal data category includes: Screening out candidate data belonging to the newly added abnormal data category from the incremental monitoring data according to the candidate data belonging to the known abnormal data category; Noise detection is performed on the candidate data belonging to the newly added abnormal data category and the candidate data belonging to the known abnormal data category, and the candidate data belonging to the newly added abnormal data category and the candidate data belonging to the known category are classified according to the noise detection result to obtain second data corresponding to the known abnormal data category and first data corresponding to the newly added abnormal data category.
4. The method according to claim 2, characterized in that: The method for determining the center point corresponding to each known abnormal data category includes: Extract features from the sample monitoring data of each known abnormal data category to obtain features of the sample monitoring data of each known abnormal data category; The corresponding center point of each known abnormal data category is determined among the candidate center points by using the similarity between the sample monitoring data features of each known abnormal data category and the candidate center points.
5. The method according to claim 1, characterized in that The method of updating the parameters of the federated model according to the marked incremental monitoring data to obtain an updated federated model includes: The parameters of the federated model are optimized using the labeled incremental monitoring data and a preset loss function to obtain an updated federated model; wherein the preset loss function at least includes a first loss function composed of the similarities between the known abnormal data categories and the newly added abnormal data categories and the incremental monitoring data respectively.
6. The method according to claim 5, characterized in that The preset loss function also includes: Determine the known abnormal data category features corresponding to the center points of the known abnormal data categories according to the Gaussian distribution; The known abnormal data category features are calculated according to the first loss function to generate a second loss function.
7. The method according to claim 5 or 6, characterized in that: The preset loss function also includes: The third loss function is obtained by comparing the data features obtained by extracting the sample monitoring data using the federated model with the data features obtained by extracting the sample monitoring data using the updated federated model.
8. A federated learning device, characterized in that: include: A determination module, configured to determine, when there is incremental monitoring data in the execution of a federated learning task, first data corresponding to a newly added abnormal data category in the incremental monitoring data using a known abnormal data category; wherein the known abnormal data category represents an abnormal monitoring data category corresponding to the sample monitoring data in the federated learning task; A clustering module, used to perform clustering processing on the first data to determine the number of categories of the newly added monitoring data categories; A marking module, used to determine corresponding pseudo labels according to the number of categories of the newly added abnormal data categories, and mark the first data according to the pseudo labels to obtain marked incremental monitoring data; The training module is used to update the parameters of the federated model according to the labeled incremental monitoring data to obtain an updated federated model, wherein the federated model is used to identify abnormal data categories of the monitoring data.
9. An electronic device, characterized in that: include: Memory and processor; The memory is connected to the processor and is used to store programs; The processor implements the federated learning method as claimed in any one of claims 1 to 7 by running the program in the memory.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the federated learning method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the federated learning method according to any one of claims 1 to 7.
