Automatic identification method and device for Internet of Things equipment in cellular network environment and storage medium
Through the improved method of combining sparse variational automatic encoder and space-time graph convolutional network, the accuracy and adaptability of IoT device recognition in cellular network environment is solved, and efficient and accurate device recognition and classification are achieved.
Patent Information
- Application Number
- CN202510478961.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the cellular network environment, the recognition method of IoT devices has problems such as low recognition rate, difficulty in distinguishing individual devices, poor adaptability, and low recognition accuracy in encrypted traffic environments. Especially when the device types are diversified and the data categories are unevenly distributed, it is difficult for traditional methods to effectively identify small sample devices.
The improved structural sparse variational automatic encoder combined with the spatiotemporal graph convolution network is used to extract the device traffic characteristics through structural regularization strategies and traffic mode adaptive sparse constraints, and optimize the model training using the category balance loss function, dynamically adjust the learning rate, and combine cosine similarity calculation for device matching.
It improves the accuracy and adaptability of device identification, and can accurately identify devices, especially small sample devices in complex network environments, reduces calculation load and identification delay, and enhances the robustness and usability of the system.
Smart Images

Figure CN120296567A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things communication, and in particular, to a method, device and storage medium for automatically identifying Internet of Things devices in a cellular network environment. Background Art
[0002] In a cellular network environment, there are a wide variety of Internet of Things devices, including smart home devices, industrial sensors, vehicle networking terminals, etc. These devices usually adopt different communication protocols and have different data interaction modes. Traditional device identification methods rely on static rule matching, deep packet inspection or protocol feature-based classification. However, these methods have a low recognition rate in an encrypted traffic environment and are difficult to distinguish specific devices in the case of shared IP resources in a cellular network.
[0003] Existing Internet of Things device identification methods are mainly based on traffic statistical feature analysis. For example, classification is performed by monitoring parameters such as packet size, port usage pattern, and protocol type. These methods can achieve certain effects in an environment with a stable network topology. However, in a cellular network environment, due to the dynamic change of data traffic and the diversification of device types, the method based on static feature matching has low accuracy. In addition, DPI relies on the parsing of packet content. With the wide application of encryption protocols such as TLS / SSL, it is difficult for DPI methods to parse traffic content, resulting in limited recognition effects.
[0004] Some studies adopt traditional machine learning methods, such as decision trees, support vector machines or random forests, etc., to classify traffic features. However, these methods rely on manual feature selection and have limited generalization ability. Especially when facing new devices or changing network environments, the recognition rate is likely to decline. The application of deep learning technology has improved the automation ability of device identification. Common methods include convolutional neural networks and recurrent neural networks, etc. However, the traffic data features in a cellular network environment are relatively sparse, and the device communication mode has strong temporal correlation, making it easy for traditional deep learning methods to be interfered by noise when extracting key features. In addition, existing methods usually adopt a unified model training strategy, resulting in low recognition accuracy for small sample categories in the case of unbalanced data category distribution.
[0005] Device identification in a cellular network environment faces the following main problems: First, since multiple devices may share the same network channel, traditional methods based on IP addresses or ports are difficult to distinguish individual devices; second, the traffic patterns of Internet of Things devices are complex and changeable, and traditional static feature matching-based methods are difficult to adapt to the communication characteristics of different devices; finally, traffic data has complex temporal and spatial topological relationships, while most existing identification methods ignore this structured information, affecting the recognition effect.
[0006] In view of the above problems, the present invention proposes an automatic identification method, device and storage medium for Internet of Things devices in a cellular network environment. This method uses an improved structured sparse variational autoencoder combined with a spatio-temporal graph convolutional network to extract device traffic features, and uses a structural regularization strategy to optimize the feature screening process, improving the model's ability to capture key features. In addition, this method introduces a traffic pattern adaptive sparse constraint to dynamically adjust the feature selection weights, thereby enhancing the adaptability to different device categories, and optimizes the model training process through a class balance loss function to improve the identification ability for small-sample devices. The present invention uses cosine similarity to calculate the matching degree between the device feature vector and the device template feature vector in the database, realizing high-precision device identification, thus overcoming the problems of the prior art relying on manual feature engineering, poor rule matching adaptability, and low identification accuracy in an encrypted traffic environment.
[0007] Therefore, how to provide an automatic identification method, device and storage medium for Internet of Things devices in a cellular network environment is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0008] An object of the present invention is to propose an automatic identification method for Internet of Things devices in a cellular network environment. The present invention uses a structural regularization strategy to optimize the extraction of device traffic features, introduces a traffic pattern adaptive sparse constraint to improve the feature screening ability, and combines a spatio-temporal graph convolutional network to model the timing and topological information of devices, and details the training and optimization process of the device identification model, having the advantages of high identification accuracy, strong adaptability, and good identification effect for small-sample device categories.
[0009] An automatic identification method for Internet of Things devices in a cellular network environment according to an embodiment of the present invention includes the following steps:
[0010] S1. Collect the IP flow information export record data of Internet of Things devices of a preset type in a cellular network environment, and store the collected data in a traffic data storage module;
[0011] S2. Extract the device traffic features in the IP flow information export record data, generate feature vectors, represent each device in a unique way, and store the generated feature vectors as template data in a feature database;
[0012] S3. Use an improved structured sparse variational autoencoder combined with a spatio-temporal graph convolutional network to train a device identification model, use a structural regularization strategy to process device features, construct a high-dimensional sparse feature vector, perform feature extraction in combination with a traffic pattern adaptive sparse constraint, and use a spatio-temporal graph convolutional network to extract device behavior patterns and topological relationships to generate a device category prediction result;
[0013] S4. Optimize the device recognition model using the class balance loss function, calculate the device class weights, perform weighted training according to the distribution of device class data, and dynamically adjust the learning rate during training;
[0014] S5. Collect the real-time traffic data of the device to be recognized, convert it into a feature vector, and input it into the trained device recognition model. Calculate the cosine similarity between the device feature vector and the device template feature vector in the database, and perform device matching based on the similarity calculation;
[0015] S6. Set a similarity threshold. When the similarity is higher than the threshold, output the device type and model. When the similarity is lower than the threshold, mark it as an unknown device, and store the recognition result in the device management database.
[0016] Optionally, the specific steps of S3 include:
[0017] S31. Obtain the IP flow information export record data of the labeled Internet of Things devices, and preprocess the data to remove invalid traffic. Screen the valid traffic data containing fields such as source address, target address, protocol type, packet length, and packet interval time, and construct an initial device feature set;
[0018] S32. Optimize the device feature representation using the structural regularization strategy, and define the device feature vector:
[0019] X = {x1, x2,..., x n};
[0020] where X is the device feature vector set, x i is the i-th device feature, i = 1, 2,.., n, and there are n features in total. Use the adaptive sparse constraint method for feature screening and calculate the feature importance weights:
[0021] W = {w1, w2,..., w n};
[0022] where W is the device feature weight set, w i is the weight value of the i-th feature, i = 1, 2,.., n, and there are n features in total. And through the regularization function:
[0023]
[0024] dimensionality reduction is performed on the low-weight features to obtain the optimized feature vector X', where L sparse is the regularization function, λ is the regularization coefficient, and w i is the weight value of the i-th feature;
[0025] S33. Use a variational autoencoder for feature dimensionality reduction, map the feature vector to the latent space, set the latent variable as Z, and parameterize the latent variable distribution through the encoder:
[0026] q(Z|X') = N(μ,σ 2 );
[0027] where X' is the feature vector, q(Z|X') is the probability distribution of the latent variable Z given X', N(μ,σ 2 ) represents the Gaussian distribution, μ is the mean of the latent variable, and σ 2 is the variance of the latent variable. Minimize the reconstruction loss:
[0028] L vae = E q(Z|X') [logp(X′|Z)] - D KL (q(Z|X′)||p(Z));
[0029] where L vae is the loss function of the variational autoencoder, E q(Z|X') [logp(X'|Z)] is the expected log-likelihood loss, which measures whether Z can effectively reconstruct X', p(X'|Z) is the reconstruction probability of the device feature X' given the latent variable Z, and D KL (q(Z|X')||p(Z)) is the Kullback-Leibler divergence, which measures the difference between the distribution q(Z|X') of the latent variable Z and the prior distribution p(Z);
[0030] S34. Input the dimension-reduced device features into the spatio-temporal graph convolutional network to construct a device behavior time-series graph:
[0031] G = (V, E);
[0032] where G is the device behavior time-series graph, V is the set of device nodes, and E is the set of communication relationships between devices. Define the device feature matrix H and the adjacency matrix A, and use graph convolution to calculate and update the feature representation:
[0033] H (l+1) = σ(AH (l) W (l) );
[0034] where H (l+1) is the device feature matrix of the (l + 1)-th layer, A represents the adjacency matrix, which represents the communication relationship between devices, H (l) is the device feature matrix of the l-th layer, and W (l) is the trainable parameter matrix of this layer, and σ is the non-linear activation function;
[0035] S35. Extract the temporal features of the device traffic using a spatio-temporal convolutional layer, construct a time window T, and let the feature representation of the device at time step t be h t , and calculate the temporal dependencies through one-dimensional convolution:
[0036]
[0037] where h t ′ is the updated feature at time step t, k is the kernel size, w i is the i-th weight parameter of the convolution kernel, and h t-i is the device feature of the previous i time steps;
[0038] S36. Input the extracted device spatial features and temporal features into a fully connected layer for device type classification, and define the device category set:
[0039] C = {c1, c2,..., c m};
[0040] where C is the device category set, and c j represents the device category, including m device categories. Calculate the category probability distribution through the Softmax function:
[0041]
[0042] where P(c j |h) is the probability that the device feature h belongs to the category c j , W j is the weight of the Softmax classification layer, b j is the bias of the Softmax classification layer, and h is the final device feature vector;
[0043] S37. During the training process, use a class balance loss function to optimize the model and calculate the device category weights:
[0044]
[0045] where α j is the weight of the category c j , N j is the number of samples of the category c j , and β is the class balance factor. The final loss function is:
[0046]
[0047] where L is the training loss, y j is the true label of the category c j , and P(c j |h) is the prediction that the device feature h is the category cj The probability, and the model parameters are optimized through gradient descent during the training process.
[0048] Optionally, the S33 specifically includes:
[0049] S331. Perform latent variable modeling on the optimized device feature vector X'. Assume that the device feature dimension is d and the latent variable dimension is z, and construct a latent variable representation:
[0050] Z = {z1, z2,..., z z};
[0051] where Z is the latent variable set, and z i is the i-th latent variable, and the variational inference method is used to calculate the latent variable distribution:
[0052] q(Z|X') = N(μ, σ 2 );
[0053] where q(Z|X') is the probability distribution of the latent variable Z given X', N(μ, σ 2 ) is the normal distribution, μ is the latent variable mean, and σ 2 is the latent variable variance;
[0054] S332. Calculate the mean and variance parameters. Assume that the encoder parameter set is θ, and the device feature conversion function is:
[0055]
[0056] where μ is the mean of the latent variable, σ 2 is the variance of the latent variable, is the mean calculation function under the action of the encoder parameter θ1, is the variance calculation function under the action of the encoder parameter θ2;
[0057] S333. Use the reparameterization trick to sample the latent variable. Assume that the standard normal distribution noise variable is ∈, and calculate the latent variable:
[0058] Z = μ + σ·∈, ∈~N(0, I);
[0059] where Z represents the latent variable sampled from the latent variable distribution, μ is the mean of the latent variable, σ is the standard deviation of the latent variable, ∈ is the random noise variable, which follows the standard normal distribution with a mean of 0 and a variance of 1, and I is the identity matrix;
[0060] S334. Perform feature decoding on the latent variable. Assume that the decoder parameter set is The decoding function is:
[0061]
[0062] Among them, is the decoder function, is the decoded device feature vector;
[0063] S335. Calculate the reconstruction error. Assume the device feature dimension is d, and calculate the reconstruction loss:
[0064]
[0065] Among them, L rec is the reconstruction error, X' i and are the original device feature and the decoded feature respectively;
[0066] S336. Calculate the Kullback-Leibler divergence to measure the difference between the latent variable distribution and the standard normal distribution:
[0067]
[0068] Among them, D KL is the Kullback-Leibler divergence, measuring the similarity between q(Z|X') and the prior distribution p(Z);
[0069] S337. Calculate the final variational autoencoder optimization objective. Assume the total loss function is:
[0070] L vae = L rec - D KL ;
[0071] Among them, L vae is the final optimization objective, minimizing the combination of the reconstruction error L rec and the Kullback-Leibler divergence D KL ;
[0072] S338. Use gradient descent to optimize the variational autoencoder model. Assume the learning rate is η, and the set of optimized parameters is:
[0073]
[0074] Among them, Θ is the set of model parameters, and the update rule is:
[0075]
[0076] Among them, Θ t+1 is the model parameter after the (t + 1)-th iteration, Θ t is the parameter of the t-th iteration, L vae is the loss function, Θ is the model parameter, is the gradient of the loss function with respect to the model parameters, and completes the dimensionality reduction of device features and the learning of latent variables.
[0077] Optionally, the S4 specifically includes:
[0078] S41. Calculate the device category distribution. Let the device category set be:
[0079] C = {c1, c2,..., c m};
[0080] where C is the device category set, and c j is the device category, including m types of device categories. Let the number of samples of category c j be N j , and calculate the total number of samples of the category:
[0081]
[0082] where N is the total number of samples of all category devices, and N j is the number of samples of category c j ;
[0083] S42. Calculate the category weights. Let the category balance factor β have a value range of (0, 1), and use the category balance loss function to calculate the device category weights:
[0084]
[0085] where α j is the weight of category c j , and β is the category balance factor;
[0086] S43. Calculate the cross-entropy loss. Define the true label of the device category:
[0087] Y = {y1, y2,..., y m};
[0088] where Y is the device category label set, and y j is the true label of category c j , and calculate the category probability distribution:
[0089]
[0090] where P(c j |h) is the probability that the device feature h belongs to category c j , W j is the weight of the classification layer, b j is the bias of the classification layer, and calculate the weighted cross-entropy loss:
[0091]
[0092] Among them, L ce is the cross-entropy loss function for class balance;
[0093] S44. Use gradient descent to optimize the device recognition model. Let the learning rate be η, and define the set of model parameters:
[0094] Θ = {W1, W2,..., W m , b1, b2,..., b m};
[0095] Among them, Θ is the set of model parameters, W j is the weight of the classification layer, and b j is the bias of the classification layer. Update the gradient of the parameters:
[0096]
[0097] Among them, Θ t+1 is the model parameter after the (t + 1)-th iteration, Θ t is the parameter value of the t-th iteration, η is the learning rate, L ce is the loss function, Θ is the model parameter, is the gradient of the loss function with respect to the parameter;
[0098] S45. Set the training termination condition. Let the maximum number of training rounds be T and the loss convergence threshold be ∈, and define the training termination condition:
[0099]
[0100] Among them, t is the current training round, is the loss value of the t-th round, is the loss value of the (t + 1)-th round, ∈ is the minimum threshold of loss change. When the training reaches the maximum number of rounds T or the loss change is less than ∈, terminate the training;
[0101] S46. Update the device recognition model, and store the optimized parameter Θ T in the device management database to complete the training of the device recognition model.
[0102] Optionally, the specific content of S5 includes:
[0103] S51. Collect the real-time traffic data of the device to be recognized. Let the device set be:
[0104] V = {v1, v2,..., v k};
[0105] Among them, V is the set of devices to be recognized, and v i is the i-th device, and there are a total of k devices. Extract the traffic data feature vectors and construct a feature matrix:
[0106] H = [h1, h2,..., h k T ;
[0107] where H is the device feature matrix and h i is the feature vector of device v i ;
[0108] S52. Normalize the feature vector. Let the maximum - minimum normalization function be:
[0109]
[0110] where h i ' is the feature vector of device v i after normalization, max(H) is the maximum value of the feature matrix H, and min(H) is the minimum value of the feature matrix H;
[0111] S53. Calculate the similarity between the device to be recognized and the device templates in the feature database. Let the set of device templates be:
[0112] T = {t1, t2,..., t m};
[0113] where T is the set of device templates in the database, and t j is the j - th device template. Calculate the matching degree between the device to be recognized and the device template using cosine similarity:
[0114]
[0115] where S i,j is the cosine similarity between the device v i to be recognized and the device template t j , ||h i '|| is the two - norm of the vector h i ', and ||t j || is the two - norm of the vector t j ;
[0116] S54. Find the optimal matching device. Let the similarity threshold be τ, and define the matching device:
[0117]
[0118] where is the device template that best matches device v i , arg max is to find the template device with the highest similarity to the device to be recognized among all device templates. If the cosine similarity S i,j is greater than or equal to the threshold τ, then it is determined that device v i Belonging to device template t j ;
[0119] S55. If the similarity of all device templates is lower than the threshold, mark the device as an unknown device. Let the set of unknown devices be:
[0120]
[0121] where U is the set of devices with failed recognition, v i is all devices with similarity lower than the threshold, and τ is the threshold;
[0122] S56. Output the device recognition result. Let the set of types of matching devices be:
[0123] C = {c1, c2,..., c m};
[0124] where C is the set of device types, and the matching device types are:
[0125]
[0126] where c i is the recognition type of device v i , represents the device type corresponding to device template . Store the matching result in the device management database.
[0127] An automatic identification device for Internet of Things devices in a cellular network environment according to an embodiment of the present invention includes:
[0128] A traffic collection module for collecting IP flow information export record data of Internet of Things devices of a preset type in a cellular network environment, obtaining traffic information including signaling data and service data, and storing the collected data in a traffic data storage module;
[0129] A feature extraction module for extracting device traffic features from IP flow information export record data, analyzing features such as source address, destination address, port number, protocol type, packet size, time interval, etc. of data packets, generating feature vectors to uniquely represent each device, and storing the generated feature vectors as template data in a feature database;
[0130] A model training module for training a device recognition model using an improved structured sparse variational autoencoder combined with a spatio-temporal graph convolutional network, processing device features using a structural regularization strategy, constructing high-dimensional sparse feature vectors, performing feature extraction by combining traffic pattern adaptive sparse constraints, and using a spatio-temporal graph convolutional network to extract device behavior patterns and topological relationships to generate device category prediction results;
[0131] A loss optimization module, which is used to optimize the device recognition model by using a class balance loss function, calculate the device class weights, perform weighted training according to the distribution of device class data, optimize the model parameters, and dynamically adjust the learning rate during the training process;
[0132] A device recognition module, which is used to collect the real-time traffic data of the device to be recognized, analyze the protocol features, behavior patterns and communication rules of the traffic data packets, convert them into feature vectors, and input them into the trained device recognition model, calculate the cosine similarity between the device feature vector and the device template feature vector in the database, and perform device matching based on the similarity calculation;
[0133] A result output module, which is used to set a similarity threshold. When the similarity is higher than the threshold, the device type and model are output. When the similarity is lower than the threshold, it is marked as an unknown device, and the recognition result is stored in the device management database.
[0134] According to an embodiment of the present invention, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is enabled to execute an automatic identification method for Internet of Things devices in a cellular network environment according to any one of claims 1 to 5.
[0135] The beneficial effects of the present invention are as follows:
[0136] First of all, the present invention extracts features from device traffic data through an improved structured sparse variational autoencoder, introduces a structural regularization strategy and a traffic pattern adaptive sparse constraint, enables the device features to be dynamically adjusted, improves the model's ability to screen key features, reduces the interference of redundant information, and improves the accuracy and stability of device recognition.
[0137] Secondly, a spatio-temporal graph convolutional network is used to model the time dependence and spatial topological relationship of device traffic data, so that device recognition is not only based on the traffic features at a single moment, but also combines the communication behavior patterns between devices, realizes accurate classification of device categories, effectively copes with the recognition difficulties brought by device sharing IP addresses in the cellular network environment, and improves the device recognition ability in complex network environments.
[0138] Finally, the present invention adopts a class balance loss function to optimize the model training process. Aiming at the problem of uneven distribution of device class data, through adaptive weighted adjustment, the recognition accuracy of small-sample class devices is improved, avoiding the problem of weak recognition ability for a small number of device types in traditional methods, improving the generalization and adaptability of the model, and thus enhancing the usability and robustness of the device recognition system in different network environments. Description of the Drawings
[0139] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, but do not constitute a limitation to the present invention. In the accompanying drawings:
[0140] Figure 1 is a flowchart of an automatic identification method for Internet of Things devices in a cellular network environment proposed by the present invention;
[0141] Figure 2 is a schematic diagram of the architecture of an improved structure sparse variational autoencoder in the present invention. Detailed implementation manners
[0142] Now, the present invention will be further described in detail with reference to the accompanying drawings. These drawings are all simplified schematic diagrams, only illustrating the basic structure of the present invention in a schematic manner, so they only show the components related to the present invention.
[0143] Referring to Figure 1-2 , an automatic identification method for Internet of Things devices in a cellular network environment includes the following steps:
[0144] S1. Collect the IP flow information export record data of Internet of Things devices of a preset type in the cellular network environment, and store the collected data in the traffic data storage module;
[0145] S2. Extract the device traffic features from the IP flow information export record data, generate feature vectors to uniquely represent each device, and store the generated feature vectors as template data in the feature database;
[0146] S3. Use the improved structure sparse variational autoencoder combined with the spatio-temporal graph convolutional network to train the device recognition model, adopt a structure regularization strategy to process device features, construct high-dimensional sparse feature vectors, perform feature extraction in combination with the traffic pattern adaptive sparse constraint, and use the spatio-temporal graph convolutional network to extract the device behavior pattern and topological relationship to generate the device category prediction result;
[0147] S4. Use the class balance loss function to optimize the device recognition model, calculate the device class weights, perform weighted training according to the distribution of device class data, and dynamically adjust the learning rate during the training process;
[0148] S5. Collect the real-time traffic data of the device to be recognized, convert it into a feature vector, and input it into the trained device recognition model. Calculate the cosine similarity between the device feature vector and the device template feature vector in the database, and perform device matching based on the similarity calculation;
[0149] S6. Set a similarity threshold. When the similarity is higher than the threshold, output the device type and model. When the similarity is lower than the threshold, mark it as an unknown device, and store the recognition result in the device management database.
[0150] In this embodiment, S3 specifically includes:
[0151] S31. Obtain the IP flow information export record data of the labeled Internet of Things devices, preprocess the data, remove invalid traffic, screen the valid traffic data including fields such as source address, destination address, protocol type, packet length, packet interval time, etc., and construct an initial device feature set;
[0152] S32. Optimize the device feature representation using a structural regularization strategy, and define the device feature vector:
[0153] X = {x1, x2,..., x n};
[0154] where X is the set of device feature vectors, x i is the i-th device feature, i = 1, 2,.., n, there are n features in total, and an adaptive sparse constraint method is used for feature screening to calculate the feature importance weights:
[0155] W = {w1, w2,..., w n};
[0156] where W is the set of weights of the device features, w i is the weight value of the i-th feature, i = 1, 2,.., n, there are n features in total, and through the regularization function:
[0157]
[0158] perform dimensionality reduction on low-weight features to obtain the optimized feature vector X', where L sparse is the regularization function, λ is the regularization coefficient, and w i is the weight value of the i-th feature;
[0159] S33. Use a variational autoencoder for feature dimensionality reduction, map the feature vector to the latent space, set the latent variable as Z, and parameterize the latent variable distribution through the encoder:
[0160] q(Z|X') = N(μ, σ 2 );
[0161] where X' is the feature vector, q(Z|X') is the probability distribution of the latent variable Z given X', N(μ, σ 2 ) represents a Gaussian distribution, μ is the mean of the latent variable, and σ 2 is the variance of the latent variable, and minimize the reconstruction loss:
[0162] L vae = E q(Z|X')[logp(X′|Z)] - D KL (q(Z|X′)||p(Z));
[0163] Among them, L vae is the loss function of the variational autoencoder, E q(Z|X') [logp(X'|Z)] is the expected log-likelihood loss, which measures whether Z can effectively reconstruct X', p(X'|Z) is the reconstruction probability of the device feature X' given the latent variable Z, and D KL (q(Z|X')||p(Z)) is the Kullback-Leibler divergence, which measures the difference between the distribution q(Z|X') of the latent variable Z and the prior distribution p(Z);
[0164] S34. Input the dimension-reduced device features into the spatio-temporal graph convolutional network to construct a device behavior time series graph:
[0165] G = (V, E);
[0166] Among them, G is the device behavior time series graph, V is the set of device nodes, E is the set of communication relationships between devices. Define the device feature matrix H and the adjacency matrix A, and use graph convolution to calculate and update the feature representation:
[0167] H (l+1) = σ(AH (l) W (l) );
[0168] Among them, H (l+1) is the device feature matrix of the (l + 1)-th layer, A represents the adjacency matrix, which represents the communication relationship between devices, H (l) is the device feature matrix of the l-th layer, W (l) is the trainable parameter matrix of this layer, and σ is the non-linear activation function;
[0169] S35. Use the spatio-temporal convolutional layer to extract the time features of the device traffic, construct a time window T, and assume that the feature representation of the device at time step t is h t , and calculate the time dependence relationship through one-dimensional convolution:
[0170]
[0171] Among them, h t ′ is the updated feature at time step t, k is the size of the convolution kernel, w i is the i-th weight parameter of the convolution kernel, and h t-i is the device feature of the previous i time steps;
[0172] S36. Input the extracted device spatial features and time features into the fully connected layer for device type classification, and define the set of device categories:
[0173] C = {c1, c2,..., c m};
[0174] Among them, C is the set of device categories, and c j represents the device category, including m device categories. The category probability distribution is calculated through the Softmax function:
[0175]
[0176] Among them, P(c j |h) is the probability that the device feature h belongs to the category c j , W j is the weight of the Softmax classification layer, b j is the bias of the Softmax classification layer, and h is the final device feature vector;
[0177] S37. During the training process, the category balance loss function is used to optimize the model, and the device category weights are calculated:
[0178]
[0179] Among them, α j is the weight of the category c j , N j is the number of samples of the category c j , and β is the category balance factor. The final loss function is:
[0180]
[0181] Among them, L is the training loss, y j is the true label of the category c j , P(c j |h) is the probability that the device feature h is predicted as the category c j . During the training process, the model parameters are optimized through gradient descent.
[0182] In this embodiment, the specific steps of S33 include:
[0183] S331. Perform latent variable modeling on the optimized device feature vector X'. Assume that the device feature dimension is d and the latent variable dimension is z, and construct the latent variable representation:
[0184] Z = {z1, z2,..., z z};
[0185] Among them, Z is the set of latent variables, and z i is the i-th latent variable. The variational inference method is used to calculate the latent variable distribution:
[0186] q(Z|X') = N(μ, σ2 )
[0187] where \(q(Z|X')\) is the probability distribution of the latent variable \(Z\) given \(X'\), \(N(\mu,\sigma\) 2 ) is the normal distribution, \(\mu\) is the mean of the latent variable, and \(\sigma\) 2 is the variance of the latent variable;
[0188] S332. Calculate the mean and variance parameters. Let the set of encoder parameters be \(\theta\), and the device feature transformation function be:
[0189]
[0190] where \(\mu\) is the mean of the latent variable, and \(\sigma\) 2 is the variance of the latent variable, is the mean calculation function under the action of the encoder parameter \(\theta_1\), is the variance calculation function under the action of the encoder parameter \(\theta_2\);
[0191] S333. Use the reparameterization trick to sample the latent variable. Let the standard normal distribution noise variable be \(\epsilon\), and calculate the latent variable:
[0192] \(Z = \mu+\sigma\cdot\epsilon,\ \epsilon\sim N(0, I)\);
[0193] where \(Z\) represents the latent variable sampled from the latent variable distribution, \(\mu\) is the mean of the latent variable, \(\sigma\) is the standard deviation of the latent variable, \(\epsilon\) is the random noise variable, which follows the standard normal distribution with a mean of 0 and a variance of 1, and \(I\) is the identity matrix;
[0194] S334. Decode the features of the latent variable. Let the set of decoder parameters be The decoding function is:
[0195]
[0196] where is the decoder function, is the decoded device feature vector;
[0197] S335. Calculate the reconstruction error. Let the device feature dimension be \(d\), and calculate the reconstruction loss:
[0198]
[0199] where \(L\) rec is the reconstruction error, \(X'\) i and are the original device features and the decoded features respectively;
[0200] S336. Calculate the Kullback-Leibler divergence to measure the difference between the latent variable distribution and the standard normal distribution:
[0201]
[0202] Among them, D KL is the Kullback-Leibler divergence, which measures the similarity between q(Z|X') and the prior distribution p(Z);
[0203] S337. Calculate the final variational autoencoder optimization objective. Let the total loss function be:
[0204] L vae = L rec - D KL ;
[0205] Among them, L vae is the final optimization objective, which combines the reconstruction error L rec and the Kullback-Leibler divergence D KL for minimization optimization;
[0206] S338. Use gradient descent to optimize the variational autoencoder model. Let the learning rate be η, and the set of optimized parameters be:
[0207]
[0208] Among them, Θ is the set of model parameters, and the update rule is:
[0209]
[0210] Among them, Θ t+1 is the model parameter after the (t + 1)-th iteration, Θ t is the parameter of the t-th iteration, L vae is the loss function, Θ is the model parameter, is the gradient of the loss function with respect to the model parameter, completing the device feature dimensionality reduction and latent variable learning.
[0211] In this embodiment, the S4 specifically includes:
[0212] S41. Calculate the device class distribution. Let the set of device classes be:
[0213] C = {c1, c2,..., c m};
[0214] Among them, C is the set of device classes, c j is the device class, including m types of device classes. Let the number of samples of class c j be N j , and calculate the total number of class samples:
[0215]
[0216] Among them, N is the total number of samples of all types of devices, and N j is the number of samples of category c j ;
[0217] S42. Calculate the category weight. Let the category balance factor β take values in the range of (0, 1), and use the category balance loss function to calculate the device category weight:
[0218]
[0219] Among them, α j is the weight of category c j , and β is the category balance factor;
[0220] S43. Calculate the cross-entropy loss. Define the true label of the device category:
[0221] Y = {y1, y2,..., y m};
[0222] Among them, Y is the set of device category labels, and y j is the true label of category c j . Calculate the category probability distribution:
[0223]
[0224] Among them, P(c j |h) is the probability that the device feature h belongs to category c j , W j is the weight of the classification layer, b j is the bias of the classification layer, and calculate the weighted cross-entropy loss:
[0225]
[0226] Among them, L ce is the cross-entropy loss function with category balance;
[0227] S44. Use gradient descent to optimize the device recognition model. Let the learning rate be η, and define the set of model parameters:
[0228] Θ = {W1, W2,..., W m , b1, b2,..., b m};
[0229] Among them, Θ is the set of model parameters, W j is the weight of the classification layer, b j is the bias of the classification layer, and update the gradient of the parameters:
[0230]
[0231] Among them, Θ t+1 is the model parameter after the (t + 1)-th iteration, and Θ t is the parameter value of the t-th iteration, η is the learning rate, and L ce is the loss function, Θ is the model parameter, is the gradient of the loss function with respect to the parameter;
[0232] S45. Set the training termination condition. Let the maximum number of training rounds be T, and the loss convergence threshold be ∈. Define the training termination condition:
[0233]
[0234] Among them, t is the current training round, is the loss value of the t-th round, is the loss value of the (t + 1)-th round, ∈ is the minimum threshold of the loss change. When the training reaches the maximum number of rounds T or the loss change is less than ∈, terminate the training;
[0235] S46. Update the device recognition model, and store the optimized parameter Θ T into the device management database to complete the training of the device recognition model.
[0236] In this embodiment, the specific steps of S5 include:
[0237] S51. Collect the real-time traffic data of the device to be recognized. Let the device set be:
[0238] V = {v1, v2,..., v k};
[0239] Among them, V is the set of devices to be recognized, and v i is the i-th device, and there are a total of k devices. Extract the feature vector of the traffic data and construct the feature matrix:
[0240] H = [h1, h2,..., h k T ;
[0241] Among them, H is the device feature matrix, and h i is the feature vector of the device v i ;
[0242] S52. Normalize the feature vector. Let the maximum-minimum normalization function be:
[0243]
[0244] Among them, h i ′ is the normalized device v i The eigenvector, max(H) is the maximum value of the eigenmatrix H, and min(H) is the minimum value of the eigenmatrix H;
[0245] S53. Calculate the similarity between the device to be recognized and the device templates in the feature database. Let the device template set be:
[0246] T = {t1, t2,..., t m};
[0247] where T is the device template set in the database, t j is the j-th device template. Calculate the matching degree between the device to be recognized and the device template using cosine similarity:
[0248]
[0249] where S i,j is the cosine similarity between the device to be recognized v i and the device template t j , ||h i ′|| is the two-norm of the vector h i ′, and ||t j || is the two-norm of the vector t j ;
[0250] S54. Find the optimal matching device. Let the similarity threshold be τ, and define the matching device:
[0251]
[0252] where is the device template that best matches the device v i . arg max is to find the template device with the highest similarity to the device to be recognized among all device templates. If the cosine similarity S i,j is greater than or equal to the threshold τ, it is determined that the device v i belongs to the device template t j ;
[0253] S55. If the similarity of all device templates is lower than the threshold, mark the device as an unknown device. Let the unknown device set be:
[0254]
[0255] where U is the set of devices for which recognition fails, v i is all devices with similarity lower than the threshold, and τ is the threshold;
[0256] S56. Output the device recognition result. Let the type set of the matching device be:
[0257] C = {c1, c2,..., cm};
[0258] Among them, C is a set of device types, matching device types:
[0259]
[0260] Among them, c i is the identification type of device v i , representing the device type corresponding to the device template, and storing the matching result in the device management database. indicating the device template corresponding device type, storing the matching result to the device management database.
[0261] An automatic identification device for Internet of Things devices in a cellular network environment, comprising:
[0262] A traffic collection module, configured to collect IP flow information export record data of Internet of Things devices of a preset type in a cellular network environment, obtain traffic information including signaling data and service data, and store the collected data in the traffic data storage module;
[0263] A feature extraction module, configured to extract device traffic features from the IP flow information export record data, analyze features such as source address, destination address, port number, protocol type, packet size, time interval, etc. of data packets, generate feature vectors to represent each device in a unique way, and store the generated feature vectors as template data in the feature database;
[0264] A model training module, configured to train a device identification model by using an improved structured sparse variational autoencoder combined with a spatio-temporal graph convolutional network, adopt a structural regularization strategy to process device features, construct high-dimensional sparse feature vectors, perform feature extraction in combination with traffic pattern adaptive sparse constraints, and use the spatio-temporal graph convolutional network to extract device behavior patterns and topological relationships to generate device category prediction results;
[0265] A loss optimization module, configured to optimize the device identification model by using a class balance loss function, calculate device class weights, perform weighted training according to the distribution of device class data, optimize model parameters, and dynamically adjust the learning rate during the training process;
[0266] A device identification module, configured to collect real-time traffic data of a device to be identified, analyze protocol features, behavior patterns and communication rules of traffic data packets, convert them into feature vectors, and input them into the trained device identification model, calculate the cosine similarity between the device feature vector and the device template feature vector in the database, and perform device matching based on the similarity calculation;
[0267] A result output module is used to set a similarity threshold. When the similarity is higher than the threshold, the device type and model are output. When the similarity is lower than the threshold, it is marked as an unknown device, and the recognition result is stored in the device management database.
[0268] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor is enabled to execute an automatic identification method for Internet of Things devices in a cellular network environment according to any one of claims 1 to 5.
[0269] Embodiment 1:
[0270] To verify the feasibility of the present invention in practical applications, the present invention is applied to the Internet of Things device management system in the cellular network environment of a large intelligent factory. The system includes an industrial controller, intelligent sensors, automated production equipment, and an edge computing gateway. Since the production line of this factory consists of a large number of heterogeneous Internet of Things devices with different communication protocols, some devices use dynamic IP addresses, and multiple devices share the same cellular network subscription line, the traditional device identification methods based on IP addresses, ports, or protocol characteristics are difficult to meet the accurate management requirements. The present invention adopts an improved structure sparse variational autoencoder combined with a spatio-temporal graph convolutional network method to automatically extract and classify the device traffic characteristics, so as to realize the accurate identification and management of different devices in the factory.
[0271] In this intelligent factory, the traffic data of each device is collected through IP flow information export record data, including features such as the source address, target address, protocol type, packet length, and packet time interval of the device, and feature extraction and storage are carried out in units of 10 minutes. Traditional methods usually classify devices based on traffic statistical feature matching rules by manually setting port numbers and protocol characteristics. However, this method has a decreased recognition accuracy when facing dynamic IP addresses, encrypted traffic, and shared network environments, and the maintenance cost is relatively high. In addition, when traditional device identification methods deal with the problem of uneven distribution of device categories, the recognition rate of devices in small sample categories is often low, resulting in ineffective monitoring of some key devices.
[0272] The present invention optimizes traffic features through an improved structure sparse variational autoencoder, adopts a structure regularization strategy to remove irrelevant features, and combines traffic pattern adaptive sparse constraints to improve the model's ability to screen key features. During the device identification process, a spatio-temporal graph convolutional network is used to model the time dependence of device traffic data and the communication topology between devices, enabling device classification to not only rely on a single traffic feature but also utilize the behavior patterns between devices for auxiliary judgment. For example, when the traffic pattern of an industrial controller deviates due to abnormal behavior, the device identification model of the present invention can analyze the communication relationship between the device and other devices based on the spatio-temporal graph structure to quickly determine whether the device belongs to a known type or is a newly added or abnormal device.
[0273] During the actual test process, the application scenarios of the present invention in this intelligent factory include device asset management, network security monitoring, and abnormal device detection. To more intuitively demonstrate the advantages of the present invention, Table 1 compares the device identification performance of the present invention and traditional methods in different scenarios:
[0274] Table 1 Comparison of Internet of Things device identification methods in intelligent factories
[0275] Evaluation items Traditional method The present invention Total number of devices 500 units 500 units Recognition accuracy 82.5% 98.7% Recognition latency 12.5 seconds 3.2 seconds Recognition rate of small-sample device categories 67.3% 94.5% Recognition accuracy of devices sharing IP 58.2% 96.8% Device anomaly detection time 10 minutes 1.5 seconds Computing load 100% 54.3%
[0276] As can be seen from Table 1, when 500 devices are online simultaneously, the accuracy rate of the traditional rule-based device identification method is 82.5%, and the correct identification rate for devices sharing the same IP is only 58.2%. In contrast, the method of the present invention increases the identification accuracy rate to 98.7%, and the correct identification rate for devices in a shared IP environment reaches 96.8%. In addition, the method of the present invention reduces the identification delay to 3.2 seconds, enabling real-time identification and classification in a large-scale Internet of Things device environment.
[0277] Meanwhile, in terms of identifying small-sample device categories, since the present invention uses a class balance loss function to optimize model training, the identification rate of small-sample devices has increased from 67.3% of traditional methods to 94.5%. In the scenario of abnormal device detection, based on the spatio-temporal graph convolutional network, the present invention can complete device classification within 1.5 seconds when detecting abnormal device traffic behavior and calculate possible causes of abnormalities in combination with historical data, while traditional methods usually require at least 10 minutes of manual analysis to locate abnormal devices. In addition, the optimized device identification method reduces the computational load, enabling efficient operation in a large-scale Internet of Things device environment and reducing the consumption of computing resources by approximately 45.7% compared to traditional methods.
[0278] The above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, making equivalent substitutions or changes, shall be covered by the protection scope of the present invention.
Claims
1. An automatic identification method for Internet of Things devices in a cellular network environment, characterized in that It includes the following steps: S1. Collect the IP flow information export record data of IoT devices of a preset type in the cellular network environment, and store the collected data in the traffic data storage module; S2. Extract the device traffic characteristics from the IP flow information export record data, generate feature vectors, represent each device in a unique way, and store the generated feature vectors as template data in the feature database; S3. Use an improved structured sparse variational autoencoder combined with a spatio-temporal graph convolutional network to train a device recognition model, adopt a structural regularization strategy to process device features, construct high-dimensional sparse feature vectors, perform feature extraction combined with traffic pattern adaptive sparse constraints, and use the spatio-temporal graph convolutional network to extract device behavior patterns and topological relationships to generate device category prediction results; S4. Use a class balance loss function to optimize the device recognition model, calculate device class weights, perform weighted training according to the distribution of device class data, and dynamically adjust the learning rate during the training process; S5. Collect the real-time traffic data of the device to be recognized, convert it into a feature vector, and input it into the trained device recognition model, calculate the cosine similarity between the device feature vector and the device template feature vector in the database, and perform device matching based on the similarity calculation; S6. Set a similarity threshold. When the similarity is higher than the threshold, output the device type and model. When the similarity is lower than the threshold, mark it as an unknown device, and store the recognition result in the device management database.
2. The automatic identification method of the Internet of Things device in a cellular network environment according to claim 1, wherein The specific content of S3 includes: S31. Obtain the IP flow information export record data of the labeled IoT devices, and preprocess the data to remove invalid traffic, screen the valid traffic data including fields such as source address, target address, protocol type, packet length, and packet interval time, and construct an initial device feature set; S32. Adopt a structural regularization strategy to optimize the device feature representation, and define the device feature vector: X = {x1, x2,..., x n}; Among them, X is the set of device feature vectors, and x i is the i-th device feature, where i = 1, 2,.., n, and there are n features in total. An adaptive sparse constraint method is used for feature screening to calculate the feature importance weights: W = {w1, w2,..., w n}; Among them, W is the weight set of device features, and w i is the weight value of the i-th feature, where i = 1, 2,.., n, and there are n features in total. And through the regularization function: Dimensionality reduction is performed on low-weight features to obtain an optimized feature vector X', where L sparse is a regularization function, λ is a regularization coefficient, and w i is the weight value of the i-th feature; S33. Use a variational autoencoder for feature dimensionality reduction, map the feature vector to the latent space, set the latent variable as Z, and parameterize the latent variable distribution through the encoder: q(Z|X') = N(μ,σ 2 ); where X' is the feature vector, q(Z|X') is the probability distribution of the latent variable Z given X', and N(μ,σ 2 ) represents a Gaussian distribution, μ is the mean of the latent variable, and σ 2 is the variance of the latent variable, and the reconstruction loss is minimized: L vae = E q(Z|X') [log p(X′|Z)] - D KL (q(Z|X′) || p(Z)); where L vae is the loss function of the variational autoencoder, and E q(Z|X') [logp(X'|Z)] is the expected log-likelihood loss, which measures whether Z can effectively reconstruct X'. p(X'|Z) is the reconstruction probability of the device feature X' given the latent variable Z. D KL (q(Z|X')||p(Z)) is the Kullback-Leibler divergence, which measures the difference between the distribution q(Z|X') of the latent variable Z and the prior distribution p(Z); S34. Input the dimensionality-reduced device features into the spatio-temporal graph convolutional network to construct a device behavior time series graph: G=(V,E); Among them, G is the device behavior time series graph, V is the set of device nodes, E is the set of communication relationships between devices, define the device feature matrix H and the adjacency matrix A, and use graph convolution to calculate and update the feature representation: H (l+1) = σ(AH (l) W (l) )); Among them, H (l+1) is the device feature matrix of the (l + 1)-th layer, A represents the adjacency matrix, indicating the communication relationship between devices, and H (l) is the device feature matrix of the l-th layer, and W (l) is the trainable parameter matrix of this layer, and σ is the non-linear activation function; S35. Extract the temporal features of the device traffic using a spatio-temporal convolutional layer, construct a time window T, and let the feature representation of the device at time step t be h t , and calculate the temporal dependence through one-dimensional convolution: where h t ′ is the updated feature at time step t, k is the convolutional kernel size, and w i is the i-th weight parameter of the convolutional kernel, and h t-i is the device feature of the previous i time steps; S36. Input the extracted device spatial features and time features into the fully connected layer for device type classification, and define the device category set: C = {c1, c2,..., c m}; Among them, C is the set of device categories, and c j represents the device category, including m device categories, and calculates the category probability distribution through the Softmax function: Among them, P(c j |h) is the probability that the device feature h belongs to the category c j , W j is the weight of the Softmax classification layer, b j is the bias of the Softmax classification layer, and h is the final device feature vector; S37. During the training process, use a class balance loss function to optimize the model and calculate the device class weights: Among them, α j is the weight of class c j , N j is the number of samples of class c j , β is the class balance factor, and the final loss function is: Among them, L is the training loss, y j is the true label of class c j , P(c j |h) is the probability that the device feature h is predicted as class c j . During the training process, the model parameters are optimized by gradient descent.
3. The automatic identification method for Internet of Things devices in a cellular network environment according to claim 2, wherein, The specific content of S33 includes: S331. Perform latent variable modeling on the optimized device feature vector X', set the device feature dimension as d and the latent variable dimension as z, and construct the latent variable representation: Z = {z1, z2,..., z z}; where \(Z\) is a set of latent variables, and \(z\) i is the \(i\)-th latent variable. The variational inference method is used to calculate the latent variable distribution: q(Z|X') = N(μ, σ 2 ) Among them, q(Z|X') is the probability distribution of the latent variable Z given X', and N(μ,σ 2 ) is the normal distribution, μ is the mean of the latent variable, and σ 2 is the variance of the latent variable; S332. Calculate the mean and variance parameters, set the encoder parameter set as θ, and the device feature conversion function as: where μ is the mean of the latent variable, and σ 2 is the variance of the latent variable, is the mean calculation function under the action of the encoder parameter θ1, and is the variance calculation function under the action of the encoder parameter θ2; S333. Use the reparameterization trick to sample the latent variable, set the standard normal distribution noise variable as ∈, and calculate the latent variable: Z = μ + σ·∈, ∈~N(0,I); Among them, Z represents the latent variable sampled from the latent variable distribution, μ is the mean of the latent variable, σ is the standard deviation of the latent variable, ∈ is the random noise variable, which follows the standard normal distribution with a mean of 0 and a variance of 1, and I is the identity matrix; S334. Feature decoding is performed on the latent variable. Let the set of decoder parameters be The decoding function is: Among them, is the decoder function, is the decoded device feature vector; S335. Calculate the reconstruction error. Assume the device feature dimension is d, and calculate the reconstruction loss: where, L rec is the reconstruction error, X' i and are the original device feature and the decoded feature, respectively; S336. Calculate the Kullback-Leibler divergence to measure the difference between the latent variable distribution and the standard normal distribution: where D KL is the Kullback-Leibler divergence, which measures the similarity between q(Z|X') and the prior distribution p(Z); S337. Calculate the final variational autoencoder optimization objective. Assume the total loss function is: L vae = L rec - D KL ; Among them, L vae is the final optimization goal, which combines the reconstruction error L rec and the Kullback-Leibler divergence D KL for minimization optimization; S338. Use gradient descent to optimize the variational autoencoder model. Assume the learning rate is η, and the set of optimized parameters is: Among them, Θ is the set of model parameters, and the update rule is: where, Θ t+1 is the model parameter after the (t + 1)-th iteration, Θ t is the parameter of the t-th iteration, L vae is the loss function, Θ is the model parameter, is the gradient of the loss function with respect to the model parameter, and device feature dimensionality reduction and latent variable learning are completed.
4. The automatic identification method for Internet of Things devices in a cellular network environment according to claim 1, characterized in that The specific steps of S4 are as follows: S41. Calculate the device category distribution. Assume the device category set is: C = {c1, c2,..., c m}; Among them, C is the set of device categories, and c j is the device category, including m types of device categories. Let the number of samples of category c j be N j , and calculate the total number of category samples: where N is the total number of samples of all types of devices, N j is the number of samples of class c j ; S42. Calculate the category weights. Assume the category balance factor β ranges from (0, 1), and use the category balance loss function to calculate the device category weights: where α j is the weight of class c j , and β is the class balance factor; S43. Calculate the cross-entropy loss, and define the true label of the device category: Y = {y1, y2,..., y m}; where Y is the set of device category labels, and y j is the true label of category c j , and calculate the category probability distribution: where P(c j |h) is the probability that the device feature h belongs to the category c j , W j is the weight of the classification layer, b j is the bias of the classification layer, and the weighted cross-entropy loss is calculated as follows: Among them, L ce is the cross-entropy loss function for class balance; S44. Use gradient descent to optimize the device recognition model. Assume the learning rate is η, and define the set of model parameters: Θ = {W1, W2,..., W m , b1, b2,..., b m}; where Θ is the set of model parameters, W j is the weight of the classification layer, b j is the bias of the classification layer, and the gradient of the updated parameter is: where, Θ t+1 is the model parameter after the (t + 1)-th iteration, Θ t is the parameter value of the t-th iteration, η is the learning rate, L ce is the loss function, Θ is the model parameter, is the gradient of the loss function with respect to the parameter; S45. Set the training termination condition. Assume the maximum number of training rounds is T, and the loss convergence threshold is ∈, and define the training termination condition: where t is the current training round, is the loss value at the t-th round, is the loss value at the (t + 1)-th round, ∈ is the minimum threshold of the loss change. When the training reaches the maximum number of rounds T or the loss change is less than ∈, the training is terminated; S46. Update the device recognition model and store the optimized parameter Θ T in the device management database to complete the training of the device recognition model.
5. The automatic identification method for Internet of Things devices in a cellular network environment according to claim 1, characterized in that The specific steps of S5 are as follows: S51. Collect the real-time traffic data of the device to be recognized. Assume the device set is: V = {v1, v2,..., v k}; Among them, V is the set of devices to be recognized, and v i is the i-th device, and there are a total of k devices. Extract the traffic data feature vectors and construct a feature matrix: H = [h1, h2,..., h k T ; where H is the device feature matrix, and h i is the feature vector of device v i ; S52. Normalize the feature vector. Assume the maximum-minimum normalization function is: where h i ′ is the eigenvector of the normalized device v i , max(H) is the maximum value of the eigenmatrix H, and min(H) is the minimum value of the eigenmatrix H; S53. Calculate the similarity between the device to be recognized and the device templates in the feature database. Assume the device template set is: T = {t1, t2,..., t m}; Among them, T is the set of device templates in the database, and t j is the j-th device template. The cosine similarity is used to calculate the matching degree between the device to be recognized and the device template: Among them, S i,j is the cosine similarity between the device to be recognized v i and the device template t j , ||h i ′|| is the two-norm of the vector h′ i , ||t j || is the two-norm of the vector t j ; S54. Find the optimal matching device. Assume the similarity threshold is τ, and define the matching device: Among them, is the device template that best matches device v i The arg max is the template device that finds the device with the highest similarity to the device to be recognized among all device templates. If the cosine similarity S i,j is greater than or equal to the threshold τ, then it is determined that device v i belongs to device template t j ; S55. If the similarity of all device templates is lower than the threshold, mark the device as an unknown device. Assume the unknown device set is: Among them, U is the set of devices with recognition failure, and v i is all devices with a similarity lower than the threshold, and τ is the threshold; S56. Output the device recognition result. Assume the type set of the matching device is: C = {c1, c2,..., c m}; Among them, C is the device type set, and the matching device type: Among them, c i is the recognition type of device v i , represents the device type corresponding to the device template , and stores the matching result in the device management database.
6. An automatic identification device for Internet of Things devices in a cellular network environment, which executes an automatic identification method for Internet of Things devices in a cellular network environment according to any one of claims 1 to 5, characterized in that, Includes: The traffic collection module is used to collect the IP flow information export record data of the preset type of Internet of Things devices in the cellular network environment, obtain the traffic information including signaling data and service data, and store the collected data in the traffic data storage module; The feature extraction module is used to extract the device traffic features in the IP flow information export record data, analyze the features such as the source address, target address, port number, protocol type, packet size, time interval, etc. of the data packet, generate feature vectors, represent each device in a unique way, and store the generated feature vectors as template data in the feature database; The model training module is used to train the device recognition model by combining the improved structure sparse variational autoencoder with the spatio-temporal graph convolutional network, process the device features using the structure regularization strategy, construct high-dimensional sparse feature vectors, perform feature extraction by combining the traffic pattern adaptive sparse constraint, and use the spatio-temporal graph convolutional network to extract the device behavior pattern and topological relationship to generate the device category prediction result; A loss optimization module, which is used to optimize the device recognition model by using a class balance loss function, calculate the device class weights, perform weighted training according to the distribution of device class data, optimize the model parameters, and dynamically adjust the learning rate during the training process; A device recognition module, which is used to collect real-time traffic data of the device to be recognized, analyze the protocol features, behavior patterns and communication rules of the traffic data packets, convert them into feature vectors, and input them into the trained device recognition model, calculate the cosine similarity between the device feature vector and the device template feature vector in the database, and perform device matching based on the similarity calculation; A result output module, which is used to set a similarity threshold. When the similarity is higher than the threshold, the device type and model are output. When the similarity is lower than the threshold, it is marked as an unknown device, and the recognition result is stored in the device management database.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor can execute an automatic identification method for Internet of Things devices in a cellular network environment according to any one of claims 1 to 5.
Citation Information
Cited By
Network topology identification method and electronic equipment
CN120785757A
Method for identifying network topology and electronic device
CN120785757B