A smart home-oriented intrusion detection method and system
By collecting and preprocessing network data in the smart home system, and using the Lorenz system of chaos theory to establish an intrusion detection model, the detection problem of the smart home system under network security threats is solved, and efficient and accurate intrusion behavior identification and false alarms are achieved. The rate is reduced and overall safety is improved.
Patent Information
- Application Number
- CN202411085927.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-08
AI Technical Summary
When smart home systems face network security threats, existing technology is difficult to detect intrusions accurately and efficiently, has a high false alarm rate, and cannot effectively process large-scale network data, resulting in insufficient security.
Data collection, preprocessing and model training methods are adopted to obtain data through network traffic monitoring devices, use median filter to remove noisy data, Z-score normalization, fill missing values, and use the Lorenz system based on chaos theory to establish an intrusion detection model , through gradient descent algorithm training and optimization, combined with the chaos judgment formula for intrusion detection.
It achieves efficient processing of large-scale network data and high-precision intrusion detection, significantly reduces the false alarm rate, and improves the security of smart home systems and the accuracy of detection results.
Smart Images

Figure CN118611996B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of smart home, and more particularly relates to an intrusion detection method and system for smart home. Background Art
[0002] With the rapid development of information technology, smart home devices and systems combine people's daily lives with various Internet-connected devices, provide security, convenience, comfort and other services through home information networks, and connect various devices or systems in the home through technologies such as the Internet of Things and cloud computing for control and management. However, the application of such Internet-connected devices also exposes smart home systems to a variety of security threats from the network. Therefore, how to detect and prevent unauthorized intrusions has become an important technical issue that needs to be solved in the current smart home system security field.
[0003] In traditional network intrusion detection technology, rule-based detection methods or anomaly-based detection methods are usually used. However, these technologies have certain limitations. For example, rule-based detection methods require complex rule settings and may have loopholes when dealing with new attacks; while anomaly-based detection methods require a large number of normal network behavior samples and may have a high false alarm rate. In addition, these technologies may have insufficient computing resources when processing large-scale data. In addition, traditional network intrusion detection methods often cannot be directly applied in smart home environments because the characteristics of device types, network protocols, and user behaviors in smart home environments are quite different from those in traditional network environments.
[0004] To solve these problems, researchers have conducted many explorations and studies on intrusion detection technology, including the use of machine learning and data mining technology for network intrusion detection. Machine learning and data mining technology can identify and detect network intrusion behaviors by learning and mining patterns in network behavior data. However, these methods may have low accuracy and efficiency in intrusion detection in practical applications due to problems such as the size and quality of the training data set and feature selection.
[0005] Therefore, it is necessary to develop a new intrusion detection method and system for smart homes, which can effectively process large-scale network data and detect network intrusion behaviors with high accuracy and low false alarm rate, thereby improving the security of smart home systems. Summary of the invention
[0006] The present invention aims to solve the technical problem of how to accurately and efficiently perform intrusion detection and reduce the false alarm rate when the current smart home system faces network security threats. For large-scale network data, the present invention needs to seek a method that can effectively process, has high intrusion detection accuracy and low false alarm rate, so as to improve the security of the smart home system.
[0007] In order to achieve the above object, the present invention is implemented by adopting the following technical scheme: the method comprises:
[0008] Data collection: Obtain the original network data in the smart home system. The original network data is regarded as an n-dimensional vector, where each dimension corresponds to a type of network behavior or attribute;
[0009] Data preprocessing: Clean the collected raw network data, including removing noise data, normalizing the data format, and filling missing values;
[0010] Model building and training: Network intrusion detection models are trained based on the extracted raw network data;
[0011] Model testing: Evaluate and test the performance of the model.
[0012] In one embodiment, the data collection includes:
[0013] Install a network traffic monitoring device in the network of the smart home system.
[0014] Device identification: Matching the data packets captured by the sniffer in the network traffic monitoring device with their source and destination devices, achieved through MAC address, IP address, and device model information;
[0015] Packet capture: Set the sniffer in the network traffic monitoring device to capture the data packets of the specified device, including various information of the TCP / IP protocol, source IP, destination IP, source port, destination port, protocol type, and packet size;
[0016] Logging: All network behaviors of smart home devices are recorded in logs; log information includes not only the timestamp, size, and content of the data packet, but also the on / off status and operating mode of the device.
[0017] In one embodiment, the data preprocessing includes:
[0018] Remove noisy data: Use the median filter to remove outliers; suppose the data set D={d1,d2,...,dn}, dn is a single data point, and the median filter is to find the median m in D. For any point di in D, if |di-m|>k(IQR), k is a constant, and IQR is the interquartile range, then di may be an outlier;
[0019] Normalized data format: Z-score normalization, the Z-score normalization formula is:
[0020] ;
[0021] Where μ is the mean of the data and σ is the standard deviation; Where μ is the mean of the data and σ is the standard deviation, is the standard score, that is, the data after standardization. is the original data;
[0022] Fill missing values: Use the mean of non-missing values To fill the missing values qi, replace all missing values qi in the data set D with ; Assume D = {q1, q2, ..., qn}, qn is a single data point, is the mean of all non-missing values in D.
[0023] In one solution, the model is established by using the Lorenz system based on chaos theory as an intrusion detection model; in intrusion detection, the "chaotic" state generated by the attack behavior in the network traffic is identified and learned to achieve the detection of unknown and complex attack behaviors;
[0024] S401, using the dynamic behavior of the Lorenz system as the basis of the model, and adjusting the parameters of the Lorenz system through training data so that it can reflect the difference between normal and abnormal network behavior;
[0025] S402, the training process is performed using a gradient descent algorithm;
[0026] S403, intrusion detection judgment;
[0027] (1) For each newly received network data packet, map it to a point in the Lorenz system and update the system state;
[0028] (2) Observe changes in system status, including unpredictable changes in system status;
[0029] (3) Use the chaos judgment formula to quantify the rate of change of the system state.
[0030] In one solution, the model test includes six indicators: detection rate, detection accuracy, false alarm rate, precision, false negative rate and detection time to evaluate the intrusion detection technology; the test time represents the actual CPU time spent by the intrusion detection system IDS to classify all test connections;
[0031] A true positive TP is an alarm that is predicted to be positive and is actually positive, that is, a real attack triggers the intrusion detection system IDS to generate an alarm;
[0032] A false positive FP event is a situation where the prediction is positive but the actual result is negative, i.e., a false event that raises an alarm when no actual attack has occurred;
[0033] False negative FN is an event that is predicted to be negative but is actually positive, i.e. no actual attack occurred and no alarm was issued;
[0034] True negative TN is an event where the prediction is negative and the actual result is negative, that is, there is actually an attack but no alarm is issued.
[0035] ;
[0036] ;
[0037] ;
[0038] ;
[0039] .
[0040] In another aspect, an intrusion detection system for smart home is provided, the system is applicable to the method described, and the system comprises:
[0041] A network traffic monitoring device for obtaining network data in a smart home system;
[0042] The data processing module is used to clean the collected raw network data, including removing noise data, normalizing the data format, and filling missing values;
[0043] Model building and training module, used to train network intrusion detection model based on processed feature data;
[0044] Model testing module is used to evaluate and test the performance of the model.
[0045] In one embodiment, the network traffic monitoring device includes a network sniffer for capturing data packets of a designated device and recording all network behaviors of the smart home device in a log.
[0046] In one embodiment, the data processing module includes a denoising processing unit, a data normalization processing unit, and a missing value filling processing unit, which are used to remove outliers from the data set, perform Z-score normalization on the data, and use the average value to fill the missing values.
[0047] In one embodiment, the model building and training module uses a gradient descent algorithm to optimize the parameters and uses the accuracy of network intrusion detection as a fitness function.
[0048] Beneficial effects of the present invention:
[0049] The intrusion detection method and system for smart home of the present invention realizes efficient processing of large-scale network data and high-precision intrusion detection through efficient data processing, accurate model training and optimization, greatly reduces the false alarm rate, and improves the accuracy and reliability of the detection results. In addition, the application of the present invention can timely discover and prevent intrusion behaviors from the network, effectively improve the overall security of the smart home system, protect the information security of users, and has high practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a general flow chart of the present invention;
[0051] Figure 2 This is a flow chart of model training and detection of the present invention. DETAILED DESCRIPTION
[0052] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in the present invention. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0053] Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0054] Embodiment 1: Figure 1 As shown, the method comprises:
[0055] S1. Data collection: Obtain network data in the smart home system through network traffic monitoring equipment; Collect raw network data in the smart home system, which can be regarded as an n-dimensional vector, where each dimension corresponds to a type of network behavior or attribute.
[0056] Install and configure a network traffic monitoring device: Install a network traffic monitoring device, such as Wireshark or other similar tools, in the smart home system's network. These tools can capture all data packets sent and received over the network.
[0057] Device identification: In order to obtain the network behavior of smart home devices, it is necessary to match the captured data packets with their source and destination devices. This step can be achieved through information such as MAC address, IP address, device model, etc.
[0058] Packet capture: Set the sniffer in the network traffic monitoring device to capture the data packets of the specified device, including various information of the TCP / IP protocol, such as source IP, destination IP, source port, destination port, protocol type, packet size, etc.
[0059] Logging: All network behaviors of smart home devices are recorded in logs. Log information includes not only the timestamp, size, and content of the data packet, but also the status of the device, such as on / off status, operating mode, etc.
[0060] S2, data preprocessing: cleaning the collected raw network data, including removing noise data, normalizing data format, and filling missing values;
[0061] Remove noise data: Noise data mainly refers to data that is not helpful for model training and may even interfere with the model. For example, abnormal data caused by network jitter or equipment failure, or irrelevant network access records, etc. There are various methods, such as using a median filter to remove outliers.
[0062] Remove noisy data: Use the median filter to remove outliers; suppose the data set D={d1,d2,...,dn}, dn is a single data point, and the median filter is to find the median m in D. For any point di in D, if |di-m|>k(IQR), k is a constant, and IQR is the interquartile range, then di may be an outlier;
[0063] Normalized data format: The purpose of normalization is to make all data comparable on the same scale. Z-score normalization is used. The Z-score normalization formula is:
[0064] ;
[0065] Where μ is the mean of the data and σ is the standard deviation; Where μ is the mean of the data and σ is the standard deviation, is the standard score, that is, the data after standardization. is the original data;
[0066] Fill missing values: Use the mean of non-missing values To fill the missing values qi, replace all missing values qi in the data set D with ; Assume D = {q1, q2, ..., qn}, qn is a single data point, is the mean of all non-missing values in D.
[0067] S3, model building and training: training the network intrusion detection model based on the extracted data;
[0068] Chaos theory mainly studies the seemingly irregular state of a certain nonlinear dynamic system under certain specific conditions. In intrusion detection, this method can help build a model to identify and learn the "chaotic" state generated by attack behaviors in network traffic, thereby realizing the detection of unknown and complex attack behaviors. Intrusion detection model based on chaos theory, this model applies the Lorenz system in chaos theory.
[0069] S401, using the dynamic behavior of the Lorenz system as the basis of the model, and adjusting the parameters of the Lorenz system through training data so that it can reflect the difference between normal and abnormal network behavior;
[0070] Lorenz system formulation and dynamic behavior: The Lorenz system is defined by the following three nonlinear differential equations:
[0071] ;
[0072] Among them, x is the input data, y is the expected output, and z is the network traffic status. , , are system parameters. By adjusting these three parameters, the Lorenz system can show complex dynamic behaviors, including chaos.
[0073] (1) First, set the parameters of the Lorenz system. These parameters ( , , ) need to be determined during the training phase, and they determine the dynamic behavior of the system.
[0074] (2) For each received network packet, calculate the position of a point representing the packet in the Lorenz system. This position can be calculated using the characteristics of the packet (such as size, transport protocol type, source / destination IP, etc.). For example, if only two features, packet size and protocol type, are used, it can be calculated as follows:
[0075] x = packet size / maximum packet size;
[0076] y = packet protocol type / total number of protocol types;
[0077] (3) Use the differential equation of the Lorenz system to simulate the movement of the point in the system. Specifically, insert the current state of the system (x, y) into the following equation to update the state of the system:
[0078] ;
[0079] Among them, z is the network traffic state, t is the network time, dx / dt and dy / dt represent the state update rate.
[0080] S402, the training process is performed using a gradient descent algorithm; the following is the mathematical formula of the corresponding intrusion detection model:
[0081] ;
[0082] in is the dynamic behavior of the Lorenz system, x is the input data, y is the desired output, , , are the parameters to be trained. The meaning of represents the minimization problem that needs to be solved during the training process, and the goal is to minimize the parameters , st represents the constraint condition, which is a well-known expression in the field of mathematics to represent the constraint condition. The constraint condition is represented after st. Represents the preset error tolerance, which indicates how well the model fits the training data. The constraint condition st is expressed in this formula: the square of the difference between the predicted value and the actual value must be less than or equal to the preset error tolerance. .
[0083] S403, intrusion detection judgment;
[0084] S4031, for each newly received network data packet, map it to a point in the Lorenz system and update the system state;
[0085] S4032. Observe changes in system status, especially any rapid and unpredictable status changes;
[0086] S4033. Use the chaos judgment formula to quantify the rate of change of the system state. Use the Lorenz index L to measure this rate of change. Specifically, for each moment t, observe the initial small state disturbance at this moment. The state disturbance after time t Then take the logarithm of the ratio of the two and divide it by the time t to get the average exponential growth rate, which is the Lorenz index:
[0087] ;
[0088] (4) If the Lorenz index L is greater than 0, the system is considered to exhibit chaotic behavior. Usually, this means that the received network data packets have caused the system state to change rapidly and unpredictably, which may represent a network intrusion event. Conversely, if L is less than or equal to 0, the system behavior is considered to remain normal.
[0089] Compared with other existing intrusion detection methods, intrusion detection based on the chaos theory of Lorenz system has the following advantages:
[0090] 1. High identifiability: Chaotic systems are extremely sensitive to initial conditions, and even small changes can lead to huge changes in system behavior. Therefore, the Lorenz system can highly sensitively respond to irregular changes in network behavior, especially those small abnormal behaviors, and has a higher recognition rate for intrusion detection.
[0091] 2. High dynamics: Chaotic systems are dynamic and unpredictable, which enables the Lorenz system to better cope with the ever-changing and evolving network attack methods.
[0092] 3. Applicable to big data environment: Smart home systems usually have a large amount of data communication, and it may not be realistic to process the entire amount. Using chaos theory for intrusion detection, especially the Lorenz system, can immediately reflect anomalies in large-scale data, which helps to reduce the processing load.
[0093] 4. Simple model construction: The Lorenz system has only three equations. Although its behavior is complex, the actual construction process is simple.
[0094] 5. Continuous learning and adaptability: By continuously inputting new network data and observing its impact on the system status, the Lorenz system-based model can continuously learn new network behavior patterns and adapt to the ever-changing network environment.
[0095] S4. Model testing: Evaluate and test the performance of the model.
[0096] The model test includes six indicators: detection rate, detection accuracy, false alarm rate, precision, missed alarm rate and detection time to evaluate the intrusion detection technology; the test time represents the actual CPU time spent by the intrusion detection system IDS to classify all test connections;
[0097] A true positive TP is an alarm that is predicted to be positive and is actually positive, that is, a real attack triggers the intrusion detection system IDS to generate an alarm;
[0098] A false positive FP event is a situation where the prediction is positive but the actual result is negative, i.e., a false event that raises an alarm when no actual attack has occurred;
[0099] False negative FN is an event that is predicted to be negative but is actually positive, i.e. no actual attack occurred and no alarm was issued;
[0100] True negative TN is an event where the prediction is negative and the actual result is negative, that is, there is actually an attack but no alarm is issued.
[0101] ;
[0102] ;
[0103] ;
[0104] ;
[0105] .
[0106] Embodiment 2: An intrusion detection system for smart home, the system is applicable to the method described, and the system comprises:
[0107] A network traffic monitoring device is used to obtain network data in a smart home system; the network traffic monitoring device includes a network sniffer, which is used to capture data packets of a specified device and record all network behaviors of the smart home device in a log.
[0108] The data processing module is used to clean the collected raw network data, including removing noise data, normalizing the data format, and filling missing values; the data processing module includes a noise removal processing unit, a data normalization processing unit, and a missing value filling processing unit, which are used to remove outliers from the data set, perform Z-score normalization on the data, and use the average value to fill the missing values.
[0109] The model building and training module is used to train the network intrusion detection model based on the processed feature data.
[0110] Model testing module is used to evaluate and test the performance of the model.
[0111] Take a smart home system that includes network surveillance cameras, smart door locks, smart thermostats, and smart lighting systems as an example:
[0112] In this system, the network data in the smart home system is obtained through the sniffer in the network traffic monitoring device, including various information of the TCP / IP protocol, source IP, destination IP, source port, destination port, protocol type, and packet size. At the same time, the network sniffer records all network behaviors in the log for further analysis.
[0113] Next, the data processing module starts working, integrating three units for data preprocessing. First, the denoising unit uses a median filter to remove outliers. Then, the data normalization unit performs Z-score normalization on the data, adjusting the mean value of the data to 0 and the standard deviation to 1. Finally, the missing value filling unit uses the mean value to fill in the missing values, ensuring the integrity of the data.
[0114] The processed data is sent to the model building and training module. This module uses the gradient descent algorithm to optimize the parameters and uses the accuracy of network intrusion detection as the fitness function for training. The defined network model can learn the network traffic pattern and sniff out potential anomalies or malicious intrusions.
[0115] Finally, the model testing module performs performance evaluation and testing on the established network intrusion detection model, using detection rate, detection accuracy, false alarm rate, precision, missed alarm rate and detection time as indicators to ensure the accuracy and reliability of the model.
[0116] Such a smart home intrusion detection system can effectively protect the smart home system from network attacks, improve the security of the home network, and ensure the safety of users.
[0117] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0118] It should be understood that the detailed description of the technical solutions of the present invention by means of the preferred embodiments is illustrative rather than restrictive. A person skilled in the art may modify the technical solutions described in the embodiments, or replace some of the technical features by equivalents, based on reading the specification of the present invention; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An intrusion detection method for smart home, characterized in that: The method includes: Data collection: Obtain the original network data in the smart home system. The original network data is regarded as an n-dimensional vector, and each dimension corresponds to a type of network behavior or attribute; Data preprocessing: Clean the collected raw network data, including removing noise data, normalizing the data format, and filling missing values; Model building and training: Network intrusion detection models are trained based on the extracted raw network data; Model testing: evaluate and test the performance of the model; The data collection includes: Install a network traffic monitoring device in the network of the smart home system; Packet capture: Set the sniffer function in the network traffic monitoring device to capture the data packets of the specified device, including various information of the TCP / IP protocol, including source IP, destination IP, source port, destination port, protocol type, packet size, and generate a data table; Device identification: Mapping captured data packets with source devices and target devices based on MAC addresses, IP addresses, and device model information; Logging: All network behaviors of smart home devices are recorded in logs; log information includes the timestamp, size, content, and on / off status and operation mode of the data packet; The data preprocessing includes: Remove noisy data: Use the median filter to remove outliers; suppose the data set D={d1,d2,...,dn}, dn is a single data point, and the median filter is to find the median m in D. For any point di in D, if |di-m|>k(IQR), k is a constant, and IQR is the interquartile range, then di is an outlier; Normalized data format: Z-score normalization, the Z-score normalization formula is: ; Where μ is the mean of the data and σ is the standard deviation. is the standard score, that is, the data after standardization. is the original data; Fill missing values: use the mean of non-missing values To fill the missing values qi, replace all missing values qi in the data set D with ; Assume D = {q1, q2, ..., qn}, qn is a single data point, is the average of all non-missing values in D; The network intrusion detection model adopts the Lorenz system based on chaos theory as the intrusion detection model; in the intrusion model training, the "chaotic" state generated by the attack behavior in the network traffic is identified, learned and trained, and the model algorithm and parameters are continuously optimized to realize the detection of unknown and complex attack behaviors; S401, using the dynamic behavior of the Lorenz system as the basis of the model, and adjusting the parameters of the Lorenz system through training data so that it can reflect the difference between normal and abnormal network behavior; S402, the training process is performed using a gradient descent algorithm; S403, intrusion detection judgment; S4031, for each newly received network data packet, map it to a point in the Lorenz system and update the system state; S4032. Observe changes in system status, including unpredictable system status changes; S4033. Use the chaos judgment formula to quantify the rate of change of the system state; The model test includes: detection rate, detection accuracy, false alarm rate, precision, missed alarm rate and detection time to evaluate the intrusion detection technology; the test time represents the actual CPU time spent by the intrusion detection system IDS to classify all test connections; A true positive TP is an alarm that is predicted to be positive and is actually positive, that is, a real attack triggers the intrusion detection system IDS to generate an alarm; A false positive FP event is a situation where the prediction is positive but the actual result is negative, i.e., a false event that raises an alarm when no actual attack has occurred; False negative FN is an event that is predicted to be negative but is actually positive, i.e. no actual attack occurred and no alarm was issued; True negative TN is an event where the prediction is negative and the actual result is negative, that is, there is actually an attack but no alarm is issued. ; ; ; ; 。 2. An intrusion detection system for smart homes, the system being applicable to the method according to claim 1, characterized in that: The system comprises: A network traffic monitoring device is used to obtain raw network data in the smart home system; The data processing module is used to clean the collected raw network data, including removing noise data, normalizing the data format, and filling missing values; Model building and training module, used to train network intrusion detection model based on processed feature data; Model testing module is used to evaluate and test the performance of the model.
3. The intrusion detection system for smart home according to claim 2, characterized in that: The network traffic monitoring device includes a network sniffer, which is used to capture data packets of a designated device and record all network behaviors of the smart home device in a log.
4. The intrusion detection system for smart home according to claim 2, characterized in that: The data processing module includes a denoising processing unit, a data normalization processing unit and a missing value filling processing unit, which are used to remove outliers from the data set, perform Z-score normalization on the data, and use the average value to fill the missing values.
5. The intrusion detection system for smart home according to claim 2, characterized in that: The model building and training module uses a gradient descent algorithm to optimize the parameters and uses the accuracy of network intrusion detection as a fitness function.
Citation Information
Patent Citations
Wireless network optimization system based on TD-LTE
CN117768921A
Multipath parallel Internet of Things intrusion detection method based on white list pre-screening
CN118381651A
Intrusion detection method and system
US20100287615A1
Improved KNN - Based 6LoWPAN Network Intrusion Detection Method
US20210266748A1
