Signal processing method and system of magnetic induction keyboard
By using miniature magnetic sensors in the magnetic induction keyboard to calculate harmonic identifiers and extract key spectrum points, the signal misjudgment problem of traditional magnetic induction keyboards in complex electromagnetic environments is solved, achieving higher signal processing accuracy and key recognition accuracy. .
Patent Information
- Application Number
- CN202410735178.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional magnetic induction keyboards are susceptible to external interference in complex electromagnetic environments, resulting in signal misjudgment and difficulty in key recognition, especially in dense key layouts.
By setting a miniature magnetic sensor under each button, calculate the harmonic identifier, perform fast Fourier transform on the magnetic field signal, extract key spectrum points to match the harmonic identifier, confirm the button activation status, and calculate based on the magnetic field signal strength Dynamic operating intensity values, encoded for digital signal transmission.
It improves the signal processing accuracy and capabilities of the magnetic induction keyboard, and enhances the key recognition accuracy and user experience in complex environments.
Smart Images

Figure CN118585073A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of keyboards, and in particular to a signal processing method and system for a magnetic induction keyboard. Background Art
[0002] As an input device, magnetic induction keyboards are widely used in various electronic devices such as personal computers, embedded systems, and smart terminals. Compared with traditional mechanical keyboards, membrane keyboards, or electrostatic capacitance keyboards, magnetic induction keyboards are gradually gaining market attention for their unique working principle and excellent performance. Magnetic induction keyboards usually use magnetic field changes to detect key operations, so they have the advantages of dustproof, washable, and wear-resistant. They do not rely on traditional physical contact, but instead measure the magnetic field changes of the magnetic sensor near the key to determine whether the key is pressed and how hard it is pressed.
[0003] However, with the development of technology and the improvement of user needs, traditional magnetic induction keyboards have some limitations in signal processing. For example, in a complex electromagnetic environment, external interference may cause misjudgment of magnetic field signals, affecting the accuracy of keyboard operation. In addition, there may be mutual interference of magnetic field signals between different keys, especially in a dense key layout, which will make key recognition difficult. Summary of the invention
[0004] The purpose of the present invention is to provide a signal processing method and system for a magnetic induction keyboard to solve the deficiencies in the prior art and to improve the signal processing capability and accuracy of the magnetic induction keyboard.
[0005] An embodiment of the present application provides a signal processing method for a magnetic induction keyboard, the method comprising:
[0006] Calculating a harmonic identifier specific to each key through a micro-magnetic sensor disposed under each key in the magnetic induction keyboard, wherein each micro-magnetic sensor is used to capture magnetic field information generated by the corresponding key when it is pressed;
[0007] Performing a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a spectrum of the magnetic field signal, and extracting specific key spectrum points at a preset harmonic frequency interval based on the spectrum;
[0008] Matching the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation status of the key;
[0009] According to the magnetic field signal strength in the magnetic field information, the dynamic operation intensity value of the key action is calculated, the activation state and dynamic operation intensity value of each key are encoded into a keyboard input signal represented by a digital number, and the keyboard input signal is transmitted to the host computer corresponding to the magnetic induction keyboard for response and processing.
[0010] Optionally, the calculation formula of the harmonic identifier is:
[0011] H_k=|sum_{n=1}^{n}a_{n}(k)·e^{j·2πn·ft}|
[0012] Among them, H_k is the harmonic identifier representing key k, f is the magnetic field signal frequency, a_{n}(k) is the complex amplitude coefficient related to the magnetic field characteristics of the nth-order harmonic of key k, N is the harmonic order, t is the time variable, and j is the imaginary unit.
[0013] Optionally, performing a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a magnetic field signal spectrum, and extracting specific key spectrum points at a preset harmonic frequency interval based on the spectrum, includes:
[0014] A time window is set for each captured key magnetic field signal, and the corresponding analog magnetic field signal within the time window is continuously collected by the micro magnetic sensor;
[0015] The continuously collected analog magnetic field signals are converted into digital signals through analog-to-digital conversion, and the obtained digital signals are processed by applying a window function;
[0016] Performing a fast Fourier transform on the signal processed by the window function to convert the time domain signal into a frequency domain signal to obtain a magnetic field signal spectrum, wherein the magnetic field signal spectrum is represented by a series of discrete frequency points, each frequency point corresponding to a complex value representing the amplitude and phase information at the corresponding frequency;
[0017] In the obtained magnetic field signal spectrum, an extraction threshold is set according to a preset harmonic frequency interval, and key spectrum points located at the preset harmonic frequency interval are extracted based on the extraction threshold.
[0018] Optionally, matching the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation state of the keys includes:
[0019] Constructing the extracted key spectrum points into a real-time harmonic pattern vector, wherein the real-time harmonic pattern vector includes frequency and amplitude information when the key is activated;
[0020] Matching and analyzing the real-time harmonic pattern vector with the harmonic identifier of each key stored in the harmonic identifier library, and evaluating the similarity between the real-time harmonic pattern vector and the harmonic identifier using a similarity metric algorithm;
[0021] When the similarity exceeds a preset threshold, the corresponding button is confirmed to be in an activated state, otherwise it is in an inactivated state;
[0022] The confirmed activation state, the activated key identifier and the time point when the key is activated are converted into digital signals and output.
[0023] Optionally, calculating the dynamic operation intensity value of the key action according to the magnetic field signal intensity in the magnetic field information includes:
[0024] The harmonic energy density of the key is calculated based on the magnetic field signal strength:
[0025]
[0026] Wherein, E_k(f) is the harmonic energy density of key k at frequency f, S_k(t) is the magnetic field signal strength of key k at time t, and T is the signal analysis time window;
[0027] The dynamic operation intensity value of the key action is calculated based on the harmonic energy density:
[0028] D_k=sum_{f}G_k(f)·log(1+E_k(f))
[0029] Wherein, D_k is the dynamic operation intensity of key k, G_k(f) is the magnetic field signal gain coefficient related to frequency f, and E_k(f) is the harmonic energy density at frequency f.
[0030] Another embodiment of the present application provides a signal processing system for a magnetic induction keyboard, the system comprising:
[0031] A calculation module, used to calculate a harmonic identifier specific to each key through a micro magnetic sensor disposed under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture magnetic field information generated by a corresponding key when it is pressed;
[0032] An extraction module, used for performing a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a spectrum of the magnetic field signal, and extracting specific key spectrum points at a preset harmonic frequency interval based on the spectrum;
[0033] A confirmation module, used to match the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation status of the key;
[0034] The encoding module is used to calculate the dynamic operation intensity value of the key action according to the magnetic field signal strength in the magnetic field information, encode the activation state and dynamic operation intensity value of each key into a keyboard input signal represented by a digital number, and transmit the keyboard input signal to the upper computer corresponding to the magnetic induction keyboard for response and processing.
[0035] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.
[0036] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.
[0037] Compared with the prior art, the present invention provides a signal processing method for a magnetic induction keyboard, which calculates a specific harmonic identifier for each key through a micro magnetic sensor arranged under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture the magnetic field information generated by the corresponding key when it is pressed; a magnetic field signal in the magnetic field information is subjected to a fast Fourier transform to obtain a magnetic field signal spectrum, and specific key spectrum points are extracted at a preset harmonic frequency interval based on the spectrum; the extracted key spectrum points are matched with the calculated key harmonic identifier to confirm the activation state of the key; the dynamic operation intensity value of the key action is calculated according to the magnetic field signal strength in the magnetic field information, the activation state and dynamic operation intensity value of each key are encoded into a keyboard input signal represented by a digital number, and the keyboard input signal is transmitted to a host computer corresponding to the magnetic induction keyboard for response and processing, thereby improving the signal processing capability and accuracy of the magnetic induction keyboard. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A hardware structure block diagram of a computer terminal for a signal processing method of a magnetic induction keyboard provided by an embodiment of the present invention;
[0039] Figure 2 A schematic flow chart of a signal processing method for a magnetic induction keyboard provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the structure of a signal processing system for a magnetic induction keyboard provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.
[0042] The embodiment of the present invention firstly provides a signal processing method for a magnetic induction keyboard. The method can be applied to electronic devices such as computer terminals, specifically ordinary computers, etc.
[0043] The following describes it in detail by taking running on a computer terminal as an example. Figure 1The hardware structure block diagram of a computer terminal of a magnetic induction keyboard signal processing method provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0044] The memory 104 can be used to store software programs and modules of application software, such as program instructions / modules corresponding to the signal processing method of the magnetic induction keyboard in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0045] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0046] See also Figure 2 , an embodiment of the present invention provides a signal processing method for a magnetic induction keyboard, which may include the following steps:
[0047] S201, calculating a harmonic identifier specific to each key through a micro magnetic sensor disposed under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture magnetic field information generated by a corresponding key when it is pressed;
[0048] Specifically, a calculation formula for a harmonic identifier may be:
[0049] H_k=|sum_{n=1}^{N}a_{n}(k)·e^{j·2πn·ft}|
[0050] Among them, H_k is the harmonic identifier representing key k, which is used for subsequent matching analysis; f is the frequency of the magnetic field signal, which is usually determined by the change in the magnetic field generated when the key is activated; a_{n}(k) is the complex amplitude coefficient related to the magnetic field characteristics of the nth-order harmonic of key k, which characterizes the amplitude and phase information of the magnetic field generated by the key; N is the harmonic order, which indicates the number of harmonics to be considered in the calculation; t is the time variable, and j is the imaginary unit, which is used to represent the phase part in the complex amplitude coefficient. This formula characterizes the spectral characteristics of the magnetic field signal when the key is activated by using the form of Fourier series, so that the activation state of the key can be accurately matched in subsequent steps. An implementation method may include:
[0051] Step 1: Preparation before calculating harmonic identifiers In a magnetic induction keyboard, a miniature magnetic sensor is installed under each key. Each key is calibrated to determine the baseline magnetic field signal when each key is not pressed.
[0052] Step 2: Collect static magnetic field signals For each key, first capture the static magnetic field information when it is not pressed. Perform a series of key operations with different activation forces and capture the resulting dynamic magnetic field information.
[0053] Step 3: Construct the harmonic model of the key. Perform Fourier transform on the collected static and dynamic magnetic field information of each key to extract the harmonic components. By analyzing these harmonic components, the complex amplitude coefficient a_{n}(k) corresponding to each key is determined.
[0054] Step 4: Calculate the harmonic identifier For each key k, calculate the harmonic identifier using the above formula. Select an appropriate N value to include a sufficient number of harmonic components to ensure that sufficient signal characteristics are captured. For each key, perform the above calculation once to obtain its harmonic identifier H_k.
[0055] Step 5: Storing harmonic identifiers The harmonic identifier H_k calculated for each key is stored in a database or a lookup table to prepare for subsequent matching analysis.
[0056] Through the above steps, a specific, plural harmonic identifier is calculated for each key based on the harmonic analysis of the magnetic field signal of each key. When the key is activated, the magnetic field information captured in real time can be compared and matched with these harmonic identifiers to identify and confirm the activation state of the key. This method provides an accurate and reliable magnetic induction keyboard signal processing mechanism that can efficiently identify key actions in actual environments, whether in scenarios where a single key or multiple keys are operated simultaneously.
[0057] S202, performing a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a spectrum of the magnetic field signal, and extracting specific key spectrum points at a preset harmonic frequency interval based on the spectrum;
[0058] Specifically, a time window can be set for each captured key magnetic field signal, and the analog magnetic field signal corresponding to the time window can be continuously collected by the micro magnetic sensor; the continuously collected analog magnetic field signal is converted into a digital signal through analog-to-digital conversion, and the obtained digital signal is processed by a window function; a fast Fourier transform is performed on the signal processed by the window function, and the time domain signal is converted into a frequency domain signal to obtain a magnetic field signal spectrum, wherein the magnetic field signal spectrum is represented by a series of discrete frequency points, and each frequency point corresponds to a complex value that characterizes the amplitude and phase information at the corresponding frequency; in the obtained magnetic field signal spectrum, an extraction threshold is set according to a preset harmonic frequency interval, and key spectrum points located at the preset harmonic frequency interval are extracted based on the extraction threshold. An implementation method may include:
[0059] Step 1: Signal acquisition In the magnetic induction keyboard, the micro magnetic sensor under each key is configured to capture the magnetic field information generated by the key when it is operated in real time. Define a time window of appropriate length, such as a complete key operation cycle, to capture enough magnetic field data for analysis. The analog magnetic field signals of the corresponding keys in the time window are continuously collected by the micro magnetic sensor and stored in the buffer.
[0060] Step 2: Analog-to-digital conversion and window function processing Use an analog-to-digital converter (ADC) to convert the analog magnetic field signal in the buffer into a digital signal for digital signal processing. Apply a window function, such as a Hanning window or a Hamming window, to the digital magnetic field signal to reduce spectral leakage and improve the accuracy of spectrum reading.
[0061] Step 3: Fast Fourier Transform (FFT) The digital magnetic field signal processed by the window function is input into the Fast Fourier Transform (FFT) algorithm. FFT is performed to convert the magnetic field signal in the time domain into a frequency domain signal, and a series of discrete spectrum points describing the signal frequency and amplitude are obtained.
[0062] Step 4: Extraction of key spectrum points Define a preset harmonic frequency interval, such as an integer multiple of the fundamental frequency. These frequency points may be the natural harmonic frequencies of the keyboard determined by the physical structure and material properties of the keyboard. Determine the extraction threshold, for example, set it to several times the background noise level to avoid misidentification of interference signals. Based on the above threshold, extract the key spectrum points located at the preset harmonic frequency interval in the obtained spectrum. These points represent the typical harmonic components when the key is operated.
[0063] Step 5: Storage and Analysis The extracted key spectrum points are constructed into a data structure, such as a real-time harmonic pattern vector, for matching analysis with subsequent key harmonic identifiers. These key spectrum points are stored to provide the required data for key activation status confirmation and subsequent signal encoding steps.
[0064] Through the above steps, the key spectrum points corresponding to the key operation can be accurately extracted from the magnetic field information captured by the magnetic induction keyboard, providing accurate data support for further confirmation of the key activation state and generation of keyboard input signals. This implementation method effectively utilizes the capabilities of FFT in the field of signal processing, and improves the accuracy and reliability of magnetic field signal spectrum analysis through window function processing and accurate extraction of key spectrum points.
[0065] S203, matching the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation state of the key;
[0066] Specifically, the extracted key spectrum points can be constructed into a real-time harmonic pattern vector, wherein the real-time harmonic pattern vector contains the frequency and amplitude information when the key is activated; the real-time harmonic pattern vector is matched and analyzed with the harmonic identifier of each key stored in the harmonic identifier library, and the similarity between the real-time harmonic pattern vector and the harmonic identifier is evaluated using a similarity metric algorithm; when the similarity exceeds a preset threshold, the corresponding key is confirmed to be in an activated state, otherwise it is in an inactivated state; the confirmed activation state, the activated key identifier, and the time point when the key is activated are converted into a digital signal and output. An implementation method may include:
[0067] Step 1: Construct a real-time harmonic pattern vector. Based on the key spectrum point data obtained previously, a real-time harmonic pattern vector is constructed. This vector contains the frequency and amplitude information of each extracted key spectrum point. This pattern vector takes into account the instantaneous characteristics of key activation in the time window and is a frequency domain representation of the key magnetic field signal.
[0068] Step 2: Establishment of harmonic identifier library Using the previously calculated harmonic identifier H_k of each key, a harmonic identifier library is established. The library stores the harmonic characteristics of the ideal magnetic field signal of each key under different activation conditions as a reference standard.
[0069] Step 3: Selection and application of similarity metric algorithm Select a suitable similarity metric algorithm, such as cosine similarity, Euclidean distance or Pearson correlation coefficient, to evaluate the similarity between the real-time harmonic pattern vector and the key harmonic identifiers stored in the library. Calculate the similarity score between the real-time harmonic pattern vector and each key harmonic identifier.
[0070] Step 4: Harmonic matching and key activation status confirmation By setting a suitable similarity threshold, such as the optimal value after weighing the detection sensitivity and false alarm rate. For the harmonic identifier of each key, when the score of the real-time harmonic pattern vector exceeds the similarity threshold, the key is confirmed to be in the activated state. If the harmonic identifier of any key and the score of the real-time harmonic pattern vector do not exceed the threshold, it is considered to be an erroneous operation or background noise, and no activation processing is performed.
[0071] Step 5: Digital signal output For the keys that have been confirmed to be activated, their identification and activation time are output in the form of digital signals. This signal is used to trigger the corresponding processing flow of the host computer, such as character input, command execution, etc.
[0072] Step 6: Real-time feedback and system calibration Combined with the real-time feedback from the host computer, the harmonic matching process is dynamically adjusted, such as updating the similarity threshold, optimizing the parameters of the similarity measurement algorithm, etc., to cope with performance changes caused by possible long-term wear, environmental changes and other factors.
[0073] Through the above steps, the signal processing method of the magnetic induction keyboard can accurately identify and confirm the activation state of the key, enhancing the accuracy and reliability of the input device. This method utilizes signal processing technology and pattern matching algorithms, and can handle both single key activation and concurrent multi-key operations, providing users with a smoother and more accurate user experience.
[0074] S204, calculate the dynamic operation intensity value of the key action according to the magnetic field signal strength in the magnetic field information, encode the activation state and dynamic operation intensity value of each key into a keyboard input signal represented by a digital number, and transmit the keyboard input signal to the upper computer corresponding to the magnetic induction keyboard for response and processing.
[0075] Specifically, the harmonic energy density of the key can be calculated according to the magnetic field signal strength as follows:
[0076]
[0077] Among them, E_k(f) is the harmonic energy density of key k at frequency f. For example, if the signal generated by key A at a frequency of 1kHz has a higher energy distribution, then E_A(1kHz) will be correspondingly larger; S_k(t) is the magnetic field signal strength of key k at time t. For example, at t=1 second, key A is pressed, and S_A(1) represents the magnetic field signal strength at that moment; T is the signal analysis time window, which defines the time range for analyzing the magnetic field signal strength. For example, a 100 millisecond window can be selected to analyze the signal of key A. This formula is used to quantify the energy distribution of each key at a specific frequency. By calculating the harmonic energy density, the magnetic field signal characteristics generated by the key can be captured more accurately and converted into a quantifiable value, which lays the foundation for the subsequent calculation of the dynamic operation intensity value.
[0078] The dynamic operation intensity value of the key action is calculated based on the harmonic energy density:
[0079] D_k=sum_{f}G_k(f)·log(1+E_k(f))
[0080] Among them, D_k is the dynamic operation intensity of key k. For example, if the user taps key A lightly, D_A will be correspondingly smaller; if the user taps the key hard, D_A will be correspondingly larger. G_k(f) is the magnetic field signal gain coefficient related to frequency f. This coefficient can be adjusted according to the different contributions of magnetic field signals at different frequencies to the overall intensity. For example, if the 1kHz signal is considered more important, the gain G_A(1kHz) may be set higher. This formula is used to calculate the actual force of each key operation from the energy density. By taking the logarithmic scaling of the energy density and multiplying it by the gain coefficient, an indicator that comprehensively reflects the strength of the key operation can be obtained, which can be used for subsequent digital encoding and signal transmission.
[0081] Specifically, one implementation may include:
[0082] Step 1: Real-time acquisition of magnetic field signal strength. Micro magnetic sensors are configured under each button. These sensors are sensitive to the magnetic field generated by the button. When the button is operated, these magnetic sensors capture the magnetic field changes and output analog signals. Connect an analog-to-digital converter (ADC) to each magnetic sensor to convert the captured analog magnetic field signal S_k(t) into digital form in real time. The ADC must select an appropriate sampling rate to ensure high fidelity of the signal. Usually, this sampling rate is more than twice the key operation frequency.
[0083] Step 2: Signal window function processing and spectrum analysis In order to reduce the boundary effect and improve the accuracy of frequency analysis, each digitized key signal is passed through a window function. The window function can be a Hanning window, a Hamming window, or other window functions suitable for signal processing. Perform a fast Fourier transform (FFT) on each magnetic field signal processed by the window function to convert the signal in the time domain into a frequency domain signal, thereby obtaining the signal's spectrum.
[0084] Step 3: Calculation of harmonic energy density In the obtained spectrum, perform harmonic energy analysis on the preset specific frequency band. The energy E_k(f) of each harmonic frequency point is calculated using the harmonic energy density formula, which requires integrating the square of the signal strength at each frequency point of interest. Harmonic energy density will be used as a basic parameter for calculating the dynamic operation intensity value, so it can be optimized for different buttons and operation modes.
[0085] Step 4: The calculation of the dynamic operation intensity value is combined with the specific gain coefficient G_k(f) for each key, which may be pre-set according to different specific applications and user needs. For each key, calculate its dynamic operation intensity value D_k, which can comprehensively reflect the strength and speed of the key operation. The combination of the gain coefficient and the logarithmic form of energy density can provide nonlinear response for different operation dynamics.
[0086] Step 5: Encoding and signal transmission Encode the activation state of each key and the calculated dynamic operation intensity value D_k to form a digital keyboard input signal. The encoding here should ensure that it contains enough information to distinguish different keys and operation strengths. Use the communication protocol between the keyboard and the host computer (such as USB, Bluetooth, or other wireless protocols) to send the encoded signal to the host computer. Ensure the stability and real-time performance of data transmission to avoid operation delays.
[0087] Step 6: Signal analysis and processing by the host computer After receiving the signal, the host computer first decodes and identifies the activation state of each key and the corresponding dynamic operation strength value D_k. The host computer performs corresponding actions based on the decoded information. For example, in a text editor, the size or boldness of the input characters is adjusted according to the value of D_k; in a game, the movement speed or attack strength of the character is adjusted according to D_k. The host computer can also record the timestamp of each key operation for further data analysis or user behavior analysis.
[0088] This implementation not only provides a new dimension for keyboard input (i.e., dynamic operation intensity), but also enhances the host computer's ability to process these inputs, so that each key press by the user can receive a more accurate response, thereby improving the overall interactive experience.
[0089] It can be seen that the specific harmonic identifier of each key is calculated by the micro magnetic sensor arranged under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture the magnetic field information generated by the corresponding key when it is pressed; the magnetic field signal in the magnetic field information is subjected to fast Fourier transform to obtain the magnetic field signal spectrum, and specific key spectrum points are extracted at a preset harmonic frequency interval based on the spectrum; the extracted key spectrum points are matched with the calculated key harmonic identifier to confirm the activation state of the key; according to the magnetic field signal strength in the magnetic field information, the dynamic operation intensity value of the key action is calculated, the activation state and dynamic operation intensity value of each key are encoded into a keyboard input signal represented by a digital number, and the keyboard input signal is transmitted to the upper computer corresponding to the magnetic induction keyboard for response and processing, thereby improving the signal processing capability and accuracy of the magnetic induction keyboard.
[0090] Another embodiment of the present invention provides a signal processing system for a magnetic induction keyboard. Figure 3 , the system may include:
[0091] The calculation module 301 is used to calculate the harmonic identifier specific to each key through a micro magnetic sensor disposed under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture the magnetic field information generated by the corresponding key when it is pressed;
[0092] An extraction module 302 is used to perform a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a spectrum of the magnetic field signal, and extract specific key spectrum points at a preset harmonic frequency interval based on the spectrum;
[0093] A confirmation module 303 is used to match the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation state of the key;
[0094] The encoding module 304 is used to calculate the dynamic operation intensity value of the key action according to the magnetic field signal strength in the magnetic field information, encode the activation state and dynamic operation intensity value of each key into a keyboard input signal represented by a digital number, and transmit the keyboard input signal to the upper computer corresponding to the magnetic induction keyboard for response and processing.
[0095] It can be seen that the specific harmonic identifier of each key is calculated by the micro magnetic sensor arranged under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture the magnetic field information generated by the corresponding key when it is pressed; the magnetic field signal in the magnetic field information is subjected to fast Fourier transform to obtain the magnetic field signal spectrum, and specific key spectrum points are extracted at a preset harmonic frequency interval based on the spectrum; the extracted key spectrum points are matched with the calculated key harmonic identifier to confirm the activation state of the key; according to the magnetic field signal strength in the magnetic field information, the dynamic operation intensity value of the key action is calculated, the activation state and dynamic operation intensity value of each key are encoded into a keyboard input signal represented by a digital number, and the keyboard input signal is transmitted to the upper computer corresponding to the magnetic induction keyboard for response and processing, thereby improving the signal processing capability and accuracy of the magnetic induction keyboard.
[0096] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0097] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:
[0098] S201, calculating a harmonic identifier specific to each key through a micro magnetic sensor disposed under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture magnetic field information generated by a corresponding key when it is pressed;
[0099] S202, performing a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a spectrum of the magnetic field signal, and extracting specific key spectrum points at a preset harmonic frequency interval based on the spectrum;
[0100] S203, matching the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation state of the key;
[0101] S204, calculate the dynamic operation intensity value of the key action according to the magnetic field signal strength in the magnetic field information, encode the activation state and dynamic operation intensity value of each key into a keyboard input signal represented by a digital number, and transmit the keyboard input signal to the upper computer corresponding to the magnetic induction keyboard for response and processing.
[0102] It can be seen that the specific harmonic identifier of each key is calculated by the micro magnetic sensor arranged under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture the magnetic field information generated by the corresponding key when it is pressed; the magnetic field signal in the magnetic field information is subjected to fast Fourier transform to obtain the magnetic field signal spectrum, and specific key spectrum points are extracted at a preset harmonic frequency interval based on the spectrum; the extracted key spectrum points are matched with the calculated key harmonic identifier to confirm the activation state of the key; according to the magnetic field signal strength in the magnetic field information, the dynamic operation intensity value of the key action is calculated, the activation state and dynamic operation intensity value of each key are encoded into a keyboard input signal represented by a digital number, and the keyboard input signal is transmitted to the upper computer corresponding to the magnetic induction keyboard for response and processing, thereby improving the signal processing capability and accuracy of the magnetic induction keyboard.
[0103] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0104] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0105] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0106] S201, calculating a harmonic identifier specific to each key through a micro magnetic sensor disposed under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture magnetic field information generated by a corresponding key when it is pressed;
[0107] S202, performing a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a spectrum of the magnetic field signal, and extracting specific key spectrum points at a preset harmonic frequency interval based on the spectrum;
[0108] S203, matching the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation state of the key;
[0109] S204, calculate the dynamic operation intensity value of the key action according to the magnetic field signal strength in the magnetic field information, encode the activation state and dynamic operation intensity value of each key into a keyboard input signal represented by a digital number, and transmit the keyboard input signal to the upper computer corresponding to the magnetic induction keyboard for response and processing.
[0110] Specifically, the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0111] It can be seen that the specific harmonic identifier of each key is calculated by the micro magnetic sensor arranged under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture the magnetic field information generated by the corresponding key when it is pressed; the magnetic field signal in the magnetic field information is subjected to fast Fourier transform to obtain the magnetic field signal spectrum, and specific key spectrum points are extracted at a preset harmonic frequency interval based on the spectrum; the extracted key spectrum points are matched with the calculated key harmonic identifier to confirm the activation state of the key; according to the magnetic field signal strength in the magnetic field information, the dynamic operation intensity value of the key action is calculated, the activation state and dynamic operation intensity value of each key are encoded into a keyboard input signal represented by a digital number, and the keyboard input signal is transmitted to the upper computer corresponding to the magnetic induction keyboard for response and processing, thereby improving the signal processing capability and accuracy of the magnetic induction keyboard.
[0112] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.
Claims
1. A signal processing method for a magnetic induction keyboard, characterized in that: The method comprises: Calculating a harmonic identifier specific to each key through a micro-magnetic sensor disposed under each key in the magnetic induction keyboard, wherein each micro-magnetic sensor is used to capture magnetic field information generated by the corresponding key when it is pressed; Performing a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a spectrum of the magnetic field signal, and extracting specific key spectrum points at a preset harmonic frequency interval based on the spectrum; Matching the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation status of the key; According to the magnetic field signal strength in the magnetic field information, the dynamic operation intensity value of the key action is calculated, the activation state and dynamic operation intensity value of each key are encoded into a keyboard input signal represented by a digital number, and the keyboard input signal is transmitted to the host computer corresponding to the magnetic induction keyboard for response and processing.
2. The method according to claim 1, characterized in that The calculation formula of the harmonic identifier is: H_k=|sum_{n=1}^{N}a_{n}(k)·e^{j·2πn·ft}| Among them, H_k is the harmonic identifier representing key k, f is the magnetic field signal frequency, a_{n}(k) is the complex amplitude coefficient related to the magnetic field characteristics of the nth-order harmonic of key k, N is the harmonic order, t is the time variable, and j is the imaginary unit.
3. The method according to claim 2, characterized in that The method of performing a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a magnetic field signal spectrum, and extracting specific key spectrum points at a preset harmonic frequency interval according to the spectrum, includes: A time window is set for each captured key magnetic field signal, and the corresponding analog magnetic field signal within the time window is continuously collected by the micro magnetic sensor; The continuously collected analog magnetic field signals are converted into digital signals through analog-to-digital conversion, and the obtained digital signals are processed by applying a window function; Performing a fast Fourier transform on the signal processed by the window function to convert the time domain signal into a frequency domain signal to obtain a magnetic field signal spectrum, wherein the magnetic field signal spectrum is represented by a series of discrete frequency points, each frequency point corresponding to a complex value representing the amplitude and phase information at the corresponding frequency; In the obtained magnetic field signal spectrum, an extraction threshold is set according to a preset harmonic frequency interval, and key spectrum points located at the preset harmonic frequency interval are extracted based on the extraction threshold.
4. The method according to claim 3, characterized in that: The step of matching the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation state of the keys includes: Constructing the extracted key spectrum points into a real-time harmonic pattern vector, wherein the real-time harmonic pattern vector includes frequency and amplitude information when the key is activated; Matching and analyzing the real-time harmonic pattern vector with the harmonic identifier of each key stored in the harmonic identifier library, and evaluating the similarity between the real-time harmonic pattern vector and the harmonic identifier using a similarity metric algorithm; When the similarity exceeds a preset threshold, the corresponding button is confirmed to be in an activated state, otherwise it is in an inactivated state; The confirmed activation state, the activated key identifier and the time point when the key is activated are converted into digital signals and output.
5. The method according to claim 4, characterized in that The step of calculating the dynamic operation intensity value of the key action according to the magnetic field signal intensity in the magnetic field information includes: The harmonic energy density of the key is calculated based on the magnetic field signal strength: Wherein, E_k(f) is the harmonic energy density of key k at frequency f, S_k(t) is the magnetic field signal strength of key k at time t, and T is the signal analysis time window; The dynamic operation intensity value of the key action is calculated based on the harmonic energy density: D_k=sum_{f}G_k(f)·log(1+E_k(f)) Wherein, D_k is the dynamic operation intensity of key k, G_k(f) is the magnetic field signal gain coefficient related to frequency f, and E_k(f) is the harmonic energy density at frequency f.
6. A signal processing system for a magnetic induction keyboard, characterized in that: The system comprises: A calculation module, used to calculate a harmonic identifier specific to each key through a micro magnetic sensor disposed under each key in the magnetic induction keyboard, wherein each micro magnetic sensor is used to capture magnetic field information generated by a corresponding key when it is pressed; An extraction module, used for performing a fast Fourier transform on the magnetic field signal in the magnetic field information to obtain a spectrum of the magnetic field signal, and extracting specific key spectrum points at a preset harmonic frequency interval based on the spectrum; A confirmation module, used to match the extracted key spectrum points with the calculated key harmonic identifiers to confirm the activation status of the key; The encoding module is used to calculate the dynamic operation intensity value of the key action according to the magnetic field signal strength in the magnetic field information, encode the activation state and dynamic operation intensity value of each key into a keyboard input signal represented by a digital number, and transmit the keyboard input signal to the upper computer corresponding to the magnetic induction keyboard for response and processing.
7. The system according to claim 6, characterized in that The calculation formula of the harmonic identifier is: H_k=|sum_{n=1}^{N}a_{n}(k)·e^{j·2πn·ft}| Among them, H_k is the harmonic identifier representing key k, f is the magnetic field signal frequency, a_{n}(k) is the complex amplitude coefficient related to the magnetic field characteristics of the nth-order harmonic of key k, N is the harmonic order, t is the time variable, and j is the imaginary unit.
8. The system according to claim 7, characterized in that The extraction module is specifically used for: A time window is set for each captured key magnetic field signal, and the corresponding analog magnetic field signal within the time window is continuously collected by the micro magnetic sensor; The continuously collected analog magnetic field signals are converted into digital signals through analog-to-digital conversion, and the obtained digital signals are processed by applying a window function; Performing a fast Fourier transform on the signal processed by the window function to convert the time domain signal into a frequency domain signal to obtain a magnetic field signal spectrum, wherein the magnetic field signal spectrum is represented by a series of discrete frequency points, each frequency point corresponding to a complex value representing the amplitude and phase information at the corresponding frequency; In the obtained magnetic field signal spectrum, an extraction threshold is set according to a preset harmonic frequency interval, and key spectrum points located at the preset harmonic frequency interval are extracted based on the extraction threshold.
9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 5 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.
