Internet of things network intrusion detection method and device, and storage medium
By working together with the local client through the global neural network model, using the generative adversarial network and Q-study reinforcement learning algorithm for local training, and updating the model parameters in real time on the blockchain network, external attacks and model parameters in the Internet of Things system are solved. Change the problem and achieve efficient intrusion detection and network security.
Patent Information
- Application Number
- CN202410922227.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-10
AI Technical Summary
IoT systems face network security risks when connecting a large number of devices to the Internet, especially external attacks and unnecessary intrusion detection problems. Existing technologies are difficult to effectively prevent attacks from changing model parameters.
The global neural network model is used to work together with the local client, and local training is performed through the generative adversarial network and Q-study reinforcement learning algorithm to generate privacy-protecting model parameters, and the global neural network model is updated in real time on the blockchain network to prevent external attack.
It realizes the detection and prevention of various modes of external attacks, improves the robustness and detection accuracy of network security, and protects data privacy.
Smart Images

Figure CN118764262A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of detection technology, and in particular to an Internet of Things network intrusion detection method, system and storage medium. Background Art
[0002] The concept of the Internet of Things (IoT) aims to provide a variety of intelligent network applications and devices to improve people's lives. In recent years, the development of the Internet of Things has increased people's awareness of complexity by including computers, devices, enterprises, and vehicles. In addition, the Internet of Things is a network system built on recognized standards for information exchange.
[0003] Data collected from end devices enables the establishment of intelligent decision-making mechanisms and effective management of IoT settings. However, connecting many real-world devices to the Internet may raise concerns about cybersecurity risks. Therefore, security is the most important requirement for these real-time systems due to the possibility of unwanted intrusions, critical attacks, or errors. Summary of the invention
[0004] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides an Internet of Things network intrusion detection method, system and storage medium, which are helpful to detect external attacks of various modes and prevent external attacks from changing model parameters.
[0005] In order to implement the above technical solution, in a first aspect, the present invention provides an Internet of Things network intrusion detection method, comprising the following steps: Step 1: Generate a global neural network model, and send the generated global neural network model to each local client; Step 2: Each local client obtains data from the IoT device group connected to it; Step 3: Each local client performs local training on the received global neural network model based on the acquired data to generate a local neural network model; Step 4: Each local client uploads the model parameters of the local neural network model to the central server; Step 5: The central server aggregates all received local parameters to update the global neural network model; Step 6: The central server sends the updated global neural network model to each local client, and then executes step 2.
[0006] Furthermore, the step 2 also includes: each local client generates simulated data using a generative adversarial network.
[0007] Furthermore, the local training of the received global neural network model in step three includes locally training the received initialized global neural network model using a Q-study reinforcement learning algorithm.
[0008] Furthermore, between step three and step four, the method also includes: using a function to map the model parameters of the generated local neural network model into model parameters with privacy protection.
[0009] In another aspect, the present invention provides an IoT network intrusion detection system, comprising: a plurality of local clients, a plurality of IoT device groups, and a central server in real time on a blockchain network; Multiple IoT device groups are configured to,collect data; The central server is configured to generate and update a global neural network and send the global neural network to a plurality of local clients; Multiple local clients are configured to interconnect with multiple IoT device groups respectively to establish a single IoT network, obtain data from the IoT device group through the established single Internet network, and update the global neural network model sent by the central server based on the obtained data to generate a local neural network model.
[0010] Furthermore, the local client includes: a data acquisition module, an intrusion detection module, a control module, a communication module and a storage module; The data acquisition module is used to acquire data; The intrusion detection module is used to update the global neural network model and generate a local neural network model; The communication module is used to communicate with the central server and the IoT device group; The storage module is used to store data.
[0011] On the other hand, the present invention also provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the Internet of Things network intrusion detection method described above.
[0012] The beneficial effects of the present invention are: The local client of the present invention obtains data collected by the IoT device group, and updates the global neural network model sent by the central processor based on the data to generate a local neural network model, and sends the model parameters of the local neural network model to the central processor. The central processor integrates the model parameters from multiple local clients to update the global neural network model, and sends the updated global neural network to the local client to regenerate a new local neural network model based on it, and sends the model parameters of the new local neural network model to the central server, so as to continuously and repeatedly update the global neural network model and generate a new local neural network model, which not only helps to detect various modes of external attacks, but also helps to prevent external attacks from changing model parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0014] Figure 1 The present invention is a flowchart of an Internet of Things network intrusion detection method. DETAILED DESCRIPTION
[0015] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0016] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present invention. Unless otherwise specified, each technical and scientific term used in this embodiment has the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0017] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0018] In the present invention, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention, and do not specifically refer to any part or element in the present invention and should not be understood as limitations on the present invention.
[0019] In the present invention, terms such as "fixed connection", "connected", "connection", etc. should be understood in a broad sense, indicating that it can be fixedly connected, integrally connected or detachably connected; it can be directly connected or indirectly connected through an intermediate medium. Relevant scientific research or technical personnel in this field can determine the specific meanings of the above terms in the present invention according to specific circumstances, and they should not be understood as limiting the present invention.
[0020] It should be noted that the expert model of the present invention is obtained by training and fine-tuning the LLM model.
[0021] Embodiment 1: like Figure 1 As shown, this embodiment provides an Internet of Things network intrusion detection method, including the following steps: S1: Generate a global neural network model and send the generated global neural network model to each local client.
[0022] Specifically, the central server generates an initialized global neural network model based on the data it holds, and transmits the generated initialized global neural network model to each of a plurality of local clients; wherein the central server may include a plurality of nodes implemented on a blockchain network.
[0023] For ease of understanding and explanation, multiple local clients may be represented as local client 1, local client 2, ..., local client i, where i is an integer greater than or equal to 2.
[0024] S2: Each local client obtains data from the group of IoT devices connected to it.
[0025] It should be noted that the number of Internet of Things (IOT) device groups is no less than two. For ease of explanation and understanding, multiple IOT device groups can be represented as IOT device group 1, IOT device group 2, ..., IOT device group n, where n is an integer greater than or equal to 2.
[0026] Each local client Q can be connected to at least one IOT device group.
[0027] For ease of understanding and explanation, the data obtained by local client 1 from the IOT device group connected to it is recorded as data 1, the data obtained by local client 2 from the IOT device group connected to it is recorded as data 2, and so on, the data obtained by local client i from the IOT device group connected to it is recorded as data i.
[0028] Specifically, the steps also include: each local client generates simulated data using a generative adversarial network (GANs).
[0029] S3: Each local client locally trains the received initial global neural network model based on the acquired data to generate a local neural network model.
[0030] It should be noted that, for ease of understanding and explanation, the generated local neural network model is recorded as local neural network model i, where the value of i is the same as the value representing the local client n.
[0031] Specifically, the local client i locally trains the received initialized global neural network model based on the data i obtained from the IOT device group connected to it to obtain the local neural network model i, wherein the data i includes actual data obtained from the IOT device group and simulated data generated by the generative adversarial network.
[0032] For example, the local client 5 performs local training on the received initialized global neural network model based on the data 5 obtained from the IOT device group connected to it to obtain the local neural network model 5.
[0033] Among them, the local training of the received initial global neural network model includes: using the Q-study reinforcement learning algorithm to locally train the received initialized global neural network model, specifically, evaluating the quality Q(𝑠, a) of taking action a under a given state 𝑠, specifically, after taking action a under state 𝑠, the current Q is updated, and the specific formula is as follows: Among them, α is the learning rate; 𝑟 is the immediate reward; 𝛾 is the discount factor; 𝑠′ is the new state after executing action a; in intrusion detection, state 𝑠 can represent the current state of the network, action a represents different detection strategies, and reward 𝑟 is the feedback of the detection result; β is the weight of the adversarial sample, 𝜆 is the weight of the adversarial loss, and 𝜖 is a small positive number to prevent the probability from being zero; δi: the time difference error (TD error) of the i-th experience sample, which indicates the importance of the experience sample. The larger the error, the greater the contribution of the experience to the training; is the sum of all empirical sample errors and their smoothing factors, which are used to normalize the probability distribution.
[0034] S4: Each local client uploads the model parameters of the local neural network model to the central server.
[0035] Specifically, the model parameters of the local neural module model i are recorded as model parameters i. For example, the model parameters of the local neural network model 5 are model parameters 5.
[0036] Before uploading the model parameters of the local neural network model to the central server, the model parameters of the local neural network model are mapped to model parameters with privacy protection. The specific formula is as follows: Assuming there is a local neural network model parameter vector x, we can add Laplace noise to the parameter vector x:
[0037] in: Δf is the sensitivity of the function f(x), that is, the change in output caused by changes in input data; ϵ is the privacy budget, which controls the degree of privacy protection.
[0038] S5: The central server aggregates all received local parameters to generate a new global neural network model.
[0039] The central server aggregates all the local parameters received, and updates the model parameters of the initialized global neural network model based on the aggregated local parameters to generate a new global neural network model, which helps prevent external attacks.
[0040] In addition, it should be noted that the central server can also use the model data generated by GANs to update the model parameters of the initialized global neural network model through simulated data and aggregated local parameters.
[0041] Among them, the specific formula for updating the model of the initialized global neural network model is as follows:
[0042] Where t is the training round, are the model parameters of the updated global neural network model; are the model parameters received by the i-th local client. is the weight of the i-th local client, which is dynamically adjusted according to the amount of data or model quality.
[0043] S6: The central server sends the generated new global neural network model to each local client, allowing the local client to perform the next round of local training.
[0044] Specifically, the central server sends the generated new global neural network model to each local client, updates the initialized global neural network model, and enables the local client to perform the next round of local training, that is, return to step S2, so as to iterate and perform dynamic updates in real time.
[0045] It should be noted that step S2 to step S6 is a real-time dynamic loop process. In this implementation, the initial global neural network model is locally trained in step 3. In the loop process, the global neural network model generated in the previous round is actually updated. This embodiment is only exemplary.
[0046] With respect to the above embodiment, it is assumed that a smart home system includes multiple sensors (such as temperature sensors, smoke sensors, etc.), and uses the intrusion detection system of the present invention to perform network security monitoring.
[0047] Initialization phase: The central server generates an initial global neural network model and distributes it to the local clients of each smart home device.
[0048] Local training phase: Each smart home device collects sensor data, applies the Q-study algorithm to perform local model training, and adds differential privacy noise to protect data privacy.
[0049] Model upload phase: Each smart home device uploads the updated model parameters to the central server through the blockchain network.
[0050] Global update phase: The central server combines the model parameters of each smart home device and the data generated by GANs to update the global neural network model and prevent external attacks.
[0051] Personalized distribution stage: The central server distributes the updated global model parameters to each smart home device for personalized adjustment to improve detection accuracy.
[0052] Therefore, this method can improve the accuracy and robustness of intrusion detection while ensuring data privacy.
[0053] In this embodiment, the local client obtains data collected by the IoT device group, and uses this data to update the global neural network model sent by the central processor to generate a local neural network model, and sends the model parameters of the local neural network model to the central processor. The central processor integrates the model parameters from multiple local clients to update the global neural network model, and sends the updated global neural network to the local client to regenerate a new local neural network model based on it, and sends the model parameters of the new local neural network model to the central server, so as to continuously and repeatedly update the global neural network model and generate a new local neural network model, which not only helps to detect various modes of external attacks, but also helps to prevent external attacks from changing model parameters.
[0054] Embodiment 2: This embodiment provides an Internet of Things network intrusion detection system, including: Multiple IOT device groups for collecting data.
[0055] The central server is configured to generate and update a global neural network and send the global neural network to multiple local clients, wherein the central server is configured to be interconnected with the multiple local clients and implemented on a blockchain network.
[0056] Multiple local clients are configured to interconnect with multiple IoT device groups respectively to establish a single IoT network, obtain data from the IoT device group through the established single Internet network, and update the global neural network model sent by the central server based on the obtained data to generate a local neural network model for real-time data intrusion detection.
[0057] Specifically, the local client includes a data acquisition module, an intrusion detection module, a control module, a communication module and a storage module.
[0058] The data acquisition module acquires data collected by an IOT device group connected to a local client via a single Internet network.
[0059] The intrusion detection module includes an update generation unit and a generative adversarial network unit; the update unit is used to update the received global neural network model based on the data acquired by the data acquisition module and the simulated data generated by the generative adversarial network unit to generate a local neural network model for intrusion detection of real-time data.
[0060] The data storage module is used to store the data acquired by the data acquisition module and the simulated data generated by the generative adversarial network unit.
[0061] The communication module is used to communicate with the central processor and multiple IOT device groups for data transmission.
[0062] Embodiment 3: This embodiment provides a computer-readable storage medium, which includes a stored program. When the program is running, the device where the computer-readable storage medium is located is controlled to execute the Internet of Things network intrusion detection method described in Example 1.
[0063] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0064] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, 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 through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0065] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0066] In addition, it should be noted that the flowchart in the accompanying drawings shows the method of the embodiment of the present disclosure. In the corresponding description in the flowchart or block diagram in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be performed substantially in parallel, and they can sometimes be performed in the opposite order, which can depend on the functions involved. Each block in the block diagram and / or flow chart, and the combination of blocks in the block diagram and / or flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting intrusion in an Internet of Things network, characterized in that: The following steps are involved: Step 1: Generate a global neural network model, and send the generated global neural network model to each local client; Step 2: Each local client obtains data from the IoT device group connected to it; Step 3: Each local client performs local training on the received global neural network model based on the acquired data to generate a local neural network model; Step 4: Each local client uploads the model parameters of the local neural network model to the central server; Step 5: The central server aggregates all received local parameters to update the global neural network model; Step 6: The central server sends the updated global neural network model to each local client, and then executes step 2 to iterate.
2. The method for detecting intrusion into an Internet of Things network according to claim 1, characterized in that: The step 2 also includes: each local client generates simulated data using a generative adversarial network.
3. The method for detecting intrusion into an Internet of Things network according to claim 1, characterized in that: The local training of the received global neural network model described in step three includes using the Q-study reinforcement learning algorithm to locally train the received initialized global neural network model.
4. The method for detecting intrusion into an Internet of Things network according to claim 1, characterized in that: The step between step three and step four also includes: using a function to map the model parameters of the generated local neural network model into model parameters with privacy protection.
5. An Internet of Things network intrusion detection system, characterized in that: include: Multiple local clients, multiple IoT device groups, and a central server; Multiple IoT device groups are configured to,collect data; The central server is configured to generate and update a global neural network and send the global neural network to a plurality of local clients; Multiple local clients are configured to interconnect with multiple IoT device groups respectively to establish a single IoT network, obtain data from the IoT device group through the established single Internet network, and update the global neural network model sent by the central server based on the obtained data to generate a local neural network model.
6. The Internet of Things network intrusion detection system according to claim 5, characterized in that: The local client includes: a data acquisition module, an intrusion detection module, a control module, a communication module and a storage module; The data acquisition module is used to acquire data; The intrusion detection module is used to update the global neural network model and generate a local neural network model; The communication module is used to communicate with the central server and the IoT device group; The storage module is used to store data.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the Internet of Things network intrusion detection method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Robust training method and device for collaborative learning
CN117150566A
Network intrusion detection method
CN117692209A
Intrusion detection system for IoT networks using blockchain-enabled federated learning and operating method thereof
US20240171599A1
