Training method of wireless sensing model, wireless sensing method and related device

By using pass-through estimator and arithmetic search in the training method of wireless perception model, the problem of high training cost and low model accuracy is solved, and the number of parameters and calculations is reduced, and the model is improved. Effect of usefulness.

CN119398120APending Publication Date: 2025-02-07SHANGHAI JIAOTONG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411641595.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The logic gate network in existing deep learning models has high computational volume and errors introduced by parameter discretization during training and inference, resulting in high training cost and reduced model accuracy, limiting its application on edge devices with limited resources.

Method used

A training method for wireless perception model is proposed. By obtaining sample channel state information and labels, the wireless perception model is trained, and the model parameters are discrete by using pass-through estimator and arithmetic search to reduce the amount of parameters and calculations.

Benefits of technology

The parameters and calculation amount of logic gate network training process are reduced, the training cost is reduced, and the accuracy loss caused by the parameter discretization process is reduced through the pass-through estimator, which improves the universality of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398120A_ABST
    Figure CN119398120A_ABST
Patent Text Reader

Abstract

The invention discloses a training method of a wireless sensing model, a wireless sensing method and a related device, relates to the technical field of deep learning, and aims to reduce parameter quantity and calculation quantity in a logic gate network training process and reduce training cost based on arithmetic search and calculation of neuron output in a logic gate network. In the process of training the wireless sensing model by adopting the sample channel state information and the tag corresponding to the sample channel state information, the wireless sensing model is trained by adopting a direct-through estimator, so that the precision loss caused by a discretization process on a part of data sets is reduced, and the universality of a logic gate network is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning technology, and in particular to a training method for a wireless perception model, a wireless perception method and related devices. Background Art

[0002] In recent years, deep learning technology has been widely used in life and production, such as image classification, WiFi-based human activity classification, and other fields, and these applications often have certain requirements for real-time performance, that is, the speed of model inference. The reasoning of deep neural networks can be performed on the edge or in the cloud. Cloud computing has the disadvantages of high network latency, difficulty in processing massive data, relatively low privacy and security, and is not friendly to applications with high requirements for real-time and privacy. Edge computing is performed on resource-constrained edge devices, and deep neural networks often have a large number of parameters and high computing overhead, which makes it difficult to deploy applications based on deep learning on resource-constrained edge devices. Therefore, reducing the storage and computing overhead of neural networks, that is, model compression, has become an important technology required to further promote deep learning applications.

[0003] Among many deep learning models, logic gate networks are commonly used models. However, the amount of computation required during logic gate network training is high, resulting in high training costs. In addition, during actual reasoning, logic gate networks need to first determine the logic gate operators used by neurons. There is a parameter discretization process that maps the parameters from full precision to {0, 1}. This parameter discretization process will introduce errors on some data sets, making the model accuracy after parameter discretization only about 50% of that before discretization, reducing the versatility of logic gate networks. Summary of the invention

[0004] The purpose of this application is to provide a training method for a wireless perception model, a wireless perception method and related devices, which can reduce the number of parameters and calculations in the training process and improve the accuracy of human activity classification based on WiFi.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides a method for training a wireless sensing model, comprising:

[0007] Obtaining a number of sample channel state information;

[0008] Marking each of the sample channel state information by category to obtain a label corresponding to each of the sample channel state information;

[0009] Determine whether the current number of training rounds reaches the preset number of training rounds;

[0010] If the current number of training rounds reaches the preset number of training rounds, a trained wireless perception model is determined based on the model parameters of the wireless perception model; the wireless perception model is a logic gate network after discretizing the model parameters based on arithmetic search;

[0011] If the current number of training rounds does not reach the preset number of training rounds, the sample channel state information is input into the wireless sensing model to obtain the predicted output corresponding to the sample channel state information; the loss value corresponding to the current number of training rounds is calculated according to the predicted output corresponding to the sample channel state information and the label corresponding to the sample channel state information; and it is determined whether the loss value corresponding to the current number of training rounds is less than the preset value;

[0012] If the loss value corresponding to the current number of training rounds is less than the preset value, the wireless sensing model is trained using the direct estimator, the current number of training rounds is increased by one, and "determine whether the current number of training rounds reaches the preset number of training rounds" is returned;

[0013] If the loss value corresponding to the current number of training rounds is not less than the preset value, the current number of training rounds is increased by one, and the process returns to "determine whether the current number of training rounds reaches the preset number of training rounds" until the current number of training rounds reaches the preset number of training rounds to obtain a trained wireless perception model.

[0014] In a second aspect, the present application provides a wireless sensing method, including:

[0015] Obtain target channel state information;

[0016] The target channel state information is input into a trained wireless perception model to obtain a target action category of the target channel state information; the trained wireless perception model is trained using the wireless perception model training method as described in any one of claims 1 to 3.

[0017] In a third aspect, the present application provides a training device for a wireless perception model, comprising:

[0018] The sample channel state information acquisition module is used to: acquire a number of sample channel state information;

[0019] A category labeling module is used to: label each of the sample channel state information by category to obtain a label corresponding to each of the sample channel state information;

[0020] Model training module, used to:

[0021] Determine whether the current number of training rounds reaches the preset number of training rounds;

[0022] If the current number of training rounds reaches the preset number of training rounds, a trained wireless perception model is determined based on the model parameters of the wireless perception model; the wireless perception model is a logic gate network after discretizing the model parameters based on arithmetic search;

[0023] If the current number of training rounds does not reach the preset number of training rounds, the sample channel state information is input into the wireless sensing model to obtain the predicted output corresponding to the sample channel state information; the loss value corresponding to the current number of training rounds is calculated according to the predicted output corresponding to the sample channel state information and the label corresponding to the sample channel state information; and it is determined whether the loss value corresponding to the current number of training rounds is less than the preset value;

[0024] If the loss value corresponding to the current number of training rounds is less than the preset value, the wireless sensing model is trained using the direct estimator, the current number of training rounds is increased by one, and "determine whether the current number of training rounds reaches the preset number of training rounds" is returned;

[0025] If the loss value corresponding to the current number of training rounds is not less than the preset value, the current number of training rounds is increased by one, and the process returns to "determine whether the current number of training rounds reaches the preset number of training rounds" until the current number of training rounds reaches the preset number of training rounds to obtain a trained wireless perception model.

[0026] In a fourth aspect, the present application provides a wireless sensing device, including:

[0027] The target channel state information acquisition module is used to: acquire the target channel state information;

[0028] A wireless perception classification module is used to: input the target channel state information into a trained wireless perception model to obtain a target action category of the target channel state information; the trained wireless perception model is trained using the wireless perception model training method as described in any one of claims 1 to 3.

[0029] In a fifth aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned training method of the wireless perception model.

[0030] In a sixth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned training method of the wireless perception model.

[0031] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0032] The present application provides a training method for a wireless perception model, a wireless perception method and related devices, which obtain a wireless perception model based on a logic gate network after discretizing the model parameters through arithmetic search, thereby reducing the number of parameters and the amount of calculation in the logic gate network training process and reducing the training cost; in the process of training the wireless perception model using sample channel state information and labels corresponding to the sample channel state information, a direct-through estimator is used to train the wireless perception model, thereby reducing the accuracy loss caused by the discretization process on some data sets and enhancing the versatility of the logic gate network. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 This is an application environment diagram of a training method for a wireless perception model in one embodiment of the present application;

[0035] Figure 2 A flowchart of a method for training a wireless sensing model provided in Example 1 of the present application;

[0036] Figure 3 A schematic diagram of a specific process of a wireless sensing model training method provided in Example 1 of the present application;

[0037] Figure 4 A schematic diagram of the structure of an improved logic gate network provided in Example 1 of the present application;

[0038] Figure 5 A schematic diagram of a convolutional layer structure provided in Example 1 of the present application;

[0039] Figure 6 A schematic diagram of a dense connect structure provided in Example 1 of the present application;

[0040] Figure 7 A schematic diagram of STE parameter mapping provided in Example 1 of the present application;

[0041] Figure 8 A schematic diagram of functional modules of a training device for a wireless perception model provided in Example 3 of the present application;

[0042] Fig. 9 A schematic diagram of the structure of a computer device provided in Example 5 of the present application. DETAILED DESCRIPTION

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

[0044] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0045] The following describes the principles of the existing logic gate network and some basic knowledge used in this application. The existing logic gate network is parameterized by selecting the logic gate operator used by each neuron. In order to train the logic gate network by gradient descent, the existing logic gate network relaxes the activation value a∈{0,1} to a∈[0,1] during training, and replaces the logic gate operator with its corresponding probability expectation, for example, A∧B is replaced by A·B, so that the logic gate operator can be replaced by a differentiable expression.

[0046] For a binary logic gate, two inputs correspond to four input arrangements, and the output corresponding to each input arrangement has two possibilities: 0 or 1. By exhaustively enumerating the outputs corresponding to the four input arrangements, we can obtain all 16 binary logic gate operators, as shown in Table 1.

[0047] Table 1 Binary logic gate operators and their probability expectations

[0048]

[0049]

[0050] The defects of the existing technology are: 1. The existing logic gate network training cost is high: floating point numbers are used in all parts of the logic gate network training, and the weighted sum of the real-valued form of all 16 logic gate operators needs to be calculated when calculating the activation value of each neuron, resulting in the amount of calculation during the logic gate network training being much higher than the amount of calculation during actual reasoning, which limits the training of larger-scale logic gate networks. 2. The existing logic gate network introduces errors when discretizing, and the model accuracy after parameter discretization is only about 50% of that before discretization, which reduces the versatility of the logic gate network. 3. The existing logic gate network model structure is simple: the existing model structure of the logic gate network is simple in design, and is just a sparse multi-layer perceptron. While the accuracy is low, it also brings problems such as gradient vanishing and large number of parameters. Increasing the depth of the logic gate network will make the network difficult to train, which limits the expansion of the logic gate network.

[0051] Example 1

[0052] The training method of the wireless perception model provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the sample channel state information to the server 104. After the server 104 receives the sample channel state information, the server 104 marks the sample channel state information for the sample channel state information, obtains the label corresponding to the sample channel state information, and uses the sample channel state information and the label corresponding to the sample channel state information to train the wireless perception model. Based on the through-estimator, the wireless perception model is trained to obtain a trained wireless perception model. The server 104 can feed back the obtained trained wireless perception model to the terminal 102. In addition, in some embodiments, the training method of the wireless perception model can also be implemented by the server 104 or the terminal 102 alone, such as the terminal 102 can directly perform the above processing on the sample channel state information to obtain a trained wireless perception model, or the server 104 can obtain the sample channel state information from the data storage system and perform the above processing on the sample channel state information.

[0053] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, and tablet computers. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0054] In an exemplary embodiment, Figure 2 As shown, a training method for a wireless perception model is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 201 to 203. Among them:

[0055] Step 201: Obtain some sample channel state information. The channel state information (WiFi Channel State Information, WiFi CSI) can be obtained through a router device.

[0056] Step 202: label each of the sample channel state information with a category to obtain a label corresponding to each of the sample channel state information.

[0057] Step 203: Determine whether the current number of training rounds reaches the preset number of training rounds;

[0058] If the current number of training rounds reaches the preset number of training rounds, a trained wireless perception model is determined based on the model parameters of the wireless perception model; the wireless perception model is a logic gate network after discretizing the model parameters based on arithmetic search;

[0059] If the current number of training rounds does not reach the preset number of training rounds, the sample channel state information is input into the wireless sensing model to obtain the predicted output corresponding to the sample channel state information; the loss value corresponding to the current number of training rounds is calculated according to the predicted output corresponding to the sample channel state information and the label corresponding to the sample channel state information; and it is determined whether the loss value corresponding to the current number of training rounds is less than the preset value;

[0060] If the loss value corresponding to the current number of training rounds is less than the preset value, the wireless sensing model is trained using the straight-through estimator (STE), the current number of training rounds is increased by one, and "determine whether the current number of training rounds reaches the preset number of training rounds" is returned;

[0061] If the loss value corresponding to the current number of training rounds is not less than the preset value, the current number of training rounds is increased by one, and the process returns to "determine whether the current number of training rounds reaches the preset number of training rounds" until the current number of training rounds reaches the preset number of training rounds to obtain a trained wireless perception model.

[0062] Implement the above steps 201 to 203, discretize the model parameters based on the logic gate network through arithmetic search, and obtain the wireless perception model, thereby reducing the number of parameters and the amount of calculation in the logic gate network training process, and reducing the training cost; in the process of training the wireless perception model using sample channel state information and the labels corresponding to the sample channel state information, in order to solve the problem that the function mapped to the discrete value is not differentiable, a direct-through estimator is used to train the wireless perception model to estimate the gradient of the non-differentiable function, reduce the precision loss caused by the discretization process on some data sets, and enhance the versatility of the logic gate network. In addition, the present application further reduces the number of parameters by improving the logic gate network structure through a convolutional layer based on the local receptive field of the convolutional layer and the idea of ​​shared weights; and introduces dense connect to alleviate the problem of gradient disappearance and speed up the convergence speed of deep logic gate network training.

[0063] The wireless sensing model provided in this embodiment is an improved logic gate network. The improved logic gate network uses a convolutional layer and a logic layer (LogicLayer) as basic blocks to construct a logic gate network. Its structure is as follows: Figure 4 The wireless sensing model comprises an input layer, an input binarization module, a feature extraction module and a wireless sensing module which are connected in sequence.

[0064] Wherein, the input layer is used to input sample channel state information.

[0065] The input binarization module is used to binarize the input sample channel state information to obtain binary information. The input of the logic gate network during reasoning is binary, so the full-precision input needs to be binarized first when processing the input. The input binarization module of the improved logic gate network first maps the input sample channel state information to the interval [0, 1], and then compares each dimensional tensor in the three-dimensional tensor of the sample channel state information with the threshold, that is, by comparing it with n thresholds T uniformly distributed on (0, 1). i Compare and binarize the sample channel state information, which is less than T i 0, greater than T i is 1, and n is the preset threshold number.

[0066] The feature extraction module is used to extract the binary information features to obtain wireless sensing features.

[0067] The feature extraction module includes several convolutional layers; the convolutional layers are connected by dense connect; each convolutional layer includes a flattening layer, a logic layer and a combination layer connected in sequence; in another exemplary embodiment of the present application, the number of convolutional layers can be 3, and the structure of the convolutional layers is as follows: Figure 5 shown.

[0068] The flattening layer is used to split and flatten the input of the convolutional layer through a Flatten operation to obtain a one-dimensional tensor.

[0069] The logic layer is used to extract features from a one-dimensional tensor to obtain a number of logic tensors.

[0070] The combination layer is used to combine all logical tensors through a Fold operation to obtain a combined tensor of a specified shape.

[0071] The local receptive field and shared weights significantly reduce the number of parameters of the neural network. Based on the characteristics of the local receptive field and shared weights, the present application regards a small logic gate network (a small logic gate network, i.e., a logic layer) as a convolution kernel.

[0072] like Figure 5As shown in the figure, the patch used for the convolution operation is flattened into a one-dimensional tensor through the Flatten operation, input into the logic layer, and output a one-dimensional tensor of length out_dim. Then, the outputs corresponding to all patches are combined into a combined tensor (three-dimensional tensor) of shape [out_dim, h, w] through the Fold operation, that is, the output feature map corresponding to the logic gate network used as the convolution kernel; out_dim, h, and w are the length, height, and width of the combined tensor respectively. The number of channels of the feature map output by the final convolutional layer is:

[0073] C out =filter_num*out_dim(1);

[0074] Among them, C out is the number of channels of the feature map output by the convolutional layer, and filter_num is the number of convolution kernels in this layer. Similar to the shared weights in convolutional neural networks, the logic gates of the small logic gate network used as convolution kernels can also be reused.

[0075] The existing logic gate network represents the selection of logic gate operators through classification probability distribution, and the activation value of the neuron is:

[0076]

[0077] In the formula, a' represents the activation value, w represents the model parameter, f represents the probability expectation corresponding to the logic gate operator, a1 and a2 represent the input; i represents the logic gate operator, i = 0, 1..., 15, and j represents the jth neuron. The model parameters are real numbers and are mapped to probability distributions through softmax. During inference, each neuron selects the logic gate operator with the highest probability. Multiple neurons form a logic layer (LogicLayer), which is the basic module of the logic gate network.

[0078] The logic gate network is a complete 1-bit network. The skip connect based on addition cannot be directly used for the logic gate network because 1-bit addition involves at least 2 bits of integer data. Therefore, this application introduces the dense connect based on concat. The dense connect between two convolutional layers is as follows: Figure 6 As shown in Figure 2, by concatenating the input and output of each type of convolutional layer as the input of the next layer, feature reuse is achieved, thus solving the gradient disappearance problem.

[0079] The wireless sensing module includes a logic layer, an aggregation layer (GroupSum) and a softmax layer ( Figure 4The wireless sensing classification module is used to: extract the wireless sensing features at the logic layer to obtain classification features; classify the sample channel state information according to the classification features to obtain the probability distribution score corresponding to each category; determine the probability corresponding to each category according to the probability distribution score corresponding to each category at the softmax layer; determine the final category of the sample channel state information according to the probabilities corresponding to all the categories, specifically including: determine the final category of the sample channel state information by the category corresponding to the probability distribution score with the largest value.

[0080] The final output of the model in the WiFi-based human activity recognition task is usually the probability distribution score corresponding to each category, so the aggregation layer aggregates the output of the logic layer into:

[0081]

[0082] Among them, y i represents the probability distribution score corresponding to the i-th category, k is the total number of categories, a j is the output of the jth neuron in the logic layer, τ is the temperature coefficient, β is the offset value, and τ and β are preset hyperparameters. The function output by this aggregation layer is called GroupSum in the logic gate network.

[0083] In another exemplary embodiment of the present application, the present application parameterizes four outputs of the binary logic gate operator based on arithmetic search, as shown in Table 2.

[0084] Table 2 Binary logic gate operator output lookup table

[0085] <![CDATA[x0]]> <![CDATA[x1]]> output 0 0 a 0 1 b 1 0 c 1 1 d

[0086] In Table 2 above, x0 and x1 represent the two inputs of the binary logic gate operator, and a, b, c, and d represent the outputs of the binary logic gate operator corresponding to the four inputs. Arithmetic search is equivalent to modeling an unknown logic gate operator. The four inputs of the binary logic gate operator are certain, and the only difference is that the outputs corresponding to the inputs are different.

[0087] To make this lookup table differentiable, we write it in the following form:

[0088]

[0089] The above formula also outputs a, b, c or d according to the values ​​of x0 and x1. For example, when x0 and x1 are both 0, the value of the expression in the first bracket is a, and the values ​​of the expressions in the following three brackets are all 0. The final output of this formula is a, which is the same as the above lookup table. Then relax the value from {0, 1} to [0, 1], and replace the three bit operations of NOT, AND and OR involved in the above formula with the corresponding probability expectations. The probability expectations corresponding to the three bit operations of NOT, AND and OR are as follows:

[0090] NOT(x0)=1-x0 (5);

[0091] AND(x0,x1)=x0·x1 (6);

[0092] OR(x0,x1)=x0+x1-x0·x1 (7);

[0093] During training, a, b, c, and d are floating point numbers in the range [0, 1], just like the input and output. During inference, if they are less than 0.5, they are taken as 0, otherwise they are taken as 1. After the parameters are discretized, the lookup table corresponds to a binary logic gate operator.

[0094] Introducing arithmetic search into the logic gate network can significantly reduce the number of parameters in the logic gate network. For an n-ary logic gate operator, a total of 2^n parameters are required for parameterization by arithmetic search, while 2^(2^n) parameters are required according to the original parameterization method of the existing logic gate network. In addition, arithmetic search also reduces the amount of calculation required to simulate the selection of logic gate operators when training the model. The reduction in the number of parameters and calculations not only reduces the model training overhead, but also provides the possibility for exploring multi-element logic gate networks.

[0095] When initializing the model, use a tensor of shape [n, 2^m] to initialize the parameters of neurons with n m-element logic gate operators. Before modifying the parameterization method, you need to initialize it with a tensor of shape [n, 2^(2^m)], and the modified parameter amount is smaller.

[0096] When the wireless sensing model is trained or inferred, formulas (5)-(7) are substituted into formula (4) to calculate the activation value of the neuron in the wireless sensing model, and the activation value of the neuron is used as the output of the neuron.

[0097] When the logic gate network is training the model, it simulates the selection of logic gate operators. At this time, the neuron output is equivalent to the weighted sum of all 16 binary logic gate operators after being relaxed to a differentiable form. However, only one logic gate operator is used during reasoning. There must be a gap between the two. Although the original text of the logic gate network claims that the performance loss introduced by this parameter discretization is very small, the parameter discretization process introduces a huge loss of precision. The model reasoning accuracy after parameter discretization is only about 50% of that before parameter discretization. For details, see the experimental part of Chapter 3, Section 2. In order to solve this loss of precision, this application refers to quantization-aware training and introduces STE in the model training process to train the discretized logic gate network.

[0098] STE is a commonly used derivation method in quantization-aware training. Because quantization often involves mapping high-precision floating-point numbers to low-precision integers or fixed-point numbers, and this process is not differentiable. STE skips the mapping step when deriving and directly uses the derivative of the loss with respect to the STE output as the derivative with respect to its input:

[0099]

[0100] Among them, X r is the high-precision value before mapping, X q It is the low-precision value after mapping.

[0101] like Figure 3 As shown, this embodiment divides the training into two stages. In the first stage, the output and gradient are calculated using full-precision input and parameters. When the loss value corresponding to the current training round is less than the preset value, the second stage is entered. The parameters are discretized in the forward propagation, and the full-precision parameters are mapped to {0, 1}. Because the input is binary, according to formula (4), the output is also binary, which is the same as the case during inference. The second stage is trained through STE, and the output is calculated using discretized parameters, and the gradient is calculated using full-precision parameters.

[0102] During inference, the parameters are also mapped to {0, 1}. The discretization process of the parameters will introduce large errors on some data sets. By introducing parameter discretization during training, the performance of the model during inference can be further improved, and the errors introduced by the parameter discretization process on some data sets can be reduced.

[0103] The logic gate network is divided into two modes when simulating the logic gate operator: training and testing. During the training process, the parameter values ​​are full precision, and during the test, the parameter values ​​are mapped to {0, 1} to simulate the actual reasoning situation. Different from the existing logic gate network, this application directly maps the parameters to 0 or 1 during forward propagation in training, such as Figure 7 shown.

[0104] At this time, the activation values ​​of each layer also become 0 or 1, which is the same as the actual reasoning. When backpropagation calculates the gradient, the full-precision parameter value before discretization is used for calculation, and the parameter value before discretization is updated. This application divides the training into two stages. In the first stage, parameter discretization is not introduced during the training process. When the loss is less than the preset threshold, the second stage is entered. The module parameters are discretized in the forward propagation and trained through STE until the current number of training rounds reaches the preset number of training rounds to obtain a trained wireless perception model (inference model).

[0105] This application makes improvements to the existing shortcomings of the logic gate network. Compared with the original logic gate network, the improved logic gate network has lower training costs, less precision loss before and after discretization, and alleviates the problem of gradient vanishing. It is easier to train and enhances versatility. The performance of the trained wireless perception model proposed in this application is verified below:

[0106] Ablation experiments were conducted on the UT-HAR dataset for introducing STE to train the logic gate network. The UT-HAR dataset is the first public WiFi CSI dataset for human activity recognition. It consists of seven categories and a total of 4973 samples. The network structure used in the experiment is the same as the existing logic gate network, with a total of 5 LogicLayer layers, and each LogicLayer has 1024002 binary logic gate operators. The experimental results are shown in Table 3.

[0107] Table 3 Experimental results on the UT-HAR dataset

[0108] Accuracy (Training Mode) Accuracy (Evaluation Mode) No_STE 95.01% 52.67% With_STE 94.03% 94.03%

[0109] In Table 3, No_STE indicates that STE is not used to train the wireless perception model, and With_STE indicates that STE is used to train the wireless perception model. The above experimental results show that on the UT_HAR dataset, the original logic gate network will introduce huge accuracy loss when the parameters are discretized for actual reasoning. However, continuing to train the discretized model through STE can greatly reduce this accuracy loss, so that the model can achieve better performance in actual reasoning and be more versatile.

[0110] This embodiment also conducts experiments on the convolutional layer on the CIFAR10 dataset. The network structure used by DiffLogic Net is the same as the existing logic gate network, with a total of 5 LogicLayer layers, and the number of logic gate operators in each LogicLayer layer is the same. The trained wireless sensing model provided by this application has three convolutional layers and two LogicLayer layers, each convolutional layer has 16 convolution kernels, and each LogicLayer layer has 147460 neurons. The experimental results are as follows:

[0111] Table 4 Experimental results on the CIFAR10 dataset

[0112]

[0113] In Table 4, DiffLogic Net represents the logic gate network without using convolutional layers. From the above experimental results, it can be seen that the logic gate network using convolutional layers has higher accuracy under similar parameter amounts, and using convolutional layers under similar accuracy can significantly reduce the amount of network parameters.

[0114] The present application also provides an application scenario, which applies the above-mentioned training method of the wireless perception model. Specifically: the training method of the wireless perception model provided in this embodiment can be applied in the training scenario of the wireless perception model. The training scenario of the wireless perception model includes a wireless channel state information acquisition link, a wireless perception model training link and a wireless perception link; the sample channel state information enters the training link of the wireless perception model from the wireless channel state information acquisition link to obtain a trained wireless perception model, and enters the downstream wireless perception link, and the trained wireless perception model is used to classify the target channel state information to obtain the target action category corresponding to the target channel state information. The training method of the wireless perception model provided in this embodiment belongs to the training link of the wireless perception model. Specifically, in the training link process of the wireless perception model for the sample, the sample channel state information can be marked to obtain the label corresponding to the sample channel state information, and the wireless perception model is trained based on the direct estimator to obtain the trained wireless perception model.

[0115] Example 2

[0116] The wireless sensing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the target channel state information to the server 104. After the server 104 receives the target channel state information, for the target channel state information, the server 104 uses the trained wireless perception model to classify the target channel state information to obtain the target action category corresponding to the target channel state information. The server 104 can feedback the obtained target action category for the target channel state information to the terminal 102. In addition, in some embodiments, the wireless perception method can also be implemented by the server 104 or the terminal 102 alone, such as the terminal 102 can directly perform wireless perception processing on the target channel state information to obtain the target action category corresponding to the target channel state information, or the server 104 can obtain the target channel state information from the data storage system and perform wireless perception processing on the target channel state information.

[0117] In an exemplary embodiment, a wireless sensing method is provided. The method is executed by a computer device, which can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:

[0118] Obtain target channel state information;

[0119] The target channel state information is input into a trained wireless perception model to obtain a target action category of the target channel state information; the trained wireless perception model is trained using the training method of the wireless perception model described in Example 1.

[0120] Example 3

[0121] Based on the same inventive concept, the embodiment of the present application also provides a training device for a wireless perception model for implementing the training method for a wireless perception model involved in the above-mentioned embodiment 1. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the training method for a wireless perception model involved in the above-mentioned embodiment 1, so the specific limitations in the embodiments of the training device for one or more wireless perception models provided below can refer to the limitations on the training method for a wireless perception model in the above text, and will not be repeated here.

[0122] In an exemplary embodiment, Figure 8 As shown, a training device for a wireless perception model is provided, comprising:

[0123] The sample channel state information acquisition module T1 is used to: acquire a number of sample channel state information;

[0124] The category labeling module T2 is used to: label each of the sample channel state information by category to obtain a label corresponding to each of the sample channel state information;

[0125] Model training module T3 is used to:

[0126] Determine whether the current number of training rounds reaches the preset number of training rounds;

[0127] If the current number of training rounds reaches the preset number of training rounds, a trained wireless perception model is determined based on the model parameters of the wireless perception model; the wireless perception model is a logic gate network after discretizing the model parameters based on arithmetic search;

[0128] If the current number of training rounds does not reach the preset number of training rounds, the sample channel state information is input into the wireless sensing model to obtain the predicted output corresponding to the sample channel state information; the loss value corresponding to the current number of training rounds is calculated according to the predicted output corresponding to the sample channel state information and the label corresponding to the sample channel state information; and it is determined whether the loss value corresponding to the current number of training rounds is less than the preset value;

[0129] If the loss value corresponding to the current number of training rounds is less than the preset value, the wireless sensing model is trained using the direct estimator, the current number of training rounds is increased by one, and "determine whether the current number of training rounds reaches the preset number of training rounds" is returned;

[0130] If the loss value corresponding to the current number of training rounds is not less than the preset value, the current number of training rounds is increased by one, and the process returns to "determine whether the current number of training rounds reaches the preset number of training rounds" until the current number of training rounds reaches the preset number of training rounds to obtain a trained wireless perception model.

[0131] Example 4

[0132] Based on the same inventive concept, the embodiment of the present application also provides a wireless sensing device for implementing the wireless sensing method involved in the above embodiment 2. The implementation solution provided by the device is similar to the implementation solution recorded in the wireless sensing method involved in the above embodiment 2, so the specific limitations in one or more wireless sensing device embodiments provided below can refer to the limitations on the wireless sensing method above, and will not be repeated here.

[0133] The target channel state information acquisition module is used to: acquire the target channel state information;

[0134] The wireless sensing classification module is used to: input the target channel state information into a trained wireless sensing model to obtain the target action category of the target channel state information; the trained wireless sensing model is trained using the wireless sensing model training method described in Example 1.

[0135] Example 5

[0136] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store wireless sensing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a training method for a wireless sensing model is implemented.

[0137] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0138] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0139] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0140] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0141] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0142] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

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

[0144] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A training method for a wireless sensing model, characterized in that: The training method of the wireless sensing model includes: Obtaining some sample channel state information; Marking each of the sample channel state information by category to obtain a label corresponding to each of the sample channel state information; Determine whether the current number of training rounds reaches the preset number of training rounds; If the current number of training rounds reaches the preset number of training rounds, a trained wireless sensing model is determined based on the model parameters of the wireless sensing model; the wireless sensing model is a logic gate network; If the current number of training rounds does not reach the preset number of training rounds, the sample channel state information is input into the wireless sensing model to obtain the predicted output corresponding to the sample channel state information; the loss value corresponding to the current number of training rounds is calculated according to the predicted output corresponding to the sample channel state information and the label corresponding to the sample channel state information; and it is determined whether the loss value corresponding to the current number of training rounds is less than the preset value; If the loss value corresponding to the current number of training rounds is less than the preset value, the wireless sensing model is trained using the direct estimator, the current number of training rounds is increased by one, and "determine whether the current number of training rounds reaches the preset number of training rounds" is returned; If the loss value corresponding to the current number of training rounds is not less than the preset value, the current number of training rounds is increased by one, and the "determine whether the current number of training rounds reaches the preset number of training rounds" is returned until the current number of training rounds reaches the preset number of training rounds to obtain a trained wireless perception model.

2. The training method of the wireless sensing model according to claim 1, characterized in that: The wireless sensing model comprises an input layer, an input binarization module, a feature extraction module and a wireless sensing module connected in sequence; Wherein, the input layer is used to input sample channel state information; The input binarization module is used to: perform binarization processing on the input sample channel state information to obtain binarized information; The feature extraction module is used to extract the binary information features to obtain wireless sensing features; The wireless sensing classification module is used to: extract features from the wireless sensing features to obtain classification features; classify the sample channel state information according to the classification features to obtain a probability distribution score corresponding to each category; determine the probability corresponding to each category according to the probability distribution score corresponding to each category; and determine the final category of the sample channel state information according to the probabilities corresponding to all the categories.

3. The training method of the wireless sensing model according to claim 2, characterized in that: The feature extraction module includes several convolutional layers; the convolutional layers are connected by dense connect; each convolutional layer includes a flattening layer, a logic layer and a combination layer connected in sequence; The flattening layer is used to split and flatten the input of the convolutional layer to obtain a one-dimensional tensor; The logic layer is used to: extract features from a one-dimensional tensor to obtain a number of logic tensors; The combination layer is used to combine all logical tensors to obtain a combined tensor.

4. A wireless sensing method, characterized in that: The wireless sensing method comprises: Obtain target channel status information; The target channel state information is input into a trained wireless perception model to obtain a target action category of the target channel state information; the trained wireless perception model is trained using the wireless perception model training method as described in any one of claims 1 to 3.

5. A training device for a wireless perception model, characterized in that: The training device of the wireless perception model comprises: The sample channel state information acquisition module is used to: acquire a number of sample channel state information; A category labeling module is used to: label each of the sample channel state information by category to obtain a label corresponding to each of the sample channel state information; Model training module, used to: Determine whether the current number of training rounds reaches the preset number of training rounds; If the current number of training rounds reaches the preset number of training rounds, a trained wireless perception model is determined based on the model parameters of the wireless perception model; the wireless perception model is a logic gate network after discretizing the model parameters based on arithmetic search; If the current number of training rounds does not reach the preset number of training rounds, the sample channel state information is input into the wireless sensing model to obtain the predicted output corresponding to the sample channel state information; the loss value corresponding to the current number of training rounds is calculated according to the predicted output corresponding to the sample channel state information and the label corresponding to the sample channel state information; and it is determined whether the loss value corresponding to the current number of training rounds is less than the preset value; If the loss value corresponding to the current number of training rounds is less than the preset value, the wireless perception model is trained using the direct estimator, the current number of training rounds is increased by one, and "judgment of whether the current number of training rounds reaches the preset number of training rounds" is returned; if the loss value corresponding to the current number of training rounds is not less than the preset value, the current number of training rounds is increased by one, and "judgment of whether the current number of training rounds reaches the preset number of training rounds" is returned until the current number of training rounds reaches the preset number of training rounds to obtain a trained wireless perception model.

6. A wireless sensing device, characterized in that: The wireless sensing device comprises: The target channel state information acquisition module is used to: acquire the target channel state information; A wireless perception classification module is used to: input the target channel state information into a trained wireless perception model to obtain a target action category of the target channel state information; the trained wireless perception model is trained using the wireless perception model training method as described in any one of claims 1 to 3.

7. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the training method of the wireless perception model described in any one of claims 1 to 3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the training method of the wireless sensing model described in any one of claims 1 to 3 is implemented.