A domain-adaptive WiFi human perception method based on contrastive learning model

By adopting a domain adaptation method of comparative learning model in WiFi human perception system, the problem of degradation of recognition accuracy caused by environmental interference and subdomain differences is solved, and higher recognition accuracy and system reliability are achieved.

CN119421137BActive Publication Date: 2025-04-25SHENZHEN XINFENG WEIYE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510030686.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-25
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

When using the CSI data of WiFi devices for human body movement recognition and identity recognition, it is difficult to effectively eliminate multiple environmental interference factors and subdomain differences in each environmental interference domain, resulting in a decrease in recognition accuracy and robustness.

Method used

The domain adaptation method based on the contrast learning model is adopted, and the migration correspondence between the source domain and the target domain is learned through unsupervised generation of adversarial network models, a feature extractor for WiFi CSI data is obtained, and a data enhancement method is used to construct positive and negative samples for comparison learning, realizing fine-grained domain adaptation.

Benefits of technology

Effectively eliminate multiple environmental interference factors and the subdomain differences of each environmental interference domain, and improve the accuracy of WiFi-based personnel identity identification and system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119421137B_ABST
    Figure CN119421137B_ABST
Patent Text Reader

Abstract

The present invention discloses a domain adaptation WiFi human perception method based on a contrastive learning model. When training a human perception model based on WiFi CSI, pre-collected data is used as source domain data, and data of a site where actual applications are deployed is used as target domain data. An unsupervised generative adversarial network model is first used to learn the migration correspondence between the source domain and the target domain, and a feature extractor for WiFi CSI data is obtained; a CDCL model uses a data enhancement method to construct positive and negative samples for contrastive learning, obtains accurate data representation of subdomains, and realizes fine-grained domain adaptation. It can eliminate multiple environmental interference factors at the same time, eliminate the differences between subdomains of each environmental interference domain, realize fine-grained domain alignment, remove the interference of superposition of subdomains of multiple environmental domains, and improve the accuracy of human perception based on WiFi and the reliability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of detection technology, and in particular to a domain adaptation WiFi human body perception method based on a contrastive learning model. Background Art

[0002] When WiFi devices transmit radio frequency signals in the form of WiFi spectrum during communication, these signals will be reflected and diffracted by the human body in the area, and the fluctuations of the signals can be used to identify various human movements, such as hands, body or breathing. In real life, this recognition method can be applied to multiple application scenarios, such as security monitoring systems, elderly motor function status monitoring, and smart home devices. Some existing technologies attempt to use the channel state information (CSI) collected by WiFi devices to perform human activity recognition (HAR) and identity recognition (HI), which is suitable for personalized deployment in various sampling places such as smart homes and offices. However, the real natural environment contains a variety of interference factors, also known as domains or fields, such as the direction of walking trajectories, human limb posture and speed, and device deployment locations, which will cause changes in human features captured by WiFi devices. In addition, each interference domain contains multiple subdomains. For example, the walking trajectory has multiple directions, and the positions of WiFi receivers arranged 1 meter apart lead to a decrease in the accuracy and robustness of human perception applications such as human action recognition or personnel identity recognition. Existing technologies attempt to use transfer learning to eliminate the negative impact of interference domains, but are unable to remove multiple subdomains of the interference domain, and the transfer effect is usually unsatisfactory. Summary of the invention

[0003] The main technical problem solved by the present invention is to provide a domain-adaptive WiFi human perception method based on a contrastive learning model. The domain-adaptive WiFi human perception method based on a contrastive learning model can eliminate multiple environmental interference factors, eliminate the differences between subdomains of each environmental interference domain, achieve fine-grained domain alignment, remove interference from multiple subdomains, and improve the accuracy of WiFi-based personnel identification and the reliability of the system.

[0004] In order to solve the above problems, the present invention provides a domain-adaptive WiFi human perception method based on a contrastive learning model. The domain-adaptive WiFi human perception method based on a contrastive learning model includes: when training a human perception model based on WiFi CSI, pre-collected data is used as source domain data, and data of a site where actual applications are deployed is used as target domain data. An unsupervised generative adversarial network model is first used to learn the migration correspondence between the source domain and the target domain, and a feature extractor for WiFiCSI data is obtained; a CDCL model uses a data enhancement method to construct positive and negative samples for contrastive learning, obtains accurate data representation of the subdomain, and realizes fine-grained domain adaptation.

[0005] In one embodiment, the source domain includes multiple interference domains, and the multiple interference domains include walking track direction, walking speed, and WiFi device location.

[0006] In one embodiment, each interference domain includes multiple subdomains, the walking track has multiple orientations, including 0, 45, 90, and 180 degrees, and the receivers of the WiFi devices are arranged at intervals of 1 meter.

[0007] In one embodiment, in each training iteration, the CDCL model performs different degrees of weak data enhancement or strong data enhancement on the source domain and the target domain respectively. The CSI is first subjected to a data enhancement method of time dimension stretching / compression. This method randomly slows down or speeds up the CSI data by α percentage of the original data duration. For each CSI sample in the same training batch, the data of the source domain and the target domain in the same training batch are doubled through strong data enhancement. The data of the target domain is additionally enhanced once through weak data enhancement. α is randomly selected in the range of 0 to a set value, wherein the maximum range of the data enhancement is set to α=15% for strong data enhancement and α=5% for weak data enhancement. Weak data enhancement and strong data enhancement refer to slight perturbations or relatively large perturbations on a certain CSI data batch, respectively.

[0008] In one embodiment, the matrix of the calculation result is recorded as: source domain-source domain , source domain-target domain and target domain-target domain , Each element of Represents the embedding of two specific samples and The distance between represents the source domain or the target domain, and the classification of the target depends on the pseudo label. Contains a lot of noise, the CDCL model uses a weight redefinition method for each Calculate a confidence coefficient , the re-weighting method is as follows:

[0009] , where R represents a real number and N represents the number of samples. and Respectively The row and column indices in , is a temperature coefficient, empirically set to 0.07. is the target domain, Determined by the category-related confidence of the model prediction, the final classifier prediction is the maximum value obtained after applying the normalized exponential function SoftMax processing; if is the source domain, is set to 1; the CDCL model regards any data sample as an anchor point, and regards samples of the same category as positive samples, and regards other subdomain data in the same batch as negative samples. The affinity matrix , and Used to construct three types of contrast losses , including source-source losses , source-target loss and target-target loss , source-source loss and target-target loss It is the intra-domain contrast loss, which is used to reduce the distance between multiple sub-domains within the domain, and the source-target loss It is an inter-domain contrast loss, which is used to narrow the distance between the subdomains of the source domain and the target domain. The CDCL model achieves contrastive learning by reducing the distance between the anchor point and the positive sample and increasing the distance between the anchor point and the negative sample.

[0010] In one embodiment, the contrastive loss for each sample is: , in, Compute the embedding of anchor samples Embedding with positive samples The cosine similarity between represents the cosine similarity between the anchor point and the negative sample, is the number of positive samples of the selected anchor point samples, is a set of positive samples belonging to the same category as the selected anchor sample. is an indicator function. is equal to 1, When is equal to 0.

[0011] In one embodiment, in the initial stage of CDCL model training, the CDCL model initially adopts source-source contrast loss Distinguishing features enhances the robustness of the CDCL model. After training for a certain number of iterations, the CDCL model generates reliable pseudo labels. In the subsequent training, the source domain-target domain loss is used. and target-target domain loss Improve domain adaptability, CDCL model comparison loss Overview: , where the importance coefficient is empirically set to 2, It is set to 0 during the first 1 / 5 of the total number of iterations and then adjusted to 1. The total CDCL model inter-domain comparison loss , and intra-domain contrast loss And the intra-domain contrast loss , to optimize the fine-grained domain adaptation performance between the source domain and the target subdomain.

[0012] The present invention discloses a domain adaptation WiFi human perception method based on a contrastive learning model. When training a human perception model based on WiFi CSI, pre-collected data is used as source domain data, and data of a site where actual applications are deployed is used as target domain data. An unsupervised generative adversarial network model is first used to learn the migration correspondence between the source domain and the target domain, and a feature extractor for WiFi CSI data is obtained; the CDCL model uses a data enhancement method to construct positive and negative samples for contrastive learning, obtains accurate data representation of subdomains, and realizes fine-grained domain adaptation. It can eliminate multiple environmental interference factors at the same time, eliminate the differences between subdomains of each environmental interference domain, realize fine-grained domain alignment, remove the interference of superposition of subdomains of multiple environmental domains, and improve the accuracy of human perception based on WiFi and the reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the description only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0014] Figure 1 It is a schematic diagram of the cross-domain comparative learning model of the present invention.

[0015] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0016] The claims of the present invention are further described in detail below in conjunction with specific embodiments and drawings. 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 proposed by ordinary technicians in this field before making creative work also fall within the scope of protection of the present invention.

[0017] It should be understood that, in the description of the embodiments of the present invention, all directional indication terms, such as "up", "down", "left", "right", "front", "back", etc., indicate the orientation or position relationship based on the orientation, position relationship shown in the drawings or the orientation or position relationship in which the invented product is usually placed when used, which is only for the convenience of simplifying the description of the present invention, and does not expressly or implicitly indicate that the device, element or component referred to must have a specific orientation and a specific orientation structure, and should not be understood as a limitation on the present invention. It is only used to explain the relative position relationship, movement, etc. between the components shown in the drawings. When the specific posture changes, the directional indication may also change accordingly. For processes and methods, unless it is clearly stated in the specification that each step must be performed in sequence, excluding the case where the order of each step is changed, otherwise the corresponding invention purpose cannot be achieved, it is regarded as the simplicity of description, and the specification only selects the best or better one from various implementation methods as an example for explanation.

[0018] In addition, ordinal numbers such as "first" and "second" in the present invention are only used for the purpose of distinction, and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. The features defined as "first" and "second" can expressly or implicitly indicate at least one of the technical features. In order to facilitate the description, the present invention may have quantifiers such as "one", "two", "multiple", "at least one" or "several" to define the technical (structural) features, where "multiple" means at least two, that is, two or more; "at least one" and "several" mean one or one and the corresponding technical features; quantifiers and other definitions are only for illustrating the specific embodiment or the best implementation method, and should be included as long as they are not contrary to the overall concept and purpose of the invention, unless it is clearly stated that the quantifiers must be used to define them in order to be implemented or to achieve the purpose of the invention.

[0019] In the present invention, unless otherwise clearly stipulated and limited, the terms such as "installation", "setting", "connection", "fixation" and "screw-on" should be understood in a broad sense. For example, the positional relationship between components can be relatively fixed, or the components can be physically fixedly connected; they can be detachably connected or integrated; they can be mechanically connected or electrically connected; they can be directly connected or indirectly connected through an intermediate medium or component; they can be internally connected between two elements or interact with each other. Unless otherwise clearly defined in the specification, other interpretations may not achieve the corresponding functions or effects. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0020] The controller and control circuit involved in the present invention are conventional control technologies or units of those skilled in the art. For example, the control circuit of the controller can be realized by ordinary technicians in the field using existing technologies, such as simple programming. If the software or program involved in the control result is not described in detail, it belongs to the use of existing technologies or conventional technologies of ordinary technicians in the field. The power supply also uses the existing technologies in the field, and the main technical point of the present invention is to improve the mechanical device, so the present invention will not describe the specific circuit control relationship and circuit connection in detail.

[0021] The disclosure of the present invention provides many different embodiments or examples to realize different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described in the present invention. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or reference letters in different examples, and this repetition is for the purpose of simplicity and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed. In addition, the present invention provides various specific examples of processes and materials, but those of ordinary skill in the art can be aware of the application of other processes and / or the use of other materials.

[0022] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0023] like Figure 1 As shown, an embodiment of a domain adaptation WiFi human perception method based on a contrastive learning model of the present invention.

[0024] A domain-adaptive WiFi human perception method based on a contrastive learning model. When training a human perception model based on WiFi CSI, pre-collected data is used as source domain data, and data from the site where the actual application will be deployed is used as target domain data. The source domain contains multiple interference domains, such as walking trajectory direction, walking speed, and WiFi device location. Each interference domain contains multiple subdomains. The walking trajectory has multiple directions (0, 45, 90, 180 degrees), and the WiFi receiver positions are arranged 1 meter apart. The target domain also contains multiple interference domains and corresponding subdomains. First, an unsupervised generative adversarial network model is used to learn the migration correspondence between the source domain and the target domain, and a feature extractor for WiFi CSI data is obtained. Then, in order to obtain accurate data representation of the subdomain and achieve fine-grained domain adaptation. The CDCL (Cross Domain Contrastive Learning) model uses data enhancement methods to construct positive and negative samples, such as Figure 1 Contrastive learning shown. Figure 1 The feature extractor extracts the feature maps from the strongly enhanced source domain data and the target domain data respectively into a projection layer, which is used to extract features and reduce dimensions. The target domain data is additionally enhanced once by weak enhancement, and the feature map is obtained by the feature extractor.

[0025] Specifically, the CDCL model first performs a data augmentation method on CSI by stretching / compressing the time dimension, which randomly slows down or speeds up the CSI data by α percentage of the original data duration. This method synthesizes CSI corresponding to different gait cycles and walking speeds, which helps to solve the inconsistency of human gait in a specific subdomain. In each training iteration, the CDCL model performs different degrees of enhancement on the source domain and the target domain, such as Figure 1 As shown, the weak enhancement (also called weak data enhancement) or strong enhancement (also called strong data enhancement) on the left side, wherein the weak enhancement and strong enhancement refer to a slight perturbation or a relatively large perturbation on a certain CSI data batch, respectively. In actual operation, the value range of α is 0-15%, and the highest range of enhancement is empirically set to α=15% for strong enhancement, and α=5% for weak enhancement. For each CSI sample in the same training batch, α is randomly selected in the range of 0 to the set value. First, through the strong enhancement method, the data of the source domain and the target domain in the same training batch are doubled; the data of the target domain is also enhanced once more through weak enhancement, which helps the classifier predict the pseudo-label of the target domain data, thereby facilitating the subsequent calculation process of the contrast loss, that is, the intra-domain contrast loss. Generating contrast pairs through data enhancement methods can present different perspectives of samples in contrastive learning to a certain extent, which helps to reduce domain differences using contrastive learning strategies.

[0026] With the help of strong data augmentation methods, the CDCL model obtains Figure 1 The source domain representation and target domain representation are shown in Figure 2. The CDCL model calculates the cosine similarity of these representations to construct three affinity matrices for contrastive learning. According to the relationship between the contrast objects, the matrix of the calculation result can be recorded as: source domain - source domain ( )、Source domain-target domain( ) and target domain-target domain ( ). Each element of Represents the embedding of two specific samples and The distance between the asterisks ( ) can represent the source domain or the target domain. The classification of the target depends on the pseudo-label, so may contain a lot of noise, so the CDCL model adopts a weight redefinition method for each Calculate a confidence coefficient , the re-weighting method is shown in formula (1).

[0027] (1), where and Respectively The row and column indices in , is a temperature coefficient, empirically set to 0.07. is the goal, Determined by the class-related confidence of the model prediction, that is, the maximum value obtained by applying the SoftMax operation to the final classifier's prediction. is the source, is set to 1 because the true label information is known and the default confidence is 1. The CDCL model considers certain data samples as anchors, and considers samples of the same category as positive samples, and other subdomain data in the same batch as negative samples. Therefore, the affinity matrix , and Can be used to construct 3 types of contrast losses , including source-source losses , source-target loss and target-target loss Source-to-Source Loss and target-target loss Collectively referred to as intra-domain contrast loss, it is used to reduce the distance between multiple sub-domains within the domain. It can be called inter-domain contrast loss, which is used to narrow the distance between the subdomains of the source domain and the target domain. Specifically, the CDCL model achieves contrastive learning by reducing the distance between the anchor point and the positive sample and increasing the distance between the anchor point and the negative sample. The contrast loss of each sample is shown in formula (2).

[0028] (2), in the above formula (2), Calculate the embedding of the anchor sample Embedding with positive samples The cosine similarity between . Similarly, Represents the cosine similarity between the anchor point and the negative sample. is the number of positive samples of the selected anchor point samples, It is a set of positive samples belonging to the same category as the selected anchor sample. is an indicator function. is equal to 1, When is equal to 0.

[0029] In the initial stage of model training, the model may not be able to accurately learn the pseudo labels of CSI data in the target domain. Therefore, CDCL initially adopts the source-source contrast loss Distinguishing features enhances the robustness of the model. Then, after training for a certain number of iterations, the model is able to generate reliable pseudo labels, and then in the next training, and Improve domain adaptability. Overall CDCL contrast loss The summary is as shown in formula (3).

[0030] (3), in the above formula, the importance coefficient is empirically set to 2, and It is set to 0 during the first 1 / 5 of the total number of iterations and then adjusted to 1. In general, CDCL designs an inter-domain contrast loss And the intra-domain contrast loss and , to optimize the fine-grained domain adaptation performance between the source domain and the target subdomain.

[0031] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or perform equivalent replacement or combination on some structures (technical features) in one or more embodiments, and these modifications or replacements or combinations do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, unless the embodiments explicitly exclude the possibility of replacing or combining structures (technical features) in different embodiments, or such replacement or combination is contrary to the overall concept of the invention.

Claims

1. A domain adaptation WiFi human perception method based on contrastive learning model, including: When training the human perception model based on WiFi CSI, the pre-collected data is used as the source domain data, and the data of the actual application site is used as the target domain data. The unsupervised generative adversarial network model is first used to learn the migration correspondence between the source domain and the target domain, and a WiFi Feature extractor for CSI data; the CDCL model uses data enhancement methods to construct positive and negative samples for comparative learning, obtains accurate data representation of subdomains, and realizes fine-grained domain adaptation. In each training iteration, the CDCL model performs weak data enhancement or strong data enhancement to different degrees on the source domain and target domain respectively. First, the CSI is subjected to a data enhancement method of time dimension stretching / compression. This method randomly slows down or speeds up the CSI data with an α percentage of the original data duration. For each CSI sample in the same training batch, the data of the source domain and target domain in the same training batch are doubled through strong data enhancement; the data of the target domain is additionally enhanced once through weak data enhancement, and α is randomly selected in the range of 0 to a set value. Among them, the maximum range of data enhancement is set to strong data enhancement α=15%, and the maximum range of weak data enhancement α=5%. Weak data enhancement and strong data enhancement refer to slight perturbations or relatively large perturbations on a certain CSI data batch, respectively. The matrix of the calculated results is recorded as source domain-source domain , source domain-target domain and target domain-target domain , Each element of Represents the embedding of two specific samples and The distance between represents the source domain or the target domain, and the classification of the target depends on the pseudo label. Contains a lot of noise, the CDCL model uses a weight redefinition method for each Calculate a confidence coefficient , the re-weighting method is as follows: , Among them, R represents a real number, N represents the number of samples, and Respectively The row and column indices in , is a temperature coefficient, if is the target domain, Determined by the category-related confidence of the model prediction, the final classifier prediction is the maximum value obtained after applying the normalized exponential function SoftMax processing; if is the source domain, is set to 1; the CDCL model regards any data sample as an anchor point, and regards samples of the same category as positive samples, and regards other subdomain data in the same batch as negative samples. The affinity matrix , and Used to construct three types of contrast losses , including source-source losses , source-target loss and target-target loss , source-source loss and target-target loss It is the intra-domain contrast loss, which is used to reduce the distance between multiple sub-domains within the domain, and the source-target loss It is an inter-domain contrast loss, which is used to narrow the distance between the subdomains of the source domain and the target domain. The CDCL model achieves contrastive learning by reducing the distance between the anchor point and the positive sample and increasing the distance between the anchor point and the negative sample.

2. According to the domain adaptation WiFi human perception method based on contrastive learning model in claim 1, it is characterized by: The temperature coefficient is empirically set to 0.

07.

3. The domain adaptation WiFi human perception method based on contrastive learning model according to claim 1 or 2, characterized in that: The source domain includes multiple interference domains, and the multiple interference domains include walking track direction, walking speed, and WiFi device location.

4. The domain adaptation WiFi human perception method based on contrastive learning model according to claim 3 is characterized by: Each interference domain includes multiple subdomains. The walking trajectory has multiple directions, including 0, 45, 90, and 180 degrees. The receivers of the WiFi devices are arranged at a distance of 1 meter.

5. The domain adaptation WiFi human perception method based on contrastive learning model according to claim 1 or 2, characterized in that: Contrastive loss for each sample: , in, Compute the embedding of anchor samples Embedding with positive samples The cosine similarity between represents the cosine similarity between the anchor point and the negative sample, is the number of positive samples of the selected anchor point samples, is a set of positive samples belonging to the same category as the selected anchor sample. is an indicator function. is equal to 1, When is equal to 0.

6. The domain adaptation WiFi human perception method based on contrastive learning model according to claim 5, characterized in that: In the initial stage of CDCL model training, the CDCL model initially adopts source-source contrast loss Distinguishing features enhances the robustness of the CDCL model. After training for a certain number of iterations, the CDCL model generates reliable pseudo labels. In the subsequent training, the source domain-target domain loss is used. and target-target domain loss Improve domain adaptability, CDCL model comparison loss Overview: , In the formula, the importance coefficient , It is set to 0 during the first 1 / 5 of the total number of iterations and then adjusted to 1. The total CDCL model inter-domain comparison loss , and intra-domain contrast loss And the intra-domain contrast loss , to optimize the fine-grained domain adaptation performance between the source domain and the target subdomain.

7. The domain adaptation WiFi human perception method based on contrastive learning model according to claim 6 is characterized by: The importance coefficient Empirically set to 2.

Citation Information

Patent Citations

  • Cross-domain WiFi personnel identity recognition method based on multi-branch domain alignment model

    CN119150145A