Hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks
By combining a hybrid autoencoder of quantum long short-term memory network and classical long short-term memory network, the detection problem of denial of service attacks in wireless sensor networks is solved, and efficient anomaly detection and network security improvement are achieved.
Patent Information
- Application Number
- CN202510015123.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-01-06
AI Technical Summary
Existing wireless sensor network intrusion detection systems lack adaptability and efficiency when facing complex denial of service attacks. In particular, there are performance bottlenecks in scenarios with high-dimensional data processing and high real-time requirements. Traditional methods are difficult to effectively detect complex attack patterns.
A hybrid autoencoder is constructed by combining the quantum long short-term memory network (QLSTM) with the classical long short-term memory network (LSTM). The quantum encoder processes network traffic data to generate implicit features, and the classical decoder performs data recovery. The reconstruction error is used to judge anomalies and realize DoS attack detection.
It improves the accuracy and efficiency of anomaly detection in wireless sensor networks, enhances the detection capability of denial of service attacks, and strengthens network security.
Smart Images

Figure CN119854003B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of network security, and particularly relates to a hybrid classical-quantum autoencoder method for DoS attack detection in a wireless sensor network. BACKGROUND
[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 wide application, network security problems 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, and thus causing serious security hazards. Although existing intrusion detection systems can detect some attacks, most of them use traditional feature extraction and classification algorithms, which lack adaptability and processing capacity for complex attack patterns, especially in high-dimensional data processing and real-time scenarios.
[0003] As a new computing mode, quantum computing has gradually been applied in the field of machine learning due to its high parallelism and powerful computing capacity. The autoencoder model combining quantum long short-term memory network (QLSTM) and 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 effectively combined quantum neural networks with traditional deep learning methods to improve the anomaly detection capability in network security. SUMMARY
[0004] In order to overcome the shortcomings of the prior art, the application provides a hybrid classical-quantum autoencoder method for DoS attack detection in a wireless sensor network. This method combines quantum computing and classical machine learning, uses quantum long short-term memory network as the encoder part, and uses classical long short-term memory network as the decoder to achieve efficient anomaly detection. The method includes the following steps: first, the traffic data in the wireless sensor network is inputted and processed by the quantum encoder to obtain the implicit feature representation; then, the classical LSTM decoder is used for data recovery to generate reconstructed data; finally, the reconstruction error between the input data and the recovered data is calculated to determine whether there is an anomaly, and when the reconstruction error exceeds the predetermined threshold, the system will identify the attack. The application takes advantage of the parallelism of quantum computing and the advantages of quantum neural networks to 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 application, 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 application to solve its technical problems 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: The input data X is used as the input of the encoder part of the quantum long short-term memory autoencoder QLSTM-AE. After being processed by the encoder’s quantum neural network, the implicit feature representation X is generated.
[0008] Step 3: Use the decoder to decode the implicit feature representation X and generate decoded data Y, which represents the reconstructed data of the network traffic;
[0009] Step 4: Determine whether there is any anomaly 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, a DoS attack exists.
[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 time series data recovery processing.
[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 performs the above-mentioned hybrid classical-quantum autoencoder method.
[0017] A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the hybrid classical-quantum autoencoder method described above.
[0018] A chip comprising: a processor for calling and running a computer program from a memory, so that a device installed with the chip performs the hybrid classical-quantum autoencoder method described above.
[0019] A computer program product comprising a computer storage medium storing a computer program, the computer program comprising instructions executable by at least one processor, which, when executed by the at least one processor, implement the hybrid classical-quantum autoencoder method described above.
[0020] A hybrid classical-quantum autoencoder system for DoS attack detection in a wireless sensor network, comprising:
[0021] An input module for obtaining traffic data X in the wireless sensor network;
[0022] A quantum encoder module for converting the input data X into a quantum state and processing it through a quantum LSTM neural network to output an implicit feature representation;
[0023] A classical decoder module for receiving the implicit feature representation and recovering the data X through an STM network;
[0024] An anomaly detection module for calculating the reconstruction error between the input data X and the recovered data X, and determining whether there is a DoS attack according to the error value.
[0025] The beneficial effects of the present application are as follows:
[0026] The present application takes advantage of the parallelism of quantum computing and the advantages of quantum neural networks, which can improve the accuracy and efficiency of anomaly detection, and effectively improve the application effect of existing autoencoders in network security. Through the technical scheme of the present application, accurate detection of denial of service attacks in a wireless sensor network can be achieved, and the security of the wireless sensor network can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 The method flowchart of the present application;
[0028] Figure 2 The overall framework schematic diagram of the method of the present application;
[0029] Figure 3 The main structure schematic diagram of the method of the present application;
[0030] Figure 4 The encoder circuit framework schematic diagram of the method of the present application;
[0031] Figure 5 A schematic diagram of a decoder circuit framework for the method of the present application;
[0032] Figure 6 A plot of the running error calculation result for the method of the present application. DETAILED DESCRIPTION
[0033] The present application is further illustrated below in conjunction with the accompanying drawings and examples.
[0034] The object of the present application is to provide a method based on quantum long short-term memory autoencoder (QLSTM-AE) for detecting denial of service attacks in wireless sensor networks. The present application combines quantum computing and classical deep learning techniques, using a quantum neural network as an encoder and a classical LSTM as a decoder, effectively improving the accuracy and efficiency of network attack detection.
[0035] A hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks for detecting denial of service attacks in wireless sensor networks, comprising the following steps:
[0036] S1: Initialize input data X, representing network traffic data in a wireless sensor network;
[0037] S2: Use the input data X as the input of the encoder part of the quantum long short-term memory autoencoder (QLSTM-AE), and process it through the quantum neural network of the quantum LSTM encoder to generate the implicit feature representation X;
[0038] S3: Decode the implicit feature representation X using a classical LSTM decoder to generate decoded data Y, representing the reconstructed data of network traffic;
[0039] S4: Calculate the reconstruction error between the input data X and the decoded data Y to determine whether there is an anomaly in the network traffic, and 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 through a variational quantum circuit, in which the quantum neural network uses quantum gate operations to process the input data.
[0041] The classical LSTM decoder is implemented through a classical computing device, taking the output of the quantum encoder as input and performing recovery processing of the time series data.
[0042] The reconstruction error is calculated using mean square error (MSE) as an indicator 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 gradient descent method is used to adjust the parameters of the quantum circuit and classical network.
[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 is 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 is used to receive the implicit feature representation and recover 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 recovered 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 DoS attacks based on the error value.
[0051] The parameters of the quantum LSTM encoder and 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: an encoder and a decoder. The encoder uses a quantum long short-term memory network, and the decoder uses a 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 a classical LSTM network and calculates the reconstruction error.
[0056] 3. When the reconstruction error between network traffic data and 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: The data is encoded by a quantum long short-term memory network (QLSTM), generating a hidden feature representation. Due to the parallelism and efficiency of quantum computing, the encoding process can quickly and accurately capture the timing features in the data.
[0060] 3. Decoding process: The hidden features are input into a classical long short-term memory network for decoding, generating recovered data similar to the input data.
[0061] 4. Reconstruction error calculation: By calculating the difference between the input data and the recovered data (i.e., reconstruction error), it is detected whether there is an anomaly in the network data. If the error exceeds a certain threshold, it is determined to be abnormal.
[0062] Quantum encoder combined with classical decoder:
[0063] 1. Quantum encoder: The quantum long short-term memory network can handle complex time series data and has stronger parallel computing capabilities, which can capture deep features of data in high-dimensional space. The encoder part uses quantum gate operations to build quantum circuits for data compression, converting data into low-dimensional hidden variable representation.
[0064] 2. Classical decoder: The classical LSTM network recovers network traffic data from the hidden feature representation output by the quantum encoder through long-term dependence and memory capability, further evaluating whether an attack has occurred.
[0065] Loss function optimization:
[0066] 1. Quantum computing loss function: The loss function measures the similarity between the input data and the decoder output data to evaluate the accuracy of anomaly detection. Quantum fidelity is used to calculate the loss function, and when the fidelity approaches 1, it indicates that the decoder recovered data is highly similar to the input data, and the detection result is better.
[0067] 2. Optimization process: Through backpropagation and gradient descent method, the parameters of quantum encoder and classical decoder are optimized, gradually reducing the reconstruction error.
Claims
1. A hybrid classical-quantum autoencoder method for DoS attack detection in wireless sensor networks, characterized by: The steps include: Step 1: Initialize input data X, where data X represents network traffic data in the wireless sensor network; Step 2: The input data X is used as the input of the encoder part of the quantum long short-term memory autoencoder QLSTM-AE. After being processed by the encoder’s quantum neural network, the implicit feature representation X is generated. The quantum long short-term memory autoencoder consists of two parts: an encoder and a decoder. The encoder uses a quantum long short-term memory network, and the decoder uses 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 the data from the encoded implicit features through the long short-term memory network and calculates the reconstruction error. Step 3: Use the decoder to decode the implicit feature representation X and generate decoded data Y, which represents the reconstructed data of the network traffic; Step 4: Determine whether there is any anomaly 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, a DoS attack exists.
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 encoder is implemented through a variational quantum circuit, where a quantum neural network uses quantum gate operations to process input data.
3. The 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 time series data recovery processing.
4. The 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 the mean square error (MSE) as an indicator for measuring reconstruction accuracy.
5. The 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 using the gradient descent method.
6. A computer program, characterized in that The computer program enables a computer to execute the method according to any one of claims 1 to 5.
7. 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 performs the method according to any one of claims 1 to 5.
8. 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 5 is implemented.
9. 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 the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Network traffic anomaly detection method and device and medium
CN111031051A
QLSTM-based short-term photovoltaic power generation power prediction method and device
CN118568572A