User identity recognition method and device, equipment, storage medium and program product
By constructing graph attention network and data enhancement technology in the user identification model, the problem of degradation of identification accuracy caused by the small number of new user samples is solved, and the accurate identification of user identity and model generalization of model is achieved under a small number of samples.
Patent Information
- Application Number
- CN202510652850.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-07-29
AI Technical Summary
In the prior art, the user identity identification model based on CSI data has poor generalization performance when the number of new user samples is small, and there is a catastrophic forgetting problem, resulting in a decrease in recognition accuracy.
By building a user identification model, the target feature extraction module is used to map the CSI data to be identified to the preset embedding space, the spatial distance between the mapping features and prototype vectors is calculated, the prototype vectors are constructed in combination with the graph attention network, and the data augmentation technology is used to generate semantic different training data sets, the prototype vectors of old users and new users are constructed, and the decision boundaries are dynamically updated.
With fewer training samples, accurate identification of user identity is achieved, the generalization ability of the model is improved, catastrophic forgetting of feature extraction module is avoided, and recognition accuracy is improved.
Smart Images

Figure CN120390224A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of artificial intelligence, and particularly relates to a method, apparatus, device, storage medium, and program product for user identity recognition. Background Art
[0002] In the field of human-computer interaction, an electronic device needs to provide personalized services for different users based on user identity recognition, such as adjusting indoor temperature, light brightness, and playing customized music.
[0003] Currently, user identity recognition technology can be implemented based on biometric recognition technology. As a unique human biometric, gait causes changes in the channel state information (CSI) detected by a wireless local area network (Wireless Fidelity, WiFi) device as the user moves. Therefore, the CSI data in the WiFi signal can be used as a user's biometric for user identity recognition.
[0004] Among them, the method of implementing user identity information recognition based on CSI data is based on network self-learning, that is, after obtaining the CSI data of a new user, the model is retrained using the CSI data of the new user and the CSI data of old users. However, the CSI data of new users often has a small number of samples, resulting in poor generalization performance of the model. Summary of the Invention
[0005] Embodiments of this application provide a method, apparatus, device, storage medium, and program product for user identity recognition, which can construct prototype vectors based on a small number of samples, thereby achieving accurate user recognition.
[0006] In a first aspect, embodiments of this application provide a method for user identity recognition, including:
[0007] Obtain CSI data of the channel state to be recognized;
[0008] Input the CSI data to be recognized into a user recognition model. The user recognition model uses a target feature extraction module to extract the feature to be recognized of the CSI data to be recognized, maps the feature to be recognized to a preset embedding space to obtain a first mapped feature, calculates the spatial distance between the mapped feature and the prototype vector, and uses the user identity corresponding to the target prototype vector with the smallest spatial distance as the output result. The prototype vector is the mean of the second mapped features of the CSI data corresponding to each user in the preset embedding space.
[0009] In a possible implementation, before inputting the CSI data to be recognized into the user recognition model, the method further includes:
[0010] Obtain the first training dataset;
[0011] Use the first training dataset to train the feature extraction module in the user recognition model;
[0012] When the target feature extraction module is trained, fix the parameters of the target feature extraction module;
[0013] Perform data augmentation on the first training dataset to obtain a second training dataset;
[0014] Use the first training dataset to construct old user prototype vectors, and use the second training dataset to construct new user prototype vectors;
[0015] Input the old user prototype vectors and the new user prototype vectors into the initial classifier, so that the initial classifier constructs a graph attention network based on the old user prototype vectors and the new user prototype vectors, and constructs the prototype vectors based on the graph attention network to obtain the user recognition model.
[0016] In a possible implementation, the performing data augmentation on the first training dataset to obtain a second training dataset includes:
[0017] Perform data rotation on the CSI data in the first training dataset to obtain the second training dataset.
[0018] In a possible implementation, the CSI data in the first training dataset is in matrix form, the rows of the matrix represent the number of antennas, and the columns of the matrix represent the number of subcarriers; the performing data augmentation on the first training dataset to obtain a second training dataset includes:
[0019] For the CSI data in the first training dataset, perform shuffling processing according to the antenna dimension and the subcarrier dimension to obtain the second training dataset.
[0020] In a possible implementation, the performing data augmentation on the first training dataset to obtain a second training dataset includes:
[0021] For the CSI data corresponding to each user in the first training dataset, perform block processing on the CSI data according to a preset data block length to obtain a plurality of data blocks;
[0022] For the CSI data corresponding to each user in the first training dataset, perform shuffling processing on the plurality of data blocks corresponding to the CSI data to obtain the second training dataset.
[0023] In a possible implementation, constructing the old user prototype vectors using the first training dataset and constructing the new user prototype vectors using the second training dataset includes:
[0024] Mapping the old user data in the first training dataset and the new user data in the second training dataset to the preset embedding space through a preset embedding function, to obtain the old user mapping features corresponding to the old user data and the new user mapping features corresponding to the new user data;
[0025] For each old user, calculating the mean of the multiple old user mapping features corresponding to the old user to obtain the old user prototype vector;
[0026] For each new user, calculating the mean of the multiple new user mapping features corresponding to the new user to obtain the new user prototype vector.
[0027] In a possible implementation, inputting the old user prototype vectors and the new user prototype vectors into an initial classifier, so that the initial classifier constructs a graph attention network based on the old user prototype vectors and the new user prototype vectors, and constructs the prototype vectors based on the graph attention network to obtain the user recognition model, includes:
[0028] Inputting the old user prototype vectors and the new user prototype vectors into the initial classifier;
[0029] The initial classifier uses each old user prototype vector and each new user prototype vector as node features to construct the nodes in the graph attention network;
[0030] For each node, calculating the relationship coefficient between the node and other nodes in the graph attention network except the node through a preset similarity calculation function;
[0031] For each node, performing normalization processing on the relationship coefficient corresponding to the node to obtain the attention weight of the node;
[0032] For each node, updating the prototype vector corresponding to the node using the attention weight to obtain the user recognition model.
[0033] In a possible implementation, calculating the relationship coefficient between the node and other nodes in the graph attention network except the node through a preset similarity calculation function includes:
[0034] Project the prototype vector corresponding to the node and the prototype vector corresponding to the target node into a preset metric space according to a preset linear transformation function to obtain a first projection vector and a second projection vector, where the target node is any other node except the node in the graph attention network;
[0035] Calculate the vector inner product of the first projection vector and the second projection vector to obtain the relationship coefficient.
[0036] In a possible implementation manner, the updating of the prototype vector corresponding to the node by using the attention weight includes:
[0037] Update the prototype vector corresponding to the node according to the following formula:
[0038]
[0039] where, represents the prototype vector corresponding to user k after the i ′ -th update, W I represents all prototype vectors in the initial classifier, α ij represents the attention weight of node i, U represents a linear transformation matrix, ω j represents the prototype vector corresponding to node j, represents the prototype vector corresponding to user k before the i ′ -th update.
[0040] In a second aspect, an embodiment of the present application provides a user identity recognition device, including:
[0041] An acquisition module, configured to acquire to-be-recognized channel state information CSI data;
[0042] A prediction module, configured to input the to-be-recognized CSI data into a user recognition model, where the user recognition model extracts to-be-recognized features of the to-be-recognized CSI data by using a target feature extraction module, maps the to-be-recognized features to a preset embedding space to obtain a first mapped feature, calculates the spatial distance between the mapped feature and the prototype vector, and uses the user identity corresponding to the target prototype vector with the smallest spatial distance as an output result, where the prototype vector is the mean value of the second mapped features of the CSI data corresponding to each user in the preset embedding space.
[0043] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory storing computer program instructions;
[0044] When the processor executes the computer program instructions, the method for user identity recognition as in the first aspect is implemented.
[0045] Fourthly, an embodiment of the present application provides a computer storage medium. Computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are executed by a processor, the method for user identity recognition as described in the first aspect is implemented.
[0046] Fifthly, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is caused to execute the method for user identity recognition as described in the first aspect.
[0047] For a method, device, equipment, storage medium, and program product for user identity recognition according to an embodiment of the present application, after obtaining CSI data of a channel state information to be recognized, the CSI data to be recognized is input into a user recognition model. Among them, prototype vectors corresponding to the CSI data of each user are pre-stored in the user recognition model. By calculating the spatial distance between the CSI data to be recognized and each prototype vector, a target prototype vector with the smallest spatial distance can be determined, and the user identity corresponding to the target prototype vector is the user identity corresponding to the CSI data to be recognized. In this way, in the case of fewer training samples, by calculating the mean value of the CSI data corresponding to each user in a preset embedding space, the corresponding prototype vector can be determined, thereby achieving accurate recognition of the user identity. Description of the Drawings
[0048] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0049] Figure 1 is a schematic flowchart of a method for user identity recognition provided by an embodiment of the present application;
[0050] Figure 2 is a schematic flowchart of a method for training a user recognition model provided by an embodiment of the present application;
[0051] Figure 3 is a schematic flowchart of a method for constructing a prototype vector provided by an embodiment of the present application;
[0052] Figure 4 is a schematic flowchart of a method for adjusting a discrimination space provided by an embodiment of the present application;
[0053] Figure 5 is an exemplary schematic diagram of a method for training a user recognition model provided by an embodiment of the present application;
[0054] Figure 6 is a schematic structural diagram of a device for user identity recognition provided by an embodiment of the present application;
[0055] Figure 7 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific embodiments
[0056] The features and exemplary embodiments of various aspects of the present application will be described in detail below. To make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to 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 some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0057] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements includes not only those elements, but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, the elements defined by the statement "comprising..." do not exclude the existence of additional identical elements in the process, method, article or device including the elements.
[0058] Currently, after a traditional model is deployed, if a new user is added, it is necessary to retrain the neural network model using the sample data of the new user and the old users. Thus, since the sample data of the new user is usually less, the generalization ability of the model is poor, and the storage overhead and training cost are large. Or, after the model is deployed, using the sample data of the new user to retrain the neural network model has the problem of catastrophic forgetting, resulting in the trained neural network model forgetting the knowledge of the old users, thereby reducing the performance of the model.
[0059] To solve the problems of the prior art, an embodiment of the present application provides a method, device, device, storage medium and program product for user identity recognition. The following first describes the method for user identity recognition provided by the embodiment of the present application. As Figure 1 shown, this method is applied to an electronic device, where the electronic device is a device supporting WiFi signals, and the method includes:
[0060] S101. Obtain the channel state information CSI data to be recognized.
[0061] It should be noted that in the embodiments of the present application, CSI data is obtained through a WiFi device that supports WiFi signals. Specifically, WiFi signals are propagated through multiple paths between the transmitter and receiver of an electronic device that supports WiFi signals, and user movement will cause scattering and reflection of the WiFi signals. The reflection, diffraction, and scattering phenomena of WiFi signals can be described by CSI data. Since gait is a unique biometric feature of human movement, CSI data can reflect the gait of a user, and thus different user identities can be recognized according to the gait characteristics of different users.
[0062] Among them, the frequency domain of the WiFi signal can be modeled as a channel impulse response, as shown in Equation 1:
[0063]
[0064] Among them, M is the total number of paths of multipath transmission, α m and φ m are the amplitude and phase of the Mth multipath vector, δ(τ) is the Dirac function, and τ m is the time delay.
[0065] Furthermore, a sampled version of the signal spectrum of each subcarrier can be obtained from the receiver end. Therefore, CSI data can be summarized in complex form, as shown in Equation 2:
[0066]
[0067] Among them, |H i | is the amplitude attenuation, and ∠H i is the phase shift at the ith subcarrier.
[0068] The above is the process of obtaining CSI data. In actual implementation, due to hardware limitations and environmental changes, the carrier frequency drift and the robustness of phase information are relatively poor. Therefore, CSI data is constructed using amplitude information.
[0069] In one example, CSI data can be collected through multiple routers and modified OpenWrt firmware. The modified firmware is equipped with an Atheros CSI tool. Through this tool, the data packets transmitted through the wireless channel can be recorded, and CSI data can be extracted from the data packets. When the operating frequency is 5 GHz and the router is set to operate in a 40 MHz channel, 114 subcarrier CSI data can be extracted for each transmitted signal. The number of CSI that can be obtained for each measurement is as shown in Equation 3:
[0070] N total =N TX N RX N subcarriers Equation 3
[0071] Among them, N TX and N RX respectively represent the number of antennas of the router sending the signal and the router receiving the signal. N subcarriers represents that the number of subcarriers in a 40 MHz channel is 114. Assume that the transmitting end is equipped with one antenna, the receiving end is equipped with three antennas, the sampling rate at the receiving end is 800 packet / s, and the sensing time is 2 s. Therefore, the size of each CSI data frame is 3×114×1600.
[0072] It can be understood that after obtaining the original CSI data frame above, the original CSI can be preprocessed to remove non - numeric (NaN) values in the CSI data caused by packet loss. To further reduce the computing load of the electronic device, the CSI data is normalized and sampled, so as to obtain CSI data with a smaller size.
[0073] S102: Input the CSI data to be recognized into the user recognition model. The user recognition model uses the target feature extraction module to extract the features to be recognized of the CSI data to be recognized, maps the features to be recognized into a preset embedding space to obtain the first mapped features, calculates the spatial distance between the mapped features and the prototype vectors, and takes the user identity corresponding to the target prototype vector with the smallest spatial distance as the output result.
[0074] Among them, the prototype vector is the mean value of the second mapped features of the CSI data corresponding to each user in the preset embedding space. The embodiments of the present application do not limit the above method for calculating the spatial distance.
[0075] Adopting the above method, after obtaining the CSI data of the channel state information to be recognized, the above CSI data to be recognized is input into the user recognition model. Among them, the prototype vectors corresponding to the CSI data of each user are pre - stored in the user recognition model. By calculating the spatial distance between the CSI data to be recognized and each prototype vector, the target prototype vector with the smallest spatial distance can be determined. The user identity corresponding to this target prototype vector is the user identity corresponding to the CSI data to be recognized. In this way, in the case of fewer training samples, by calculating the mean value of the CSI data corresponding to each user in the preset embedding space, the corresponding prototype vector can be determined, so as to accurately identify the user identity.
[0076] The following combines Figure 2 to introduce the training process of the user recognition model provided by the embodiments of the present application. Among them, the training process of the user recognition model includes three stages, namely the feature extraction module training stage, the classifier adaptation module training stage, and the classifier training stage. Specifically, as Figure 2 shown, the method includes:
[0077] S201: Obtain the first training data set.
[0078] Among them, the first training dataset is the training dataset corresponding to old users. The number of training data corresponding to old users is usually large.
[0079] S202. Use the first training dataset to train the feature extraction module in the user recognition model.
[0080] S203. When the target feature extraction module is trained, fix the parameters of the target feature extraction module.
[0081] Among them, S201 to S203 are the training stages of the feature extraction module.
[0082] S204. Perform data augmentation on the first training dataset to obtain the second training dataset.
[0083] It should be noted that since the training data of new users is usually small, in order to improve the generalization ability of the model, on the basis of the first training dataset, the first training dataset can be augmented, and the second training dataset obtained after the augmentation is used as the dataset corresponding to new users.
[0084] Moreover, since the target feature extraction module is trained using the first training dataset, the target feature extraction module can accurately separate user information without context information, and the subsequent generated prototype vectors have a good decision boundary. By performing data augmentation on the first training dataset, the second training dataset and the first training dataset are semantically different, so that the subsequent classifier can learn more knowledge, ensuring the accuracy of the output result of the classifier during the model inference process.
[0085] S205. Use the first training dataset to construct prototype vectors for old users and use the second training dataset to construct prototype vectors for new users.
[0086] Among them, S204 to S205 are the training stages of the classifier adaptation module.
[0087] It should be noted that for the above-mentioned first training dataset and second training dataset, the first training dataset and the second training dataset can be divided into two parts, namely the support set and the query set. Among them, the support set is used to construct prototype vectors, and the query set is used to calculate the loss function and optimize the model parameters.
[0088] S206. Input the prototype vectors of old users and new users into the initial classifier, so that the initial classifier constructs a graph attention network based on the prototype vectors of old users and new users, and constructs prototype vectors based on the graph attention network to obtain the user recognition model.
[0089] Among them, the nodes of the graph attention network are used to represent different prototype vectors, and the nodes can adjust the decision boundary of the prototype node corresponding to the node by integrating the context information of the node through the attention mechanism. S206 is the classifier training phase.
[0090] By using the method provided in the embodiment of the present application, after obtaining the first training data set, the feature extraction module is trained by using the first training data set, and then the parameters of the trained target feature extraction module are fixed. Among them, the target feature extraction module is trained on a training data set with a large amount of data, and has a general and robust feature extraction method, effectively preventing the catastrophic forgetting problem existing in the feature extraction module.
[0091] For the above S204, the first training data set is subjected to data augmentation processing to obtain a second training data set. Specifically, there are the following three data augmentation methods:
[0092] The first method: The CSI data in the first training data set is rotated to obtain the second training data set.
[0093] Among them, the rotation angle is set according to actual business requirements. In the embodiment of the present application, the rotation angle can be 90 degrees, 180 degrees or 270 degrees.
[0094] The second method: For the CSI data in the first training data set, it is shuffled according to the antenna dimension and the subcarrier dimension to obtain the second training data set.
[0095] Among them, the CSI data in the first training data set is in matrix form, the rows of the matrix represent the number of antennas, and the columns of the matrix represent the number of subcarriers.
[0096] Specifically, by adjusting the corresponding relationship between the antenna data and the subcarrier data, the shuffling process of the antenna dimension and the subcarrier dimension can be realized. For example, assuming that the CSI data is a 3-row and 144-column matrix, the rows in the matrix can be translated to realize the shuffling process of the antenna dimension and the subcarrier dimension.
[0097] The third method: For the CSI data corresponding to each user in the first training data set, the CSI data is segmented according to a preset data block length to obtain a plurality of data blocks; for the CSI data corresponding to each user in the first training data set, the plurality of data blocks corresponding to the CSI data are shuffled to obtain the second training data set.
[0098] Continuing with the above example, assuming the CSI data is a matrix of 3 rows and 144 columns, and the preset data block length is 3 rows and 12 columns, then the above CSI data matrix can be divided into 12 data blocks, and then the order of the above 12 data blocks is shuffled to obtain the second training dataset.
[0099] It should be noted that the above three data augmentation methods can be set according to actual business requirements, and moreover, the above three data augmentation methods can be used in combination.
[0100] By using the method provided in the embodiments of the present application, through data rotation of CSI data, or shuffling processing of the antenna dimension and subcarrier dimension, or block processing and shuffling processing of CSI data, semantic-different CSI data can be constructed on the basis of the existing CSI data, avoiding the problem of poor model generalization ability caused by the small sample data of new users.
[0101] Regarding the above S205, constructing an old user prototype vector using the first training dataset and constructing a new user prototype vector using the second training dataset, as Figure 3 shown, it can be specifically implemented as:
[0102] S2051: Map the old user data in the first training dataset and the new user data in the second training dataset to a preset embedding space through a preset embedding function, to obtain the old user mapping features corresponding to the old user data and the new user mapping features corresponding to the new user data.
[0103] Among them, the preset embedding function is pre-set according to the preset embedding space. For example, the preset embedding function can be f φ : where φ is the parameter of the embedding function, D is the original dimension of the input training data, and M is the dimension of the preset embedding space.
[0104] S2052: For each old user, calculate the mean of the multiple old user mapping features corresponding to the old user to obtain the old user prototype vector.
[0105] Specifically, the calculation formula of the prototype vector is as follows:
[0106]
[0107] where |S k | is the number of samples in the training dataset S k , (x i ,y i ) is the sample and its label in the training dataset, and f φ (x i ) is the mapping feature after the sample x i is mapped through the preset embedding function.
[0108] S2053. For each new user, calculate the mean value of multiple new user mapping features corresponding to the new user to obtain a new user prototype vector.
[0109] Using the method provided in the embodiments of the present application, for the data corresponding to the new user and the existing user, after mapping the corresponding data to the preset embedding space, multiple mapping features corresponding to each user can be obtained. By calculating the mean value of the multiple mapping features, prototype vectors corresponding to different users can be obtained. In this way, by calculating the mean value, even when the preset features are few, the prototype vectors corresponding to each user can still be accurately constructed, thereby improving the accuracy of subsequent user identification.
[0110] After calculating the prototype vectors corresponding to each user as described above, use the constructed prototype vectors to train the initial classifier, so that the classifier can implement user identity recognition based on the prototype vectors. Specifically, as Figure 4 shown, for S102 above, input the CSI data to be recognized into the user recognition model. The user recognition model uses the target feature extraction module to extract the feature to be recognized of the CSI data to be recognized, maps the feature to be recognized to the preset embedding space to obtain the first mapping feature, calculates the spatial distance between the mapping feature and the prototype vector, and uses the user identity corresponding to the target prototype vector with the smallest spatial distance as the output result. Specifically, it can be implemented as:
[0111] S1021. Input the old user prototype vector and the new user prototype vector into the initial classifier.
[0112] Among them, for the above-mentioned old user prototype vector and new user prototype vector, the initial classifier can maintain a parameter matrix for representing the above-mentioned prototype vectors. The size of the parameter matrix is H i ×M. Among them, H i is the number of users in the current learning stage. When i = 0, H0 is the same as the number of users when the model is first deployed. When i = 1, the value of H1 is the sum of the number of new users in the current learning stage and H0.
[0113] In an example, all the prototype vectors in the initial classifier can be expressed as:
[0114]
[0115] Among them, W I represents the prototype vector in the initial classifier, represents a row vector, each row vector corresponds to a prototype vector, i represents the i-th learning, and j represents user j.
[0116] S1022. The initial classifier uses each old user prototype vector and each new user prototype vector as node features to construct nodes in the graph attention network.
[0117] S1023. For each node, calculate the relationship coefficient between the node and other nodes in the graph attention network except the node through a preset similarity calculation function.
[0118] It should be noted that in the process of calculating the relationship coefficient above, project the prototype vector corresponding to the node and the prototype vector corresponding to the target node into a preset metric space according to a preset linear transformation function to obtain a first projection vector and a second projection vector, where the target node is any other node except the node in the graph attention network; calculate the vector inner product of the first projection vector and the second projection vector to obtain the relationship coefficient.
[0119] Specifically, the relationship coefficient can be calculated according to the following formula:
[0120]
[0121] where, e ij represents the relationship coefficient between node i and node j, A(*) and B(*) represent different preset linear transformation functions, and S(*) is a preset similarity calculation function.
[0122] The preset linear transformation function can be set in advance according to actual business requirements.
[0123] S1024. For each node, normalize the relationship coefficient corresponding to the node to obtain the attention weight of the node.
[0124] In one example, normalize the relationship coefficient through the softmax function. For example,
[0125] α ij = softmax(e ij )
[0126] where, α ij represents the attention weight of node i, and e ij is the relationship coefficient corresponding to node i.
[0127] S1025. For each node, update the prototype vector corresponding to the node using the attention weight to obtain a user recognition model.
[0128] By using the method provided in the embodiments of the present application, after inputting the prototype vectors corresponding to the above different users into the initial classifier, the initial classifier constructs the nodes in the graph attention network with each prototype vector as the node feature, and then calculates the relationship coefficient between each node and other nodes through a preset similarity calculation function. This relationship coefficient is used to characterize the degree of association between the node and other nodes. Then, for each node, normalizing all the relationship coefficients corresponding to the node can obtain the attention weight corresponding to the node. In this way, by calculating the attention weight corresponding to each node, the dynamic update of the decision boundary of each prototype vector can be realized.
[0129] Furthermore, on the basis of the calculated attention weights above, the prototype vectors can be updated according to the following formula:
[0130]
[0131] Wherein, represents the prototype vector corresponding to user k after the i ′ -th update, W I represents all the prototype vectors in the initial classifier, α ij represents the attention weight of node i, U represents the linear transformation matrix, ω j represents the prototype vector corresponding to node j, represents the prototype vector corresponding to user k before the i ′ -th update.
[0132] It can be understood that for each node, the information related to the node is aggregated through the relationship coefficient, and the context information corresponding to the node is integrated. At the same time, to ensure that the update of the node features is smoother, the context information and the prototype vector before the above update are fused to obtain the updated node features, so as to obtain a more accurate decision boundary of the node, thereby improving the accuracy of subsequent user identity recognition.
[0133] In this way, the user recognition model first calculates the mean value of the mapped features of the training data corresponding to each user to generate the initial prototype vector, and then sends the above prototype vector to the initial classifier. During the dynamic update of the model vector by the initial classifier, each prototype vector is optimized through the graph attention network. By using the context information of the node features of the existing old users, the decision boundary of each node is fine-tuned, so as to realize the fine-tuning of the discrimination space of each node, effectively alleviating the overfitting problem caused by the small amount of training sample data corresponding to the new users. And based on the calculated attention weights, the similarity between the prototype vectors of the old users and the prototype vectors corresponding to the new users can be calculated, and the prototype vectors corresponding to the old users with higher similarity are adjusted, thereby improving the accuracy of user recognition.
[0134] The following combines with Figure 5 to introduce the completion process of the user recognition model obtained by the above training, as Figure 5 shown. Figure 5 This is an exemplary schematic diagram of the training method of the user recognition model provided by the embodiment of the present application. The user recognition model includes a feature extraction module, a classifier adaptation module, and a classifier.
[0135] Among them, the base class data is used to train the feature extraction module and the classifier adaptation module. The new class data is used to train the classifier. The base class data is the first training data set in the above embodiment, and the new class data is the second training data set in the above embodiment.
[0136] Specifically, based on the base class data, a training set, a test set, and a validation set are set. The feature extraction module is trained using the training set, where the feature extraction module is a convolutional network. The parameters of the feature extraction module are adjusted using the validation set, and the model performance of the feature extraction module is tested using the test set. After the target feature extraction module is trained, the model parameters of the feature extraction module are frozen, and then the classifier adaptation module is trained.
[0137] For the classifier adaptation module, when the model is first trained, the user recognition model is trained using the base class data. Among them, the prototype vectors corresponding to the old users are saved in the classifier adaptation module, and the prototype vectors in the classifier adaptation module are fixed. After the first deployment of the model is completed, new users are added, and the model needs to be trained again. Specifically, the base class data is subjected to data augmentation processing to obtain new class data, and the new class data is used as the training data for the new users. Then, the prototype vectors corresponding to the new class data are constructed, and the constructed prototype vectors corresponding to the new class data are added to the classifier. The classifier adjusts the discriminant space of the locally stored prototype vectors based on the prototype vectors corresponding to the new class data. The method for adjusting the discriminant space of the prototype vectors based on the graph attention network specifically refers to the relevant description in the above embodiment, which will not be elaborated here.
[0138] Based on the same concept, the embodiment of the present application provides a device for user identity recognition, as Figure 6 shown. The device includes:
[0139] An acquisition module 601, configured to acquire the channel state information CSI data to be recognized;
[0140] A prediction module 602, configured to input the CSI data to be recognized into a user recognition model. The user recognition model uses a target feature extraction module to extract the features to be recognized from the CSI data to be recognized, maps the features to a preset embedding space to obtain a first mapped feature, calculates the spatial distance between the mapped feature and a prototype vector, and uses the user identity corresponding to the target prototype vector with the smallest spatial distance as the output result. The prototype vector is the mean value of the second mapped features of the CSI data corresponding to each user in the preset embedding space.
[0141] In a possible implementation, the apparatus further includes:
[0142] An acquisition module 601, configured to acquire a first training data set;
[0143] A training module, configured to train the feature extraction module in the user recognition model by using the first training data set;
[0144] A fixing module, configured to fix the parameters of the target feature extraction module when the target feature extraction module is trained;
[0145] An enhancement module, configured to perform data enhancement processing on the first training data set to obtain a second training data set;
[0146] A construction module, configured to construct old user prototype vectors by using the first training data set, and construct new user prototype vectors by using the second training data set;
[0147] The training module is further configured to input the old user prototype vectors and the new user prototype vectors into an initial classifier, so that the initial classifier constructs a graph attention network based on the old user prototype vectors and the new user prototype vectors, and constructs the prototype vectors based on the graph attention network to obtain the user recognition model.
[0148] In a possible implementation, the enhancement module is specifically configured to:
[0149] Perform data rotation on the CSI data in the first training data set to obtain the second training data set.
[0150] In a possible implementation, the CSI data in the first training data set is in matrix form, the rows of the matrix represent the number of antennas, and the columns of the matrix represent the number of subcarriers; the enhancement module is specifically configured to:
[0151] Perform shuffling processing on the CSI data in the first training data set according to the antenna dimension and the subcarrier dimension to obtain the second training data set.
[0152] In a possible implementation, the enhancement module is specifically configured to:
[0153] For the CSI data corresponding to each user in the first training dataset, perform chunking processing on the CSI data according to a preset data chunk length to obtain a plurality of data chunks;
[0154] For the CSI data corresponding to each user in the first training dataset, shuffle the plurality of data chunks corresponding to the CSI data to obtain the second training dataset.
[0155] In a possible implementation, the construction module is specifically configured to:
[0156] Map the old user data in the first training set and the new user data in the second training set to the preset embedding space through a preset embedding function to obtain the old user mapping features corresponding to the old user data and the new user mapping features corresponding to the new user data;
[0157] For each old user, calculate the mean of the multiple old user mapping features corresponding to the old user to obtain the old user prototype vector;
[0158] For each new user, calculate the mean of the multiple new user mapping features corresponding to the new user to obtain the new user prototype vector.
[0159] In a possible implementation, the training module is specifically configured to:
[0160] Input the old user prototype vector and the new user prototype vector into the initial classifier;
[0161] The initial classifier uses each old user prototype vector and each new user prototype vector as node features to construct nodes in the graph attention network;
[0162] For each node, calculate the relationship coefficient between the node and other nodes in the graph attention network except the node through a preset similarity calculation function;
[0163] For each node, perform normalization processing on the relationship coefficient corresponding to the node to obtain the attention weight of the node;
[0164] For each node, update the prototype vector corresponding to the node using the attention weight to obtain the user recognition model.
[0165] In a possible implementation, the training module is specifically configured to:
[0166] Project the prototype vector corresponding to the node and the prototype vector corresponding to the target node into a preset metric space according to a preset linear transformation function to obtain a first projection vector and a second projection vector, where the target node is any other node in the graph attention network except the node;
[0167] Calculate the vector inner product of the first projection vector and the second projection vector to obtain the relationship coefficient.
[0168] In a possible implementation manner, the training module is specifically configured to:
[0169] Update the prototype vector corresponding to the node according to the following formula:
[0170]
[0171] where represents the prototype vector corresponding to user k after the i-th update, W ′ represents all the prototype vectors in the initial classifier, α I represents the attention weight of node i, U represents a linear transformation matrix, ω ij represents the prototype vector corresponding to node j, j and represents the prototype vector corresponding to user k before the i-th update. ′
[0172] It should be noted that the device for user identity recognition corresponds to the method for user identity recognition above. All implementation manners in the above method embodiments are applicable to the embodiments of this device and can also achieve the same technical effects.
[0173] Figure 7 FIG. shows a schematic hardware structure diagram of an electronic device provided in an embodiment of the present application.
[0174] The electronic device may include a processor 701 and a memory 702 storing computer program instructions.
[0175] Specifically, the above-mentioned processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0176] Memory 702 may include a mass storage for data or instructions. By way of example and not limitation, memory 702 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In a suitable case, memory 702 may include removable or non-removable (or fixed) media. In a suitable case, memory 702 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 702 is a non-volatile solid-state memory.
[0177] In a particular embodiment, memory 702 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) 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 disclosure.
[0178] Processor 701 reads and executes the computer program instructions stored in memory 702 to implement any one of the data storage methods in the above embodiments.
[0179] In one example, the electronic device may further include a communication interface 703 and a bus 704. Among them, as Figure 7 shown, processor 701, memory 702, and communication interface 703 are connected through bus 704 and complete communication with each other.
[0180] Communication interface 703 is mainly used to implement communication between various modules, devices, units, and / or devices in the embodiments of the present application.
[0181] Bus 704 includes hardware, software, or both, and couples components of the electronic device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Super Transmission (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low PinCount (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable bus or a combination of two or more of these. Where appropriate, bus 704 may include one or more buses. Although embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.
[0182] In addition, in combination with the method for user identification in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. Computer program instructions are stored on the computer storage medium; when the computer program instructions are executed by a processor, any one of the methods for user identification in the above embodiments is implemented.
[0183] Embodiments of the present application further provide a computer program product, including a computer program, which when executed by a processor implements any one of the methods for user identification in the above embodiments.
[0184] It should be clear that the present application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are 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 steps after understanding the spirit of the present application.
[0185] The functional blocks shown in the above structural block diagrams 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 functional card, and so on. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave over a transmission medium or a communication link. A "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 read-only memory (EROM), floppy disks, compact disc read-only memory (CD-ROM), optical discs, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, and so on.
[0186] It should also be noted that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.
[0187] Aspects of the present disclosure have been described above with reference to the flowchart and / or block diagram of a method, apparatus (system), and computer program product according to embodiments of the present disclosure. It should be understood that each block in the flowchart and / or block diagram, and the combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / operations specified in one or more 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 should also be understood that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, can also be implemented by dedicated hardware that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0188] The above is only the specific implementation manner of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein. It should be understood that the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should all be covered by the protection scope of the present application.
Claims
1. A method for user identity recognition, characterized in that, Including: Obtain the CSI data of the channel state information to be recognized; Input the CSI data to be recognized into a user recognition model. The user recognition model uses a target feature extraction module to extract the features to be recognized from the CSI data to be recognized, maps the features to a preset embedding space to obtain a first mapped feature, calculates the spatial distance between the mapped feature and the prototype vector, and uses the user identity corresponding to the target prototype vector with the smallest spatial distance as the output result. The prototype vector is the mean of the second mapped features of the CSI data corresponding to each user in the preset embedding space.
2. The method according to claim 1, characterized in that, Before inputting the CSI data to be recognized into the user recognition model, the method further includes: Obtain a first training data set; Use the first training data set to train the feature extraction module in the user recognition model; When the target feature extraction module is trained, fix the parameters of the target feature extraction module; Perform data augmentation processing on the first training data set to obtain a second training data set; Use the first training data set to construct old user prototype vectors and use the second training data set to construct new user prototype vectors; Input the old user prototype vectors and the new user prototype vectors into an initial classifier, so that the initial classifier constructs a graph attention network based on the old user prototype vectors and the new user prototype vectors, and constructs the prototype vectors based on the graph attention network to obtain the user recognition model.
3. The method according to claim 2, wherein The performing data augmentation processing on the first training data set to obtain a second training data set includes: Perform data rotation on the CSI data in the first training data set to obtain the second training data set.
4. The method according to claim 2, wherein The CSI data in the first training data set is in matrix form, where the rows of the matrix represent the number of antennas and the columns of the matrix represent the number of subcarriers; The performing data augmentation processing on the first training data set to obtain a second training data set includes: For the CSI data in the first training data set, perform shuffling processing according to the antenna dimension and the subcarrier dimension to obtain the second training data set.
5. The method according to claim 2, wherein The performing data augmentation processing on the first training data set to obtain a second training data set includes: For the CSI data corresponding to each user in the first training data set, perform block processing on the CSI data according to a preset data block length to obtain a plurality of data blocks; For the CSI data corresponding to each user in the first training data set, perform shuffling processing on the plurality of data blocks corresponding to the CSI data to obtain the second training data set.
6. The method according to claim 2, wherein The using the first training data set to construct old user prototype vectors and using the second training data set to construct new user prototype vectors includes: Map the old user data in the first training set and the new user data in the second training set to the preset embedding space through a preset embedding function to obtain the old user mapped features corresponding to the old user data and the new user mapped features corresponding to the new user data; For each old user, calculate the mean value of multiple old user mapping features corresponding to the old user to obtain the old user prototype vector; For each new user, calculate the mean value of multiple new user mapping features corresponding to the new user to obtain the new user prototype vector.
7. The method according to claim 2, characterized in that, The inputting the old user prototype vector and the new user prototype vector into an initial classifier for the initial classifier to construct a graph attention network based on the old user prototype vector and the new user prototype vector, and constructing the prototype vector based on the graph attention network to obtain the user identification model includes: Input the old user prototype vector and the new user prototype vector into the initial classifier; The initial classifier uses each old user prototype vector and each new user prototype vector as node features to construct nodes in the graph attention network; For each node, calculate the relationship coefficient between the node and other nodes in the graph attention network except the node through a preset similarity calculation function; For each node, perform normalization processing on the relationship coefficient corresponding to the node to obtain the attention weight of the node; For each node, update the prototype vector corresponding to the node using the attention weight to obtain the user identification model.
8. The method according to claim 7, wherein The calculating the relationship coefficient between the node and other nodes in the graph attention network except the node through a preset similarity calculation function includes: Project the prototype vector corresponding to the node and the prototype vector corresponding to the target node into a preset metric space according to a preset linear transformation function to obtain a first projection vector and a second projection vector, where the target node is any other node in the graph attention network except the node; Calculate the vector inner product of the first projection vector and the second projection vector to obtain the relationship coefficient.
9. The method according to claim 7, wherein The updating the prototype vector corresponding to the node using the attention weight includes: Calculate the update of the prototype vector corresponding to the node according to the following formula: Among them, represents the prototype vector corresponding to user k after the i ′ -th update, W I represents all the prototype vectors in the initial classifier, α ij represents the attention weight of node i, U represents the linear transformation matrix, ω j represents the prototype vector corresponding to node j, represents the prototype vector corresponding to user k before the i ′ -th update.
10. A device for user identification, characterized in that, including: An acquisition module for acquiring CSI data of the channel state information to be recognized; A prediction module for inputting the CSI data to be recognized into a user identification model, where the user identification model extracts the feature to be recognized of the CSI data to be recognized using a target feature extraction module, maps the feature to be recognized into a preset embedding space to obtain a first mapping feature, calculates the spatial distance between the mapping feature and the prototype vector, and uses the user identity corresponding to the target prototype vector with the smallest spatial distance as the output result, and the prototype vector is the mean value of the second mapping features of the CSI data corresponding to each user in the preset embedding space.
11. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for user identity recognition according to any one of claims 1-9 is implemented.
12. A computer-readable storage medium, characterized in that, Computer program instructions are stored on a computer-readable storage medium, and when the computer program instructions are executed by a processor, the method for user identity recognition according to any one of claims 1-9 is implemented.
13. 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 is caused to execute the method for user identification according to any one of claims 1-9.