Physical and mental relaxation degree and heart rate calculation method and system based on pulse signals and medium

By processing the pulse waveform and similarity calculation, determining the starting point of the pulse cycle and calculating the target heart rate, the problem of difficulty in accurately measuring the individual's calmness and relaxation in the prior art is solved, and effective capture of the relaxation state in a short time and real-time measurement of the heart rate is achieved.

CN120093256APending Publication Date: 2025-06-06松研科技(杭州)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510180631.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The prior art is difficult to accurately measure individual calm relaxation, especially for a short period of time, and the dependence on heart rate variability results in the inability to effectively capture the relaxation state when moving or speaking.

Method used

By obtaining the pulse waveform for denoising, the target point and window width are determined by combining the processing signals within the preset time, the sliding window and similarity calculation method are used to adjust the window position and window width to determine the starting point of the current period pulse, and the target heart rate is calculated by weighted average.

Benefits of technology

It realizes that the individual's calm and relaxed state is accurately reflected without relying on the accuracy of heart rate measurement, and the heart rate is measured in real time after the user enters the relaxed state, which is suitable for capturing the relaxed state in a short time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120093256A_ABST
    Figure CN120093256A_ABST
Patent Text Reader

Abstract

The invention discloses a physical and mental relaxation degree and heart rate calculation method and system based on a pulse signal and a medium, and the method comprises the steps: obtaining a pulse waveform, and carrying out the denoising processing to obtain a processing signal; determining a target point and a window width by combining the processing signal within a preset time; sliding by taking the window width as a step length and combining with the processing signal, and carrying out similarity calculation on signals of adjacent windows; determining the starting point of the pulse in the current period based on the window position adjustment degree calculated by the similarity and the window width; and calculating a pulse cycle based on the starting point, and performing weighted averaging on the pulse cycle to obtain a target heart rate. The method for reflecting the relaxation degree of the human body by measuring the pulse is explained, relaxation measures are adjusted through a similarity curve so that the user can return to the quiet and relaxed state, and the heart rate can be measured after the user enters the relaxed state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal processing technology, and more specifically, to a method, system and medium for calculating physical and mental relaxation and heart rate based on pulse signals. Background Art

[0002] At present, the indicator of calmness and relaxation is generally believed to be a lower heart rate. However, due to individual differences, normal heart rates are different, and the individual's calmness and relaxation level cannot be explained solely by the heart rate value.

[0003] Among them, some measures of relaxation are obtained by measuring the relationship between high-frequency information and low-frequency information of heart rate variability. However, this method relies on the accuracy of heart rate measurement and it is difficult to capture short-term calm and relaxed conditions. For example, when a user occasionally adjusts his body while resting in a sleeping cabin, the above method will be ineffective. Therefore, the perception of the user's calm and relaxed state needs further improvement. Summary of the invention

[0004] The purpose of the present invention is to provide a method, system and medium for calculating the degree of physical and mental relaxation and heart rate based on pulse signals, which describes a method for measuring pulse to reflect the degree of relaxation of the human body, adjusts relaxation measures through a similarity curve to enable the user to return to a quiet and relaxed state, and can measure the heart rate after the user enters a relaxed state.

[0005] The first aspect of the present invention provides a method for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal, comprising the following steps:

[0006] Acquire the pulse waveform and perform denoising to obtain a processed signal;

[0007] Determine the target point and the window width in combination with the processed signal within a preset time;

[0008] Sliding the processed signal with the window width as a step length, and calculating similarity between signals in adjacent windows;

[0009] Determine the starting point of the current cycle pulse based on the window position adjustment degree calculated by similarity and the window width;

[0010] The pulse cycle is calculated based on the starting point, and the pulse cycle is weighted averaged to obtain a target heart rate.

[0011] In this solution, the determining of the target point and the window width in combination with the processed signal within a preset time specifically includes:

[0012] The preset time includes any two-second time range, and different extreme value points are traversed in the processed signal based on the preset time to determine the target point, wherein the target point is the extreme value minimum point;

[0013] The time of the target point is used as the starting time of the window, and the window width is determined according to the heart rate at the current starting time.

[0014] In this solution, the sliding is performed with the window width as a step length in combination with the processed signal, and similarity calculation is performed on signals of adjacent windows, specifically including:

[0015] The processing signal is combined with the window width as a step to slide, and the similarity of the signals in two adjacent windows is calculated, and the calculation results are normalized. The calculation formula is as follows:

[0016]

[0017] Among them, k 1 The following relations are satisfied:

[0018]

[0019] Among them, y(n) is the calculation result, M is the width of the window, n is the current sliding window position number, k is the window position adjustment degree, and the function max k {·} is the maximum value of {·} when setting different k.

[0020] In this solution, the window position adjustment degree based on similarity calculation and the window width determine the starting point of the current cycle pulse, specifically including:

[0021] Determining a user's relaxation state based on the calculation result, wherein when the calculation result is greater than a preset value, determining that the user is in a relaxation state;

[0022] When it is determined that the user is in a relaxed state, the corresponding window position adjustment degree and window width are extracted to determine the starting point of the current cycle pulse.

[0023] In this solution, the pulse cycle is calculated based on the starting point, and the target heart rate is obtained by weighted averaging the pulse cycle, which specifically includes:

[0024] Calculating a pulse cycle based on the starting point;

[0025] The target heart rate is obtained by weighted averaging N pulse cycles, and the calculation formula is as follows:

[0026]

[0027] Among them, t N is the target heart rate, t is the pulse period at a certain moment, and α is the weight parameter.

[0028] In this solution, the pulse waveform is obtained and denoised to obtain a processed signal, which specifically includes: removing Gaussian noise of the pulse waveform by a smoothing filter to obtain the processed signal.

[0029] The second aspect of the present invention further provides a system for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal, comprising a memory and a processor, wherein the memory comprises a program for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal, and when the program for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal is executed by the processor, the following steps are implemented:

[0030] Acquire the pulse waveform and perform denoising to obtain a processed signal;

[0031] Determine the target point and the window width in combination with the processed signal within a preset time;

[0032] Sliding the processed signal with the window width as a step length, and calculating similarity between signals in adjacent windows;

[0033] Determine the starting point of the current cycle pulse based on the window position adjustment degree calculated by similarity and the window width;

[0034] The pulse cycle is calculated based on the starting point, and the pulse cycle is weighted averaged to obtain a target heart rate.

[0035] In this solution, the determining of the target point and the window width in combination with the processed signal within a preset time specifically includes:

[0036] The preset time includes any two-second time range, and different extreme values ​​are traversed in the processed signal based on the preset time to determine the target point, wherein the target point is the minimum point of the extreme value;

[0037] The time of the target point is used as the starting time of the window, and the window width is determined according to the heart rate at the current starting time.

[0038] In this solution, the sliding is performed with the window width as a step length in combination with the processed signal, and similarity calculation is performed on signals of adjacent windows, specifically including:

[0039] The processing signal is combined with the window width as a step to slide, and the similarity of the signals in two adjacent windows is calculated, and the calculation results are normalized. The calculation formula is as follows:

[0040]

[0041] Among them, k 1 The following relations are satisfied:

[0042]

[0043] Among them, y(n) is the calculation result, M is the width of the window, n is the current sliding window position number, k is the window position adjustment degree, and the function max k{·} is the maximum value of {·} when setting different k.

[0044] In this solution, the window position adjustment degree based on similarity calculation and the window width determine the starting point of the current cycle pulse, specifically including:

[0045] Determining a user's relaxation state based on the calculation result, wherein when the calculation result is greater than a preset value, determining that the user is in a relaxation state;

[0046] When it is determined that the user is in a relaxed state, the corresponding window position adjustment degree and window width are extracted to determine the starting point of the current cycle pulse.

[0047] In this solution, the pulse cycle is calculated based on the starting point, and the target heart rate is obtained by weighted averaging the pulse cycle, which specifically includes:

[0048] Calculating a pulse cycle based on the starting point;

[0049] The target heart rate is obtained by weighted averaging N pulse cycles, and the calculation formula is as follows:

[0050]

[0051] Among them, t N is the target heart rate, t is the pulse period at a certain moment, and α is the weight parameter.

[0052] In this solution, the pulse waveform is obtained and denoised to obtain a processed signal, which specifically includes: removing Gaussian noise of the pulse waveform by a smoothing filter to obtain the processed signal.

[0053] The third aspect of the present invention provides a computer-readable storage medium, which includes a machine program for a method for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal. When the program for the method for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal is executed by a processor, the steps of a method for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal as described in any one of the above items are implemented.

[0054] The present invention discloses a method, system and medium for calculating the degree of physical and mental relaxation and heart rate based on pulse signals, which describes a method for measuring pulse to reflect the degree of relaxation of the human body, adjusts relaxation measures through a similarity curve to enable the user to return to a quiet and relaxed state, and can measure the heart rate after the user enters a relaxed state. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A flow chart showing a method for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal of the present invention;

[0056] Figure 2A block diagram of a system for calculating physical and mental relaxation and heart rate based on pulse signals of the present invention is shown. DETAILED DESCRIPTION

[0057] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0058] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0059] Figure 1 A flow chart of a method for calculating physical and mental relaxation and heart rate based on pulse signals of the present application is shown.

[0060] like Figure 1 As shown, the present application discloses a method for calculating physical and mental relaxation and heart rate based on a pulse signal, comprising the following steps:

[0061] S102, acquiring a pulse waveform and performing denoising processing to obtain a processed signal;

[0062] S104, determining a target point and a window width in combination with the processed signal within a preset time;

[0063] S106, sliding the processed signal with the window width as a step length, and calculating similarity between signals in adjacent windows;

[0064] S108, determining the starting point of the current cycle pulse based on the window position adjustment degree calculated by the similarity and the window width;

[0065] S110, calculating the pulse cycle based on the starting point, and performing weighted averaging on the pulse cycle to obtain a target heart rate.

[0066] It should be noted that, in this embodiment, a method for measuring calmness and relaxation is provided, which can reflect the user's calmness and relaxation state without accurately measuring the user's heart rate value, and can also be reflected in the calmness and relaxation when the user moves or speaks.

[0067] Specifically, when the human body is nervous, blood vessels will contract, resulting in a pulse signal that is different from when it is relaxed. In the process of going from psychological tension to calmness, the pulse signals of each cycle will gradually become the same, and when the human body is active, the waveform of the pulse signal will change. Therefore, the pulse waveform is first acquired, and denoising is performed to obtain a corresponding processed signal. Then, the target point and window width are determined in combination with the processed signal within a preset time, so that the processed signal is slid with the window width as a step size, and the similarity of the signals of adjacent windows is calculated to determine the user's calm and relaxed state. After the user enters the calm and relaxed state, the starting point of the current cycle pulse is determined based on the window position adjustment calculated by the similarity and the window width, so that the pulse cycle is calculated based on the starting point, and the pulse cycle is weighted averaged to obtain the target heart rate.

[0068] According to an embodiment of the present invention, determining the target point and the window width in combination with the processed signal within a preset time specifically includes:

[0069] The preset time includes any two-second time range, and different extreme value points are traversed in the processed signal based on the preset time to determine the target point, wherein the target point is the extreme value minimum point;

[0070] The time of the target point is used as the starting time of the window, and the window width is determined according to the heart rate at the current starting time.

[0071] It should be noted that, in this embodiment, the preset time includes any two-second time range, and therefore the minimum point of the extreme value is first found in the signal within any two-second range, wherein the minimum point of the extreme value is the target point, and the moment of the minimum point is used as the starting time of the window. At the same time, the window width is set according to the current heart rate corresponding to the starting time. For example, if the heart rate range is 50 times / second, the corresponding window width is 0.2 seconds.

[0072] According to an embodiment of the present invention, the sliding with the window width as a step length in combination with the processed signal and calculating the similarity of signals of adjacent windows specifically includes:

[0073] The processing signal is combined with the window width as a step to slide, and the similarity of the signals in two adjacent windows is calculated, and the calculation results are normalized. The calculation formula is as follows:

[0074]

[0075] Among them, k 1 The following relations are satisfied:

[0076]

[0077] Among them, y(n) is the calculation result, M is the width of the window, n is the current sliding window position number, k is the window position adjustment degree, and the function max k {·} is the maximum value of {·} when setting different k.

[0078] It should be noted that, in this embodiment, the processing signal is slid with the window width as the step length, and the signals in two adjacent windows are correlated, specifically, the similarity is calculated, and the correlation operation results are normalized, and the formula is as follows:

[0079]

[0080] Among them, k 1 The following relations are satisfied:

[0081]

[0082] Among them, y(n) is the calculation result, M is the width of the window, n is the current sliding window position number, k is the window position adjustment degree, and the function max k {·} is the maximum value of {·} when setting different k.

[0083] Furthermore, y(n) describes the similarity of pulse signals in adjacent cycles. The larger the value, the more similar the pulses in two adjacent cycles are, indicating that the body and mind are more calm and relaxed. When the similarity y(n) trend decreases, it means that the user's calmness and relaxation are reduced, and timely intervention is needed through sleep-inducing methods such as music. When the user enters a relaxed state and the heart rate stabilizes, the heart rate can be measured in real time.

[0084] According to an embodiment of the present invention, the window position adjustment degree calculated based on similarity and the window width determine the starting point of the current cycle pulse, specifically including:

[0085] Determining a user's relaxation state based on the calculation result, wherein when the calculation result is greater than a preset value, determining that the user is in a relaxation state;

[0086] When it is determined that the user is in a relaxed state, the corresponding window position adjustment degree and window width are extracted to determine the starting point of the current cycle pulse.

[0087] It should be noted that, in this embodiment, the calculation results corresponding to different user states are different, so that whether the user is in a relaxed state can be determined based on a preset threshold value, that is, the preset value, wherein when the calculation result is greater than the preset value, the user is determined to be in a relaxed state, and when it is determined that the user is in a relaxed state, the corresponding window position adjustment degree and window width are extracted to determine the starting point of the current cycle pulse.

[0088] According to an embodiment of the present invention, the step of calculating the pulse cycle based on the starting point and performing weighted averaging on the pulse cycle to obtain the target heart rate specifically includes:

[0089] Calculating a pulse cycle based on the starting point;

[0090] The target heart rate is obtained by weighted averaging N pulse cycles, and the calculation formula is as follows:

[0091]

[0092] Among them, t N is the target heart rate, t is the pulse period at a certain moment, and α is the weight parameter.

[0093] It should be noted that, in this embodiment, different pulse cycles are calculated based on the starting point of each cycle, so that the target heart rate is obtained by weighted averaging N pulse cycles, and the formula is as follows: Among them, t N is the target heart rate, t is the pulse period at a certain moment, and α is the weight parameter, which ranges from (0,1).

[0094] According to an embodiment of the present invention, the step of acquiring a pulse waveform and performing denoising processing to obtain a processed signal specifically includes: removing Gaussian noise of the pulse waveform by a smoothing filter to obtain the processed signal.

[0095] It should be noted that, in this embodiment, after the pulse waveform is acquired, denoising is first performed, for example, by removing the Gaussian noise of the pulse waveform through a smoothing filter, so as to obtain the processed signal after denoising.

[0096] It is worth mentioning that the method further comprises:

[0097] Determining the user's relaxation state based on the calculation result, wherein when the calculation result is less than or equal to a preset value, determining that the user is in a non-relaxed state;

[0098] When it is determined that the user is not in a relaxed state, the massage intensity and the music volume are adjusted in combination with the similarity calculation curve.

[0099] It should be noted that in this embodiment, when it is judged based on the calculation result that it is less than or equal to the threshold value (preset value), it indicates that the current user is not in a relaxed state. At this time, the similarity y(n) curve can be combined to adjust the massage intensity and music volume to make the user return to a quiet and relaxed state.

[0100] Figure 2 A block diagram of a system for calculating physical and mental relaxation and heart rate based on pulse signals of the present invention is shown.

[0101] like Figure 2As shown, the present invention discloses a system for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal, comprising a memory and a processor, wherein the memory comprises a program for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal, and when the program for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal is executed by the processor, the following steps are implemented:

[0102] Acquire the pulse waveform and perform denoising to obtain a processed signal;

[0103] Determine the target point and the window width in combination with the processed signal within a preset time;

[0104] Sliding the processed signal with the window width as a step length, and calculating similarity between signals in adjacent windows;

[0105] Determine the starting point of the current cycle pulse based on the window position adjustment degree calculated by similarity and the window width;

[0106] The pulse cycle is calculated based on the starting point, and the pulse cycle is weighted averaged to obtain a target heart rate.

[0107] It should be noted that, in this embodiment, a method for measuring calmness and relaxation is provided, which can reflect the user's calmness and relaxation state without accurately measuring the user's heart rate value, and can also be reflected in the calmness and relaxation when the user moves or speaks.

[0108] Specifically, when the human body is nervous, blood vessels will contract, resulting in a pulse signal that is different from when it is relaxed. In the process of going from psychological tension to calmness, the pulse signals of each cycle will gradually become the same, and when the human body is active, the waveform of the pulse signal will change. Therefore, the pulse waveform is first acquired, and denoising is performed to obtain a corresponding processed signal. Then, the target point and window width are determined in combination with the processed signal within a preset time, so that the processed signal is slid with the window width as a step size, and the similarity of the signals of adjacent windows is calculated to determine the user's calm and relaxed state. After the user enters the calm and relaxed state, the starting point of the current cycle pulse is determined based on the window position adjustment calculated by the similarity and the window width, so that the pulse cycle is calculated based on the starting point, and the pulse cycle is weighted averaged to obtain the target heart rate.

[0109] According to an embodiment of the present invention, determining the target point and the window width in combination with the processed signal within a preset time specifically includes:

[0110] The preset time includes any two-second time range, and different extreme value points are traversed in the processed signal based on the preset time to determine the target point, wherein the target point is the extreme value minimum point;

[0111] The time of the target point is used as the starting time of the window, and the window width is determined according to the heart rate at the current starting time.

[0112] It should be noted that, in this embodiment, the preset time includes any two-second time range, and therefore the minimum point of the extreme value is first found in the signal within any two-second range, wherein the minimum point of the extreme value is the target point, and the moment of the minimum point is used as the starting time of the window. At the same time, the window width is set according to the current heart rate corresponding to the starting time. For example, if the heart rate range is 50 times / second, the corresponding window width is 0.2 seconds.

[0113] According to an embodiment of the present invention, the sliding with the window width as a step length in combination with the processed signal and calculating the similarity of signals of adjacent windows specifically includes:

[0114] The processing signal is combined with the window width as a step to slide, and the similarity of the signals in two adjacent windows is calculated, and the calculation results are normalized. The calculation formula is as follows:

[0115]

[0116] Among them, k 1 The following relations are satisfied:

[0117]

[0118] Among them, y(n) is the calculation result, M is the width of the window, n is the current sliding window position number, k is the window position adjustment degree, and the function max k {·} is the maximum value of {·} when setting different k.

[0119] It should be noted that, in this embodiment, the processing signal is slid with the window width as the step length, and the signals in two adjacent windows are correlated, specifically, the similarity is calculated, and the correlation operation results are normalized, and the formula is as follows:

[0120]

[0121] Among them, k 1 The following relations are satisfied:

[0122]

[0123] Among them, y(n) is the calculation result, M is the width of the window, n is the current sliding window position number, k is the window position adjustment degree, and the function max k {·} is the maximum value of {·} when setting different k.

[0124] Furthermore, y(n) describes the similarity of pulse signals in adjacent cycles. The larger the value, the more similar the pulses in two adjacent cycles are, indicating that the body and mind are more calm and relaxed. When the similarity y(n) trend decreases, it means that the user's calmness and relaxation are reduced, and timely intervention is needed through sleep-inducing methods such as music. When the user enters a relaxed state and the heart rate stabilizes, the heart rate can be measured in real time.

[0125] According to an embodiment of the present invention, the window position adjustment degree calculated based on similarity and the window width determine the starting point of the current cycle pulse, specifically including:

[0126] Determining a user's relaxation state based on the calculation result, wherein when the calculation result is greater than a preset value, determining that the user is in a relaxation state;

[0127] When it is determined that the user is in a relaxed state, the corresponding window position adjustment degree and window width are extracted to determine the starting point of the current cycle pulse.

[0128] It should be noted that, in this embodiment, the calculation results corresponding to different user states are different, so that whether the user is in a relaxed state can be determined based on a preset threshold value, that is, the preset value, wherein when the calculation result is greater than the preset value, the user is determined to be in a relaxed state, and when it is determined that the user is in a relaxed state, the corresponding window position adjustment degree and window width are extracted to determine the starting point of the current cycle pulse.

[0129] According to an embodiment of the present invention, the step of calculating the pulse cycle based on the starting point and performing weighted averaging on the pulse cycle to obtain the target heart rate specifically includes:

[0130] Calculating a pulse cycle based on the starting point;

[0131] The target heart rate is obtained by weighted averaging N pulse cycles, and the calculation formula is as follows:

[0132]

[0133] Among them, t N is the target heart rate, t is the pulse period at a certain moment, and α is the weight parameter.

[0134] It should be noted that, in this embodiment, different pulse cycles are calculated based on the starting point of each cycle, so that the target heart rate is obtained by weighted averaging N pulse cycles, and the formula is as follows: Among them, t N is the target heart rate, t is the pulse period at a certain moment, and α is the weight parameter, which ranges from (0,1).

[0135] According to an embodiment of the present invention, the step of acquiring a pulse waveform and performing denoising processing to obtain a processed signal specifically includes: removing Gaussian noise of the pulse waveform by a smoothing filter to obtain the processed signal.

[0136] It should be noted that, in this embodiment, after the pulse waveform is acquired, denoising is first performed, for example, by removing the Gaussian noise of the pulse waveform through a smoothing filter, so as to obtain the processed signal after denoising.

[0137] It is worth mentioning that the method further comprises:

[0138] Determining the user's relaxation state based on the calculation result, wherein when the calculation result is less than or equal to a preset value, determining that the user is in a non-relaxed state;

[0139] When it is determined that the user is not in a relaxed state, the massage intensity and the music volume are adjusted in combination with the similarity calculation curve.

[0140] It should be noted that in this embodiment, when it is judged based on the calculation result that it is less than or equal to the threshold value (preset value), it indicates that the current user is not in a relaxed state. At this time, the similarity y(n) curve can be combined to adjust the massage intensity and music volume to make the user return to a quiet and relaxed state.

[0141] A third aspect of the present invention provides a computer-readable storage medium, which includes a program for a method for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal. When the program for the method for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal is executed by a processor, the steps of a method for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal as described in any one of the above items are implemented.

[0142] The present invention discloses a method, system and medium for calculating the degree of physical and mental relaxation and heart rate based on pulse signals, which describes a method for measuring pulse to reflect the degree of relaxation of the human body, adjusts relaxation measures through a similarity curve to enable the user to return to a quiet and relaxed state, and can measure the heart rate after the user enters a relaxed state.

[0143] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0144] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0145] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0146] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical disks, and other media that can store program codes.

[0147] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

Claims

1. A method for calculating physical and mental relaxation and heart rate based on pulse signals, characterized in that: The following steps are involved: Acquire the pulse waveform and perform denoising to obtain a processed signal; Determine the target point and the window width in combination with the processed signal within a preset time; Sliding the processed signal with the window width as a step length, and calculating similarity between signals in adjacent windows; Determine the starting point of the current cycle pulse based on the window position adjustment degree calculated by similarity and the window width; The pulse cycle is calculated based on the starting point, and the pulse cycle is weighted averaged to obtain a target heart rate.

2. A method for calculating physical and mental relaxation and heart rate based on pulse signals according to claim 1, characterized in that: The determining of the target point and the window width in combination with the processed signal within a preset time specifically includes: The preset time includes any two-second time range, and different extreme value points are traversed in the processed signal based on the preset time to determine the target point, wherein the target point is the extreme value minimum point; The time of the target point is used as the starting time of the window, and the window width is determined according to the heart rate at the current starting time.

3. The method for calculating the degree of physical and mental relaxation and heart rate based on pulse signals according to claim 2, characterized in that: The sliding with the window width as a step length in combination with the processed signal and calculating similarity between signals of adjacent windows specifically includes: The processing signal is combined with the window width as a step to slide, and the similarity of the signals in two adjacent windows is calculated, and the calculation results are normalized. The calculation formula is as follows: Among them, k1 satisfies the following relationship: Among them, y(n) is the calculation result, M is the width of the window, n is the current sliding window position number, k is the window position adjustment degree, and the function max k {·} is the maximum value of {·} when setting different k.

4. The method for calculating the degree of physical and mental relaxation and heart rate based on pulse signals according to claim 3, characterized in that: The window position adjustment degree calculated based on the similarity and the window width determine the starting point of the current cycle pulse, specifically including: Determining a user's relaxation state based on the calculation result, wherein when the calculation result is greater than a preset value, determining that the user is in a relaxation state; When it is determined that the user is in a relaxed state, the corresponding window position adjustment degree and window width are extracted to determine the starting point of the current cycle pulse.

5. The method for calculating the degree of physical and mental relaxation and heart rate based on pulse signals according to claim 4, characterized in that: The step of calculating the pulse cycle based on the starting point and performing weighted averaging on the pulse cycle to obtain a target heart rate specifically includes: Calculating a pulse cycle based on the starting point; The target heart rate is obtained by weighted averaging N pulse cycles, and the calculation formula is as follows: Among them, t N is the target heart rate, t is the pulse period at a certain moment, and α is the weight parameter.

6. The method for calculating the degree of physical and mental relaxation and heart rate based on pulse signals according to claim 1, characterized in that: The acquiring of the pulse waveform and performing denoising to obtain the processed signal specifically includes: removing Gaussian noise of the pulse waveform by a smoothing filter to obtain the processed signal.

7. A system for calculating physical and mental relaxation and heart rate based on pulse signals, characterized in that: The invention comprises a memory and a processor, wherein the memory comprises a method program for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal, and when the method program for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal is executed by the processor, the following steps are implemented: Acquire the pulse waveform and perform denoising to obtain a processed signal; Determine the target point and the window width in combination with the processed signal within a preset time; Sliding the processed signal with the window width as a step length, and calculating similarity between signals in adjacent windows; Determine the starting point of the current cycle pulse based on the window position adjustment degree calculated by similarity and the window width; The pulse cycle is calculated based on the starting point, and the pulse cycle is weighted averaged to obtain a target heart rate.

8. The system for calculating physical and mental relaxation and heart rate based on pulse signals according to claim 7, characterized in that: The determining of the target point and the window width in combination with the processed signal within a preset time specifically includes: The preset time includes any two-second time range, and different extreme value points are traversed in the processed signal based on the preset time to determine the target point, wherein the target point is the extreme value minimum point; The time of the target point is used as the starting time of the window, and the window width is determined according to the heart rate at the current starting time.

9. The system for calculating physical and mental relaxation and heart rate based on pulse signals according to claim 8, characterized in that: The sliding with the window width as a step length in combination with the processed signal and calculating similarity between signals of adjacent windows specifically includes: The processing signal is combined with the window width as a step to slide, and the similarity of the signals in two adjacent windows is calculated, and the calculation results are normalized. The calculation formula is as follows: Among them, k1 satisfies the following relationship: Among them, y(n) is the calculation result, M is the width of the window, n is the current sliding window position number, k is the window position adjustment degree, and the function max k {·} is the maximum value of {·} when setting different k.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a program for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal. When the program for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal is executed by a processor, the steps of a method for calculating the degree of physical and mental relaxation and heart rate based on a pulse signal as described in any one of claims 1 to 6 are implemented.