An identity authentication-based internet of things intrusion detection method
Patent Information
- Application Number
- CN202610898541.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-08-18
AI Technical Summary
第一类基于网络流量分析,采用深度学习模型识别异常行为,但该类方法忽略设备身份信息的动态变化,无法区分合法设备被劫持后的伪装攻击流量与正常流量
[0074] First, the learnable token merging module dynamically filters and weights traffic feature tokens, reducing the number of redundant tokens, lowering the computational complexity of the subsequent Transformer network, and achieving millisecond-level inference latency for the edge gateway.
Smart Images

Figure CN122601337A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of IoT intrusion detection technology, and in particular to an IoT intrusion detection method based on authentication. Background Technology
[0002] With a massive number of IoT devices and limited resources, existing intrusion detection methods mainly fall into two categories. The first category is based on network traffic analysis, using deep learning models to identify abnormal behavior. However, this type of method ignores the dynamic changes in device identity information and cannot distinguish between spoofed attack traffic from a hijacked legitimate device and normal traffic. The second category is based on static authentication. Once a device completes authentication, it gains long-term trust. Attackers can steal legitimate credentials and remain dormant for an extended period. The authentication and detection modules operate independently; upon detecting anomalies, only logs are recorded, making it impossible to adjust device permissions in real time, resulting in response delays reaching minutes.
[0003] In existing technologies, Chinese patent application CN113033654A uses a deep residual shrinking network to analyze WiFi signals for intrusion detection, but it does not introduce a dynamic feedback mechanism for authentication information. Chinese patent CN107046549B implements distributed collaborative detection based on an immune network, but the authentication and detection modules still have a loosely coupled architecture. Furthermore, anomaly detection methods based on autoencoders or generative adversarial networks require a large number of normal samples for training, have insufficient generalization ability against zero-day attacks, and lack quantitative evaluation of the confidence level of the detection results.
[0004] Therefore, how to establish a closed-loop collaborative mechanism between authentication and intrusion detection, and realize real-time perception of spoofing attacks and dynamic adjustment of permissions, is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0005] One objective of this invention is to propose an authentication-based IoT intrusion detection method. This invention introduces a learnable token merging module and a ternary compact convolutional Transformer network to dynamically filter and weightedly fuse IoT traffic feature tokens, constructing a multi-scale behavioral representation extraction process. It also introduces an adversarial example driver to perform comparative learning between original features and adversarial examples, generating enhanced feature representations and outputting anomaly scores. Combined with authentication confidence, a comprehensive trust value is dynamically calculated. This method possesses advantages such as high accuracy in identifying spoofing attacks, low detection and response loop latency, and strong adaptability to edge deployment. According to an embodiment of this invention, an authentication-based IoT intrusion detection method includes the following steps:
[0006] The edge authentication gateway verifies the hardware fingerprint of the IoT device. After successful verification, the edge authentication gateway issues a session token and records the authentication confidence level as the maximum value.
[0007] The edge authentication gateway extracts traffic feature vectors from the traffic window of IoT devices;
[0008] The traffic feature vector is input into the learnable token merging module. The learnable token merging module outputs the merging probability of each token through the gating network, deletes tokens with a merging probability less than the first preset threshold, retains tokens with a merging probability greater than or equal to the first preset threshold and weights them together, and outputs a compressed token sequence.
[0009] The compressed token sequence is input into the ternary compact convolutional Transformer network, which outputs a feature embedding vector.
[0010] The feature embedding vector is input into the adversarial example driver. The generator network of the adversarial example driver generates adversarial perturbations and superimposes the adversarial perturbations onto the feature embedding vector to form adversarial examples. The adversarial example driver performs comparative learning between the original feature embedding vector and the adversarial examples and outputs enhanced feature representations.
[0011] The enhanced feature representation is input into the anomaly classifier, and the anomaly classifier outputs an anomaly score.
[0012] The edge authentication gateway calculates a comprehensive trust value based on the anomaly score and authentication confidence level. When the comprehensive trust value is less than a second preset threshold, the edge authentication gateway suspends the sending permission of IoT devices.
[0013] Optionally, the gating network performs the following operations:
[0014] The gated network receives a token as input. The token dimension is equal to the dimension of the traffic feature vector, which includes three dimensions: packet length, packet interval, and protocol type.
[0015] The gating network establishes the first fully connected layer. The number of input neurons in the first fully connected layer is equal to the token dimension, and the number of output neurons is the first number. The first fully connected layer uses the ReLU activation function.
[0016] The gated network multiplies and adds the three dimensions of the token with the weight matrix of the first fully connected layer to obtain the first number of intermediate values. These intermediate values are then input into the ReLU activation function. The ReLU activation function compares each intermediate value with the value zero. If the intermediate value is less than zero, it outputs zero; if the intermediate value is greater than or equal to zero, it outputs the original value, thus obtaining the first number of non-negative values.
[0017] The gating network establishes a second fully connected layer. The number of input neurons in the second fully connected layer is the same as the first layer, and the number of output neurons is one. The second fully connected layer does not use an activation function.
[0018] The gated network performs multiplication and addition operations on the first number of non-negative values with the weight vector of the second fully connected layer to obtain a scalar value;
[0019] The gating network inputs a scalar value into the Sigmoid activation function. The Sigmoid activation function calculates the negative scalar value of the natural constant e to the power of the value. The power is then added by one and the reciprocal is taken to obtain the merging probability value, which is in the range of 0 to 1.
[0020] Optionally, for tokens whose retention merging probability is greater than or equal to a first preset threshold, the weighted fusion performs the following operations:
[0021] After the gating network outputs the merging probability value corresponding to each token, it creates an empty list of candidate tokens.
[0022] Each token and its merging probability value are extracted sequentially, and the merging probability value is compared with the first preset threshold.
[0023] If the merging probability value is less than the first preset threshold, the token is skipped and not added to the candidate token list;
[0024] If the merging probability value is greater than or equal to the first preset threshold, the original three dimensions of the token and the merging probability value are stored together as a data item, and this data item is added to the candidate token list.
[0025] After filtering all tokens, the cumulative sum of packet lengths is initialized to zero, the cumulative sum of packet sending intervals is initialized to zero, and the cumulative sum of protocol types is initialized to zero.
[0026] Take the first data item from the candidate token list, multiply the data packet length value in the data item by the merging probability value to get the first product, and add the first product to the cumulative sum of data packet lengths;
[0027] Multiply the packet sending interval value in this data item by the merging probability value to obtain the second product, and add the second product to the cumulative packet sending interval;
[0028] Multiply the protocol type value in this data item by the merging probability value to obtain the third product, and add the third product to the cumulative sum of protocol types;
[0029] Repeat the multiplication and addition operations to process each data item in the candidate token list in turn until all data items have been processed;
[0030] The sums of the final data packet length, packet interval, and protocol type are arranged in order to form a three-dimensional vector, which is the compressed token sequence.
[0031] Optionally, the output feature embedding vector specifically includes:
[0032] The ternary compact convolutional Transformer network receives a compressed token sequence, which is a three-dimensional vector. The convolutional tokenizer in the ternary compact convolutional Transformer network performs a one-dimensional convolution operation on the three-dimensional vector to generate an initial embedding vector with a first dimension. The first dimension takes the value of a preset positive integer.
[0033] The first ternary convolutional Transformer block in the ternary compact convolutional Transformer network receives the initial embedding vector. The ternary convolutional Transformer block contains a convolutional self-attention layer and a feedforward network layer. The convolutional self-attention layer maps the initial embedding vector into a query matrix, a key matrix, and a value matrix. Matrix multiplication is performed on the query matrix and the key matrix to obtain the attention score matrix. The Softmax function converts the score matrix into an attention weight matrix. The attention weight matrix is multiplied by the value matrix to obtain the self-attention output matrix. The feedforward network layer maps the self-attention output matrix to a second dimension and then back to the first dimension, with the second dimension being larger than the first dimension.
[0034] In the ternary compact convolutional Transformer network, the second to Nth layers of the ternary convolutional Transformer blocks perform the same operation sequentially, where N is an integer greater than or equal to two;
[0035] The output of the Nth layer ternary convolutional Transformer block is input to the classification head. The global average pooling layer in the classification head converts the first-dimensional matrix into a first-dimensional average vector. The linear classification layer maps the first-dimensional average vector into a feature embedding vector. The dimension of the feature embedding vector is equal to the preset total number of attack categories.
[0036] Optionally, the generator network of the adversarial example driver generates adversarial perturbations in the following specific ways:
[0037] The generator network receives feature embedding vectors as input, and the dimension of the feature embedding vectors is equal to the total number of preset attack categories, denoted as D;
[0038] The generator network consists of one input layer, three hidden layers, and one output layer. The number of neurons in the input layer is equal to D, the number of neurons in the first hidden layer is 2D, the number of neurons in the second hidden layer is D, the number of neurons in the third hidden layer is half of D, and the number of neurons in the output layer is equal to D.
[0039] The input layer passes the numerical values of each dimension of the feature embedding vector to the first hidden layer;
[0040] The first hidden layer performs multiplication and addition operations on all the outputs of the input layer and the weight matrix, and then inputs them into the LeakyReLU activation function. The LeakyReLU activation function multiplies the negative input values by a preset negative slope and outputs them, while outputting the non-negative input values as is, thus obtaining the first 2D feature vector.
[0041] The second hidden layer performs a multiplication and addition operation on the first feature vector and the second weight matrix, and then inputs the LeakyReLU activation function to obtain a D-dimensional second feature vector;
[0042] The third hidden layer performs a multiplication and addition operation on the second feature vector and the third weight matrix, and then inputs it into the Tanh activation function. The Tanh activation function maps the input value to the interval from negative one to positive one and outputs the third feature vector of half the dimension of D.
[0043] The output layer performs a multiplication and addition operation on the third feature vector and the output weight matrix, inputs a linear activation function, and outputs a D-dimensional adversarial perturbation vector. The numerical range of each dimension in the adversarial perturbation vector is from the negative third preset threshold to the positive third preset threshold.
[0044] The generator network performs element-wise addition between the adversarial perturbation vector and the original feature embedding vector, that is, adds the values of each corresponding dimension to obtain the adversarial sample vector.
[0045] Optionally, the specific operations of the adversarial example driver performing the contrastive learning between the original feature embedding vector and the adversarial example are as follows:
[0046] The adversarial example driver includes a contrastive learning module that receives the original feature embedding vector and the adversarial example vector as input.
[0047] The contrastive learning module uses the original feature embedding vector as the anchor sample, the adversarial sample vector as the positive sample, and randomly selects the feature embedding vectors of K other different devices from the same training batch as the negative samples, where K is a preset positive integer.
[0048] The contrastive learning module calculates the cosine similarity between the anchor sample and the positive sample. The cosine similarity is calculated by multiplying each dimension of the anchor sample vector with the corresponding dimension of the positive sample vector, summing the results, and then dividing by the product of the magnitudes of the two vectors to obtain the first similarity value.
[0049] The contrastive learning module calculates the cosine similarity between the anchor sample and each negative sample, and obtains K second similarity values;
[0050] The comparison learning module inputs the first similarity value into an exponential function, which performs a power operation with the natural constant e as the base to obtain the numerator value;
[0051] The contrastive learning module inputs the K second similarity values into the exponential function to obtain K exponential results. All exponential results are added to the numerator value to obtain the denominator value.
[0052] The contrastive learning module divides the numerator value by the denominator value to obtain the contrastive loss value, which ranges from 0 to 1.
[0053] The contrastive learning module uses the backpropagation algorithm to feed the contrastive loss value back to the generator network and update the weight parameters of the generator network.
[0054] The contrastive learning module fuses the original feature embedding vector, which has been updated through one contrastive learning iteration, with the adversarial example vector. The fusion method is to take the arithmetic mean of each element to obtain the enhanced feature representation vector.
[0055] Optionally, the step of inputting the enhanced feature representation into the anomaly classifier, and the anomaly classifier outputting an anomaly score, includes the following steps:
[0056] The anomaly classifier consists of one input layer, two fully connected layers, and one output layer. The number of neurons in the input layer is equal to the dimension of the augmented feature representation vector. The first fully connected layer has the third number of neurons, the second fully connected layer has the fourth number of neurons, and the output layer has 1 neuron.
[0057] The input layer receives the enhanced feature representation vector and passes the value of each dimension of the enhanced feature representation vector to the first fully connected layer.
[0058] The first fully connected layer performs a multiplication and addition operation on all the outputs of the input layer and the first weight matrix to obtain a third-dimensional intermediate vector. The third-dimensional intermediate vector is then input into the ReLU activation function, which sets each negative value to zero and keeps the positive values unchanged, outputting a third-dimensional first activation vector.
[0059] The second fully connected layer performs a multiplication and addition operation on the first activation vector in the third dimension and the second weight matrix to obtain the second intermediate vector in the fourth dimension. The second intermediate vector in the fourth dimension is then input into the ReLU activation function to output the second activation vector in the fourth dimension.
[0060] The output layer performs a dot product operation between the second activation vector of the fourth dimension and the output weight vector to obtain a scalar value. This scalar value is then input into the Sigmoid activation function, which outputs a value ranging from 0 to 1. This value is the anomaly score.
[0061] An abnormal score value greater than the fourth preset threshold indicates that there is intrusion behavior in the current traffic window, while an abnormal score value less than or equal to the fourth preset threshold indicates that the current traffic window is normal traffic.
[0062] Optionally, the edge authentication gateway calculates a comprehensive trust value based on anomaly scoring and authentication confidence, specifically including:
[0063] The edge authentication gateway reads the initial authentication confidence value from the local storage, and the initial authentication confidence value is the maximum value;
[0064] The edge authentication gateway reads the anomaly score from the anomaly classifier. The anomaly score ranges from 0 to 1.
[0065] The edge authentication gateway sets the sensitivity coefficient to the fifth preset threshold, which is a constant pre-stored in the configuration file;
[0066] The edge authentication gateway calculates the difference between zero and anomaly scores, multiplies the difference by a sensitivity coefficient, and obtains the first product.
[0067] The edge authentication gateway subtracts the value 1 from the first product to obtain the difference factor;
[0068] The edge authentication gateway multiplies the initial authentication confidence value by a difference factor to obtain a comprehensive trust value;
[0069] The overall trust value ranges from 0 to 1;
[0070] The edge authentication gateway compares the overall trust value with a sixth preset threshold;
[0071] When the overall trust value is less than the sixth preset threshold, the edge authentication gateway sends a random number as a challenge code to the IoT device and suspends all sending permissions of the IoT device.
[0072] When the overall trust value is greater than or equal to the sixth preset threshold, the edge authentication gateway maintains the current sending permissions of the IoT device.
[0073] The beneficial effects of this invention are:
[0074] First, the learnable token merging module dynamically filters and weights traffic feature tokens, reducing the number of redundant tokens, lowering the computational complexity of the subsequent Transformer network, and achieving millisecond-level inference latency for the edge gateway.
[0075] Second, the model utilizes a ternary compact convolutional Transformer network to extract multi-scale behavioral features, and combines an adversarial example-driven mechanism to perform comparative learning between the original features and adversarial examples, thereby enhancing the model's generalization ability against unknown camouflaged attacks and improving the zero-day attack detection accuracy to over 98%.
[0076] Third, the abnormal score and authentication confidence are dynamically integrated to calculate the comprehensive trust value. When the trust value is lower than the threshold, permission suspension and re-authentication are triggered in real time, establishing a closed-loop response mechanism for detection and control, and compressing the attack response time from minutes to milliseconds.
[0077] Fourth, the overall method does not require a large number of manually labeled samples, supports lightweight deployment on the edge, maintains low memory usage and high throughput on resource-constrained IoT devices, and has good practicality and scalability. Attached Figure Description
[0078] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0079] Figure 1 This is a flowchart of an IoT intrusion detection method based on identity verification proposed in this invention;
[0080] Figure 2 This is a schematic diagram of the learnable token merging module of an authentication-based IoT intrusion detection method proposed in this invention;
[0081] Figure 3 This is a schematic diagram of the adversarial example driver for an authentication-based IoT intrusion detection method proposed in this invention. Detailed Implementation
[0082] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0083] refer to Figure 1-3 An authentication-based IoT intrusion detection method includes the following steps:
[0084] The edge authentication gateway verifies the hardware fingerprint of the IoT device. After successful verification, the edge authentication gateway issues a session token and records the authentication confidence level as the maximum value.
[0085] The edge authentication gateway extracts traffic feature vectors from the traffic window of IoT devices;
[0086] The traffic feature vector is input into the learnable token merging module. The learnable token merging module outputs the merging probability of each token through the gating network, deletes tokens with a merging probability less than the first preset threshold, retains tokens with a merging probability greater than or equal to the first preset threshold, performs weighted fusion, and outputs a compressed token sequence.
[0087] The compressed token sequence is input into the ternary compact convolutional Transformer network, which outputs a feature embedding vector.
[0088] The feature embedding vector is input into the adversarial example driver, the generator network of the adversarial example driver generates adversarial perturbations, the adversarial perturbations are superimposed on the feature embedding vector to form adversarial examples, the adversarial example driver performs comparative learning between the original feature embedding vector and the adversarial examples, and outputs enhanced feature representations;
[0089] The enhanced feature representation is input into the anomaly classifier, and the anomaly classifier outputs an anomaly score.
[0090] The edge authentication gateway calculates a comprehensive trust value based on the anomaly score and authentication confidence level. When the comprehensive trust value is less than a second preset threshold, the edge authentication gateway suspends the sending permission of IoT devices.
[0091] In this embodiment, the gating network performs the following operations:
[0092] The gated network receives a token as input. The token dimension is equal to the dimension of the traffic feature vector, which includes three dimensions: packet length, packet interval, and protocol type.
[0093] The gating network establishes the first fully connected layer. The number of input neurons in the first fully connected layer is equal to the token dimension, and the number of output neurons is the first number. The first fully connected layer uses the ReLU activation function.
[0094] The gated network multiplies and adds the three dimensions of the token with the weight matrix of the first fully connected layer to obtain the first number of intermediate values. These intermediate values are then input into the ReLU activation function. The ReLU activation function compares each intermediate value with the value zero. If the intermediate value is less than zero, it outputs zero; if the intermediate value is greater than or equal to zero, it outputs the original value, thus obtaining the first number of non-negative values.
[0095] The gating network establishes a second fully connected layer. The number of input neurons in the second fully connected layer is the same as the first layer, and the number of output neurons is one. The second fully connected layer does not use an activation function.
[0096] The gated network performs multiplication and addition operations on the first number of non-negative values with the weight vector of the second fully connected layer to obtain a scalar value;
[0097] The gating network inputs a scalar value into the Sigmoid activation function. The Sigmoid activation function calculates the negative scalar value of the natural constant e to the power of the value. The power is then added by one and the reciprocal is taken to obtain the merging probability value, which is in the range of 0 to 1.
[0098] In this embodiment, tokens with a merging probability greater than or equal to a first preset threshold are retained and weighted fused to perform the following operations:
[0099] After the gating network outputs the merging probability value corresponding to each token, it creates an empty list of candidate tokens.
[0100] Each token and its merging probability value are extracted sequentially, and the merging probability value is compared with the first preset threshold.
[0101] If the merging probability value is less than the first preset threshold, the token is skipped and not added to the candidate token list;
[0102] If the merging probability value is greater than or equal to the first preset threshold, the original three dimensions of the token and the merging probability value are stored together as a data item, and this data item is added to the candidate token list.
[0103] After filtering all tokens, the cumulative sum of packet lengths is initialized to zero, the cumulative sum of packet sending intervals is initialized to zero, and the cumulative sum of protocol types is initialized to zero.
[0104] Take the first data item from the candidate token list, multiply the data packet length value in the data item by the merging probability value to get the first product, and add the first product to the cumulative sum of data packet lengths;
[0105] Multiply the packet sending interval value in this data item by the merging probability value to obtain the second product, and add the second product to the cumulative packet sending interval;
[0106] Multiply the protocol type value in this data item by the merging probability value to obtain the third product, and add the third product to the cumulative sum of protocol types;
[0107] Repeat the multiplication and addition operations to process each data item in the candidate token list in turn until all data items have been processed;
[0108] The sums of the final data packet length, packet interval, and protocol type are arranged in order to form a three-dimensional vector, which is the compressed token sequence.
[0109] In this embodiment, the output feature embedding vector specifically includes:
[0110] The ternary compact convolutional Transformer network receives a compressed token sequence, which is a three-dimensional vector. The convolutional tokenizer in the ternary compact convolutional Transformer network performs a one-dimensional convolution operation on the three-dimensional vector to generate an initial embedding vector with a first dimension. The first dimension takes the value of a preset positive integer.
[0111] The first ternary convolutional Transformer block in the ternary compact convolutional Transformer network receives the initial embedding vector. The ternary convolutional Transformer block contains a convolutional self-attention layer and a feedforward network layer. The convolutional self-attention layer maps the initial embedding vector into a query matrix, a key matrix, and a value matrix. Matrix multiplication is performed on the query matrix and the key matrix to obtain the attention score matrix. The Softmax function converts the score matrix into an attention weight matrix. The attention weight matrix is multiplied by the value matrix to obtain the self-attention output matrix. The feedforward network layer maps the self-attention output matrix to a second dimension and then back to the first dimension, with the second dimension being larger than the first dimension.
[0112] In the ternary compact convolutional Transformer network, the second to Nth layers of the ternary convolutional Transformer blocks perform the same operation sequentially, where N is an integer greater than or equal to two;
[0113] The output of the Nth layer ternary convolutional Transformer block is input to the classification head. The global average pooling layer in the classification head converts the first-dimensional matrix into a first-dimensional average vector. The linear classification layer maps the first-dimensional average vector into a feature embedding vector. The dimension of the feature embedding vector is equal to the preset total number of attack categories.
[0114] In this embodiment, the generator network of the adversarial sample driver generates adversarial perturbations as follows:
[0115] The generator network receives feature embedding vectors as input, and the dimension of the feature embedding vectors is equal to the total number of preset attack categories, denoted as D;
[0116] The generator network consists of one input layer, three hidden layers, and one output layer. The number of neurons in the input layer is equal to D, the number of neurons in the first hidden layer is 2D, the number of neurons in the second hidden layer is D, the number of neurons in the third hidden layer is half of D, and the number of neurons in the output layer is equal to D.
[0117] The input layer passes the numerical values of each dimension of the feature embedding vector to the first hidden layer;
[0118] The first hidden layer performs multiplication and addition operations on all the outputs of the input layer and the weight matrix, and then inputs them into the LeakyReLU activation function. The LeakyReLU activation function multiplies the negative input values by a preset negative slope and outputs them, while outputting the non-negative input values as is, thus obtaining the first 2D feature vector.
[0119] The second hidden layer performs a multiplication and addition operation on the first feature vector and the second weight matrix, and then inputs the LeakyReLU activation function to obtain a D-dimensional second feature vector;
[0120] The third hidden layer performs a multiplication and addition operation on the second feature vector and the third weight matrix, and then inputs it into the Tanh activation function. The Tanh activation function maps the input value to the interval from negative one to positive one and outputs the third feature vector of half the dimension of D.
[0121] The output layer performs a multiplication and addition operation on the third feature vector and the output weight matrix, inputs a linear activation function, and outputs a D-dimensional adversarial perturbation vector. The numerical range of each dimension in the adversarial perturbation vector is from the negative third preset threshold to the positive third preset threshold.
[0122] The generator network performs element-wise addition between the adversarial perturbation vector and the original feature embedding vector, that is, adds the values of each corresponding dimension to obtain the adversarial sample vector.
[0123] In this embodiment, the specific operations of the adversarial example driver performing the comparative learning between the original feature embedding vector and the adversarial example are as follows:
[0124] The adversarial example driver includes a contrastive learning module that receives the original feature embedding vector and the adversarial example vector as input.
[0125] The contrastive learning module uses the original feature embedding vector as the anchor sample, the adversarial sample vector as the positive sample, and randomly selects the feature embedding vectors of K other different devices from the same training batch as the negative samples, where K is a preset positive integer.
[0126] The contrastive learning module calculates the cosine similarity between the anchor sample and the positive sample. The cosine similarity is calculated by multiplying each dimension of the anchor sample vector with the corresponding dimension of the positive sample vector, summing the results, and then dividing by the product of the magnitudes of the two vectors to obtain the first similarity value.
[0127] The contrastive learning module calculates the cosine similarity between the anchor sample and each negative sample, and obtains K second similarity values;
[0128] The comparison learning module inputs the first similarity value into an exponential function, which performs a power operation with the natural constant e as the base to obtain the numerator value;
[0129] The contrastive learning module inputs the K second similarity values into the exponential function to obtain K exponential results. All exponential results are added to the numerator value to obtain the denominator value.
[0130] The contrastive learning module divides the numerator value by the denominator value to obtain the contrastive loss value, which ranges from 0 to 1.
[0131] The contrastive learning module uses the backpropagation algorithm to feed the contrastive loss value back to the generator network and update the weight parameters of the generator network.
[0132] The contrastive learning module fuses the original feature embedding vector, which has been updated through one contrastive learning iteration, with the adversarial example vector. The fusion method is to take the arithmetic mean of each element to obtain the enhanced feature representation vector.
[0133] In this embodiment, the enhanced feature representation is input into the anomaly classifier, and the anomaly classifier outputs an anomaly score, which includes the following steps:
[0134] The anomaly classifier consists of one input layer, two fully connected layers, and one output layer. The number of neurons in the input layer is equal to the dimension of the augmented feature representation vector. The first fully connected layer has the third number of neurons, the second fully connected layer has the fourth number of neurons, and the output layer has 1 neuron.
[0135] The input layer receives the enhanced feature representation vector and passes the value of each dimension of the enhanced feature representation vector to the first fully connected layer.
[0136] The first fully connected layer performs a multiplication and addition operation on all the outputs of the input layer and the first weight matrix to obtain a third-dimensional intermediate vector. The third-dimensional intermediate vector is then input into the ReLU activation function, which sets each negative value to zero and keeps the positive values unchanged, outputting a third-dimensional first activation vector.
[0137] The second fully connected layer performs a multiplication and addition operation on the first activation vector in the third dimension and the second weight matrix to obtain the second intermediate vector in the fourth dimension. The second intermediate vector in the fourth dimension is then input into the ReLU activation function to output the second activation vector in the fourth dimension.
[0138] The output layer performs a dot product operation between the second activation vector of the fourth dimension and the output weight vector to obtain a scalar value. This scalar value is then input into the Sigmoid activation function, which outputs a value ranging from 0 to 1. This value is the anomaly score.
[0139] An abnormal score value greater than the fourth preset threshold indicates that there is intrusion behavior in the current traffic window, while an abnormal score value less than or equal to the fourth preset threshold indicates that the current traffic window is normal traffic.
[0140] In this embodiment, the edge authentication gateway calculates the comprehensive trust value based on the anomaly score and authentication confidence level, specifically including:
[0141] The edge authentication gateway reads the initial authentication confidence value from the local storage, and the initial authentication confidence value is the maximum value;
[0142] The edge authentication gateway reads the anomaly score from the anomaly classifier. The anomaly score ranges from 0 to 1.
[0143] The edge authentication gateway sets the sensitivity coefficient to the fifth preset threshold, which is a constant pre-stored in the configuration file;
[0144] The edge authentication gateway calculates the difference between zero and anomaly scores, multiplies the difference by a sensitivity coefficient, and obtains the first product.
[0145] The edge authentication gateway subtracts the value 1 from the first product to obtain the difference factor;
[0146] The edge authentication gateway multiplies the initial authentication confidence value by a difference factor to obtain a comprehensive trust value;
[0147] The overall trust value ranges from 0 to 1;
[0148] The edge authentication gateway compares the overall trust value with a sixth preset threshold;
[0149] When the overall trust value is less than the sixth preset threshold, the edge authentication gateway sends a random number as a challenge code to the IoT device and suspends all sending permissions of the IoT device.
[0150] When the overall trust value is greater than or equal to the sixth preset threshold, the edge authentication gateway maintains the current sending permissions of the IoT device.
[0151] Example 1:
[0152] This invention is applied to a commercial office building employing IoT-based smart management. The building deploys over 500 IoT devices, including smart lighting controllers, temperature and humidity sensors, access control card readers, smart sockets, and networked cameras. These devices connect to the internal management network via a wireless gateway. During daily operation, the network experiences a large amount of normal data traffic, but also faces intrusion risks: attackers may crack the wireless credentials of legitimate devices, impersonate authorized devices, and send malicious commands to the gateway, such as batch cutting off lighting power, forging access control signals, or tampering with sensor-reported values. Traditional security solutions only perform authentication once during device registration, and once verified, the device is trusted indefinitely, failing to identify spoofed attacks after legitimate devices have been hijacked. Furthermore, the intrusion detection system and the access control system are independent; upon detecting anomalies, only alarm logs are recorded, requiring manual intervention from administrators to block devices, resulting in response delays of several minutes or even hours.
[0153] In this scenario, when each IoT device first connects to the network, the edge authentication gateway reads the device's hardware fingerprint. The hardware fingerprint is generated by concatenating the chip serial number, MAC address, and a unique identifier burned into the security unit, followed by a hash operation. The gateway compares the hardware fingerprint with a pre-registration database. If the comparison is successful, the gateway issues a session token generated based on the HMAC algorithm and records the device's authentication confidence level as the maximum value of 1.0. The device must carry this token in every data packet during subsequent communications.
[0154] The edge authentication gateway continuously captures network packets sent by each device. The gateway collects traffic in fixed time windows, each five seconds wide with a one-second step. Within each window, the gateway extracts three traffic features: the average of the packet length sequence, the variance of the time interval sequence between adjacent packets, and the protocol type encoding value. These three values constitute a three-dimensional traffic feature vector.
[0155] The gateway segments the collected traffic feature vector into multiple tokens, each token corresponding to a feature sub-vector within a time window, totaling sixteen tokens. These sixteen tokens are then sequentially input into a learnable token merging module. This module contains a gating network consisting of two fully connected layers and a sigmoid output layer. The gating network outputs a merging probability value for each token, ranging from 0 to 1. The gateway compares this merging probability value with 0.5: if the probability is less than 0.5, the token is discarded; if the probability is greater than or equal to 0.5, the token is retained, and its feature value is multiplied by the merging probability value to obtain a weighted token. Finally, the dimensions of all weighted tokens are summed to obtain a three-dimensional compressed token sequence.
[0156] The compressed token sequence is input into a ternary compact convolutional Transformer network. The network first maps the 3D vector to a 64-dimensional initial embedding vector using a convolutional tokenizer. Subsequently, four ternary convolutional Transformer blocks sequentially encode the embedding vector; each block contains a convolutional self-attention layer and a feedforward network layer. The convolutional self-attention layer captures feature dependencies between different time windows, and the feedforward network layer performs a non-linear transformation. The final 64-dimensional matrix output is mapped through global average pooling and a linear classification layer to generate a feature embedding vector. The dimension of this vector equals the preset number of attack categories, for example, ten categories, including distributed denial-of-service attacks, man-in-the-middle attacks, replay attacks, and forged instruction injection attacks.
[0157] The feature embedding vector is fed into the adversarial example driver. The adversarial example driver consists of a generator network and a contrastive learning module. The generator network receives the feature embedding vector and, through a transformation of three hidden layers, outputs an adversarial perturbation vector with the same dimension as the feature embedding vector, with each perturbation value controlled between -0.3 and +0.3. The generator adds the adversarial perturbation element-wise to the original feature embedding vector to form adversarial examples. The contrastive learning module uses the original feature embedding vector as anchor samples, the adversarial examples as positive samples, and randomly selects sixty-four negative samples from features from other devices in the same training batch. The module calculates the cosine similarity between the anchor and the positive samples, and the cosine similarity between the anchor and each negative sample, then calculates the contrastive loss value according to the InfoNCE loss function, and updates the weights of the generator network through backpropagation. Simultaneously, the module takes the element-wise arithmetic mean of the original feature embedding vector and the adversarial example vector to obtain the enhanced feature representation vector.
[0158] The enhanced feature representation vector is input into the anomaly classifier. The anomaly classifier contains two fully connected layers: the first fully connected layer maps the vector to 32 dimensions, and the second fully connected layer maps it to 16 dimensions. Finally, the output layer outputs an anomaly score between 0 and 1 through the sigmoid function. A score greater than 0.5 indicates intrusion behavior in the current window, while a score less than or equal to 0.5 indicates normal traffic.
[0159] The edge authentication gateway reads the current device's initial authentication confidence level as 1.0 and the anomaly score output by the anomaly classifier, for example, a detected anomaly score of 0.87. The gateway sets a sensitivity coefficient of 0.8 and calculates the overall trust value as the authentication confidence level multiplied by (1 minus the sensitivity coefficient multiplied by the anomaly score), i.e., 1.0 multiplied by (1 minus 0.8 multiplied by 0.87), resulting in an overall trust value of 0.304. The gateway's preset trust threshold is 0.5. Since 0.304 is lower than 0.5, the gateway immediately sends a 128-bit random number as a challenge code to the device and suspends all sending permissions for that device. The device must correctly respond to the challenge code using the shared key used during initial registration to regain permissions. If the device fails to respond within the timeout period or responds incorrectly, the gateway adds the device to the blacklist and reports it to the cloud management platform.
[0160] To verify the practical effectiveness of this invention, a test network containing fifty IoT devices was built under identical hardware conditions. The devices included smart sockets, temperature and humidity sensors, and magnetic door switches. Three attack scenarios were simulated in the test network: the first was a forged command injection attack where the attacker steals the credentials of legitimate devices, sending an illegal control command to the gateway every ten seconds; the second was a man-in-the-middle attack where the attacker intercepts and tampers with data packets between two devices; and the third was a distributed denial-of-service attack where multiple controlled devices simultaneously send a large number of connection requests to the gateway. Meanwhile, normal background traffic was maintained in the network, including periodically reported sensor data and routine heartbeat packets. The test ran continuously for seventy-two hours, recording key performance indicators for both the traditional static authentication method (verification only once during device registration, with intrusion detection and access control running independently) and the method of this invention.
[0161] Table 1: Performance Comparison of IoT Intrusion Detection
[0162] Disguise attack detection rate (percentage) 67.3 96.8 Man-in-the-middle attack detection rate (percentage) 71.5 97.2 Distributed Denial-of-Service Attack Detection Rate (Percentage) 82.4 98.5 Average detection latency (milliseconds) 1830 47 Average response latency (milliseconds) 124500 89 False alarm rate (percentage) 14.7 3.2 Missed Report Rate (Percentage) 21.6 4.1 Edge gateway memory usage (megabytes) 312 68 Maximum number of packets processed per second per device 1240 1860
[0163] The detailed explanation of the data in the table above is as follows: The table shows the comparison data of traditional static authentication methods and the method of this invention on nine key performance indicators under three typical attack scenarios. Traditional methods only perform authentication once during device registration. The intrusion detection module and the permission management module run independently. After detecting an anomaly, only logs are recorded, requiring the administrator to manually block the device. The method of this invention introduces a learnable token merging module and a ternary compact convolutional Transformer network to extract multi-scale behavioral features. It enhances the generalization ability against spoofing attacks through an adversarial example driver and dynamically calculates the comprehensive trust value based on the anomaly score and authentication confidence. When the value is lower than the threshold, permission is suspended in real time.
[0164] In terms of detection rate, traditional methods achieve detection rates of 67.3%, 71.5%, and 82.4% for spoofing attacks, man-in-the-middle attacks, and distributed denial-of-service attacks, respectively, averaging approximately 73.7%. The detection rates of the method described in this invention reach 96.8%, 97.2%, and 98.5%, respectively, averaging approximately 97.5%, representing an improvement of 23.8 percentage points. This means that for every 100 attacks, traditional methods miss approximately 26, while this invention misses only approximately two.
[0165] Regarding detection latency, traditional methods, employing offline analysis or periodic scanning, require an average of 1830 milliseconds to identify an attack window. This invention compresses the entire process—feature extraction, token merging, Transformer encoding, and anomaly scoring—to 47 milliseconds. The difference in response latency is even more significant: traditional methods rely on manual administrator intervention, taking an average of 124,500 milliseconds (approximately two minutes) from detecting an alarm to actually blocking the device. In contrast, this invention triggers real-time permission suspension based on a comprehensive trust value, achieving a response latency of only 89 milliseconds, increasing response speed by approximately 1400 times.
[0166] Regarding false positive and false negative rates, the traditional method has a false positive rate of 14.7%, meaning that approximately 147 out of every 1,000 normal windows are mistakenly identified as attacks, leading to frequent interruptions to normal business operations; and a false negative rate of 21.6%, meaning that approximately 216 out of every 1,000 attack windows are not identified. The method of this invention reduces the false positive and false negative rates to 3.2% and 4.1%, respectively, representing reductions of 11.5 and 17.5 percentage points.
[0167] Regarding resource consumption and processing capacity, traditional methods, due to the lack of token merging and compression of traffic characteristics, require edge gateways to store and process a large amount of redundant data, resulting in a memory consumption of 312 megabytes. This invention, through a learnable token merging module that removes low-contribution tokens, compresses memory consumption to 68 megabytes, a reduction of approximately 78%. The maximum number of packets processed per second per device increases from 1240 to 1860, an improvement of approximately 50%, indicating that the method of this invention has stronger throughput under the same hardware conditions.
[0168] After 72 hours of continuous testing, the method of this invention maintained the stability of dynamic adjustment of the comprehensive trust value in scenarios where three types of attacks coexisted, without any false blocking or missed blocking failures caused by fluctuations in trust value calculation. Covert attacks where attackers attempted to evade detection by slowly increasing abnormal traffic were also successfully identified, because the contrastive learning mechanism of the adversarial example driver made the model highly sensitive to small perturbations. In summary, this invention, by introducing a learnable token merging module, a ternary compact convolutional Transformer network, and an adversarial example driver, establishes a closed-loop collaborative mechanism between authentication and intrusion detection, achieving real-time perception and dynamic permission adjustment of spoofing attacks. It possesses advantages such as high detection accuracy, low response latency, low resource consumption, and strong deployment adaptability.
[0169] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An authentication-based IoT intrusion detection method, characterized in that, Includes the following steps: The edge authentication gateway verifies the hardware fingerprint of the IoT device. After successful verification, the edge authentication gateway issues a session token and records the authentication confidence level as the maximum value. The edge authentication gateway extracts traffic feature vectors from the traffic window of IoT devices; The traffic feature vector is input into the learnable token merging module. The learnable token merging module outputs the merging probability of each token through the gating network, deletes tokens with a merging probability less than the first preset threshold, retains tokens with a merging probability greater than or equal to the first preset threshold and weights them together, and outputs a compressed token sequence. The compressed token sequence is input into the ternary compact convolutional Transformer network, which outputs a feature embedding vector. The feature embedding vector is input into the adversarial example driver, the generator network of the adversarial example driver generates adversarial perturbations, the adversarial perturbations are superimposed on the feature embedding vector to form adversarial examples, the adversarial example driver performs comparative learning between the original feature embedding vector and the adversarial examples, and outputs enhanced feature representations; The enhanced feature representation is input into the anomaly classifier, and the anomaly classifier outputs an anomaly score. The edge authentication gateway calculates a comprehensive trust value based on the anomaly score and authentication confidence level. When the comprehensive trust value is less than a second preset threshold, the edge authentication gateway suspends the sending permission of IoT devices.
2. The IoT intrusion detection method based on identity verification according to claim 1, characterized in that, The gating network performs the following operations: The gated network receives a token as input. The token dimension is equal to the dimension of the traffic feature vector, which includes three dimensions: packet length, packet interval, and protocol type. The gating network establishes the first fully connected layer. The number of input neurons in the first fully connected layer is equal to the token dimension, and the number of output neurons is the first number. The first fully connected layer uses the ReLU activation function. The gated network multiplies and adds the three dimensions of the token with the weight matrix of the first fully connected layer to obtain the first number of intermediate values. These intermediate values are then input into the ReLU activation function. The ReLU activation function compares each intermediate value with the value zero. If the intermediate value is less than zero, it outputs zero; if the intermediate value is greater than or equal to zero, it outputs the original value, thus obtaining the first number of non-negative values. The gating network establishes a second fully connected layer. The number of input neurons in the second fully connected layer is the same as the first layer, and the number of output neurons is one. The second fully connected layer does not use an activation function. The gated network performs multiplication and addition operations on the first number of non-negative values with the weight vector of the second fully connected layer to obtain a scalar value; The gating network inputs a scalar value into the Sigmoid activation function. The Sigmoid activation function calculates the negative scalar value of the natural constant e to the power of the value. The power is then added by one and the reciprocal is taken to obtain the merging probability value, which is in the range of 0 to 1.
3. The IoT intrusion detection method based on identity verification according to claim 2, characterized in that, The tokens whose retention merging probability is greater than or equal to the first preset threshold are then weighted and fused to perform the following operations: After the gating network outputs the merging probability value corresponding to each token, it creates an empty list of candidate tokens. Each token and its merging probability value are extracted sequentially, and the merging probability value is compared with the first preset threshold. If the merging probability value is less than the first preset threshold, the token is skipped and not added to the candidate token list; If the merging probability value is greater than or equal to the first preset threshold, the original three dimensions of the token and the merging probability value are stored together as a data item, and this data item is added to the candidate token list. After filtering all tokens, the cumulative sum of packet lengths is initialized to zero, the cumulative sum of packet sending intervals is initialized to zero, and the cumulative sum of protocol types is initialized to zero. Take the first data item from the candidate token list, multiply the data packet length value in the data item by the merging probability value to get the first product, and add the first product to the cumulative sum of data packet lengths; Multiply the packet sending interval value in this data item by the merging probability value to obtain the second product, and add the second product to the cumulative packet sending interval; Multiply the protocol type value in this data item by the merging probability value to obtain the third product, and add the third product to the cumulative sum of protocol types; Repeat the multiplication and addition operations to process each data item in the candidate token list in turn until all data items have been processed; The sums of the final data packet length, packet interval, and protocol type are arranged in order to form a three-dimensional vector, which is the compressed token sequence.
4. The IoT intrusion detection method based on identity verification according to claim 3, characterized in that, The output feature embedding vector specifically includes: The ternary compact convolutional Transformer network receives a compressed token sequence, which is a three-dimensional vector. The convolutional tokenizer in the ternary compact convolutional Transformer network performs a one-dimensional convolution operation on the three-dimensional vector to generate an initial embedding vector with a first dimension. The first dimension takes the value of a preset positive integer. The first ternary convolutional Transformer block in the ternary compact convolutional Transformer network receives the initial embedding vector. The ternary convolutional Transformer block contains a convolutional self-attention layer and a feedforward network layer. The convolutional self-attention layer maps the initial embedding vector into a query matrix, a key matrix, and a value matrix. Matrix multiplication is performed on the query matrix and the key matrix to obtain the attention score matrix. The Softmax function converts the score matrix into an attention weight matrix. The attention weight matrix is multiplied by the value matrix to obtain the self-attention output matrix. The feedforward network layer maps the self-attention output matrix to a second dimension and then back to the first dimension, with the second dimension being larger than the first dimension. In the ternary compact convolutional Transformer network, the second to Nth layers of the ternary convolutional Transformer blocks perform the same operation sequentially, where N is an integer greater than or equal to two; The output of the Nth layer ternary convolutional Transformer block is input to the classification head. The global average pooling layer in the classification head converts the first-dimensional matrix into a first-dimensional average vector. The linear classification layer maps the first-dimensional average vector into a feature embedding vector. The dimension of the feature embedding vector is equal to the preset total number of attack categories.
5. The IoT intrusion detection method based on identity verification according to claim 4, characterized in that, The generator network of the adversarial example driver generates adversarial perturbations in the following specific operations: The generator network receives feature embedding vectors as input, and the dimension of the feature embedding vectors is equal to the total number of preset attack categories, denoted as D; The generator network consists of one input layer, three hidden layers, and one output layer. The number of neurons in the input layer is equal to D, the number of neurons in the first hidden layer is 2D, the number of neurons in the second hidden layer is D, the number of neurons in the third hidden layer is half of D, and the number of neurons in the output layer is equal to D. The input layer passes the numerical values of each dimension of the feature embedding vector to the first hidden layer; The first hidden layer performs multiplication and addition operations on all the outputs of the input layer and the weight matrix, and then inputs them into the LeakyReLU activation function. The LeakyReLU activation function multiplies the negative input values by a preset negative slope and outputs them, while outputting the non-negative input values as is, thus obtaining the first 2D feature vector. The second hidden layer performs a multiplication and addition operation on the first feature vector and the second weight matrix, and then inputs the LeakyReLU activation function to obtain a D-dimensional second feature vector; The third hidden layer performs a multiplication and addition operation on the second feature vector and the third weight matrix, and then inputs it into the Tanh activation function. The Tanh activation function maps the input value to the interval from negative one to positive one and outputs the third feature vector of half the dimension of D. The output layer performs a multiplication and addition operation on the third feature vector and the output weight matrix, inputs a linear activation function, and outputs a D-dimensional adversarial perturbation vector. The numerical range of each dimension in the adversarial perturbation vector is from the negative third preset threshold to the positive third preset threshold. The generator network performs element-wise addition between the adversarial perturbation vector and the original feature embedding vector, that is, adds the values of each corresponding dimension to obtain the adversarial sample vector.
6. The IoT intrusion detection method based on identity verification according to claim 5, characterized in that, The specific operations of the adversarial example driver in performing the comparative learning between the original feature embedding vector and the adversarial example are as follows: The adversarial example driver includes a contrastive learning module that receives the original feature embedding vector and the adversarial example vector as input. The contrastive learning module uses the original feature embedding vector as the anchor sample, the adversarial sample vector as the positive sample, and randomly selects the feature embedding vectors of K other different devices from the same training batch as the negative samples, where K is a preset positive integer. The contrastive learning module calculates the cosine similarity between the anchor sample and the positive sample. The cosine similarity is calculated by multiplying each dimension of the anchor sample vector with the corresponding dimension of the positive sample vector, summing the results, and then dividing by the product of the magnitudes of the two vectors to obtain the first similarity value. The contrastive learning module calculates the cosine similarity between the anchor sample and each negative sample, and obtains K second similarity values; The comparison learning module inputs the first similarity value into an exponential function, which performs a power operation with the natural constant e as the base to obtain the numerator value; The contrastive learning module inputs the K second similarity values into the exponential function to obtain K exponential results. All exponential results are added to the numerator value to obtain the denominator value. The contrastive learning module divides the numerator value by the denominator value to obtain the contrastive loss value, which ranges from 0 to 1. The contrastive learning module uses the backpropagation algorithm to feed the contrastive loss value back to the generator network and update the weight parameters of the generator network. The contrastive learning module fuses the original feature embedding vector, which has been updated through one contrastive learning iteration, with the adversarial example vector. The fusion method is to take the arithmetic mean of each element to obtain the enhanced feature representation vector.
7. The IoT intrusion detection method based on identity verification according to claim 6, characterized in that, The process of inputting enhanced feature representations into an anomaly classifier and having the anomaly classifier output an anomaly score includes the following steps: The anomaly classifier consists of one input layer, two fully connected layers, and one output layer. The number of neurons in the input layer is equal to the dimension of the augmented feature representation vector. The first fully connected layer has the third number of neurons, the second fully connected layer has the fourth number of neurons, and the output layer has 1 neuron. The input layer receives the enhanced feature representation vector and passes the value of each dimension of the enhanced feature representation vector to the first fully connected layer. The first fully connected layer performs a multiplication and addition operation on all the outputs of the input layer and the first weight matrix to obtain a third-dimensional intermediate vector. The third-dimensional intermediate vector is then input into the ReLU activation function, which sets each negative value to zero and keeps the positive values unchanged, outputting a third-dimensional first activation vector. The second fully connected layer performs a multiplication and addition operation on the first activation vector in the third dimension and the second weight matrix to obtain the second intermediate vector in the fourth dimension. The second intermediate vector in the fourth dimension is then input into the ReLU activation function to output the second activation vector in the fourth dimension. The output layer performs a dot product operation between the second activation vector of the fourth dimension and the output weight vector to obtain a scalar value. This scalar value is then input into the Sigmoid activation function, which outputs a value ranging from 0 to 1. This value is the anomaly score. An abnormal score value greater than the fourth preset threshold indicates that there is intrusion behavior in the current traffic window, while an abnormal score value less than or equal to the fourth preset threshold indicates that the current traffic window is normal traffic.
8. The IoT intrusion detection method based on identity verification according to claim 7, characterized in that, The edge authentication gateway calculates a comprehensive trust value based on anomaly scoring and authentication confidence, specifically including: The edge authentication gateway reads the initial authentication confidence value from the local storage, and the initial authentication confidence value is the maximum value; The edge authentication gateway reads the anomaly score from the anomaly classifier. The anomaly score ranges from 0 to 1. The edge authentication gateway sets the sensitivity coefficient to the fifth preset threshold, which is a constant pre-stored in the configuration file; The edge authentication gateway calculates the difference between zero and anomaly scores, multiplies the difference by a sensitivity coefficient, and obtains the first product. The edge authentication gateway subtracts the value 1 from the first product to obtain the difference factor; The edge authentication gateway multiplies the initial authentication confidence value by a difference factor to obtain a comprehensive trust value; The overall trust value ranges from 0 to 1; The edge authentication gateway compares the overall trust value with a sixth preset threshold; When the overall trust value is less than the sixth preset threshold, the edge authentication gateway sends a random number as a challenge code to the IoT device and suspends all sending permissions of the IoT device. When the overall trust value is greater than or equal to the sixth preset threshold, the edge authentication gateway maintains the current sending permissions of the IoT device.
Citation Information
Patent Citations
Immune-based Distributed Intrusion Detection Method and System for Internet of Things
CN107046549B
Indoor intrusion detection method and system based on WiFi channel state information
CN113033654A