Mobile equipment implicit identity verification method based on attention mechanism

By adopting an implicit identity verification method based on attention mechanism on mobile devices, combining multi-source data processing, dynamic differential attention mechanism and model distillation technology, the problems of noise interference and insufficient model performance in the existing technology are solved, and efficient and robust identity verification results are achieved.

CN119862554AActive Publication Date: 2025-04-22ZHEJIANG UNIV OF TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510346011.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-04-22
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

Existing implicit authentication methods for mobile devices have shortcomings in noise interference and model performance control, and it is difficult to effectively reduce noise interference and improve the performance of the authentication model.

Method used

The implicit identity authentication method of mobile devices based on attention mechanism is adopted, and the identification framework data augmentation, sliding window processing and cross-attention mechanism fusion characteristics are improved through multi-source data preprocessing, generation-identification framework data augmentation, sliding window processing and cross-attention mechanism fusion characteristics, combined with dynamic differential attention mechanism and model distillation technology, the recognition accuracy and generalization ability of the model are improved.

Benefits of technology

It significantly reduces noise interference, improves the performance and robustness of the authentication model, enhances the scenario coverage, accuracy and efficiency of the model, and moderately reduces training costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862554A_ABST
    Figure CN119862554A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of network security, and discloses a mobile device implicit identity verification method based on an attention mechanism, which comprises the following steps: collecting multi-source data generated when a mobile device is used by a plurality of motion sensors based on the mobile device, and preprocessing the multi-source data; performing data enhancement on the preprocessed multi-source data by utilizing a generation-identification framework to obtain multi-source enhanced data; processing the multi-source enhanced data by using a sliding window, converting the multi-source enhanced data in one window into fusion features by using a cross attention mechanism, and training a teacher model by using the marked fusion features; obtaining a student model by distilling the trained teacher model; and inputting the fusion feature to be verified into the student model to obtain an identity verification result output by the student model, the identity verification result being an illegal user or a legal user. Noise interference is effectively reduced, and the performance of the model adopted by identity verification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of network security, deep learning and sensor technology, and specifically relates to an implicit identity authentication method for a mobile device based on an attention mechanism, which uses data collected by a sensor to perform implicit identity recognition and verification. Background Art

[0002] In recent years, with the research and progress of hardware, lightweight devices have become more and more popular and have played an irreplaceable role in life. Today, lightweight devices are playing an increasingly important role as a bridge between different users and data. They store a large amount of user privacy information, including mobile banking, communications, and sensitive personal data.

[0003] Authentication plays a vital role in protecting the privacy of users in lightweight devices and is a key link in ensuring the authenticity of user identities. The existing authentication mechanism is an entry method, which requires users to remember and enter specific information (such as passwords, personal identification numbers PINs, and graphic gestures) or physiological biometrics (such as fingerprints, faces, irises, or voiceprints) for initial authentication through a knowledge-based verification strategy when the user uses it for the first time.

[0004] However, studies have shown that entry methods are vulnerable to attacks (for example, brute force attacks, shoulder surfing attacks, touch screen stains, and sensor-based judgments). Therefore, many existing methods use the environmental characteristics of the user's device (such as WIFI and GPS, or use user behavior biometrics based on the phone's own motion sensor). This has led to extensive research on implicit user authentication systems that run continuously in the background, but there are still some shortcomings in data noise processing and control of model performance. Summary of the invention

[0005] The purpose of the present invention is to provide an implicit identity authentication method for mobile devices based on an attention mechanism, which can effectively reduce noise interference and improve the performance of the model used in identity authentication.

[0006] To achieve the above object, the technical solution adopted by the present invention is:

[0007] An implicit authentication method for a mobile device based on an attention mechanism, the implicit authentication method for a mobile device based on an attention mechanism comprising:

[0008] Collect and pre-process multi-source data generated when the mobile device is used based on multiple motion sensors of the mobile device;

[0009] The preprocessed multi-source data is enhanced using the generation-discrimination framework to obtain multi-source enhanced data;

[0010] Use sliding windows to process multi-source enhanced data, and use a cross-attention mechanism to convert the multi-source enhanced data in a window into fused features, and use the labeled fused features to train the teacher model;

[0011] The student model is obtained by distilling the trained teacher model. During distillation, the distillation position of the teacher model is dynamically selected according to the performance score of the mobile device.

[0012] The fusion feature to be verified is input into the student model to obtain the identity authentication result output by the student model, and the identity authentication result is an illegal user or a legal user.

[0013] Several optional methods are also provided below, but they are not intended to be additional limitations on the above-mentioned overall solution, but are merely further supplements or preferences. Under the premise that there are no technical or logical contradictions, each optional method can be combined with the above-mentioned overall solution separately, and multiple optional methods can also be combined.

[0014] Preferably, the generation-discrimination framework comprises a generator, a transformer encoder and a discriminator.

[0015] Preferably, the teacher model is a Transformer model, and the Transformer model adopts a dynamic differential attention mechanism, and the attention calculation formula of the dynamic differential attention mechanism is:

[0016]

[0017] In the formula, is the attention value, is the query vector, is the key vector, is a value vector, is the softmax function, is the key vector The transpose of is the key vector The dimension of is a dynamic differential parameter, the dynamic differential parameter The adjustments are as follows:

[0018] Take the multi-source enhanced data within a window and calculate the variance of the enhanced data corresponding to each motion sensor;

[0019] If the variance of the enhanced data of a motion sensor is larger than the reasonable fluctuation range, increase the dynamic difference parameter ; otherwise reduce the dynamic difference parameter , the dynamic differential parameter .

[0020] Preferably, the method of generating a position embedding vector based on rotational position coding of the Transformer model is replaced by a method of generating a position embedding vector based on learning position coding, and the calculation formula for generating a position embedding vector based on learning position coding is:

[0021]

[0022] In the formula, is the position embedding vector, For the time steps, , is the total time step, It is the Embedding function.

[0023] Preferably, the calculation formula of the RMSNorm normalization mechanism of the Transformer model is as follows:

[0024]

[0025] In the formula, For input features The normalized eigenvalues ​​of the output, For input features The number of elements in , is the input feature The elements, is a constant, is the scaling factor, is the offset.

[0026] Preferably, obtaining the student model by distilling the trained teacher model comprises:

[0027] Calculate the performance score of the mobile device;

[0028] Let the teacher model have a total of If the performance score is less than the score threshold, the teacher model's previous The layer is used as the distillation scope; otherwise, the posterior layer of the teacher model is taken Layers serve as distillation ranges;

[0029] The distillation range is clustered using the KMeans clustering method, and the centroid of each cluster in the clustering result is used as the distillation position;

[0030] Train and output a student model based on the distilled positions in the teacher model.

[0031] Preferably, the number of clusters of the KMeans clustering method is determined as follows:

[0032] Based on the maximum and minimum values ​​of the performance score, three score ranges are obtained: high score range, medium score range, and low score range;

[0033] Determining a score range of the mobile device according to the calculated performance score of the mobile device;

[0034] If the score range of the mobile device is a high score range, determining the number of clusters to be a first number value;

[0035] Alternatively, if the score range of the mobile device is a medium score range, determining the number of clusters to be a second number value;

[0036] Alternatively, if the score range of the mobile device is a low score range, the number of clusters is determined to be a third number value; and the first number value is greater than the second number value, and the second number value is greater than the third number value.

[0037] Preferably, the distillation range is clustered using a KMeans clustering method, comprising:

[0038] randomly sampling layers within the distillation range;

[0039] Based on the random sampling results, KMeans clustering method is used for clustering.

[0040] The present invention provides an implicit authentication method for mobile devices based on an attention mechanism, which improves the recognition accuracy of the model through data enhancement, significantly reduces the training cost and moderately enhances the generalization ability. The dynamic differential attention mechanism is used to reduce the noise interference in the model, and the scene coverage, accuracy and efficiency of the model are improved by learning the identity-related information in the data. The model distillation is combined with the device performance, and by extracting features from the teacher model and applying KMeans for clustering, the performance requirements for the device are greatly reduced, and the performance of the model used for identity authentication is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A flowchart of an implicit identity authentication method for a mobile device based on an attention mechanism of the present invention;

[0042] Figure 2 This is a graph showing changes in the TPR indicator in Experiment 1 of the present invention;

[0043] Figure 3 This is a graph showing changes in the TNR index in Experiment 1 of the present invention;

[0044] Figure 4 This is a graph showing changes in the ACC index in Experiment 1 of the present invention;

[0045] Figure 5This is a graph of the accuracy test results in Experiment 2 of the present invention where the training set consists of walking data and the test set consists of sitting data;

[0046] Figure 6 This is a graph of the accuracy test results in Experiment 2 of the present invention where the training set consists of sitting data and the test set consists of walking data;

[0047] Figure 7 This is a graph of the accuracy test results in Experiment 2 of the present invention, where the training set consists of walking data and the test set also consists of walking data;

[0048] Figure 8 This is a graph of the accuracy test results in Experiment 2 of the present invention, in which the training set consists of sitting posture data and the test set also consists of sitting posture data;

[0049] Fig. 9 This is a graph showing the changing trend of the indicator TPR in Experiment 3 of the present invention;

[0050] Fig.10 This is a trend chart of the performance change of the indicator TNR in Experiment 3 of the present invention;

[0051] Fig.11 This is a graph showing the changing trend of the indicator ACC in Experiment 3 of the present invention;

[0052] Fig.12 This is a graph showing the memory usage changes of the student model and the teacher model in Experiment 3 of the present invention during the entire 5-second running time. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0055] In view of the problems in the prior art, the present invention proposes an implicit authentication method for mobile devices based on an attention mechanism. After enhancing the data, a dynamic differential attention mechanism is used to improve the accuracy and coverage of the model, and at the same time, model distillation is performed so that the model can be deployed on more devices.

[0056] like Figure 1As shown, the implicit identity authentication method for a mobile device based on the attention mechanism of this embodiment includes the following steps:

[0057] Step 1: Collect multi-source data generated when the mobile device is used based on multiple motion sensors of the mobile device and perform pre-processing.

[0058] Mobile devices are usually equipped with multiple motion sensors. Choosing the right sensor data is crucial to designing a system that can ensure a good user experience and perform identity authentication. Taking into account the three aspects of device compatibility, user privacy and security, and environmental robustness, this embodiment chooses to use acceleration sensors, gravity sensors, and gyroscopes to collect data. Considering the significant impact of power consumption on user experience, two data collection modes are adopted: idle mode and active mode. In order to minimize power consumption, no sampling is performed in idle mode. In active mode, the sampling frequency is set to 50Hz, and a single data collection lasts for 3 seconds.

[0059] When sensors collect data, various factors may introduce different types of noise. Differences in equipment use and complex environments may cause irregular noise, which can significantly affect the accuracy of model training. In order to ensure the quality of the data, the data is preprocessed. The preprocessing operation of this embodiment first standardizes the data and then removes machine noise, human noise, etc. contained in the data.

[0060] Step 2: Use the generation-discrimination framework to perform data enhancement on the preprocessed multi-source data to obtain multi-source enhanced data.

[0061] In order to effectively utilize the limited sensor data in mobile devices and improve the performance and robustness of the model, data enhancement is used in this embodiment. Mobile user identity authentication relies on the collection of sensor data, which may face the problem of insufficient data in specific scenarios, resulting in insufficient model training. For example, some behavior patterns are more common, while rare patterns (such as abnormal operations or uncommon behaviors) have fewer data samples. The data enhancement method of this embodiment uses a conditional sampling strategy to generate synthetic samples for rare patterns, thereby supplementing the unbalanced data set. This helps the teacher model better handle diverse users and behaviors and improves its ability to identify minority groups or abnormal operations. The data enhancement method of this embodiment is implemented based on a generation-identification framework, and the generation-identification framework (abbreviated as AUTHGANS) includes a generator, a transformer encoder, and a discriminator.

[0062] To cope with the complexity of mobile device identity authentication, this embodiment collects sensor data based on a 3-second time window and a 50Hz sampling frequency. Each time window contains 150 samples, and the data shape is (150,3). In data enhancement and teacher model training, the generator uses 100-dimensional Gaussian noise and 70 single-hot labels to generate realistic sensor data through a multi-layer perceptron (MLP). The data generated by the generator is processed by a transformer encoder, specifically, it is first upsampled and pixel flipped, and then adjusted to a shape that conforms to the sensor format (150×3) as the input data of the discriminator. The discriminator maps the input data to a higher-dimensional space, and after processing through convolution and transformer encoders, it is finally judged in combination with the label to determine the authenticity of the data. This generation-discrimination framework effectively compensates for the diversity of device conditions and user behaviors, and improves the robustness and accuracy of the identity authentication method in different devices, scenarios, and user environments. Finally, the multi-source enhanced data of this embodiment is uniformly represented as a two-dimensional vector [R, C], R=9 (the number of sensor axes), C=75 (the number of data segment samples), providing a convenient data format for subsequent model training.

[0063] Step 3: Use a sliding window to process multi-source enhanced data, and use a cross-attention mechanism to convert the multi-source enhanced data within a window into fused features, and use the labeled fused features to train the teacher model.

[0064] In order to obtain better model performance, the teacher model in this embodiment adopts the Transformer model. In order to meet the needs of mobile device identity authentication scenarios, the structure of the traditional Transformer model is improved, its fixed structure is abandoned, and a more flexible, efficient and adaptable mechanism is introduced.

[0065] The global attention calculation complexity of the traditional Transformer model is high. This embodiment introduces a sparse attention mechanism, which only focuses on the historical data most relevant to the current time step to reduce the amount of calculation. The specific implementation uses sliding window attention, and each time step only focuses on the previous The data of time steps is used to form a local attention window.

[0066] Mobile devices are usually equipped with multiple sensors (such as accelerometers, gyroscopes, and GPS). To make full use of these multi-source data, this embodiment designs a multi-channel embedding module to embed data from different sensors into a unified feature space and fuse them through a cross-attention mechanism. The specific process is as follows:

[0067] The augmented data of each sensor channel is converted into a feature vector through an independent embedding layer.

[0068] The cross-attention mechanism is used to fuse feature vectors from multiple sources into one feature vector. The cross-attention mechanism can exchange information between different modalities. For example, acceleration data can focus on the rotation information in gyroscope data, thereby enhancing the perception of complex behaviors (such as turning and jumping). This multimodal fusion mechanism enables the model to fully understand user behavior from multiple dimensions and improve the accuracy and robustness of authentication.

[0069] The softmax attention mechanism of the traditional Transformer model is not sufficiently adaptable to the dynamic noise in the sensor data of the mobile device. To this end, this embodiment designs a dynamic differential attention mechanism to adaptively adjust the differential parameters in the attention calculation according to the noise level of the input data. The specific implementation is as follows:

[0070] Introducing a dynamic difference parameter in the attention calculation , whose value is calculated in real time by a lightweight noise estimation module. The noise estimation module analyzes the short-term variance or frequency domain characteristics of sensor data. Sensor data (such as accelerometer or gyroscope data) is calculated within a fixed time window (such as the most recent The larger the variance, the higher the noise level, so we need to increase , otherwise it will decrease , dynamically adjust , to optimize the noise reduction effect. For example, this embodiment takes multi-source enhanced data within a window and calculates the variance of the enhanced data corresponding to each motion sensor; if the variance of the enhanced data of a motion sensor is larger than the reasonable fluctuation range, the dynamic difference parameter is increased. ; otherwise reduce the dynamic difference parameter , the dynamic differential parameter . The reasonable fluctuation range can be a pre-set fixed range or a dynamic range extracted from historical sensor enhancement data. And when increasing or decreasing the dynamic difference parameter, it can be increased or decreased according to a fixed gradient value. Therefore, the attention calculation formula of this embodiment is:

[0071]

[0072] In the formula, is the attention value, is the query vector, is the key vector, is a value vector, is the softmax function, is the key vector The transpose of is the key vector This adaptive mechanism enables the model to maintain high accuracy in different noise environments (such as user motion or noisy environments), significantly improving the robustness of authentication.

[0073] In addition, the rotational position encoding of the traditional Transformer model has a large computational overhead and is not suitable for mobile devices. To this end, this embodiment abandons this mechanism and replaces the Transformer model's method of generating position embedding vectors based on rotational position encoding with a method of generating position embedding vectors based on learning position encoding, capturing the position information in the time series through a small number of trainable parameters. The calculation formula for generating position embedding vectors based on learning position encoding proposed in this embodiment is:

[0074]

[0075] In the formula, is the position embedding vector, For the time steps, , is the total time step, It is the Embedding function.

[0076] Furthermore, the RMSNorm (Root Mean Square Normalization) mechanism in the traditional Transformer model uses fixed normalization parameters, which is difficult to adapt to the variable input data distribution on mobile devices. To this end, this embodiment designs an adaptive normalization mechanism, which enables the model to dynamically adjust the feature distribution according to the characteristics of the input data by introducing trainable scaling and offset parameters. The specific formula is:

[0077]

[0078] In the formula, For input features The normalized eigenvalues ​​of the output, For input features The number of elements in , is the input feature The elements, is a constant, is the scaling factor, is the offset. and It can adaptively scale and offset feature values ​​to improve the generalization ability of the model under different users and environments, and can be pre-assigned based on empirical values ​​or experiments.

[0079] The improved Transformer model in this embodiment shows significant advantages in the mobile device identity authentication scenario: Improved authentication accuracy: Compared with the traditional Transformer model, the new model has a 20% improvement in authentication accuracy in noisy environments, especially when user behavior is complex or the environment is changeable, and the performance is more stable. Computational efficiency optimization: Through sparse attention and learned position encoding, the computational complexity of the model is reduced by 30%, and the inference time is shortened by 25%, ensuring fast response on mobile devices. Multimodal perception enhancement: Multi-channel embedding and cross-attention mechanisms enable the model to fuse multiple sensor data, have a more comprehensive understanding of user behavior, and reduce the false authentication rate by 15%.

[0080] Step 4: Obtain the student model by distilling the trained teacher model. During distillation, the distillation position of the teacher model is dynamically selected according to the performance score of the mobile device.

[0081] In lightweight mobile devices, computing resources such as processors, memory, and batteries are usually limited, while teacher models usually need to process complex multimodal sensor data and involve large-scale feature processing. In such a resource-constrained environment, larger deep learning models may not run efficiently, especially considering that the processing power and hardware capabilities of most lightweight devices on the market today are relatively low. There are also differences in processing power between devices, which means that deploying the same model on different hardware may face performance bottlenecks. In addition, the authentication process needs to respond quickly to ensure a smooth user experience, which is especially important for applications with high real-time requirements. In this system, this embodiment proposes a model distillation strategy AuthFusion, and the specific steps are as follows:

[0082] Step 4.1. Calculate the performance score of the mobile device.

[0083] Traditional model distillation methods usually transfer knowledge at fixed layer positions, which ignores the differences in model layer requirements of different devices. Especially in mobile device identity authentication scenarios, the diversity of device performance requires the model to flexibly adjust the location of knowledge transfer. To this end, this embodiment introduces a dynamic layer selection mechanism to optimize the performance of the model on different devices by adaptively selecting the distillation position in the teacher model according to the device capabilities.

[0084] Before model deployment, the system will conduct a comprehensive assessment of the device's hardware capabilities to determine the strength of its computing resources and calculate a device capability score based on this, which will serve as the basis for subsequent dynamic adjustments. The specific implementation is as follows:

[0085] High-performance devices (such as flagship smartphones): They are rated higher due to their fast processors and sufficient memory. Low-performance devices (such as entry-level devices): They are rated lower due to limited hardware resources. The following hardware parameters are mainly considered when scoring: Processor speed: measures the computing power of the mobile device; Memory size: determines the amount of data that the mobile device can process; Battery capacity: affects the battery life and performance stability of the mobile device.

[0086] For example, the processor speed, memory battery size and other information are obtained according to the official Android API, and then the performance score of the mobile device is calculated according to the formula = 0.5 × normalized processor speed value + 0.3 × normalized memory size value + 0.2 × normalized battery capacity value.

[0087] Step 4.2: Let the teacher model have a total of If the performance score is less than the score threshold, the teacher model's previous The layer is used as the distillation scope; otherwise, the posterior layer of the teacher model is taken The layer serves as the distillation range.

[0088] Based on the performance score of the mobile device, dynamically decide which layer or layers of the teacher model to obtain knowledge hints from, in order to find the best balance between performance and efficiency. Among them, high-performance devices select hint positions in the deeper layers of the teacher model. Deep hints can provide richer and more complex feature information, which helps to improve the accuracy of the model in identity authentication tasks. The powerful computing power of high-performance devices can be fully utilized to ensure maximum authentication accuracy; while low-performance devices select hint positions in the shallower layers of the teacher model. The features extracted by shallow hints are less complex, the computational burden is smaller, and resource consumption can be reduced. Suitable for resource-constrained devices to ensure smooth and efficient model operation.

[0089] Taking a 12-layer neural network as an example, if the performance score is less than the score threshold, the mobile device is a low-performance device, and the first 7 layers (1st to 7th layers) of the teacher model are taken as the distillation range; otherwise, the mobile device is a high-performance device, and the last 5 layers (8th to 12th layers) of the teacher model are taken as the distillation range.

[0090] Step 4.3: For the distillation range, the KMeans clustering method is used for clustering, and the centroid of each cluster in the clustering result is used as the distillation position.

[0091] The traditional KMeans clustering method relies on a fixed number of clusters when selecting distillation positions, and lacks direct optimization of the knowledge transfer effect. To this end, this embodiment designs an adaptive prompt distillation, which dynamically adjusts the number of clusters by introducing a feedback mechanism to maximize the performance of the student model. The specific implementation is as follows:

[0092] Based on the maximum and minimum values ​​of the performance score, three score ranges are obtained: high score range, medium score range and low score range.

[0093] A score range of the mobile device is determined based on the calculated performance score of the mobile device.

[0094] If the score range of the mobile device is a high score range, the number of clusters is determined to be a first number value.

[0095] Alternatively, if the score range of the mobile device is a medium score range, the number of clusters is determined to be a second number value.

[0096] Alternatively, if the score range of the mobile device is a low score range, the number of clusters is determined to be a third number value; and the first number value is greater than the second number value, and the second number value is greater than the third number value.

[0097] For example, the maximum value of the performance score is set to 1.0 and the minimum value is set to 0.0, and 0.8~1.0 (including 1.0) is divided into a high score range, 0.5~0.8 (including 0.8) is a medium score range, and 0.0~0.5 (including 0.0 and 0.5) is a low score range. If the calculated performance score of the mobile device is in the high score range, the number of clusters is 10, and more clusters have higher accuracy; if the calculated performance score of the mobile device is in the medium score range, the number of clusters is 5, a medium number of clusters, balancing accuracy and speed; if the calculated performance score of the mobile device is in the low score range, the number of clusters is 3, with fewer clusters and speed priority.

[0098] During the student model training process, its performance on the validation set (such as certification accuracy and inference time) is regularly evaluated to determine whether the student model has been trained to convergence.

[0099] In addition, in order to further reduce the computational complexity, in the layer representation of the teacher model, a part of the data points are randomly sampled for clustering instead of using all the data, that is, the layers within the distillation range are randomly sampled, and based on the random sampling results, the KMeans clustering method is used for clustering.

[0100] At the same time, the clustering results are cached on mobile devices to avoid repeated calculations and improve the response speed of the model.

[0101] Step 4.4: Train and output the student model based on the distilled positions in the teacher model.

[0102] In this embodiment, AuthFusion successfully optimized the model distillation process by introducing dynamic layer selection, adaptive prompt distillation and other mechanisms, making it more suitable for the needs of mobile device identity authentication scenarios. This method not only improves the efficiency and accuracy of knowledge transfer, but also enhances the deployment adaptability of the model on resource-constrained devices, providing a more efficient, flexible and robust solution for real-time identity authentication on mobile devices.

[0103] Step 5: Input the fusion feature to be verified into the student model to obtain the identity authentication result output by the student model, and the identity authentication result is an illegal user or a legal user.

[0104] The generation method of the fusion feature to be verified is referred to the generation process of the fusion feature in step 1 to step 3, which will not be described in detail in this embodiment. In addition, although this embodiment introduces steps 1 to 5 in sequence, steps 1 to 4 can be performed independently during the training process of the student model, and step 5 can be performed independently during the application process of the student model.

[0105] This embodiment further demonstrates the advantages of the solution of this embodiment through experiments.

[0106] Experiment 1: Energy efficiency of AUTHGANS.

[0107] In order to evaluate the impact of AUTHGANS of this embodiment on the accuracy of model training, the experiment was trained and tested on the data set, and the model was trained on denoising data using training sets with different numbers of users (the number of users is 100, 200, 300, 400 and 500 respectively), where the number of users refers to the number of users whose sensor data is collected in the data set, for example, 100 means that the sensor data of 100 users is collected. Figure 2-Figure 4 As shown in the figure, the two models are tested using the evaluation indicators of the test set with the same number of users (the number of users is 100). As the size of the training set increases, the TPR (True Positive Rate), TNR (True Negative Rate), and ACC (Accuracy) of the model trained with AUTHGANS generally show an upward trend, while the TNR of the model without AUTHGANS decreases. This shows that as the amount of data increases, the data enhancement effect of AUTHGANS becomes more significant and can further improve the accuracy of the model. However, when the evaluation indicator approaches the limit value of 100%, the marginal effect begins to appear.

[0108] Through this experiment, we can conclude that when the test set is smaller than the training set, the performance improvement brought by AUTHGANS will increase as the training set expands. It is particularly noteworthy that AUTHGANS has a particularly prominent improvement on the TNR indicator. This is because the model has been retrained after data enhancement, and its ability to identify unauthorized users has been enhanced. Based on this, it can be judged that AUTHGANS data enhancement can effectively use limited data to improve model performance.

[0109] Experiment 2: Energy efficiency of dynamic differential attention mechanism.

[0110] In order to evaluate the improvement of model coverage after adding the dynamic differential attention mechanism in different scenarios, the experiment selected a variety of data sets, and compared the dynamic differential attention mechanism with the traditional attention mechanism to analyze the model coverage. In these data sets, the experiment used "walk" data and "sit" data to train the model, and used data in another state for testing. The data was distinguished based on its source to evaluate the coverage ability of the model in different states. The experimental objects are the dynamic differential attention mechanism (Diff Attention), traditional attention mechanism (Attention) and LSTM neural network (LSTM) proposed in this invention. The experiment selected four different brands of mobile phones A, B, C and D for sensor data collection.

[0111] like Figure 5-Figure 8 As shown in the figure, although the accuracy of the model decreases when testing with data in different states, the model using the dynamic differential attention mechanism can still achieve an accuracy of more than 90%, which is sufficient to meet user needs.

[0112] This experiment shows that by introducing the dynamic differential attention mechanism, the model can maintain a high accuracy even if only a single user behavior data is used for training. This significantly improves the model's coverage in different scenarios, thereby ensuring a better user experience.

[0113] Experiment 3: Energy efficiency of the model distillation strategy AuthFusion.

[0114] In this experiment, the model trained based on the generation-discrimination framework in Experiment 1 is used as the teacher model, and the AuthFusion distillation method is applied to obtain the student model. First, the size of the student model is compared with the teacher model. Table 1 shows the size of the teacher model trained with different numbers of users (the number of users is 100, 200, 300, 400 and 500) and the size of the student model after distillation. The results show that AuthFusion significantly reduces the size of the model.

[0115] Table 1. The size of the teacher model trained with different numbers of users and the size of the student model after distillation.

[0116]

[0117] Next, the performance of the models before and after distillation was evaluated. The teacher model and the student model were trained using the training set with the same number of users (the number of users was 100), and the two models were tested using the evaluation metrics of the test set with different numbers of users (the number of users was 100, 200, 300, 400, and 500). Figure 9-11 As shown in the figure, although the accuracy of the model decreases slightly after distillation, it still remains within an acceptable range, ensuring high accuracy while protecting user privacy.

[0118] In addition, the experiment selected the student model and teacher model trained on 100 users for deployment testing, and recorded the memory usage during the authentication process. Fig.12 As shown in Figure 2, the distilled student model has obvious advantages over the teacher model in terms of memory usage and recognition time.

[0119] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. An implicit authentication method for mobile devices based on attention mechanism, characterized in that: The attention mechanism-based implicit authentication method for mobile devices includes: Collect and pre-process multi-source data generated when the mobile device is used based on multiple motion sensors of the mobile device; The preprocessed multi-source data is enhanced using the generation-discrimination framework to obtain multi-source enhanced data; Use sliding windows to process multi-source enhanced data, and use a cross-attention mechanism to convert the multi-source enhanced data in a window into fused features, and use the labeled fused features to train the teacher model; The student model is obtained by distilling the trained teacher model. During distillation, the distillation position of the teacher model is dynamically selected according to the performance score of the mobile device. The fusion feature to be verified is input into the student model to obtain the identity authentication result output by the student model, and the identity authentication result is an illegal user or a legal user.

2. The method for implicit identity authentication of mobile devices based on the attention mechanism according to claim 1, characterized in that: The proposed generation-discrimination framework includes a generator, a transformer encoder, and a discriminator.

3. The method for implicit identity authentication of mobile devices based on attention mechanism according to claim 1, characterized in that: The teacher model is a Transformer model, which adopts a dynamic differential attention mechanism. The attention calculation formula of the dynamic differential attention mechanism is: ; In the formula, is the attention value, is the query vector, is the key vector, is a value vector, is the softmax function, is the key vector The transpose of is the key vector The dimension of is a dynamic differential parameter, the dynamic differential parameter The adjustments are as follows: Take the multi-source enhanced data within a window and calculate the variance of the enhanced data corresponding to each motion sensor; If the variance of the enhanced data of a motion sensor is larger than the reasonable fluctuation range, increase the dynamic difference parameter ; Otherwise reduce the dynamic difference parameter , the dynamic differential parameter .

4. The method for implicit identity authentication of mobile devices based on the attention mechanism according to claim 3 is characterized in that: The Transformer model's method of generating a position embedding vector based on rotational position coding is replaced by a method of generating a position embedding vector based on learning position coding. The calculation formula for generating a position embedding vector based on learning position coding is: ; In the formula, is the position embedding vector, For the time steps, , is the total time step, It is the Embedding function.

5. The method for implicit identity authentication of mobile devices based on attention mechanism according to claim 3, characterized in that: The calculation formula of the RMSNorm normalization mechanism of the Transformer model is as follows: ; In the formula, For input features The normalized eigenvalues ​​of the output, For input features The number of elements in , is the input feature The elements, is a constant, is the scaling factor, is the offset.

6. The method for implicit identity authentication of mobile devices based on the attention mechanism according to claim 1, characterized in that: The student model is obtained by distilling the trained teacher model, including: Calculate performance scores for mobile devices; Let the teacher model have a total of If the performance score is less than the score threshold, the teacher model's previous The layer is used as the distillation scope; otherwise, the posterior layer of the teacher model is taken Layers serve as distillation ranges; The distillation range is clustered using the KMeans clustering method, and the centroid of each cluster in the clustering result is used as the distillation position; Train and output a student model based on the distilled positions in the teacher model.

7. The method for implicit identity authentication of mobile devices based on attention mechanism according to claim 6, characterized in that: The number of clusters for the KMeans clustering method is determined as follows: Based on the maximum and minimum values ​​of the performance score, three score ranges are obtained: high score range, medium score range, and low score range; Determining a score range of the mobile device according to the calculated performance score of the mobile device; If the score range of the mobile device is a high score range, determining the number of clusters to be a first number value; Alternatively, if the score range of the mobile device is a medium score range, determining the number of clusters to be a second number value; Alternatively, if the score range of the mobile device is a low score range, the number of clusters is determined to be a third number value; and the first number value is greater than the second number value, and the second number value is greater than the third number value.

8. The method for implicit identity authentication of mobile devices based on attention mechanism according to claim 6, characterized in that: The distillation range is clustered using a KMeans clustering method, including: randomly sampling layers within the distillation range; Based on the random sampling results, KMeans clustering method is used for clustering.

Citation Information

Patent Citations

  • Multi-modal fusion wavelet knowledge distillation video behavior identification method and system based on cross attention

    CN115294498A

  • Bimodal biometric feature recognition network model training method

    CN116385832A

  • Edge-end data security authentication method based on perceptual hash coding

    CN118364862A

  • Training method of forged voice detection model, forged voice detection method and device

    CN118366433A

  • Lightweight and privacy-protected cross-modal retrieval method in Internet of Things environment

    CN119167393A