Massage instrument control method and device and storage medium
By performing Fourier transform and parameter calculation on the external audio signal, the electric pulse signal parameters of the massage device are automatically adjusted, which solves the problem of lack of flexibility and personalization of existing massage devices and improves the user experience.
Patent Information
- Application Number
- CN202510851051.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-23
AI Technical Summary
Existing massage devices lack flexibility and customization capabilities, have limited variations in stimulation frequency and pulse width, lack interactivity and fun during use, and have low patient compliance.
By sampling the external sound source, audio signals in a specific frequency range are obtained. After preprocessing, Fourier transform is performed to obtain the frequency domain amplitude spectrum, calculate the frequency and pulse width adjustment coefficients, and automatically adjust the electrical pulse signal parameters of the massage device.
It realizes automatic adjustment of massager equipment parameters, reduces manual intervention, provides a unique massage experience, and improves user interactivity and fun.
Smart Images

Figure CN120679085A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of massagers, and in particular to a massager control method, device and storage medium. Background Art
[0002] Most massagers currently on the market use one or more combinations of physical pressure, TENS (transcutaneous electrical nerve stimulation), or EMS (electrical muscle stimulation). TENS and EMS have become mainstream products due to their significant pain relief effects and compact size. TENS or EMS stimulates nerves by controlling electrical pulse signals passing through the human body to generate weak currents, thereby reducing pain. Typical operating parameters include a stimulation frequency of 1 to 150 Hz and a pulse width of 50 to 400 μs.
[0003] Although these devices can simulate massage techniques such as pressing, kneading, and tapping, they usually have several fixed stimulation frequency and pulse width parameter waveforms preset for users to choose from. The stimulation frequency and pulse width have limited variations, lack flexibility and personalized customization capabilities, and lack interactivity and fun during use, which reduces patient compliance. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a massager control method, device and storage medium to solve the problems in the prior art that TENS or EMS usually presets several fixed stimulation frequency and pulse width parameter waveforms for users to choose from, the stimulation frequency and pulse width are limited in variation, lack flexibility and personalized customization capabilities, lack interactivity and fun during use, and have low patient compliance.
[0005] According to a first aspect of an embodiment of the present invention, a massager control method is provided, the method comprising:
[0006] Sampling the external sound source to obtain audio signals in a specific frequency range;
[0007] Preprocessing the audio signal;
[0008] Performing Fourier transform on the preprocessed audio signal to convert the time domain audio signal into frequency domain representation;
[0009] Obtaining a frequency domain amplitude spectrum according to the audio signal represented in the frequency domain;
[0010] Obtaining a low-frequency total amplitude value and a high-frequency total amplitude value on the frequency domain amplitude spectrum;
[0011] Obtain the frequency adjustment coefficient and pulse width adjustment coefficient of the massage device respectively;
[0012] Obtaining a basic stimulation frequency of the massage device based on the low-frequency total amplitude value and the frequency adjustment coefficient; obtaining a pulse width of the massage device based on the high-frequency total amplitude value and the pulse width adjustment coefficient;
[0013] The electric pulse signal of the massage device is controlled by the basic stimulation frequency and pulse width of the massage device.
[0014] Preferably,
[0015] Sampling the external sound source to obtain an audio signal within a specific frequency range includes:
[0016] Set the sampling frequency and sampling time, and obtain the audio signal in a specific frequency range based on the set sampling frequency and sampling time.
[0017] Preferably,
[0018] The preprocessing of the audio signal comprises:
[0019] Normalization processing is performed on the audio signal so that the amplitude of the audio signal remains within a preset fixed range.
[0020] Preferably,
[0021] The obtaining of the low-frequency total amplitude value and the high-frequency total amplitude value on the frequency domain amplitude spectrum includes:
[0022] Get the low frequency index range and the high frequency index range respectively;
[0023] Obtain a low-frequency total amplitude value of the frequency domain amplitude spectrum within a low-frequency frequency index range; and obtain a high-frequency total amplitude value of the frequency domain amplitude spectrum within a high-frequency frequency index range.
[0024] Preferably,
[0025] The step of respectively obtaining the low-frequency index range and the high-frequency index range includes:
[0026] Set the sampling rate; obtain the frequency resolution based on the sampling rate and the total number of samples in the audio signal;
[0027] Set the low frequency range and high frequency range respectively;
[0028] A low-frequency index range is obtained based on the frequency resolution and the low-frequency frequency range; and a high-frequency index range is obtained based on the frequency resolution and the high-frequency frequency range.
[0029] Preferably,
[0030] The method of obtaining the frequency adjustment coefficient of the massage device includes:
[0031] Obtaining the maximum stimulation frequency of the massage device; obtaining the maximum low-frequency amplitude value of the frequency domain amplitude spectrum within the low-frequency frequency index range when the volume is at maximum; and obtaining a frequency adjustment coefficient based on the maximum stimulation frequency and the maximum low-frequency amplitude value.
[0032] Preferably,
[0033] The method of obtaining the pulse width adjustment coefficient of the massage device includes:
[0034] Obtaining the maximum pulse width of the massage device; obtaining the maximum high-frequency amplitude value of the frequency domain amplitude spectrum within the high-frequency frequency index range when the volume is at maximum; and obtaining a pulse width adjustment coefficient based on the maximum pulse width and the maximum high-frequency amplitude value.
[0035] According to a second aspect of an embodiment of the present invention, there is provided a massager control device, the device comprising:
[0036] Audio signal sampling module: used to sample external sound sources and obtain audio signals in a specific frequency range;
[0037] Audio signal preprocessing module: used for preprocessing the audio signal;
[0038] Frequency domain conversion module: used to perform Fourier transform on the preprocessed audio signal and convert the time domain audio signal into frequency domain representation;
[0039] Frequency domain amplitude spectrum acquisition module: used to obtain the frequency domain amplitude spectrum according to the audio signal represented in the frequency domain;
[0040] Total amplitude value acquisition module: used to obtain the low-frequency total amplitude value and the high-frequency total amplitude value on the frequency domain amplitude spectrum;
[0041] Adjustment coefficient acquisition module: used to obtain the frequency adjustment coefficient and pulse width adjustment coefficient of the massage device respectively;
[0042] Frequency and pulse width acquisition module: used to acquire the basic stimulation frequency of the massage device based on the low-frequency total amplitude value and the frequency adjustment coefficient; acquire the pulse width of the massage device based on the high-frequency total amplitude value and the pulse width adjustment coefficient;
[0043] Control module: used to control the electric pulse signal of the massage device through the basic stimulation frequency and pulse width of the massage device.
[0044] According to a third aspect of an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores a computer program. When the computer program is executed by a main controller, each step in the massager control method is implemented.
[0045] The technical solutions provided by the embodiments of the present invention may have the following beneficial effects:
[0046] The present application obtains an audio signal in a specific frequency range by sampling an external sound source (such as music); performs Fourier transform on the audio signal after preprocessing to convert the time domain audio signal into a frequency domain representation; obtains a frequency domain amplitude spectrum based on the audio signal represented in the frequency domain; obtains the low-frequency total amplitude value and the high-frequency total amplitude value on the frequency domain amplitude spectrum; obtains the frequency adjustment coefficient and the pulse width adjustment coefficient of the massage device; obtains the basic stimulation frequency of the massage device based on the low-frequency total amplitude value and the frequency adjustment coefficient; obtains the pulse width of the massage device based on the high-frequency total amplitude value and the pulse width adjustment coefficient; controls the electric pulse signal of the massage device through the basic stimulation frequency and pulse width; through the scheme of the present application, the working parameters of the device can be automatically adjusted by analyzing the external audio signal (such as music) to reduce manual intervention; and at the same time, a unique massage experience can be provided to each user according to different types of audio signals.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0049] Figure 1 is a flow chart showing a method for controlling a massager according to an exemplary embodiment;
[0050] Figure 2 is a system schematic diagram of a massager control device according to another exemplary embodiment;
[0051] In the accompanying figure: 1- audio signal sampling module, 2- audio signal preprocessing module, 3- frequency domain conversion module, 4- frequency domain amplitude spectrum acquisition module, 5- total amplitude value acquisition module, 6- adjustment coefficient acquisition module, 7- frequency and pulse width acquisition module, 8- control module. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.
[0053] Example 1
[0054] Figure 1FIG. 1 is a flow chart of a massager control method according to an exemplary embodiment. Figure 1 As shown, the method includes:
[0055] S1, samples the external sound source to obtain the audio signal in a specific frequency range;
[0056] S2, preprocessing the audio signal;
[0057] S3, performing Fourier transform on the preprocessed audio signal to convert the time domain audio signal into a frequency domain representation;
[0058] S4, obtaining a frequency domain amplitude spectrum according to the audio signal represented in the frequency domain;
[0059] S5, obtaining a low-frequency total amplitude value and a high-frequency total amplitude value on the frequency domain amplitude spectrum;
[0060] S6, respectively obtaining the frequency adjustment coefficient and pulse width adjustment coefficient of the massage device;
[0061] S7, obtaining a basic stimulation frequency of the massage device based on the low-frequency total amplitude value and the frequency adjustment coefficient; obtaining a pulse width of the massage device based on the high-frequency total amplitude value and the pulse width adjustment coefficient;
[0062] S8, controlling the electric pulse signal of the massage device by the basic stimulation frequency and pulse width of the massage device;
[0063] It is understandable that when obtaining audio data from an external sound source, such as music, the sound frequency range perceived by the human ear is usually 20Hz-20KHz. The FFT sampling frequency complies with the Nyquist sampling theorem, and the minimum sampling rate Fs should be twice the highest frequency of the sound. Therefore, a reasonable sampling rate Fs ≥ 20KHz * 2 = 40KHz, and a sampling time ≥ 1 / 20 second, to ensure that the audio signal within the frequency range perceived by the human ear is captured;
[0064] The collected audio data is normalized and preprocessed to keep its amplitude within a fixed range. The expression formula is as follows:
[0065]
[0066] A Fourier transform is performed on the preprocessed audio data. In this embodiment, a fast Fourier transform (FFT) is used to convert the time domain audio signal into a frequency domain representation and extract the key frequency components. The expression formula is as follows:
[0067]
[0068] Where N is the total number of samples in the signal, n is the time domain index, which represents the nth sampling point in the input signal, and its value range is n = 0, 1, ..., N-1; k is the frequency index (k ranges from 0 to N-1); X(k) is the kth frequency component in the frequency domain; x norm [n] is the nth sample in the time domain; j is the imaginary unit, satisfying j 2 =-1,e -j2πkn / N represents the rotation factor, also known as the "twiddle factor", which is a complex point on the unit circle;
[0069] The frequency domain amplitude spectrum A[k] is calculated based on the frequency domain representation X[k], and the expression formula is as follows:
[0070]
[0071] Where, represents the real part of X[k], represents the imaginary part of X[k];
[0072] This embodiment hopes to use the low-frequency part to control the basic stimulation frequency f of TENS / EMS T , and use the high frequency part to control the pulse width of TENS / EMS Therefore, this embodiment sets a low frequency range, for example, 0≤f k <301.49Hz and high frequency range, such as 301.49≤f k <4307Hz;
[0073] Set the sampling rate Fs and calculate the frequency resolution Δf based on the sampling rate Fs and the total number of signal samples N. The expression formula is as follows:
[0074]
[0075] Then, the low-frequency index range and the high-frequency index range k are obtained according to the low-frequency frequency range or the high-frequency frequency range and the frequency resolution Δf, respectively. The expression formula is as follows:
[0076] f k =k*Δf
[0077] For the low frequency part (assuming 0≤f k <301.49Hz, Fs is set to 44100Hz, and the total number of samples N (that is, the number of FFT points) of the signal is set to 1024, so the frequency resolution Then corresponding to 0≤k<7), calculate the total low-frequency amplitude value:
[0078]
[0079] Corresponding to the high frequency part (assuming 301.49≤f k <4307Hz, Fs is set to 44100Hz, and the total number of samples N (that is, the number of FFT points) of the signal is set to 1024, so the frequency resolution Then corresponding to 7≤k<100), calculate the total high-frequency amplitude value:
[0080]
[0081] Then, we need to obtain the frequency adjustment coefficient a of TENS / EMS, specifically: obtain the maximum stimulation frequency of TENS / EMS, usually 150Hz; then obtain the low-frequency amplitude value max(∑ k∈low_freq A[k]), then a=150 / max(∑ k∈low_freq A[k]); where low_freq represents the selected low frequency range;
[0082] Similarly, it is also necessary to obtain the pulse width adjustment coefficient b of TENS / EMS, specifically: obtain the maximum pulse width of TENS / EMS, usually 400us; then obtain the high-frequency amplitude value max (∑ k∈hig_freq A[k]), then b=400 / max(∑ k∈hig_freq A[k]); where hig_freq represents the selected high frequency range;
[0083] According to the total low-frequency amplitude value A low And the frequency adjustment coefficient a is used to calculate the basic stimulation frequency f of TENS / EMS T , the expression formula is:
[0084] f T =a*A low
[0085] According to the high frequency total amplitude value A hig And the pulse width adjustment coefficient b is used to calculate the pulse width of TENS / EMS The expression formula is:
[0086]
[0087] The basic stimulation frequency f obtained by the above calculation T and pulse width Adjust the parameters of TENS / EMS to automatically adjust the working parameters of TENS / EMS equipment and reduce manual intervention; it can also provide each user with a unique massage experience based on different audio signals (such as music).
[0088] Example 2
[0089] Figure 2 FIG. 1 is a system diagram of a massager control device according to another exemplary embodiment, the device comprising:
[0090] Audio signal sampling module 1: used to sample the external sound source and obtain the audio signal in a specific frequency range;
[0091] Audio signal preprocessing module 2: used for preprocessing the audio signal;
[0092] Frequency domain conversion module 3: used to perform Fourier transform on the preprocessed audio signal to convert the time domain audio signal into frequency domain representation;
[0093] Frequency domain amplitude spectrum acquisition module 4: used to obtain the frequency domain amplitude spectrum according to the audio signal represented in the frequency domain;
[0094] Total amplitude value acquisition module 5: used to obtain the low-frequency total amplitude value and the high-frequency total amplitude value on the frequency domain amplitude spectrum;
[0095] Adjustment coefficient acquisition module 6: used to obtain the frequency adjustment coefficient and pulse width adjustment coefficient of the massage device respectively;
[0096] Frequency and pulse width acquisition module 7: used to acquire the basic stimulation frequency of the massage device based on the low-frequency total amplitude value and the frequency adjustment coefficient; and acquire the pulse width of the massage device based on the high-frequency total amplitude value and the pulse width adjustment coefficient;
[0097] Control module 8: used to control the electric pulse signal of the massage device through the basic stimulation frequency and pulse width of the massage device.
[0098] Example 3:
[0099] This embodiment provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a host controller, each step in the above method is implemented;
[0100] It is understandable that the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0101] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0102] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" is at least two.
[0103] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0104] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0105] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0106] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
[0107] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0108] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0109] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A massager control method, characterized in that: The method comprises: Sampling the external sound source to obtain audio signals in a specific frequency range; Preprocessing the audio signal; Performing Fourier transform on the preprocessed audio signal to convert the time domain audio signal into frequency domain representation; Obtaining a frequency domain amplitude spectrum according to the audio signal represented in the frequency domain; Obtaining a low-frequency total amplitude value and a high-frequency total amplitude value on the frequency domain amplitude spectrum; Obtain the frequency adjustment coefficient and pulse width adjustment coefficient of the massage device respectively; Obtaining a basic stimulation frequency of the massage device based on the low-frequency total amplitude value and the frequency adjustment coefficient; obtaining a pulse width of the massage device based on the high-frequency total amplitude value and the pulse width adjustment coefficient; The electric pulse signal of the massage device is controlled by the basic stimulation frequency and pulse width of the massage device.
2. The method according to claim 1, characterized in that Sampling the external sound source to obtain an audio signal within a specific frequency range includes: Set the sampling frequency and sampling time, and obtain the audio signal in a specific frequency range based on the set sampling frequency and sampling time.
3. The method according to claim 2, characterized in that The preprocessing of the audio signal comprises: Normalization processing is performed on the audio signal so that the amplitude of the audio signal remains within a preset fixed range.
4. The method according to claim 3, characterized in that The obtaining of the low-frequency total amplitude value and the high-frequency total amplitude value on the frequency domain amplitude spectrum includes: Get the low frequency index range and the high frequency index range respectively; Obtain a low-frequency total amplitude value of the frequency domain amplitude spectrum within a low-frequency frequency index range; and obtain a high-frequency total amplitude value of the frequency domain amplitude spectrum within a high-frequency frequency index range.
5. The method according to claim 4, characterized in that The step of respectively obtaining the low-frequency index range and the high-frequency index range includes: Set the sampling rate; obtain the frequency resolution based on the sampling rate and the total number of samples in the audio signal; Set the low frequency range and high frequency range respectively; A low-frequency index range is obtained based on the frequency resolution and the low-frequency frequency range; and a high-frequency index range is obtained based on the frequency resolution and the high-frequency frequency range.
6. The method according to claim 5, characterized in that The method of obtaining the frequency adjustment coefficient of the massage device includes: Obtaining the maximum stimulation frequency of the massage device; obtaining the maximum low-frequency amplitude value of the frequency domain amplitude spectrum within the low-frequency frequency index range when the volume is at maximum; and obtaining a frequency adjustment coefficient based on the maximum stimulation frequency and the maximum low-frequency amplitude value.
7. The method according to claim 6, characterized in that The method of obtaining the pulse width adjustment coefficient of the massage device includes: Obtaining the maximum pulse width of the massage device; obtaining the maximum high-frequency amplitude value of the frequency domain amplitude spectrum within the high-frequency frequency index range when the volume is at maximum; and obtaining a pulse width adjustment coefficient based on the maximum pulse width and the maximum high-frequency amplitude value.
8. A massager control device, characterized in that: The device comprises: Audio signal sampling module: used to sample external sound sources and obtain audio signals in a specific frequency range; Audio signal preprocessing module: used for preprocessing the audio signal; Frequency domain conversion module: used to perform Fourier transform on the preprocessed audio signal and convert the time domain audio signal into frequency domain representation; Frequency domain amplitude spectrum acquisition module: used to obtain the frequency domain amplitude spectrum according to the audio signal represented in the frequency domain; Total amplitude value acquisition module: used to obtain the low-frequency total amplitude value and the high-frequency total amplitude value on the frequency domain amplitude spectrum; Adjustment coefficient acquisition module: used to obtain the frequency adjustment coefficient and pulse width adjustment coefficient of the massage device respectively; Frequency and pulse width acquisition module: used to acquire the basic stimulation frequency of the massage device based on the low-frequency total amplitude value and the frequency adjustment coefficient; acquire the pulse width of the massage device based on the high-frequency total amplitude value and the pulse width adjustment coefficient; Control module: used to control the electric pulse signal of the massage device through the basic stimulation frequency and pulse width of the massage device.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the main controller, each step of the massager control method according to any one of claims 1 to 7 is implemented.