An Internet of Things intrusion detection method, system and device

By adopting the contribution calculation method of federal distillation learning in IoT intrusion detection, the problems of large communication overhead, high privacy leakage risks and user poisoning in traditional technologies are solved, and higher detection accuracy and security are achieved.

CN118250042BActive Publication Date: 2025-02-28SHANGHAI DEV CENT OF COMP SOFTWARE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410326304.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-21
Publication Date
2025-02-28
Estimated Expiration
2044-03-21

AI Technical Summary

Technical Problem

The existing IoT intrusion detection technology has problems such as large communication overhead, high risk of privacy leakage, inability to avoid user poisoning, and difficulty in calculating client contribution.

Method used

Using the contribution degree calculation method based on federal distillation learning, the client downloads the public data set of the central server and performs local training, generates local hard tags and uploads them to the central server, the central server performs contribution degree calculation and tag aggregation, and the client performs federal distillation training to update the model.

Benefits of technology

It reduces communication overhead, improves detection accuracy and security, effectively resists data poisoning, and simplifies client contribution calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118250042B_ABST
    Figure CN118250042B_ABST
Patent Text Reader

Abstract

The present invention discloses an Internet of Things intrusion detection method, system and device, which relates to the field of network security technology. The method includes: obtaining Internet of Things traffic data; screening the Internet of Things traffic data to obtain traffic feature data; transforming the traffic feature data to obtain the traffic feature to be tested; training an Internet of Things intrusion detection model based on federated distillation learning contribution calculation; the Internet of Things intrusion detection model is obtained by a central server and several clients participating in the training; the central server retains a public data set and original labels; each client retains a private data set with its own label; and using the Internet of Things intrusion detection model to detect and classify the traffic feature to be tested. The present invention can reduce communication overhead and improve detection accuracy and security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular to an Internet of Things intrusion detection method, system and device. Background Art

[0002] In recent years, with the rapid development of IoT technology, many IoT devices have appeared in medical and intelligent driving systems, and they play an important role in the corresponding fields. But at the same time, a large number of IoT devices lack proper security defense capabilities, which makes it easy for malicious intruders to invade IoT devices and obtain a large amount of user privacy data.

[0003] Therefore, it is crucial to equip IoT devices with an intrusion detection system (IDS). Benefiting from the rapid development of deep learning technology, existing deep learning-based detection methods have achieved certain results in the field of traffic analysis and intrusion detection in the IoT. However, these centralized traditional deep learning technologies require collecting a large amount of traffic data from various IoT devices and uploading this data to a central server to train a deep neural network model for detection. Although these deep learning methods can achieve high detection accuracy in intrusion detection tasks, there is a problem of private information leakage, that is, privacy-sensitive raw data is uploaded to the central server and may be abused by the central server. For this reason, studying IoT intrusion detection methods that do not require external user data is a major problem that needs to be solved.

[0004] In order to solve the problem of user private data leakage in traditional machine learning model training, federated learning has been applied to IoT intrusion detection research. This is because federated learning can help users exchange data and train models without disclosing user data. However, since traditional federated learning requires clients to frequently upload parameters of deep learning models, its communication overhead is very large and seriously hinders the actual deployment of detection models. In addition, there are already many attacks that can recover the client's original data from the uploaded model parameters, which means that IoT intrusion detection solutions based on traditional federated learning still have the security risk of user privacy information leakage.

[0005] The federated distillation scheme was proposed to reduce the communication overhead and security risks caused by the exchange of model parameters. Because the client in the federated distillation architecture can upload the output of the deep learning model to the server instead of uploading the model parameters to the server. Subsequently, the server aggregates the data and converts it into output, also known as local logits value. The aggregated local logits, that is, the global logits, are downloaded by the client and used for further local training calculations. However, the federated distillation scheme still cannot solve the problem of client poisoning. In the daily federated learning process, some clients have malicious competition. They will upload some invalid parameters, and the server will not deliberately identify these parameters. When the server aggregates these parameters and passes them back to the client, it causes local parameter infection, which reduces the prediction accuracy of the model. In addition, the current federated distillation architecture lacks an effective calculation method for the training contribution of each client. Traditional federated learning contribution calculation methods, such as Shapley value calculation, have obvious disadvantages, including: 1. The contribution calculation time of each client is long; 2. Each round of contribution calculation requires the transmission of parameters, which leads to an increase in the number of model communication rounds and increased communication consumption.

[0006] In summary, the existing IoT intrusion detection technology has problems such as high communication overhead, high risk of privacy leakage, inability to avoid user poisoning, and difficulty in calculating client contribution. Therefore, building an effective federated distillation IoT intrusion detection model is an urgent problem to be solved. Summary of the invention

[0007] The purpose of the present invention is to provide an Internet of Things intrusion detection method, system and device to reduce communication overhead and improve detection accuracy and security.

[0008] To achieve the above object, the present invention provides the following solutions:

[0009] An Internet of Things intrusion detection method, comprising:

[0010] Get IoT traffic data;

[0011] Screening the IoT traffic data to obtain traffic characteristic data;

[0012] Converting the flow characteristic data to obtain the flow characteristic to be measured;

[0013] An IoT intrusion detection model is trained based on federated distillation learning contribution calculation; the IoT intrusion detection model is trained by a central server and several clients; the central server retains a public data set and original labels; each client retains a private data set with its own labels;

[0014] The Internet of Things intrusion detection model is used to detect and classify the traffic characteristics to be tested.

[0015] Optionally, the IoT intrusion detection model is trained based on the federated distillation learning contribution calculation, specifically including:

[0016] Each client downloads the public dataset from the central server separately;

[0017] Each client uses its own labeled private dataset to train a classifier and obtain a local detection model;

[0018] Each client uses the local detection model to predict the samples in the public dataset, obtains the local hard labels and uploads them to the central server;

[0019] The central server calculates the contribution based on the local hard labels uploaded by each client and the original labels of the public dataset to obtain the contribution score of each client;

[0020] The central server determines the global hard label based on each client’s contribution score and local hard label and broadcasts it to each client;

[0021] Each client uses the global hard labels broadcast by the central server as teachers and the local hard labels as students to perform federated distillation training and update the local detection model;

[0022] Return to the step where each client uses the local detection model to predict the samples in the public dataset, obtains the local hard labels and uploads them to the central server until the local detection model converges and the IoT intrusion detection model is obtained.

[0023] Optionally, the classifier is a BiLSTM Attention model.

[0024] Optionally, each client uses a local detection model to predict samples in the public dataset, obtains local hard labels and uploads them to the central server, including:

[0025] Each client uses the local detection model to predict the samples in the public dataset, obtains the local prediction value, and uses the Softmax activation function to convert the local prediction value into a local hard label and upload it to the central server.

[0026] Optionally, the central server determines a global hard label according to the contribution score of each client and the local hard label and broadcasts it to each client, specifically including:

[0027] The central server calculates the reward and punishment parameters based on the contribution score of each client, aggregates local hard labels based on the reward and punishment parameters to obtain the global hard label, and then broadcasts it to each client.

[0028] Optionally, the reward and punishment parameters are calculated based on the contribution score of each client. The specific formula is:

[0029]

[0030] Among them, R k is the reward and punishment parameter of client k, Q is the reward multiple, θ k is the contribution score of client k, θ max is the maximum contribution score, θ min The minimum contribution score.

[0031] Optionally, local hard labels are aggregated according to reward and punishment parameters to obtain global hard labels. The specific formula is:

[0032]

[0033]

[0034]

[0035] in, is a global hard label, is the global hard label of the jth sample in the public dataset, N is the total number of samples in the public dataset, is the probability that the jth sample in the public dataset belongs to the zth category, is the local hard label of the zth category predicted by client k for the jth sample in the public dataset, L is the total number of sample categories, and K is the total number of clients.

[0036] Optionally, each client uses the global hard labels broadcast by the central server as teachers and the local hard labels as students for federated distillation training to update the local detection model. The specific formula is:

[0037]

[0038]

[0039] in, is the loss function of federated distillation training, α is the weight parameter of the student model loss, β is the weight parameter of the teacher model loss, and γ is the weight parameter of the regularization term. is the student model loss, is the teacher model loss, is the regularization term, is the local prediction value of the client, D k is the private dataset of client k, D o For public datasets, It is the local hard label predicted by client k for the jth sample in the public dataset.

[0040] An Internet of Things intrusion detection system, comprising:

[0041] Dynamic IoT traffic data extraction module, used to obtain IoT traffic data;

[0042] A flow characteristic preprocessing module, used for screening the IoT flow data to obtain flow characteristic data;

[0043] A feature generation module, used for converting the flow feature data to obtain the flow feature to be measured;

[0044] The IoT intrusion detection training module is used to train the IoT intrusion detection model based on the federated distillation learning contribution calculation; the IoT intrusion detection model is trained by a central server and several clients; the central server retains the public data set and the original labels; each client retains its own labeled private data set;

[0045] The intrusion traffic classification module is used to detect and classify the traffic characteristics to be tested using the Internet of Things intrusion detection model.

[0046] A computer device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-mentioned Internet of Things intrusion detection method.

[0047] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0048] The IoT intrusion detection method provided by the present invention is based on the federated distillation learning contribution calculation to train the IoT intrusion detection model. Compared with the traditional machine learning model and the deep intrusion detection model based on federated learning, it has higher detection accuracy. During the training process, each client only needs to upload the user's hard label data, which consumes less communication than the federated architecture model that transmits model parameters. The client contribution calculation mechanism can effectively resist the influence of data poisoning clients on the central server model, and has higher security. Therefore, the present invention can reduce communication overhead and improve detection accuracy and security. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 A flow chart of the Internet of Things intrusion detection method provided by the present invention;

[0051] Figure 2 A model architecture diagram of the Internet of Things intrusion detection method provided by the present invention;

[0052] Figure 3 A module diagram of the Internet of Things intrusion detection system provided by the present invention;

[0053] Figure 4 This is a workflow diagram of the Internet of Things intrusion detection system provided by the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] The purpose of the present invention is to provide an Internet of Things intrusion detection method, system and device to reduce communication overhead and improve detection accuracy and security.

[0056] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0057] The present invention provides an Internet of Things intrusion detection method, such as Figure 1 As shown, the method includes:

[0058] Step S1: Obtain IoT traffic data.

[0059] Specifically, data is extracted from a localized IoT database as IoT traffic data.

[0060] Step S2: Screen the IoT traffic data to obtain traffic characteristic data.

[0061] Specifically, data preprocessing is performed based on the IoT traffic data, unnecessary traffic data is deleted, and traffic characteristic data is obtained.

[0062] Step S3: transform the flow characteristic data to obtain the flow characteristic to be measured.

[0063] Specifically, the filtered traffic feature data is normalized and converted into traffic features suitable for model input, namely, the traffic features to be measured.

[0064] Step S4: Train the IoT intrusion detection model based on federated distillation learning contribution calculation.

[0065] Specifically, model training is performed on intrusion traffic sample data to obtain an effective IoT intrusion detection model. The IoT intrusion detection model is trained by a central server and several clients; the central server retains a public data set and original labels; each client retains its own labeled private data set.

[0066] Step S5: Use the Internet of Things intrusion detection model to detect and classify the traffic characteristics to be tested.

[0067] Specifically, the trained IoT intrusion detection model is used to detect and classify the characteristics of the traffic to be tested, which can mine sensitive features, distinguish IoT intrusion traffic from benign traffic, and obtain intrusion detection results.

[0068] like Figure 2 As shown in the figure, the IoT intrusion detection model is trained based on the federated distillation learning contribution calculation, which specifically includes the following steps:

[0069] Step 1: Each client downloads the public dataset from the central server.

[0070] The present invention considers that there are K clients participating in the model training, and each client k∈{1,2,…,K} will use two data sets to train the detection model: 1) its own labeled private data set D k ; 2) Unlabeled public datasets Public Dataset D o Shared on all clients, but the label of each sample is not saved by the user, and the central server keeps D o The label of the dataset G. Private dataset D k It is the private data of each client, which is used to build the initial local detection model.

[0071] Step 2: Each client uses its own labeled private data set to train a classifier to obtain a local detection model. Preferably, the classifier is a BiLSTM Attention model.

[0072] Each client k uses its own labeled private dataset D kTraining its classifier using the BiLSTMAttention model can be expressed as formulas (1)-(10):

[0073]

[0074]

[0075]

[0076]

[0077]

[0078]

[0079] Kh=W k *h+b k (7)

[0080] a t =Attention(Qh,Kh,V) (8)

[0081]

[0082]

[0083] Among them, formula (1)-(6) is the BiLSTM model, formula (1)-(3) is the input gate, forget gate and output gate in LSTM, formula (7)-(8) is the attention mechanism, and formula (9)-(10) is the loss function of the sample. f is the weight coefficient of the forget gate, W u is the weight coefficient of the input gate, W o is the weight coefficient of the output gate, W c is the weight coefficient of the feature extraction process, W k and W a are all weight coefficients for model feature transformation. f represents the bias value of the forget gate, b u represents the bias value of the input gate, b o represents the bias value of the output gate, b c represents the bias value of the feature extraction process, b k and b a Both represent the bias value of model feature transformation. The superscript t represents time t. (t-1) represents the hidden state h at time t-1, x (t) represents the model input at time t, and σ() represents the activation function Sigmoid. t and Both represent the state of network nodes, and they represent the state of nerve cells at time t and the temporary state of nerve cells respectively. t is the hidden state of the model. t is the output of the attention mechanism. V represents the vector of input features, Qh and Kh both represent the feature vectors for calculating the Attention weights, which are obtained from the input features. is the predicted value of the model, is the model’s predicted value for the i-th sample in the private dataset, y i is the label of the i-th sample in the private dataset, and m is the total number of samples in the private dataset.

[0084] Step 3: Each client uses the local detection model to predict the samples in the public dataset, obtains the local hard labels and uploads them to the central server.

[0085] After client k obtains the initial local detection model, it uses the local detection model BiLSTM() to detect D o Each sample in Make predictions and generate local prediction values ​​for samples As shown in formula (11):

[0086]

[0087] Among them, the client predicts the local hard label H for all samples k is the label set of N samples The calculation transformation mainly uses the Softmax activation function, and the probability that the jth sample belongs to class z is expressed as Its calculation formula is formula (12), and If it is the largest probability value among all categories, then its corresponding label is 1, otherwise is 0.

[0088]

[0089] Among them, L represents the total number of sample categories and also represents the dimension of the prediction vector, and S() represents the Softmax activation function.

[0090] Step 4: The central server calculates the contribution based on the local hard labels uploaded by each client and the original labels of the public dataset to obtain the contribution score of each client.

[0091] The client will use the local hard label H k After uploading to the central server, combined with the central server D o The original label G of the dataset is used to calculate the contribution and obtain the contribution score θk , the contribution score is calculated as shown in formula (13):

[0092] θ k =Acc(H k ,G) (13)

[0093] Wherein, Acc() is a contribution score calculation function. The present invention can greatly reduce communication consumption by directly uploading the local hard labels of the prediction samples compared with the traditional method of transmitting data parameters in federated learning.

[0094] Step 5: The central server determines the global hard label based on each client’s contribution score and local hard label and broadcasts it to each client.

[0095] For samples In the classification process, there may be L categories, namely By calculating the contribution of each client, the reward and punishment parameters of each client are calculated, as shown in formula (14):

[0096]

[0097] Among them, R k is the reward and punishment parameter of client k, Q is the reward multiple, θ k is the contribution score of client k, θ max is the maximum contribution score, θ min The minimum contribution score.

[0098] That is, the contribution score is greater than θ max Users with a contribution score lower than θ will have their voting rights increased by Q times. min Users with D are not allowed to participate in the voting, counted as 0 votes, and prohibited from uploading local logical values ​​for one round, but they can still download the aggregated global sample hard labels for local model training. o The L-category probability calculation for each sample in the data set is shown in formula (15):

[0099]

[0100] in, is the local hard label of the zth category predicted by client k for the jth sample in the public dataset, R k is the reward and punishment parameter calculated by client k based on its contribution, To make the jth sample in the public dataset belong to the zth category, the central server aggregates all the client responses to the sample The local hard label corresponding to the predicted value of is obtained, L is the total number of sample categories, and K is the total number of clients. The central server determines D according to the number of votes in each voting set. o The global hard label of the dataset. The global hard label of each sample is calculated as shown in formula (16), and the global hard label of all samples is shown in formula (17):

[0101]

[0102]

[0103] in, is a global hard label, is the global hard label of the jth sample in the public dataset, and N is the total number of samples in the public dataset.

[0104] The central server then sends the global hard tag Broadcast to each client for federated distillation training to improve the prediction accuracy of the model.

[0105] Since the contribution mechanism in the model can screen out clients with poor detection effects, this process can effectively resist the problem of data poisoning. Usually, malicious clients use poisoned data for local training, which will cause user data infection, affect the prediction accuracy of the central server, and delay the model training process. The contribution mechanism proposed in the present invention can effectively detect users who poison data. In addition, since the client of the model only needs to upload the hard label of the predicted sample, this greatly reduces the communication consumption between the client and the central server.

[0106] Step 6: Each client uses the global hard labels broadcast by the central server as teachers and the local hard labels as students for federated distillation training and updates the local detection model.

[0107] Each client downloads a global hard tag from the central server And set the global hard label As the teacher, the local hard label is used as the student for federated distillation training, that is, the loss function of BiLSTM is transformed. The calculation process is shown in formula (18):

[0108]

[0109] in, is the loss function of federated distillation training, α is the weight parameter of the student model loss, β is the weight parameter of the teacher model loss, and γ is the weight parameter of the regularization term. is the student model loss, is the teacher model loss, is the regularization term, is the local prediction value of the client, D k is the private dataset of client k, is a global hard label, D o For public datasets, It is the local hard label predicted by client k for the jth sample in the public dataset.

[0110] Since the intrusion data is highly skewed and non-independent and identically distributed (Non-IID), this increases the distribution difference between the student models, thereby reducing the convergence efficiency of the entire model. To solve this problem, the Kullback Leibler divergence is used in formula (18) to measure the student model and the teacher model, and this difference is optimized as part of the global loss function, as shown in formula (19):

[0111]

[0112] Step 7: Return to the step where each client uses the local detection model to predict the samples in the public dataset, obtains the local hard labels and uploads them to the central server, that is, repeats steps 3 to 6 until the local detection model converges and obtains the IoT intrusion detection model.

[0113] Finally, the updated local detection model predicts the public dataset again and uploads the hard labels to the central server for the next round of model training. Each client repeats steps 3 to 6 until the model converges.

[0114] In summary, the present invention provides an Internet of Things intrusion detection method based on federated distillation learning contribution calculation, which consists of multiple clients and a central server. The client first downloads unlabeled open data (i.e., a public data set) from the central server. Each client does not save the label of the public data set, and the central server retains the original label data of the public data set. Then, the client's own privacy data (i.e., private data set) is used to train the local detection model to build an effective Internet of Things intrusion detection model. Subsequently, each client predicts the public unlabeled data set in combination with the local detection model to generate a local hard label. Next, in order to further reduce the communication cost, the client uploads the local hard label to the central server. After the central server collects the local hard labels of all clients, it calculates with the saved original labels to count the contribution of each client. Subsequently, a reward and punishment mechanism is introduced in combination with the contribution to perform label aggregation. The present invention has a significant improvement in prediction accuracy, can reduce the communication consumption of the model, reduce the risk of privacy leakage, and avoid the risk of user poisoning.

[0115] By comparing the present invention with current research work on public data sets, it can be seen that the beneficial effects of the present invention are mainly divided into the following three points: 1. The model detection accuracy of the present invention is higher. 2. The communication consumption of the model of the present invention is lower. 3. The model of the present invention is more secure.

[0116] First, as for the detection accuracy of the model of the present invention, by comparing the traditional machine learning model and the deep intrusion detection model based on federated learning, it is shown that the prediction accuracy of the present invention for the IoT intrusion detection task on a public data set can be improved by at least 10%.

[0117] Second, regarding the model communication consumption of the present invention, each client in the present invention only needs to upload the user's hard label data, which has lower model communication consumption compared to the federated architecture model that transmits model parameters.

[0118] Third, regarding the model security of the present invention, the present invention adopts a client contribution calculation mechanism during the training process, which can effectively resist the influence of data poisoning clients on the central server.

[0119] In order to implement the above-mentioned Internet of Things intrusion detection method, the present invention also provides an Internet of Things intrusion detection system, such as Figure 3 As shown, the system includes:

[0120] Dynamic IoT traffic data extraction module, used to obtain IoT traffic data.

[0121] The flow characteristic preprocessing module is used to screen the Internet of Things flow data to obtain flow characteristic data.

[0122] The feature generation module is used to transform the flow feature data to obtain the flow feature to be measured.

[0123] The IoT intrusion detection training module is used to train the IoT intrusion detection model based on the federated distillation learning contribution calculation. The IoT intrusion detection model is trained by a central server and several clients; the central server retains the public data set and the original labels; each client retains its own labeled private data set.

[0124] The intrusion traffic classification module is used to detect and classify the traffic characteristics to be tested using the Internet of Things intrusion detection model.

[0125] like Figure 4 As shown, the specific workflow of the above-mentioned IoT intrusion detection system includes:

[0126] (1) The dynamic IoT traffic data extraction module extracts data from the localized IoT database to obtain the original IoT traffic data.

[0127] (2) The traffic feature preprocessing module preprocesses the collected raw IoT traffic data, deletes unnecessary traffic data, and obtains traffic feature data.

[0128] (3) The feature generation module converts the preprocessed traffic feature data into the feature input of the deep learning model, that is, feature data construction, which specifically includes the normalization of the traffic feature data.

[0129] (4) The IoT intrusion detection training module combines the public data set retained by the central server and the private data set retained by each client to perform model training. The training process specifically includes steps 1 to 7 above.

[0130] (5) The intrusion traffic classification module combines the trained physical network intrusion detection model to mine the sensitive characteristics of the traffic, conducts detection research on the IoT intrusion traffic, and obtains the intrusion detection results.

[0131] In one embodiment, a computer program product is also provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0132] In one embodiment, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0133] In one embodiment, a computer device is also provided, including a memory and a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0134] Furthermore, the computer device also includes an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in the above-mentioned method embodiments are implemented.

[0135] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.

[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0137] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0138] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. An Internet of Things intrusion detection method, characterized in that: include: Get IoT traffic data; Screening the IoT traffic data to obtain traffic characteristic data; Converting the flow characteristic data to obtain the flow characteristic to be measured; Based on the federated distillation learning contribution calculation, the IoT intrusion detection model is trained, including: Each client downloads the public dataset from the central server separately; Each client uses its own labeled private dataset to train a classifier and obtain a local detection model; Each client uses the local detection model to predict the samples in the public dataset, obtains the local hard labels and uploads them to the central server; The central server calculates the contribution based on the local hard labels uploaded by each client and the original labels of the public dataset, obtains the contribution score of each client, and calculates the reward and punishment parameters. The specific formula is: Among them, R k is the reward and punishment parameter of client k, Q is the reward multiple, θ k is the contribution score of client k, θ max is the maximum contribution score, θ min is the minimum contribution score; According to the reward and punishment parameters, local hard labels are aggregated to obtain global hard labels, which are then broadcast to each client. The specific formula is: in, is a global hard label, is the global hard label of the jth sample in the public dataset, N is the total number of samples in the public dataset, is the probability that the jth sample in the public dataset belongs to the zth category, is the local hard label of the zth category predicted by client k for the jth sample in the public dataset, L is the total number of sample categories, and K is the total number of clients; Each client uses the global hard labels broadcast by the central server as teachers and the local hard labels as students for federated distillation training and updates the local detection model. The specific formula is: in, is the loss function of federated distillation training, α is the weight parameter of the student model loss, β is the weight parameter of the teacher model loss, and γ is the weight parameter of the regularization term. is the student model loss, is the teacher model loss, is the regularization term, is the local prediction value of the client, D k is the private dataset of client k, D o For public datasets, The local hard label predicted by client k for the jth sample in the public dataset; Return to the step where each client uses the local detection model to predict the samples in the public dataset, obtains the local hard labels and uploads them to the central server until the local detection model converges and the IoT intrusion detection model is obtained; The Internet of Things intrusion detection model is trained by a central server and several clients; the central server retains a public data set and original labels; each client retains a private data set with its own labels; and the Internet of Things intrusion detection model is used to detect and classify the traffic characteristics to be tested.

2. The method for detecting intrusion in the Internet of Things according to claim 1, characterized in that: The classifier is a BiLSTMAttention model.

3. The Internet of Things intrusion detection method according to claim 1, characterized in that: Each client uses the local detection model to predict the samples in the public dataset, obtains the local hard labels and uploads them to the central server, including: Each client uses the local detection model to predict the samples in the public dataset, obtains the local prediction value, and uses the Softmax activation function to convert the local prediction value into a local hard label and upload it to the central server.

4. An Internet of Things intrusion detection system, characterized in that: include: Dynamic IoT traffic data extraction module, used to obtain IoT traffic data; A flow characteristic preprocessing module, used for screening the IoT flow data to obtain flow characteristic data; A feature generation module, used for converting the flow feature data to obtain the flow feature to be measured; An IoT intrusion detection training module is used to train an IoT intrusion detection model based on federated distillation learning contribution calculation; the IoT intrusion detection model is trained by a central server and several clients; The central server retains the public dataset and original labels; Each client keeps its own labeled private dataset; Each client uses the local detection model to predict the samples in the public dataset, obtains the local hard labels and uploads them to the central server; The central server calculates the contribution based on the local hard labels uploaded by each client and the original labels of the public dataset, obtains the contribution score of each client, and calculates the reward and punishment parameters. The specific formula is: Among them, R k is the reward and punishment parameter of client k, Q is the reward multiple, θ k is the contribution score of client k, θ max is the maximum contribution score, θ min is the minimum contribution score; According to the reward and punishment parameters, local hard labels are aggregated to obtain global hard labels, which are then broadcast to each client. The specific formula is: in, is a global hard label, is the global hard label of the jth sample in the public dataset, N is the total number of samples in the public dataset, is the probability that the jth sample in the public dataset belongs to the zth category, is the local hard label of the zth category predicted by client k for the jth sample in the public dataset, L is the total number of sample categories, and K is the total number of clients; Each client uses the global hard labels broadcast by the central server as teachers and the local hard labels as students for federated distillation training and updates the local detection model. The specific formula is: in, is the loss function of federated distillation training, α is the weight parameter of the student model loss, β is the weight parameter of the teacher model loss, and γ is the weight parameter of the regularization term. is the student model loss, is the teacher model loss, is the regularization term, is the local prediction value of the client, D k is the private dataset of client k, D o For public datasets, The local hard label predicted by client k for the jth sample in the public dataset; Repeat the training until the local detection model converges to obtain the IoT intrusion detection model; The intrusion traffic classification module is used to detect and classify the traffic characteristics to be tested by using the Internet of Things intrusion detection model.

5. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the Internet of Things intrusion detection method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Electric power inspection image defect detection method based on federated learning and adaptive difference

    CN114897837A