CN108805194B - Handwriting identification method and system based on WIFI channel state information - Google Patents

Handwriting identification method and system based on WIFI channel state information Download PDF

Info

Publication number
CN108805194B
CN108805194B CN201810564868.2A CN201810564868A CN108805194B CN 108805194 B CN108805194 B CN 108805194B CN 201810564868 A CN201810564868 A CN 201810564868A CN 108805194 B CN108805194 B CN 108805194B
Authority
CN
China
Prior art keywords
state information
channel state
signal
csi
classifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810564868.2A
Other languages
Chinese (zh)
Other versions
CN108805194A (en
Inventor
汪沄
刘宁
戚正伟
管海兵
陈勇彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiaotong University
Original Assignee
Shanghai Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiaotong University filed Critical Shanghai Jiaotong University
Priority to CN201810564868.2A priority Critical patent/CN108805194B/en
Publication of CN108805194A publication Critical patent/CN108805194A/en
Application granted granted Critical
Publication of CN108805194B publication Critical patent/CN108805194B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Character Discrimination (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a handwriting recognition method and a handwriting recognition system based on WIFI channel state information, wherein the method comprises the following steps of: step S1, acquiring channel state information by using a data acquisition module, processing the acquired signal state information by using a motion interval detection and segmentation method, and training a classifier by using a K nearest neighbor algorithm and a dynamic time warping method to obtain a trained classifier; and step S2, acquiring acquired channel state information by using the data acquisition module, and identifying the acquired channel state information by using a trained classifier to obtain an identification result.

Description

Handwriting identification method and system based on WIFI channel state information
Technical Field
The invention relates to the technical field of handwriting recognition, in particular to a handwriting recognition method and system based on WIFI channel state information.
Background
With the development of the internet of things technology, the behavior recognition technology gradually attracts people's attention, and as a sub-problem in the field of behavior recognition, the handwriting recognition technology is extensively and deeply researched. Handwriting recognition is the most basic natural behavior recognition means and mainly comprises an online handwriting recognition technology and an offline handwriting recognition technology.
Due to the rise of the concept of smart home and the wide use of mobile equipment, the wireless router based on the WIFI technology enters into thousands of households, and WIFI signals are not only used for information communication, but also can be used for behavior identification. The WIFI signal has the advantages that extra special devices do not need to be built, and the system can be built by using common routers in daily life, computers, smart phones and other devices with signal transmission functions. Because unnecessary equipment does not need to be carried, the influence on the user is reduced, and the application mode is more convenient.
Since 2009, the IEEE 802.11n protocol adds Channel State Information (CSI) to the physical layer, and since the physical layer Information cannot be read by the upper layer initially, the application of CSI is initially limited to the communication field until halferin et al issued linux-80211n-csitool, a modification driver for an Intel 5300 wireless network card to make it possible to apply CSI to behaviors. Since then, many researchers at home and abroad start research on CSI-based wireless sensing technology, such as respiration detection, indoor positioning, gesture recognition, and the like, but at present, the research is limited to a research stage, and there is no specific implementation scheme.
Disclosure of Invention
In order to overcome the defects in the prior art, one of the objects of the present invention is to provide a handwriting recognition method and system based on WIFI channel state information, which realizes handwritten letter recognition in a WIFI environment by using channel state information of a wireless signal, overcomes the limitation that a user needs to additionally carry special equipment in the conventional behavior recognition, only needs to use the existing common consumer-grade WIFI equipment, and reduces the additional equipment overhead.
Another objective of the present invention is to provide a handwriting recognition method and system based on WIFI channel state information, which obtains higher stability and precision, has better distinctiveness, and improves recognition rate by detecting and segmenting the motion interval based on the time-frequency analysis technology to obtain stability characteristics and short-time energy.
In order to achieve the above and other objects, the present invention provides a handwriting recognition method based on WIFI channel state information, comprising the following steps:
step S1, acquiring channel state information by using a data acquisition module, processing the acquired signal state information by using a motion interval detection and segmentation method, and training a classifier by using a K nearest neighbor algorithm and a dynamic time warping method to obtain a trained classifier;
and step S2, acquiring the acquired channel state information by using the data acquisition module, and identifying the acquired channel state information by using a trained classifier to obtain an identification result.
Preferably, the step S1 further includes:
acquiring acquired channel state information by using a data acquisition module to acquire a CSI signal;
detecting a motion interval and a static interval from the CSI signal, positioning the start time and the end time of each letter, and dividing the signal;
thirdly, acquiring characteristics with distinctiveness and stability from the divided CSI signals to serve as characteristic values of classification and identification;
step four, using the collected data as a training set, and adopting a K nearest neighbor algorithm and a dynamic time warping method to train a classifier;
and step five, repeating the step one to the step four to finally obtain the trained classifier.
Preferably, before the second step, the method further comprises the following steps:
and preprocessing the acquired CSI signal to remove noise in the CSI signal.
Preferably, the preprocessing step is to preprocess the CSI signal by using a principal component analysis-based method, and to reserve the signal components with high correlation, which are generated due to the motion of the hand.
Preferably, the pre-treating step further comprises:
representing the CSI data by using a matrix X with one dimension of Nxa, wherein N is the window size of principal component analysis processing data, a is the number of subcarriers which can be obtained in each group of CSI data, and calculating the offset generated by a static path for the ith subcarrier data Xi;
calculating a correlation matrix cov (X, X) for the a X a dimension;
calculating eigenvalues and eigenvectors of the correlation matrix cov (X, X), and sorting the features according to the magnitude of the eigenvalues;
principal components are selected and feature vectors are generated.
Preferably, in the second step, a rectangular window is adopted, and a curve calculated by using the STE method is used to distinguish the moving and static intervals by judging whether obvious fluctuation occurs.
Preferably, step three further comprises:
step S103a, selecting a proper window function size;
step S103b, obtaining a segment of signal by using the window function;
step S103c, adding zero padding to each fourier interval to expand it to a predetermined size;
step S103d, calculating fourier transform of the partial signal;
step S103e, the window is shifted to the right on the signal.
Step S103f, return to step S103c until the window reaches the end of the signal.
Step S103g, sorting the frequencies in each Fourier interval from high to low according to energy, selecting a plurality of frequencies, and setting the rest frequencies as 0;
in step S103h, after normalization processing, smoothing processing is performed on the spectrogram using a gaussian window.
Preferably, step four further comprises:
constructing a matrix with the size of M multiplied by N, and searching a path to ensure that the sum of regular path distances obtained by the path is shortest;
based on the DTW distance, using a K nearest neighbor algorithm classifier;
the K nearest neighbor algorithm classifier calculates the distance between the time sequences, searches the first K shortest distances, and determines the category of the K nearest neighbor algorithm classifier through the classification of the first K time sequences.
In order to achieve the above object, the present invention further provides a handwriting recognition system based on WIFI channel state information, including:
the training unit is used for acquiring channel state information by using the data acquisition module, processing the acquired signal state information by using a motion interval detection and segmentation method, and training a classifier by adopting a K nearest neighbor algorithm and a dynamic time warping method to obtain a trained classifier;
and the identification unit is used for acquiring the acquired channel state information by using the data acquisition module, and identifying the acquired channel state information by using a trained classifier to obtain an identification result.
Preferably, the training unit comprises:
the channel state information acquisition unit acquires and acquires channel state information by using the data acquisition module to acquire a CSI signal;
the positioning and dividing unit is used for detecting a motion interval and a static interval from the CSI signal, positioning the start time and the end time of each letter and dividing the signal;
the characteristic extraction unit is used for acquiring characteristics with distinctiveness and stability from the divided CSI signals to be used as characteristic values of classification and identification;
the classification training unit is used for training a classifier by using a K nearest neighbor algorithm and a dynamic time warping method by taking the collected data as a training set;
and repeating the training unit, repeating the modules and finally obtaining the trained classifier.
Compared with the prior art, the handwriting recognition method and system based on the WIFI signal state information realize handwriting letter recognition under the WIFI environment by utilizing the channel state information of the wireless signal, overcome the limitation that a user needs to additionally carry special equipment in the traditional behavior recognition, reduce the additional equipment overhead by using the existing common consumption-level WIFI equipment, and provide good conditions for the universal use of the WIFI; in addition, the method adopts the motion interval detection segmentation based on the time-frequency analysis technology to obtain the stability characteristics and the short-time energy, obtains higher stability and precision, has higher distinctiveness and improves the recognition rate.
Drawings
Fig. 1 is a flowchart illustrating steps of a handwriting recognition method based on WIFI channel state information according to the present invention;
FIG. 2 is a detailed flowchart of step S1 according to an embodiment of the present invention;
FIG. 3 is a detailed flowchart of step S101 according to an embodiment of the present invention;
FIG. 4 is a STE graph according to an embodiment of the present invention;
FIG. 5 is a detailed flowchart of step S103 according to an embodiment of the present invention;
FIG. 6 is a detailed flowchart of step S104 according to an embodiment of the present invention;
fig. 7 is a system architecture diagram of a handwriting recognition system based on WIFI channel state information according to the present invention;
FIG. 8 is a detailed block diagram of the training unit 80 according to an embodiment of the present invention;
FIG. 9 is a diagram of a system architecture according to an embodiment of the present invention.
Detailed Description
Other advantages and capabilities of the present invention will be readily apparent to those skilled in the art from the present disclosure by describing the embodiments of the present invention with specific embodiments thereof in conjunction with the accompanying drawings. The invention is capable of other and different embodiments and its several details are capable of modification in various other respects, all without departing from the spirit and scope of the present invention.
Fig. 1 is a flowchart illustrating steps of a handwriting recognition method based on WIFI channel state information according to the present invention. As shown in fig. 1, the handwriting recognition method based on WIFI channel state information of the present invention includes the following steps:
and step S1, acquiring channel state information by using the data acquisition module, processing the acquired signal state information by using a motion interval detection and segmentation method, and performing classifier training by using a K-nearest neighbor algorithm and a DTW (dynamic time warping) method to obtain a trained classifier.
Specifically, as shown in fig. 2, step S1 further includes:
step S100, acquiring the collected channel state information (CSI signal) by using the data acquisition module.
In a specific embodiment of the present invention, the data acquisition module is implemented by using a common router and a notebook computer, and the router and the notebook computer are used as sending and receiving devices in the data acquisition module, and the WIFI channel state information is stably acquired by using corresponding network cards and drivers.
And step S101, preprocessing the acquired CSI signal to remove noise in the CSI signal.
The data acquisition module obtains data containing a lot of noise due to the state change inside the device, such as the change of transmission power, and therefore needs to be preprocessed to remove the noise. In the embodiment of the invention, data with high quality can be selected according to the difference between the antennas, and the data is preprocessed by using a principal component analysis-based method, so that signal components which are high in correlation and generated due to hand movement are reserved. Specifically, as shown in fig. 3, the preprocessing step of step S101 further includes:
in step S101a, CSI data is represented by a matrix X with one dimension of N × 30, where N is a window size of PCA (Principal component analysis) processing data, and 30 is the number of subcarriers that can be obtained in each set of CSI data. For the ith subcarrier data Xi, the offset due to the static path, i.e. the average of the ith subcarrier in the window, is calculated
Figure BDA0001684136150000061
Then give XiIs subtracted from each of the values in (1)
Figure BDA0001684136150000062
Step S101b, calculate a 30 × 30 dimensional correlation matrix cov (X, X), which is expressed as follows:
cov(X,X)=(ci,j|ci,j=cov(Xi,Xj))
Figure BDA0001684136150000063
wherein, Xi,k,Xj,kRespectively, the energy of the ith subcarrier of the kth PCA window and the energy of the jth subcarrier of the kth PCA window.
Step S101c, the eigenvalue and eigenvector of the correlation matrix cov (X, X) are calculated, and the features are sorted according to the magnitude of the eigenvalue. The more prominent the feature, the larger the value of the feature, and the more likely it is to be caused by a change in the surrounding environment.
In step S101d, principal components are selected and feature vectors are generated. Specifically, the first principal component is selected as the noise-reduced CSI data, so that a representative signal can be retained and noise can be removed.
Step S102, detecting a motion interval and a static interval from the CSI signal, positioning the start time and the end time of each letter, and dividing the signal.
When detecting handwritten numbers and letters, signals of a handwritten part need to be distinguished from CSI data, starting time and ending time are distinguished from a CSI time sequence, and good results can be obtained in subsequent identification only through correct detection and segmentation. In the specific embodiment of the present invention, the following formula is adopted:
E(n)=∑[csi(m)w(n-m)]2
where E (N) represents the short time energy at point N, w (N) represents the window function, and N is the size of the window. In the invention, a rectangular window with the size of 201 is adopted, a curve calculated by using an STE (Short Time Energy) method is adopted, and a motion interval and a static interval can be distinguished by judging whether obvious fluctuation is generated or not, wherein the STE curve refers to the graph shown in figure 4.
And step S103, acquiring characteristics with distinctiveness and stability from the divided CSI signals as characteristic values for classification and identification.
Since the CSI waveform obtained by only preprocessing has the characteristics of too many sampling points, signal mixing, waveform instability, and the like, and cannot be directly used as a feature, the invention adopts time-frequency analysis in the stability feature extraction, specifically, as shown in fig. 5, step 103 further includes:
step S103a, selecting a proper window function size, wherein the sliding window size selected by the invention is 128, and because the window function is smaller, the signal in the window function can be considered as a stable signal;
step S103b, obtaining a segment of signal by using the window function;
step S103c, in order to obtain better frequency resolution, adding zero padding to each Fourier interval, and expanding the interval to 1024 sizes;
step S103d, calculating fourier transform of the partial signal;
step S103e, the window is shifted to the right on the signal.
Step S103f, return to step S103c until the window reaches the end of the signal.
Step S103g, sorting the frequencies in each fourier interval from high to low according to energy, selecting the first 40 values, and setting the rest to 0.
In step S103h, after normalization processing, the spectrogram is smoothed using a gaussian window of 0.7.
And step S104, taking the collected data as a training set, and training a classifier by adopting a K neighbor algorithm and a DTW (Dynamic Time Warping) method.
For the time-frequency analysis method, the extracted features are time sequences, which need to be classified, the invention uses Dynamic Time Warping (DTW) to calculate the distance between the time sequences, as shown in FIG. 6, and the specific classification training steps are as follows:
step S104a, constructing a matrix with the size of M multiplied by N, and searching a path to ensure that the sum of regular path distances obtained by the path is the shortest;
step S104b, based on the DTW distance, using a K nearest neighbor algorithm classifier;
step S104c, the K nearest neighbor algorithm classifier calculates the distance between the time series, finds the first K shortest distances, and determines the self category through the first K time series classification.
And S105, repeating the steps S100-S104, and finally obtaining the trained classifier.
Step S2, acquiring the acquired channel state information (CSI signal) by using the data acquisition module, and identifying the acquired CSI signal by using the trained classifier to obtain an identification result. Preferably, since the obtained data contains a lot of noise due to the state change inside the data acquisition module device, such as the change of the transmission power, in step S2, the CSI signal obtained by acquisition may be preprocessed to remove the noise in the CSI signal, and then recognized by using a trained classifier, so as to obtain the recognition result. The specific preprocessing process is as described above and will not be described herein.
Fig. 7 is a system architecture diagram of a handwriting recognition system based on WIFI channel state information according to the present invention. As shown in fig. 7, a handwriting recognition system based on WIFI channel state information of the present invention includes:
and a training unit 70, configured to acquire channel state information by using the data acquisition module, process the acquired signal state information by using a motion interval detection and segmentation method, and perform classifier training by using a K-nearest neighbor algorithm and a DTW (dynamic time warping) method to obtain a trained classifier.
Specifically, as shown in fig. 8, the training unit 70 further includes:
a channel state information collecting unit 701, configured to obtain and collect channel state information (CSI signal) by using the data obtaining module.
In a specific embodiment of the present invention, the data acquisition module is implemented by using a common router and a notebook computer, and the router and the notebook computer are used as sending and receiving devices in the data acquisition module, and the WIFI channel state information is stably acquired by using corresponding network cards and drivers.
And a preprocessing unit 702, configured to preprocess the acquired CSI signal to remove noise in the CSI signal.
The data acquisition module obtains data containing a lot of noise due to the state change inside the device, such as the change of transmission power, and therefore needs to be preprocessed to remove the noise. In the embodiment of the invention, data with high quality can be selected according to the difference between the antennas, and the data is preprocessed by using a principal component analysis-based method, so that signal components which are high in correlation and generated due to hand movement are reserved. Specifically, the preprocessing process of the preprocessing unit 702 is as follows:
CSI data is represented by a matrix X having one dimension of N × 30, where N is a window size of PCA (Principal component analysis) processing data, and 30 is the number of subcarriers that can be acquired in each set of CSI data. For the ith subcarrier data Xi, the offset due to the static path, i.e. the average of the ith subcarrier in the window, is calculated
Figure BDA0001684136150000091
Then give XiIs subtracted from each of the values in (1)
Figure BDA0001684136150000092
Calculate the correlation matrix cov (X, X) in 30X 30 dimensions, as follows:
cov(X,X)=(ci,j|ci,j=cov(Xi,Xj))
Figure BDA0001684136150000093
eigenvalues and eigenvectors of the correlation matrix cov (X, X) are computed, and the features are sorted by eigenvalue size. The more prominent the feature, the larger the value of the feature, and the more likely it is to be caused by a change in the surrounding environment.
Principal components are selected and feature vectors are generated. Specifically, the first principal component is selected as the noise-reduced CSI data, so that a representative signal can be retained and noise can be removed.
A positioning and dividing unit 703 is used for detecting a motion interval and a stationary interval from the CSI signal, and for positioning the start and end times of each letter to divide the signal.
When detecting handwritten numbers and letters, signals of a handwritten part need to be distinguished from CSI data, starting time and ending time are distinguished from a CSI time sequence, and good results can be obtained in subsequent identification only through correct detection and segmentation. In the specific embodiment of the present invention, the following formula is adopted:
E(n)=∑[csi(m)w(n-m)]2
where E (N) represents the short time energy at point N, w (N) represents the window function, and N is the size of the window. In the invention, a rectangular window with the size of 201 is adopted, and a curve calculated by adopting an STE method can distinguish a motion interval from a static interval by judging whether obvious fluctuation is generated or not.
And a feature extraction unit 704, configured to obtain features with distinctiveness and stability from the segmented CSI signal, as feature values for classification and identification.
Because the CSI waveform obtained only through preprocessing has the characteristics of excessive sampling points, signal mixing, waveform instability and the like, and cannot be directly used as the characteristic, the method adopts time-frequency analysis in the stability characteristic extraction. The specific implementation steps of the feature extraction unit 704 are as follows:
step 1, selecting a proper window function size, wherein the size of a sliding window selected by the invention is 128, and because the window function is small, a signal in the window function can be considered as a stable signal;
step 2, obtaining a section of signal by using the window function;
step 3, in order to obtain better frequency resolution, adding zero padding to each Fourier interval, and expanding the interval to 1024 sizes;
step 4, calculating Fourier transform of the partial signal;
step 5, the window is shifted to the right on the signal.
And 6, returning to the step 3 until the window reaches the end of the signal.
And 7, sorting the frequencies in each Fourier interval from high to low according to energy, selecting the first 40 values, and setting the rest values as 0.
And 8, after normalization processing, smoothing the spectrogram by using a 0.7 Gaussian window.
The classification training unit 705 is configured to use the collected data as a training set, and perform classifier training by using a K-nearest neighbor algorithm and a DTW (dynamic time warping) method.
For the time series extracted by the time-frequency analysis method, which needs to be classified, the invention uses Dynamic Time Warping (DTW) to calculate the distance between time series, and the classification training process of the classification training unit 805 is as follows:
constructing a matrix with the size of M multiplied by N, and searching a path to ensure that the sum of regular path distances obtained by the path is shortest;
based on the DTW distance, using a K nearest neighbor algorithm classifier;
the K nearest neighbor algorithm classifier calculates the distance between the time sequences, searches the first K shortest distances, and determines the classification of the K nearest neighbors by classifying the first K time sequences.
And repeating the training unit 706, repeating the above modules, and finally obtaining the trained classifier.
The identifying unit 71 is configured to acquire acquired channel state information (CSI signal) by using the data acquisition module, and identify the acquired CSI signal by using a trained classifier to obtain an identification result. Preferably, because the obtained data contains a lot of noise due to the state change inside the data acquisition module device, such as the change of the transmission power, the acquired CSI signal may be preprocessed to remove the noise in the CSI signal, and then recognized by using a trained classifier, so as to obtain a recognition result. The specific preprocessing process is as described above and will not be described herein.
The invention will be further illustrated by the following specific examples: in this embodiment, two devices, respectively, a signal transmitting device and a signal receiving device need to be used, as shown in fig. 9, where one router and one notebook are used. For the router, no modification is needed, and for the notebook computer, an Intel 5300 wireless network card is used and a corresponding wireless network card driver linux-80211n-csitool is installed. In order to obtain stable CSI information, a ping command needs to be performed. And executing a ping command and setting Time To Live (TTL), wherein 1000 packets can be obtained per second, and each packet contains a CSI measurement result.
The TP-Link TL-WDR7500 router used here has 3 antennas, and the Lenovo R400 notebook also has 3 antennas. Thus, 3 × 3 — 9 sets of CSI data can be obtained. Some of the data is more affected by multipath propagation and some of the data is more sensitive to environmental changes. Therefore, a group of sending antenna and receiving antenna combination with the best quality is selected from the CSI data, subsequent processing is carried out on the basis, the quality of the data can be greatly improved, then the obtained CSI data is processed by using a noise reduction method based on principal component analysis, fine noise is further removed, and a high-quality processed signal is obtained.
The signal after PCA processing uses the short-time Fourier change mode to reduce the sampling point and separate the actions of different parts, when writing, the main moving part is the hand, but sometimes the arm will produce some actions, therefore, the reflected signals from a plurality of body parts will be superposed together at the receiving end. Because the moving speed of different parts is different, the frequency of the signals is different, so that the problem can be solved by using a time-frequency analysis technology, and the signals with different frequencies are separated. And the information in the frequency domain is more stable.
After the features are obtained, a K-nearest neighbor algorithm is performed to recognize the handwriting of the user. The extracted features are time series, so all that is needed in the module is to find the classification most similar to the time series as the recognition result. Here, choosing the right way to calculate the distance is a key issue. The handwriting speed is inconsistent, so that the length of each characteristic sequence is inconsistent, and the distance between Time sequences is calculated by Dynamic Time Warping (DTW). The DTW may stretch or shrink one time sequence to align the two time sequences. When the two time series have the same trend but different speeds, the DTW distance can effectively match the two time series. And determining the category of the user according to the first k shortest distances and letter classification required by the first k time sequences.
In summary, the handwriting recognition method and system based on the WIFI signal state information realize the handwriting letter recognition under the WIFI environment by utilizing the channel state information of the wireless signal, overcome the limitation that the traditional behavior recognition requires a user to additionally carry special equipment, reduce the additional equipment overhead by using the existing common consumption-level WIFI equipment, and provide good conditions for the universal use of the invention in consideration of the popularization degree of WIFI; in addition, the method adopts the motion interval detection segmentation based on the time-frequency analysis technology to obtain the stability characteristics and the short-time energy, obtains higher stability and precision, has higher distinctiveness and improves the recognition rate.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Modifications and variations can be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the present invention. Therefore, the scope of the invention should be determined from the following claims.

Claims (7)

1. A handwriting identification method based on WIFI channel state information comprises the following steps:
step S1, acquiring channel state information by using a data acquisition module, processing the acquired channel state information by using a motion interval detection and segmentation method, and training a classifier by using a K nearest neighbor algorithm and a dynamic time warping method to obtain a trained classifier;
step S2, acquiring channel state information by using a data acquisition module, and identifying the acquired channel state information by using a trained classifier to obtain an identification result;
wherein, the step S1 further includes:
acquiring channel state information by using a data acquisition module to acquire a CSI signal;
detecting a motion interval and a static interval from the CSI signal, positioning the start time and the end time of each letter, and dividing the signal;
performing time-frequency analysis through short-time Fourier transform, and acquiring characteristics with distinctiveness and stability from the segmented CSI signals as characteristic values for classification and identification;
step four, using the collected data as a training set, and adopting a K nearest neighbor algorithm and a dynamic time warping method to train a classifier;
step five, repeating the step one to the step four to finally obtain a trained classifier;
the third step further comprises:
step S103a, selecting a window function with the size of 128;
step S103b, obtaining a segment of signal by using the window function;
step S103c, in order to obtain better frequency resolution, adding zero padding to each Fourier interval, and expanding the interval to 1024 sizes;
step S103d, calculating fourier transform of the partial signal;
step S103e, moving the window to the right on the signal;
step S103f, return to step S103c until the window reaches the end of the signal;
step S103g, sorting the frequencies in each Fourier interval from high to low according to energy, selecting the first 40 values, and setting the rest values as 0;
in step S103h, after normalization processing, the spectrogram is smoothed using a gaussian window of 0.7.
2. The WIFI channel state information based handwriting recognition method of claim 1, further comprising the following steps before step two:
and preprocessing the acquired CSI signal to remove noise in the CSI signal.
3. The WIFI channel state information based handwriting recognition method of claim 2, wherein: the preprocessing step preprocesses the CSI signal by adopting a principal component analysis method and retains signal components generated by hand movement.
4. The WIFI channel state information based handwriting recognition method of claim 2, wherein said preprocessing step further comprises:
representing the CSI data by using a matrix X with one dimension of Nxa, wherein N is the window size of principal component analysis processing data, a is the number of subcarriers which can be obtained in each group of CSI data, and calculating the offset generated by a static path for the ith subcarrier data Xi;
calculating a correlation matrix cov (X, X) for the a X a dimension;
calculating eigenvalues and eigenvectors of the correlation matrix cov (X, X), and sorting the features according to the magnitude of the eigenvalues;
principal components are selected and feature vectors are generated.
5. The WIFI channel state information based handwriting recognition method of claim 1, wherein: in the second step, a rectangular window is adopted, a curve is calculated by adopting an STE method, and the motion and static intervals are distinguished by judging whether obvious fluctuation occurs or not.
6. The WIFI channel state information based handwriting recognition method of claim 1, wherein step four further comprises:
constructing a matrix with the size of M multiplied by N, and searching a path to ensure that the sum of regular path distances obtained by the path is shortest;
based on the DTW distance, using a K nearest neighbor algorithm classifier;
the K nearest neighbor algorithm classifier calculates the distance between the time sequences, searches the first K shortest distances, and determines the category of the K nearest neighbor algorithm classifier through the classification of the first K time sequences.
7. A handwriting recognition system based on WIFI channel state information, comprising:
the training unit is used for acquiring the channel state information by using the data acquisition module, processing the acquired channel state information by using a motion interval detection and segmentation method, and training a classifier by adopting a K nearest neighbor algorithm and a dynamic time warping method to obtain a trained classifier;
the identification unit is used for acquiring the channel state information by using the data acquisition module, and identifying the acquired channel state information by using a trained classifier to obtain an identification result;
wherein the training unit comprises:
the channel state information acquisition unit acquires channel state information by using the data acquisition module to acquire a CSI signal;
the positioning and dividing unit is used for detecting a motion interval and a static interval from the CSI signal, positioning the start time and the end time of each letter and dividing the signal;
the characteristic extraction unit is used for carrying out time-frequency analysis through short-time Fourier transform, acquiring characteristics with distinctiveness and stability from the segmented CSI signals and taking the characteristics as characteristic values of classification and identification;
the classification training unit is used for training a classifier by using a K nearest neighbor algorithm and a dynamic time warping method by taking the collected data as a training set;
the repeated training unit is used for repeating the modules to finally obtain a trained classifier;
wherein the performing time-frequency analysis by short-time Fourier transform further comprises:
step S103a, selecting a window function with the size of 128;
step S103b, obtaining a segment of signal by using the window function;
step S103c, in order to obtain better frequency resolution, adding zero padding to each Fourier interval, and expanding the interval to 1024 sizes;
step S103d, calculating fourier transform of the partial signal;
step S103e, moving the window to the right on the signal;
step S103f, return to step S103c until the window reaches the end of the signal;
step S103g, sorting the frequencies in each Fourier interval from high to low according to energy, selecting the first 40 values, and setting the rest values as 0;
in step S103h, after normalization processing, the spectrogram is smoothed using a gaussian window of 0.7.
CN201810564868.2A 2018-06-04 2018-06-04 Handwriting identification method and system based on WIFI channel state information Active CN108805194B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810564868.2A CN108805194B (en) 2018-06-04 2018-06-04 Handwriting identification method and system based on WIFI channel state information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810564868.2A CN108805194B (en) 2018-06-04 2018-06-04 Handwriting identification method and system based on WIFI channel state information

Publications (2)

Publication Number Publication Date
CN108805194A CN108805194A (en) 2018-11-13
CN108805194B true CN108805194B (en) 2021-12-31

Family

ID=64087165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810564868.2A Active CN108805194B (en) 2018-06-04 2018-06-04 Handwriting identification method and system based on WIFI channel state information

Country Status (1)

Country Link
CN (1) CN108805194B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111259700B (en) * 2018-12-03 2024-04-09 北京京东尚科信息技术有限公司 Method and apparatus for generating gait recognition model
CN109657572B (en) * 2018-12-04 2022-07-22 重庆邮电大学 Wi-Fi-based behind-wall target behavior identification method
CN109784212A (en) * 2018-12-27 2019-05-21 东莞理工学院 A kind of biology typewriting recognition methods based on WiFi signal
CN109657739B (en) * 2019-01-09 2023-03-24 西北大学 Handwritten letter identification method based on high-frequency sound wave short-time Fourier transform
CN109947238B (en) * 2019-01-17 2020-07-14 电子科技大学 Non-cooperative gesture recognition method based on WIFI
CN110287863B (en) * 2019-06-24 2022-06-17 桂林电子科技大学 Gesture recognition method based on WiFi signal
CN110353693A (en) * 2019-07-09 2019-10-22 中国石油大学(华东) A kind of hand-written Letter Identification Method and system based on WiFi
CN110705471A (en) * 2019-09-30 2020-01-17 天津大学 Passive posture recognition method based on short-time Fourier and principal component analysis method
CN110866499B (en) * 2019-11-15 2022-12-13 爱驰汽车有限公司 Handwritten text recognition method, system, device and medium
CN113051972A (en) * 2019-12-27 2021-06-29 陈良银 Gesture recognition system based on WiFi
CN112131972B (en) * 2020-09-07 2022-07-12 重庆邮电大学 Method for recognizing human body behaviors by using WiFi data based on attention mechanism
CN114499712B (en) * 2021-12-22 2024-01-05 天翼云科技有限公司 Gesture recognition method, device and storage medium
CN116304915B (en) * 2023-05-16 2023-08-29 山东科技大学 WiFi-based contactless action recognition method, system and laboratory device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951757A (en) * 2015-06-10 2015-09-30 南京大学 Action detecting and identifying method based on radio signals
CN105844216A (en) * 2016-03-11 2016-08-10 南京航空航天大学 Detection and matching mechanism for recognition of handwritten letters using WiFi signals
CN106772219A (en) * 2017-03-08 2017-05-31 南京大学 Indoor orientation method based on CSI signals
CN107180223A (en) * 2017-04-10 2017-09-19 南京苗米科技有限公司 Action identification method and system based on WIFI wireless signals
CN107633227A (en) * 2017-09-15 2018-01-26 华中科技大学 A kind of fine granularity gesture identification method and system based on CSI

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951757A (en) * 2015-06-10 2015-09-30 南京大学 Action detecting and identifying method based on radio signals
CN105844216A (en) * 2016-03-11 2016-08-10 南京航空航天大学 Detection and matching mechanism for recognition of handwritten letters using WiFi signals
CN106772219A (en) * 2017-03-08 2017-05-31 南京大学 Indoor orientation method based on CSI signals
CN107180223A (en) * 2017-04-10 2017-09-19 南京苗米科技有限公司 Action identification method and system based on WIFI wireless signals
CN107633227A (en) * 2017-09-15 2018-01-26 华中科技大学 A kind of fine granularity gesture identification method and system based on CSI

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Understanding and Modeling of WiFi Signal Based Human Activity Recognition;Wei Wang等;《MobiCom"15: Proceedings of the 21st Annual International Conference on Mobile Computing and Networking》;20150930;第65-76页 *
WiGym: Exercise recognition and counting using Wi-Fi signals;Ning Liu;《2017 8th IEEE International Conference on Software Engineering and Service Science (ICSESS)》;20180423;第608-611页 *
基于WiFi信号手势识别的字母输入***的设计与实现;曹肖肖;《中国优秀硕士学位论文全文数据库 信息科技辑(月刊) 计算机软件及计算机应用》;20180315(第03期);第I138-1480页 *

Also Published As

Publication number Publication date
CN108805194A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108805194B (en) Handwriting identification method and system based on WIFI channel state information
CN107633227B (en) CSI-based fine-grained gesture recognition method and system
CN105844216B (en) Detection and matching mechanism for recognizing handwritten letters by WiFi signals
Wang et al. A novel detection and recognition method for continuous hand gesture using FMCW radar
KR101939683B1 (en) Apparatus and method for recognizing user activity
CN112887902B (en) Indoor positioning method of WiFi fingerprint based on Gaussian clustering and hybrid measurement
Miao et al. Underwater acoustic signal classification based on sparse time–frequency representation and deep learning
CN111914709B (en) Deep learning-based action segmentation framework construction method aiming at WiFi signal behavior recognition
CN111832462B (en) Frequency hopping signal detection and parameter estimation method based on deep neural network
CN111901028B (en) Human body behavior identification method based on CSI (channel State information) on multiple antennas
CN114781463A (en) Cross-scene robust indoor tumble wireless detection method and related equipment
Chen et al. Dynamic gesture recognition using wireless signals with less disturbance
WO2007100289A2 (en) A method for additive character recognition and an apparatus thereof
Yousefi et al. A survey of human activity recognition using wifi CSI
Zhang et al. Wi-adaptor: Fine-grained domain adaptation in wifi-based activity recognition
CN105743756A (en) Frame detection method based on Adaboost algorithm in Wi-Fi system
Xu et al. Radio transmitter classification using a new method of stray features analysis combined with PCA
CN112380903A (en) Human activity identification method based on WiFi-CSI signal enhancement
CN112284707A (en) Method for processing vibration signal of circuit breaker
CN115100733A (en) RFID gesture recognition method, computer device, product and storage medium
CN115134848A (en) Human activity perception identification method and system based on Wi-Fi signal and storage medium
CN113406589B (en) Multi-target action identification method based on SIMO Doppler radar
CN113951898B (en) P300 electroencephalogram signal detection method and device for data migration, electronic equipment and medium
Zhao et al. Leveraging Topic Model for CSI Based Human Activity Recognition
Lin et al. WiCLR: A sign language recognition system framework based on wireless sensing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant