A business identification method based on federated learning
By adopting a federated learning-based business recognition method in the Internet of Things and mobile Internet environments, and using edge collaborative systems and deep learning classifiers, the problem of large differences in business recognition detector parameters caused by the rapid changes in wireless router data is solved, and high-precision and real-time service type recognition is achieved, reducing system complexity and data interaction costs.
Patent Information
- Application Number
- CN202210710164.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-06-22
AI Technical Summary
The prior art is difficult to flexibly respond to the rapid changes in wireless router data in the Internet of Things and mobile Internet environments, resulting in large differences in service identification detector parameters, making it difficult to achieve real-time and high-precision service type identification.
The business recognition method based on federated learning is adopted, and the business recognition accuracy and generalization ability of business recognition are improved by building an edge collaborative system, using deep learning classifiers to train models, and aggregating and updating models through synchronous or asynchronous interaction mechanisms.
It improves the accuracy of the terminal for abnormal detection, reduces the overall complexity of the system and the cost of data interaction, solves the problem of excessive dependence on centralized servers in centralized solutions, and improves the stability and performance of the system.
Smart Images

Figure CN115278570B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of communication networks and relates to a service type identification method, and specifically to a service identification method based on federated learning. Background Art
[0002] Since wireless router data in different regions is relatively simple in quantity and type, the parameters of different wireless router service identification detectors vary greatly, making it difficult to flexibly respond to the rapidly changing data streams in the Internet of Things or mobile Internet environment. These issues have brought huge challenges to network operators, such as how to reasonably allocate network resources, deploy service quality control mechanisms, optimize network infrastructure architecture, and improve user service satisfaction.
[0003] Traditional service type identification methods include service identification methods based on network port mapping, service identification methods based on payload analysis, and service identification methods based on behavioral characteristics. The service identification method based on network port mapping determines the protocol type of the application service by obtaining the port number of data transmission, and then identifies the network service to which the corresponding data traffic belongs. However, the dynamic port technology used in the current P2P protocol has long destroyed the one-to-one mapping relationship between the fixed port number and the application service; the service identification method based on deep packet inspection (DPI) is adapted to the complex network environment. This method can match the typical characteristics of each application protocol according to the traffic load characteristics, so as to achieve the purpose of network service identification. However, the service identification technology based on DPI has a large computational overhead, the service identification time is too long, and the real-time performance is not high. In addition, the service identification based on DPI also involves the infringement of user privacy, and the identification accuracy does not meet the expected requirements.
[0004] As a distributed machine learning paradigm, federated learning can effectively solve the problem of data silos, allowing participants to jointly model without sharing data, technically breaking data silos and achieving AI collaboration. Federated transfer learning makes federated learning more universal, and can play a role in different data structures and different institutions without field and algorithm restrictions. It also has the advantages of intact model quality, privacy protection, and data security. Since data is not transferred, it will not leak user privacy or affect data specifications. This fully demonstrates the scientificity and effectiveness of federated learning in handling classification tasks, so federated learning also provides the possibility of solving application business identification problems.
[0005] The patent application with application number 202111220431.5 discloses a method for identifying business types based on cloud-edge collaborative federated learning. The cloud-edge collaborative platform constructed by the method for identifying business types based on cloud-edge collaborative federated learning includes multiple edge servers. Each edge server captures multiple data streams containing different business types that the terminal requests flow through, and iteratively trains the global model based on federated learning, thereby expanding the data set range of the data stream, and thus obtaining a global model with stronger generalization ability. However, the centralized federated learning scheme used in this method is overly dependent on the central server. When the central server fails, the federated learning training will not be able to proceed normally; at the same time, the federated learning mechanism adopted by this method enables each client to participate in the training, and a large amount of data interaction increases the data interaction cost and the overall complexity of the system. Summary of the invention
[0006] In view of the above-mentioned problems, the present invention provides a service identification method based on federated learning. According to different system performance requirements and computing consumption requirements, the present invention provides different distributed federated learning interaction mechanisms. By inputting local data into a deep learning classifier, the classifier is trained, and then the trained classifier parameters are interacted and combined with other wireless routers, the accuracy of the terminal's detection of anomalies is improved. By interacting and integrating the models of various routers, the purpose of improving the overall performance of the system is achieved.
[0007] The technical solution adopted by the present invention to solve the above technical problems is as follows:
[0008] A business identification method based on federated learning includes the following steps:
[0009] Step 1: Build an edge collaborative system consisting of several wireless routers as edge terminals, where each wireless router is equipped with an edge initial dataset and an edge initial neural network classifier;
[0010] Step 2: Collect network traffic data sets through several wireless routers in the edge collaborative system, and process the collected data sets into the data set format required for training the model;
[0011] Step 3: According to different business needs, different distributed federated learning mechanisms are selected to train the initial model, and the global model is obtained through aggregation and update;
[0012] Step 4: putting the global model trained in step 3 into the service identification classifier model library as different algorithms contained in the service identification classifier model library, and then selecting different algorithms in the service identification classifier model library according to different identified service types;
[0013] Step 5: Through the collaborative training method of federated learning, the data flow features identified by many routers participating in the training are merged and deployed to more routers, so that each router can identify all business types and enhance the generalization ability of the recognition model.
[0014] Furthermore, the specific content of processing the collected data set into the data set format required by the training model includes: preprocessing the captured data set and performing feature extraction, removing redundant features irrelevant to the category attributes, dividing it into a training set one and a validation set one, performing feature extraction on the training set one, removing redundant features irrelevant to the category attributes and putting them as a feature set into the established sample database.
[0015] The different distributed federated learning mechanisms described in step 3 include a synchronous interaction mechanism and an asynchronous interaction mechanism, and the synchronous interaction mechanism and the asynchronous interaction mechanism are specifically as follows:
[0016] (1) Synchronous interaction mechanism: At the beginning of each round of training the initial model, each wireless router user participates in the training and trains the local data to obtain the initial model. Each edge terminal simultaneously transmits the local model to all other wireless router users. Each edge terminal weights and fuses the received model parameters with its own parameters to achieve the update of each edge terminal model.
[0017] The overall optimization goal of the synchronous interactive federated learning model is:
[0018] in
[0019] where f i (ω)=l(x i ,y i ;ω) that is (x i ,y i ) is the loss function under the neural network model parameter ω. Assuming that K edges participate in each round of training, is the data index set of the kth edge participating in the training. k is the number of samples participating in the training at the edge, then the optimization objective becomes:
[0020] in
[0021] In this synchronous interaction mechanism, the model weight parameters of different wireless routers simultaneously participate in the model fusion weighted average Optimize the objective function, continuously improve the accuracy of the system's anomaly detection, and feed back information to other edge nodes. According to different anomaly types, take protection strategies against network attacks and system anomalies;
[0022] (2) Asynchronous interaction mechanism: At the beginning of each round of training of the initial model, m wireless router users are randomly selected to participate in the training. The local data is trained to obtain the initial model. Each selected wireless router transmits the model to other edge terminals. Other edge terminals weightedly fuse the received model parameters with their own parameters to update the models of each wireless router. This process is repeated several times for multiple rounds of iterations to continuously improve the overall performance of the system.
[0023] Compared with the above synchronous interaction mechanism, the optimization goal of the asynchronous interaction mechanism remains unchanged. However, since the model parameters and times received by different wireless routers may be different, the weighted average method of the model weight parameters of different edge terminals is as follows: Where w i For this wireless router, the original weight, w tj The weight parameters of the other m edge models participating in the training received by this node.
[0024] Select different distributed federated learning mechanisms according to different business needs. When the business needs require stable and rapid convergence of the overall model, select the synchronous interaction mechanism; when the business needs require the interaction cost of a large amount of data and the overall complexity of the system, select the asynchronous interaction mechanism.
[0025] Furthermore, when the synchronous interaction mechanism is selected in step 3, the specific steps for obtaining the global model are as follows:
[0026] (3A) Initial model training phase: At the beginning of each round of model training, each wireless router participates in the training and trains the local data to obtain the initial model;
[0027] (3B) Global model training stage: Based on the initial model trained in step (3A), each edge terminal transmits the initial model to all other wireless routers at the same time, and each edge terminal weights and fuses the received initial model parameters with its own parameters to update the models of each edge terminal;
[0028] (3C) Federated learning aggregates and updates the recognition model to achieve global model training without leaking private data.
[0029] Furthermore, when the asynchronous interaction mechanism is selected in step 3, the specific steps of obtaining the global model are as follows:
[0030] (3a) Initial model training phase: At the beginning of each round of model training, m wireless router users are randomly selected to participate in the training, and the local data is trained to obtain the initial model;
[0031] (3b) Global model training phase: Each selected wireless router transmits the initial model to other edge terminals, and other edge terminals perform weighted fusion of the received initial model parameters with their own parameters to implement the update of each wireless router model;
[0032] (3c) Federated learning aggregates and updates the recognition model, achieving global model training without leaking private data.
[0033] Furthermore, the different algorithms described in step 4 include deep learning CNN algorithm model, XGBoost model, and graph neural network GCN algorithm model; for images or other data with massive variables, the deep learning CNN algorithm model is selected; for tabular data with a small number of variables, the trained XGBoost model is selected; for graph structures, or topological structures, such as social networks, chemical molecular structures, and knowledge graph data, the graph neural network GCN algorithm model is selected.
[0034] Furthermore, the specific steps of establishing the deep learning CNN algorithm model are as follows:
[0035] Step 1) Process the data set required for specific algorithm model training
[0036] (1a) performing preliminary processing on a data set formed by collecting network traffic through a plurality of wireless routers in the edge collaborative system to form a preliminary processed training set 2;
[0037] (1b) Load the training set 2 processed above and label it, such as the four business types of game, video, social and web browsing corresponding to labels 0, 1, 2 and 3 respectively;
[0038] (1c) Extract keywords from the text, sort the top 2000 words with the highest frequency, and create a token dictionary. For example, TCP protocol appears the most frequently, so it is ranked as 1. The token dictionary is used to convert “text” into a “number list”, with 1 representing TCP protocol.
[0039] (1d) Truncate and pad the length of all number lists to 64. If the length exceeds 64, the information at the end will be truncated. If the length of byte information is less than 64, zeros will be added to the end to make the length reach 64, ensuring that each text has the same length;
[0040] (1e) Finally, the Embedding layer is used to convert the "number list" into a "vector list", and the second training set required for CNN model training is processed.
[0041] Step 2) Build a CNN convolutional neural network
[0042] The CNN neural network in this paper uses a one-dimensional model based on CNN, including four convolutional layers Conv, two maximum pooling layers, two fully connected layers, and one softmax layer; the number of neurons in Conv1 and Conv2 is 256, the kernel size is 3, and the all-zero padding step is 1. The number of neurons in Conv3 and Conv4 is 128, the kernel size is 2, the all-zero padding step is 1, the two maximum pooling layer kernels are 2, the padding step is 2, and the number of neurons in the two fully connected layers is 128; each pooling layer trained in the CNN model is finally batch normalized, the activation function used in the four convolutional layers is the ReLU function, the maximum 30 epochs when training the model Adam optimization algorithm, and the learning rate is 0.001; this network uses early stopping, that is, when the training is within 5 epochs, the loss function does not improve, and the training is terminated; the results of this network are based on 10-fold cross validation.
[0043] Step 3) inputting the CNN training set processed in step 1) into the CNN convolutional neural network constructed in step 2) for training to obtain a CNN algorithm model;
[0044] Step 4) Save the trained CNN algorithm model to the business identification classifier model library.
[0045] Furthermore, step 5 also includes merging the data flow features identified by many routers participating in the online training to improve the real-time performance of business identification, automatically updating the model according to the evolution of the business, and improving the decline in the accuracy of the recognition model caused by the business update, so that the recognition rate of the recognition model is maintained at a high level for a long time; at the same time, by deploying the identified data flow features to more routers, the generalization ability of the recognition model can be enhanced.
[0046] Furthermore, the business types include game, video, social and WEB browsing; the game, video, social and WEB browsing business types correspond to four data streams of Tencent Games, Douyin, WeChat and Weibo respectively.
[0047] The technical solution of the present invention can produce the following technical effects:
[0048] 1. The present invention adopts an edge collaborative system to input local data into a deep learning neural network for training, and then interacts and combines the trained model parameters with other wireless routers. Under the premise of protecting user data privacy, the model is aggregated and executed locally. Each client broadcasts its local model to other clients while also receiving model parameters broadcast by other clients, thereby improving the accuracy of terminal detection of anomalies. According to the detection results, external and abnormal terminals can be processed accordingly, in order to achieve the purpose of improving the overall performance of the system. Moreover, by interacting and integrating the models of various routers, the problem of over-reliance on the central server brought about by the centralized solution is solved.
[0049] 2. The asynchronous interaction mechanism proposed in the present invention randomly selects a part of users to participate in the training at the beginning of each round of training model. Each selected wireless router transmits the model to other edge terminals, and other edge terminals weightedly fuse the received model parameters with their own parameters to achieve the update of each wireless router model. This process is repeated continuously and multiple iterations are performed to continuously improve the overall performance of the system, effectively reducing the interaction cost of a large amount of data and reducing the overall complexity of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is a diagram of the architecture of the distributed federated learning asynchronous interaction mechanism described in the present invention;
[0051] Figure 2 This is an architecture diagram of the distributed federated learning synchronous interaction mechanism described in the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them.
[0053] The service identification method based on federated learning in this embodiment specifically includes the following steps:
[0054] Step 1: Build an edge collaboration system consisting of several wireless routers as edge terminals, such as Figure 1 , 2 As shown, each wireless router is equipped with an edge-initial dataset and an edge-initial neural network classifier.
[0055] Step 2: Collect network traffic data sets through several wireless routers in the edge collaborative system, and process the collected data sets into the data set format required for training the model.
[0056] The network traffic includes four common data flows: Tencent Games, Douyin, WeChat and Weibo. These four data flows correspond to four business types: games, videos, social networking and web browsing.
[0057] The specific contents of processing the collected data set into the data set format required by the training model include: preprocessing the captured data set and performing feature extraction, removing redundant features irrelevant to the category attributes, dividing it into a training set 1 and a validation set 1, performing feature extraction on the training set 1, removing redundant features irrelevant to the category attributes and putting them as a feature set into the established sample database.
[0058] Step 3: According to different business needs, select an appropriate mechanism from the two distributed federated learning mechanisms, synchronous interaction mechanism and asynchronous interaction mechanism, to train the initial model, and obtain the global model through aggregation and update;
[0059] The synchronous interaction mechanism is specifically as follows: at the beginning of each round of training the initial model, each wireless router user participates in the training, trains the local data to obtain the initial model, and each edge terminal simultaneously transmits the local model to all other wireless router users, and each edge terminal weightedly fuses the received model parameters with its own parameters to achieve the update of each edge terminal model;
[0060] The overall optimization goal of the synchronous interactive federated learning model is:
[0061] in
[0062] where f i (ω)=l(x i ,y i ;ω) that is (x i ,y i ) is the loss function under the neural network model parameter ω. Assuming that K edges participate in each round of training, is the data index set of the kth edge participating in the training. k is the number of samples participating in the training at the edge, then the optimization objective becomes:
[0063] in
[0064] In this synchronous interaction mechanism, the model weight parameters of different wireless routers simultaneously participate in the model fusion weighted average Optimize the objective function, continuously improve the accuracy of the system's anomaly detection, and feed back information to other edge nodes. According to different anomaly types, take protection strategies against network attacks and system anomalies. The advantage of the synchronous interaction mechanism is that it can ensure a more stable and rapid convergence of the overall model, but a large amount of data interaction increases the data interaction cost and the overall complexity of the system.
[0065] The asynchronous interaction mechanism is specifically as follows: at the beginning of each round of training of the initial model, m wireless router users are randomly selected to participate in the training, the local data is trained to obtain the initial model, each selected wireless router transmits the model to other edge terminals, and other edge terminals weightedly fuse the received model parameters with their own parameters to achieve the update of each wireless router model; the process is repeated several times for multiple rounds of iterations to continuously improve the overall performance of the system;
[0066] Compared with the above synchronous interaction mechanism, the optimization goal of the asynchronous interaction mechanism remains unchanged. However, since the model parameters and times received by different wireless routers may be different, the weighted average method of the model weight parameters of different edge terminals is as follows: Where w i For this wireless router, the original weight, w tj The weight parameters of the other m edge models participating in the training received by this node.
[0067] In this embodiment, in order to flexibly cope with the rapidly changing data streams in the IoT environment, an asynchronous interactive distributed federated learning mechanism is adopted, such as Figure 1 The figure shows the architecture diagram of the distributed federated learning asynchronous interaction mechanism of the present invention, which specifically includes the initial model training stage and the global model training stage:
[0068] Initial model training phase: At the beginning of each round, a portion of wireless router users are randomly selected, and the processed training set is distributed to these router users for training, and the initial model is obtained by training local data;
[0069] Global model training phase: Each selected wireless router transmits the trained initial model to all other edge terminals, and other edge terminals weightedly fuse the received model parameters with their own parameters to update the models of each edge terminal. This process is repeated continuously for multiple rounds of iterations, so that each wireless router model converges, and the overall performance of the system is finally improved without leaking private data.
[0070] Step 4: Put the global model trained in step 3 into the business identification classifier model library as different algorithms included in the business identification classifier model library, and the different algorithms include deep learning CNN algorithm model, XGBoost model, and graph neural network GCN algorithm model; then select different algorithm models in the business identification classifier model library according to the different business types identified;
[0071] The specific steps of establishing and training the deep learning CNN algorithm model are as follows:
[0072] Step 1) Process the data set required for specific algorithm model training
[0073] (1a) performing preliminary processing on a data set formed by collecting network traffic through a plurality of wireless routers in the edge collaborative system to form a preliminary processed training set 2;
[0074] (1b) Load the training set 2 processed above and label it, such as the four business types of game, video, social and web browsing corresponding to labels 0, 1, 2 and 3 respectively;
[0075] (1c) Extract keywords from the text, sort the top 2000 words with the highest frequency, and create a token dictionary. For example, TCP protocol appears the most frequently, so it is ranked as 1. The token dictionary is used to convert “text” into a “number list”, with 1 representing TCP protocol.
[0076] (1d) Truncate and pad the length of all number lists to 64. If the length exceeds 64, the information at the end will be truncated. If the length of byte information is less than 64, zeros will be added to the end to make the length reach 64, ensuring that each text has the same length;
[0077] (1e) Finally, the Embedding layer is used to convert the "number list" into a "vector list", and the second training set required for CNN model training is processed.
[0078] Step 2) Build a CNN convolutional neural network
[0079] The CNN neural network in this paper uses a one-dimensional model based on CNN, including four convolutional layers Conv, two maximum pooling layers, two fully connected layers, and one softmax layer; the number of neurons in Conv1 and Conv2 is 256, the kernel size is 3, and the all-zero padding step is 1. The number of neurons in Conv3 and Conv4 is 128, the kernel size is 2, the all-zero padding step is 1, the two maximum pooling layer kernels are 2, the padding step is 2, and the number of neurons in the two fully connected layers is 128; each pooling layer trained in the CNN model is finally batch normalized, the activation function used in the four convolutional layers is the ReLU function, the maximum 30 epochs when training the model Adam optimization algorithm, and the learning rate is 0.001; this network uses early stopping, that is, when the training is within 5 epochs, the loss function does not improve, and the training is terminated; the results of this network are based on 10-fold cross validation.
[0080] Step 3) inputting the CNN training set processed in step 1) into the CNN convolutional neural network constructed in step 2) for training to obtain a CNN algorithm model;
[0081] Step 4) Save the trained CNN algorithm model to the business identification classifier model library.
[0082] The trained CNN algorithm model is saved in the classifier model library. The trained CNN model is used as a business type identifier. Other machine learning algorithms are similar.
[0083] Step 5: Through the collaborative training method of federated learning, the data flow features identified by many routers participating in the training are merged and deployed to more routers, so that each router can identify all business types and enhance the generalization ability of the recognition model.
[0084] Furthermore, through the collaborative training method of federated learning, the data flow features identified by many routers participating in online training are merged to improve the real-time performance of business identification, automatically update the model according to the evolution of the business, improve the decline in the accuracy of the recognition model caused by business updates, and maintain the recognition rate of the recognition model at a high level for a long time.
[0085] The above is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any technician in the relevant technical field, without departing from the scope of the technical solution of the present invention, makes any form of equivalent replacement or modification to the technical solution and technical content disclosed in the present invention, which does not depart from the content of the technical solution of the present invention and still falls within the protection scope of the present invention.
Claims
1. A business identification method based on federated learning, characterized in that: The specific steps include: Step S1: construct an edge cooperative system consisting of several wireless routers as edge terminals, wherein each wireless router is equipped with an edge initial data set and an edge initial neural network classifier; Step S2: collecting network traffic data sets through several wireless routers in the edge collaborative system, and processing the collected data sets into a data set format required by the training model; Step S3: According to different business needs, different distributed federated learning mechanisms are selected to train the initial model, and the global model is obtained through aggregation and update; The different distributed federated learning mechanisms include synchronous interaction mechanism and asynchronous interaction mechanism. The synchronous interaction mechanism and asynchronous interaction mechanism are as follows: Step S3-1: Synchronous interaction mechanism: At the beginning of each round of training the initial model, each wireless router user participates in the training, trains the local data to obtain the initial model, and each edge terminal simultaneously transmits the local model to all other wireless router users. Each edge terminal weights and fuses the received model parameters with its own parameters to achieve the update of each edge terminal model; The overall optimization goal of the synchronous interactive federated learning model is: in where f i (ω)=l(x i ,y i ;ω) that is (x i ,y i ) is the loss function under the neural network model parameter ω; assuming that K edges participate in each round of training, is the data index set of the kth edge participating in the training; n k is the number of samples participating in the training at the edge, then the optimization objective becomes: in In this synchronous interaction mechanism, the model weight parameters of different wireless routers simultaneously participate in the model fusion weighted average Optimize the objective function, continuously improve the accuracy of the system's anomaly detection, and feed back information to other edge nodes. According to different anomaly types, take protection strategies against network attacks and system anomalies; Step S3-2: Asynchronous interaction mechanism: At the beginning of each round of training of the initial model, m wireless router users are randomly selected to participate in the training, and the local data is trained to obtain the initial model. Each selected wireless router transmits the model to other edge terminals, and other edge terminals weightedly fuse the received model parameters with their own parameters to achieve the update of each wireless router model; repeat this process several times for multiple rounds of iterations to continuously improve the overall performance of the system; Compared with the above synchronous interaction mechanism, the optimization goal of the asynchronous interaction mechanism remains unchanged. However, since the model parameters and times received by different wireless routers may be different, the weighted average method of the model weight parameters of different edge terminals is as follows: Where w i For this wireless router, the original weight, w tj The weight parameters of the other m edge models participating in the training received by this node; When the business requirement requires the stable and rapid convergence of the overall model, the synchronous interaction mechanism is selected; when the business requirement requires the interaction cost of a large amount of data and the overall complexity of the system, the asynchronous interaction mechanism is selected; Step S4: putting the global model trained in step S3 into the service identification classifier model library as different algorithms contained in the service identification classifier model library, and then selecting different algorithms in the service identification classifier model library according to different identified service types; Step S5: Through the collaborative training method of federated learning, the data flow features identified by many routers participating in the training are merged and deployed to more routers, so that each router can identify all business types and enhance the generalization ability of the recognition model.
2. A method for identifying services based on federated learning according to claim 1, characterized in that: The specific contents of processing the collected data set into the data set format required by the training model include: preprocessing the captured data set and performing feature extraction, removing redundant features irrelevant to the category attributes, dividing it into a training set 1 and a validation set 1, performing feature extraction on the training set 1, removing redundant features irrelevant to the category attributes and putting them as a feature set into the established sample database.
3. A method for identifying services based on federated learning according to claim 1, characterized in that: The specific steps of selecting the synchronous interaction mechanism in step S3-1 to obtain the global model are as follows: Step S3-1-1: Initial model training phase: At the beginning of each round of model training, each wireless router participates in the training and trains the local data to obtain the initial model; Step S3-2-2: Global model training stage: According to the initial model trained in step S3-1, each edge terminal transmits the initial model to all other wireless routers at the same time, and each edge terminal weightedly fuses the received initial model parameters with its own parameters to achieve the update of each edge terminal model; Step S3-3-3: Federated learning aggregates and updates the recognition model to achieve global model training without leaking privacy data.
4. The service identification method based on federated learning according to claim 1, characterized in that: The specific steps of selecting the asynchronous interaction mechanism to obtain the global model in step S3-2 are as follows: Step S3-2-1: Initial model training phase: At the beginning of each round of model training, m wireless router users are randomly selected to participate in the training, and the local data is trained to obtain the initial model; Step S3-2-2: Global model training phase: Each selected wireless router transmits the initial model to other edge terminals, and other edge terminals perform weighted fusion of the received initial model parameters with their own parameters to implement the update of each wireless router model; Step S3-2-3: Federated learning aggregates and updates the recognition model to achieve global model training without leaking private data.
5. A method for identifying services based on federated learning according to any one of claims 1 to 4, characterized in that: The different algorithms described in step S4 include deep learning CNN algorithm model, XGBoost model, and graph neural network GCN algorithm model; for images or other data with massive variables, the deep learning CNN algorithm model is selected; for tabular data with a small number of variables, the trained XGBoost model is selected; for graph structures, or topological structures, the graph neural network GCN algorithm model is selected.
6. A method for identifying services based on federated learning according to claim 5, characterized in that: The specific steps of establishing the deep learning CNN algorithm model are as follows: Step S4-1: Processing the data set required for training the specific algorithm model; Step S4-1-1: Preliminarily process a data set formed by collecting network traffic through a plurality of wireless routers in the edge collaborative system to form a preliminarily processed training set 2; Step S4-1-2: Load the above-mentioned preliminary processed training set 2 and label it; Step S4-1-3: Extract text keywords, sort the top 2000 words with the highest frequency and create a token dictionary, and use the token dictionary to convert "text" into a "number list", with 1 representing the TCP protocol; Step S4-1-4: truncate and fill the gaps, so that all the number lists are 64 in length. If the length exceeds 64, the information at the end is truncated. If the length of the byte information is less than 64, zeros are added to the end until the length reaches 64, ensuring that each text has the same length; Step S4-1-5: Finally, use the Embedding layer to convert the "number list" into a "vector list", and the training set 2 required for CNN model training is processed; Step S4-2: construct a CNN convolutional neural network; The CNN neural network uses a one-dimensional model based on CNN, including four convolutional layers Conv, two maximum pooling layers, two fully connected layers, and one softmax layer; the number of neurons in Conv1 and Conv2 is 256, the kernel size is 3, and the all-zero padding step is 1. The number of neurons in Conv3 and Conv4 is 128, the kernel size is 2, the all-zero padding step is 1, the kernel size of the two maximum pooling layers is 2, the padding step is 2, and the number of neurons in the two fully connected layers is 128; each pooling layer of the CNN model training is finally batch normalized, the activation function used in the four convolutional layers is the ReLU function, the maximum 30 epochs when training the model Adam optimization algorithm, and the learning rate is 0.001; this network uses early stopping, that is, when the training is within 5 epochs, the loss function does not improve, and the training is terminated; the results of this network are based on 10-fold cross validation; Step S4-3: Input the CNN training set processed in step S4-1 into the CNN convolutional neural network constructed in step S4-2 for training to obtain a CNN algorithm model; Step S4-4: Save the trained CNN algorithm model to the business identification classifier model library.
7. A method for identifying services based on federated learning according to claim 6, characterized in that: The step S5 also includes merging the data flow features identified by many routers participating in the online training to improve the real-time performance of business identification, automatically updating the model according to the evolution of the business, and improving the decline in the accuracy of the recognition model caused by the business update, so that the recognition rate of the recognition model is maintained at a high level for a long time; at the same time, by deploying the identified data flow features to more routers, the generalization ability of the recognition model is enhanced.
8. A method for identifying services based on federated learning according to any one of claims 1 to 4, 6 to 7, characterized in that: The business types include game, video, social and WEB browsing; the game, video, social and WEB browsing business types correspond to four data flows of Tencent Games, Douyin, WeChat and Weibo respectively.
Citation Information
Patent Citations
Service type identification method for federated learning based on cloud edge collaboration
CN113839838A
Hierarchical federated learning method and device based on asynchronous communication, terminal equipment and storage medium
CN112532451A
Network traffic classification method and system based on federal semi-supervised learning
CN113705712A