Cardiopulmonary sound data monitoring method and system based on big data
Through technical means such as autocorrelation analysis method and isolated forest algorithm, the extreme point deviation in the heart and lung sound data is calculated and the filtering window is determined, which solves the problem of inaccurate monitoring results under the influence of noise in the existing technology, and achieves a more accurate heart and lung Sound data monitoring.
Patent Information
- Application Number
- CN202411574945.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The prior art fails to effectively process noise when monitoring cardiopulmonary sound data, resulting in the accuracy of monitoring results being affected.
The periods of heart sound signal and lung sound signal are divided by autocorrelation analysis, the first deviation and second deviation of the target extreme point are calculated, and the filter window is determined to realize the heart sound signal and lung sound signal. denoising processing.
It improves the accuracy of the monitoring results of cardiopulmonary sound data, effectively distinguishes between normal fluctuations and noise data, and enhances the accuracy of the filter window.
Smart Images

Figure CN119074038B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for monitoring cardiopulmonary sound data based on big data. Background Art
[0002] Cardiopulmonary sound data includes heart sounds and lung sounds. By collecting heart and lung sound data with a medical electronic stethoscope, the physiological status of the heart and lungs can be obtained. Among them, heart sounds can be used to evaluate the heart's pumping function and the operation of the valves, and lung sounds can reflect the ventilation of the lungs. Monitoring of heart and lung sound data helps to detect potential heart and lung diseases at an early stage, and can provide diagnostic clues even before symptoms appear, which plays an important role in improving the success rate of treatment and reducing complications.
[0003] The patent application document with publication number CN106372394A discloses an auscultation method for remote monitoring of cardiopulmonary diseases, in which sound information of the patient's heart and lungs is collected through an auscultation device; the collected sound information is converted into a digital signal through an audio converter; the received digital signal is compared with a standard cardiopulmonary sound signal stored in a server, and the pathological characteristic signal of the cardiopulmonary sound is extracted; the compared digital signal is converted into sound information and waveform information and transmitted to an auscultation terminal; the auscultation terminal analyzes the received comparison result and sends the analysis result to the patient.
[0004] The above existing solution does not take into account the noise in the heart and lung sound collection process when comparing the received digital signal with the standard heart and lung sound signal stored in the server. Such noise is often mixed with normal heart and lung sound data, affecting the accuracy of the comparison results received by the stethoscope terminal, thereby affecting subsequent data processing.
[0005] Based on this, how to accurately obtain the monitoring results of cardiopulmonary sound data is a technical problem that needs to be solved urgently by technical personnel in this field. Summary of the invention
[0006] In order to solve the technical problem of how to accurately obtain monitoring results of cardiopulmonary sound data, the present invention provides a cardiopulmonary sound data monitoring method and system based on big data.
[0007] In a first aspect, the present invention provides a method for monitoring heart and lung sound data based on big data, which adopts the following technical solution:
[0008] The method for monitoring heart and lung sound data based on big data includes the following steps:
[0009] Obtain a curve waveform diagram of a heart sound signal and / or a lung sound signal, wherein the curve waveform diagram contains a plurality of data points; divide the curve waveform diagram into a plurality of periods by an autocorrelation analysis method, wherein the periods contain a plurality of extreme value points; take any extreme value point as a target extreme value point, obtain a data point on a curve segment between the target extreme value point and a single-side adjacent extreme value point, and take the maximum value of the absolute value of the difference between the slope of the data point and the adjacent data point as a first deviation index of the data point; determine a first deviation of the target extreme value point, wherein the first deviation is positively correlated with the first deviation index of the data point on the curve segment between the adjacent extreme value points; obtain an abnormal score of the target extreme value point by an isolation forest algorithm, determine a second deviation of the target extreme value point, wherein the second deviation is negatively correlated with the abnormal score; determine a filtering window for the target extreme value point, wherein the size of the filtering window is positively correlated with the first deviation and the second deviation of the target extreme value point; and filter the target extreme value point based on the filtering window to realize monitoring of heart sound signals and / or lung sound signals.
[0010] The present invention takes into account that the noise existing in the heart sound signal and / or lung sound signal may cause errors in the monitoring results. Therefore, the first deviation is obtained by acquiring the data change of the target extreme point in the heart sound signal and / or lung sound signal in a single cycle, which can accurately reflect the fluctuation between the target extreme point and other extreme points in a single cycle to achieve accurate filtering and denoising; in addition, the present invention also takes into account that there may be normal fluctuations in the trend of extreme points in different cycles. In order to distinguish between normal fluctuations and noise data, the present invention also combines the extreme points in multiple cycles that are in the same stage as the target extreme point to obtain the second deviation. By combining the first deviation and the second deviation, the accuracy of the obtained filtering window can be effectively improved, so that the monitoring results of the heart sound signal and / or lung sound signal can be accurately obtained based on the accurate denoising results.
[0011] According to the big data-based heart and lung sound data monitoring method provided by the present invention, the curve waveform diagram of obtaining the heart sound signal and / or lung sound signal includes: collecting heart and lung sound data through an electronic stethoscope, and dividing the heart and lung sound data into heart sound signals and lung sound signals through a separation network; using the time corresponding to the data point in the heart sound signal and / or lung sound signal as the horizontal coordinate and the amplitude corresponding to the data point as the vertical coordinate to construct a curve waveform diagram of the heart sound signal and / or lung sound signal.
[0012] The present invention takes into account that a curve waveform diagram can more intuitively display data changes, and therefore draws the heart sound signal and the lung sound signal into a waveform diagram to facilitate subsequent processing.
[0013] According to the big data-based cardiopulmonary sound data monitoring method provided by the present invention, the determining the first deviation of the target extreme point also includes: using the straight line segment obtained by connecting the target extreme point and the unilateral adjacent extreme point as a reference line for the target extreme point; obtaining a reference point corresponding to the data point in the reference line, the reference point having the same vertical coordinate as the data point; using the absolute value of the difference between the horizontal coordinate of the data point and the corresponding reference point as the lateral distance of the data point, to determine the first deviation of the target extreme point, the first deviation of the target extreme point being positively correlated with the variance of the lateral distance of the data point in the curve segment.
[0014] The present invention takes into account that the curve waveform not affected by noise is relatively smooth, and therefore a smooth reference line is constructed as a reference standard, and then the deviation between the curve segment and the reference standard is obtained, so that the first deviation of the target extreme point can be accurately obtained.
[0015] According to the big data-based cardiopulmonary sound data monitoring method provided by the present invention, the determining the first deviation of the target extreme point includes: taking the maximum value among the first deviation indicators of all data points in the curve segment as the first deviation indicator of the curve segment, and obtaining the initial deviation of the curve segment based on the product of the first deviation indicator of the curve segment and the variance of the lateral distance of the data point; taking the ratio of the initial deviation of the curve segment to the maximum value among the initial deviations of all curve segments as the standard deviation of the curve segment; taking the average of the standard deviations of the curve segment between the target extreme point and the adjacent extreme points on the left and right sides as the first deviation of the target extreme point.
[0016] According to the big data-based cardiopulmonary sound data monitoring method provided by the present invention, the abnormality score of the target extreme value point is obtained by the isolation forest algorithm, including: presetting the number of cycles; obtaining other cycles in equal amounts on both sides of the cycle corresponding to the target extreme value point, and forming an extreme value array with the vertical coordinates of the target extreme value point and the extreme value points corresponding to the target extreme value point in each cycle; processing the extreme value array by the isolation forest algorithm to obtain the abnormality score of the target extreme value point.
[0017] The present invention takes into account the randomness of the extreme point data in a single cycle and cannot accurately reflect the normal fluctuations of the heart sound signal and / or lung sound signal. Therefore, by obtaining the extreme point corresponding to the target extreme point in different cycles, the change of the extreme point is obtained, thereby accurately obtaining the abnormal score of the extreme point.
[0018] According to the big data-based heart and lung sound data monitoring method provided by the present invention, the second deviation of the target extreme value point is determined, including: using the STL decomposition method to decompose the trend signal from the heart sound signal and / or the lung sound signal, and obtaining the trend value corresponding to each extreme value point in the trend signal; calculating the trend influence factor of the target extreme value point:
[0019] ;
[0020] In the formula, Indicates the trend influence factor of the target extreme point, The number of extreme points in the extreme value array representing the target extreme point, Indicates the trend value of the target extreme point, Represents the trend value of the i-th extreme point in the extreme value array. Represents the trend value of the jth extreme point in the extreme value array. Represents the absolute value sign; determines the second deviation of the target extreme value point, and the second deviation of the target extreme value point is negatively correlated with the trend influencing factor of the target extreme value point.
[0021] The present invention takes into account that the trend changes of normal extreme points are mixed with noise data, which may cause the normal trend changes to be mistaken for noise. Therefore, by determining the trend influencing factor of the target extreme point, the influence of the trend change of the target extreme point on the second deviation is obtained, thereby effectively improving the accuracy of the obtained second deviation.
[0022] According to the big data-based cardiopulmonary sound data monitoring method provided by the present invention, the second deviation of the target extreme point satisfies the relationship:
[0023] ;
[0024] In the formula, Represents the second deviation of the target extreme point, Indicates the trend influence factor of the target extreme point, represents the first deviation of the target extreme point, represents the average path length of the target extreme point in all isolated trees, represents the average path length of all extreme points in the isolated tree, Indicates the anomaly score of the target extreme point.
[0025] According to the big data-based cardiopulmonary sound data monitoring method provided by the present invention, the filtering window of the target extreme point satisfies the relationship:
[0026] ;
[0027] In the formula, The number of data points contained in the filter window representing the target extreme point, Indicates the preset window magnification factor, represents the first deviation of the target extreme point, Represents the second deviation of the target extreme point, represents the exponential function with base e, Indicates the rounding symbol.
[0028] According to the big data-based heart and lung sound data monitoring method provided by the present invention, the filtering processing of the target extreme value points based on the filtering window to achieve the monitoring results of the heart sound signal and / or the lung sound signal includes: using the corresponding filtering window to filter all the extreme value points to obtain the processed heart sound signal and / or the lung sound signal, and inputting them into the pre-trained neural network to obtain the monitoring results of the heart sound signal and / or the lung sound signal.
[0029] In a second aspect, the present invention provides a cardiopulmonary sound data monitoring system based on big data, which adopts the following technical solutions:
[0030] The cardiopulmonary sound data monitoring system based on big data includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned cardiopulmonary sound data monitoring method based on big data is implemented.
[0031] By adopting the above technical solution, the above-mentioned cardiopulmonary sound data monitoring method based on big data is generated into a computer program and stored in a memory to be loaded and executed by a processor, so that a terminal device is made according to the memory and the processor for easy use.
[0032] The present invention has the following technical effects:
[0033] Based on the above scheme, when determining the monitoring results of heart and lung sound data, the present invention analyzes the data changes of the target extreme point in the heart sound signal and / or lung sound signal in a single cycle to obtain a first deviation that accurately reflects the fluctuation between the target extreme point and other extreme points in a single cycle, thereby achieving accurate filtering and denoising; in addition, the present invention also combines the extreme points in multiple cycles that are in the same stage as the target extreme point to obtain a second deviation, which can distinguish between normal fluctuations and noise data of extreme points in different cycles. By combining the first deviation and the second deviation, the accuracy of the obtained filtering window can be effectively improved, so that the monitoring results of the heart sound signal and / or lung sound signal can be accurately obtained based on the accurate denoising results. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.
[0035] Figure 1 A flowchart of a method for monitoring cardiopulmonary sound data based on big data provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0037] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.
[0038] It should be noted that monitoring cardiopulmonary sound data is helpful for the diagnosis of heart and lung diseases. However, there may be various noise interferences during the collection process of cardiopulmonary sound data, such as environmental noise, mechanical noise, electronic noise and physiological noise. The data characteristics of the cardiopulmonary sound signal may be masked by the noise, making it impossible to obtain accurate monitoring results later.
[0039] Based on this, the embodiment of the present invention discloses a method for monitoring heart and lung sound data based on big data. By analyzing the data changes of the extreme points in the signal waveform in each cycle, the abnormality of the extreme points is obtained, and the window size of each extreme point is determined based on the abnormality to perform filtering operations, so as to achieve denoising of the heart and lung sound signal, thereby obtaining accurate monitoring results. Figure 1 As shown, Figure 1 A schematic flow chart of a method for monitoring heart and lung sound data based on big data provided by an embodiment of the present invention, the method comprising the following steps S1 to S5:
[0040] S1: Obtain a curve waveform diagram of a heart sound signal and / or a lung sound signal, wherein the curve waveform diagram includes a plurality of data points; and divide the curve waveform diagram into a plurality of cycles by an autocorrelation analysis method, wherein the cycles include a plurality of extreme value points.
[0041] It should be noted that the mechanical activities of the heart sound signal and the lung sound signal follow a certain periodic change pattern, and the presence of noise data will affect the position of the extreme point in the curve waveform diagram. Therefore, by analyzing the data deviation between the extreme point in the signal waveform and the surrounding extreme points, and the data deviation between the corresponding extreme points in different cycles, the abnormal degree of the extreme point and the size of the filter window can be accurately obtained to achieve data denoising. For ease of understanding, the embodiment of the present invention takes the processing of the heart sound signal as an example to illustrate, and the data change of the lung sound signal is similar to that of the heart sound signal, and the embodiment of the present invention will not be repeated.
[0042] For example, in an embodiment of the present invention, when obtaining a curve waveform graph of a heart sound signal and / or a lung sound signal, the heart and lung sound data can be collected by an electronic stethoscope, the heart and lung sound data can be divided into a heart sound signal and a lung sound signal through a separation network, and a curve waveform graph of the heart sound signal and / or the lung sound signal can be constructed.
[0043] For example, the separation network model can be pre-trained, and the heart and lung sound data can be input into the trained separation network to obtain the heart sound signal and the lung sound signal. The heart sound signal and / or the lung sound signal contain multiple data points, each data point corresponds to a time and an amplitude, and the time corresponding to the data point in the heart sound signal and / or the lung sound signal is used as the horizontal coordinate, and the amplitude corresponding to the data point is used as the vertical coordinate to construct a curve waveform diagram of the heart sound signal and / or the lung sound signal. Among them, the step of pre-training the separation network model is a prior art solution, and the embodiment of the present invention will not be repeated here.
[0044] Specifically, the periodic pattern followed by the mechanical activity of the heart is a cardiac cycle. After the peak value is detected by calculating the autocorrelation function of the cardiac sound signal through the autocorrelation analysis method, the starting point and duration of the cardiac cycle are determined by combining the position and spacing of the peak value, and the curve waveform can be divided into multiple cardiac cycles; then based on the hidden Markov model, according to the timing characteristics and physiological characteristics of the cardiac sound, each cardiac cycle is divided into different stages, specifically including: the first heart sound occurring in the systole, the second heart sound occurring in the diastole, and the third and fourth heart sounds occurring in the ventricular diastole. Due to the weakness and instability of the third and fourth heart sounds, their physiological significance and clinical value are low, so the third and fourth heart sounds are combined and called other heart sounds.
[0045] Similarly, based on the above method, the lung sound signal can be divided into cycles to obtain multiple cycles. After dividing the heart sound signal and the lung sound signal into cycles, the following steps can be performed to analyze the data changes in the cycle.
[0046] S2: Take any extreme point as the target extreme point, obtain the data points on the curve segment between the target extreme point and the unilateral adjacent extreme point, take the maximum value of the absolute value of the difference between the slope of the data point and the adjacent data point as the first deviation indicator of the data point, and determine the first deviation of the target extreme point.
[0047] It should be noted that extreme points usually refer to the local maximum or minimum points in the data sequence. These data points may deviate from the true value due to the influence of noise, causing their positions in the waveform to change. In addition, the curve of a normal heart sound signal is generally smoother, while an abnormal heart sound signal affected by noise will show irregular changes. Based on this, the first deviation between the extreme point and the adjacent extreme point can be obtained by analyzing the data changes between the extreme point and the adjacent extreme point.
[0048] By way of example, in an embodiment of the present invention, when determining the first deviation of a target extreme point, the maximum value among the first deviation indices of all data points in a curve segment can be used as the first deviation index of the curve segment, and the initial deviation of the curve segment can be obtained based on the product of the first deviation index of the curve segment and the variance of the lateral distance of the data points; the ratio of the initial deviation of the curve segment to the maximum value among the initial deviations of all curve segments is used as the standard deviation of the curve segment; and the average of the standard deviations of the curve segments between the target extreme point and the adjacent extreme points on the left and right sides is used as the first deviation of the target extreme point.
[0049] The target extreme value point may be a maximum value point or a minimum value point. For ease of understanding, the embodiment of the present invention takes the processing of the maximum value point as an example for explanation. The first deviation is positively correlated with the first deviation index of the data points on the curve segment between adjacent extreme value points.
[0050] It is understandable that the deviation of the slope between the data points on a curve that changes regularly is generally small, so the first deviation index of the data point can be obtained by analyzing the change of the slope between the data points on the curve.
[0051] For example, the extreme points in the curve waveform diagram of the heart sound signal and / or lung sound signal can be first obtained, and the curve waveform at different stages can be divided into multiple curve segments based on the extreme points, and there is a curve segment between each target extreme point and the unilateral adjacent extreme point, wherein the unilateral adjacent extreme points include the left adjacent extreme point and / or the right adjacent extreme point; and based on the slope of each data point on the curve segment, the first deviation index of the data point is determined.
[0052] Among them, in order to accurately obtain the changes between extreme points, the adjacent extreme points of the target extreme point can be another type of extreme point opposite to it, that is, if the target extreme point is a maximum point, the adjacent extreme point can be a minimum point; if the target extreme point is a minimum point, the adjacent extreme point can be a maximum point.
[0053] Specifically, the first deviation index of a data point can be determined by referring to the following relationship:
[0054] ;
[0055] In the formula, Indicates The first deviation indicator for data points, Indicates The slope of the data point, Indicates The slope of the data point, Indicates The slope of the data point, represents the maximum value function, Represents the absolute value symbol.
[0056] In the above formula, the smaller the first deviation index is, the smoother the data point is; the larger the first deviation index is, the less smooth the data point is, and the more likely there is noise interference. The data point and the adjacent data points and The absolute value of the difference in slope between the data points is The data point and the adjacent data points and The maximum absolute value of the difference between the maximum slopes of the data points is taken as the The first deviation indicator for each data point.
[0057] It should be noted that when analyzing edge data points such as the first data point and the last data point in the curve waveform diagram of the heart sound signal and / or lung sound signal based on the above formula, since the edge data point has only one adjacent data point, it cannot be analyzed. Therefore, it is considered that such data points have low reference value and are not processed in the technical solution provided in the embodiment of the present invention.
[0058] By analyzing the change of the slope based on the above formula, the first deviation index of the data point can be obtained. In order to more accurately obtain the first deviation of the target extreme point, the deviation between the data point on the curve segment and the data point on the ideal reference line can also be analyzed to obtain the lateral distance of the data point.
[0059] For example, in an embodiment of the present invention, when determining the first deviation of a target extreme point, the straight line segment obtained by connecting the target extreme point and a single-side adjacent extreme point can also be used as a reference line for the target extreme point; a reference point corresponding to the data point is obtained in the reference line, and the reference point has the same vertical coordinate as the data point; the absolute value of the difference between the horizontal coordinate of the data point and the corresponding reference point is used as the horizontal distance of the data point to determine the first deviation of the target extreme point, and the first deviation of the target extreme point is positively correlated with the variance of the horizontal distance of the data point in the curve segment.
[0060] Specifically, the standard deviation of the curve segment can be determined by referring to the following relationship:
[0061] ;
[0062] In the formula, represents the standard deviation of the curve segment, represents the initial deviation of the curve segment, represents the maximum value function, Indicates the maximum value among the initial deviations of all curve segments.
[0063] The initial deviation of the curve segment is normalized by the above formula, and the data value is standardized to the interval [0, 1] to facilitate subsequent calculations.
[0064] After determining the standard deviation of each curve segment, the average of the standard deviations of the curve segments on both sides of the target extreme point can be used as the first deviation of the target extreme point.
[0065] By analyzing the slope change of the data point based on the above method, the first deviation index of the data point can be obtained. Based on the deviation between the data point and the corresponding reference point on the curve segment, the lateral distance of the data point can be obtained. By combining the first deviation index of the data point and the lateral distance of the data point, the accuracy of the first deviation of the target extreme point can be effectively improved. In addition, the embodiment of the present invention also comprehensively considers the curve segment between the extreme point and the adjacent extreme points on the left and right sides, effectively improving the accuracy of the first deviation.
[0066] S3: Obtain the abnormal score of the target extreme point through the isolation forest algorithm, and determine the second deviation of the target extreme point.
[0067] It should be noted that, by analyzing the data changes of the extreme point on the curve segment in a single cardiac cycle through the above steps, the first deviation of the extreme point can be obtained. However, considering that there may be contingency in analyzing the data changes in only a single cardiac cycle, other extreme points corresponding to the target extreme point can be obtained in the same stage of other cardiac cycles. In theory, the amplitude deviation of the extreme point at the same position in the same stage is small.
[0068] In addition, considering that there may be situations where it is impossible to distinguish between normal data changes and noise data, such as the heart sound signal when the human body has just finished exercising, which will affect the overall trend of the cardiac cycle, but such data changes are normal changes, in order to avoid such extreme point data changes being mistaken for noise, the trend changes of the extreme points can also be analyzed to obtain the trend influencing factors of the extreme points. By combining the trend influencing factors of the extreme points and the data changes in different cardiac cycles, the second deviation of the extreme points can be obtained.
[0069] For example, in an embodiment of the present invention, when determining the second deviation of the target extreme value point, the abnormal score of the target extreme value point can be obtained by an isolation forest algorithm, and the second deviation of the target extreme value point is negatively correlated with the abnormal score.
[0070] Specifically, the number of cycles is preset; other cycles are obtained in equal amounts on both sides of the cycle corresponding to the target extreme value point, and the ordinates of the target extreme value point and the extreme value points corresponding to the target extreme value point in each cycle are combined into an extreme value array; the extreme value array is processed by the isolation forest algorithm to obtain the anomaly score of the target extreme value point.
[0071] In order to accurately analyze the data changes of extreme points in other periods, the number of periods can be set to an even number; the number of periods can be set according to actual needs, and the embodiment of the present invention does not impose too many restrictions on this.
[0072] It should be noted that even when the heart is abnormal, another periodic variation pattern with specific characteristics will be presented, and both normal heart sound signals and abnormal heart sound signals will show periodic variation. Therefore, when obtaining the extreme point corresponding to the target extreme point in each cardiac cycle, the stage corresponding to the target extreme point can be obtained in other cardiac cycles, and then the corresponding extreme point can be determined from each stage.
[0073] Specifically, if the target extreme point is a maximum point, the maximum point in each stage is used as the extreme point to be matched with the target extreme point; considering that the total duration of each cardiac cycle is close but not exactly the same, in order to facilitate unified processing, the time corresponding to the data point can be subtracted from the start time of the cardiac cycle in which the data point is located, and the ratio of the difference to the total duration of the current cardiac cycle is used as the standard time of the data point in the cardiac cycle; in addition, the embodiment of the present invention also takes into account that the possibility of noise in each cardiac cycle is not the same, so the standard time of the target extreme point can be subtracted from the standard time of the extreme points to be matched in other stages of the cardiac cycle, and the obtained differences are sorted to obtain n extreme points to be matched with smaller differences; the n extreme points to be matched are respectively subtracted from the amplitude of the target extreme point, and the extreme point to be matched with the smallest amplitude difference is used as the extreme point corresponding to the target extreme point in the cardiac cycle.
[0074] Among them, n of the n extreme value points to be matched is the number of extreme value points to be matched with smaller differences, and n can be specifically set according to actual needs.
[0075] Take an example to illustrate the stage corresponding to the target extreme point: if the target extreme point is in the first heart sound stage in the current cardiac cycle, then the stage corresponding to the target extreme point in other cardiac cycles is also the first heart sound stage.
[0076] The specific steps of processing the extreme value array by the isolation forest algorithm to obtain the abnormal score of the target extreme value point are the existing technical solutions, and the embodiments of the present invention are not repeated here. After obtaining the abnormal score of the target extreme value point based on the above steps, the trend influencing factor of the target extreme value point can be further determined.
[0077] By way of example, in an embodiment of the present invention, when determining the second deviation of a target extreme point, a seasonal and trend decomposition using Loess (STL) decomposition method can be used to decompose a trend signal from a heart sound signal and / or a lung sound signal, and obtain a trend value corresponding to each extreme point in the trend signal, wherein Loess represents a local weighted scatter plot smoothing method for estimating nonlinear relationships; the trend influence factor of the target extreme point is calculated, and the second deviation of the target extreme point is determined, and the second deviation of the target extreme point is negatively correlated with the trend influence factor of the target extreme point.
[0078] It should be noted that the trend value is the value corresponding to the data point in the trend signal. The specific steps of using the STL decomposition method to decompose the trend signal from the heart sound signal and / or lung sound signal and obtaining the trend value corresponding to each extreme point in the trend signal are prior arts and will not be elaborated herein in the embodiments of the present invention.
[0079] Specifically, the trend influencing factor of the target extreme point is determined, and the details can be found in the following relationship:
[0080] ;
[0081] In the formula, Indicates the trend influence factor of the target extreme point, The number of extreme points in the extreme value array representing the target extreme point, Indicates the trend value of the target extreme point, Represents the trend value of the i-th extreme point in the extreme value array. Represents the trend value of the jth extreme point in the extreme value array. Represents the absolute value symbol.
[0082] In the above formula, the larger the trend influence factor of the target extreme point, the greater the degree to which the target extreme point is affected by the overall trend of the heart sound signal. At this time, the abnormal score of the target extreme point is adjusted by the trend influence factor, which can reduce the abnormality of the target extreme point caused by the overall trend. Correspondingly, the smaller the trend influence factor of the target extreme point, the smaller the degree to which the target extreme point is affected by the overall trend of the heart sound signal. At this time, the abnormal score can reflect the abnormality of the target extreme point itself, so it is necessary to increase the abnormal score.
[0083] It should be noted that when determining the first deviation of the target extreme point based on the above step S2, it is necessary to analyze the deviation between the data point on the curve segment and the data point on the standard reference line to obtain the lateral distance of the data point. Therefore, the accuracy of the reference line plays an important role in determining the first deviation of the extreme point. However, if the extreme point is interfered by noise, the position of the extreme point in the curve waveform diagram will change, and the reference line itself may have errors. The accuracy of the first deviation obtained based on this is also low. Based on this, the embodiment of the present invention realizes the reverse correction of the first deviation to the second deviation by analyzing the relationship between the first deviation and the second deviation.
[0084] Specifically, when the extreme point is less affected by noise, it means that the extreme point is more normal. In theory, the first deviation and the second deviation The smaller the value of should be, the higher the accuracy of the reference line will be. The smaller the value, the more correct the judgment. When the extreme point is more affected by noise, it means that the extreme point is more abnormal, that is, the lower the accuracy of the reference line is, the more The smaller the error, the more likely it is that the error of the reference line is transferred to the first deviation. Based on this, we can calculate the first deviation The second deviation Correction is performed in the reverse direction.
[0085] For example, in the embodiment of the present invention, when determining the second deviation of the target extreme point, the following relationship may be specifically referred to:
[0086] ;
[0087] In the formula, Represents the second deviation of the target extreme point, Indicates the trend influence factor of the target extreme point, represents the first deviation of the target extreme point, represents the average path length of the target extreme point in all isolated trees, Represents the average path length of all extreme points in the isolated tree.
[0088] In the above formula, Indicates the anomaly score of the target extreme point.
[0089] It should be noted that the average path length of the target extreme value point in all isolated trees and the average path length of all extreme value points in isolated trees can be obtained through the isolation forest algorithm, which will not be described in detail in the embodiment of the present invention.
[0090] After obtaining the first deviation and the second deviation of the target extreme value point based on the above steps, the size of the filter window of the target extreme value point during denoising can be determined.
[0091] S4: Determine the filtering window of the target extreme point.
[0092] It should be noted that the size of the filter window of the target extreme point during denoising is affected by its abnormality. The greater the abnormality, the greater the possibility that the target extreme point is noise data, and the corresponding filter window should also be larger to increase the correction strength; the smaller the abnormality, the smaller the possibility that the target extreme point is noise data, and the corresponding filter window should also be smaller to ensure that the target extreme point retains the original amplitude characteristics. Based on the above steps, it can be seen that the first deviation and the second deviation of the target extreme point can be used to characterize the abnormality of the target extreme point. The larger the first deviation and the second deviation, the greater the abnormality of the target extreme point, the greater the abnormality, and the larger the filter window. Therefore, the size of the filter window is positively correlated with the first deviation and the second deviation.
[0093] For example, in the embodiment of the present invention, the filtering window of the target extreme value point is determined, and the specific relationship can be referred to as follows:
[0094] ;
[0095] In the formula, The number of data points contained in the filter window representing the target extreme point, Indicates the preset window magnification factor, represents the first deviation of the target extreme point, Represents the second deviation of the target extreme point, represents the exponential function with base e, Indicates the rounding symbol.
[0096] The window magnification factor can be preset to 3, and can be set according to actual needs.
[0097] Based on the above formulas, the filtering windows of the target extreme points in the heart sound signal and the lung sound signal can be obtained respectively, and based on the filtering results of the target extreme points, the monitoring results of the heart sound signal and / or the lung sound signal can be obtained.
[0098] S5: Filter the target extreme value point based on the filter window to achieve heart sound signal and / or lung sound signal monitoring.
[0099] For example, in an embodiment of the present invention, when processing the target extreme points based on the filtering window and determining the monitoring results of the heart sound signal and / or the lung sound signal, all the extreme points can be filtered using the corresponding filtering window to obtain the processed heart sound signal and / or the lung sound signal, and input them into the pre-trained neural network to obtain the monitoring results of the heart sound signal and / or the lung sound signal.
[0100] For example, when obtaining the monitoring results of the heart sound signal and / or the lung sound signal, a neural network model can be constructed. The embodiment of the present invention takes the convolutional neural network as an example for explanation, and the type of the neural network can be set according to actual needs. Construct a data set, which includes each data point in the heart sound signal and / or the lung sound signal; use each data point as sample data, and manually set a corresponding label for each sample data, wherein the output label of the normal heart sound signal and / or the lung sound signal can be set to 1, and the output label of the abnormal heart sound signal and / or the lung sound signal can be set to 0, to obtain a labeled data set.
[0101] A data set of historically collected heart sound signals and / or lung sound signals with labels is used for training to obtain a trained neural network model; the newly collected heart sound signals and / or lung sound signals are processed based on the above steps and input into the trained neural network model to obtain monitoring results of the heart sound signals and / or lung sound signals.
[0102] It is understandable that the specific steps of performing neural network training on heart sound signals and / or lung sound signals are existing technical solutions and will not be described in detail in the embodiments of the present invention.
[0103] The monitoring results of the heart sound signal and / or lung sound signal obtained in the above manner include normal and abnormal. In order to promptly remind the user to deal with the abnormal monitoring results, an abnormal monitoring result may be warned.
[0104] The warning method may be specifically set according to actual needs, and the embodiment of the present invention does not limit this.
[0105] It can be seen that in an embodiment of the present invention, when the heart and lung sound data monitoring result is determined based on big data, a curve waveform of a heart sound signal and / or a lung sound signal can be obtained, and the curve waveform contains multiple data points; the curve waveform is divided into multiple periods by an autocorrelation analysis method, and the period contains multiple extreme points; any extreme point is taken as a target extreme point, and data points on the curve segment between the target extreme point and a single-side adjacent extreme point are obtained, and the maximum value of the absolute value of the difference between the slope of the data point and the adjacent data point is taken as the first deviation index of the data point; the first deviation of the target extreme point is determined, and the first deviation is positively correlated with the first deviation index of the data point on the curve segment between the adjacent extreme points; the abnormal score of the target extreme point is obtained by an isolation forest algorithm, and the second deviation of the target extreme point is determined, and the second deviation is negatively correlated with the abnormal score; the filtering window of the target extreme point is determined, and the size of the filtering window is positively correlated with the first deviation and the second deviation of the target extreme point; the target extreme point is filtered based on the filtering window to realize heart sound signal and / or lung sound signal monitoring.
[0106] In this way, the embodiment of the present invention takes into account that the noise existing in the heart sound signal and / or lung sound signal may cause errors in the monitoring results. Therefore, the first deviation is obtained by obtaining the data change of the target extreme point in the heart sound signal and / or lung sound signal in a single cycle, which can accurately reflect the fluctuation between the target extreme point and other extreme points in a single cycle to achieve accurate filtering and denoising; in addition, the present invention also takes into account that there may be normal fluctuations in the trend of extreme points in different cycles. In order to distinguish between normal fluctuations and noise data, the embodiment of the present invention also combines the extreme points in multiple cycles that are in the same stage as the target extreme point to obtain the second deviation. By combining the first deviation and the second deviation, the accuracy of the obtained filtering window can be effectively improved, so that the monitoring results of the heart sound signal and / or lung sound signal can be accurately obtained based on the accurate denoising results.
[0107] An embodiment of the present invention also discloses a cardiopulmonary sound data monitoring system based on big data, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a cardiopulmonary sound data monitoring method based on big data according to the present invention is implemented.
[0108] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.
[0109] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM, a dynamic random access memory DRAM, a static random access memory SRAM, an enhanced dynamic random access memory EDRAM, a high bandwidth memory HBM, a hybrid memory cube HMC, etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.
[0110] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
[0111] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A cardiopulmonary sound data monitoring method based on big data, characterized in that: include: Obtaining a curve waveform diagram of a heart sound signal and / or a lung sound signal, wherein the curve waveform diagram includes a plurality of data points; dividing the curve waveform diagram into a plurality of cycles by an autocorrelation analysis method, wherein the cycles include a plurality of extreme value points; Taking any extreme point as the target extreme point, obtaining the data points on the curve segment between the target extreme point and the unilaterally adjacent extreme point, taking the maximum value of the absolute value of the difference between the slope of the data point and the adjacent data point as the first deviation index of the data point; determining the first deviation of the target extreme point, the first deviation is positively correlated with the first deviation index of the data point on the curve segment between the adjacent extreme points; The number of cycles is preset, and the number of cycles is an even number; an even number of other cycles are equally obtained on both sides of the cycle corresponding to the target extreme value point, and the ordinates of the target extreme value point and the extreme value points corresponding to the target extreme value point in the even number of cycles are combined into an extreme value array; the extreme value array is processed by the isolation forest algorithm to obtain the abnormal score of the target extreme value point; Use seasonality and trend decomposition to obtain the trend value corresponding to each extreme point in the trend signal using the Loess decomposition method; ; is the trend influencing factor of the target extreme point, is the number of extreme points in the extreme value array of the target extreme point, is the trend value of the target extreme point, is the trend value of the i-th extreme point in the extreme value array, is the trend value of the jth extreme point in the extreme value array, is the absolute value symbol; ; is the second deviation of the target extreme point, is the first deviation of the target extreme point, is the average path length of the target extreme point in all isolated trees, is the average path length of all extreme points in the isolated tree, is the anomaly score of the target extreme point; Determine a filter window of the target extreme point, the size of the filter window is positively correlated with the first deviation and the second deviation of the target extreme point; filter the target extreme point based on the filter window to achieve heart sound signal and / or lung sound signal monitoring.
2. The method for monitoring heart and lung sound data based on big data according to claim 1, characterized in that: The step of obtaining a curve waveform diagram of a heart sound signal and / or a lung sound signal comprises: Heart and lung sound data are collected by an electronic stethoscope, and the heart and lung sound data are divided into heart sound signals and lung sound signals by a separation network; a curve waveform diagram of the heart sound signal and / or lung sound signal is constructed with the time corresponding to the data point in the heart sound signal and / or lung sound signal as the horizontal coordinate and the amplitude corresponding to the data point as the vertical coordinate.
3. The method for monitoring heart and lung sound data based on big data according to claim 1, characterized in that: The step of determining a first deviation of a target extreme value point comprises: A straight line segment obtained by connecting the target extreme point and a single-side adjacent extreme point is used as a reference line for the target extreme point; a reference point corresponding to the data point is obtained from the reference line, and the reference point has the same ordinate as the data point; The absolute value of the difference between the horizontal coordinates of the data point and the corresponding reference point is used as the horizontal distance of the data point; the maximum value of the first deviation indicators of all data points in the curve segment is used as the first deviation indicator of the curve segment, and the initial deviation of the curve segment is obtained based on the product of the first deviation indicator of the curve segment and the variance of the horizontal distance of the data point; The ratio of the initial deviation of the curve segment to the maximum value of the initial deviations of all curve segments is used as the standard deviation of the curve segment; The average of the standard deviations of the curve segments between the target extreme value point and the adjacent extreme value points on the left and right sides is used as the first deviation of the target extreme value point.
4. The method for monitoring heart and lung sound data based on big data according to claim 1, characterized in that: The filtering window of the target extreme point satisfies the relationship: ; In the formula, The number of data points contained in the filter window representing the target extreme point, Indicates the preset window magnification factor, represents the first deviation of the target extreme point, Represents the second deviation of the target extreme point, represents the exponential function with base e, Indicates the rounding symbol.
5. The method for monitoring heart and lung sound data based on big data according to claim 1, characterized in that: The filtering process of the target extreme value point based on the filtering window to realize the monitoring of the heart sound signal and / or the lung sound signal includes: All extreme value points are filtered using corresponding filter windows to obtain processed heart sound signals and / or lung sound signals, which are input into a pre-trained neural network to obtain monitoring results of the heart sound signals and / or lung sound signals.
6. A cardiopulmonary sound data monitoring system based on big data, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the cardiopulmonary sound data monitoring method based on big data according to any one of claims 1-5 is implemented.
Citation Information
Patent Citations
Auscultation method for remotely monitoring heart and lung diseases
CN106372394A
Heart sound signal period parameter estimating method
CN105249986A
System health degree intelligent monitoring and evaluation method based on anomaly detection
CN116383645A