Lightweight cross-scene Wi-Fi personnel counting method based on improved KAN network
By improving KAN network and multi-stage data preprocessing technology, the problems of imperfect data processing and large network size in the existing Wi-Fi personnel counting methods are solved, and higher recognition accuracy and cross-scene robustness are achieved.
Patent Information
- Application Number
- CN202411492415.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-21
AI Technical Summary
The existing Wi-Fi-based personnel count detection method has problems such as incomplete data processing, large network size and low cross-scene recognition.
The improved KAN network is adopted, combining data preprocessing technologies such as antenna phase division, frequency filtering, fluctuation filtering, and variance filtering, and data enhancement is enhanced through time translation and numerical inversion, and a modular lightweight improved KAN network is built for signal fluctuation feature extraction and personnel presence detection.
On the premise of improving the accuracy of personnel identification, the degree of noise removal and interference is improved, the network volume is reduced, and the robustness of network cross-scene recognition is enhanced.
Smart Images

Figure CN119670796A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a people counting method, in particular to a lightweight cross-scenario Wi-Fi people counting method based on an improved KAN network, and belongs to the field of wireless sensing. Background Art
[0002] In real life, identifying the number of people in an area is crucial for many scenarios. It can provide valuable information for management and decision-making, helping to improve efficiency, security and user experience. When a Wi-Fi signal encounters an obstacle during transmission, the channel state information changes, which can be used for people counting detection. Using Wi-Fi signals for people counting detection has the advantages of not requiring privacy authorization and not requiring the wearing of equipment. However, using Wi-Fi signals for people counting detection also faces many challenges. For example, data noise affects recognition accuracy; small data volume affects network robustness; data relationships are complex and difficult to model manually.
[0003] To solve the above problems, researchers proposed to use methods such as outlier removal, filtering, interpolation, and averaging to denoise the data; use signal processing methods such as noise injection to expand the data volume; and use deep neural networks to capture the relationship between the signal and the number of people. This method can improve the accuracy of people counting detection to a certain extent, but there are still problems such as imperfect data processing, large network size, and low cross-scene recognition robustness. Because its denoising method is difficult to remove environmental interference, it affects the recognition accuracy and cross-scene recognition robustness; the method of expanding the data volume has weak correlation with the data, and the expansion effect is poor; the neural network parameters are large and consume more storage and computing resources.
[0004] The present invention adopts an improved KAN network to solve the problems of large number of neural network parameters and low recognition accuracy. The KAN network is a new type of neural network architecture, which introduces a learnable activation function at the edge of the network to improve the expressiveness and interpretability of the model; the KAN network does not have a traditional linear weight matrix, the nodes only sum the input signals, and the nonlinear processing is completed through a learnable activation function, which reduces the size of the model. Summary of the invention
[0005] In view of the problems of imperfect data processing, large network size and low cross-scene recognition robustness in the current Wi-Fi-based people counting detection method, the purpose of the present invention is to provide a lightweight cross-scene Wi-Fi people counting method based on an improved KAN network, which improves the degree of denoising and interference removal, reduces the network size, and enhances the network cross-scene recognition robustness while improving the accuracy of people recognition.
[0006] The main purpose of the present invention is achieved through the following technical solutions:
[0007] The lightweight cross-scenario Wi-Fi personnel counting method based on the improved KAN network disclosed in the present invention performs data preprocessing of antenna division, frequency filtering, fluctuation filtering and variance filtering on Wi-Fi channel state information to obtain preprocessed Wi-Fi channel state information data; performs data enhancement of time shift and value inversion on the preprocessed data to obtain data-enhanced Wi-Fi channel state information as a data set for training the improved KAN network in the subsequent step 4; constructs a modular lightweight improved KAN network for Wi-Fi personnel counting, wherein the improved KAN network includes an SFE module and a PPD module; uses the Wi-Fi channel state information after the data enhancement in step 2 as a data set to train the improved KAN network to obtain a trained KAN network; performs data preprocessing and data enhancement on the Wi-Fi channel state information for personnel quantity detection through steps 1 and 2, and uses the improved KAN network trained in step 4 to perform Wi-Fi personnel counting, thereby improving the degree of denoising and interference removal, reducing the network volume, and enhancing the robustness of network cross-scenario recognition on the premise of improving the accuracy of personnel recognition.
[0008] The lightweight cross-scenario Wi-Fi people counting method based on the improved KAN network disclosed in the present invention comprises the following steps:
[0009] Step 1: Perform data preprocessing of antenna division, frequency filtering, fluctuation filtering, and variance filtering on the original Wi-Fi channel state information to obtain preprocessed Wi-Fi channel state information data.
[0010] Step 1.1: Perform antenna division on the original Wi-Fi channel state information to eliminate impulse noise in the signal and obtain the Wi-Fi channel state information after antenna division.
[0011] Step 1.1.1, sum and average the amplitudes of Wi-Fi channel state information of the same antenna and different carriers at the same time, so that each sampling point of each antenna corresponds to an amplitude.
[0012] Step 1.1.2: For different antennas, divide the antennas according to formula (1). Antenna division refers to dividing the channel state information of different antennas of the same Wi-Fi receiver, and the formula is as follows:
[0013]
[0014] CSI ratio is the result of dividing the antennas, CSI i With CSI jThe signal obtained by dividing antenna a by antenna b and the signal obtained by dividing antenna b by antenna a are highly similar, and the value in step 2.2 is taken to take advantage of this feature.
[0015] Step 1.1.3, by comparing the amplitude fluctuation diagrams of each channel state information after antenna division, select the antenna division group with the least impulse noise after division, and use the data after division of this antenna division group as the Wi-Fi channel state information after antenna division.
[0016] Step 1.2, frequency filtering is performed on the Wi-Fi channel state information after the antenna division. The frequency filtering is to select a Butterworth low-pass filter to filter the Wi-Fi channel state information after the antenna division. The Butterworth low-pass filter has the characteristics of flat amplitude-frequency response and no phase distortion. The Butterworth low-pass filter provides the maximum passband gain for the Wi-Fi channel state information after the antenna division below the cutoff frequency, and provides the maximum attenuation for the Wi-Fi channel state information after the antenna division above the cutoff frequency. The cutoff frequency refers to the frequency at which the filter starts to attenuate the signal. The high-frequency noise is filtered out by the Butterworth low-pass filter, while retaining the low-frequency human activity signal, to obtain the Wi-Fi channel state information after frequency filtering. The Butterworth low-pass filter formula is as follows:
[0017]
[0018] Where H(ω) is the transfer function of the Butterworth low-pass filter, ω is the frequency of the input signal, and ω c is the cut-off frequency and z is the filter order.
[0019] Step 1.3, perform fluctuation filtering on the Wi-Fi channel state information after frequency filtering to obtain the Wi-Fi channel state information after fluctuation filtering. Fluctuation filtering calculates the ratio of the number of points with severe fluctuations to the number of points with slow fluctuations, and performs different fluctuation filtering operations on the signal according to the ratio. The specific implementation method of fluctuation filtering is as follows: the degree of fluctuation of each point is determined according to the absolute value of the difference between the point and the overall average value of the signal. If the difference exceeds the set threshold, it is judged as severe fluctuation, otherwise it is slow fluctuation. During the fluctuation filtering process, the degree of fluctuation of each point will be judged and classified and counted. When the number of points with slow fluctuations reaches the preset value, it will be judged whether the number of points with severe fluctuations exceeds the set threshold. If it exceeds the threshold, the part of the signal is likely to be a long-term fluctuation signal caused by human activities and will be retained as is; if it does not exceed the threshold, the part of the signal is likely to be a short-term fluctuation signal caused by environmental interference, and the value of each point will be replaced by the average value of the overall signal. After that, the number of points with mild fluctuations and violent fluctuations will be reset to zero, and the above fluctuation filtering operation will be repeated until the end of the signal, thereby filtering out short-term signal fluctuations caused by environmental interference, retaining long-term signal fluctuations caused by human activities, and obtaining the Wi-Fi channel status information after fluctuation filtering.
[0020] Step 1.4, perform variance filtering on the Wi-Fi channel state information after the fluctuation filtering to obtain the Wi-Fi channel state information after the variance filtering. The specific implementation method of the variance filtering is: the variance filtering distinguishes two typical fluctuation situations of the original Wi-Fi channel state information by setting the variance threshold. The typical fluctuation situation 1 is that the signal fluctuates slowly when there are people and the signal fluctuates violently when there are no people. The typical fluctuation situation 2 is that the signal fluctuates violently when there are people and the signal fluctuates slowly when there are no people. If the overall variance of the signal exceeds the threshold, it is judged as situation 1; if the overall variance of the signal does not exceed the threshold, it is judged as situation 2. For situation 2, no additional data processing is performed; for situation 1, several data points are taken as a processing unit. If the variance of the processing unit exceeds the set unit threshold, all data points in the unit are replaced by the mean of the overall signal; if it does not exceed the threshold, it is retained as it is. The wildly fluctuating signal in the unmanned period of situation 1 is transformed into an almost non-fluctuating signal through variance filtering, so that it is consistent with the fluctuation law of situation 2, that is, the Wi-Fi channel state information after variance filtering is obtained. The Wi-Fi channel state information after variance filtering is the Wi-Fi channel state information after preprocessing in step 1.
[0021] Step 2: Perform data enhancement on the Wi-Fi channel state information preprocessed in step 1 by time shifting and value inversion to obtain the data-enhanced Wi-Fi channel state information, which is used as the data set for training the improved KAN network in the subsequent step 4.
[0022] Step 2.1: Time-shift the pre-processed Wi-Fi channel state information to obtain the time-shifted Wi-Fi channel state information.
[0023] The original Wi-Fi channel status information shows an inherent pattern: there is usually no one at the beginning of sampling, there are people in the middle, and no one returns to the state at the end. This phenomenon that the state of people is closely related to the sampling time is not conducive to the generalization of the model. Time shift refers to the random length shift of the Wi-Fi channel status information on the time axis, and a more diverse data set is generated through time shift. Time shift not only breaks the inherent law of personnel status and time, expands the scale of the data set, but also improves the adaptability and robustness of the improved KAN network.
[0024] Step 2.2: Invert the value of the time-shifted Wi-Fi channel state information to obtain the inverted value of the Wi-Fi channel state information.
[0025] The time-shifted Wi-Fi channel state information has similar characteristics because it has been preprocessed by antenna division in step 1, which makes the numerical inversion highly interpretable. Under the premise of ensuring that the fluctuation characteristics of the signal remain unchanged, numerical inversion expands the scale of the data set and helps improve the training of the KAN network.
[0026] Step 3: Construct a modular and lightweight improved KAN network for Wi-Fi personnel counting, wherein the improved KAN network includes an SFE (Signal Feature Extraction) module and a PPD (Personnel Presence Detection) module. The SFE module mainly extracts signal fluctuation features from the Wi-Fi channel state information after data enhancement, and outputs the final signal fluctuation features; the PPD module mainly detects the presence of personnel based on the final signal fluctuation features extracted by the SFE module, and outputs a sequence of the number of people. The SFE module includes a convolution input layer, a convolution block 1, a convolution block 2, and a convolution output layer, and the PPD module includes a linear layer 1, a KAN network layer, and a linear layer 2. The Wi-Fi channel state information after data enhancement obtained in step 2 is input into the SFE module, and the Wi-Fi channel state information is channel-expanded in the convolution input layer to obtain the Wi-Fi channel state information after channel expansion in the convolution input layer. Channel expansion increases the diversity of signal fluctuation features caused by human activities, allowing convolution blocks 1 and 2 to learn more complex signal fluctuation feature representations, extract signal fluctuation features more comprehensively, and enhance the generalization ability of the improved KAN network. The Wi-Fi channel state information after channel expansion in the convolution input layer is input into convolution blocks 1 and 2 to obtain the signal fluctuation features output by convolution block 2. Convolution blocks 1 and 2 include convolution layers, group normalization layers, linear rectification functions, and maximum pooling layers, respectively. The convolution layer extracts signal fluctuation features from the Wi-Fi channel state information after channel expansion through convolution kernels; the group normalization layer is used to normalize the signal fluctuation features of each channel to enhance the stability and convergence of the improved KAN network; the linear rectification function introduces nonlinear characteristics to the improved KAN network to promote the expression of signal fluctuation features; the maximum pooling layer is used for downsampling, halving the size of the signal fluctuation features, retaining important features and reducing the amount of input data for subsequent layers. The signal fluctuation feature output by convolution block 2 is input into the convolution output layer, where the channel is reduced to 1, the signal fluctuation feature is compressed, and the final signal fluctuation feature to be input into the PPD module is obtained. Compared with the Wi-Fi channel state information after data enhancement, the final signal fluctuation feature has the advantages of more concise and prominent signal fluctuation features and easier modeling of signal fluctuation features and the number of people. The final signal fluctuation feature is flattened into a signal fluctuation feature vector and input into the PPD module. The PPD module compresses the signal fluctuation feature vector through a fully connected layer to reduce the amount of data input into the KAN network layer; the KAN (Kolmogorov–Arnold Networks) network layer is used to fit the relationship between the signal fluctuation feature vector and the number of people sequence, and the high fitting accuracy of the KAN network is used to improve the accuracy of number recognition; the output of the KAN network layer passes through a fully connected layer and outputs the final number sequence.The superposition of the KAN network layer and the linear layer reduces the data dimension that the KAN network layer needs to fit, while utilizing the high-precision fitting capability of the KAN network layer and improving the fitting efficiency of the KAN network layer.
[0027] A modular and lightweight improved KAN network for Wi-Fi people counting is constructed. The improved KAN network includes an SFE (Signal Feature Extraction) module and a PPD (Personnel Presence Detection) module.
[0028] The SFE module mainly extracts signal fluctuation features from the Wi-Fi channel status information after data enhancement and outputs the final signal fluctuation features; the PPD module mainly detects the presence of people based on the final signal fluctuation features extracted by the SFE module and outputs a sequence of people. The SFE module includes a convolution input layer, a convolution block 1, a convolution block 2, and a convolution output layer, and the PPD module includes a linear layer 1, a KAN network layer, and a linear layer 2.
[0029] The Wi-Fi channel state information after data enhancement obtained in step 2 is input into the SFE module, and the Wi-Fi channel state information is expanded in the convolution input layer to obtain the Wi-Fi channel state information after channel expansion in the convolution input layer. Channel expansion increases the diversity of signal fluctuation characteristics caused by human activities, allowing convolution blocks 1 and 2 to learn more complex signal fluctuation feature representations, extract signal fluctuation features more comprehensively, and enhance the generalization ability of the improved KAN network. The Wi-Fi channel state information after channel expansion in the convolution input layer is input into convolution blocks 1 and 2. Convolution blocks 1 and 2 include convolution layers, group normalization layers, linear rectification functions, and maximum pooling layers, respectively. The convolution layer extracts signal fluctuation features from the Wi-Fi channel state information after channel expansion through the convolution kernel, as shown in formula (3):
[0030]
[0031] Among them, x[τ] is the input signal, h[τ] is the filter (or convolution kernel), y[t] is the output signal, and t and τ are variables.
[0032] The group normalization layer is used to normalize the signal fluctuation characteristics of each channel to enhance the stability and convergence of the improved KAN network. The formula is shown in (4):
[0033]
[0034] in C is the number of channels, H0 and W0 are the height and width of the input data, G is the number of groups, μ G is the mean within the group, is the variance within the group, ε is a small constant used to prevent division by zero errors, γ and β are learnable parameters used to scale and translate the normalized values, respectively, x cij is the input, y cij is the output, c, i, j are variables.
[0035] The linear rectification function introduces nonlinear characteristics to improve the KAN network and promotes the expression ability of signal fluctuation characteristics. The formula is shown in (5):
[0036] f(x0)=max(0,x0) (5)
[0037] Where x0 is the input and f(x0) is the output.
[0038] The maximum pooling layer is used for downsampling, which reduces the size of the signal fluctuation features by half, retains important features and reduces the amount of input data for subsequent layers. The formula is shown in (6):
[0039] output(N i ,C j ,l)=max a=0,......,kernel_size-1 input(N i ,C j ,stride×l+a) (6)
[0040] Where N i , C j , l represent the sample index, channel index and position index in the batch, kernel_size represents the size of the pooling window, stride represents the step size of the window sliding, input(N i ,C j , stride×l+a) represents the value of the ath input element at position l, output(N i ,C j ,l) is the output.
[0041] The signal fluctuation feature output by convolution block 2 is input into the convolution output layer, where the channel is reduced to 1, the signal fluctuation feature is compressed, and the final signal fluctuation feature to be input into the PPD module is obtained. Compared with the Wi-Fi channel state information after data enhancement, the final signal fluctuation feature has the characteristics of more concise and prominent signal fluctuation feature, and is easier to model the signal fluctuation feature and the number of people.
[0042] The final signal fluctuation feature is flattened into a signal fluctuation feature vector and input into the PPD module. The PPD module compresses the signal fluctuation feature vector through a fully connected layer to reduce the amount of data input to the KAN network layer. The formula is shown in (7):
[0043] Y=WX+B (7)
[0044] Where X is the input data matrix, W is the weight matrix, B is the bias vector, and Y is the output data matrix.
[0045] The KAN (Kolmogorov–Arnold Networks) network layer is used to fit the relationship between the signal fluctuation feature vector and the number of people sequence. The high fitting accuracy of the KAN network is used to improve the accuracy of number recognition. The formula is shown in (8):
[0046]
[0047] where φ q,p is a continuous function of one variable, Φ q is another univariate function, x p is the input, f(x1,x2,......,x n ) is the output, n is the number of input variables, and q and p are variables.
[0048] The output of the KAN network layer passes through a fully connected layer and then outputs the final number of people sequence. The superposition of the KAN network layer and the linear layer reduces the data dimension that the KAN network layer needs to fit, while utilizing the high-precision fitting capability of the KAN network layer and improving the fitting efficiency of the KAN network layer.
[0049] Step 4: Use the Wi-Fi channel state information dataset after data enhancement in step 2 to train the improved KAN network to obtain a trained KAN network. Configure the parameters required for network training for the improved KAN network for people counting constructed in step 3, set the learning rate, batch size, optimization method, number of iterations, etc. Use the Wi-Fi channel state information dataset after data enhancement in step 2 to train the improved KAN network for people counting, and stop training before the network overfits. MSE is used as the loss function in training, and its formula is shown in formula (9). The nonlinear relationship between the current Wi-Fi channel state information and its corresponding number of people sequence label is constructed through the trained improved KAN network.
[0050] Using MSE as the loss function, its formula is shown in formula (9):
[0051]
[0052] Where N is the number of samples, y k is the actual value, is the predicted value, MSE is the output value, and k is the variable.
[0053] Step 5: Perform data preprocessing and data enhancement on the Wi-Fi channel status information that needs to detect the number of people through steps 1 and 2, and use the improved KAN network trained in step 4 to count Wi-Fi people. On the premise of improving the accuracy of personnel recognition, the degree of denoising and interference removal is improved, the network size is reduced, and the robustness of network cross-scenario recognition is enhanced.
[0054] Beneficial Effects
[0055] 1. The lightweight cross-scenario Wi-Fi people counting method based on the improved KAN network disclosed in the present invention adopts a modular and lightweight improved KAN network to extract signal fluctuation features and detect the presence of people in Wi-Fi channel state information, thereby improving the accuracy of people identification, reducing the network size, and enhancing the robustness of network cross-scenario identification.
[0056] 2. The lightweight cross-scenario Wi-Fi people counting method based on the improved KAN network disclosed in the present invention adopts four-stage data preprocessing of antenna division, frequency filtering, fluctuation filtering, and variance filtering to improve the degree of denoising, effectively remove environmental interference, and unify the signal fluctuation law.
[0057] 3. The lightweight cross-scenario Wi-Fi people counting method based on the improved KAN network disclosed in the present invention adopts two-stage data enhancement of time shift and value inversion to break the inherent rules in the original data, expand the data scale while ensuring interpretability, and use a modular and lightweight improved KAN network to model data relationships with a very small number of parameters, thereby improving the generalization and scope of application of the lightweight cross-scenario Wi-Fi people counting method. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 Schematic diagram of a modular and lightweight improved KAN network in this embodiment.
[0059] Figure 2 The flowchart of the lightweight cross-scenario Wi-Fi people counting method based on the improved KAN network of the present invention.
[0060] Figure 3 The figure shows the comparison of the amplitude of Wi-Fi channel status information before and after antenna division.
[0061] Figure 4 The figure shows the comparison of the amplitude of Wi-Fi channel status information before and after frequency filtering.
[0062] Figure 5 The figure shows the comparison of the amplitude of Wi-Fi channel status information before and after fluctuation filtering.
[0063] Figure 6 This is a comparison chart of the Wi-Fi channel status information amplitude before and after variance filtering. DETAILED DESCRIPTION
[0064] The present invention will be described in detail below in conjunction with the accompanying drawings and embodiments, and the technical problems solved by the technical solution of the present invention and the beneficial effects will be discussed. It should be noted that the described embodiments are intended to facilitate the understanding of the present invention and do not have any limiting effect on the present invention.
[0065] like Figure 2 As shown, this embodiment discloses the application of a lightweight cross-scenario Wi-Fi people counting method based on an improved KAN network on the first Wi-Fi Awareness Competition dataset. The specific implementation steps are as follows:
[0066] Step 1: Perform data preprocessing of the original Wi-Fi channel status information in four stages: antenna division, frequency filtering, fluctuation filtering, and variance filtering, to obtain preprocessed Wi-Fi channel status information data (the numerical setting takes the first data collected by AP1 in room 1 of office scene A in the data set as an example).
[0067] Step 1.1: Perform antenna division on the original Wi-Fi channel status information to eliminate the impulse noise in the signal and obtain the Wi-Fi channel status information after antenna division. The specific denoising effect is as follows: Figure 3 shown.
[0068] Step 1.1.1, sum and average the amplitudes of Wi-Fi channel state information of the same antenna and different carriers at the same time, so that each sampling point of each antenna corresponds to an amplitude.
[0069] Step 1.1.2: For different antennas, divide the antennas according to formula (1). Antenna division refers to dividing the channel state information of different antennas of the same Wi-Fi receiver, and the formula is as follows:
[0070]
[0071] CSI ratio is the result of dividing the antennas, CSI i With CSI j The signal obtained by dividing antenna a by antenna b and the signal obtained by dividing antenna b by antenna a are highly similar, and the value in step 2.2 is taken to take advantage of this feature.
[0072] Step 1.1.3, by comparing the amplitude fluctuation diagrams of the channel state information after antenna division, select the antenna division group with the least impulse noise after division, and select the antenna division combination pair of antenna 1 divided by antenna 4 for this signal data. The data after the division of this antenna division group is used as the Wi-Fi channel state information after antenna division.
[0073] Step 1.2: Frequency filter the Wi-Fi channel status information after antenna division. The specific denoising effect is as follows: Figure 4 As shown. In this embodiment, the Wi-Fi channel status information after the antenna division is first linearly interpolated to generate a continuous time signal with a length of 1000 amplitude points; then a fourth-order Butterworth low-pass filter is used to filter the interpolated signal, and the cut-off frequency is set to 20Hz. The Butterworth low-pass filter has the characteristics of flat amplitude-frequency response and no phase distortion. The Butterworth low-pass filter provides the maximum passband gain for the Wi-Fi channel status information after the antenna division below the cut-off frequency, and provides the maximum attenuation for the Wi-Fi channel status information after the antenna division above the cut-off frequency. The cut-off frequency refers to the frequency at which the filter starts to attenuate the signal. The Butterworth low-pass filter is used to filter out high-frequency noise while retaining low-frequency human activity signals to obtain the Wi-Fi channel status information after frequency filtering. The Butterworth low-pass filter formula is as follows:
[0074]
[0075] Where H(ω) is the transfer function of the Butterworth low-pass filter, ω is the frequency of the input signal, and ω c is the cut-off frequency and z is the filter order.
[0076] Step 1.3: Perform fluctuation filtering on the Wi-Fi channel status information after frequency filtering to obtain the Wi-Fi channel status information after fluctuation filtering. The specific denoising effect is as follows: Figure 5 As shown. The fluctuation filter calculates the ratio of the number of amplitude points with violent fluctuations to the number of amplitude points with slow fluctuations, and performs different fluctuation filtering operations on the signal according to the ratio. The specific implementation method of the fluctuation filter is as follows: In this embodiment, the amplitude point whose absolute value of the difference with the average value of the signal amplitude is above 0.002 is judged as an amplitude point with violent fluctuations, and vice versa. Starting from the first amplitude point of the signal, the category of the amplitude point is determined and the two types of amplitude points are counted separately. When the number of amplitude points with slow fluctuations reaches 10, it will be determined whether the number of amplitude points with violent fluctuations exceeds 40. If the number of amplitude points with violent fluctuations exceeds 40, then this part of the signal is likely to be a long-term fluctuation signal caused by human activities and will be retained as is; if the number of amplitude points with violent fluctuations does not exceed 40, then this part of the signal is likely to be a short-term fluctuation signal caused by environmental interference, and the value of each amplitude point will be replaced by the average value of the overall signal. After that, the number of amplitude points with mild fluctuations and violent fluctuations will be reset to zero, a new counting segment will be started, and the above fluctuation filtering operation will be repeated until the end of the signal, thereby filtering out short-term signal fluctuations caused by environmental interference, retaining long-term signal fluctuations caused by human activities, and obtaining the Wi-Fi channel status information after fluctuation filtering.
[0077] Step 1.4: Perform variance filtering on the Wi-Fi channel state information after fluctuation filtering to obtain the Wi-Fi channel state information after variance filtering. The specific denoising effect is as follows: Figure 6 As shown. The specific implementation method of variance filtering is as follows: In this embodiment, each amplitude in the Wi-Fi channel state information after fluctuation filtering is first taken to the exponential power of e, so that the fluctuation of the violently fluctuating signal segment is more violent, and the fluctuation of the gently fluctuating signal segment is more gentle. The variance filter distinguishes two typical fluctuation situations of the original Wi-Fi channel state information by setting the variance threshold of 0.001. The typical fluctuation situation 1 is that the signal fluctuates slowly when there are people and the signal fluctuates very violently when there are no people. The typical fluctuation situation 2 is that the signal fluctuates violently when there are people and the signal fluctuates slowly when there are no people. If the overall variance of the signal exceeds 0.001, it is judged as situation 1; if the overall variance of the signal does not exceed 0.001, it is judged as situation 2. For situation 2, no additional data processing is performed; for situation 1, 50 amplitude points are used as a processing unit. If the variance of the processing unit exceeds the set unit threshold of 0.0025, all amplitude points in the unit are replaced by the mean of the overall signal; if it does not exceed 0.0025, it is retained as it is. The wildly fluctuating signal in the unmanned period of situation 1 is transformed into an almost non-fluctuating signal through variance filtering, so that it is consistent with the fluctuation law of situation 2, that is, the Wi-Fi channel state information after variance filtering is obtained. The Wi-Fi channel state information after variance filtering is the Wi-Fi channel state information after preprocessing in step 1.
[0078] Step 2: Perform data enhancement on the Wi-Fi channel state information preprocessed in step 1 by time shifting and value inversion to obtain the data-enhanced Wi-Fi channel state information, which is used as the data set for training the improved KAN network in the subsequent step 4.
[0079] Step 2.1: Time-shift the pre-processed Wi-Fi channel state information to obtain the time-shifted Wi-Fi channel state information.
[0080] The original Wi-Fi channel status information shows an inherent rule: there is usually no one at the beginning of sampling, there are people in the middle, and the end of the sampling period returns to the unmanned state. This phenomenon that the status of personnel is closely related to the sampling time is not conducive to the generalization of the model. Time shift refers to the translation of the Wi-Fi channel status information on the time axis with a random length, and a more diverse data set is generated through time shift. In this embodiment, a total of 4 signal shift lengths are set, namely 20, 40, 100, and 200 amplitude points, respectively. The translation lengths corresponding to the true value of the number of people are 4, 7, 16, and 31 data points, and the specific translation lengths are randomly determined. The data at the tail is moved to the head during translation. Time shift not only breaks the inherent law of personnel status and time, expands the scale of the data set, but also improves the adaptability and robustness of the improved KAN network.
[0081] Step 2.2: Invert the value of the time-shifted Wi-Fi channel state information to obtain the inverted value of the Wi-Fi channel state information.
[0082] Since the Wi-Fi channel state information after time shift has been preprocessed by antenna division in step 1, it has similar characteristics, which makes the value inversion highly interpretable. In this embodiment, the probability of value inversion is set to 50%. Because the previous text performs an exponential power operation of e on each amplitude in the signal, and the value inversion comes from the similarity of antenna division, the antenna division is for the value before the exponentiation operation, so here the inversion operation is performed on its exponent, not the specific value after the exponentiation operation. Under the premise of ensuring that the fluctuation characteristics of the signal remain unchanged, the value inversion expands the scale of the data set, which helps to improve the training of the KAN network.
[0083] Step 3: Build a modular and lightweight improved KAN network for Wi-Fi people counting. The improved KAN network includes an SFE (Signal Feature Extraction) module and a PPD (Personnel Presence Detection) module. The network architecture is as follows: Figure 1As shown. The SFE module mainly extracts signal fluctuation features for the Wi-Fi channel state information after data enhancement, and outputs the final signal fluctuation features; the PPD module mainly detects the presence of personnel based on the final signal fluctuation features extracted by the SFE module, and outputs a number of people sequence. The SFE module includes a convolution input layer, a convolution block 1, a convolution block 2, and a convolution output layer, and the PPD module includes a linear layer 1, a KAN network layer, and a linear layer 2. The Wi-Fi channel state information after data enhancement obtained in step 2 is input into the SFE module, and the Wi-Fi channel state information is channel-expanded in the convolution input layer to obtain the Wi-Fi channel state information after the convolution input layer channel expansion. Channel expansion increases the diversity of signal fluctuation features caused by personnel activities, allowing convolution blocks 1 and 2 to learn more complex signal fluctuation feature representations, extract signal fluctuation features more comprehensively, and enhance the generalization ability of the improved KAN network. The Wi-Fi channel state information after channel expansion in the convolution input layer is input into convolution blocks 1 and 2 to obtain the signal fluctuation features output by convolution block 2. Convolutional block 1 and convolutional block 2 include convolutional layer, group normalization layer, linear rectification function and maximum pooling layer respectively. The convolutional layer extracts signal fluctuation features from the Wi-Fi channel state information after channel expansion through convolution kernel; the group normalization layer is used to normalize the signal fluctuation features of each channel to enhance the stability and convergence of the improved KAN network; the linear rectification function introduces nonlinear characteristics to the improved KAN network to promote the expression ability of signal fluctuation features; the maximum pooling layer is used for downsampling, halving the size of the signal fluctuation features, retaining important features and reducing the amount of input data in subsequent layers. The signal fluctuation features output by convolutional block 2 are input into the convolutional output layer, where the channels are reduced to 1, the signal fluctuation features are compressed, and the final signal fluctuation features to be input into the PPD module are obtained. Compared with the Wi-Fi channel state information after data enhancement, the final signal fluctuation features have the advantages of more concise and prominent signal fluctuation features and easier modeling of signal fluctuation features and the number of people. The final signal fluctuation features are flattened into signal fluctuation feature vectors and input into the PPD module. The PPD module compresses the signal fluctuation feature vector through a fully connected layer to reduce the amount of data input to the KAN network layer; the KAN (Kolmogorov–Arnold Networks) network layer is used to fit the relationship between the signal fluctuation feature vector and the number of people sequence, and the high fitting accuracy of the KAN network is used to improve the accuracy of number recognition; the output of the KAN network layer passes through a fully connected layer and then outputs the final number sequence. The superposition of the KAN network layer and the linear layer reduces the data dimension that the KAN network layer needs to fit, and while utilizing the high-precision fitting capability of the KAN network layer, it improves the fitting efficiency of the KAN network layer.
[0084] A modular and lightweight improved KAN network for Wi-Fi people counting is constructed. The improved KAN network includes an SFE (Signal Feature Extraction) module and a PPD (Personnel Presence Detection) module.
[0085] The SFE module mainly extracts signal fluctuation features from the Wi-Fi channel status information after data enhancement and outputs the final signal fluctuation features; the PPD module mainly detects the presence of people based on the final signal fluctuation features extracted by the SFE module and outputs a sequence of people. The SFE module includes a convolution input layer, a convolution block 1, a convolution block 2, and a convolution output layer, and the PPD module includes a linear layer 1, a KAN network layer, and a linear layer 2.
[0086] The Wi-Fi channel state information after data enhancement obtained in step 2 is input into the SFE module, and the Wi-Fi channel state information is channel-expanded in the convolution input layer to obtain the Wi-Fi channel state information after channel expansion in the convolution input layer. The convolution input layer contains a Conv1d component with a convolution kernel size (kernel_size) of 1, a stride (stride) of 1, and a padding (padding) of 0. Channel expansion increases the diversity of signal fluctuation characteristics caused by human activities, allowing convolution blocks 1 and 2 to learn more complex signal fluctuation feature representations, extract signal fluctuation features more comprehensively, and enhance the generalization ability of the improved KAN network. The Wi-Fi channel state information after channel expansion in the convolution input layer is input into convolution blocks 1 and 2. Convolution blocks 1 and 2 include convolution layers, group normalization layers, linear rectification functions, and maximum pooling layers, respectively. The convolution layer contains a Conv1d component with a convolution kernel size (kernel_size) of 1, a padding of 1, and a stride of 1. The convolution layer uses the convolution kernel to extract the signal fluctuation features of the Wi-Fi channel state information after channel expansion. The formula is shown in (3):
[0087]
[0088] Among them, x[τ] is the input signal, h[τ] is the filter (or convolution kernel), y[t] is the output signal, and t and τ are variables.
[0089] The num_groups of group normalization is set to 2, that is, the input data will be divided into 2 groups, and the number of channels in each group (num_channels) is set to 8. The group normalization layer is used to normalize the signal fluctuation characteristics of each channel to enhance the stability and convergence of the improved KAN network. The formula is shown in (4):
[0090]
[0091] in C is the number of channels, H0 and W0 are the height and width of the input data, G is the number of groups, μ G is the mean within the group, is the variance within the group, ε is a small constant used to prevent division by zero errors, γ and β are learnable parameters used to scale and translate the normalized values, respectively, x cij is the input, y cij is the output, c, i, j are variables.
[0092] The linear rectification function introduces nonlinear characteristics to improve the KAN network and promotes the expression ability of signal fluctuation characteristics. The formula is shown in (5):
[0093] f(x0)=max(0,x0) (5)
[0094] Where x0 is the input and f(x0) is the output.
[0095] The kernel size (kernel_size) of the maximum pooling layer is 2, and the stride (stride) is 2. The maximum pooling layer is used for downsampling, which halves the size of the signal fluctuation feature, retains important features and reduces the amount of input data for subsequent layers. The formula is shown in (6):
[0096] output(N i ,C j ,l)=max a=0,......,kernel_size-1 input(N i ,C j ,stride×l+a) (6)
[0097] Where N i , C j , l represent the sample index, channel index and position index in the batch, kernel_size represents the size of the pooling window, stride represents the step size of the window sliding, input(N i ,C j , stride×l+a) represents the value of the ath input element at position l, output(N i ,C j ,l) is the output.
[0098] The signal fluctuation feature output by convolution block 2 is input into the convolution output layer, where the channel is reduced to 1 through the Conv1d component with a convolution kernel size (kernel_size) of 1, and the signal fluctuation feature is compressed to obtain the final signal fluctuation feature to be input into the PPD module. The step size is set to 1 and the padding is set to 0. Compared with the Wi-Fi channel state information after data enhancement, the final signal fluctuation feature has the characteristics of more concise and prominent signal fluctuation features and easier modeling for signal fluctuation features and the number of people.
[0099] The final signal fluctuation feature is flattened into a signal fluctuation feature vector and input into the PPD module. The PPD module compresses the signal fluctuation feature vector through a fully connected layer to reduce the amount of data input to the KAN network layer. The input length is determined by the length of the input data. In this embodiment, the office scene is 250, the home scene is 150, and the output length is unified to 38. The formula is shown in (7):
[0100] Y=WX+B (7)
[0101] Where X is the input data matrix, W is the weight matrix, B is the bias vector, and Y is the output data matrix.
[0102] The KAN (Kolmogorov–Arnold Networks) network layer is used to fit the relationship between the signal fluctuation feature vector and the number of people sequence, and the high fitting accuracy of the KAN network is used to improve the accuracy of number recognition. The input length of the KAN module is 38, the output length is 75, the number of intermediate nodes is 2, the grid is set to 5, and k is set to 3. The formula is shown in (8):
[0103]
[0104] where φ q,p is a continuous function of one variable, Φ q is another univariate function, x p is the input, f(x1,x2,......,x n ) is the output, n is the number of input variables, and q and p are variables.
[0105] The output of the KAN network layer passes through a fully connected layer and then outputs the final number sequence. Its input length is 75, and the output length is determined by the required result. In this embodiment, the length is 151 for office scenes and 450 for home scenes. The superposition of the KAN network layer and the linear layer reduces the data dimension that the KAN network layer needs to fit, while utilizing the high-precision fitting capability of the KAN network layer and improving the fitting efficiency of the KAN network layer. The information of each layer of the network is shown in the following table.
[0106]
[0107]
[0108] Step 4: Use the Wi-Fi channel state information dataset after data enhancement in step 2 to train the improved KAN network to obtain a trained KAN network. This embodiment uses Pytorch as a deep learning environment and uses the office scene A and home scene data in the first Wi-Fi perception competition dataset for training. For the optimizer, this paper uses SGD (stochastic gradient descent) to optimize the parameters of the office model and Adam to optimize the parameters of the home model. In terms of the loss function, this paper uses MSE (mean square error) as the loss function. For different scenarios, this paper conducts different training times. For the office scene, this paper conducts 1300 trainings, with a batchsize of 26, an existing solution learning rate of 0.008, and a learning rate of 0.06 for the model in this paper; for the home scene, this paper conducts 90 trainings, with a batchsize of 1, an existing solution learning rate of 0.0005, and a learning rate of 0.0001 for the model in this paper. Use the Wi-Fi channel state information dataset after data enhancement in step 2 to train the improved KAN network for personnel counting, and stop training before the network overfits. Before inputting the data set of Wi-Fi channel status information after data enhancement into the neural network, this embodiment has made a difference between all amplitude points in each data and the amplitude average value of the data, so that each data fluctuates with 0 as the reference value. This operation allows the network to focus on the fluctuation of the signal rather than the amplitude. MSE is used as the loss function in training, and its formula is shown in formula (9). The nonlinear relationship between the current Wi-Fi channel status information and its corresponding number of people sequence label is constructed through the trained improved KAN network.
[0109] Using MSE as the loss function, its formula is shown in formula (9):
[0110]
[0111] Where N is the number of samples, y k is the actual value, is the predicted value, MSE is the output value, and k is the variable.
[0112] Step 5: Perform data preprocessing and data enhancement on the Wi-Fi channel status information that needs to be detected through steps 1 and 2, and use the improved KAN network trained in step 4 to predict Wi-Fi personnel counting. On the premise of improving the accuracy of personnel recognition, the degree of denoising and interference removal is improved, the network size is reduced, and the robustness of network cross-scenario recognition is enhanced. The final experimental results are as follows:
[0113]
[0114]
[0115] This embodiment compares DNN, CNN, and ResNet networks as existing solutions. Compared with existing solutions, the method disclosed in this embodiment has the advantages of fewer parameters, higher accuracy, and cross-scenario recognition. This embodiment only requires about one-tenth of the parameters of existing solutions to achieve the highest recognition accuracy, which can increase the accuracy by up to 8.6% compared with existing solutions.
[0116] The modular lightweight Wi-Fi people counting method based on the improved KAN network disclosed in this embodiment uses data preprocessing techniques such as fluctuation filtering to better reduce the noise of the data, and uses data enhancement techniques such as numerical inversion to expand the data set on the basis of fully retaining the fluctuation characteristics of the original data, and uses a modular lightweight improved KAN network to model the data relationship with a very small number of parameters. Under the premise of improving the accuracy of personnel recognition, the present invention improves the degree of denoising and interference removal, reduces the network size, and enhances the robustness of network cross-scenario recognition.
[0117] The specific description above further illustrates the purpose, technical solutions and beneficial effects of the invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A lightweight cross-scenario Wi-Fi people counting method based on an improved KAN network, characterized by: The following steps are included: Step 1: Performing data preprocessing of the original Wi-Fi channel state information in four stages, namely, antenna division, frequency filtering, fluctuation filtering, and variance filtering, to obtain preprocessed Wi-Fi channel state information data; Step 2: Perform data enhancement on the Wi-Fi channel state information preprocessed in step 1 by time shifting and value inversion to obtain the data-enhanced Wi-Fi channel state information, which is used as a data set for training the improved KAN network in the subsequent step 4; Step 3: construct a modular and lightweight improved KAN network for Wi-Fi personnel counting, wherein the improved KAN network includes an SFE module and a PPD module; the SFE module mainly extracts signal fluctuation features from the Wi-Fi channel state information after data enhancement, and outputs the final signal fluctuation features; The PPD module mainly detects the presence of people based on the final signal fluctuation characteristics extracted by the SFE module and outputs a sequence of people; the SFE module includes a convolution input layer, a convolution block 1, and a convolution block 2. Convolution output layer. The PPD module includes linear layer 1, KAN network layer, and linear layer 2. The enhanced Wi-Fi channel status information obtained in step 2 is input into the SFE module, and the Wi-Fi channel status information is expanded in the convolution input layer to obtain the Wi-Fi channel status information after channel expansion in the convolution input layer. Channel expansion increases the diversity of signal fluctuation characteristics caused by human activities, allowing convolution blocks 1 and 2 to learn more complex signal fluctuation feature representations, extract signal fluctuation features more comprehensively, and enhance Improve the generalization ability of the KAN network; input the Wi-Fi channel state information after channel expansion in the convolution input layer into convolution block 1 and convolution block 2 to obtain the signal fluctuation characteristics output by convolution block 2; convolution block 1 and convolution block 2 include a convolution layer, a group normalization layer, a linear rectification function, and a maximum pooling layer respectively; the convolution layer extracts the signal fluctuation characteristics of the Wi-Fi channel state information after channel expansion through the convolution kernel; the group normalization layer is used to normalize the signal fluctuation characteristics of each channel to enhance the stability and convergence of the improved KAN network; The linear rectification function introduces nonlinear characteristics to improve the KAN network and promote the expression ability of signal fluctuation characteristics; the maximum pooling layer is used for downsampling, which reduces the size of the signal fluctuation characteristics by half, retains important features and reduces the amount of input data in subsequent layers; the signal fluctuation characteristics output by convolution block 2 are input to the convolution output layer, where the channels are reduced to 1, the signal fluctuation characteristics are compressed, and the final signal fluctuation characteristics to be input to the PPD module are obtained; Compared with the Wi-Fi channel status information after data enhancement, the final signal fluctuation feature has the characteristics of more concise and prominent signal fluctuation features and easier modeling for signal fluctuation features and the number of people; the final signal fluctuation feature is flattened into a signal fluctuation feature vector and input into the PPD module; the PPD module compresses the signal fluctuation feature vector through a fully connected layer to reduce the amount of data input to the KAN network layer; the KAN network layer is used to fit the relationship between the signal fluctuation feature vector and the number of people sequence, and the advantage of the high fitting accuracy of the KAN network is used to improve the accuracy of number recognition; the output of the KAN network layer passes through a fully connected layer and then outputs the final number sequence; the superposition of the KAN network layer and the linear layer reduces the data dimension that the KAN network layer needs to fit, while utilizing the high-precision fitting capability of the KAN network layer, the fitting efficiency of the KAN network layer is improved; Constructing a modular and lightweight improved KAN network for Wi-Fi people counting, wherein the improved KAN network includes an SFE module and a PPD module; The SFE module mainly extracts signal fluctuation features from the Wi-Fi channel status information after data enhancement and outputs the final signal fluctuation features; The PPD module mainly performs personnel presence detection based on the final signal fluctuation characteristics extracted by the SFE module and outputs a number sequence; the SFE module includes a convolution input layer, a convolution block 1, a convolution block 2, and a convolution output layer, and the PPD module includes a linear layer 1, a KAN network layer, and a linear layer 2; The Wi-Fi channel state information after data enhancement obtained in step 2 is input into the SFE module, and the Wi-Fi channel state information is channel-expanded in the convolution input layer to obtain the Wi-Fi channel state information after channel expansion in the convolution input layer; channel expansion increases the diversity of signal fluctuation characteristics caused by human activities, allowing convolution blocks 1 and 2 to learn more complex signal fluctuation feature representations, extract signal fluctuation features more comprehensively, and enhance the generalization ability of the improved KAN network; the Wi-Fi channel state information after channel expansion in the convolution input layer is input into convolution blocks 1 and 2, and convolution blocks 1 and 2 respectively include convolution layers, group normalization layers, linear rectification functions, and maximum pooling layers; the convolution layer extracts signal fluctuation features from the Wi-Fi channel state information after channel expansion through convolution kernels, as shown in formula (3): Where x[τ] is the input signal, h[τ] is the filter (or convolution kernel), y[t] is the output signal, and t and τ are variables; The group normalization layer is used to normalize the signal fluctuation characteristics of each channel to enhance the stability and convergence of the improved KAN network. The formula is shown in (4): in C is the number of channels, H0 and W0 are the height and width of the input data, G is the number of groups, μ G is the mean within the group, is the variance within the group, ε is a small constant used to prevent division by zero errors, γ and β are learnable parameters used to scale and translate the normalized values, respectively, x cij is the input, y cij is the output, c, i, j are variables; The linear rectification function introduces nonlinear characteristics to improve the KAN network and promotes the expression ability of signal fluctuation characteristics. The formula is shown in (5): f(x0)=max(0,x0) (5) Where x0 is the input and f(x0) is the output; The maximum pooling layer is used for downsampling, which reduces the size of the signal fluctuation features by half, retains important features and reduces the amount of input data for subsequent layers. The formula is shown in (6): output(N i ,C j ,l)=max a=0,......,kernel_size-1 input(N i ,C j ,stride×l+a) (6) Where N i , C j , l represent the sample index, channel index and position index in the batch, kernel_size represents the size of the pooling window, stride represents the step size of the window sliding, input(N i ,C j , stride×l+a) represents the value of the ath input element at position l, output(N i ,C j ,l) is the output; The signal fluctuation feature output by the convolution block 2 is input into the convolution output layer, where the channel is reduced to 1, the signal fluctuation feature is compressed, and the final signal fluctuation feature to be input into the PPD module is obtained; compared with the Wi-Fi channel state information after data enhancement, the final signal fluctuation feature has the characteristics of being more concise and prominent, and easier to model the signal fluctuation feature and the number of people; The final signal fluctuation feature is flattened into a signal fluctuation feature vector and input into the PPD module. The PPD module compresses the signal fluctuation feature vector through a fully connected layer to reduce the amount of data input to the KAN network layer. The formula is shown in (7): Y=WX+B (7) Where X is the input data matrix, W is the weight matrix, B is the bias vector, and Y is the output data matrix; The KAN network layer is used to fit the relationship between the signal fluctuation feature vector and the number of people sequence, and the high fitting accuracy of the KAN network is used to improve the accuracy of number recognition. The formula is shown in (8): where φ q,p is a continuous function of one variable, Φ q is another univariate function, x p is the input, f(x1,x2,......,x n ) is the output, n is the number of input variables, q and p are variables; The output of the KAN network layer passes through a fully connected layer to output the final number sequence; the superposition of the KAN network layer and the linear layer reduces the data dimension that the KAN network layer needs to fit, while utilizing the high-precision fitting capability of the KAN network layer and improving the fitting efficiency of the KAN network layer; Step 4: Use the Wi-Fi channel state information dataset after data enhancement in step 2 to train the improved KAN network to obtain a trained KAN network; configure the parameters required for network training for the improved KAN network for people counting constructed in step 3, set the learning rate, batch size, optimization method, and number of iterations; Use the Wi-Fi channel state information dataset after data enhancement in step 2 to train the improved KAN network for people counting, and use the test set data to evaluate its recognition accuracy, and stop training before the network overfits; Use MSE as the loss function during training; Construct a nonlinear relationship between the current Wi-Fi channel state information and its corresponding number of people sequence label through the trained improved KAN network; Step 5: Perform data preprocessing and data enhancement on the Wi-Fi channel status information that needs to detect the number of people through steps 1 and 2, and use the improved KAN network trained in step 4 to count Wi-Fi people. On the premise of improving the accuracy of personnel recognition, the degree of denoising and interference removal is improved, the network size is reduced, and the robustness of network cross-scenario recognition is enhanced.
2. The lightweight cross-scenario Wi-Fi people counting method based on the improved KAN network as claimed in claim 1 is characterized by: The implementation method of step one is: Step 1.1, performing antenna division on the original Wi-Fi channel state information to eliminate the impulse noise in the signal, and obtaining the Wi-Fi channel state information after antenna division; Step 1.1.1, sum and average the amplitudes of the Wi-Fi channel state information of the same antenna and different carriers at the same time, so that each sampling point of each antenna corresponds to an amplitude; Step 1.1.2: For different antennas, divide the antennas according to formula (1); antenna division refers to dividing the channel state information of different antennas of the same Wi-Fi receiver, and the formula is as follows: CSI ratio is the result of dividing the antennas, CSI i With CSI j For different links; the signal obtained by dividing antenna a by antenna b and the signal obtained by dividing antenna b by antenna a are highly similar, and the value in step 2.2 is taken to utilize this feature; Step 1.1.3, by comparing the amplitude fluctuations of each channel state information after antenna division, select the antenna division group with the least impulse noise after division, and use the data after the division of this antenna division group as the Wi-Fi channel state information after antenna division; Step 1.2, frequency filtering is performed on the Wi-Fi channel state information after the antenna division, and the frequency filtering is to select a Butterworth low-pass filter to filter the Wi-Fi channel state information after the antenna division; The Butterworth low-pass filter has the characteristics of flat amplitude-frequency response and no phase distortion. The Butterworth low-pass filter provides the maximum passband gain for the Wi-Fi channel status information after antenna division below the cutoff frequency, and provides the maximum attenuation for the Wi-Fi channel status information after antenna division above the cutoff frequency. The cutoff frequency refers to the frequency at which the filter starts to attenuate the signal. The Butterworth low-pass filter removes high-frequency noise while retaining low-frequency human activity signals to obtain the Wi-Fi channel status information after frequency filtering. The Butterworth low-pass filter formula is as follows: Where H(ω) is the transfer function of the Butterworth low-pass filter, ω is the frequency of the input signal, and ω c is the cut-off frequency, z is the filter order; Step 1.3, performing fluctuation filtering on the Wi-Fi channel state information after frequency filtering to obtain the Wi-Fi channel state information after fluctuation filtering; Fluctuation filtering calculates the ratio of the number of points with violent fluctuations to the number of points with slow fluctuations, and performs different fluctuation filtering operations on the signal according to the ratio; The specific implementation method of fluctuation filtering is as follows: the degree of fluctuation of each point is determined based on the absolute value of the difference between the point and the overall average value of the signal; if the difference exceeds the set threshold, it is judged as a violent fluctuation, otherwise it is a slow fluctuation; During the fluctuation filtering process, the fluctuation degree of each point will be judged and classified and counted; when the number of points with slow fluctuations reaches the preset value, it will be judged whether the number of points with violent fluctuations exceeds the set threshold; If the threshold is exceeded, the signal is likely to be a long-term fluctuation signal caused by human activities and will be retained as is; If the threshold is not exceeded, the signal is likely to be a short-term fluctuation signal caused by environmental interference, and the value of each point will be replaced by the average value of the overall signal. After that, the number of points with mild fluctuations and violent fluctuations will be reset to zero, and the above fluctuation filtering operation will be repeated until the end of the signal, thereby filtering out the short-term signal fluctuations caused by environmental interference and retaining the long-term signal fluctuations caused by human activities, and obtaining the Wi-Fi channel status information after fluctuation filtering. Step 1.4, performing variance filtering on the Wi-Fi channel state information after the fluctuation filtering to obtain the Wi-Fi channel state information after the variance filtering; The specific implementation method of variance filtering is as follows: variance filtering distinguishes two typical fluctuation situations of the original Wi-Fi channel state information by setting a variance threshold. The first typical fluctuation situation is that the signal fluctuates slowly when there are people and fluctuates violently when there are no people. The second typical fluctuation situation is that the signal fluctuates violently when there are people and fluctuates slowly when there are no people. If the overall variance of the signal exceeds the threshold, it is judged as situation one. If the overall variance of the signal does not exceed the threshold, it is judged as situation two. For situation two, no additional data processing is performed. For situation one, several data points are taken as a processing unit. If the variance of the processing unit exceeds the set unit threshold, all data points in the unit are replaced by the mean of the overall signal. If it does not exceed the threshold, it is retained as it is. The violent fluctuation signal in situation one when there is no one is converted into a signal that hardly fluctuates by variance filtering, so that it is consistent with the fluctuation law of situation two, that is, the Wi-Fi channel state information after variance filtering is obtained. The Wi-Fi channel state information after variance filtering is the Wi-Fi channel state information after preprocessing in step one.
3. The lightweight cross-scenario Wi-Fi people counting method based on the improved KAN network as claimed in claim 2 is characterized by: The implementation method of step 2 is: Step 2.1, time-shifting the pre-processed Wi-Fi channel state information to obtain the time-shifted Wi-Fi channel state information; Time shift refers to shifting the Wi-Fi channel status information by a random length on the time axis, generating a more diverse data set through time shift; Step 2.2, inverting the value of the time-shifted Wi-Fi channel state information to obtain the inverted value of the Wi-Fi channel state information; The time-shifted Wi-Fi channel state information has been preprocessed by antenna division in step 1, so it has similar characteristics, which makes the numerical inversion highly interpretable; numerical inversion expands the scale of the data set while ensuring that the fluctuation characteristics of the signal remain unchanged, which helps to improve the training of the KAN network.
4. The lightweight cross-scenario Wi-Fi people counting method based on the improved KAN network as claimed in claim 3 is characterized by: In step four, Using MSE as the loss function, its formula is shown in formula (9): Where N is the number of samples, y k is the actual value, is the predicted value, MSE is the output value, and k is the variable.