Intelligent control method and system of massage equipment based on rhythm information
By acquiring and analyzing music acoustic signals and user voice signals through multi-channel sensors, a frequency band energy matrix and coding density parameters are generated. Beats and breathing envelopes are extracted, phase differences are corrected, and a position-pressure response matrix is generated by combining spatial positioning. This solves the shortcomings of existing massage devices in synchronous analysis and realizes more natural and personalized massage control.
Patent Information
- Application Number
- CN202511842406.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-02-17
AI Technical Summary
Existing massage devices struggle to achieve synchronous analysis in the coupled processing of musical acoustic signals and voice signals, leading to control response delays, jitter, or distortion. Furthermore, the lack of integration of spatial and rhythmic information negatively impacts user comfort and natural interactive experience.
The system collects music acoustic signals and user voice signals through multi-channel sensors, performs frequency band decomposition and coding compression rate analysis, generates frequency band energy matrix and coding density parameters, extracts music beat envelope and voice breathing envelope, calculates phase difference and corrects offset, and combines spatial positioning vectors to generate position-pressure response matrix, forming a multi-level pressure control command set to trigger the movement of massage components.
It achieves joint control of massage devices in both spatial and rhythmic dimensions, enhancing the level of intelligence and human-computer interaction experience, ensuring natural coordination and personalized adjustment of massage movements, and improving user comfort and immersion.
Smart Images

Figure CN121545545A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of speech recognition and processing technology, and in particular to an intelligent control method and system for a massage device based on rhythm information. Background Technology
[0002] With the continuous development of smart hardware and human-computer interaction technology, massage devices are gradually evolving from traditional mechanical control to multimodal perception and intelligent control. Early massage devices mostly used fixed programs to drive the movement of mechanical parts, unable to dynamically adjust according to individual user differences or environmental changes, resulting in insufficient comfort and adaptability. In recent years, with advancements in sensor technology, audio processing technology, and embedded algorithms, some research has attempted to introduce external environmental signals and human physiological signals into massage control. For example, adjusting massage frequency by collecting music rhythm information, or using breathing and heart rate signals to drive massage rhythms, thereby enhancing the synchronization and immersion between the device and the user. However, existing research mostly remains at the level of single-signal driving, failing to effectively integrate multi-channel, multimodal information, making it difficult to achieve stable and efficient control strategies in dynamic and complex application scenarios. Especially in the coupling processing of musical acoustic signals and speech signals, traditional methods often ignore the differences between the two in terms of spectral distribution, timing characteristics, and phase synchronization, leading to problems such as delays, jitter, or distortion in the device control response.
[0003] To address the aforementioned shortcomings, some existing technologies attempt to improve the precision of massage control through signal feature extraction and pattern matching. For example, many methods divide music into beats based on the energy distribution of audio signals, or use deep learning methods to recognize speech features to drive the massage program. However, these methods still have two limitations: First, most methods only focus on the intensity or frequency distribution of audio signals, lacking synchronous analysis of dynamic targets (such as the rhythm of speech breathing and the beat of music), resulting in insufficient rhythm consistency; second, in the control strategy generation stage, existing systems struggle to combine spatial information with rhythmic information, lacking a mapping mechanism between the direction of the sound source and the user's perceived position, making it impossible for the massage response to form precise spatial distribution control. Consequently, existing technologies struggle to balance natural interactive experience and physiological comfort in practical applications, and are prone to causing sensory fatigue in users during prolonged use. Summary of the Invention
[0004] In view of the problems existing in current speech recognition and acoustic analysis technologies, this invention is proposed.
[0005] Therefore, the problem to be solved by this invention is how to achieve joint control in the spatial and rhythmic dimensions, so as to improve the overall intelligence level and human-computer interaction experience of massage equipment.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides an intelligent control method for a massage device based on rhythmic information, comprising: acquiring external musical acoustic signals and user voice signals through a multi-channel sensor assembly, and performing frequency band decomposition and coding compression rate analysis respectively to generate a frequency band energy matrix and coding density parameters; extracting the musical beat envelope and the voice breathing envelope based on the frequency band energy matrix, and calculating the phase difference using the timestamp data output by the sensor assembly; when the phase difference is lower than the phase difference threshold, jointly superimposing the musical beat envelope and the voice breathing envelope to obtain a synchronization control envelope; otherwise, correcting the envelope synchronization offset; using the sensor assembly to locate the direction of the voice source, generating a spatial positioning vector, and establishing a mapping relationship with the synchronization control envelope to form a position-pressure response matrix; inputting the position-pressure response matrix to the massage control unit, and combining it with the status label of the coding density parameters to generate a multi-level pressure control instruction set to trigger the movement of the massage assembly.
[0007] As a preferred embodiment of the intelligent control method for the massage device based on rhythmic information described in this invention, the frequency band decomposition includes: acquiring external music acoustic signals and user voice signals respectively through acoustic sensors; dividing the acquired signals into frames according to a fixed-length time window and setting an overlap rate of m%; recording the start and end time index and source tag for each frame to obtain a music frame set and a voice frame set; performing Fast Fourier Transform on the music frame set and the voice frame set respectively to extract the spectrum within the audible frequency range; dividing the spectrum into multiple fixed frequency bands; calculating the sum of squared amplitudes of each fixed frequency band within each frame to obtain the frequency band energy vector corresponding to each frame; arranging the frequency band energy vectors of all frames in chronological order to form a two-dimensional matrix, wherein... The matrix rows correspond to time frames, and the columns correspond to frequency bands, resulting in a frequency band energy matrix. The coding compression rate parsing includes: inputting the signal of the same time frame into a low-bit-rate encoder and a high-bit-rate encoder respectively, and recording the number of bits after compression respectively; calculating the bit occupancy difference under low bit-rate and high bit-rate for the energy vector of each frame in each frequency band, and storing it as a coding difference vector; aligning the frequency band energy matrix and the coding difference vector frame by frame; for each frequency band in each time frame, if it shows rapid growth in the frequency band energy matrix, and the bit occupancy difference of the coding difference vector is greater than the average level of the two adjacent frames, then the frequency band is assigned a high-density label; otherwise, it is assigned a low-density label; and collecting the labels of all frames to obtain a coding density parameter sequence that changes over time.
[0008] As a preferred embodiment of the intelligent control method for the massage device based on rhythm information described in this invention, the calculation of phase difference includes: separating the music frame set and the speech frame set from the output frequency band energy matrix according to the source label; for the music frame set, identifying the peak sequence of energy in each frequency band and forming a continuous music beat envelope; for the speech frame set, forming a speech breathing envelope based on the low-frequency component fluctuations in the frequency band energy matrix; each envelope sequence maintains a time frame index; mapping the time indexes of the music beat envelope and the speech breathing envelope to the timestamp data output by the sensor component, and calculating the phase difference sequence between the two envelopes frame by frame.
[0009] As a preferred embodiment of the intelligent control method for a massage device based on rhythmic information according to the present invention, the method comprises: determining, frame by frame, whether the temporal offset of the music beat envelope and the voice breathing envelope falls within the logical low offset range based on the output phase difference sequence; for frames falling within the logical low offset range, combining and superimposing the music beat envelope and the voice breathing envelope frame by frame to form a synchronization control envelope sequence; for frames exceeding the low offset range, performing logical offset correction on the music beat envelope or the voice breathing envelope based on the envelope trend relationship of adjacent time frames; the logical offset correction includes: marking frames exceeding the low offset range as frames to be corrected, extracting the phase difference change trend of several frames before and after to form a local trend sequence, and deriving the temporal offset direction; logically offsetting the music beat envelope or the voice breathing envelope of the frame to be corrected along the time axis according to the temporal offset direction to align with the trend of adjacent frames; the logically offset corrected music beat envelope and voice breathing envelope are used to generate the synchronization control envelope.
[0010] As a preferred embodiment of the intelligent control method for a massage device based on rhythm information according to the present invention, the logical low-offset interval includes: arranging the phase difference sequence according to the time frame index to form a continuous frame sequence, and recording the phase difference value and time position of each frame; performing time consistency judgment on the phase difference values of several consecutive frames; the time consistency judgment is: checking whether the phase difference change remains within a preset continuous change threshold to form a low-offset candidate interval; within the low-offset candidate interval, performing logical judgment on the fluctuation trend of the phase difference change: if the phase difference fluctuation is lower than a first variance threshold, then confirming the low-offset candidate interval as a low-offset interval; if it is higher than a second variance threshold, then excluding it; the first variance threshold is a to b times the overall variance of the phase difference sequence; the second variance threshold is c to d times the overall variance of the phase difference sequence; where a, b, c, and d are constants.
[0011] As a preferred embodiment of the intelligent control method for the massage device based on rhythmic information described in this invention, the generation of the spatial positioning vector includes: extracting the envelope value of each time frame from the synchronous control envelope sequence and recording the corresponding time index; dividing the user voice signal collected by the sensor component into frames according to the same time index to ensure that each frame of user voice signal corresponds one-to-one with the synchronous control envelope; for the user voice signal of each time frame, analyzing the sound energy distribution using the multi-channel input of the sensor component, identifying the direction of local sound energy concentration, marking each direction as a sound source candidate, and forming a sound source candidate set for the time frame. Each candidate vector includes a directional component and a frequency band energy component; for adjacent frames and Retrieve the corresponding candidate sound source sets respectively and Based on the directional differences between the candidate sound source sets, a set of distinguishable sound sources is generated. For each candidate vector, a continuity score is constructed, which is derived by logically superimposing three sub-indicators: Occurrence consistency sub-indicator: counting the number of times candidates with the same direction as the candidate vector appear in the previous few frames and mapping it to a score; Energy stability sub-indicator: comparing the frequency band energy components of the candidate vector with the frequency band energy components in the same direction of the preceding and following frames, and dividing the vector into different segments based on the trend; Difference variation sub-indicator: utilizing the set of distinguishable sound sources generated from adjacent frames. The system calculates the number of new or missing data points in the data and applies penalties or bonuses to the candidate vectors. It then merges the three sub-indicators into a single continuity score according to predetermined logical rules. All candidate vectors in the current frame are sorted in descending order of their continuity scores. If several candidate vectors with the highest scores are tied, a historical consistency priority rule is adopted: the candidate vector that appears most frequently in the neighboring sector pointed to by the final direction vector in the previous frame is selected as the main direction vector for the current frame. A sequence of spatial positioning vectors for consecutive frames is formed based on the main direction vectors of each frame.
[0012] As a preferred embodiment of the intelligent control method for the massage device based on rhythm information described in this invention, the generation of the position-pressure response matrix includes: mapping the spatial positioning vector and the synchronization control envelope of each frame one-to-one according to the time index to form a frame-level association table; within each time frame, combining the main direction vector and frequency band energy components of the spatial positioning vector with the corresponding synchronization control envelope value to generate a frame-level position-pressure mapping relationship; accumulating all frame-level position-pressure mapping relationships according to the time sequence to form a continuous multi-frame mapping sequence, thereby generating the position-pressure response matrix.
[0013] As a preferred embodiment of the intelligent control method for the massage device based on rhythm information described in this invention, the generation of a multi-level pressure control instruction set includes: aligning the position-pressure response matrix and the sequence of encoded density parameters of each frame according to the time index; generating multi-level pressure control instructions frame by frame based on the spatial vector information of the position-pressure response matrix of each frame and the status label of the corresponding encoded density parameter, including the specific position of the massage component and the pressure level; arranging the multi-level pressure control instructions generated in each frame according to the time sequence to form a continuous control instruction stream, connecting the massage action with the music rhythm, breathing rhythm and the direction of the voice source for synchronization.
[0014] Secondly, the present invention provides an intelligent control system for a massage device based on rhythm information, comprising: a signal acquisition module, used to acquire external musical acoustic signals and user voice signals through a multi-channel sensor component, and perform frequency band decomposition and coding compression rate analysis respectively to generate a frequency band energy matrix and coding density parameters; The envelope phase module is used to extract the music beat envelope and the voice breathing envelope based on the frequency band energy matrix, and calculate the phase difference through the timestamp data output by the sensor components. When the phase difference is lower than the phase difference threshold, the music beat envelope and the voice breathing envelope are jointly superimposed to obtain the synchronization control envelope; otherwise, the envelope synchronization offset is corrected. The spatial positioning module is used to locate the direction of the speech source using the sensor components, generate a spatial positioning vector, and establish a mapping relationship with the synchronous control envelope to form a position-pressure response matrix; The pressure control module is used to input the position-pressure response matrix to the massage control unit, and generate a multi-level pressure control instruction set by combining the status label of the encoded density parameter to trigger the movement of the massage component.
[0015] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, they implement the steps of the intelligent control method for a massage device based on rhythm information as described in the first aspect of the present invention.
[0016] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, they implement the steps of the intelligent control method for a massage device based on rhythm information as described in the first aspect of the present invention.
[0017] The beneficial effects of this invention are as follows: This invention uses rhythm information to intelligently control the massage device, achieving synchronous matching of music rhythm, user breathing and voice signals, making the massage movements more natural and coordinated, and significantly improving comfort and immersion; at the same time, this invention combines spatial positioning and pressure response adjustment to ensure the accuracy and personalization of the massage area and intensity, enabling the device to dynamically adjust the control strategy according to the user's state.
[0018] Overall, this invention effectively overcomes the problems of monotonous rhythm and insufficient adaptability of traditional massage devices, and provides a multimodal fusion and more interactive intelligent control scheme, which has good practical value and application prospects. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of an intelligent control method for a massage device based on rhythm information.
[0021] Figure 2 This is a structural diagram of an intelligent control system for a massage device based on rhythm information. Detailed Implementation
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0025] Figure 1 This is a flowchart of an intelligent control method for a massage device based on rhythm information according to an embodiment of the present invention. Figure 1 As shown, the intelligent control method for a massage device based on rhythm information includes: S1: External music acoustic signals and user voice signals are acquired through a multi-channel sensor assembly, and frequency band decomposition and coding compression rate analysis are performed respectively to generate frequency band energy matrix and coding density parameters.
[0026] S1.1: Frequency band decomposition includes the following steps: S1.1.1: Acoustic sensors are used to collect external music acoustic signals and user voice signals respectively. The collected signals are divided into frames according to a fixed-length time window and an overlap rate of m%. The start and end time index and source tag of each frame are recorded to obtain a music frame set and a voice frame set. Where m is a constant.
[0027] For example, the acquired signal is first divided into several time frames. The length of each frame is determined by the sampling rate and a preset frame length. For instance, when the sampling rate is 16kHz and the frame length is 25ms, the length of a single frame is 400 points. Furthermore, to avoid losing the dynamic features across frame boundaries after framing, the preferred value range for the frame overlap rate (m%) in this invention is 30% to 50%, ensuring a smooth transition of the signal during frequency domain conversion and effectively suppressing spectral leakage effects.
[0028] S1.1.2: Perform Fast Fourier Transform on the music frame set and the speech frame set respectively to extract the spectrum within the audible frequency range.
[0029] S1.1.3: Divide the spectrum into multiple fixed frequency bands (such as low frequency, mid-low frequency, mid frequency and high frequency), and calculate the sum of squared amplitudes of each fixed frequency band in each frame to obtain the frequency band energy vector corresponding to each frame.
[0030] The boundaries of frequency band division can be set according to proportional division (such as logarithmic scale) or equal interval division. For example, low frequency is 20–250Hz, mid-low frequency is 250–1kHz, mid frequency is 1–4kHz, and high frequency is 4–20kHz, which can take into account the characteristics of human hearing perception and the energy concentration distribution of speech and music.
[0031] It should be noted that the present invention can explicitly reflect the energy distribution characteristics in different frequency ranges through the above operations, and suppress the influence of local noise.
[0032] S1.1.4: Arrange the frequency band energy vectors of all frames in chronological order to form a two-dimensional matrix, where the rows of the matrix correspond to time frames and the columns correspond to frequency bands, thus obtaining the frequency band energy matrix.
[0033] As can be seen, compared with independent energy calculation in a single frame, the matrix representation of this invention has global visualization features across the time dimension, making it easier to identify energy trends that change over time. Through the construction of a two-dimensional matrix, joint analysis in the time and frequency domains is achieved, providing a unified data structure for subsequent integration with coding compression ratios.
[0034] S1.2: The following steps are used to analyze the encoding compression ratio: S1.2.1: Input the signal of the same time frame into a low bit rate encoder (e.g., 16kbps) and a high bit rate encoder (e.g., 64kbps) respectively, and record the number of bits after compression respectively.
[0035] The encoder can employ standardized speech or audio compression algorithms, such as AAC, AMR, or Opus. Low-bit-rate encoders prioritize preserving basic intelligibility information, while high-bit-rate encoders retain more detail. By recording the number of bits after compression, the coding resource usage of the signal at different bit rates can be quantified. This not only provides basic data for subsequent interpolation calculations but also objectively reflects the differences in signal complexity under different compression conditions.
[0036] S1.2.2: For the energy vector of each frame in each frequency band, calculate the bit occupancy difference at low bit rate and high bit rate, and store it as a coding difference vector.
[0037] The encoded difference vector, composed of differences across all frequency bands, quantifies the degree of complexity variation of a signal across different frequency bands. By calculating these differences, the influence of varying global signal energy can be eliminated, focusing instead on differences in frequency band complexity, thereby improving the accuracy of density determination.
[0038] The frequency band energy matrix and coding difference vector are aligned frame by frame. For each frequency band in each time frame, if it shows rapid growth in the frequency band energy matrix (e.g., when the energy value of a certain frame increases by more than the growth threshold (e.g., 20%–30%) compared to the average energy value of the previous two frames in the same frequency band), and the bit occupancy difference of the coding difference vector in that frequency band is greater than the local average level of that frequency band in the two adjacent frames), then the frequency band is assigned a high-density label; otherwise, it is assigned a low-density label. By independently calculating the local average value at the frequency band level, it is ensured that the growth determination and the comparison of bit occupancy difference are performed on the same scale, avoiding logical inconsistencies caused by cross-frequency band averaging. The labels of all frames are collected to obtain the coding density parameter sequence that changes over time.
[0039] Through the above operations, this invention combines the dual conditions of energy dynamics and coding complexity to avoid misjudgments caused by single-dimensional judgment, thereby achieving a more accurate description of the complexity of speech and music signals.
[0040] S2: Extract the music beat envelope and the speech breathing envelope based on the frequency band energy matrix, and calculate the phase difference using the timestamp data output by the sensor components; when the phase difference is lower than the phase difference threshold, combine the music beat envelope and the speech breathing envelope to obtain the synchronization control envelope; otherwise, correct the envelope synchronization offset.
[0041] The calculation of phase difference includes: From the output frequency band energy matrix, the music frame set and the speech frame set are separated according to the source label: For a set of music frames, identify the peak sequence of energy in each frequency band and form a continuous musical beat envelope.
[0042] For a set of speech frames, a speech breathing envelope is formed based on the fluctuations of low-frequency components in the frequency band energy matrix.
[0043] Each envelope sequence maintains a time frame index. In practice, if there is micro-scale time-base drift in multi-channel acquisition, linear interpolation correction is performed on the timestamps in this stage to eliminate fixed deviations between channels, thereby ensuring that the time mapping error between music and speech frames is controlled within an acceptable range of single frame duration.
[0044] The temporal indices of the musical beat envelope and the vocal respiration envelope are mapped to the timestamp data output by the sensor components, and the phase difference sequence between the two envelopes is calculated frame by frame. In this invention, the phase difference is expressed as a normalized scale of time offset relative to the local musical beat cycle for subsequent statistical analysis and determination. This design balances the local stability of the beat cycle with the slow variability of the respiration cycle, ensuring that the phase difference measurement is comparable under different combinations of beat rate and respiration rate.
[0045] Furthermore, based on the output phase difference sequence, it is determined frame by frame whether the temporal offset of the music beat envelope and the speech breathing envelope falls within the low logical offset range: For frames falling within the low logical offset range, the music beat envelope and the speech breathing envelope are jointly superimposed frame by frame to form a synchronization control envelope sequence. This joint superposition preserves the energy characteristics and temporal continuity of the two signals, allowing the control envelope to reflect the dynamic coupling of music rhythm and user breathing. This invention employs weighted fusion, where weights are dynamically allocated by frame-level coding density parameters or frequency band reliability indicators: when the coding density indicates more reliable speech information, the speech breathing envelope is given higher weight; conversely, the beat dominance of the music beat envelope is preferentially preserved. This weighting method uses data-driven priority instead of fixed weights, ensuring that the joint envelope adaptively adjusts under different music-speech dominance scenarios. The joint superposition process also performs short-term smoothing of the synthesis result to maintain temporal continuity and avoid abrupt changes.
[0046] For frames that exceed the low offset range, logical offset correction is performed on the music beat envelope or speech breathing envelope based on the envelope trend relationship between adjacent time frames.
[0047] It should be noted that the logical low offset interval includes: arranging the phase difference sequence according to the time frame index to form a continuous frame sequence, and recording the phase difference value and time position of each frame; performing a time consistency judgment on the phase difference values of several consecutive frames; the time consistency judgment is: checking whether the phase difference change remains within a preset continuous change threshold to form a low offset candidate interval; within the low offset candidate interval, performing a logical judgment on the fluctuation trend of the phase difference change: if the phase difference fluctuation is lower than the first variance threshold, then the low offset candidate interval is confirmed as a low offset interval; if it is higher than the second variance threshold, then it is excluded; the first variance threshold is a to b times the overall variance of the phase difference sequence; the second variance threshold is c to d times the overall variance of the phase difference sequence; where a, b, c, and d are constants.
[0048] Furthermore, logical offset correction includes: For frames that exceed the low offset range, they are marked as frames to be corrected, and the phase difference change trend of several frames before and after them is extracted to form a local trend sequence to deduce the temporal offset direction. According to the temporal offset direction, the music beat envelope or speech breathing envelope of the frame to be corrected is logically offset along the time axis to align with the trend of adjacent frames. The music beat envelope and speech breathing envelope after logical offset correction are used to generate the synchronization control envelope.
[0049] Specifically, all frames exceeding the low offset range are collected chronologically as a sequence of frames to be corrected. For each frame to be corrected, the phase difference changes of several frames before and after it are extracted to form a local trend sequence. The local trend sequence is used to determine whether the temporal offset accumulates forward (breathing lags behind the beat) or backward (breathing leads the beat), and is used to determine the direction of correction. The above trend extraction uses sliding linear fitting or median difference method to ensure robustness to outliers.
[0050] After determining the offset direction based on the local trend sequence, the musical beat envelope or vocal breathing envelope of the target frame is logically offset along the time axis to align with the trend of adjacent frames. This logical offset involves translating the envelope events on the time index and applying interpolation corrections (e.g., spline or linear interpolation based on adjacent frames) to align or bring the key events (peaks or rising edges) of the corrected frame closer to their corresponding events in neighboring frames. These operations employ time offsets at the integer frame or sub-frame level, supplemented by continuous interpolation, to avoid abrupt changes.
[0051] After offsetting, a consistency check should be performed on the correction results: the corrected phase difference sequence is re-included in the local window to calculate the local variance and continuity judgment. If the correction significantly reduces the local variance and enters the low offset interval standard, the correction is accepted and the corrected envelope is incorporated into the synchronization control envelope; otherwise, the original envelope is rolled back and retained, and a backoff strategy is triggered in subsequent frames to avoid overcorrection of short-term noise.
[0052] As can be seen, this invention, through data-adaptive peak determination, local period normalization, and variance comparison rules, can provide comparable and robust phase difference characterization under different combinations of music beat rate and user breathing rate, reducing the incomparability problem based on absolute time difference. This improvement is beneficial to enhancing the accuracy of beat-breath coupling determination; and effectively avoids the subjectivity of a single threshold, making the determination process reviewable, adjustable, and data-driven. In offset correction, a closed-loop operation of local trend derivation, reversibility correction, and result verification is adopted, which can avoid overfitting correction of short-term noise while ensuring time continuity, thereby improving the stability of the control envelope and the naturalness of massage feedback, and reducing the negative impact of misalignment triggering on user experience and safety.
[0053] S3: Use the sensor components to locate the direction of the voice source, generate a spatial positioning vector, and establish a mapping relationship with the synchronous control envelope to form a position-pressure response matrix.
[0054] S3.1: Generation of spatial positioning vectors.
[0055] Extract the envelope value of each time frame from the synchronization control envelope sequence and record the corresponding time index; divide the user voice signal collected by the sensor components into frames according to the same time index to ensure that each frame of user voice signal corresponds one-to-one with the synchronization control envelope.
[0056] For each time frame of the user's speech signal, the sound energy distribution is analyzed using the multi-channel input of the sensor components to identify the direction of local sound energy concentration. Each direction is marked as a candidate sound source, forming a candidate sound source set for that time frame. Each candidate vector includes a directional component and a frequency band energy component; the directional component is a spatial direction description inferred from the multi-channel arrival time difference or channel relative energy ratio of the sensor component, denoted as the directional unit.
[0057] Frequency band energy component: The energy projection of the sensor channel corresponding to the candidate vector is associated with the frequency band energy value of the corresponding frame of the frequency band energy matrix output by S1 to form the energy identifier of the candidate vector.
[0058] The aforementioned directional components and frequency band energy components together constitute a complete description of the candidate vector, which is used for subsequent continuity and priority determination.
[0059] For adjacent frames and Retrieve the corresponding candidate sound source sets respectively and Based on the directional differences between the candidate sound source sets, a set of distinguishable sound sources is generated. ; indicates changes in direction and the addition or disappearance of candidate sound sources during the time migration process.
[0060] Furthermore, a continuity score is constructed for each candidate vector, which is derived by logically superimposing three sub-indicators: Consistency sub-index: Count the number of times candidates with the same direction as the candidate vector appear in the first few frames (direction consistency is obtained by comparing the relative deviation of the directions), and map the number of occurrences to the frame number to get the score.
[0061] Energy stability sub-index: Compare the frequency band energy components of the candidate vector with the frequency band energy components in the same direction of the preceding and following frames, and divide the data into different segments based on the trend. For example, using frequency band energy components in the same direction to form a time series, calculate the local slope and local variance. If the local slope is less than the first-level slope threshold and the local variance is less than the first-level variance threshold, it is judged as a "stable segment"; if the local slope is greater than the first-level slope threshold but the energy increases continuously, it is a "rising segment"; if the energy drops sharply, it is a "decaying segment", and finally assign values according to the segment type.
[0062] Difference variation sub-index: a set of distinguishable sound sources generated from adjacent frames. The addition or disappearance of information in the source set is used to penalize or reward the candidate vector. For example, if a candidate vector is a "new" item in the distinguishable source set, a moderate penalty (-0.2) is given; if it is a "continuous" item, a reward (e.g., +0.1) is given; and if it is a "disappeared" item, a penalty (e.g., -0.3) is given.
[0063] The three sub-indicators are weighted and summed to form a single continuous score.
[0064] All candidate vectors in the current frame are sorted in descending order of continuity score. If several candidate vectors with the highest scores are tied, a historical consistency priority rule is adopted: the candidate vector that appears most frequently in the neighboring sector pointed to by the final direction vector in the previous frame is selected as the main direction vector of the current frame. If a candidate lags behind its neighboring candidates twice consecutively in terms of energy sequence or occurrence consistency, it is marked as an anomaly and removed. A spatial positioning vector sequence for consecutive frames is formed based on the main direction vector of each frame.
[0065] As can be seen, the present invention adopts a continuity determination rule that combines statistical occurrence frequency and energy trend, which can distinguish between real continuous sound sources and transient noise or echoes without relying on fixed empirical thresholds, thereby improving the robustness and reliability of frame-to-frame direction selection.
[0066] S3.2: Generation of the position-pressure response matrix.
[0067] The spatial positioning vector and synchronization control envelope of each frame are mapped one-to-one according to the time index to form a frame-level association table.
[0068] Within each time frame, the main direction vector and frequency band energy components of the spatial positioning vector are combined with the corresponding synchronization control envelope value to generate a frame-level position-pressure mapping relationship. All frame-level position-pressure mapping relationships are accumulated over time to form a continuous multi-frame mapping sequence, generating a position-pressure response matrix. The position-pressure response matrix has frames as rows and device position units (or mapped body partitions) as columns. Matrix elements represent the pressure response potential at the corresponding position in that time frame. This matrix is obtained by combining the spatial positioning vector of each frame with the corresponding synchronization control envelope value according to the mapping rules and accumulating them over time.
[0069] The process involves the following steps: within each time frame, the main direction vector of the spatial positioning vector is used to determine the target area of the massage device; then, the energy intensity level of the area is determined based on the frequency band energy component corresponding to that direction; subsequently, the energy intensity is combined with the synchronization control envelope value according to the time index, so that the envelope value modulates the energy intensity in a time sequence, thereby obtaining the pressure response value at that time frame and spatial location.
[0070] S4: Input the position-pressure response matrix into the massage control unit, and combine it with the status label of the encoded density parameter to generate a multi-level pressure control instruction set to trigger the movement of the massage component.
[0071] S4.1: Align the position-pressure response matrix and coding density parameter sequence of each frame according to the time index.
[0072] S4.2: Based on the spatial vector information of the position-pressure response matrix of each frame and the status label of the corresponding encoded density parameter, generate multi-level pressure control instructions frame by frame, including the specific position of the massage component and the pressure level.
[0073] Specifically, within each frame, the main directional component of the spatial positioning vector is read and mapped to the actual physical location of the massage component (such as the specific area coordinates of the back, shoulders, waist, etc.). This mapping relationship is given by the calibration table before the device leaves the factory, for example, "left sound source direction → left shoulder massage unit," and can be dynamically adjusted in personalized settings. This ensures that the massage actions triggered by voice and music have a clear body landing point, improving the intuitiveness of the user experience.
[0074] The target pressure value is obtained by normalizing and weighting the frequency band energy components and the synchronization control envelope value, thereby realizing the three-modal coordinated driving of music, breathing and speech.
[0075] The final result is a frame-by-frame multi-level pressure control command unit, comprising: target position coordinates (from spatial vector direction mapping), target pressure level (from quantization results), and time index (ensuring the movement is aligned with the music / breathing). This creates control commands that are both positionally and rhythmically in tune with the music, overcoming the shortcomings of traditional massage devices that suffer from fixed rhythms and a lack of dynamism.
[0076] S4.3: Arrange the multi-level pressure control commands generated in each frame according to the time sequence to form a continuous control command stream. The control command stream has a timestamp sequence, which can directly drive the massage component to achieve "rhythmic" movements, and connect the massage movements with the music rhythm, breathing rhythm and voice source direction for synchronization.
[0077] In addition, before the control command stream is output to the massage component, the pressure level difference between adjacent frames is limited and interpolated according to the redundancy smoothing process to avoid the mechanical parts from being impacted or overloaded due to instantaneous large-scale switching.
[0078] Following the generated control command flow, the actual movements of the massage components are triggered, including adjusting motor speed, displacing mechanical push rods, and switching between multi-point pressure. This ultimately achieves a multimodal dynamic massage mode synchronized with music rhythm, voice direction, and breathing, greatly enhancing personalization and immersion.
[0079] Furthermore, such as Figure 2 As shown, this embodiment also provides an intelligent control system for a massage device based on rhythm information, including, The signal acquisition module is used to acquire external music acoustic signals and user voice signals through multi-channel sensor components, and to perform frequency band decomposition and coding compression rate analysis respectively to generate frequency band energy matrix and coding density parameters. The envelope phase module is used to extract the music beat envelope and the voice breathing envelope based on the frequency band energy matrix, and calculate the phase difference through the timestamp data output by the sensor components. When the phase difference is lower than the phase difference threshold, the music beat envelope and the voice breathing envelope are jointly superimposed to obtain the synchronization control envelope; otherwise, the envelope synchronization offset is corrected. The spatial positioning module is used to locate the direction of the speech source using the sensor components, generate a spatial positioning vector, and establish a mapping relationship with the synchronous control envelope to form a position-pressure response matrix; The pressure control module is used to input the position-pressure response matrix to the massage control unit, and generate a multi-level pressure control instruction set by combining the status label of the encoded density parameter to trigger the movement of the massage component.
[0080] This embodiment also provides a computer device applicable to the intelligent control method of a massage device based on rhythm information, including a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the intelligent control method of the massage device based on rhythm information as proposed in the above embodiment.
[0081] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0082] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the intelligent control method for a massage device based on rhythm information as proposed in the above embodiments.
[0083] In summary, this invention uses rhythmic information to intelligently control the massage device, achieving synchronous matching of music rhythm, user breathing, and voice signals, making massage movements more natural and coordinated, and significantly improving comfort and immersion. At the same time, this invention combines spatial positioning and pressure response adjustment to ensure the accuracy and personalization of massage areas and intensity, enabling the device to dynamically adjust control strategies according to the user's state.
[0084] Overall, this invention effectively overcomes the problems of monotonous rhythm and insufficient adaptability of traditional massage devices, and provides a multimodal fusion and more interactive intelligent control scheme, which has good practical value and application prospects.
[0085] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An intelligent control method for a massage device based on rhythm information, characterized in that: include: External acoustic music signals and user voice signals are acquired through a multi-channel sensor assembly, and frequency band decomposition and coding compression rate analysis are performed respectively to generate frequency band energy matrix and coding density parameters. Music beat envelope and speech breathing envelope are extracted based on frequency band energy matrix, and phase difference is calculated using timestamp data output by sensor components; When the phase difference is lower than the phase difference threshold, the music beat envelope and the speech breathing envelope are superimposed to obtain the synchronization control envelope; otherwise, the envelope synchronization offset is corrected. The sensor components are used to locate the direction of the speech source, generate a spatial positioning vector, and establish a mapping relationship with the synchronous control envelope to form a position-pressure response matrix; The position-pressure response matrix is input to the massage control unit, and combined with the status label of the encoded density parameter, a multi-level pressure control instruction set is generated to trigger the movement of the massage component.
2. The intelligent control method for a massage device based on rhythm information as described in claim 1, characterized in that: The frequency band decomposition includes: External music acoustic signals and user voice signals are collected by acoustic sensors. The collected signals are divided into frames according to a fixed-length time window and an overlap rate of m%. The start and end time index and source tag of each frame are recorded to obtain a music frame set and a voice frame set. Fast Fourier transforms are performed on the music frame set and the speech frame set respectively to extract the spectrum within the audible frequency range; The spectrum is divided into multiple fixed frequency bands, and the sum of squared amplitudes of each fixed frequency band is calculated in each frame to obtain the frequency band energy vector corresponding to each frame. Arrange the frequency band energy vectors of all frames in chronological order to form a two-dimensional matrix, where the rows of the matrix correspond to time frames and the columns correspond to frequency bands, thus obtaining the frequency band energy matrix; The encoding compression ratio analysis includes: The signal from the same time frame is input into the low bit rate encoder and the high bit rate encoder respectively, and the number of bits after compression is recorded respectively. For each frame, calculate the bit occupancy difference between low and high bit rates in the energy vector of each frequency band, and store it as a coding difference vector. The frequency band energy matrix and the coding difference vector are aligned frame by frame. For each frequency band in each time frame, if it shows rapid growth in the frequency band energy matrix and the bit occupancy difference of the coding difference vector is greater than the average level of the two adjacent frames, then the frequency band is assigned a high-density label; otherwise, it is assigned a low-density label. By taking the tags of all frames, we obtain a sequence of coding density parameters that change over time.
3. The intelligent control method for a massage device based on rhythm information as described in claim 2, characterized in that: The calculation of the phase difference includes: From the output frequency band energy matrix, the music frame set and the speech frame set are separated according to the source label; For a set of music frames, identify the peak sequence of energy in each frequency band and form a continuous musical beat envelope; For a set of speech frames, a speech breathing envelope is formed based on the fluctuations of low-frequency components in the frequency band energy matrix; Each envelope sequence maintains a time frame index; The time indices of the music beat envelope and the voice breathing envelope are mapped to the timestamp data output by the sensor components, and the phase difference sequence between the two envelopes is calculated frame by frame.
4. The intelligent control method for a massage device based on rhythm information as described in claim 3, characterized in that: Based on the output phase difference sequence, determine frame by frame whether the temporal offset of the music beat envelope and the speech breathing envelope falls within the low logic offset range; For frames falling within the low logical offset range, the music beat envelope and the voice breathing envelope are superimposed frame by frame to form a synchronization control envelope sequence. For frames that exceed the low offset range, logical offset correction is performed on the music beat envelope or speech breathing envelope by using the envelope trend relationship between adjacent time frames. The logical offset correction includes: For frames that exceed the low offset range, they are marked as frames to be corrected, and the phase difference change trend of several frames before and after them is extracted to form a local trend sequence, and the temporal offset direction is derived. Based on the temporal offset direction, the music beat envelope or speech breathing envelope of the frame to be corrected is logically offset along the time axis to align with the trend of adjacent frames. The logical offset-corrected musical beat envelope and vocal breathing envelope are used to generate the synchronization control envelope.
5. The intelligent control method for a massage device based on rhythm information as described in claim 4, characterized in that: The logical low offset range includes: The phase difference sequence is arranged according to the time frame index to form a continuous frame sequence, and the phase difference value and time position of each frame are recorded. A temporal consistency judgment is performed on the phase difference values of several consecutive frames; the temporal consistency judgment is as follows: Check whether the phase difference change remains within the preset continuous change threshold to form a low offset candidate interval; Within the low-offset candidate interval, a logical judgment is made on the fluctuation trend of phase difference changes: If the phase difference fluctuation is lower than the first variance threshold, the low offset candidate interval is confirmed as a low offset interval; if it is higher than the second variance threshold, it is excluded. The first variance threshold is a to b times the overall variance of the phase difference sequence; The second variance threshold is c to d times the overall variance of the phase difference sequence; Where a, b, c, and d are constants.
6. The intelligent control method for a massage device based on rhythm information as described in claim 5, characterized in that: The generation of the spatial positioning vector includes: Extract the envelope value of each time frame from the synchronization control envelope sequence and record the corresponding time index; The user voice signals collected by the sensor components are framed according to the same time index to ensure that each frame of user voice signal corresponds one-to-one with the synchronization control envelope. For each time frame of the user's speech signal, the sound energy distribution is analyzed using the multi-channel input of the sensor components to identify the direction of local sound energy concentration. Each direction is marked as a candidate sound source, forming a candidate sound source set for that time frame. Each candidate vector includes a directional component and a frequency band energy component. For adjacent frames and Retrieve the corresponding candidate sound source sets respectively and Based on the directional differences between the candidate sound source sets, a set of distinguishable sound sources is generated. ; A continuity score is constructed for each candidate vector, which is derived by logically superimposing three sub-indicators: Consistency sub-index: Count the number of times candidates with the same direction as the candidate vector appear in the first few frames and map it to a score; Energy stability sub-index: Compare the frequency band energy components of the candidate vector with the frequency band energy components in the same direction of the preceding and following frames, and divide them into different segments according to the trend; Difference variation sub-index: a set of distinguishable sound sources generated from adjacent frames. The addition or disappearance of information in the candidate vector is used to penalize or add points to the candidate vector. The three sub-indicators are combined into a single continuous score according to established logical rules; All candidate vectors in the current frame are sorted in descending order of continuity score; if several candidate vectors with the highest scores are tied, the historical consistency priority rule is adopted: the candidate vector that appears most frequently in the neighboring sector pointed to by the final direction vector in the previous frame is selected as the main direction vector of the current frame. A sequence of spatial positioning vectors for consecutive frames is formed based on the main direction vector of each frame.
7. The intelligent control method for a massage device based on rhythm information as described in claim 6, characterized in that: The generation of the location-pressure response matrix includes: The spatial positioning vector and synchronization control envelope of each frame are mapped one-to-one according to the time index to form a frame-level association table; Within each time frame, the main direction vector and frequency band energy components of the spatial positioning vector are combined with the corresponding synchronization control envelope value to generate a frame-level position-pressure mapping relationship; All frame-level position-pressure mapping relationships are accumulated according to the time series to form a continuous multi-frame mapping sequence, generating a position-pressure response matrix.
8. The intelligent control method for a massage device based on rhythm information as described in claim 7, characterized in that: The generation of the multi-level pressure control instruction set includes: Align the position-pressure response matrix and coding density parameter sequence of each frame according to the time index; Based on the spatial vector information of the position-pressure response matrix of each frame and the state label of the corresponding coding density parameter, multi-level pressure control instructions are generated frame by frame, including the specific location of the massage component and the pressure level. The multi-level pressure control commands generated in each frame are arranged in a time sequence to form a continuous flow of control commands, which is synchronized with the massage movements, music rhythm, breathing rhythm and voice source direction.
9. An intelligent control system for a massage device based on rhythm information, based on the intelligent control method for a massage device based on rhythm information as described in any one of claims 1 to 8, characterized in that: Also includes: The signal acquisition module is used to acquire external music acoustic signals and user voice signals through multi-channel sensor components, and to perform frequency band decomposition and coding compression rate analysis respectively to generate frequency band energy matrix and coding density parameters. The envelope phase module is used to extract the music beat envelope and the voice breathing envelope based on the frequency band energy matrix, and to calculate the phase difference using the timestamp data output by the sensor components. When the phase difference is lower than the phase difference threshold, the music beat envelope and the speech breathing envelope are superimposed to obtain the synchronization control envelope; otherwise, the envelope synchronization offset is corrected. The spatial positioning module is used to locate the direction of the speech source using the sensor components, generate a spatial positioning vector, and establish a mapping relationship with the synchronous control envelope to form a position-pressure response matrix; The pressure control module is used to input the position-pressure response matrix to the massage control unit, and generate a multi-level pressure control instruction set by combining the status label of the encoded density parameter to trigger the movement of the massage component.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the intelligent control method for the massage device based on rhythm information as described in any one of claims 1 to 8.