Terminal fingerprint generation method and device, equipment, medium and product
By generating terminal fingerprints, the weighting processing of feature vectors and feature weights, combined with nonlinear activation function and hash function, the problem of access credential tampering in digital twin applications is solved, and security is improved.
Patent Information
- Application Number
- CN202411259277.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-27
AI Technical Summary
The existing access control technology has the risk of access credentials tampering or forging, resulting in information leakage of digital twin applications, making it difficult to ensure the security of digital twin applications.
By obtaining the eigenvectors and feature weight vectors of the terminal device, normalizing and weighting are performed, and the terminal fingerprint is generated by combining the nonlinear activation function and hash function, the unpredictability of the terminal fingerprint is improved, thereby enhancing the security of access control.
The generated terminal fingerprint is unique and highly unpredictable, effectively improving the security of accessing digital twin applications and reducing the risk of information leakage.
Smart Images

Figure CN119203184A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of digital twins, and in particular relates to a method, device, equipment, medium and product for generating terminal fingerprints. Background Art
[0002] With the widespread application of digital twin technology in the fields of industry, medical care, transportation, etc., these applications usually involve a large amount of data interaction and complex operation processes. In order to ensure the security of data and the integrity of the system, access control has become a key link in ensuring system security. At present, commonly used access control technologies include username / password, digital certificates, biometric technology, and multi-factor authentication. These technologies each have different characteristics and application scenarios, but they also have certain limitations in actual use. At present, commonly used access control technologies have the risk of tampering or forgery of access credentials, which may lead to information leakage of digital twin applications, making it difficult to ensure the security of digital twin applications. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, device, medium and product for generating a terminal fingerprint, which effectively improves the security of accessing digital twin applications by increasing the unpredictability of the terminal fingerprint.
[0004] In a first aspect, an embodiment of the present application provides a method for generating a terminal fingerprint, which may include:
[0005] Obtaining a first device feature vector and a feature weight vector, wherein the first device feature vector is used to indicate information of the plurality of terminal devices, the feature weight vector is determined according to a target training model, the target training model is obtained by training the training model through a training data set and a back propagation algorithm until a preset convergence condition is reached, and the training data set includes feature vector samples and corresponding category labels;
[0006] Normalizing each sub-item in the first device feature vector to obtain a second device feature vector;
[0007] Weighting the second device feature vector by the feature weight vector to obtain a fusion vector;
[0008] A terminal fingerprint of the terminal device is generated according to the nonlinear activation function, the hash function and the fusion vector.
[0009] In one embodiment, before the obtaining of the first device feature vector and the feature weight vector mentioned above, the method further includes:
[0010] Obtain device feature data and initial feature weight vectors on multiple terminal devices;
[0011] Preprocessing the device feature data to obtain a training data set, wherein the category label corresponding to the feature vector sample is used to indicate whether the feature vector sample is a legal device or an illegal device;
[0012] Iteratively training the training model according to the feature vector samples in the training data set and the category labels through a back propagation algorithm until the loss function and / or the number of training times of the training model meet a preset stop condition, thereby obtaining a target training model;
[0013] The feature weight vector is determined according to the target training model.
[0014] In one embodiment, before the above-mentioned normalizing each sub-item in the first device feature vector to obtain the second device feature vector, the process further includes:
[0015] Performing data preprocessing on the first device feature vector to obtain a preprocessed first device feature vector;
[0016] The normalizing each sub-item in the first device feature vector to obtain the second device feature vector includes:
[0017] Normalizing each sub-item in the preprocessed first device feature vector to obtain a second device feature vector.
[0018] In one embodiment, the first device feature vector mentioned above includes a first hardware feature vector and a first software feature vector, and the normalization of each sub-item in the first device feature vector to obtain the second device feature vector includes:
[0019] By normalizing each sub-item in the first hardware feature vector and / or the first software feature vector in the first device feature vector through Formula 1 and Formula 2, a second device feature vector is obtained, wherein the second device feature vector includes a second hardware feature vector and a second software feature vector.
[0020]
[0021] Among them, H norm and S norm are the normalized feature vectors of the second hardware feature vector and the second software feature vector, min() and max() are the minimum and maximum values in the first device feature vector, H and S are the first hardware feature vector and the first software feature vector, i and j are the lengths of H and S, respectively.
[0022] In one embodiment, the feature weight vector involved above includes a hardware feature weight vector and a software feature weight vector, and weighting the second device feature vector by the feature weight vector to obtain a fusion vector includes:
[0023] According to Formula 3, Formula 4 and Formula 5, the second hardware feature vector and the second software feature vector are weighted by the hardware feature weight vector and the software feature weight vector respectively to obtain the fusion vector,
[0024]
[0025] Among them, H weighted and S weighted is the weighted feature vector of the second hardware feature vector and the second software feature vector, i and j are the lengths of the second hardware feature vector and the second software feature vector, α and β are the adjustment parameters of the second hardware feature vector and the second software feature vector, W h and W s are the hardware feature weight vector and software feature weight vector respectively,
[0026]
[0027] Among them, the fusion vector F PRE is a vector with (i+j) rows and 1 column, where i and j are H weighted and S weighted Length.
[0028] In one embodiment, the generating of the terminal fingerprint of the terminal device according to the nonlinear activation function, the hash function and the fusion vector includes:
[0029] Applying the nonlinear activation function to activate the fusion vector to obtain an activated feature vector;
[0030] The hash function and the activation feature vector are applied to generate the terminal fingerprint.
[0031] In one of the embodiments, after the above-mentioned generation of the terminal fingerprint of the terminal device according to the nonlinear activation function, the hash function and the fusion vector, the method further includes:
[0032] Performing a collision test on the terminal fingerprint and at least one fingerprint in the fingerprint library to obtain a test result, wherein the test result is used to indicate a collision probability between the terminal fingerprint and at least one fingerprint in the fingerprint library, and the collision probability is used to indicate a degree of similarity between the terminal fingerprint and the at least one fingerprint;
[0033] When the test result is higher than a preset threshold, a prompt message is output, where the prompt message is used to instruct to regenerate the terminal fingerprint of the terminal device.
[0034] In a second aspect, an embodiment of the present application provides a device for generating a terminal fingerprint, which may include:
[0035] an acquisition module, configured to acquire a first device feature vector and a feature weight vector, wherein the first device feature vector is used to indicate information of the plurality of terminal devices, and the feature weight vector is determined according to a target training model, wherein the target training model is obtained by training the training model through a training data set and a back propagation algorithm until a preset convergence condition is reached, and the training data set includes feature vector samples and corresponding category labels;
[0036] A processing module, configured to perform normalization processing on each sub-item in the first device feature vector to obtain a second device feature vector;
[0037] A weighting module, used for weighting the second device feature vector by the feature weight vector to obtain a fusion vector;
[0038] A generation module is used to generate a terminal fingerprint of the terminal device according to a nonlinear activation function, a hash function and the fusion vector.
[0039] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0040] processor;
[0041] a memory for storing processor-executable instructions;
[0042] The processor is configured to execute instructions to implement the method for generating a terminal fingerprint as shown in any one of the embodiments of the first aspect.
[0043] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for generating a terminal fingerprint as shown in any one of the embodiments of the first aspect is implemented.
[0044] In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program stored in a readable storage medium, and at least one processor of the device reads and executes the computer program from the storage medium, so that the device executes the terminal fingerprint generation method shown in any one of the embodiments of the first aspect.
[0045] The embodiments of the present application provide a method, device, equipment, medium and product for generating a terminal fingerprint. Compared with the prior art, the present application has the following beneficial effects:
[0046] The present application is directed to a method, device, equipment, medium and product for generating a terminal fingerprint, wherein a first device feature vector and a feature weight vector are obtained, wherein the first device feature vector is used to indicate information about the terminal device, and the feature weight vector is determined according to a target training model, and the target training model is obtained by training the training model with a training data set and a back-propagation algorithm until a preset convergence condition is reached, and the training data set includes feature vector samples and corresponding category labels. Each sub-item in the first device feature vector is then normalized to obtain a second device feature vector. The second device feature vector is weighted by the feature weight vector to obtain a fusion vector, and then the terminal fingerprint of the terminal device is generated according to a nonlinear activation function, a hash function and a fusion vector.
[0047] Therefore, the device feature vector is weighted by the optimal feature weight vector determined by the target training model to obtain the fusion vector, and then the nonlinear activation function, hash function and the fusion vector are fused to obtain the terminal fingerprint, which can improve the unpredictability of the terminal fingerprint and effectively improve the security of accessing the digital twin application by generating a unique terminal fingerprint. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0049] Figure 1 It is a flow chart of a method for generating a terminal fingerprint provided in an embodiment of the present application;
[0050] Figure 2 It is a structural schematic diagram of a terminal fingerprint generation device provided in an embodiment of the present application;
[0051] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0053] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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 device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0054] Based on the background technology part, it can be known that since commonly used access control technologies have the risk of access credentials tampering or forgery, it may lead to information leakage of digital twin applications, making it difficult to ensure the security of digital twin applications.
[0055] In order to solve the problems existing in the prior art, the embodiments of the present application provide a method, apparatus, device, medium and product for generating a terminal fingerprint, obtaining a first device feature vector and a feature weight vector, wherein the first device feature vector is used to indicate the information of multiple terminal devices, and the feature weight vector is determined according to a target training model, and the target training model is obtained by training the training model with a training data set and a back-propagation algorithm until a preset convergence condition is reached, and the training data set includes feature vector samples and corresponding category labels. Then, each sub-item in the first device feature vector is normalized to obtain a second device feature vector. After weighting the second device feature vector by the feature weight vector and obtaining a fusion vector, the terminal fingerprint of the terminal device is generated according to a nonlinear activation function, a hash function and a fusion vector.
[0056] Therefore, the device feature vector is weighted by the optimal feature weight vector determined by the target training model to obtain the fusion vector, and then the nonlinear activation function, hash function and the fusion vector are fused to obtain the terminal fingerprint, which can improve the unpredictability of the terminal fingerprint and effectively improve the security of accessing the digital twin application by generating a unique terminal fingerprint.
[0057] The present application embodiment provides a method, device, equipment, medium and product for generating a terminal fingerprint. The following first introduces the method for generating a terminal fingerprint provided in the present application embodiment.
[0058] like Figure 1 As shown, the method for generating a terminal fingerprint provided in an embodiment of the present application includes the following steps:
[0059] S101: Acquire a first device feature vector and a feature weight vector, wherein the first device feature vector is used to indicate information of the plurality of terminal devices, and the feature weight vector is determined according to a target training model, wherein the target training model is obtained by training the training model through a training data set and a back propagation algorithm until a preset convergence condition is reached, and the training data set includes feature vector samples and corresponding category labels;
[0060] S102: normalizing each sub-item in the first device feature vector to obtain a second device feature vector;
[0061] S103: weighting the second device feature vector by the feature weight vector to obtain a fusion vector;
[0062] S104: Generate a terminal fingerprint of the terminal device according to the nonlinear activation function, the hash function and the fusion vector.
[0063] The embodiments of the present application provide a method, apparatus, device, medium and product for generating a terminal fingerprint, obtaining a first device feature vector and a feature weight vector, wherein the first device feature vector is used to indicate information of multiple terminal devices, and the feature weight vector is determined according to a target training model, and the target training model is obtained by training the training model with a training data set and a back-propagation algorithm until a preset convergence condition is reached, and the training data set includes feature vector samples and corresponding category labels. Each sub-item in the first device feature vector is then normalized to obtain a second device feature vector. The second device feature vector is weighted by the feature weight vector to obtain a fusion vector, and then the terminal fingerprint of the terminal device is generated according to a nonlinear activation function, a hash function and a fusion vector.
[0064] Therefore, the device feature vector is weighted by the optimal feature weight vector determined by the target training model to obtain the fusion vector, and then the nonlinear activation function, hash function and the fusion vector are fused to obtain the terminal fingerprint, which can improve the unpredictability of the terminal fingerprint and effectively improve the security of accessing the digital twin application by generating a unique terminal fingerprint.
[0065] In S101, information collection software can be installed on the terminal device, and the software can automatically run and collect the hardware information and software information of the terminal device. The hardware information and software information of the terminal device are the basis for generating the terminal fingerprint of the terminal device, ensuring the uniqueness and accuracy of the fingerprint. Among them, the hardware information may include but is not limited to the CPU model, memory size and other hardware information. The software information may include but is not limited to the operating system version, the installed software list and other software information. The first device feature vector may include a first hardware feature vector and a first software feature vector, wherein the first hardware feature vector is generated based on the acquired hardware information of the terminal device, and the first software feature vector is generated based on the acquired software information of the terminal device. The first hardware feature vector may include hardware parameters such as CPU model and memory size. The first software feature vector may include software parameters such as operating system version and installed application list.
[0066] The feature weight vector refers to the coefficients used to weight the hardware feature vector and the software feature vector, and these coefficients reflect the relative importance of each feature in generating the terminal fingerprint of the terminal device. The feature weight vector may include a hardware feature weight vector and a software feature weight vector. For example, the hardware feature weight vector is used to weight each feature in the first hardware feature vector, and the software feature weight vector is the same.
[0067] The feature weight vector is obtained according to the target training model, where the target training model is obtained by training the training model with a training data set and a back-propagation algorithm until the preset convergence condition is reached. The training data set includes positive samples (legal devices) and negative samples (illegal devices), and each sample includes a feature vector sample and a category label (legal or illegal). The input of the training model is a feature vector sample, and the output is a category label. The training model is iteratively trained using a supervised learning algorithm, and the feature weight vector is continuously updated through a back-propagation algorithm to optimize the loss function until the preset convergence condition is reached. At this time, the target training model is obtained. After the training is completed, the optimal feature weight vector is determined based on the target training model.
[0068] In one embodiment, before obtaining the first device feature vector and the feature weight vector, the method further includes:
[0069] Obtain device feature data and initial feature weight vectors on multiple terminal devices;
[0070] Preprocessing the device feature data to obtain a training data set, wherein the category label corresponding to the feature vector sample is used to indicate whether the feature vector sample is a legal device or an illegal device;
[0071] Iteratively training the training model according to the feature vector samples in the training data set and the category labels through a back propagation algorithm until the loss function and / or the number of training times of the training model meet a preset stop condition, thereby obtaining a target training model;
[0072] The feature weight vector is determined according to the target training model.
[0073] In the above embodiment, the hardware feature weight vector and the software feature weight vector are obtained by training the machine learning algorithm to optimize the importance of the features. The specific training process is as follows:
[0074] 1. Collect training data: Collect hardware and software feature data from a large number of terminal devices as training data sets. The data sets include positive samples (legitimate devices) and negative samples (illegitimate devices).
[0075] 2. Preprocessing: Preprocess the original data to obtain the feature vector for training.
[0076] 3. Initialize weights: Randomly initialize the hardware feature weight vector and software feature weight vector.
[0077] 4. Training model: Use supervised learning algorithms (such as SVM, Logistic Regression, Neural Networks, etc.) to train the model. The input is the feature vector and the output is the category label (legal / illegal). During the training process, the weights are continuously updated through the back-propagation algorithm to optimize the loss function.
[0078] 5. Evaluate the model: Use the validation set to evaluate the model performance, such as accuracy, recall, etc. If the performance does not meet the requirements, you can adjust the model structure or training parameters and continue to train the model.
[0079] 6. After the training is completed, the optimized hardware feature weight vector and software feature weight vector are obtained. These weights are used in the terminal fingerprint generation algorithm to weight the feature vectors and generate the terminal fingerprint of the terminal device.
[0080] 7. Regular updates: Over time, new training data can be collected regularly and the weight vectors can be retrained to adapt to environmental changes.
[0081] In S102, normalization processing is performed on each sub-item in the first hardware feature vector and the first software feature vector in the first device feature vector, and each feature is scaled to between 0 and 1 to obtain a second device feature vector.
[0082] In one embodiment, before normalizing each sub-item in the first device feature vector to obtain the second device feature vector, the method further includes:
[0083] Performing data preprocessing on the first device feature vector to obtain a preprocessed first device feature vector;
[0084] The normalizing each sub-item in the first device feature vector to obtain the second device feature vector includes:
[0085] Normalizing each sub-item in the preprocessed first device feature vector to obtain a second device feature vector.
[0086] In the above embodiment, the step of performing data preprocessing on the first device feature vector may specifically include:
[0087] Removing irrelevant data: Delete hardware and software features that are irrelevant to terminal fingerprint generation, such as noise data, temporary files, log files, etc.
[0088] Correcting erroneous data: Identifying and correcting errors in data, such as incorrect spelling, incorrect data format, unreasonable values (such as negative memory size), etc.
[0089] De-duplicate data: Delete duplicate records to ensure that the information of each device is only calculated once;
[0090] Handling missing values: For missing values in the data, you can choose to fill (such as using the mean, median, mode, or interpolation method) or delete records with missing values. Ensure that the length of the hardware and software feature vectors corresponds to the length of the hardware feature weight vector and the software feature weight vector, so that each feature item has a corresponding weight;
[0091] Data type conversion: Convert non-quantitative indicators into numerical data. This can be achieved in the following ways:
[0092] Classification: Categorize CPU models, system versions, etc., and assign a numerical value to each category. For example, CPU models can be divided into "low-end", "mid-end" and "high-end", and each category corresponds to a numerical value.
[0093] String encoding: Convert non-quantitative indicators into strings and use some encoding method to convert them into numerical values. For example, the system version can be converted into a string like "v1.0", "v2.0", and then converted into a numerical value through a hash function.
[0094] In one embodiment, the first device feature vector includes a first hardware feature vector and a first software feature vector, and normalizing each sub-item in the first device feature vector to obtain the second device feature vector includes:
[0095] By normalizing each sub-item in the first hardware feature vector and / or the first software feature vector in the first device feature vector through Formula 1 and Formula 2, a second device feature vector is obtained, wherein the second device feature vector includes a second hardware feature vector and a second software feature vector.
[0096]
[0097] Among them, H norm and S norm are the normalized feature vectors of the second hardware feature vector and the second software feature vector, min() and max() are the minimum and maximum values in the first device feature vector, H and S are the first hardware feature vector and the first software feature vector, i and j are the lengths of H and S, respectively.
[0098] In S103, the second hardware feature vector and the second software feature weight in the second device feature vector are weighted respectively by the hardware feature weight vector and the software feature weight vector in the feature weight vector, and the weighted second hardware feature vector and the second software feature vector are fused to obtain a fused vector.
[0099] In one embodiment, the feature weight vector includes a hardware feature weight vector and a software feature weight vector, and weighting the second device feature vector by the feature weight vector to obtain a fusion vector includes:
[0100] According to Formula 3, Formula 4 and Formula 5, the second hardware feature vector and the second software feature vector are weighted by the hardware feature weight vector and the software feature weight vector respectively to obtain the fusion vector,
[0101]
[0102] Among them, H weighted and S weightedis the weighted feature vector of the second hardware feature vector and the second software feature vector, i and j are the lengths of the second hardware feature vector and the second software feature vector, α and β are the adjustment parameters of the second hardware feature vector and the second software feature vector, W h and W s are the hardware feature weight vector and software feature weight vector respectively,
[0103]
[0104] Among them, the fusion vector F PRE is a vector of (i+j) rows and 1 column, where i and j are the lengths of Hweighted and Sweighted respectively.
[0105] In S104, a nonlinear activation function (such as ReLU, Sigmoid, Tanh, Leaky ReLU, etc.) is applied to activate the fusion vector to obtain an activated feature vector, thereby increasing the complexity of the model and improving the unpredictability of the fingerprint. A hash function (such as SHA-256, SHA-512, Blake2) is then applied to generate the final terminal fingerprint, mapping the feature vector to a fingerprint of a fixed length while ensuring the uniqueness and irreversibility of the fingerprint. Among them, the selection of nonlinear activation function and hash function depends on the required fingerprint characteristics and security requirements, making the algorithm more flexible, which is not limited here.
[0106] In one embodiment, generating a terminal fingerprint of the terminal device according to the nonlinear activation function, the hash function and the fusion vector includes:
[0107] Applying the nonlinear activation function to activate the fusion vector to obtain an activated feature vector;
[0108] The hash function and the activation feature vector are applied to generate the terminal fingerprint.
[0109] In the above embodiment, a nonlinear activation function (such as ReLU, Sigmoid, Tanh, Leaky ReLU, etc.) is applied to activate the fusion vector to obtain the activation feature and vector Factivate d , increasing the complexity of the model and improving the unpredictability of fingerprints:
[0110] Factivtedd=f(Fpre)
[0111] f is a nonlinear activation function. When selecting a nonlinear activation function, you can consider the following aspects according to specific needs:
[0112] Sigmoid function:
[0113] formula:
[0114]
[0115] Applicable conditions: When the output of the model needs to be a probability value, or when a smooth, differentiable, S-shaped curve is required. The output range of the Sigmoid function is (0,1), and it is often used for binary classification problems.
[0116] Tanh function:
[0117] formula:
[0118]
[0119] Applicable conditions: When a faster saturation function is needed (faster than Sigmoid), or when an output range is needed between (-1,1). The output range of the Tanh function is (-1,1), which is more stable than Sigmoid in some cases.
[0120] ReLU function:
[0121] formula:
[0122] f(x)=max(0,x)
[0123] Applicable conditions: When a nonlinear activation function is needed while avoiding the gradient vanishing problem. The ReLU function is very popular when dealing with deep neural networks because it can increase the training speed of the model and reduce overfitting to a certain extent.
[0124] Leaky ReLU function:
[0125] formula:
[0126] f(x)=max(0.01x,x)
[0127] Applicable conditions: When a ReLU function is needed, but its output is not zero in the negative region. Leaky ReLU can provide non-zero gradients even in the negative region, which helps the model learn better during training.
[0128] Apply a hash function (such as SHA-256, SHA-512, Blake2) to generate the final terminal fingerprint, mapping the feature vector to a fixed-length fingerprint while ensuring the uniqueness and irreversibility of the fingerprint:
[0129] Ffinal=g(Factivated)
[0130] g is a hash function. When choosing a hash function, you can consider the following aspects:
[0131] SHA-256 hash function:
[0132] Suitable conditions: SHA-256 provides higher collision resistance and security. It is suitable for generating strong fingerprints, especially when security is the main consideration.
[0133] SHA-512 hash function:
[0134] Suitable conditions: SHA-512 is an upgraded version of SHA-256, providing higher security and collision resistance. It is suitable for generating high-strength fingerprints, especially when security is the main consideration.
[0135] Blake2 hash function:
[0136] Suitable conditions: Blake2 is a more efficient hash function that provides security comparable to SHA-256 and SHA-512. It is suitable for generating strong fingerprints, especially when higher computational efficiency is required.
[0137] It should be noted that the selection of the nonlinear activation function f and the hash function g depends on the required fingerprint characteristics and security requirements, making the algorithm more flexible, and is not limited here.
[0138] In one embodiment, after generating the terminal fingerprint of the terminal device according to the nonlinear activation function, the hash function and the fusion vector, the method further includes:
[0139] Performing a collision test on the terminal fingerprint and at least one fingerprint in the fingerprint library to obtain a test result, wherein the test result is used to indicate a collision probability between the terminal fingerprint and at least one fingerprint in the fingerprint library, and the collision probability is used to indicate a degree of similarity between the terminal fingerprint and the at least one fingerprint;
[0140] When the test result is higher than a preset threshold, a prompt message is output, where the prompt message is used to instruct to regenerate the terminal fingerprint of the terminal device.
[0141] In this embodiment, due to the flexibility of parameters such as weight matrix, hash function, and nonlinear function, it is necessary to perform terminal fingerprint security assessment before use to ensure its security. The assessment steps are as follows:
[0142] Assessment objectives:
[0143] Resist collision attacks: Ensure that the probability of collision in the fingerprints generated by the fingerprint generation algorithm is very low.
[0144] Anti-precomputation attack: Ensure that the fingerprint generation algorithm is resistant to precomputation attacks, that is, attackers cannot guess or reuse fingerprints of legitimate users through pre-computed fingerprint libraries.
[0145] Anti-side channel attack: Ensure that the fingerprint generation algorithm is resistant to side channel attacks, that is, attackers cannot obtain sensitive information by analyzing non-functional properties such as power consumption and electromagnetic leakage during the fingerprint generation process.
[0146] Evaluation Methodology:
[0147] Collision test: Generate a large number of fingerprints, including legal and illegal input data. Then, check whether there are two different input data that produce the same fingerprint. If the collision rate is lower than a certain threshold (for example, 10^-6), the fingerprint generation algorithm is considered to have a high ability to resist collision attacks.
[0148] Pre-computation attack test: Try to predict or reuse previously calculated fingerprints to verify the fingerprint generation algorithm's ability to resist pre-computation attacks. If the attacker cannot successfully predict or reuse the fingerprint of a legitimate user, the fingerprint generation algorithm is considered to have a high ability to resist pre-computation attacks.
[0149] Side channel attack test: By analyzing non-functional properties such as power consumption and electromagnetic leakage during the fingerprint generation process, the algorithm's ability to resist side channel attacks is verified. If the attacker cannot obtain sensitive information through side channel attacks, the fingerprint generation algorithm is considered to have a high ability to resist side channel attacks.
[0150] Evaluation Metrics:
[0151] Collision rate: The proportion of collisions in the fingerprints generated by the fingerprint generation algorithm.
[0152] Resistance to pre-computation attacks: The success rate of the fingerprint generation algorithm in resisting pre-computation attacks.
[0153] Resistance to side channel attacks: The success rate of the fingerprint generation algorithm in resisting side channel attacks.
[0154] Evaluation Process:
[0155] Generate a large amount of fingerprint data, including legal and illegal input data. Perform collision test, pre-calculation attack test and side channel attack test on each fingerprint. Record the test results and calculate the evaluation index. According to the evaluation index and the predetermined security standard, judge whether the security level of the fingerprint meets the requirements.
[0156] Safety standards:
[0157] Set security standards, such as the collision rate must be lower than a preset threshold (such as 10^-6), and the ability to resist pre-calculation attacks must reach a certain level. According to the security standards, determine whether the security level of the fingerprint meets the requirements.
[0158] In order to better illustrate the method provided by the embodiment of the present application, the following is an introduction based on a specific embodiment. The specific technical solution includes:
[0159] 1. Terminal device information collection: Install information collection software on the terminal device, which can automatically run and collect the hardware and software information of the device. The collected information includes but is not limited to CPU model, memory size, operating system version, installed software list, etc. This information will be used to generate the terminal fingerprint of the terminal device.
[0160] 2. Terminal fingerprint generation: Based on the collected device information, the H-SFFFGA algorithm is used to generate the terminal fingerprint of the terminal device. The algorithm may include a hash algorithm, an encryption algorithm, or other suitable algorithms to ensure the uniqueness and non-replicability of the terminal fingerprint. The generated terminal fingerprint can be a string of numbers or a string. The specific algorithm is described as follows:
[0161] definition:
[0162] H: Hardware feature vector, including hardware parameters such as CPU model and memory size.
[0163] S: software feature vector, including software parameters such as operating system version and installed application list.
[0164] Algorithm steps:
[0165] a. The hardware feature weight vector Wh and the software feature weight vector Ws are obtained through machine learning algorithm training to optimize the importance of features. The training process is as follows:
[0166] Collect training data: Collect hardware and software feature data from a large number of terminal devices as training data sets. The data sets include positive samples (legitimate devices) and negative samples (illegitimate devices).
[0167] Preprocessing: Preprocess the raw data to obtain feature vectors for training.
[0168] Initialize weights: Randomly initialize the hardware feature weight vector Wh and the software feature weight vector Ws.
[0169] Training model: Use supervised learning algorithms (such as SVM, Logistic Regression, Neural Networks, etc.) to train the model. The input is the feature vector and the output is the category label (legal / illegal). During the training process, the weights are continuously updated through the back-propagation algorithm to optimize the loss function.
[0170] Evaluate the model: Use the validation set to evaluate the model performance, such as accuracy, recall, etc. If the performance does not meet the requirements, you can adjust the model structure or training parameters and continue to train the model.
[0171] After the training is completed, the optimized weight vectors Wh and Ws are obtained. These weights are used in the terminal fingerprint generation algorithm to weight the feature vectors to generate the terminal fingerprint of the terminal device.
[0172] Regular updates: Over time, new training data can be collected regularly and the weight vectors can be retrained to adapt to changes in the environment.
[0173] b. Preprocess the hardware feature vector H and software feature vector S:
[0174] Removing irrelevant data: Delete hardware and software features that are irrelevant to terminal fingerprint generation, such as noise data, temporary files, log files, etc.
[0175] Correcting erroneous data: Identifying and correcting errors in data, such as incorrect spelling, incorrect data format, unreasonable values (such as negative memory size), etc.
[0176] De-duplicate data: Delete duplicate records to ensure that the information of each device is only calculated once;
[0177] Handling missing values: For missing values in the data, you can choose to fill (such as using the mean, median, mode or interpolation method) or delete records with missing values. Ensure that the length of the hardware and software feature vectors corresponds to the length of the weight vectors Wh and Ws, so that each feature item has a corresponding weight;
[0178] Data type conversion: Convert non-quantitative indicators into numerical data. This can be achieved in the following ways:
[0179] Classification: Categorize CPU models, system versions, etc., and assign a numerical value to each category. For example, CPU models can be divided into "low-end", "mid-end" and "high-end", and each category corresponds to a numerical value.
[0180] String encoding: Convert non-quantitative indicators into strings and use some encoding method to convert them into numerical values. For example, the system version can be converted into a string like "v1.0", "v2.0", and then converted into a numerical value through a hash function.
[0181] c. Normalize each sub-item in the hardware feature vector or software feature vector to reduce each feature
[0182] Put it between 0 and 1:
[0183]
[0184] H norm and S norm are the normalized feature vectors of hardware and software respectively. min() and max() are the minimum and maximum values in the original data respectively. i and j are the lengths of H and S respectively.
[0185] d. Use the weight vector to weight the normalized features:
[0186]
[0187] Among them, H weighted and S weighted H norm and S norm The weighted eigenvectors, i and j are H norm and S norm The length of , α and β are the tuning parameters of the hardware and software feature vectors respectively.
[0188] e. Fusion of weighted hardware and software feature vectors:
[0189]
[0190] Fusion vector F PRE is a vector with (i+j) rows and 1 column, where i and j are H weighted and S weighted Length
[0191] f. Apply nonlinear activation functions (such as ReLU, Sigmoid, Tanh, Leaky ReLU, etc.) to activate the fusion vector to obtain the activation features and vector F activated , increasing the complexity of the model and improving the unpredictability of fingerprints:
[0192] Factivtedd=f(Fpre)
[0193] f is a nonlinear activation function. When selecting a nonlinear activation function, you can consider the following aspects according to specific needs:
[0194] Sigmoid function:
[0195] formula:
[0196]
[0197] Applicable conditions: When the output of the model needs to be a probability value, or when a smooth, differentiable, S-shaped curve is required. The output range of the Sigmoid function is (0,1), and it is often used for binary classification problems.
[0198] Tanh function:
[0199] formula:
[0200]
[0201] Applicable conditions: When a faster saturation function is needed (faster than Sigmoid), or when an output range is needed between (-1,1). The output range of the Tanh function is (-1,1), which is more stable than Sigmoid in some cases.
[0202] ReLU function:
[0203] formula:
[0204] f(x)=max(0,x)
[0205] Applicable conditions: When a nonlinear activation function is needed while avoiding the gradient vanishing problem. The ReLU function is very popular when dealing with deep neural networks because it can increase the training speed of the model and reduce overfitting to a certain extent.
[0206] Leaky ReLU function:
[0207] formula:
[0208] f(x)=max(0.01x,x)
[0209] Applicable conditions: When a ReLU function is needed, but its output is not zero in the negative region. Leaky ReLU can provide non-zero gradients even in the negative region, which helps the model learn better during training.
[0210] g. Apply a hash function (such as SHA-256, SHA-512, Blake2) to generate the final terminal fingerprint, map the feature vector to a fixed-length fingerprint, and ensure the uniqueness and irreversibility of the fingerprint:
[0211] Ffinal=g(Factivated)
[0212] g is a hash function. When choosing a hash function, you can consider the following aspects:
[0213] SHA-256 hash function:
[0214] Suitable conditions: SHA-256 provides higher collision resistance and security. It is suitable for generating strong fingerprints, especially when security is the main consideration.
[0215] SHA-512 hash function:
[0216] Suitable conditions: SHA-512 is an upgraded version of SHA-256, providing higher security and collision resistance. It is suitable for generating high-strength fingerprints, especially when security is the main consideration.
[0217] Blake2 hash function:
[0218] Suitable conditions: Blake2 is a more efficient hash function that provides security comparable to SHA-256 and SHA-512. It is suitable for generating strong fingerprints, especially when higher computational efficiency is required.
[0219] The selection of the nonlinear activation function f and the hash function g depends on the desired fingerprint characteristics and security requirements, making the algorithm more flexible.
[0220] 3. Terminal fingerprint security assessment: The generated terminal fingerprint is collided with the fingerprints in the fingerprint library (including actual generated and simulated fingerprints). If the result is lower than a certain threshold (for example, 10^-6), the fingerprint generation algorithm is considered to have a high ability to resist collision attacks, and the fingerprint is valid for registration. Otherwise, the user is prompted to regenerate the fingerprint.
[0221] 4. Terminal fingerprint registration: Send the generated terminal fingerprint to the authentication server of the digital twin application for registration. The authentication server associates the terminal fingerprint with the user's identity information and stores the associated information in the database. The registration process can use secure transmission protocols such as SSL / TLS to ensure the secure transmission of the terminal fingerprint.
[0222] 5. Access control verification: When a user needs to access the digital twin application, the terminal device will automatically send the terminal fingerprint to the authentication server for verification. The authentication server will compare the received terminal fingerprint with the terminal fingerprint stored in the database. If the match is successful, the authentication server will generate an access token, which will be used for subsequent access control. If the match fails, the authentication server will reject the user's access request.
[0223] 6. Security monitoring and protection: The authentication server can monitor the operating status of the terminal device in real time, including changes and abnormal behaviors of the terminal fingerprint. Once the terminal fingerprint is found to be tampered with or forged, the authentication server will immediately take measures for security protection, such as locking the account, issuing an alarm, etc. In addition, the authentication server can also regularly update and verify the terminal fingerprint to maintain the security of access control.
[0224] When using this technical solution, due to the flexibility of parameters such as weight matrix, hash function, and nonlinear function, it is necessary to perform terminal fingerprint security assessment before use to ensure its security. The assessment steps are as follows:
[0225] Assessment objectives:
[0226] Resist collision attacks: Ensure that the probability of collision in the fingerprints generated by the fingerprint generation algorithm is very low.
[0227] Anti-precomputation attack: Ensure that the fingerprint generation algorithm is resistant to precomputation attacks, that is, attackers cannot guess or reuse fingerprints of legitimate users through pre-computed fingerprint libraries.
[0228] Anti-side channel attack: Ensure that the fingerprint generation algorithm is resistant to side channel attacks, that is, attackers cannot obtain sensitive information by analyzing non-functional properties such as power consumption and electromagnetic leakage during the fingerprint generation process.
[0229] Evaluation Methodology:
[0230] Collision test: Generate a large number of fingerprints, including legal and illegal input data. Then, check whether there are two different input data that produce the same fingerprint. If the collision rate is lower than a certain threshold (for example, 10^-6), the fingerprint generation algorithm is considered to have a high ability to resist collision attacks.
[0231] Pre-computation attack test: Try to predict or reuse previously calculated fingerprints to verify the fingerprint generation algorithm's ability to resist pre-computation attacks. If the attacker cannot successfully predict or reuse the fingerprint of a legitimate user, the fingerprint generation algorithm is considered to have a high ability to resist pre-computation attacks.
[0232] Side channel attack test: By analyzing non-functional properties such as power consumption and electromagnetic leakage during the fingerprint generation process, the algorithm's ability to resist side channel attacks is verified. If the attacker cannot obtain sensitive information through side channel attacks, the fingerprint generation algorithm is considered to have a high ability to resist side channel attacks.
[0233] Evaluation Metrics:
[0234] Collision rate: The proportion of collisions in the fingerprints generated by the fingerprint generation algorithm.
[0235] Resistance to pre-computation attacks: The success rate of the fingerprint generation algorithm in resisting pre-computation attacks.
[0236] Resistance to side channel attacks: The success rate of the fingerprint generation algorithm in resisting side channel attacks.
[0237] Evaluation Process:
[0238] Generate a large amount of fingerprint data, including both legal and illegal input data.
[0239] Each fingerprint is tested for collision, pre-computation attack, and side-channel attacks.
[0240] Record test results and calculate evaluation metrics.
[0241] Based on the evaluation indicators and the predetermined security standards, determine whether the security level of the fingerprint meets the requirements.
[0242] Safety standards:
[0243] Set security standards, such as the collision rate must be lower than a preset threshold (e.g. 10^-6) and the ability to resist pre-computation attacks must reach a certain level.
[0244] According to the security standards, determine whether the security level of the fingerprint meets the requirements.
[0245] Only when the security level of the terminal fingerprint meets the predetermined requirements can the terminal fingerprint setting be judged to be successful. If the security level of the fingerprint does not meet the requirements, it is necessary to redesign the fingerprint generation algorithm or adjust the parameters to improve its security.
[0246] Based on the method for generating a terminal fingerprint provided in the above embodiment, accordingly, Figure 2 As shown, the embodiment of the present application provides a terminal fingerprint generation device 200, which may include:
[0247] An acquisition module 201 is used to acquire a first device feature vector and a feature weight vector, wherein the first device feature vector is used to indicate information of the plurality of terminal devices, and the feature weight vector is determined according to a target training model, wherein the target training model is obtained by training the training model using a training data set and a back propagation algorithm until a preset convergence condition is reached, and the training data set includes feature vector samples and corresponding category labels;
[0248] A processing module 202 is used to normalize each sub-item in the first device feature vector to obtain a second device feature vector;
[0249] A weighting module 203, configured to weight the second device feature vector by the feature weight vector to obtain a fusion vector;
[0250] The generating module 204 is used to generate a terminal fingerprint of the terminal device according to the non-linear activation function, the hash function and the fusion vector.
[0251] In one embodiment, the terminal fingerprint generating device may further include:
[0252] A model acquisition unit, used to acquire device feature data and initial feature weight vectors on multiple terminal devices;
[0253] A model preprocessing unit, used to preprocess the device feature data to obtain a training data set, wherein the category label corresponding to the feature vector sample is used to indicate whether the feature vector sample is a legal device or an illegal device;
[0254] A model training unit, configured to iteratively train the training model according to the feature vector samples in the training data set and the category labels by a back propagation algorithm until the loss function and / or the number of training times of the training model meet a preset stop condition, thereby obtaining a target training model;
[0255] A model determination unit is used to determine the feature weight vector according to the target training model.
[0256] In one embodiment, the terminal fingerprint generating device may further include:
[0257] A preprocessing module, used for performing data preprocessing on the first device feature vector to obtain the preprocessed first device feature vector;
[0258] Accordingly, the processing module may also be specifically used for:
[0259] Normalizing each sub-item in the preprocessed first device feature vector to obtain a second device feature vector.
[0260] In one embodiment, the processing module may also be specifically configured to:
[0261] By normalizing each sub-item in the first hardware feature vector and / or the first software feature vector in the first device feature vector through Formula 1 and Formula 2, a second device feature vector is obtained, wherein the second device feature vector includes a second hardware feature vector and a second software feature vector.
[0262]
[0263] Among them, H norm and S norm are the normalized feature vectors of the second hardware feature vector and the second software feature vector, min() and max() are the minimum and maximum values in the first device feature vector, H and S are the first hardware feature vector and the first software feature vector, i and j are the lengths of H and S, respectively.
[0264] In one embodiment, the weighting module may be specifically used to:
[0265] According to Formula 3, Formula 4 and Formula 5, the second hardware feature vector and the second software feature vector are weighted by the hardware feature weight vector and the software feature weight vector respectively to obtain the fusion vector,
[0266]
[0267] Among them, H weighted and Sweighted is the weighted feature vector of the second hardware feature vector and the second software feature vector, i and j are the lengths of the second hardware feature vector and the second software feature vector, α and β are the adjustment parameters of the second hardware feature vector and the second software feature vector, W h and W s are the hardware feature weight vector and software feature weight vector respectively,
[0268]
[0269] Among them, the fusion vector F PRE is a vector with (i+j) rows and 1 column, where i and j are H weighted and S weighted Length.
[0270] In one embodiment, the generation module may be specifically used to:
[0271] Applying the nonlinear activation function to activate the fusion vector to obtain an activated feature vector;
[0272] The hash function and the activation feature vector are applied to generate the terminal fingerprint.
[0273] In one embodiment, the terminal fingerprint generating device may further include:
[0274] a testing module, configured to perform a collision test on the terminal fingerprint and at least one fingerprint in the fingerprint library to obtain a test result, wherein the test result is used to indicate a collision probability between the terminal fingerprint and at least one fingerprint in the fingerprint library, and the collision probability is used to indicate a degree of similarity between the terminal fingerprint and the at least one fingerprint;
[0275] The output module is used to output a prompt message when the test result is higher than a preset threshold, wherein the prompt message is used to instruct to regenerate the terminal fingerprint of the terminal device.
[0276] Based on the terminal fingerprint generation method and device provided in the above embodiment, the present application embodiment also provides an electronic device 300, such as Figure 3 As shown:
[0277] The invention comprises a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the computer program is executed by the processor 301, each process of the embodiment of the method for generating a terminal fingerprint is implemented, and the same technical effect can be achieved.
[0278] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0279] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.
[0280] In certain embodiments, the memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present application.
[0281] The processor 301 reads and executes the computer program instructions stored in the memory 302 to implement any one of the terminal fingerprint generation methods in the above embodiments.
[0282] In one example, the electronic device may further include a communication interface 303 and a bus 310. As an example, Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0283] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0284] Bus 310 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0285] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements each process of the above-mentioned terminal fingerprint generation method embodiment, and can achieve the same technical effect, and will not be repeated here to avoid repetition. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0286] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0287] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0288] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0289] The above reference is according to the flowchart and / or block diagram of the method, device and computer program product of the embodiment of the present application to describe various aspects of the present application.It should be understood that each square block in the flowchart and / or block diagram and the combination of each square block in the flowchart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square blocks of the flowchart and / or block diagram.Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square block in the block diagram and / or flowchart and the combination of square blocks in the block diagram and / or flowchart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0290] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for generating a terminal fingerprint, characterized in that: include: Obtaining a first device feature vector and a feature weight vector, wherein the first device feature vector is used to indicate information of a plurality of terminal devices, the feature weight vector is determined according to a target training model, the target training model is obtained by training the training model through a training data set and a back propagation algorithm until a preset convergence condition is reached, and the training data set includes feature vector samples and corresponding category labels; Normalizing each sub-item in the first device feature vector to obtain a second device feature vector; Weighting the second device feature vector by the feature weight vector to obtain a fusion vector; A terminal fingerprint of the terminal device is generated according to the nonlinear activation function, the hash function and the fusion vector.
2. The method according to claim 1, characterized in that Before obtaining the first device feature vector and the feature weight vector, the method further includes: Obtain device feature data and initial feature weight vectors on multiple terminal devices; Preprocessing the device feature data to obtain a training data set, wherein the category label corresponding to the feature vector sample is used to indicate whether the feature vector sample is a legal device or an illegal device; Iteratively training the training model according to the feature vector samples in the training data set and the category labels through a back propagation algorithm until the loss function and / or the number of training times of the training model meet a preset stop condition, thereby obtaining a target training model; The feature weight vector is determined according to the target training model.
3. The method according to claim 2, characterized in that Before normalizing each sub-item in the first device feature vector to obtain the second device feature vector, the method further includes: Performing data preprocessing on the first device feature vector to obtain a preprocessed first device feature vector; The normalizing each sub-item in the first device feature vector to obtain the second device feature vector includes: Normalizing each sub-item in the preprocessed first device feature vector to obtain a second device feature vector.
4. The method according to claim 3, characterized in that The first device feature vector includes a first hardware feature vector and a first software feature vector, and normalizing each sub-item in the first device feature vector to obtain a second device feature vector includes: By normalizing each sub-item in the first hardware feature vector and / or the first software feature vector in the first device feature vector through Formula 1 and Formula 2, a second device feature vector is obtained, wherein the second device feature vector includes a second hardware feature vector and a second software feature vector. Among them, H norm and S norm are the normalized feature vectors of the second hardware feature vector and the second software feature vector, min() and max() are the minimum and maximum values in the first device feature vector, H and S are the first hardware feature vector and the first software feature vector, i and j are the lengths of H and S, respectively.
5. The method according to claim 4, characterized in that The feature weight vector includes a hardware feature weight vector and a software feature weight vector, and the second device feature vector is weighted by the feature weight vector to obtain a fusion vector, including: According to Formula 3, Formula 4 and Formula 5, the second hardware feature vector and the second software feature vector are weighted by the hardware feature weight vector and the software feature weight vector respectively to obtain the fusion vector, Among them, H weighted and S weighted is the weighted feature vector of the second hardware feature vector and the second software feature vector, i and j are the lengths of the second hardware feature vector and the second software feature vector, α and β are the adjustment parameters of the second hardware feature vector and the second software feature vector, W h and W s are the hardware feature weight vector and software feature weight vector respectively, Among them, the fusion vector F PRE is a vector with (i+j) rows and 1 column, where i and j are H weighted and S weighted Length.
6. The method according to claim 5, characterized in that The step of generating a terminal fingerprint of the terminal device according to the nonlinear activation function, the hash function and the fusion vector includes: Applying the nonlinear activation function to activate the fusion vector to obtain an activated feature vector; The hash function and the activation feature vector are applied to generate the terminal fingerprint.
7. The method according to any one of claims 1 to 6, characterized in that: After generating the terminal fingerprint of the terminal device according to the nonlinear activation function, the hash function and the fusion vector, the method further includes: Performing a collision test on the terminal fingerprint and at least one fingerprint in the fingerprint library to obtain a test result, wherein the test result is used to indicate a collision probability between the terminal fingerprint and at least one fingerprint in the fingerprint library, and the collision probability is used to indicate a degree of similarity between the terminal fingerprint and the at least one fingerprint; When the test result is higher than a preset threshold, a prompt message is output, where the prompt message is used to instruct to regenerate the terminal fingerprint of the terminal device.
8. A device for generating a terminal fingerprint, characterized in that: The device comprises: an acquisition module, configured to acquire a first device feature vector and a feature weight vector, wherein the first device feature vector is used to indicate information of a plurality of terminal devices, and the feature weight vector is determined according to a target training model, wherein the target training model is obtained by training the training model through a training data set and a back propagation algorithm until a preset convergence condition is reached, and the training data set includes feature vector samples and corresponding category labels; A processing module, configured to perform normalization processing on each sub-item in the first device feature vector to obtain a second device feature vector; A weighting module, used for weighting the second device feature vector by the feature weight vector to obtain a fusion vector; A generation module is used to generate a terminal fingerprint of the terminal device according to a nonlinear activation function, a hash function and the fusion vector.
9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for generating a terminal fingerprint according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the method for generating a terminal fingerprint according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method for generating a terminal fingerprint as described in any one of claims 1 to 7.