Staged device fine-grained type identification method and system
Through a staged fine-grained device type identification method, feature similarity measurement rules and importance measurement algorithms are used to identify device brands and models, solving the problem of low device type identification accuracy in the existing technology, and achieving efficient and accurate Device type identification.
Patent Information
- Application Number
- CN202210056554.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-01-18
AI Technical Summary
Existing device type identification methods have low accuracy in identifying fine-grained types of devices in actual environments. In particular, methods based on measurement results and physical information have low identification accuracy in network environments. Methods based on network search are complex and inaccurate. Not high.
Adopt a staged device fine-grained type identification method, extract common attributes as features according to device brand groups, design feature similarity measurement rules and importance measurement algorithms, select brand features and model features, and calculate the brand and model similarities of the target device , to achieve efficient identification.
It improves the accuracy and efficiency of device type recognition, and can effectively distinguish devices of different brands and models with high recognition accuracy.
Smart Images

Figure CN114548678B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of device type identification, and in particular relates to a method and system for staged fine-grained device type identification. Background Art
[0002] Device type identification is a technology that determines device information such as brand model, service type, version information, etc. Accurately identifying the fine-grained type of a device can provide important basic support for network resource mapping, network asset census, vulnerability risk assessment, and combating counterfeit products. It is of great significance to improving network governance efficiency and protecting intellectual property rights. Existing device type identification methods can be mainly divided into device type identification based on measurement results, device type identification based on information search, and device type identification based on physical information.
[0003] The device type identification method based on measurement results builds a device fingerprint library and classification identification model by mining and analyzing the attribute information (such as port, protocol, banner, etc.) in the active measurement results and the behavioral characteristics (such as packet length, packet transmission interval, data flow statistical characteristics, etc.) in the passive listening results to achieve the identification of device types. Nmap extracts port information from the active measurement results of the device to build device fingerprints, and is the first to realize the identification of the device-bearing service type and operating system. After that, Durumeric et al. developed Zmap, which greatly accelerated the information collection of target devices during the identification process and improved the efficiency of network device identification. Some literature extracts IP, port, flag bits, etc. in the TCP message header as features, and uses machine learning algorithms to train the identification model to achieve the identification of device types. Some literature extracts features from the protocol data of each layer of the passive detection results to generate device fingerprints, and obtains the device type through fingerprint matching. Arunan et al. extracts features such as message time, port, DNS, etc. from the data streams of the network layer and application layer, and uses multiple machine learning algorithms to build a phased identification model to achieve the identification of device types. Some literature statistically analyzes the behavior characteristics of different device types such as message time, activity cycle, signal mode, etc. from passive detection results, and constructs device descriptors to identify device types. Cheng et al. distinguish device types based on the differences between the file headers of different types of devices in the measured traffic.
[0004] The device type identification method based on measurement results has a wide range of measurement data sources, can batch identify device types and brand information in a normal network environment, and has good environmental applicability. However, since the differences between devices of the same type and brand are not obvious in network measurement data, this type of method is difficult to effectively identify the fine-grained model of the device.
[0005] The device type identification method based on network search uses Internet crawlers to search for information related to device product attributes from Internet resources such as URL strings and web pages, thereby building a device information library for device type identification. Li et al. designed a device type information identification algorithm based on the GUI information in the web page of the monitoring device and found about 1.6 million monitoring devices. Zou et al. built an IoT device type identification framework, built a device information library based on the product attributes contained in the IoT device protocol slogan, and then realized the hierarchical identification of device types. Agarwal et al. developed the WID tool to identify the device type from the source code of the device main page and its subpages. The ARE engine designed by Feng et al. can search for special slogans in the application layer response data on the device website, and obtain device description information from the device annotation to identify the device type.
[0006] The device type identification method based on network search calibrates the device type based on Internet Web resources, and can identify the device type in a fine-grained manner without building a device fingerprint library or training a machine learning model. However, since the reliability of Web resources is difficult to evaluate and the page structure of search results is diverse, the recognition accuracy of this type of method in the actual network environment is not high and the implementation is complex.
[0007] The device type identification method based on physical information identifies the device type based on the differences in the physical characteristics of the device. Guo et al. analyzed the structural allocation characteristics of the device physical address and used the MAC address to identify the device type. Some literature uses the time offset characteristic of "the clock of each device is unique, and the deviation still exists after calibration by the Network Time Protocol (NTP)" to classify IoT devices. S. Radhakrishnan found that the hardware clock deviation of the device will lead to differences in network behavior, and designed a device fingerprint generation algorithm GTID based on neural network to identify device types.
[0008] Device type identification methods based on physical information can identify fine-grained device types, especially those based on clock offset characteristics, which greatly improve the precision and accuracy of type identification. However, due to network interference, the precise time offset is difficult to measure, and the recognition accuracy of such methods in actual network environments is low. At the same time, calculating the clock offset of the device requires a large number of continuous data packets, which also limits the large-scale use of such methods. Summary of the invention
[0009] In view of the problem that the existing methods have low accuracy in identifying fine-grained device types in actual environments, the present invention proposes a phased device fine-grained type identification method and system, which can efficiently identify the brand and model of the target device with high recognition accuracy.
[0010] In order to achieve the above object, the present invention adopts the following technical solutions:
[0011] The present invention provides a staged fine-grained device type identification method, comprising the following steps:
[0012] All devices in the knowledge set are grouped according to device brands. Devices of the same brand are grouped together. For each brand group, common device attributes are extracted from the information of the devices in the group as brand attributes. If all brand groups have a certain brand attribute, the attribute is extracted as a feature.
[0013] According to the form of feature expression, the extracted features are divided into numerical features and string features. For features of different forms, feature similarity measurement rules are designed respectively.
[0014] Design an algorithm to measure the importance of extracted features in brand recognition and an algorithm to measure the importance of extracted features in model recognition to measure the importance of each extracted feature in brand recognition and model recognition, so as to select brand features and model features and determine their weights;
[0015] After identifying the brand of the target device based on the brand feature and its weight, the model of the target device is identified by the model feature and its weight, thereby realizing the identification of the type of the target device.
[0016] Furthermore, for numerical features, the design feature similarity measurement rules include:
[0017] If device D i and D j If the kth extracted feature is a numerical feature and has only one value, then the target feature is calculated using formula (1) With datum feature The feature similarity between:
[0018]
[0019] Among them, ε is the error threshold, For device D i The kth extracted feature of For device D j The kth extracted feature of is the absolute value of the eigenvalue;
[0020] like and Contains multiple values, record Then the similarity is calculated for the values on each dimension respectively, and the final feature similarity value is the product of the similarities on each dimension, then and The feature similarity between them is calculated as shown in formula (2):
[0021]
[0022] When calculating feature similarity according to formula (1) and formula (2), if or This indicates that the difference between the feature values or the values on a certain dimension is too large. In this case, the features are judged to be dissimilar and the feature similarity is 0.
[0023] Furthermore, for string-type features, the design feature similarity measurement rules include:
[0024] If device D i and D j The kth extracted feature is a string feature, and or When it is a single string feature, use formula (3) to calculate and The feature similarity between:
[0025]
[0026] when or , it is considered that the feature acquisition is incomplete, so the feature similarity value is set to 0.8;
[0027] when and When all are multi-string features, Constructing the vector space will and Vectorization, taking the cosine similarity between vectors as the similarity between features, record and The vectorized results are V i,k and V j,k ,but and The feature similarity between them is calculated as shown in formula (4):
[0028]
[0029] Furthermore, the brand feature selection using the algorithm for measuring the importance of the extracted features in brand recognition includes:
[0030] Let ef1, ef2, ef3, …, ef n To extract features, extract the feature vector ef = [ef1, ef2, ef3, ..., ef n ], to extract the feature ef m , 1≤m≤n, let ef′=ef\efm , remove ef from the vector ef m ; Calculate and delete ef according to formula (5) m The average of the similarity increment within the brand before and after:
[0031]
[0032] Where D i ,D j ∈Brand k ,Brand k ∈Brand,Brand k represents the set of all devices with brand type k, Brand represents the brand type set, and M is the number of brand types; at the same time, according to formula (6), the deletion of ef m The average value of the similarity increment between the previous and next brands:
[0033]
[0034] Where D i ∈Brand k ,Brand k ∈Brand,D l ∈Brand-{Brand k}, Brand-{Brand k} means deleting Brand from the Brand collection k ; Since 0≤S(ef,ef)≤1, according to equations (5) and (6), we can get:
[0035]
[0036] According to the obtained avebins and avebouts, the feature importance rule is designed to be expressed by formula (8) to evaluate the feature ef m Importance in Brand Identity:
[0037]
[0038] Where α is a factor that measures the influence of avebins and avebouts values on the extracted feature rqb value; if rqb(ef m )>0, then ef m Will be selected as the brand feature, the rqb values of all brand features are regularized, and the results are used as feature weights.
[0039] Furthermore, the model feature selection using the importance measurement algorithm of the extracted features in model recognition includes:
[0040] Let ef1, ef2, ef3, …, efn To extract features, extract the feature vector ef = [ef1, ef2, ef3, ..., ef n ], to extract the feature ef m , 1≤m≤n, let ef′=ef\ef m , remove ef from the vector ef m ; Calculate and delete ef according to formula (5) m The average value of the similarity increment within the brand before and after avebins; at the same time, according to formula (9), the deletion ef m The standard deviation of the similarity increment within the brand before and after aveD:
[0041]
[0042] Where D i ,D j ∈Brand k ,Brand k ∈Brand; According to the obtained avebins and aveD, the feature importance rule is designed to be expressed by formula (10) to evaluate the feature ef m Importance in model identification:
[0043]
[0044] Where β∈[0.5,1], if rqm(ef m )>0,ef m Will be selected as the model feature, the rqm values of all model features are regularized, and the results are used as feature weights.
[0045] Further, identifying the brand of the target device based on the brand features and their weights includes:
[0046] The brand similarity between the target device and the devices in the knowledge set is calculated by weight according to formula (11):
[0047] Bsimi(K i ,T)=S(bf(K i ),bf(T))W(bf) (11)
[0048] In the formula, T is the target device, K i is the device in the knowledge set, bf represents the brand feature vector, and W(bf) is the regularized brand feature weight. The brand of the device with the greatest similarity to the target in the knowledge set is taken as the brand of the target device, thereby realizing brand recognition of the target device.
[0049] Furthermore, identifying the model of the target device by the model features and their weights includes:
[0050] The model similarity between the target device and the device in the knowledge set is calculated by weight according to formula (12):
[0051] Msimi(K i ,T)=S(mf(K i ),mf(T))W(mf) (12)
[0052] In the formula, T is the target device, K i is the device in the knowledge set, mf represents the model feature vector, and W(mf) is the regularized model feature weight; the model of the device with the greatest similarity to the target in the knowledge set is taken as the model of the target device, thereby realizing the model recognition of the target device.
[0053] The present invention also provides a staged fine-grained device type identification system, comprising:
[0054] The device grouping and feature extraction module is used to group all devices in the knowledge set according to device brands. Devices of the same brand are grouped together. For each brand group, common device attributes are extracted from the information of the devices in the group as brand attributes. If all brand groups have a certain brand attribute, the attribute is extracted as a feature.
[0055] The feature similarity measurement module is used to divide the extracted features into numerical features and string features according to the feature expression form, and to design feature similarity measurement rules for features of different forms;
[0056] The brand feature and model feature selection module is used to design an algorithm for measuring the importance of extracted features in brand identification and an algorithm for measuring the importance of extracted features in model identification to measure the importance of each extracted feature in brand identification and model identification, thereby selecting brand features and model features and determining weights;
[0057] The type identification module is used to identify the brand of the target device based on the brand characteristics and their weights, and then identify the model of the target device based on the model characteristics and their weights, thereby realizing the identification of the type of the target device.
[0058] Compared with the prior art, the present invention has the following advantages:
[0059] The present invention provides a staged device fine-grained type identification method. The method first extracts features from the common attributes of the device, and formulates feature similarity measurement rules based on the representation of the features. Then, an algorithm for measuring the importance of the extracted features in brand identification and an algorithm for measuring the importance of the extracted features in model identification are designed to measure the importance of each extracted feature in brand identification and model identification. After obtaining the RQB value and RQM value of the extracted features, brand features and model features are selected, and feature weights are determined. Finally, the brand and model of the device are identified based on the brand features, model features and feature weights. The method of the present invention can effectively distinguish devices of different brands and models, and has a high recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 is a flow chart of a method for identifying fine-grained device types in stages according to an embodiment of the present invention;
[0062] Figure 2 is a comparison diagram of the number of devices having the greatest device similarity to the target in the knowledge set of an embodiment of the present invention;
[0063] Figure 3 It is a comparison diagram of average similarity values between each model of equipment and other models of equipment under different strategies of the embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] First, the symbols used in the following examples are explained as follows.
[0066] ef: Extract features, extracted from the common attributes of the devices. i , the i-th extracted feature is recorded as
[0067] ef: Extract feature vector, ef = [ef1, ef2, ef3, ...]. For specific device Di , and its extracted feature vector is recorded as:
[0068]
[0069] bf: Brand feature, obtained by feature selection based on the RQB rule from the extracted features. i , the i-th brand feature is recorded as
[0070] bf: brand feature vector, bf = [bf1, bf2, bf3, …, bf m ]. For specific equipment D i , its brand feature vector is recorded as:
[0071]
[0072] mf: model feature, obtained by feature selection based on RQM rules from the extracted features. i , the i-th model feature is recorded as
[0073] mf: model feature vector, mf = [mf1, mf2, mf3, …, mf n ]. For specific equipment D i , its model feature vector is recorded as:
[0074]
[0075] Equipment D i and device D j The similarity on the kth extracted feature is
[0076]
[0077] S(ef′(Di),ef′(D j )):Device D i and device D j The feature similarity vector of .
[0078]
[0079] ef\ef i : Remove component ef from vector ef i If ef=[ef1,ef2,ef3], then ef\ef2=[ef1,ef3].
[0080] Brand a : The set of all devices with brand type a, Brand a={D1,D2,D3,…}. |Brand a | represents the set Brand a The number of elements in .
[0081] Brand: Brand type set, Brand = {Brand a ,Brand b ,Brand c ,…}, M is the number of brand types, M=|Brand|.
[0082] Brand-{Brand i}: Delete the element Brand from the set Brand i If Brand = {Brand a ,Brand b ,Brand c}, then Brand-{Brand b}={Brand a ,Brand c}.
[0083] [t]: represents a t-dimensional row vector, where each value is 1 / t. For example, [2] = [0.5, 0.5].
[0084] min|(ab),ε|: represents the minimum value among |ab|, |a-b+ε|, and |ab-ε|.
[0085] In order to solve the problem that the existing methods have low accuracy in identifying fine-grained device types in actual environments, this embodiment proposes a phased device fine-grained type identification method, which we call "NameFinder", including the following steps:
[0086] Step S11, group all devices in the knowledge set according to device brands, and divide devices of the same brand into one group. For each brand group, extract common device attributes from the information of the devices in the group as brand attributes. If all brand groups have a certain brand attribute, extract the attribute as a feature (this feature is called "extracted feature").
[0087] Step S12, according to the expression form of the features, the extracted features are divided into numerical features and string features, and for the features in different forms, feature similarity measurement rules are designed respectively, so as to measure the feature similarity between the devices.
[0088] Step S13, design an algorithm for measuring the importance of extracted features in brand identification (RFBR algorithm for short) and an algorithm for measuring the importance of extracted features in model identification (RFMR algorithm for short) to measure the importance of each extracted feature in brand identification and model identification, use the RFBR algorithm to calculate the rqb value of each extracted feature, select the brand feature based on the rqb value, and use the rqb value of the feature as the feature weight, use the RFMR algorithm to calculate the rqm value of each extracted feature, select the model feature based on the rqm value, and use the rqm value of the feature as the feature weight.
[0089] Step S14, extracting features from the attribute information of the target device, identifying the brand of the target device based on the brand features and their weights, and then identifying the model of the target device based on the model features and their weights, thereby realizing the identification of the type of the target device.
[0090] According to the expression forms of brand features and model features, the extracted features are divided into numerical features and string features, and feature similarity measurement rules are designed respectively.
[0091] For numerical features, the design feature similarity measurement rules include:
[0092] For numerical features, the smaller the difference in feature values, the more similar the features are. Due to measurement errors, there is a deviation between the acquired value and the actual value of the feature. Therefore, the error threshold should be considered in the similarity measurement rules of numerical features to reduce the impact of measurement errors on feature similarity.
[0093] If device D i and D j If the kth extracted feature is a numerical feature and has only one value, then the target feature is calculated using formula (1) With datum feature The feature similarity between:
[0094]
[0095] Among them, ε is the error threshold, For device D i The kth extracted feature of For device D j The kth extracted feature of is the absolute value of the eigenvalue.
[0096] like and Contains multiple values, record Then the similarity is calculated for the values on each dimension respectively, and the final feature similarity value is the product of the similarities on each dimension, then and The feature similarity between them is calculated as shown in formula (2):
[0097]
[0098] When calculating feature similarity according to formula (1) and formula (2), if or This indicates that the difference between the feature values or the values on a certain dimension is too large. In this case, the features are judged to be dissimilar and the feature similarity is 0.
[0099] For string features, the design feature similarity measurement rules include:
[0100] For string features, since strings represent specific meanings, each string is considered as a whole to calculate similarity. In NameFinder, string features are divided into single-string features and multi-string features according to the number of strings in the feature.
[0101] If device D i and D j The kth extracted feature is a string feature, and or When it is a single string feature, use formula (3) to calculate and The feature similarity between:
[0102]
[0103] when or , it is considered that the feature acquisition is incomplete, so the feature similarity value is set to 0.8.
[0104] when and When all are multi-string features, Constructing the vector space will and Vectorization, the cosine similarity between vectors is used as the similarity between features. For example, if Then the constructed vector space is {str1,str2,str3}, and the feature The vectorization result is [1,1,0], The vectorization result is [0,1,1]. and The vectorized results are V i,k and V j,k ,but and The feature similarity between them is calculated as shown in formula (4):
[0105]
[0106] In NameFinder, brand feature selection using the RFBR algorithm includes:
[0107] Let ef1, ef2, ef3, …, ef n To extract features, extract the feature vector ef = [ef1, ef2, ef3, ..., ef n ], to extract the feature ef m , 1≤m≤n, let ef′=ef\ef m , remove ef from the vector ef m ; Calculate and delete ef according to formula (5) m The average of the similarity increment within the brand before and after:
[0108]
[0109] Where D i ,D j ∈Brand k ,Brand k ∈Brand,Brand k represents the set of all devices with brand type k, Brand represents the brand type set, and M is the number of brand types; at the same time, according to formula (6), the deletion of ef m The average value of the similarity increment between the previous and next brands:
[0110]
[0111] Where D i ∈Brand k ,Brand k ∈Brand,D l ∈Brand-{Brand k}, Brand-{Brand k} means deleting Brand from the Brand collection k ; Since 0≤S(ef,ef)≤1, according to equations (5) and (6), we can get:
[0112]
[0113] According to the obtained avebins and avebouts, the feature importance rule (Role Quantification in Brand-differentiation Rule, RQB rule) is designed and expressed by formula (8) to evaluate the feature ef m Importance in Brand Identity:
[0114]
[0115] Where α is a factor that measures the influence of avebins and avebouts values on the extracted feature rqb value; if rqb(ef m )>0, then ef m will be selected as the brand feature, the rqb values of all brand features are regularized, the sum of the weights of all brand features is 1, and the result is taken as the feature weight.
[0116] In NameFinder, model feature selection using the RFMR algorithm includes:
[0117] Let ef1, ef2, ef3, …, ef n To extract features, extract the feature vector ef = [ef1, ef2, ef3, ..., ef n ], to extract the feature ef m , 1≤m≤n, let ef′=ef\ef m , remove ef from the vector ef m ; Calculate and delete ef according to formula (5) m The average value of the similarity increment within the brand before and after avebins; at the same time, according to formula (9), the deletion ef m The standard deviation of the similarity increment within the brand before and after aveD:
[0118]
[0119] Where D i ,D j ∈Brand k ,Brand k ∈Brand; According to the obtained avebins and aveD, the feature importance rule (Role Quantification in Model-differentiation Rule, RQM rule) is designed and expressed by formula (10) to evaluate the feature ef m Importance in model identification:
[0120]
[0121] Where β∈[0.5,1], if rqm(ef m )>0,ef m Will be selected as the model feature, the rqm values of all model features are regularized, the sum of the weights of all model features is 1, and the result is used as the feature weight.
[0122] In the device type identification part, it is mainly divided into two parts: brand identification and model identification.
[0123] When performing brand recognition, the brand similarity between the target device and the devices in the knowledge set is weighted and calculated according to formula (11):
[0124] Bsimi(K i ,T)=S(bf(K i ),bf(T))W(bf) (11)
[0125] In the formula, T is the target device, K i is the device in the knowledge set, bf represents the brand feature vector, and W(bf) is the regularized brand feature weight. The brand of the device with the greatest similarity to the target in the knowledge set is taken as the brand of the target device, thereby realizing brand recognition of the target device.
[0126] When performing model identification, the model similarity between the target device and the device in the knowledge set is weighted and calculated according to formula (12):
[0127] Msimi(K i ,T)=S(mf(K i ),mf(T))W(mf) (12)
[0128] In the formula, T is the target device, K i is the device in the knowledge set, mf represents the model feature vector, and W(mf) is the regularized model feature weight; the model of the device with the greatest similarity to the target in the knowledge set is taken as the model of the target device, thereby realizing the model recognition of the target device.
[0129] Corresponding to the above-mentioned staged device fine-grained type identification method, this embodiment also proposes a staged device fine-grained type identification system, including:
[0130] The device grouping and feature extraction module is used to group all devices in the knowledge set according to device brands. Devices of the same brand are grouped together. For each brand group, common device attributes are extracted from the information of the devices in the group as brand attributes. If all brand groups have a certain brand attribute, the attribute is extracted as a feature.
[0131] The feature similarity measurement module is used to divide the extracted features into numerical features and string features according to the feature expression form, and to design feature similarity measurement rules for features of different forms;
[0132] The brand feature and model feature selection module is used to design an algorithm for measuring the importance of extracted features in brand identification and an algorithm for measuring the importance of extracted features in model identification to measure the importance of each extracted feature in brand identification and model identification, thereby selecting brand features and model features and determining weights;
[0133] The type identification module is used to identify the brand of the target device based on the brand characteristics and their weights, and then identify the model of the target device based on the model characteristics and their weights, thereby realizing the identification of the type of the target device.
[0134] The present invention is better explained below through experiments and analysis.
[0135] First, the experimental dataset is introduced. On this dataset, in order to verify the effectiveness of NameFinder for device identification, NameFinder is compared with the NetFeat method that uses network features for device identification in an experimental separability experiment on different models of devices under full feature conditions.
[0136] (1) Knowledge Dataset
[0137] The experiment was conducted using 587 mobile phone models from 18 brands. The device brands and models are shown in Table 1.
[0138] Table 1 Equipment List
[0139]
[0140]
[0141] 21 common attributes are extracted from the above device information as extracted features: device size, weight, screen size, screen-to-body ratio, resolution, screen pixel density, processor, GPU model, RAM+ROM, memory card, operating system, battery capacity, charging method, front camera, rear camera, network type, SIM card, WLAN protocol, NFC, Bluetooth version and positioning system. The features that can be obtained from the application layer data by the method based on measurement results are resolution, GPU model and operating system. The device type identification using the three features of resolution, GPU model and operating system is recorded as NetFeat method.
[0142] According to the expression form of the extracted features, device size, weight, screen size, screen-to-body ratio, resolution, screen pixel density, battery capacity, NFC, and Bluetooth version are numerical features (among which, device size and resolution are multi-numerical features), and processor, GPU model, RAM+ROM, storage card, operating system, charging method, front camera, rear camera, network type, SIM card, WLAN protocol, and positioning system are string features (among which, charging method, front camera, rear camera, WLAN protocol, and positioning system are multi-string features).
[0143] (2) Separability experiment of different models of equipment under full feature conditions
[0144] The NetFeat method uses features extracted from measured application layer data to identify device types. To measure the effectiveness of the NetFeat method and NameFinder in distinguishing different types of devices, a separability experiment between different types of devices was conducted under full feature conditions (full feature conditions: all extracted features are used, and the device's feature values are the same as those in the knowledge set).
[0145] According to the feature similarity measurement rules, when the target device T and the device K in the knowledge set have the same model, the similarity between T and K will reach the maximum value. For the device type identification method, if the similarity between T and K is greater than the similarity between T and any other device in the knowledge set, that is, the maximum similarity between T and K is achieved and the maximum value is unique, it means that the identification method has achieved complete separability between devices of different models. For any model of device in the knowledge set, the NetFeat method and NameFinder are used to calculate the similarity between the model device and each model device in the knowledge set (including the model device), and the number of devices with the maximum similarity to the model device is counted. The results are as follows: Figure 2 shown.
[0146] Figure 2 In , the horizontal axis represents the i-th device in the knowledge set, and the vertical axis represents the number of devices with the maximum similarity value between the i-th device and all devices in the knowledge set. Since the i-th device itself is also in the knowledge set, when the MaxSimnum value of the device is 1, it indicates that the method is completely separable. Figure 2In the figure, the number of devices with MaxSimnum values greater than 1 under the NetFeat method is significantly greater than that of NameFinder. This is because many different models of mobile phone devices in the same series (such as iPhone 12 and iPhone 12Pro) usually have the same resolution, GPU, and operating system, which reduces the NetFeat method's ability to distinguish different models of devices. NetFeat and NameFinder are used to calculate the average similarity between the i-th device and other devices in the knowledge set (excluding the device itself), and the results are as follows: Figure 3 .
[0147] Figure 3 It shows that for each model of device, the mean similarity obtained by NetFeat is greater than the mean calculated by NameFinder. The overall mean similarity of all models of mobile phones obtained by NetFeat is 0.2567, which is much larger than NameFinder's 0.0645, which means that NameFinder can better distinguish different models of mobile devices.
[0148] Experimental results show that NameFinder can effectively distinguish devices of different models.
[0149] It should be noted that, in this article, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus.
[0150] Finally, it should be noted that the above is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, and is not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A staged fine-grained device type identification method, characterized in that: The following steps are involved: Step 1: Group all devices in the knowledge set according to device brands. Devices of the same brand are grouped together. For each brand group, extract common device attributes from the information of the devices in the group as brand attributes. If all brand groups have a certain brand attribute, extract the attribute as a feature. Step 2: According to the form of feature expression, the extracted features are divided into numerical features and string features. For features in different forms, feature similarity measurement rules are designed respectively. The design feature similarity measurement rules include: If device D i and D j If the kth extracted feature is a numerical feature and has only one value, then the target feature is calculated using formula (1) With datum feature The feature similarity between: Among them, ε is the error threshold, For device D i The kth extracted feature of For device D j The kth extracted feature of is the absolute value of the eigenvalue; like and Contains multiple values, record Then the similarity is calculated for the values on each dimension respectively, and the final feature similarity value is the product of the similarities on each dimension, then and The feature similarity between them is calculated as shown in formula (2): When calculating feature similarity according to formula (1) and formula (2), if or This indicates that the difference between the feature values or the values on a certain dimension is too large. In this case, the features are judged to be dissimilar and the feature similarity is 0. For string features, the design feature similarity measurement rules include: If device D i and D j The kth extracted feature is a string feature, and or When it is a single string feature, use formula (3) to calculate and The feature similarity between: when or , it is considered that the feature acquisition is incomplete, so the feature similarity value is set to 0.8; when and When all are multi-string features, Constructing the vector space will and Vectorization, taking the cosine similarity between vectors as the similarity between features, record and The vectorized results are V i,k and V j,k ,but and The feature similarity between them is calculated as shown in formula (4): Step 3: Design an algorithm for measuring the importance of extracted features in brand identification and an algorithm for measuring the importance of extracted features in model identification to measure the importance of each extracted feature in brand identification and model identification, so as to select brand features and model features and determine weights; The brand feature selection using the algorithm for measuring the importance of extracted features in brand recognition includes: Let ef1, ef2, ef3, …, ef n To extract features, extract the feature vector ef = [ef1, ef2, ef3, ..., ef n ], to extract the feature ef m , 1≤m≤n, let ef′=ef\ef m , remove ef from the vector ef m ; Calculate and delete ef according to formula (5) m The average of the similarity increment within the brand before and after: Where D i ,D j ∈Brand k ,Brand k ∈Brand,Brand k represents the set of all devices with brand type k, Brand represents the brand type set, and M is the number of brand types; at the same time, according to formula (6), the deletion of ef m The average value of the similarity increment between the previous and next brands: Where D i ∈Brand k ,Brand k ∈Brand,D l ∈Brand-{Brand k }, Brand-{Brand k } means deleting Brand from the Brand collection k ; Since 0≤S(ef,ef)≤1, according to formulas (5) and (6), we can get: According to the obtained avebins and avebouts, the feature importance rule is designed to be expressed by formula (8) to evaluate the feature ef m Importance in Brand Identity: Where α is a factor that measures the influence of avebins and avebouts values on the extracted feature rqb value; if rqb(ef m )>0, then ef m will be selected as brand features, the rqb values of all brand features are regularized, and the results are used as feature weights; Model feature selection using the importance measurement algorithm of extracted features in model recognition includes: Let ef1, ef2, ef3, …, ef n To extract features, extract the feature vector ef = [ef1, ef2, ef3, ..., ef n ], to extract the feature ef m , 1≤m≤n, let ef′=ef\ef m , remove ef from the vector ef m ; Calculate and delete ef according to formula (5) m The average value of the similarity increment within the brand before and after avebins; at the same time, according to formula (9), the deletion ef m The standard deviation of the similarity increment within the brand before and after aveD: Where D i ,D j ∈Brand k ,Brand k ∈Brand; According to the obtained avebins and aveD, the feature importance rule is designed to be expressed by formula (10) to evaluate the feature ef m Importance in model identification: Where β∈[0.5,1], if rqm(ef m )>0,ef m will be selected as model features, the rqm values of all model features will be regularized, and the results will be used as feature weights; Step 4: After identifying the brand of the target device based on the brand feature and its weight, the model of the target device is identified by the model feature and its weight, thereby realizing the identification of the type of the target device; The brands of target devices identified by brand features and their weights include: The brand similarity between the target device and the devices in the knowledge set is calculated by weight according to formula (11): Bsimi(K i ,T)=S(bf(K i ),bf(T))W(bf) (11) Where T is the target device, K i is the device in the knowledge set, bf represents the brand feature vector, and W(bf) is the regularized brand feature weight. The brand of the device with the greatest similarity to the target in the knowledge set is taken as the brand of the target device, thereby realizing brand recognition of the target device. The target device models identified by model features and their weights include: The model similarity between the target device and the device in the knowledge set is calculated by weight according to formula (12): Msimimi(K) i ,T)=S(mf(K i ),mf(T))W(mf) (12) Where T is the target device, K i is the device in the knowledge set, mf represents the model feature vector, and W(mf) is the regularized model feature weight; the model of the device with the greatest similarity to the target in the knowledge set is taken as the model of the target device, thereby realizing the model recognition of the target device.
2. A staged fine-grained device type identification system, characterized in that: For implementing the staged fine-grained device type identification method as claimed in claim 1, the system comprises: The device grouping and feature extraction module is used to group all devices in the knowledge set according to device brands. Devices of the same brand are grouped together. For each brand group, common device attributes are extracted from the information of the devices in the group as brand attributes. If all brand groups have a certain brand attribute, the attribute is extracted as a feature. The feature similarity measurement module is used to divide the extracted features into numerical features and string features according to the feature expression form, and to design feature similarity measurement rules for features of different forms; The brand feature and model feature selection module is used to design an algorithm for measuring the importance of extracted features in brand identification and an algorithm for measuring the importance of extracted features in model identification to measure the importance of each extracted feature in brand identification and model identification, thereby selecting brand features and model features and determining weights; The type identification module is used to identify the brand of the target device based on the brand characteristics and their weights, and then identify the model of the target device based on the model characteristics and their weights, thereby realizing the identification of the type of the target device.
