Mixed classical-quantum auto-encoder method for DoS attack detection in wireless sensor network
By adopting a hybrid classic-quantum autoencoder method in wireless sensor networks and combining quantum and classical neural networks for data processing, the performance bottlenecks of existing systems in detecting complex attack modes and high-dimensional data processing are solved, and accurate detection of denial of service attacks and network security is achieved.
Patent Information
- Application Number
- CN202510015123.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-01-06
AI Technical Summary
Existing intrusion detection systems have performance bottlenecks in detecting complex attack modes and high-dimensional data processing, especially in wireless sensor networks, which are difficult to effectively detect denial of service attacks.
A hybrid classic-quantum autoencoder method is used, combining quantum long short-term memory networks and classic long short-term memory networks, implicit feature representations are generated through quantum encoders, and data recovery is performed using classic decoders to calculate reconstruction errors to determine whether there are abnormalities.
It improves the accuracy and efficiency of abnormal detection, can effectively detect denial of service attacks in wireless sensor networks, and improves network security.
Smart Images

Figure CN119854003A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network security, and in particular relates to a hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks. Background Art
[0002] As a key communication technology, wireless sensor networks are widely used in environmental monitoring, military monitoring, smart home and other fields. However, with its widespread application, network security issues are becoming increasingly serious, especially the impact of denial of service attacks on the network. Denial of service attacks usually overload network bandwidth or system resources, causing network services to be unavailable, thereby causing serious security risks. Although existing intrusion detection systems can detect some attacks, most of them use traditional feature extraction and classification algorithms, lacking adaptability and processing capabilities for complex attack patterns, and especially in scenarios with high-dimensional data processing and high real-time requirements, there are performance bottlenecks.
[0003] As an emerging computing model, quantum computing has gradually been applied in the field of machine learning due to its high parallelism and powerful computing power. The autoencoder model composed of the quantum long short-term memory network (QLSTM) and the traditional long short-term memory network (LSTM) has the advantages of efficient training on large-scale data sets, reducing computational complexity and improving anomaly detection accuracy. Existing research has not yet been able to effectively combine quantum neural networks with traditional deep learning methods to improve anomaly detection capabilities in network security. Summary of the invention
[0004] In order to overcome the shortcomings of the prior art, the present invention provides a hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks. The method combines quantum computing and classical machine learning, uses a quantum long short-term memory network as the encoder part, and uses a classical long short-term memory network as a decoder to achieve efficient anomaly detection. The method includes the following steps: first, the traffic data in the wireless sensor network is used as input, and is processed by the quantum encoder to obtain an implicit feature representation; then, the classical LSTM decoder is used to recover the data and generate reconstructed data; finally, by calculating the reconstruction error between the input data and the recovered data, it is determined whether there is an anomaly. When the reconstruction error exceeds a predetermined threshold, the system will identify the attack. The present invention can improve the accuracy and efficiency of anomaly detection by taking advantage of the parallelism of quantum computing and the advantages of quantum neural networks, and effectively improve the application effect of existing autoencoders in network security. Through the technical solution of the present invention, accurate detection of denial of service attacks in wireless sensor networks can be achieved, and the security of wireless sensor networks can be improved.
[0005] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0006] Step 1: Initialize input data X, where data X represents network traffic data in the wireless sensor network;
[0007] Step 2: Take the input data X as the input of the encoder part of the quantum long short-term memory autoencoder QLSTM-AE, and generate implicit feature representation X after being processed by the encoder’s quantum neural network;
[0008] Step 3: Use the decoder to decode the implicit feature representation X and generate decoded data Y, where data Y represents the reconstructed data of the network traffic;
[0009] Step 4: Determine whether there is any abnormality in the network traffic by calculating the reconstruction error between the input data X and the decoded data Y. If the reconstruction error is greater than a predetermined threshold, it is determined to be abnormal data, that is, there is a DoS attack.
[0010] Preferably, the quantum long short-term memory autoencoder includes two parts, an encoder and a decoder, wherein the encoder adopts a quantum long short-term memory network and the decoder adopts a long short-term memory network; the encoder encodes the input wireless sensor network traffic data into a low-dimensional implicit feature representation through quantum computing; the decoder recovers data from the encoded implicit features through the long short-term memory network and calculates the reconstruction error.
[0011] Preferably, the quantum long short-term memory encoder is implemented by a variational quantum circuit, wherein a quantum neural network uses quantum gate operations to process input data.
[0012] Preferably, the decoder takes the output of the quantum encoder as input and performs a recovery process on the time series data.
[0013] Preferably, the reconstruction error is calculated using mean square error (MSE) as an indicator for measuring reconstruction accuracy.
[0014] Preferably, the training process of the encoder and decoder is optimized by minimizing the loss function of the reconstruction error, and the parameters of the quantum circuit and the long short-term memory network are adjusted using the gradient descent method.
[0015] A computer program, which enables a computer to execute the above hybrid classical-quantum autoencoder method.
[0016] An electronic device comprises: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the above-mentioned hybrid classical-quantum autoencoder method.
[0017] A computer-readable storage medium stores a computer program, which implements the hybrid classical-quantum autoencoder method when executed by a processor.
[0018] A chip includes: a processor for calling and running a computer program from a memory, so that a device equipped with the chip executes the above-mentioned hybrid classical-quantum autoencoder method.
[0019] A computer program product, comprising a computer storage medium storing a computer program, wherein the computer program comprises instructions executable by at least one processor, and when the instructions are executed by the at least one processor, the hybrid classical-quantum autoencoder method is implemented.
[0020] A hybrid classical-quantum autoencoder system for DoS attack detection in wireless sensor networks, comprising:
[0021] Input module: used to obtain traffic data X in the wireless sensor network;
[0022] Quantum encoder module: used to convert input data X into quantum state and process it through quantum LSTM neural network, and output implicit feature representation;
[0023] Classic decoder module: used to receive implicit feature representation and recover data X through the STM network;
[0024] Anomaly detection module: It is used to calculate the reconstruction error between the input data X and the recovered data X, and determine whether there is a DoS attack based on the error value.
[0025] The beneficial effects of the present invention are as follows:
[0026] The present invention, by leveraging the parallelism of quantum computing and the advantages of quantum neural networks, can improve the accuracy and efficiency of anomaly detection and effectively improve the application effect of existing autoencoders in network security. Through the technical solution of the present invention, it is possible to accurately detect denial of service attacks in wireless sensor networks and improve the security of wireless sensor networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a flow chart of the method of the present invention;
[0028] Figure 2 It is a schematic diagram of the overall framework of the method of the present invention;
[0029] Figure 3 It is a schematic diagram of the main components of the method of the present invention;
[0030] Figure 4 Schematic diagram of the encoder circuit framework of the method of the present invention;
[0031] Figure 5 A schematic diagram of a decoder circuit framework of the method of the present invention;
[0032] Figure 6 This is a diagram showing the calculation results of the operating error of the method of the present invention. DETAILED DESCRIPTION
[0033] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0034] The purpose of the present invention is to provide a method based on quantum long short-term memory autoencoder (QLSTM-AE) for denial of service attack detection in wireless sensor networks. The present invention combines quantum computing with classical deep learning technology, using quantum neural network as encoder and classical LSTM as decoder to effectively improve the accuracy and efficiency of network attack detection.
[0035] A hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks is used for denial of service attack anomaly detection in wireless sensor networks, comprising the following steps:
[0036] S1: Initialize input data X, which represents network traffic data in the wireless sensor network;
[0037] S2: The input data X is used as the input of the encoder part of the quantum long short-term memory autoencoder (QLSTM-AE), and is processed by the quantum neural network of the quantum LSTM encoder to generate an implicit feature representation X;
[0038] S3: Use the classic LSTM decoder to decode the implicit feature representation X and generate the decoded data Y, which represents the reconstructed data of the network traffic;
[0039] S4: Determine whether the network traffic is abnormal by calculating the reconstruction error between the input data X and the decoded data Y. If the reconstruction error is greater than a predetermined threshold, it is determined to be abnormal data.
[0040] The quantum long short-term memory encoder is implemented via a variational quantum circuit, where the quantum neural network uses quantum gate operations to process input data.
[0041] The classical LSTM decoder is implemented using classical computing devices, taking the output of the quantum encoder as input and performing time series data recovery.
[0042] The reconstruction error is calculated using the mean square error (MSE) as a measure of reconstruction accuracy.
[0043] The training process of the quantum encoder and classical decoder is optimized by minimizing the loss function of the reconstruction error, and the parameters of the quantum circuit and classical network are adjusted using the gradient descent method.
[0044] By comparing normal traffic data with the encoded and decoded reconstructed data, abnormal data points are identified and corresponding alarms are output in the anomaly detection system.
[0045] A hybrid classical-quantum autoencoder system for DoS attack detection in wireless sensor networks, comprising:
[0046] An input module, used to obtain traffic data X in the wireless sensor network;
[0047] The quantum encoder module is used to convert the input data X into a quantum state and process it through a quantum LSTM neural network to output an implicit feature representation;
[0048] The classic decoder module receives the implicit feature representation and recovers the data X through the classic LSTM network;
[0049] The anomaly detection module is used to calculate the reconstruction error between the input data X and the restored data X, and determine whether a DoS attack occurs based on the error value.
[0050] The anomaly detection module includes a reconstruction error calculation unit and a threshold judgment unit, wherein the reconstruction error calculation unit uses the mean square error for calculation, and the threshold judgment unit judges the DoS attack according to the error value.
[0051] The parameters of the quantum LSTM encoder and the classical LSTM decoder are optimized by minimizing the loss function of the reconstruction error.
[0052] Example:
[0053] Quantum long short-term memory autoencoder structure:
[0054] 1. It consists of two parts: encoder and decoder. The encoder uses quantum long short-term memory network, and the decoder uses classical long short-term memory network.
[0055] 2. The encoder encodes the input wireless sensor network traffic data into a low-dimensional implicit feature representation through quantum computing; the decoder recovers the data from the encoded implicit features through the classic LSTM network and calculates the reconstruction error.
[0056] 3. When the reconstruction error between the network traffic data and the recovered data exceeds the set threshold, the system will determine that the data is abnormal and further determine whether a DoS attack has occurred.
[0057] Data processing flow:
[0058] 1. Input data: The system first receives real-time network traffic data from the wireless sensor network, which may contain traces of DoS attacks.
[0059] 2. Encoding process: Encode the data through the quantum long short-term memory network (QLSTM) to generate implicit feature representation. Due to the parallelism and efficiency of quantum computing, the encoding process can quickly and accurately capture the temporal characteristics in the data.
[0060] 3. Decoding process: The implicit features are input into the classic long short-term memory network for decoding to generate recovered data similar to the input data.
[0061] 4. Reconstruction error calculation: By calculating the difference between the input data and the restored data (i.e., reconstruction error), detect whether the network data is abnormal. If the error exceeds a certain threshold, it is judged as abnormal.
[0062] Quantum encoder combined with classical decoder:
[0063] 1. Quantum encoder: Quantum long short-term memory networks can process complex time series data, have stronger parallel computing capabilities, and can capture the deep features of data in high-dimensional space. The encoder part uses quantum gate operations to build quantum circuits for data compression and converts data into low-dimensional hidden variable representations.
[0064] 2. Classical decoder: The classical LSTM network recovers network traffic data from the implicit feature representation output by the quantum encoder through long-term dependencies and memory capabilities, and further evaluates whether an attack has occurred.
[0065] Loss function optimization:
[0066] 1. Quantum computing loss function: The loss function measures the accuracy of anomaly detection by measuring the similarity between the input data and the decoder output data. The quantum fidelity is used to calculate the loss function. When the fidelity is close to 1, it means that the decoder recovery data is highly similar to the input data, and the detection result is good.
[0067] 2. Optimization process: Through back propagation and gradient descent method, the parameters of quantum encoder and classical decoder are optimized to gradually reduce the reconstruction error.
Claims
1. A hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks, characterized in that: The steps include: Step 1: Initialize input data X, where data X represents network traffic data in the wireless sensor network; Step 2: Take the input data X as the input of the encoder part of the quantum long short-term memory autoencoder QLSTM-AE, and generate implicit feature representation X after being processed by the encoder’s quantum neural network; Step 3: Use the decoder to decode the implicit feature representation X and generate decoded data Y, where data Y represents the reconstructed data of the network traffic; Step 4: Determine whether there is any abnormality in the network traffic by calculating the reconstruction error between the input data X and the decoded data Y. If the reconstruction error is greater than a predetermined threshold, it is determined to be abnormal data, that is, there is a DoS attack.
2. A hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks according to claim 1, characterized in that: The quantum long short-term memory autoencoder includes two parts, an encoder and a decoder, wherein the encoder adopts a quantum long short-term memory network and the decoder adopts a long short-term memory network; the encoder encodes the input wireless sensor network traffic data into a low-dimensional implicit feature representation through quantum computing; the decoder recovers data from the encoded implicit features through the long short-term memory network and calculates the reconstruction error.
3. A hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks according to claim 1, characterized in that: The quantum long short-term memory encoder is implemented through a variational quantum circuit, in which a quantum neural network uses quantum gate operations to process input data.
4. A hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks according to claim 1, characterized in that: The decoder takes the output of the quantum encoder as input and performs a recovery process of the time series data.
5. A hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks according to claim 1, characterized in that: The reconstruction error is calculated using mean square error (MSE) as an indicator for measuring reconstruction accuracy.
6. A hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks according to claim 1, characterized in that: The training process of the encoder and decoder is optimized by minimizing the loss function of the reconstruction error, and the parameters of the quantum circuit and the long short-term memory network are adjusted by the gradient descent method.
7. A computer program, characterized in that The computer program enables a computer to execute the method according to any one of claims 1 to 6.
8. An electronic device, characterized in that: include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A chip, characterized in that: include: A processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes a method as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Network traffic anomaly detection method and device and medium
CN111031051A
Real-time traffic anomaly detection method for intrusion and attack defense
CN113949549A
QLSTM-based short-term photovoltaic power generation power prediction method and device
CN118568572A
Density estimation network for unsupervised anomaly detection
US20190124045A1
System for detecting hierarchical network intrusion using hidden layer information of autoencoder and method thereof
US20230351198A1