System for identifying device fingerprint
Through the device fingerprint recognition system based on the Transformer model, combined with technologies such as self-attention mechanism and knowledge distillation, the difficulty of complex relationship recognition in traditional systems when processing device feature data is solved, and the accuracy and robustness of device fingerprint recognition are improved.
Patent Information
- Application Number
- CN202410807024.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-10
AI Technical Summary
When traditional device fingerprint recognition systems process device feature data, it is difficult to effectively capture the complex relationships between features, especially the problem of long-distance dependencies, resulting in limited recognition accuracy.
A device fingerprint identification system based on the Transformer model is used to construct a device fingerprint model through information acquisition, processing, model construction and identification subsystems, combined with data cleaning, feature screening, encoding, normalization, PCA method and self-attention mechanism, and Model training is performed through knowledge distillation and supervised learning to generate device unique feature vectors.
It improves the accuracy and robustness of device fingerprint recognition, can effectively integrate multiple types of data, identify the most discriminating features and give them higher weight, and improve the recognition effect.
Smart Images

Figure CN118627140A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of device fingerprint recognition, and in particular relates to a system for recognizing device fingerprints. Background Art
[0002] Device fingerprint is a unique identifier used to identify and distinguish devices. It is achieved by collecting various characteristic data of the device and combining them into a unique identifier. These characteristic data can include hardware information, software information, network information, user behavior patterns, etc. In online transactions, identifying device fingerprints can help detect and prevent fraudulent activities. If a device's fingerprint is associated with previous fraudulent behavior, the system can take appropriate measures, such as rejecting the transaction or requiring additional verification.
[0003] Device fingerprint recognition often requires analyzing the complex relationships between multiple features, which may be far apart in the data sequence. Although traditional sequence processing models (such as LSTM) can handle long-term dependency problems, their effectiveness is limited. Therefore, a system for identifying device fingerprints is urgently needed to solve the above problems. Summary of the invention
[0004] In order to solve the above technical problems, the present invention proposes a system for identifying device fingerprints to solve the above problems existing in the prior art.
[0005] To achieve the above object, the present invention provides a system for identifying device fingerprints, comprising:
[0006] Information acquisition subsystem, used to obtain information of access devices;
[0007] An information processing subsystem, connected to the information acquisition subsystem, for encoding the information of the access device to generate a processing data set;
[0008] The model building subsystem, together with the information processing subsystem, is used to build a device fingerprint building model based on the Transformer model;
[0009] The identification subsystem is connected to the model building subsystem and is used to input the processed data set into the device fingerprint building model for calculation, generate a device unique feature vector, and convert the device unique feature vector into a device fingerprint.
[0010] Preferably, the information of the access device includes hardware configuration, operating system and version, browser fingerprint, and network characteristics;
[0011] The browser fingerprint includes but is not limited to user agent, plug-in, font, screen resolution;
[0012] The network characteristics include but are not limited to IP address and ISP provider.
[0013] Preferably, the information processing subsystem includes:
[0014] A data cleaning module, used to remove invalid and incomplete data from the information of the access device and generate cleaned data;
[0015] A data screening module, used for screening the cleaned data based on the PCA method to obtain screened data;
[0016] The feature encoding module is used to convert the non-digital features of the screening data into digital form through a one-hot encoding method to generate encoded data.
[0017] The data normalization module is used to perform normalization processing on the encoded data to generate the processed data set.
[0018] Preferably, the data screening module includes:
[0019] A feature calculation unit, used to calculate the feature value of the cleaned data through PCA to generate a data feature value;
[0020] a characteristic contribution calculation unit, configured to obtain a device identification contribution based on the sum of the data characteristic values and the data characteristic values, and generate a contribution curve based on the device identification contribution;
[0021] A contribution screening unit, used to set a contribution curve threshold, screen the contribution curve based on the contribution curve threshold, and obtain a screening characteristic value;
[0022] A feature screening unit is used to generate the screening data based on the screening feature value.
[0023] Preferably, the model building subsystem includes:
[0024] A model building module, used to build a time processing module and an encoder-decoder architecture, introduce the time processing module into the encoder-decoder architecture, and generate the Transformer model;
[0025] A sample set construction module, used to obtain device sample data and construct user behavior data of the device samples, and obtain a sample set without behavior and a sample set with behavior through the device sample data and the user behavior data of the device samples;
[0026] The training module is used to train the Transformer model through the non-behavior sample set and the behavior sample set to obtain the device fingerprint construction model.
[0027] Preferably, the training module includes:
[0028] An improvement module, used for obtaining forward propagation parameters of a long short-term memory network by a knowledge distillation method, and pre-training the Transformer model by using the forward propagation parameters to obtain a pre-trained model;
[0029] A first training module, used for training the pre-training model using the non-behavior sample set to obtain a first training model;
[0030] A second training module, used for training the first training model using the behavioral data set to obtain a second training model;
[0031] A verification module, used for inputting the non-behavior sample set and the behavior sample set into the second training model for calculation to obtain a non-behavior result and a behavior result;
[0032] A comparison module, used for comparing the non-behavior result with the behavior result to obtain a comparison result;
[0033] A fine-tuning module is used to fine-tune the second training model on the task of data scheduling balance of device vector recognition based on the comparison result to generate the device fingerprint construction model.
[0034] Preferably, the first training module is also used to introduce a temperature parameter as well as a supervised learning loss function and a distillation loss function to train the second training model.
[0035] Preferably, the second training module is also used to freeze the bottom-level parameters of the first training model and optimize the upper-level parameters of the first training model.
[0036] Preferably, the identification subsystem comprises:
[0037] A calculation module, used for inputting the processed data set into the device fingerprint construction model for calculation to generate a multi-device parameter vector;
[0038] A compression module, used for compressing the multiple device parameter vectors to the same dimension, and then minimizing the difference between the input and reconstructed output of the parameter vectors of the same dimension through an autoencoder to generate a unique feature vector for the device;
[0039] The conversion module is used to convert the unique feature vector of the device into a device fingerprint and store it in an XML database.
[0040] Compared with the prior art, the present invention has the following advantages and technical effects:
[0041] Unlike RNN and LSTM that rely on recursive calculations, the Transformer in the present invention can directly compare the relationship between any two points in the sequence through the self-attention mechanism, without being restricted by distance, so as to more effectively capture the relationship between the most discriminative features. This means that the model can identify the most discriminative features (such as device model, operating system version, hardware configuration, etc.) and give these key features higher weights, thereby improving the accuracy of recognition. And when processing device fingerprints containing multiple types of data (such as numerical data, categorical data, etc.), the Transformer model can effectively fuse information from different sources. By designing different heads in multi-head attention to focus on different types of information, the Transformer can integrate multi-source data and improve the accuracy and robustness of recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0043] Figure 1 A schematic diagram of a system for identifying device fingerprints according to an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of a Transformer model according to an embodiment of the present invention;
[0045] Figure 3 This is a dynamic convolution structure diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0046] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0047] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0048] Embodiment 1
[0049] like Figure 1 As shown, this embodiment provides a system for identifying device fingerprints, including:
[0050] Information acquisition subsystem, used to obtain information of access devices;
[0051] An information processing subsystem, connected to the information acquisition subsystem, for encoding the information of the access device to generate a processing data set;
[0052] The model building subsystem, together with the information processing subsystem, is used to build a device fingerprint building model based on the Transformer model;
[0053] The identification subsystem is connected to the model building subsystem and is used to input the processed data set into the device fingerprint building model for calculation, generate a device unique feature vector, and convert the device unique feature vector into a device fingerprint.
[0054] To further optimize the solution, the information of the access device includes hardware configuration, operating system and version, browser fingerprint, and network characteristics;
[0055] The browser fingerprint includes but is not limited to user agent, plug-in, font, screen resolution;
[0056] The network characteristics include but are not limited to IP address and ISP provider.
[0057] Collect various information about the device, including hardware configuration, operating system and version, browser fingerprint (including user agent, plug-ins, fonts, screen resolution, etc.), network characteristics (such as IP address, ISP provider), etc. The focus is to determine which features can most effectively distinguish devices, and the collection of this data complies with privacy protection regulations.
[0058] It may also include hardware information, such as CPU model, hard disk serial number, MAC address, etc.
[0059] Software information, such as operating system version, browser type and version, installed plug-ins, etc.
[0060] Network information, such as IP address, time zone, language settings, etc.
[0061] User behavior data, such as typical login time, operating habits, etc.
[0062] Further optimizing the scheme, the information processing subsystem includes:
[0063] The data cleaning module is used to remove invalid and incomplete data from the information of the access device to generate cleaned data; identify missing values in the data and decide how to deal with them. Common methods include filling missing values (using mean, median, mode, etc.), deleting rows or columns with missing values, or applying a predictive model to estimate missing values. Check for duplicate records in the data set and delete them to ensure that each record is unique.
[0064] A data screening module, used for screening the cleaned data based on the PCA method to obtain screened data;
[0065] The feature encoding module is used to convert the non-numeric features of the screening data into digital form by a one-hot encoding method to generate encoded data. For variables with multiple categories, multiple binary columns are created, one for each category, and the value is 1 when the category exists and 0 when it does not exist. This method avoids the misleading effect of numerical values on the model.
[0066] The data normalization module is used to perform normalization processing on the encoded data to generate the processed data set.
[0067] For mobile devices, since the exact boundaries of the data of mobile devices are known and the data distribution is not highly skewed, maximum and minimum normalization is used, as follows:
[0068] Linear transformation of the original data so that the resulting value is mapped to [0-1]. The conversion function is as follows:
[0069]
[0070] Wherein max is the maximum value of the sample data, and min is the minimum value of the sample data. This normalization method is more suitable for the data set of this embodiment. However, if max and min are unstable, it is easy to make the normalization result unstable, and the subsequent use effect is also unstable. In actual use, max and min can be replaced by empirical constant values. Moreover, when new data is added, max and min may change and need to be redefined.
[0071] For workstations and computer devices, since these devices may have extreme values or data with large differences in the magnitude of different features, standardization is adopted, specifically:
[0072] Normalization is performed based on the mean and standard deviation of the original data, so that the normalized data has the characteristics of a mean of 0 and a standard deviation of 1. The formula is as follows:
[0073] [X'=\frac{X-\mu}{\sigma}];
[0074] For IoT devices, quantile transformation is used because there may be outliers in this type of devices.
[0075] Further optimizing the scheme, the data screening module includes:
[0076] The feature calculation unit is used to calculate the eigenvalues of the cleaned data through PCA to generate data eigenvalues; for a given data set, the variance or eigenvalue of each principal component is first calculated through a dimensionality reduction algorithm such as PCA. These variances or eigenvalues represent the amount of information contained in each principal component. The sum of the variances or eigenvalues of all principal components is calculated, and this sum represents the total variance or total amount of information of the original data set. For each principal component, its variance or eigenvalue is divided by the total variance or total eigenvalue to obtain its contribution to device identification.
[0077] The feature contribution calculation unit is used to obtain the device identification contribution based on the sum of the data feature values and the data feature values, and generate a contribution curve based on the device identification contribution; this step is to measure the proportion of the amount of information contained in each principal component relative to the amount of information in the entire data set. The cumulative device identification contribution can be calculated, that is, the device identification contribution of each principal component is accumulated to obtain a cumulative contribution curve. This curve can help determine how many principal components to retain to retain most of the information in the data set.
[0078] A contribution screening unit, used to set a contribution curve threshold, screen the contribution curve based on the contribution curve threshold, and obtain a screening characteristic value;
[0079] A feature screening unit is used to generate the screening data based on the screening feature value.
[0080] Further optimizing the scheme, the model building subsystem includes:
[0081] A model building module, used to build a time processing module and an encoder-decoder architecture, introduce the time processing module into the encoder-decoder architecture, and generate the Transformer model;
[0082] like Figure 2-3 As shown, in one embodiment, the improved Transformer model includes a dynamic convolution layer, four encoders and a fully connected layer, the convolution kernel size is 3, the number of multi-head attention heads h is 8, the embedding dimension dmodel is 256, the training batch size is 128, the learning rate is 0.001, and the number of cycles is 50.
[0083] A sample set construction module, used to obtain device sample data and construct user behavior data of the device samples, and obtain a sample set without behavior and a sample set with behavior through the device sample data and the user behavior data of the device samples;
[0084] The training module is used to train the Transformer model through the non-behavior sample set and the behavior sample set to obtain the device fingerprint construction model.
[0085] In one embodiment, as in the original Transformer architecture, the relevance of each value to a given query is determined by the dot product between the query and the key corresponding to the value, such as:
[0086]
[0087] Among them, Q i ,K i ,V i Based on different linear changes in the feature map of the device samples, Softmax is a normalized exponential function, T represents the transposition operation, and d k is the smoothing factor;
[0088] The softmax function is used to convert a vector with an arbitrary real number range into a probability distribution, and its expression is as follows:
[0089] Given a vector containing (n) real values (\mathbf{z}=(z_1,z_2,...,z_n)), the softmax function converts it into a probability distribution vector with the same dimension (\mathbf{\sigma}=(\sigma_1,\sigma_2,...,\sigma_n)), where each element (\sigma_i) is defined as:
[0090] [\sigma_i=\frac{e^{z_i}}{\sum_{j=1}^{n}e^{z_j}}];
[0091] Where (e) is the base of natural logarithms and (\sum_{j=1}^{n}e^{z_j}) is the sum of the exponential functions of all elements in the vector (\mathbf{z}).
[0092] In this way, the softmax function ensures that each element in the output vector is in the range of ([0,1]) and the sum of all elements is equal to 1, so it can be interpreted as a probability distribution. The softmax function is often used in multi-class classification problems, where the output of the model needs to be expressed as the probability of each category.
[0093] Encoder loss function L GAN for:
[0094]
[0095] Among them, G(SP,Eg) represents the data synthesized by the feature point matrix SP, and Ig is the real data. D(·) is the output of the encoder, Indicates an operation that seeks expectations on data.
[0096] Perceptual loss L P Used to improve the perceived quality of data, the formula is as follows:
[0097]
[0098] where F i (·) represents the feature representation of the input at the i-th layer in pre-training, and N is the number of extracted feature layers.
[0099] In order to increase the nonlinearity of the model, this embodiment applies a feedforward network to the output of the multi-head attention, that is, two sets of linear transformations and ReLU activation functions, such as:
[0100] H=FNN(M)=ReLU(MW1+b1)W2+b2
[0101] Where M represents the multi-head attention output, W1, W2, b1 and b2 are learnable parameters during training.
[0102] In the self-attention mechanism, the Transformer model can focus on different positions in the input sequence at the same time. Multi-scale self-attention enables the model to obtain information at different scales by using attention weights of different scales in different layers or different heads. This approach helps the model consider both long-distance dependencies and local relationships at the same time.
[0103] Further optimizing the scheme, the training module includes:
[0104] An improvement module, used for obtaining forward propagation parameters of a long short-term memory network by a knowledge distillation method, and pre-training the Transformer model by using the forward propagation parameters to obtain a pre-trained model;
[0105] A first training module, used for training the pre-training model using the non-behavior sample set to obtain a first training model;
[0106] A second training module, used for training the first training model using the behavioral data set to obtain a second training model;
[0107] A verification module, used for inputting the non-behavior sample set and the behavior sample set into the second training model for calculation to obtain a non-behavior result and a behavior result;
[0108] The time processing module is used to segment the data according to the timeline of the device behavior. When the time interval is greater than the time threshold, the time processing module segments the data of the non-behavior sample set and the behavior sample set, and calculates the segmented data as new data. At the attention mechanism level, the weights of the non-behavior sample set and the behavior sample set of the target whose interval time exceeds the threshold are assigned to 0.
[0109] A comparison module, used for comparing the non-behavior result with the behavior result to obtain a comparison result;
[0110] A fine-tuning module is used to fine-tune the second training model on the task of data scheduling balance of device vector recognition based on the comparison result to generate the device fingerprint construction model.
[0111] To further optimize the solution, the first training module is also used to introduce temperature parameters as well as supervised learning loss function and distillation loss function to train the second training model.
[0112] To further optimize the solution, the second training module is also used to freeze the bottom-level parameters of the first training model and optimize the upper-level parameters of the first training model.
[0113] The model of this embodiment uses a masking mechanism in the encoder and decoder, that is, when obtaining the dot product matrix Q i K i T Then replace the upper triangular part with -∞. The attention weights of subsequent positions will all be reset to zero due to the softmax operation. The union of h attention heads is multiplied by W o , to summarize the outputs of different attention heads. This union tensor is the final output of multiple attention heads, as shown below.
[0114]
[0115] MultiHead(Q i ,K i ,V i )=Concat(head1,…,head h )W o ;
[0116] Shallow encoders usually capture more surface features about the input data (such as the basic semantics and grammatical structure of words). If the task requires focusing on the basic features of the input data, such as part-of-speech tagging or grammatical analysis, these layers may be more suitable.
[0117] As the number of layers increases, each layer further abstracts and synthesizes information based on the previous layer, capturing more complex semantics and relationships. For tasks that require advanced semantic understanding, such as sentiment analysis, text summarization, or question-answering systems, deep layers may provide more useful features.
[0118] In some cases, the intermediate layer provides features between surface features and deep abstraction, which may be suitable for tasks that require understanding both the intuitive meaning of the text and the deeper semantics, such as semantic similarity judgment or complex relationship extraction.
[0119] This embodiment analyzes device parameters, so the data is analyzed through the middle layer.
[0120] Further optimizing the scheme, the identification subsystem includes:
[0121] A calculation module, used for inputting the processed data set into the device fingerprint construction model for calculation to generate a multi-device parameter vector;
[0122] A compression module, used for compressing the multiple device parameter vectors to the same dimension, and then minimizing the difference between the input and reconstructed output of the parameter vectors of the same dimension through an autoencoder to generate a unique feature vector for the device;
[0123] Design an autoencoder where the input layer receives the original device parameter vector, compresses it to a smaller representation (encoding layer) through one or more hidden layers, and then reconstructs the input through a symmetrical decoding layer. The autoencoder is trained to minimize the difference between the input and the reconstructed output, and the output of the encoding layer is the desired compressed feature vector.
[0124] The conversion module is used to convert the unique feature vector of the device into a device fingerprint and store it in an XML database.
[0125] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A system for identifying device fingerprints, characterized in that: include: Information acquisition subsystem, used to obtain information of access devices; An information processing subsystem, connected to the information acquisition subsystem, for encoding the information of the access device to generate a processing data set; The model building subsystem, together with the information processing subsystem, is used to build a device fingerprint building model based on the Transformer model; The identification subsystem is connected to the model building subsystem and is used to input the processed data set into the device fingerprint building model for calculation, generate a device unique feature vector, and convert the device unique feature vector into a device fingerprint.
2. The system for identifying device fingerprints according to claim 1, characterized in that: The information of the access device includes hardware configuration, operating system and version, browser fingerprint, and network characteristics; The browser fingerprint includes but is not limited to user agent, plug-in, font, screen resolution; The network characteristics include but are not limited to IP address and ISP provider.
3. The system for identifying device fingerprints according to claim 1, characterized in that: The information processing subsystem includes: A data cleaning module, used to remove invalid and incomplete data from the information of the access device and generate cleaned data; A data screening module, used for screening the cleaned data based on the PCA method to obtain screened data; A feature encoding module, used to convert the non-digital features of the screening data into digital form by a one-hot encoding method to generate encoded data; The data normalization module is used to perform normalization processing on the encoded data to generate the processed data set.
4. The system for identifying device fingerprints according to claim 3, characterized in that: The data screening module comprises: A feature calculation unit, used to calculate the feature value of the cleaned data through PCA to generate a data feature value; a characteristic contribution calculation unit, configured to obtain a device identification contribution based on the sum of the data characteristic values and the data characteristic values, and generate a contribution curve based on the device identification contribution; A contribution screening unit, used to set a contribution curve threshold, screen the contribution curve based on the contribution curve threshold, and obtain a screening characteristic value; A feature screening unit is used to generate the screening data based on the screening feature value.
5. The system for identifying device fingerprints according to claim 1, characterized in that: The model building subsystem includes: A model building module, used to build a time processing module and an encoder-decoder architecture, introduce the time processing module into the encoder-decoder architecture, and generate the Transformer model; A sample set construction module, used to obtain device sample data and construct user behavior data of the device samples, and obtain a sample set without behavior and a sample set with behavior through the device sample data and the user behavior data of the device samples; The training module is used to train the Transformer model through the non-behavior sample set and the behavior sample set to obtain the device fingerprint construction model.
6. The system for identifying device fingerprints according to claim 5, characterized in that: The training module includes: An improvement module, used for obtaining forward propagation parameters of a long short-term memory network by a knowledge distillation method, and pre-training the Transformer model by using the forward propagation parameters to obtain a pre-trained model; A first training module, used for training the pre-training model using the non-behavior sample set to obtain a first training model; A second training module, used for training the first training model using the behavioral data set to obtain a second training model; A verification module, used for inputting the non-behavior sample set and the behavior sample set into the second training model for calculation to obtain a non-behavior result and a behavior result; A comparison module, used for comparing the non-behavior result with the behavior result to obtain a comparison result; A fine-tuning module is used to fine-tune the second training model on the task of data scheduling balance of device vector recognition based on the comparison result to generate the device fingerprint construction model.
7. The system for identifying device fingerprints according to claim 6, characterized in that: The first training module is also used to introduce a temperature parameter as well as a supervised learning loss function and a distillation loss function to train the second training model.
8. The system for identifying device fingerprints according to claim 6, characterized in that: The second training module is also used to freeze the bottom-level parameters of the first training model and optimize the upper-level parameters of the first training model.
9. The system for identifying device fingerprints according to claim 1, characterized in that: The identification subsystem comprises: A calculation module, used for inputting the processed data set into the device fingerprint construction model for calculation to generate a multi-device parameter vector; A compression module, used for compressing the multiple device parameter vectors to the same dimension, and then minimizing the difference between the input and reconstructed output of the parameter vectors of the same dimension through an autoencoder to generate a unique feature vector for the device; The conversion module is used to convert the unique feature vector of the device into a device fingerprint and store it in an XML database.
Citation Information
Cited By
Data security management method and system based on intelligent robot
CN120185943A
