Method for extracting electrocardiosignal from surface electromyogram signal and related product

By extracting the electrocardiogram signal from the surface electromyography signal, using EMD decomposition and gray correlation algorithm, the complexity and cost of electrical signal detection in the existing technology are solved, real-time monitoring and accurate evaluation of the psychological status of stroke patients.

CN120241086APending Publication Date: 2025-07-04UNIV FOR SCI & TECH ZHENGZHOU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510656392.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the diagnosis of post-stroke depression and anxiety, electrocardiogram detection equipment is complex and costly, making it difficult to monitor the patient's psychological status in real time during rehabilitation training to feedback and regulate intervention measures.

Method used

By extracting ECG signals from surface electromyography signals, the ECG information data is screened using EMD decomposition and gray correlation algorithm, the ECG signal is generated, and the heart rate variability is analyzed to evaluate the degree of depression.

Benefits of technology

It improves the convenience and accuracy of electrocardiogram signal detection, reduces the structural complexity and cost of rehabilitation training equipment, and realizes real-time monitoring and feedback on the patient's psychological status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120241086A_ABST
    Figure CN120241086A_ABST
Patent Text Reader

Abstract

The invention provides a method for extracting an electrocardiosignal from a surface electromyogram signal and a related product. The method comprises the following steps: acquiring a surface electromyogram signal of a user, and decomposing the surface electromyogram signal to obtain a plurality of component signals of the surface electromyogram signal; acquiring a preset electrocardio template signal, and respectively calculating a correlation coefficient between each component signal and the preset electrocardio template signal; acquiring a preset association threshold value, and taking the component signals of which the association coefficients are greater than the preset association threshold value as electrocardiogram information data of the user; and generating an electrocardiosignal of the user according to the electrocardiosignal information data. According to the technical scheme, the convenience and accuracy of detecting the electrocardiosignals of the user can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrocardiogram signal detection, and particularly to a method and related products for extracting electrocardiogram signals from surface electromyogram signals. Background Art

[0003] Emotional disorders are common complications after stroke, including post-stroke depression, anxiety, and co-morbidity of post-stroke anxiety and depression. Among them, the incidence of post-stroke depression is the highest, reaching 30%. Research shows that post-stroke emotional disorders may have a profound negative impact on stroke rehabilitation, such as causing more severe neurological deficits, delaying the rehabilitation process, reducing the quality of life, being more prone to stroke recurrence, and even increasing the mortality and suicide rate of stroke. This not only brings physical and mental pain to patients, but also further increases the burden on families and society. Therefore, in the process of rehabilitation treatment of stroke patients, the spiritual and psychological rehabilitation of patients is also crucial.

[0004] At present, depression and anxiety can be effectively diagnosed through methods such as mood assessment scales, psychological state assessment, biomarker detection, neuroimaging examinations, and sleep studies. However, these methods are difficult to monitor the mental state of patients in real time during rehabilitation training to feedback and adjust relevant intervention measures to meet the needs of patients' psychological rehabilitation during the rehabilitation training process. Using heart rate variability can monitor the psychological states of patients such as depression and anxiety in real time, and then feedback and control the rehabilitation training intervention measures of patients to achieve the psychological rehabilitation training of patients.

[0005] Analyzing the heart rate variability of users requires collecting the electrocardiogram information of users. Currently, the commonly used method for detecting the electrocardiogram information of users is to use an electrocardiogram acquisition device and electrocardiogram electrodes to detect the heart rate of users to obtain the electrocardiogram information of users. This method not only increases the operation complexity and cost of rehabilitation equipment, but also has an unfriendly experience. Summary of the Invention

[0006] The purpose of the present invention is to provide a method and related products for extracting electrocardiogram signals from surface electromyogram signals, which are used to improve the convenience and accuracy of detecting the electrocardiogram signals of users.

[0007] Specifically, in the first aspect, the present invention provides a method for extracting electrocardiogram signals from surface electromyogram signals, including:

[0008] Obtain the surface electromyogram signal of a user, and decompose the surface electromyogram signal to obtain a plurality of component signals of the surface electromyogram signal;

[0009] Obtain a preset electrocardiogram template signal, and calculate the correlation coefficients between each of the component signals and the preset electrocardiogram template signal respectively;

[0010] Obtain a preset correlation threshold, and use the component signals whose correlation coefficients are greater than the preset correlation threshold as the electrocardiogram information data of the user;

[0011] Generate the electrocardiogram signal of the user according to the electrocardiogram information data.

[0012] Further, the step of decomposing the surface electromyogram signal to obtain multiple component signals of the surface electromyogram signal includes:

[0013] Construct a signal to be decomposed according to the surface electromyogram signal, and fit the upper envelope line and the lower envelope line of the signal to be decomposed;

[0014] Calculate the mean value between the upper envelope line and the lower envelope line, and construct a difference function between the signal to be decomposed and the mean value.

[0015] Judge whether the difference function meets the preset decomposition termination condition;

[0016] If not, decompose the difference function to generate a new difference function, and return to the step of judging whether the difference function meets the preset decomposition termination condition;

[0017] If it meets, use the difference function as the component signal, and calculate the residual signal of the signal to be decomposed according to the component signal.

[0018] Judge whether the residual signal meets the preset decomposition requirement condition;

[0019] If it meets, use the residual signal as a new signal to be decomposed, and return to the step of obtaining all local maximum values and local minimum values of the signal to be decomposed.

[0020] Further, the step of judging whether the difference function meets the preset decomposition termination condition includes:

[0021] Obtain the zero-crossing points and extreme points of the difference function, and obtain the upper envelope line and the lower envelope line of the difference function according to the extreme points;

[0022] Judge whether the difference between the number of zero-crossing points and the number of extreme points is within a preset difference range, and whether the mean value of the upper envelope line and the lower envelope line of the difference function is a preset value;

[0023] If so, it is determined that the difference function meets the preset decomposition termination condition;

[0024] If not, it is determined that the difference function does not meet the preset decomposition termination condition.

[0025] Further, the step of determining whether the residual signal meets the preset decomposition requirement conditions includes:

[0026] If the residual signal is a monotonic function, or the maximum value of the residual signal is less than the set maximum threshold, it is determined that the residual signal does not meet the preset decomposition requirement conditions;

[0027] Otherwise, it is determined that the residual signal meets the preset decomposition requirement conditions.

[0028] Further, the step of respectively calculating the correlation coefficients between each of the component signals and the preset electrocardiogram template signal includes:

[0029] Using a preset grey correlation algorithm, calculate the grey correlation coefficients between each of the component signals and the preset electrocardiogram template signal respectively.

[0030] Further, after the step of generating the electrocardiogram signal of the user according to the electrocardiogram information data, it further includes:

[0031] Analyze the electrocardiogram signal to obtain the heart rate variability information of the user;

[0032] Obtain the depression degree of the user according to the heart rate variability information.

[0033] Further, the step of analyzing the electrocardiogram signal to obtain the heart rate variability information of the user includes:

[0034] Generate the electrocardiogram waveform of the user according to the electrocardiogram signal, and obtain the number of electrocardiogram beat cycles of the user within a set time period according to the electrocardiogram waveform;

[0035] Obtain the heart rate variability information according to the number of electrocardiogram beat cycles.

[0036] Further, before the step of decomposing the surface electromyogram signal, it further includes:

[0037] Perform filtering processing on the surface electromyogram signal to filter out the clutter signal of the surface electromyogram signal.

[0038] In a second aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for extracting an electrocardiogram signal from a surface electromyogram signal as described in any one of the above are implemented.

[0039] In a third aspect, the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method for extracting an electrocardiogram signal from a surface electromyogram signal as described in any one of the above are implemented.

[0040] For the technical solution of the present invention, first obtain the surface electromyogram signal of the user, and decompose the surface electromyogram signal to obtain multiple component signals of the surface electromyogram signal; then use a preset electrocardiogram template signal to screen each component signal to obtain the electrocardiogram information data of the user, and further obtain the electrocardiogram signal of the user according to the electrocardiogram information data. Since the technical solution of the present invention only needs to detect the surface electromyogram signal of the user to obtain the electrocardiogram signal of the user, it can improve the convenience of detecting the electrocardiogram signal of the user and reduce the discomfort of the user; on the other hand, after applying the technical solution of the present invention to the rehabilitation training device, the rehabilitation training device only needs to use its own electromyogram detection device, so it can reduce the structural complexity and manufacturing cost of the rehabilitation training device. And the technical solution of the present invention extracts the electrocardiogram signal from the component signals of the surface electromyogram signal according to the correlation coefficient with the preset electrocardiogram template signal, so it can also improve the accuracy and reliability of obtaining the electrocardiogram signal.

[0041] From the following detailed description of specific embodiments of the present invention in conjunction with the drawings, those skilled in the art will become more clear about the above and other objects, advantages and features of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Some specific embodiments of the present invention will be described in detail hereinafter with reference to the drawings in an exemplary but not restrictive manner. The same reference numerals in the drawings denote the same or similar components or parts. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:

[0043] Figure 1 is a schematic flowchart of a method for extracting an electrocardiogram signal from surface electromyogram according to an embodiment of the present invention;

[0044] Figure 2 is a schematic flowchart of the decomposition of the surface electromyogram signal of the user according to an embodiment of the present invention;

[0045] Figure 3 is a schematic flowchart of determining whether the constructed difference function satisfies a preset decomposition termination condition according to an embodiment of the present invention;

[0046] Figure 4 is a schematic flowchart of extracting an electrocardiogram signal from a surface electromyogram signal according to an embodiment of the present invention;

[0047] Figure 5 is a schematic flowchart of obtaining the heart rate variability information of the user according to an embodiment of the present invention;

[0048] Figure 6 is a schematic diagram of a computer program product according to an embodiment of the present invention; and

[0049] Figure 7 It is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. Detailed implementation manners

[0050] The following refers to Figures 1 to 7 to describe a method and related products for extracting electrocardiogram signals from surface electromyogram signals according to an embodiment of the present invention. In the description of this embodiment, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one of such features, that is, including one or more of such features. In the description of the present invention, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined. When a certain feature "includes or contains" a certain or certain features it covers, unless otherwise specifically described, this indicates that other features are not excluded and other features may be further included.

[0051] Please refer to Figure 1 , Figure 1 shown is a schematic flowchart of a method for extracting electrocardiogram signals from surface electromyogram according to an embodiment of the present invention. This method can extract electrocardiogram signals from the surface electromyogram signals of a user to provide a reliable basis for evaluating the depression state of the user.

[0052] In Figure 1 the process shown, the method for extracting electrocardiogram signals from surface electromyogram in this embodiment includes the following steps:

[0053] Step S101: Obtain the surface electromyogram signal of the user and decompose the surface electromyogram signal to obtain a plurality of component signals of the surface electromyogram signal;

[0054] Step S102: Obtain a preset electrocardiogram template signal and use a preset correlation algorithm to calculate the correlation coefficients between the component signals of the user's surface electromyogram signal and the preset electrocardiogram template signal respectively;

[0055] Step S103: Obtain a preset correlation coefficient threshold, and use the component signals of the user's surface electromyogram signal whose correlation coefficients with the preset electrocardiogram template signal are greater than the preset correlation threshold as the electrocardiogram information data of the user;

[0056] Step S104: Generate an electrocardiogram signal of the user according to the electrocardiogram information data of the user.

[0057] In the above step S101, a surface electromyogram detection device can be used to detect the surface electromyogram signal of the user. For example, test electrodes can be pasted on the surface of the user's muscles, and then the signals detected by the test electrodes are periodically obtained according to a preset sampling frequency, and this signal is the surface electromyogram signal of the user.

[0058] The surface electromyogram signal of the user can be a composite signal composed of multiple signals. Among them, some signals have a strong correlation with the electrocardiogram signal of the user, and some have a weak correlation with the electrocardiogram signal of the user. Therefore, in this embodiment, after obtaining the surface electromyogram signal of the user, the surface electromyogram signal is first decomposed into multiple component signals to facilitate the extraction of the electrocardiogram signal of the user from them.

[0059] In this embodiment, it is assumed that the surface electromyogram signal of the user has N component signals, and the i-th component signal is c i (t), that is, the amplitude of the i-th component signal at time t is c i (t).

[0060] In the above step S102, the preset electrocardiogram template signal is an information function with time as the independent variable and heart rate intensity as the dependent variable. In this embodiment, the historical electrocardiogram signal of the user can be used as the preset electrocardiogram template signal. After obtaining the preset electrocardiogram template signal, a preset correlation algorithm can be used to calculate the correlation coefficient between each component signal in the surface electromyogram signal of the user and the preset electrocardiogram template signal. This correlation coefficient represents the degree of association between the component signal of the surface electromyogram signal and the preset electrocardiogram template signal, that is, the larger the correlation coefficient between the component signal and the preset electrocardiogram template signal, the greater the degree of association between the corresponding component signal and the electrocardiogram signal.

[0061] In this embodiment, it is assumed that the preset electrocardiogram template signal is c0(t), that is, the amplitude of the preset template signal at time t is c0(t).

[0062] In the above step S103, it is assumed that the preset correlation threshold is δ, and the preset correlation threshold is preferably 0.5, that is, among the surface electromyogram signals of the user, the component signals with a correlation coefficient greater than 0.5 with the preset electrocardiogram template signal are used as the electrocardiogram information data of the user. Assume that among the surface electromyogram signals of the user, there are M component signals with a correlation coefficient greater than 0.5 with the preset electrocardiogram template signal, and the i-th component signal is Then the electrocardiogram information data of the user can be obtained as

[0063] In the above step S104, the electrocardiogram information of the user can be recombined to obtain the electrocardiogram information of the user. In this embodiment, it is assumed that the electrocardiogram information of the user is y(t), then

[0064]

[0065] According to the above content, in the technical solution of this embodiment, first, the surface electromyogram signal of the user is acquired, and the surface electromyogram signal is decomposed to obtain multiple component signals of the surface electromyogram signal; then, a preset electrocardiogram template signal is used to screen each component signal to obtain the electrocardiogram information data of the user, and further, the electrocardiogram signal of the user is obtained based on the electrocardiogram information data. Due to the technical solution of this embodiment, only by detecting the surface electromyogram signal of the user can the electrocardiogram signal of the user be obtained. Therefore, the convenience of detecting the electrocardiogram signal of the user can be improved, and the discomfort of the user can be reduced; on the other hand, after applying the technical solution of this embodiment to the rehabilitation training device, the rehabilitation training device only needs to use its own electromyogram detection device, so the structural complexity and manufacturing cost of the rehabilitation training device can be reduced. And the technical solution of this embodiment extracts the electrocardiogram signal from the component signals of the surface electromyogram signal according to the correlation coefficient with the preset electrocardiogram template signal, so the accuracy and reliability of obtaining the electrocardiogram signal can also be improved.

[0066] In some embodiments of the present invention, in the step S101 of decomposing the surface electromyogram signal of the user to obtain multiple component signals of the surface electromyogram signal, it includes:

[0067] Perform EMD (Empirical Mode Decomposition) decomposition on the surface electromyogram signal of the user to obtain the IMF (Intrinsic Mode Function) component signal of the surface electromyogram signal. Among them, EMD decomposition is a decomposition method that completely decomposes according to the time-scale characteristics of the data itself, and this decomposition method does not require any basis function to be preset in advance. Therefore, it has significant advantages in processing non-linear and non-stationary signals.

[0068] Specifically, the decomposition method of the surface electromyogram signal of the user is as Figure 2 shown, and it includes the following steps:

[0069] Step S201: Construct a signal to be decomposed according to the surface electromyogram signal of the user;

[0070] Step S202: Identify all local maxima and local minima in the signal to be decomposed, and fit the upper envelope line of the signal to be decomposed according to each local maximum, and fit the lower envelope line of the signal to be decomposed according to each local minimum;

[0071] Step S203: Calculate the mean value of the upper envelope line and the lower envelope line of the signal to be decomposed, and construct a difference function between the signal to be decomposed and the mean value;

[0072] Step S204: Determine whether the constructed difference function satisfies a preset decomposition termination condition;

[0073] If not, execute Step S205; if so, execute Step S206;

[0074] Step S205: Further decompose the constructed difference function to generate a new difference function, and then return to Step S204;

[0075] Step S206: Take the constructed difference function as a component signal of the signal to be decomposed, and calculate the residual signal of the signal to be decomposed based on this component signal;

[0076] Step S207: Determine whether the residual signal of the signal to be decomposed satisfies a preset decomposition requirement condition;

[0077] If so, execute Step S208; if not, execute Step S209;

[0078] Step S208: Take the residual signal of the signal to be decomposed as a new signal to be decomposed, and then return to Step S202;

[0079] Step S209: End the decomposition of the signal to be decomposed.

[0080] In the above Step S201, the collected time can be used as the independent variable, and the intensity of the surface electromyogram signal can be used as the dependent variable to construct the signal to be decomposed. In this embodiment, let the signal to be decomposed be x(t).

[0081] In the above Step S202, for a point x(t') in the signal to be decomposed x(t), if within a region, the function values less than the moment t' and greater than the moment t' are both less than x(t'), then this point x(t') is the local maximum value of this region; conversely, if within this region, the function values less than the moment t' and greater than the moment t' are both greater than x(t'), then this point x(t') is the local minimum value of this region.

[0082] In this embodiment, the upper envelope of the signal to be decomposed refers to a curve that can completely cover all the local maximum values of the signal to be decomposed, and the lower envelope refers to a curve that can completely cover all the local minimum values of the signal to be decomposed. Therefore, in this embodiment, the cubic spline interpolation method can be used to fit the upper envelope of the signal to be decomposed according to the local maximum values of the signal to be decomposed, and fit the lower envelope of the signal to be decomposed according to the local minimum values of the signal to be decomposed. Among them, the cubic spline interpolation method approximates the known data points by constructing a series of cubic polynomials to obtain a smooth and continuous curve.

[0083] In the above Step S203, let the upper envelope of the signal to be decomposed be xtop (t), the lower envelope is x und (t), then the average value of the upper envelope and the lower envelope is

[0084]

[0085] Let the difference function between the signal to be decomposed and this average value be h(t), then

[0086]

[0087] In the above step S204, if the waveform of the constructed difference function is a stable waveform, it can be considered that the signal corresponding to this difference function is a stable signal, and at this time it is determined that the constructed difference function meets the preset decomposition termination condition; conversely, if the waveform of the constructed difference function is an unstable waveform, it can be considered that the signal corresponding to this difference function is an unstable signal, and at this time it is determined that the constructed difference function does not meet the preset decomposition termination condition.

[0088] In the above step S205, the methods for further decomposing the constructed difference function include:

[0089] Obtain all local maxima and all local minima of the difference function h(t), and fit the upper envelope of the difference function h(t) according to each local maximum and fit the lower envelope of the difference function h(t) according to each local minimum; then calculate the average value function of the upper envelope and the lower envelope of the difference function h(t), and use the difference function between the difference function h(t) and this average value function as the new difference function.

[0090] In the above step S206, let the component signal of the signal to be decomposed obtained be c(t), then

[0091] c(t) = h(t)

[0092] Let the residual signal of the signal to be decomposed be r(t) after extracting the IMF residual of the signal to be decomposed, then

[0093] r(t) = x(t) - c(t)

[0094] In the above step S207, the residual signal of the signal to be decomposed can be identified to judge whether this residual signal can be further decomposed; if the residual signal of the signal to be decomposed can be further decomposed, it is determined that this residual signal meets the preset decomposition requirement condition; conversely, if the residual signal of the signal to be decomposed cannot be further decomposed, it is determined that this residual signal does not meet the preset decomposition requirement condition, and this residual signal can be used as a component signal of the function to be decomposed.

[0095] In the above step S208, since the residual signal of the signal to be decomposed can be further decomposed, the residual signal of the signal to be decomposed is used as the new signal to be decomposed, and then the process returns to step S202 to continue the decomposition.

[0096] In the above step S209, each decomposition of a pair of signals to be decomposed can generate a component signal. Let the component signal generated by the i-th decomposition be c i (t), and after the signal to be decomposed is decomposed n times, the residual signal of the signal to be decomposed is r n (t), then

[0097]

[0098] In this embodiment, the EMD decomposition method is used to decompose the surface electromyogram signal of the user. Since the EMD decomposition method has the advantages of strong self-adaptability and the ability to efficiently process non-linear and non-stationary signals, it can effectively extract the useful information in the signal, so as to improve the accuracy and reliability of extracting the electrocardiogram signal from the surface electromyogram signal.

[0099] In some embodiments of the present invention, in the above step S204, the method for determining whether the constructed difference function satisfies the preset decomposition termination condition is as Figure 3 shown, and includes the following steps:

[0100] Step S301: Obtain the zero-crossing points and local extreme points of the constructed difference function, and obtain the upper envelope line and the lower envelope line of the difference function according to the local extreme points;

[0101] Step S302: Calculate the number difference between the number of zero-crossing points of the difference function and the number of extreme points, and determine whether the number difference is within the preset difference range;

[0102] If so, execute step S303; if not, execute step S305;

[0103] Step S303: Calculate the mean value of the upper envelope line and the lower envelope line of the difference function, and determine whether the mean value is a preset value;

[0104] If so, execute step S304; if not, execute step S305;

[0105] Step S304: Determine that the constructed difference function satisfies the preset decomposition termination condition;

[0106] Step S305: Determine that the constructed difference function does not satisfy the preset decomposition termination condition.

[0107] In the above step S301, the zero-crossing point of the difference function refers to the point where the function value of the difference function is 0. The extreme points of the difference function include the local maximum points and local minimum points of the difference function. After obtaining the local extreme points of the difference function, the upper envelope line of the difference function can be fitted according to the local maximum values therein, and the lower envelope line of the difference function can be fitted according to the local minimum values therein.

[0108] In the above step S302, the preset difference range is less than or equal to 1. That is, if the number of zero-crossing points of the difference function is equal to the number of extreme points, or differs by one, it is determined that the difference between the number of zero-crossing points and the number of extreme points of the difference function is within the preset difference range.

[0109] In the above step S303, the preset value is preferably 0. That is, when the difference between the number of zero-crossing points and the number of extreme points of the difference function, and the mean value of the upper envelope line and the lower envelope line of the difference function is 0, it is determined that the difference function satisfies the preset decomposition termination condition; otherwise, it is determined that the difference function does not satisfy the preset decomposition termination condition.

[0110] In this embodiment, according to the zero-crossing points and local extreme points of the difference function, it is judged whether the difference function satisfies the preset decomposition termination condition to ensure the reliability of the decomposition of the user's surface electromyogram signal.

[0111] In some embodiments of the present invention, the preset decomposition requirement conditions in step S207 include: the residual signal of the signal to be decomposed is a monotonic function, or the maximum value of the residual signal of the signal to be decomposed is less than the set maximum threshold.

[0112] Therefore, the method for judging whether the residual signal of the signal to be decomposed satisfies the preset decomposition requirement conditions in the above step S207 includes:

[0113] Judging whether the residual signal of the signal to be decomposed is a monotonic function, or whether the maximum value of the residual signal of the signal to be decomposed is less than the set maximum threshold;

[0114] If so, it is determined that the residual signal of the signal to be decomposed satisfies the preset decomposition requirement conditions;

[0115] If not, it is determined that the residual signal of the signal to be decomposed does not satisfy the preset decomposition requirement conditions.

[0116] In this embodiment, when the residual signal of the signal to be decomposed is a monotonic function, or the maximum value of the residual signal of the to-be-decomposed function is less than the set threshold, it can be considered that the residual signal is a single signal and does not need to be decomposed further. It is determined that the residual signal of the signal to be decomposed does not satisfy the preset decomposition requirement conditions, and the decomposition of the signal to be decomposed is ended. Therefore, this embodiment can improve the reliability of the decomposition of the signal to be decomposed.

[0117] In some embodiments of the present invention, the method for calculating the correlation coefficient between each component signal in the user's surface electromyogram signal and the preset electrocardiogram template signal in step S102 includes:

[0118] Adopt a preset grey correlation algorithm to calculate the grey correlation coefficient between each component signal in the user's surface electromyogram signal and the preset electrocardiogram template signal.

[0119] In this embodiment, taking the i-th component signal in the user's surface electromyogram signal as an example, the method for calculating the grey correlation coefficient between this component signal and the preset electrocardiogram template signal c0(t) is as follows:

[0120] First, obtain the signal values of the preset electrocardiogram template signal c0(t) at multiple preset moments, and construct a reference sequence according to these signal values;

[0121] Then, obtain the signal values of the i-th component signal c i (t) in the user's surface electromyogram signal at multiple preset moments, and construct the i-th comparison sequence according to these signal values;

[0122] Next, perform dimensionless processing on the above reference sequence and the i-th comparison sequence;

[0123] Finally, calculate the correlation coefficient between the above reference sequence and the i-th comparison sequence at each preset moment, and calculate the grey correlation coefficient between the i-th component signal c i (t) and the preset electrocardiogram template signal c0(t) according to the correlation coefficients at each preset moment.

[0124] In this embodiment, assume that there are N component signals in the user's surface electromyogram signal, and the number of preset moments is K. Then, there are K elements in the constructed reference sequence, and the k-th element is c0(k); there are also K elements in the i-th comparison sequence, and the k-th element is c i (k).

[0125] Assume that after performing dimensionless processing on the reference sequence, the k-th element of this reference sequence is z0(k); after performing dimensionless processing on the i-th comparison sequence, the k-th element of the i-th comparison sequence is z i (k), then

[0126]

[0127] Among them

[0128]

[0129] Assume that at the k-th preset moment, the correlation coefficient between the reference sequence and the i-th comparison sequence at the k-th preset moment is ξ i,k , then

[0130]

[0131] Among them, ρ is the discrimination coefficient, which is used to improve the significance of the difference between the correlation coefficients. Its value range is greater than 0 and less than 1. In this embodiment, the value of ρ is preferably 0.5.

[0132] Let the i-th component signal c i (t) in the user's surface electromyogram signal, and the grey correlation coefficient between it and the preset electrocardiogram template signal c0(t) be γ i , then

[0133]

[0134] In this embodiment, the preset grey correlation algorithm is adopted to calculate the grey correlation coefficients between the component signals in the user's surface electromyogram signal and the preset electrocardiogram template signal. Since the grey correlation coefficient has the advantages of wide applicability and being unrestricted by data distribution, the reliability and accuracy of the decomposition of the user's surface electromyogram signal can be improved.

[0135] In some embodiments of the present invention, as Figure 4 shown, the method for extracting the electrocardiogram signal from the surface electromyogram signal in this embodiment, after generating the user's electrocardiogram signal in the above step S104, further includes:

[0136] Step S105: Analyze the user's electrocardiogram signal to obtain the user's heart rate variability information;

[0137] Step S106: Obtain the user's depression level according to the user's heart rate variability information.

[0138] In the above step S105, since the user's electrocardiogram signal contains the user's heart rate information, the user's heart rate variability information can be obtained by analyzing the user's electrocardiogram signal.

[0139] In the above step S106, a mapping relationship between heart rate variability and depression level can be pre-constructed. For example, let the heart rate variability be C and the depression level be W, then the mapping relationship between the two is:

[0140] W = f(H(i))

[0141] After obtaining the user's heart rate variability, the user's depression level can be obtained according to the above mapping relationship and the heart rate variability to evaluate the user's mental health status.

[0142] In this embodiment, the method for constructing the mapping relationship between heart rate variability and depression level includes:

[0143] First, obtain a preset heart rate variability sequence and a preset depression degree sequence. There are E preset heart rate variabilities in the heart rate variability sequence V, where the i-th preset heart rate variability is v i ; and in the preset depression degree sequence L, the i-th depression degree is L i , and the i-th depression degree L i is the depression degree corresponding to the i-th preset heart rate variability v i .

[0144] Then, construct a mapping relationship between heart rate variability and depression degree.

[0145] Let L = CV -1 , where C is a conversion matrix, and V -1 represents the inverse function of the heart rate variability sequence. Then, the least squares method can be used to calculate the parameters in the conversion matrix C according to the heart rate variability sequence V and the preset depression degree sequence L, and the conversion matrix C is the mapping relationship between heart rate variability information and depression degree.

[0146] Therefore, in the above step S106, the depression degree of the user can be calculated using the following formula:

[0147] W = CH(i) -1

[0148] In this embodiment, after obtaining the user's electrocardiogram signal, the depression degree of the user is also evaluated according to the user's electrocardiogram signal to improve the reliability of the evaluation of the user's mental health status.

[0149] In some embodiments of the present invention, the method for obtaining the heart rate variability information of the user in the above step S105 is as Figure 5 shown, including the following steps:

[0150] Step S401: Generate the user's electrocardiogram waveform according to the user's electrocardiogram signal;

[0151] Step S402: According to the user's electrocardiogram waveform, obtain the number of electrocardiogram beat cycles of the user within a set time period;

[0152] Step S403: According to the number of electrocardiogram beat cycles of the user within a set time period, obtain the heart rate variability information of the user.

[0153] In the above step S401, a neural network can be used to identify the user's electrocardiogram information to obtain the user's electrocardiogram waveform.

[0154] In the above step S402, according to the user's electrocardiogram waveform, the number of electrocardiogram beat cycles T = {t0, t1…t of the user within a set time period can be obtained l}, where l is the number of electrocardiogram (ECG) beat cycles within a set duration, and t i is the time length of the i-th ECG beat cycle,

[0155] In the above step S403, the heart rate variability H(i) of the user is:

[0156] H(i) = t i - t i-1

[0157] After obtaining the user's ECG signal in this embodiment, the number of ECG beat cycles of the user within a set duration is obtained according to the ECG signal. Since the number of ECG beat cycles is related to the user's heart rate and can reflect the user's heart rate changes, the heart rate variability information of the user can be accurately obtained according to the number of ECG beat cycles.

[0158] In some embodiments of the present invention, before decomposing the surface electromyogram (sEMG) signal of the user in the above step S101, it further includes:

[0159] Filter the surface electromyogram signal of the user to filter out the clutter signal of the surface electromyogram signal.

[0160] In this embodiment, the filtering process performed on the surface electromyogram signal of the user includes removing the baseline interference signal and the power frequency interference signal in the surface electromyogram signal. Among them, the baseline interference signal refers to a low-frequency noise or interference signal that appears in the signal due to certain external or internal factors during signal transmission; the power frequency interference signal refers to the adverse effect caused by the AC power supply signal in the power system. Since both the baseline interference signal and the power frequency interference signal are clutter signals and will affect the accuracy of the user's surface electromyogram signal, a baseline filter and a power frequency filter can be preset in this embodiment to filter out the baseline interference signal and the power frequency interference signal in the surface electromyogram signal.

[0161] Since the frequency of the baseline interference signal is relatively low, generally less than 0.2 Hz, a high-pass filter with a cut-off frequency of 0.2 Hz is used as the baseline filter in this embodiment; since the frequency of the power frequency interference signal is fixed, a notch filter with a fixed frequency is used as the power frequency filter in this embodiment. For example, if the power frequency of the power system is 50 Hz, a notch filter with a frequency of 50 Hz is used as the power filter; if the power frequency of the power system is 60 Hz, a notch filter with a frequency of 60 Hz is used as the power filter.

[0162] Since the surface electromyogram signal is filtered before being decomposed in this embodiment, the accuracy of extracting the ECG signal from the surface electromyogram signal can be guaranteed.

[0163] The flowcharts provided in this embodiment are not intended to indicate that the operations of the method will be performed in any specific order, or that all operations of the method are included in every case. In addition, the above methods may include additional operations. Within the scope of the technical concept provided by the method of this embodiment, additional changes may be made to the above methods.

[0164] It should be understood that in some embodiments, each part may be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods may be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.

[0165] This embodiment also provides a computer program product 10 and a computer-readable storage medium 20. Figure 6 is a schematic diagram of a computer program product 10 according to an embodiment of the present invention, Figure 7 is a schematic diagram of a computer-readable storage medium 20 according to an embodiment of the present invention. The computer program product 10 includes a computer program 11, and when the computer program 11 is executed by a processor 32, it implements the steps of any of the above methods for extracting electrocardiogram signals from surface electromyogram signals. The computer-readable storage medium 20 stores the above computer program 11, and when the computer program 11 is executed by a processor 32, it implements the steps of the method for extracting electrocardiogram signals from surface electromyogram signals in any of the above embodiments.

[0166] The computer program 11 for performing the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, configuration data of an integrated circuit, or source code or object code written in any combination of one or more programming languages and procedural programming languages. The computer program 11 may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider via the Internet). In some embodiments, in order to perform aspects of the present invention, an electronic circuit, including, for example, a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), may execute computer-readable program instructions by utilizing the state information of the computer-readable program instructions to personalize the electronic circuit.

[0167] For the description of this embodiment, the computer program product 10 is a related product containing the computer program 11.

[0168] For the description of this embodiment, the computer-readable storage medium 20 is a tangible device capable of retaining and storing the computer program 11, which may be any device that can contain, store, communicate, propagate, or use the computer program 11 for an instruction execution system, apparatus, or device or in connection with these instruction execution systems, apparatuses, or devices. More specific examples (non-exhaustive list) of the computer-readable storage medium 20 include the following: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device, and any suitable combination of the above.

[0169] At this point, those skilled in the art should recognize that although numerous exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications that conform to the principles of the present invention can still be directly determined or derived from the disclosed content of the present invention without departing from the spirit and scope of the present invention. Therefore, the scope of the present invention should be understood and determined to cover all such other variations or modifications.

Claims

1. A method for extracting electrocardiogram signals from surface electromyogram signals, characterized in that, Including: Obtain the surface electromyogram signal of the user, and decompose the surface electromyogram signal to obtain a plurality of component signals of the surface electromyogram signal; Obtain a preset electrocardiogram template signal, and calculate the correlation coefficients between each of the component signals and the preset electrocardiogram template signal respectively; Obtain a preset correlation threshold, and use the component signals whose correlation coefficients are greater than the preset correlation threshold as the electrocardiogram information data of the user; Generate the electrocardiogram signal of the user according to the electrocardiogram information data.

2. The method for extracting electrocardiogram signals from surface electromyogram signals according to claim 1, characterized in that, The step of decomposing the surface electromyogram signal to obtain a plurality of component signals of the surface electromyogram signal includes: Construct a signal to be decomposed according to the surface electromyogram signal, and fit the upper envelope line and the lower envelope line of the signal to be decomposed; Calculate the mean value between the upper envelope line and the lower envelope line, and construct a difference function between the signal to be decomposed and the mean value, Judge whether the difference function satisfies a preset decomposition termination condition; If not, decompose the difference function to generate a new difference function, and return to the step of judging whether the difference function satisfies the preset decomposition termination condition; If satisfied, use the difference function as the component signal, and calculate the residual signal of the signal to be decomposed according to the component signal; Judge whether the residual signal satisfies a preset decomposition requirement condition; If satisfied, use the residual signal as a new signal to be decomposed, and return to the step of obtaining all local maximum values and local minimum values of the signal to be decomposed.

3. The method for extracting electrocardiogram signals from surface electromyogram signals according to claim 2, characterized in that, The step of judging whether the difference function satisfies the preset decomposition termination condition includes: Obtain the zero-crossing points and extreme points of the difference function, and obtain the upper envelope line and the lower envelope line of the difference function according to the extreme points; Judge whether the difference between the number of zero-crossing points and the number of extreme points is within a preset difference range, and whether the mean value of the upper envelope line and the lower envelope line of the difference function is a preset value; If so, it is determined that the difference function satisfies the preset decomposition termination condition; If not, it is determined that the difference function does not satisfy the preset decomposition termination condition.

4. The method for extracting electrocardiogram signals from surface electromyogram signals according to claim 2, characterized in that, The step of judging whether the residual signal satisfies the preset decomposition requirement condition includes: If the residual signal is a monotonic function, or the maximum value of the residual signal is less than a set maximum threshold, it is determined that the residual signal does not satisfy the preset decomposition requirement condition; Otherwise, it is determined that the residual signal satisfies the preset decomposition requirement condition.

5. The method for extracting electrocardiogram signals from surface electromyogram signals according to claim 1, characterized in that The step of calculating the correlation coefficients between each of the component signals and the preset electrocardiogram template signal respectively includes: Adopt a preset grey correlation degree algorithm to calculate the grey correlation coefficients between each of the component signals and the preset electrocardiogram template signal respectively.

6. The method for extracting electrocardiogram signals from surface electromyogram signals according to claim 1, wherein After the step of generating the electrocardiogram signal of the user according to the electrocardiogram information data, it further includes: Analyze the electrocardiogram signal to obtain the heart rate variability information of the user; Obtain the depression degree of the user according to the heart rate variability information.

7. The method for extracting electrocardiogram signals from surface electromyogram signals according to claim 6, characterized in that, The step of analyzing the electrocardiogram signal to obtain the heart rate variability information of the user includes: Generate the electrocardiogram waveform of the user according to the electrocardiogram signal, and obtain the number of electrocardiogram beat cycles of the user within a set time period according to the electrocardiogram waveform; Obtain the heart rate variability information according to the number of electrocardiogram beat cycles.

8. The method for extracting electrocardiogram signals from surface electromyogram signals according to claim 1, characterized in that, Before the step of decomposing the surface electromyogram signal, it further includes: Perform filtering processing on the surface electromyogram signal to filter out the clutter signal of the surface electromyogram signal.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method for extracting an electrocardiogram signal from a surface electromyogram signal according to any one of claims 1 to 8 are implemented.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method for extracting an electrocardiogram signal from a surface electromyogram signal according to any one of claims 1 to 8 are implemented.