A keyboard fingerprint identity information security authentication method based on acoustic wave characteristics
Through a keyboard fingerprint identity information security authentication method based on acoustic wave characteristics, using a microphone to collect keyboard sound waves and combining it with a deep learning framework and residual network, it solves the problem of existing identity authentication being easily stolen and achieves higher security and identification accuracy. sex.
Patent Information
- Application Number
- CN202210835171.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-07-15
AI Technical Summary
Existing identity authentication methods are prone to theft and forgery, traditional personal identity information security authentication has limitations, and biometric identification is also easily broken, making it difficult to effectively protect information system security.
A keyboard fingerprint identity information security authentication method based on acoustic wave characteristics is used to collect the password sound waves entered by the keyboard through the SK-30 microphone. The noise reduction method and Pytorch framework are combined with the resnet34 network to extract and classify audio signal features to achieve fine-grained keystroke recognition. and identity authentication.
It provides higher identity information security, is difficult to forge, improves users' security awareness and system recognition rate, and improves the accuracy and performance of authentication through the deep learning framework and residual network model.
Smart Images

Figure CN115171665B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of keyboard fingerprints and relates to a keyboard fingerprint identity information security authentication method based on acoustic wave characteristics. Background Art
[0002] In recent years, the rapid development of the Internet, Internet of Things, mobile terminals, cloud computing, big data and other related technologies has driven the development of the information industry, and my country's network identity authentication information security has developed rapidly.
[0003] Identity authentication is an important part of the information security system. It is the first door to protect the security of information systems. Currently, commonly used identity information security authentication methods include passwords, certificates, fingerprints, face recognition, irises, etc.
[0004] At present, in the field of identity information security authentication, due to the separability from the user's personal identity information, it is often lost, forged, stolen, and cracked. Therefore, traditional personal identity information security authentication such as passwords and certificates has certain limitations. Currently, biometric identification such as fingerprints, face recognition, iris, etc. has been more widely used. However, the currently used biometrics are also relatively easy to forge. Some researchers have already forged fingerprints, face recognition, iris and other biometrics to break through the existing security authentication system. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a keyboard fingerprint identity information security authentication method based on sound wave characteristics. The method uses an SK-30 microphone to collect the password sound waves input by the user through the keyboard, and after retaining the keyboard fingerprint features to the maximum extent through a noise reduction method, the wav audio file is pre-processed and trained to be converted into a spectrogram, which is read into a Pytorch framework and trained through a resnet34 network. The test data is then classified according to the generated training model, and finally the keyboard fingerprint identity information security authentication based on sound wave characteristics is realized.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] A keyboard fingerprint identity information security authentication method based on sound wave characteristics, the method uses a microphone to collect keyboard input password information and strengthens identity security authentication accordingly, the method specifically includes the following steps: S1, collecting the sound generated by the user typing on the keyboard through the microphone, and extracting audio signal features; S2, analyzing and processing the extracted audio signal features, and performing key detection; S3, according to the slight difference in sound signals generated by different keys, fine-grained keystroke recognition is achieved based on a classification technology solution, and keyboard fingerprint identity information security authentication is completed.
[0008] Furthermore, in step S1, a data list is first created in the format of <audio file path\t classification label> to facilitate subsequent reading. The audio classification label refers to the unique ID of the keyboard input password. Different audio data sets are written in the same data list by writing corresponding functions to generate data lists.
[0009] Further, in step S2, the audio signal is segmented. Based on the waveform of the keystroke sound presenting two different peaks: the finger pressing peak and the release peak, only the pressing peak is used to segment the data. The following mechanism is set:
[0010] 1) Standardize the mean so that its root mean square is 1, X scale =Xu / S, where X is the value to be normalized, X scale is the normalized value, u is the average value of the audio, and S is the standard deviation of the audio sample;
[0011] 2) Then, the FFT coefficients on small windows of 10 milliseconds are added to obtain the energy of each window; when the energy of the window is above a certain threshold, a press event is detected, which is an adjustable parameter.
[0012] Further, in step S2, librosa is used to calculate audio features, perform STFT short-time Fourier transform and data clipping. librosa is a toolkit in Python. The library is mainly used for audio processing and is useful for the preliminary processing of machine learning audio classification. The short-time Fourier transform formula is:
[0013]
[0014] Where W is the window function, which is used to determine the length of the time domain signal for calculating the Fourier transform. When n takes different values, the window function w(nm) slides along x(m). n represents the discrete variable of the sampling point in the time domain, and ω represents the continuous variable of the frequency. The result is a matrix; then call magphase in librosa to separate the complex matrix obtained before into amplitude and time, and then randomly crop the amplitude and time to finally get a 257*257 amplitude spectrum, where Shape represents the size of the returned matrix, nfft represents the number of points after the fast Fourier transform, which is related to the sampling frequency and should generally be 2 to the power of n, t represents the length of the time domain signal, and magphase represents the spectrogram.
[0015] Further, in step S3, it specifically includes:
[0016] Training model: The deformed resnet34 model is used. resnet34 stands for residual network 34 layers. The model uses the idea of residual structure: the data input layer is set to [None, 1, 257, 257], which is the shape of the STFT amplitude spectrum. After each round of training, a model evaluation is performed to calculate the accuracy of the model and observe the convergence of the model. After each round of training, the model is saved once, and the model parameters that can be restored for training are saved separately, which can also be used as pre-training model parameters; the prediction model is also saved for subsequent predictions;
[0017] The optimization algorithm used in the model is the SGD stochastic gradient descent method, and the formula is in represents the calculated gradient, θ represents the parameter, x i ;y i Together, we represent each sample, f(θ; x i ;y i ) represents the loss function for each sample, is the regularization term; the loss function uses the cross entropy loss function, the formula is M represents the number of categories, y ic represents the symbolic function, p ic represents the predicted probability that the observed sample i belongs to category c, L represents the loss, and N represents the number of samples in the current batch;
[0018] After training, the prediction model is used to predict the audio features in the test set, and then the audio features are compared pairwise. The threshold is controlled from 0 to 1 with a step size of 0.01. The best threshold is found and the accuracy is calculated. The accuracy is calculated using cosine similarity. Where cosθ represents the cosine similarity, A i represents the A vector, B i Represents B vector; when writing the model, the model has two outputs, the first is the classification output of the model, and the second is the audio feature output, so what needs to be output here is the feature value of the audio. With the feature value of the audio, voiceprint authentication can be performed.
[0019] Furthermore, two voices are input, and their feature data is obtained through the prediction function. The feature data can be used to calculate their diagonal cosine values, and the result can be used as their familiarity. For this similarity threshold, the standard for whether the audio is the same can be modified.
[0020] The beneficial effects of the present invention are:
[0021] The method provided by the present invention adds a layer of protection mechanism to the traditional personal identity information security authentication method, which is safer and more difficult to forge. It not only helps users who frequently use keyboards to improve their own security awareness and privacy protection, but also has certain inspiration for keyboard research and development staff. On the other hand, Pytorch is currently the mainstream framework for deep learning. Using Pytorch to train data is very flexible and easier to build a neural network, which will greatly improve the overall performance and accuracy of the system and make it more convenient for users to develop. In addition, the classification of training data through the resnet34 network model is more accurate and the recognition rate is greatly improved.
[0022] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0024] Figure 1 The system flow chart of the method of the present invention is shown in FIG. DETAILED DESCRIPTION
[0025] The technical solution of the present invention is described in detail below with reference to the accompanying drawings.
[0026] Figure 1 This is a system flow chart of the method described in the present invention. In this embodiment, the method uses an SK-30 microphone to collect the password sound waves input by the user through the keyboard. After retaining the keyboard fingerprint features to the maximum extent through the noise reduction method, the wav audio file is pre-processed and trained to be converted into a spectrogram, which is read into the Pytorch framework and trained through the resnet34 network. The test data is then classified according to the generated training model, and the password is determined to be correct through the classification category, and finally the keyboard fingerprint identity information security authentication based on the sound wave characteristics is realized. The main steps of the method are as follows:
[0027] S1. Collect the sound made by the user typing on the keyboard through a microphone and extract audio signal features;
[0028] In step S1, first create a data list in the format of <audio file path\t classification label> to facilitate subsequent reading. The audio classification label refers to the unique ID of the password entered on the keyboard. Different audio data sets are written in the same data list by writing corresponding functions to generate data lists. The data list here can be understood as a test set.
[0029] S2. Analyze and process the extracted audio signal features to detect keystrokes. In step S2, the audio signal is segmented. The waveform of the keystroke sound presents two different peaks: the finger pressing peak and the release peak. Only the pressing peak is used to segment the data because the pressing peak is more obvious than the release peak. In order to automatically isolate the keystrokes, the following mechanism is set during the analysis and processing:
[0030] 1) Standardize the mean so that its root mean square is 1, X scale =Xu / S, where X is the value to be normalized, X scale is the normalized value, u is the average value of the audio, and S is the standard deviation of the audio sample;
[0031] 2) Then, the FFT coefficients on small windows of 10 milliseconds are added to obtain the energy of each window; when the energy of the window is above a certain threshold, a press event is detected, which is an adjustable parameter.
[0032] Further, in step S2, librosa is used to calculate audio features, perform STFT short-time Fourier transform and data clipping. librosa is a toolkit in Python. The library is mainly used for audio processing and is useful for the preliminary processing of machine learning audio classification. The short-time Fourier transform formula is:
[0033]
[0034] Where W is the window function, which is used to determine the length of the time domain signal for calculating the Fourier transform. When n takes different values, the window function w(nm) slides along x(m). n represents the discrete variable of the sampling point in the time domain, and ω represents the continuous variable of the frequency. The result is a ; then call magphase in librosa to separate the complex matrix obtained previously into amplitude and time, and then randomly crop the amplitude and time to finally get a 257*257 amplitude spectrum, where Shape represents the size of the returned matrix. nfft represents the number of points after fast Fourier transform, which is related to the sampling frequency and should generally be 2 to the power of n. t represents the length of the time domain signal, and magphasee represents the spectrogram.
[0035] S3, based on the slight difference in the sound signals generated by different keys, implements fine-grained keystroke recognition based on classification technology solutions to complete keyboard fingerprint identity information security authentication. S3 specifically includes training models: using the deformed resnet34 model, resnet34 represents the residual network 34 layers, resnet34 is built in the pytorch environment, and the model uses the idea of residual structure: the data input layer is set to [None, 1, 257, 257], this size is the shape of the STFT amplitude spectrum, and a model evaluation is performed after each round of training to calculate the accuracy of the model and observe the convergence of the model. After each round of training, the model is saved once, and the model parameters that can be restored for training are saved separately, which can also be used as pre-training model parameters; the prediction model is also saved for subsequent predictions;
[0036] The optimization algorithm used in the model is the SGD stochastic gradient descent method, and the formula is in represents the calculated gradient, θ represents the parameter, x i ;y i Together, we represent each sample, f(θ; x i ;y i ) represents the loss function for each sample, is the regularization term; the loss function uses the cross entropy loss function, the formula is M represents the number of categories, y ic represents the symbolic function, p ic represents the predicted probability that the observed sample i belongs to category c, L represents the loss, and N represents the number of samples in the current batch;
[0037] After training, the prediction model is used to predict the audio features in the test set, and then the audio features are compared pairwise. The threshold is controlled from 0 to 1 with a step size of 0.01. The best threshold is found and the accuracy is calculated. The accuracy is calculated using cosine similarity. Where cosθ represents the cosine similarity, A i represents the A vector, B i Represents B vector; when writing the model, the model has two outputs, the first is the classification output of the model, and the second is the audio feature output, so what needs to be output here is the feature value of the audio. With the feature value of the audio, voiceprint authentication can be performed.
Claims
1. A keyboard fingerprint identity information security authentication method based on acoustic wave characteristics, characterized by: The method uses a microphone to collect password information input by a keyboard and strengthens identity security authentication based on the information. The method specifically includes the following steps: S1. Collect the sound made by the user typing on the keyboard through a microphone and extract audio signal features; S2, analyzing and processing the extracted audio signal features, and performing key detection; S3. Based on the slight difference in the sound signals generated by different keys, fine-grained keystroke recognition is achieved based on the classification technology solution to complete the keyboard fingerprint identity information security authentication; In step S1, firstly, a data list is created in the format of <audio file path\t classification label> to facilitate subsequent reading. The audio classification label refers to the unique ID of the keyboard input password. Different audio data sets are written into the same data list by writing corresponding functions for generating data lists. In step S2, the audio signal is segmented. The waveform of the keystroke sound presents two different peaks: the finger pressing peak and the release peak. Only the pressing peak is used to segment the data. The following mechanism is set: 1) Mean normalization to make its root mean square equal to 1, Xscale = Xu / S, where X is the value to be normalized, Xscale is the value after normalization, u is the average value of the audio, and S is the standard deviation of the audio sample; 2) Then, the FFT coefficients on the 10 millisecond small windows are added to obtain the energy of each window; when the energy of the window is above a certain threshold, a press event is detected, which is an adjustable parameter; In step S2, librosa is used to calculate audio features, perform STFT short-time Fourier transform and data clipping. librosa is a toolkit in Python. The library is mainly used for audio processing. The short-time Fourier transform formula is: Where W is the window function, which is used to determine the length of the time domain signal for calculating the Fourier transform. When n takes different values, the window function w(nm) slides along x(m). n represents the discrete variable of the sampling point in the time domain, and ω represents the continuous variable of the frequency. The result is a matrix; then call magphase in librosa to separate the complex matrix obtained before into amplitude and time, and then randomly crop the amplitude and time to finally get a 257*257 amplitude spectrum, where Shape represents the size of the returned matrix, nfft represents the number of points after the fast Fourier transform, which is related to the sampling frequency and is 2 to the power of n, t represents the length of the time domain signal, and magphase represents the spectrogram.
2. A keyboard fingerprint identity information security authentication method based on acoustic wave characteristics according to claim 1, characterized in that: In step S3, it specifically includes: Training model: The deformed resnet34 model is used. resnet34 stands for residual network 34 layers. The model uses the idea of residual structure: the data input layer is set to [None, 1, 257, 257], which is the shape of the STFT amplitude spectrum. After each round of training, a model evaluation is performed to calculate the accuracy of the model and observe the convergence of the model. After each round of training, the model is saved once, and the model parameters that can be restored for training are saved separately, which can also be used as pre-training model parameters; the prediction model is also saved for subsequent predictions; The optimization algorithm used in the model is the SGD stochastic gradient descent method, and the formula is in represents the calculated gradient, θ represents the parameter, xi; yi together represent each sample, and f(θ; xi; yi) represents the loss function for each sample. is the regularization term; the loss function uses the cross entropy loss function, the formula is M represents the number of categories, yic represents the symbol function, pic represents the predicted probability that the observed sample i belongs to category c, L represents the loss, and N represents the number of samples in the current batch; After training, the prediction model is used to predict the audio features in the test set, and then the audio features are compared pairwise. The threshold is controlled from 0 to 1 with a step size of 0.
01. The best threshold is found and the accuracy is calculated. The accuracy is calculated using cosine similarity. Among them, cosθ represents cosine similarity, Ai represents A vector, and Bi represents B vector. When writing the model, the model has two outputs, the first is the classification output of the model, and the second is the audio feature output. Therefore, what needs to be output here is the feature value of the audio. With the feature value of the audio, voiceprint authentication can be performed.
3. A keyboard fingerprint identity information security authentication method based on acoustic wave characteristics according to claim 2, characterized in that: Input two speech sounds, obtain their feature data through the prediction function, use this feature data to calculate their diagonal cosine value, and the result can be used as their similarity; for the threshold of this similarity, modify the standard of whether the audio is identical.
Citation Information
Patent Citations
System and method for detecting keyboard tapping content by utilizing sound signals
CN107452402A
