A device identification method and device based on multi-dimensional features and expert fusion network

By employing a multi-dimensional feature and expert fusion network approach, the problems of single feature dimensions and insufficient generalization in IoT device identification are solved, achieving higher identification accuracy and wider adaptability.

CN123184932APending Publication Date: 2026-11-27NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611418169.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing IoT device identification methods suffer from problems such as limited feature dimensions, low identification accuracy, and low generalization, making it difficult to comprehensively characterize device communication behavior.

Method used

By using multidimensional feature extraction and expert fusion networks, statistical, spatiotemporal, and protocol features are independently modeled, and the outputs of each expert network are adaptively fused using an attention mechanism to achieve collaborative optimization of multiple features.

Benefits of technology

It improves the accuracy and generalization ability of IoT device identification, enabling a more comprehensive characterization of device communication behavior and enhancing the accuracy of identification and the ability to adapt to complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123184932A_ABST
    Figure CN123184932A_ABST
Patent Text Reader

Abstract

The application discloses a kind of equipment identification method and device based on multidimensional feature and expert fusion network, belong to the field of Internet of Things security;The method comprises: the original network traffic data is preprocessed, and data packet is divided into multiple data streams according to five-tuple information;Statistical features, space-time features and protocol features are extracted from each data stream;Multiple expert networks are constructed to independently model different types of features and output feature representations;Attention is fused to each expert output, and the weight of each feature is adaptively adjusted to obtain a fused feature;The fused feature is input into a classifier to output a device type identification result;The application models different dimensional features by multiple expert networks, and realizes adaptive fusion by combining attention mechanism, which improves the accuracy and generalization ability of Internet of Things device identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) security technology, specifically to a device identification method and apparatus based on multi-dimensional features and expert fusion networks. Background Technology

[0002] With the large-scale deployment of IoT devices, the types of devices connected to the network are becoming increasingly heterogeneous, including smart cameras, smart home controllers, and smart sensors. These devices generate a large amount of communication traffic on the network, providing convenient services to users while also introducing new cybersecurity risks, such as malicious device control, botnet attacks, and privacy breaches. Because different devices also differ significantly in communication modes, protocol usage, and traffic behavior characteristics, monitoring them is not easy for network administrators. Therefore, accurate identification and management of IoT devices in the network has become an important research direction for current IoT security.

[0003] The core objective of IoT device identification is a multi-classification task that automatically identifies device types by analyzing network traffic characteristics without actively interfering with device operation. Existing device identification methods mainly include those based on device identification information, those based on active probing, and those based on the analysis of passively collected network traffic features. While these methods have achieved certain identification performance, they all have significant drawbacks. Methods based on device identification information primarily utilize Media Access Control addresses, device manufacturer information, or device version fingerprints for identification; however, these methods are susceptible to address spoofing or address randomization techniques, resulting in limited accuracy. Methods that actively scan network devices and send probing requests to obtain device information from the device responses can provide more detailed device information, addressing the accuracy issue to some extent. However, this method may affect normal device operation and is limited by security policies in some real-world network environments, restricting its application scenarios. Utilizing network traffic data generated by devices to extract statistical features, flow behavior features, or protocol features, and then employing machine learning or deep learning algorithms for device identification, can reflect the true communication behavior of devices without interfering with their operation, and has become the mainstream research direction.

[0004] In recent years, researchers have proposed various machine learning-based methods for IoT device identification. For example, some studies utilize statistical features from network traffic logs, such as packet length, and combine them with traditional machine learning models like random forests and support vector machines to classify device types. These methods are relatively simple to implement and have low computational overhead, but their limited feature representation capabilities limit their ability to characterize complex communication behaviors. With the development of deep learning technology, some studies have begun to use deep neural networks to model IoT traffic, achieving more accurate device type identification. Compared to traditional methods, these methods can capture more complex and fine-grained traffic patterns, thus improving the accuracy of IoT device identification to some extent. However, behind the refinement of neural network models, there are still varying degrees of deficiencies in the model's generalization problem, namely, whether the data used for training and testing differs significantly, and whether the model has been trained on unknown data. In research using intelligent methods such as machine learning or neural networks for device identification, the academic community has focused more on constantly updated artificial intelligence models, resulting in a relatively singular data dimension and a lack of a more comprehensive characterization of device information.

[0005] Therefore, there is a need for an IoT device identification method that can fully utilize multi-dimensional traffic characteristics and improve identification accuracy and generalization through multi-model collaboration, in order to solve the core problems of insufficient feature utilization, low identification accuracy, and low generalization in existing technologies. Summary of the Invention

[0006] In view of the above problems, the present invention provides a device recognition method and apparatus based on multi-dimensional features and expert fusion networks, which can independently model different types of features through multiple expert networks and achieve adaptive fusion through attention mechanism, thereby improving the accuracy and generalization ability of device recognition.

[0007] In a first aspect, embodiments of this application provide a device identification method based on multi-dimensional features and expert fusion networks, including: The raw network traffic data is preprocessed, and the data packets are divided into multiple data streams based on the five-tuple information; Extract multidimensional features from each data stream, including statistical features, spatiotemporal features, and protocol features; Construct multiple expert networks, each corresponding to a feature type, and independently model the corresponding input features and output feature representations; The feature representations output by each expert network are fused by attention, and the weights of each feature are adaptively adjusted according to the input data to obtain the fused features; The fused features are input into the classifier, which outputs the identification result of the IoT device type.

[0008] In some embodiments, the preprocessing of raw network traffic data, which divides data packets into multiple data streams based on 5-tuple information, includes: Parse the raw packet capture file and extract the timestamp, packet length, source address, destination address, source port, destination port, and protocol type fields for each packet; Based on the 5-tuple consisting of source address, destination address, source port, destination port, and protocol type, data packets are divided into different data streams; each data stream is mapped to a characteristic sequence of uniform length, thus organizing unordered data packets into semantically related streams.

[0009] In some embodiments, the statistical characteristics include the average packet length, the standard deviation of the packet length, and the flow rate; The average length of the data packets is the arithmetic mean of the lengths of all data packets in the current data stream; The flow rate is the ratio of the total number of bytes in the data stream to the stream duration; the statistical features are combined into a statistical feature vector.

[0010] In some embodiments, the spatiotemporal features include time series features and a directional packet length sequence; The time series features are obtained by calculating the time interval between adjacent data packets based on the timestamps of the data packets; The directional packet length sequence determines the data flow direction based on the source address and destination address, marks uplink data as positive values ​​and downlink data as negative values, constructs a packet length sequence with directional identifiers, and performs length unification processing to obtain a spatiotemporal feature vector.

[0011] In some embodiments, the protocol features include protocol type, transmission control protocol flag, port number, and application layer protocol type; Discrete protocol features are encoded or embedded to convert them into numerical vectors, thus obtaining protocol feature vectors.

[0012] In some embodiments, the construction of multiple expert networks, each corresponding to a feature type, includes: The statistical features correspond to a multilayer perceptron expert network, which extracts the high-level semantics of the statistical features through multilayer nonlinear transformations. Temporal features correspond to long short-term memory expert networks, and long-term dependencies of time series are modeled through gating mechanisms; Spatial features correspond to one-dimensional convolutional expert networks, which capture local temporal patterns in byte streams through convolutional operations. The protocol features correspond to the embedding layer and the multilayer perceptron expert network, which learns the semantic feature representation of the protocol layer; each expert network trains parameters independently and outputs the corresponding feature representation vector.

[0013] In some embodiments, the attention fusion of the feature representations output by each expert network includes: Dimension alignment is achieved by mapping the feature representations output by each expert network to a unified dimension through a fully connected layer. Calculate the attention weights corresponding to the outputs of each expert network, where the attention weights are learnable parameters; The output features of each expert network are weighted and summed according to the attention weights to obtain the fused feature representation.

[0014] Secondly, embodiments of this application provide a device identification apparatus based on multi-dimensional features and an expert fusion network, comprising: The preprocessing module is used to preprocess the raw network traffic data and divide the data packets into multiple data streams based on the five-tuple information; The feature extraction module is used to extract multidimensional features from each data stream, including statistical features, spatiotemporal features, and protocol features. The multi-expert modeling module is used to construct multiple expert networks, each corresponding to a feature type, independently modeling the corresponding input features and outputting feature representations; The attention fusion module is used to fuse the feature representations output by each expert network, and adaptively adjust the weights of each feature according to the input data to obtain the fused features. The classification output module is used to input the fused features into the classifier and output the identification result of the IoT device type.

[0015] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores program code that can run on the processor, and when the program code is executed by the processor, it implements a device identification method based on multidimensional features and expert fusion networks as described in any embodiment of the first aspect.

[0016] Fourthly, embodiments of this application provide a computer storage medium storing one or more programs, which can be executed by an electronic device as described in the third aspect to implement a device identification method based on multidimensional features and expert fusion networks as described in any embodiment of the first aspect.

[0017] This application provides a device identification method, apparatus, electronic device, and storage medium based on multidimensional features and expert fusion networks. By extracting multidimensional features such as statistics, spatiotemporal features, and protocols from network traffic, multiple expert networks are constructed to independently model different types of features. Then, the outputs of each expert are adaptively fused through an attention mechanism to achieve collaborative optimization of multiple features. This effectively overcomes the limitation of the expressive power of a single feature and improves the accuracy and generalization ability of device identification.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0019] The invention will now be described in more detail with reference to embodiments and the accompanying drawings.

[0020] Figure 1 This diagram illustrates an exemplary device identification method based on multidimensional features and expert fusion networks, as proposed in one embodiment of the present invention. Figure 2 A schematic diagram of an exemplary process structure proposed in one embodiment of this application is shown; Figure 3 This diagram illustrates a structural block diagram of an exemplary device identification device based on multidimensional features and expert fusion networks, according to an embodiment of the present invention. Figure 4 This diagram illustrates a structural block diagram of an electronic device for implementing a device identification method based on multidimensional features and expert fusion networks according to an embodiment of the present invention. Figure 5 The diagram illustrates a computer-readable storage medium for storing or carrying a device identification method based on multidimensional features and expert fusion networks according to an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0022] Traditional IoT device identification methods suffer from problems such as single feature dimensions, insufficient feature utilization, low identification accuracy, and low generalization. Single-dimensional features are insufficient to fully characterize device communication behavior, and single model structures are insufficient to simultaneously meet the modeling needs of multi-dimensional features.

[0023] By analyzing and combining the above-mentioned technical problems, the inventors fully considered the complementarity of multi-dimensional features and the advantages of different network structures. In order to achieve high-precision identification of IoT devices, a device identification method, apparatus, electronic device and storage medium based on multi-dimensional features and expert fusion networks were proposed, combining multi-dimensional feature extraction and multi-expert fusion networks. This invention can use multiple expert networks to specifically model different types of features such as statistics, time, space and protocol, and then use attention mechanism to adaptively fuse the outputs of each expert to achieve collaborative optimization of multiple features. The present invention aims to solve the limitations and challenges of the existing technology through this innovative method. The device identification method based on multi-dimensional features and expert fusion networks will be described in detail in the following embodiments.

[0024] The following describes an application scenario of a device identification method based on multi-dimensional features and expert fusion networks provided in the embodiments of this application: Please see Figure 1 , Figure 1 This is a schematic diagram of the flowchart of a device identification method based on multidimensional features and expert fusion network provided in this application embodiment. In this embodiment, a device identification method based on multidimensional features and expert fusion network can be applied to electronic devices. The electronic devices may include one or more, and multiple electronic devices can transmit information wirelessly and / or via wired means. Multiple electronic devices can cooperate to complete a device identification method based on multidimensional features and expert fusion network. For example, electronic devices may include servers, computers, network security devices, gateway devices, etc., and this application does not limit them.

[0025] The following is about Figure 1 and combined Figure 2 The process shown is described in detail. This device identification method based on multi-dimensional features and expert fusion networks may include steps S110 to S150.

[0026] S110: Preprocess the raw network traffic data and divide the data packets into multiple data streams based on the 5-tuple information.

[0027] In this embodiment of the application, data preprocessing is a fundamental step in the entire device identification method. By organizing the original unordered data packets into a data stream with semantic associations, a structured data foundation is provided for subsequent multidimensional feature extraction.

[0028] In some embodiments, S110 further includes S111 to S113, wherein: S111: Parse the raw packet capture file and extract the timestamp, packet length, source address, destination address, source port, destination port, and protocol type fields for each packet.

[0029] In this embodiment, the raw traffic data is stored in the form of a packet capture file, which contains the collected raw network packets. The packet capture file is parsed to extract the basic field information of each packet, including timestamp, packet length, source Internet Protocol address, destination Internet Protocol address, source port, destination port, protocol type (e.g., Transmission Control Protocol, User Datagram Protocol, Internet Control Message Protocol), and Transmission Control Protocol flags (e.g., synchronization, acknowledgment, termination). Let the raw traffic dataset be D, where the i-th network packet is represented as... It contains information such as timestamp, packet length, and protocol fields.

[0030] For example, this invention uses the UNSW-IoTraffic dataset, which provides three main categories of data: Packet-level data, Flow-level statistics, and Protocol-level information.

[0031] Packet-level data consists of raw PCAP traffic packets collected, from which information such as timestamps, packet lengths, source / destination IPs, source / destination ports, protocol types (e.g., TCP / UDP / ICMP), and TCP flags (e.g., SYN, ACK, FIN) can be extracted. First, the raw PCAP data is parsed to extract the basic fields of each data packet.

[0032] Let the original traffic dataset be: ,in This represents the i-th network data packet, which includes information such as timestamp, packet length, and protocol fields.

[0033] S112: Divide data packets into different data streams based on the five-tuple consisting of source address, destination address, source port, destination port, and protocol type.

[0034] In this embodiment, data packets are segmented into flows based on a 5-tuple consisting of source address, destination address, source port, destination port, and protocol type. Data packets with the same 5-tuple are grouped into the same data flow. This flow segmentation results in a flow set. Each stream It consists of all data packets belonging to that flow. The purpose of flow segmentation is to organize unordered data packets into semantically related flows, so that subsequent features can reflect the communication behavior patterns of the device.

[0035] For example, data packets are segmented into flows based on the 5-tuple (source IP, destination IP, source port, destination port, protocol) to obtain a flow set. Each stream is represented as: The goal of mapping each stream to a feature of uniform length is to organize unordered data packets into semantically related streams, so that subsequent features can reflect the device's communication behavior.

[0036] S113: Map each data stream to a feature sequence of uniform length, so that unordered data packets are organized into streams with semantic associations.

[0037] In this embodiment, since different data streams contain different numbers of data packets and have inconsistent sequence lengths, each data stream needs to be mapped to a feature sequence of uniform length so that it can be input into the neural network model for processing. Streams with insufficient length are padded, and streams with excessive length are truncated or sampled to ensure that the feature sequence length of all streams is consistent.

[0038] S120: Extract multidimensional features from each data stream, the multidimensional features including statistical features, spatiotemporal features and protocol features.

[0039] In this embodiment, multidimensional feature extraction is a key step in comprehensively characterizing device communication behavior. By extracting features from multiple dimensions such as statistics, spatiotemporal analysis, and protocols, the communication behavior characteristics of the device can be reflected from different perspectives, providing rich input data for subsequent multi-expert network modeling.

[0040] In some embodiments, S120 further includes S121 to S123, wherein: S121: Extract statistical features, including the average packet length, the standard deviation of packet length, and the flow rate.

[0041] In this embodiment, statistical features are mainly extracted through flow-level and packet-level data to describe the overall behavioral patterns of device communication. The average packet length is the average packet length in the current network flow.

[0042] After stream partitioning, features are extracted from each stream across multiple dimensions to comprehensively characterize device communication behavior. Statistical feature construction primarily involves extracting features from the flow-level and packet-level portions of the dataset, such as the mean packet length.

[0043] in, This represents the average length of data packets in the current network flow. This represents the total number of data packets contained in the j-th stream. This represents the length of the i-th packet in the stream. The standard deviation of the packet length and the stream rate are also calculated.

[0044] Standard deviation of data packet length

[0045] Where t is the total number of bytes, For the duration of the flow, This represents the flow rate. Within the statistical characteristics dimension, features including, but not limited to, the three mentioned above are used to describe the overall behavioral patterns of device communication. In implementation, this can be calculated by traversing all data packets within the flow.

[0046] Assuming the above three features are the extracted statistical features, a feature vector can be constructed. For model learning.

[0047] S122: Extract spatiotemporal features, which include time series features and directional packet length sequences.

[0048] In this embodiment, time series features are extracted based on the timestamp field of the packet-level data packet. For example, the calculation formula for the time interval between adjacent data packets is as follows:

[0049] This represents the timestamp of the i-th data packet. The time interval is used to obtain feature vectors such as time series data. Provided for model learning.

[0050] In addition, the direction of data flow can be determined based on the source IP and destination IP. For example, if uplink data is marked as a positive value and downlink data is marked as a negative value, then a positive value indicates that the device is sending data, and a negative value indicates that the device is receiving data.

[0051] In this embodiment, the directional packet length sequence is constructed based on the source and destination addresses to determine the data flow direction. Uplink data is marked as positive values, and downlink data is marked as negative values; positive values ​​indicate that the device is sending data, and negative values ​​indicate that the device is receiving data. The directional packet length sequence is constructed as follows:

[0052] Then, the sequence is processed to uniform length, resulting in a vector, for example... These spatiotemporal characteristics can reflect the size and direction of data flow, effectively reflecting device communication patterns, such as request-response relationships.

[0053] The sign is determined by the data flow direction. The sequence is then processed to achieve a fixed length, resulting in a spatiotemporal feature vector. These spatiotemporal features can reflect the data volume and flow direction, effectively indicating device communication patterns, such as request-response relationships.

[0054] S123: Extract protocol features, which include protocol type, transmission control protocol flag, port number, and application layer protocol type.

[0055] In this embodiment, the protocol features extract semantic information from the parsing results of protocol-level data and packet-level protocol-related information, including protocol types such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), TCP flags such as synchronization, acknowledgment, and termination, port numbers, and application layer protocols such as Hypertext Transfer Protocol (HTP) and Domain Name System (DNS).

[0056] For example, semantic information can be extracted from the protocol-level and packet-level information parsing results of the dataset, such as protocol type (TCP / UDP, TCP flags (SYN, ACK, FIN, etc.), port number, application layer protocol (HTTP, DNS, etc.).

[0057] Discrete protocol features are numerically processed using encoding or embedding representation to obtain protocol feature vectors. ,in, This represents the k-th protocol feature. Protocol features can reflect communication semantic information and are an important basis for identifying device types.

[0058] S130: Construct multiple expert networks, each corresponding to a feature type, independently model the corresponding input feature and output the feature representation.

[0059] In this embodiment, the construction of multi-expert networks is the core module of the method. For different types of features, corresponding expert networks are designed for independent modeling. Each expert network is designed with an optimal structure for a specific feature type to avoid interference between different types of features and improve feature modeling capabilities.

[0060] In some embodiments, S130 further includes S131 to S134, wherein: S131: Statistical features correspond to multilayer perceptron expert networks, which extract high-level semantics of statistical features through multilayer nonlinear transformations.

[0061] In this embodiment, for statistical features, the statistical feature vector is input into a multilayer perceptron expert network. The multilayer perceptron is chosen because it can directly accept numerical statistical features as input without relying on spatial structure, and its hidden layers and nonlinear activation functions make it easier to learn the nonlinear combination relationships of statistical features. High-level semantic features are extracted through multilayer nonlinear transformations.

[0062] For example, for different types of features, corresponding expert networks are constructed for modeling. Let there be K expert networks in total, and the output of each expert network... It can be represented as:

[0063] k represents the expert network index, k=1,…,4, representing expert networks that handle four different features.

[0064] Let k be the expert network mapping function. Let be the input feature vector of the k-th class.

[0065] For example, this application employs a multilayer perceptron (MLP) as the input vector. The MLP is chosen because it can directly accept numerical statistical features as input without relying on spatial structure, and its hidden layers and nonlinear activation functions facilitate the learning of nonlinear combinations of statistical features. High-level semantic features are extracted through multilayer nonlinear transformations, such as:

[0066] in, Represents a statistical eigenvector. () represents the activation function, and b represents the bias vector. This is the weight matrix.

[0067] S132: The time features correspond to the Long Short-Term Memory Network expert network, which models the long-term dependencies of time series through a gating mechanism.

[0068] In this embodiment, for time features, the time series vector is input into a Long Short-Term Memory (LSTM) expert network. The reason for choosing the LSTM network is that time series data has strong temporal dependencies; that is, the value at the current moment is often closely related to the values ​​at multiple past moments. The LSTM network, due to its unique gating mechanism, can selectively retain or discard historical information, effectively capturing long-term dependencies in the time series. By modeling these temporal dependencies, long-term behavioral patterns are captured.

[0069] For example, the choice of a Long Short-Term Memory (LSTM) network as the input vector is based on the strong temporal dependencies in time-series data. This means that the current value is often closely related to values ​​from multiple past moments. LTM, with its unique gating mechanism, can selectively retain or discard historical information, effectively capturing long-term dependencies in time series data. By modeling these temporal dependencies, long-term behavioral patterns are captured, as expressed in the following expression:

[0070]

[0071] in, The input for the t-th time step is the time interval. , This represents the hidden state at the current time step, indicating the sequence features up to the current moment. This is a unit function of a Long Short-Term Memory (LSTM) network, which includes a gating mechanism, where n is the sequence length. This represents the final output feature.

[0072] S133: Spatial features correspond to one-dimensional convolutional network expert networks, which capture local temporal patterns in byte streams through convolution operations.

[0073] In this embodiment, for spatial features, a one-dimensional byte sequence is input into a one-dimensional convolutional network expert network. The one-dimensional convolutional network can directly capture local temporal patterns in the byte stream, and the calculation formula is as follows:

[0074] in, It is a one-dimensional byte sequence. This is a one-dimensional convolution operation. is the activation function. For protocol semantic features: the protocol semantic features are input into the embedding layer and the multilayer perceptron to learn the protocol layer feature representation.

[0075] S134: Protocol features correspond to the embedding layer and multilayer perceptron expert network, learning the semantic feature representation of the protocol layer.

[0076] In this embodiment, for protocol semantic features, the protocol feature vector is input into the embedding layer and the multilayer perceptron expert network. The embedding layer maps discrete protocol features into continuous vector representations, and then the multilayer perceptron learns high-level semantic features, finally outputting a representation h4. Each expert network independently trains its parameters and outputs a corresponding feature representation vector. This structure can avoid interference between different types of features and improve feature modeling capabilities.

[0077] For protocol semantic features: Input the protocol semantic features into the embedding layer and the multilayer perceptron to learn the protocol layer feature representation:

[0078] in, For protocol feature vectors, This is the final output. Each expert network trains its parameters independently and outputs a corresponding feature representation vector. This structure can avoid interference between different types of features and improve feature modeling capabilities.

[0079] S140: Attention fusion is performed on the feature representations output by each expert network, and the weights of each feature are adaptively adjusted according to the input data to obtain the fused features.

[0080] In this embodiment, attention fusion is a key step in achieving effective collaboration between different features. By adaptively learning the importance weights of different expert outputs through an attention mechanism, the contributions of various features are dynamically adjusted according to different input data, thereby achieving efficient collaboration between multi-dimensional features.

[0081] In some embodiments, S140 further includes S141 to S143, wherein: S141: The feature representations output by each expert network are mapped to a unified dimension through a fully connected layer, thereby achieving dimension alignment.

[0082] In this embodiment, since the output dimensions of different expert networks may be inconsistent, it is necessary to first map the outputs of each expert to a unified dimension through a fully connected layer.

[0083] For example, collect the output feature vectors of all expert networks and map each expert's output to a unified dimension:

[0084] Alignment is achieved using a fully connected layer: At this point, all expert output dimensions will eventually remain consistent.

[0085] S142: Calculate the attention weights corresponding to the outputs of each expert network, where the attention weights are learnable parameters.

[0086] In this embodiment, the attention weight corresponding to each expert output is calculated. The weight is a learnable parameter, automatically learned through the training process. The attention weight reflects the importance of different features under the current input, and the calculation formula is as follows:

[0087] in, For learnable parameter vectors, Let be the attention weight of the kth expert.

[0088] S143: The output features of each expert network are weighted and summed according to the attention weights to obtain the fused feature representation.

[0089] In this embodiment, the output features of each expert network are weighted and summed according to the calculated attention weights to obtain the final fused feature representation. The calculation formula is as follows:

[0090] in, This is the fused feature vector. This weighted fusion method adaptively adjusts the contribution of various features based on different input data, thereby improving the model's adaptability to complex scenarios.

[0091] S150: Input the fused features into the classifier and output the identification result of the IoT device type.

[0092] In this embodiment, the classification output is the last step in the entire recognition process. The fused feature representation is input into the classifier to obtain the final device type recognition result.

[0093] In this embodiment, the fused feature representation is input into a normalized exponential function classifier to obtain the final probability distribution, calculated as follows:

[0094] Where C is the total number of devices, the final probability y is obtained after passing through the Softmax classifier, each element represents the probability of the corresponding device type, and the training strategy is to use the cross-entropy loss function, which is defined as the following formula L.

[0095]

[0096] in, One-hot encoding for the real label, The probabilities predicted by the model. The parameters of the entire network model are trained by minimizing the cross-entropy loss.

[0097] In this embodiment, within the multi-expert network module, corresponding expert networks are constructed for different types of features. These expert networks operate in parallel, and the feature vectors output by each expert network are input into the attention fusion module to learn the importance weights of different features, achieving adaptive fusion of multi-dimensional features. The fused feature representation is then input into a classifier to complete the identification of IoT device types.

[0098] In summary, this device identification scheme, which combines multi-dimensional feature extraction with a multi-expert fusion network, addresses the problems of traditional IoT device identification methods, such as single feature dimensions, insufficient feature utilization, low identification accuracy, and low generalization. It proposes a new solution that achieves a comprehensive characterization of device communication behavior and collaborative optimization of multiple models, effectively improving identification accuracy and generalization ability.

[0099] This application extracts features from multiple dimensions such as statistics, time, space, and protocol, models them separately using multiple expert networks, and then adaptively fuses them through an attention mechanism, achieving efficient collaboration of multi-dimensional features. It has broad application prospects and practical value.

[0100] The above provides a detailed description of a device identification method based on multidimensional features and expert fusion networks provided by the embodiments of this application. The following describes a device identification device based on multidimensional features and expert fusion networks provided by the embodiments of this application.

[0101] Please see Figure 3 , Figure 3 A structural block diagram of a device recognition device 300 based on multi-dimensional features and expert fusion networks provided by the present invention includes: a preprocessing module 310, a feature extraction module 320, a multi-expert modeling module 330, an attention fusion module 340, and a classification output module 350, wherein: The preprocessing module 310 is used to preprocess the raw network traffic data and divide the data packets into multiple data streams based on the five-tuple information.

[0102] The feature extraction module 320 is used to extract multidimensional features from each data stream, the multidimensional features including statistical features, spatiotemporal features and protocol features.

[0103] The multi-expert modeling module 330 is used to construct multiple expert networks, each corresponding to a feature type, to independently model the corresponding input features and output feature representations.

[0104] The attention fusion module 340 is used to perform attention fusion on the feature representations output by each expert network, and adaptively adjust the weights of each feature according to the input data to obtain fused features.

[0105] The classification output module 350 is used to input the fused features into the classifier and output the identification result of the IoT device type.

[0106] It should be noted that the present invention may also include other modular units. The device embodiments in the present invention correspond to the foregoing method embodiments. The specific principles of the modular embodiments in the device can be found in the foregoing method embodiments, and will not be repeated here.

[0107] In the several embodiments provided in this example, the coupling between the module units can be electrical, mechanical, or other forms of coupling.

[0108] Furthermore, the functional module units in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module.

[0109] Please see Figure 4 , Figure 4 The present invention provides a structural block diagram of an electronic device 200 that can perform the above-described device identification method based on multidimensional features and expert fusion networks. The electronic device 200 may be a tablet computer, a computer, or a portable computer.

[0110] The electronic device 200 also includes a processor 202 and a memory 204. The memory 204 stores programs that can execute the contents of the foregoing embodiments, and the processor 202 can execute the programs stored in the memory 204.

[0111] The processor 202 may include one or more cores for data processing and message matrix units. The processor 202 connects to various parts within the electronic device 200 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 204, and by calling data stored in the memory 204. Optionally, the processor 202 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 202 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem / decoder. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem / decoder handles wireless communication. It is understood that the modem / decoder may also be implemented separately as a communication chip, without being integrated into the processor.

[0112] Memory 204 may include random access memory (RAM) or read-only memory (ROM). Memory 204 can be used to store instructions, programs, code, code sets, or instruction sets. Memory 204 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., instructions for a user to obtain random numbers), instructions for implementing the various method embodiments described below, etc. The data storage area may also store data (e.g., random numbers) created by the terminal during use.

[0113] Electronic device 200 may also include a network module and a screen. The network module is used to receive and transmit electromagnetic waves, converting electromagnetic waves into electrical signals, thereby enabling communication with communication networks or other devices, such as audio playback devices. The network module may include various existing circuit elements used to perform these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, SIM cards, memory, etc. The network module can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices via wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The screen can display interface content and facilitate data interaction.

[0114] Please refer to Figure 5 , Figure 5 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present invention is shown. The computer-readable storage medium 400 stores program code 410, which can be called by a processor to execute the methods described in the above method embodiments.

[0115] The computer-readable storage medium 400 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium 400 has storage space for program code 410 that performs any of the method steps described above. This program code 410 can be read from or written to one or more computer program products. The program code 410 may be compressed, for example, in a suitable form.

[0116] This invention also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a device identification method based on multi-dimensional features and expert fusion networks as described in the various optional implementations above.

[0117] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A device identification method based on multi-dimensional features and expert fusion networks, characterized in that, The method includes: The raw network traffic data is preprocessed, and the data packets are divided into multiple data streams based on the five-tuple information; Extract multidimensional features from each data stream, including statistical features, spatiotemporal features, and protocol features; Construct multiple expert networks, each corresponding to a feature type, and independently model the corresponding input features and output feature representations; The feature representations output by each expert network are fused by attention, and the weights of each feature are adaptively adjusted according to the input data to obtain the fused features; The fused features are input into the classifier, which outputs the identification result of the IoT device type.

2. The device identification method based on multi-dimensional features and expert fusion network according to claim 1, characterized in that, The preprocessing of raw network traffic data, which divides data packets into multiple data streams based on 5-tuple information, includes: Parse the raw packet capture file and extract the timestamp, packet length, source address, destination address, source port, destination port, and protocol type fields for each packet; The data packets are divided into different data streams based on the five-tuple consisting of source address, destination address, source port, destination port, and protocol type; Each data stream is mapped to a feature sequence of uniform length, thus organizing unordered data packets into a semantically related stream.

3. The device identification method based on multi-dimensional features and expert fusion network according to claim 1, characterized in that, The statistical characteristics include the average packet length, the standard deviation of the packet length, and the flow rate; The average length of the data packets is the arithmetic mean of the lengths of all data packets in the current data stream; The flow rate is the ratio of the total number of bytes in the data stream to the stream duration; The statistical features are combined into a statistical feature vector.

4. The device identification method based on multi-dimensional features and expert fusion network according to claim 1, characterized in that, The spatiotemporal features include time series features and directional packet length sequences; The time series features are obtained by calculating the time interval between adjacent data packets based on the timestamps of the data packets; The directional packet length sequence determines the data flow direction based on the source address and destination address, marks uplink data as positive values ​​and downlink data as negative values, constructs a packet length sequence with directional identifiers, and performs length unification processing to obtain a spatiotemporal feature vector.

5. The device identification method based on multi-dimensional features and expert fusion network according to claim 1, characterized in that, The protocol features include protocol type, transmission control protocol flag, port number, and application layer protocol type; Discrete protocol features are encoded or embedded to convert them into numerical vectors, thus obtaining protocol feature vectors.

6. The device identification method based on multi-dimensional features and expert fusion network according to claim 1, characterized in that, The construction of multiple expert networks, each corresponding to a feature type, includes: The statistical features correspond to a multilayer perceptron expert network, which extracts the high-level semantics of the statistical features through multilayer nonlinear transformations. Temporal features correspond to long short-term memory expert networks, and long-term dependencies of time series are modeled through gating mechanisms; Spatial features correspond to one-dimensional convolutional expert networks, which capture local temporal patterns in byte streams through convolutional operations. The protocol features correspond to the embedding layer and the multilayer perceptron expert network, and the semantic feature representation of the protocol layer is learned. Each expert network trains its parameters independently and outputs its corresponding feature representation vector.

7. The device identification method based on multi-dimensional features and expert fusion network according to claim 6, characterized in that, The attention fusion of the feature representations output by each expert network includes: Dimension alignment is achieved by mapping the feature representations output by each expert network to a unified dimension through a fully connected layer. Calculate the attention weights corresponding to the outputs of each expert network, where the attention weights are learnable parameters; The output features of each expert network are weighted and summed according to the attention weights to obtain the fused feature representation.

8. A device identification device based on multi-dimensional features and expert fusion networks, characterized in that, The device includes: The preprocessing module is used to preprocess the raw network traffic data and divide the data packets into multiple data streams based on the five-tuple information; The feature extraction module is used to extract multidimensional features from each data stream, including statistical features, spatiotemporal features, and protocol features. The multi-expert modeling module is used to construct multiple expert networks, each corresponding to a feature type, independently modeling the corresponding input features and outputting feature representations; The attention fusion module is used to fuse the feature representations output by each expert network, and adaptively adjust the weights of each feature according to the input data to obtain the fused features. The classification output module is used to input the fused features into the classifier and output the identification result of the IoT device type.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores program code that can run on the processor. When the program code is executed by the processor, it implements a device identification method based on multidimensional features and expert fusion networks as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code that can be invoked by one or more processors to execute a device identification method based on multidimensional features and expert fusion networks as described in any one of claims 1-7.