Lung sound analysis method and apparatus, electronic device, and storage medium

By performing AR model processing and window function analysis on respiratory data, the problem of low accuracy in lung sound analysis in existing technologies has been solved, and more efficient lung sound feature recognition has been achieved.

CN119949871BActive Publication Date: 2025-12-26GUANGDONG UNIV OF PETROCHEMICAL TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510010473.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-12-26
Estimated Expiration
2045-01-03

AI Technical Summary

Technical Problem

Existing technologies cannot efficiently analyze the frequency components of lung sounds over a short period of time, resulting in low accuracy of lung sound analysis results.

Method used

Raw respiratory data is acquired, processed into a respiratory time-domain graph, and input into a preset AR model to output a multi-order time-series curve. After processing with a window function, a respiratory spectrum is obtained, and lung sound feature analysis is performed.

Benefits of technology

It improves the accuracy and efficiency of lung sound analysis results, enabling faster and more accurate identification of lung sound features such as wheezing and crackling sounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119949871B_ABST
    Figure CN119949871B_ABST
Patent Text Reader

Abstract

The application discloses a lung sound analysis method and device, an electronic device and a storage medium, which can be widely applied to the technical field of lung sound data processing. After obtaining original breathing data, the application processes the original breathing data to obtain a breathing time domain graph, then inputs the breathing time domain data into a preset AR model to output a multi-order time sequence curve graph, and processes the multi-order time sequence curve graph through a window function to obtain a breathing frequency spectrum graph, so that the efficiency and accuracy of frequency calculation in a short period can be accelerated, and then lung sound feature analysis can be performed according to the breathing frequency spectrum graph, and the accuracy of the lung sound analysis result can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of lung sound data processing, and particularly relates to a lung sound analysis method and device, electronic equipment and a storage medium. BACKGROUND

[0002] In the related art, chronic respiratory diseases such as asthma and chronic obstructive pulmonary disease are inherently refractory, but their conditions can be managed through symptoms to prevent the progression of the disease. A key symptom that needs to be monitored during management is wheezing during breathing. The horizontal segment in the spectrogram is a key indicator for effectively identifying wheezing and crackles. However, the spectrogram is dynamically changing, and therefore, a lot of computing time is required to analyze the frequency components in a single short period. However, the current analysis method cannot analyze all the frequency components in a single short period, resulting in low accuracy of the final lung sound analysis result.

[0003] To sum up, the technical problems in the related art need to be improved. SUMMARY

[0004] The main purpose of the embodiments of the present application is to provide a lung sound analysis method and device, electronic equipment and a storage medium, which can effectively improve the accuracy of the lung sound analysis result.

[0005] To achieve the above-mentioned purpose, one aspect of the embodiments of the present application provides a lung sound analysis method, which comprises the following steps:

[0006] Obtaining original respiratory data;

[0007] Processing the original respiratory data to obtain a respiratory time-domain graph;

[0008] Inputting the respiratory time-domain data into a preset AR model to output a multi-order time series graph;

[0009] Processing the multi-order time series graph through a window function to obtain a respiratory spectrogram;

[0010] Performing lung sound feature analysis according to the multi-order time series graph and the respiratory spectrogram.

[0011] In some embodiments, the preset AR model is as follows:

[0012]

[0013] In the formula, y(t) represents a time-domain signal corresponding to a time node t, y(t-kΔt) represents a time-domain signal corresponding to a time node t-kΔt, A(t) represents white noise corresponding to a time node t, p represents the total order of the preset AR model, k represents the kth order of the preset AR model, Δt represents the period of past respiratory data, and φ represents the correlation coefficient of the preset AR model.k represents the error of the kth order, and δ represents the total error.

[0014] In some embodiments, the total error is calculated as follows:

[0015]

[0016] In the formula, μ represents the error mean of past respiratory data, φ i represents the error of the ith order.

[0017] In some embodiments, the preset AR model includes an autoregressive model of a segment moving window, which is as follows:

[0018] m(t) = u(t) - u(t - 1102Δt);

[0019] In the formula, m(t) represents the segment moving window, u(t) represents the unit step function, and Δt represents the period of past respiratory data.

[0020] In some embodiments, the autoregressive model of the segment moving window is as follows:

[0021]

[0022] In the formula, y(t ′ )m(t ′ ) represents the time-domain signal in the segment moving window m(t ′ ) corresponding to the time node t, y(t ′ -kΔt)m(t ′ ) represents the time-domain signal in the segment moving window m(t ′ ) corresponding to the time node t-kΔt, p represents the total order of the preset AR model, k represents the kth order of the preset AR model, Δt represents the period of past respiratory data, A(t ′ )m(t ′ ) represents the white noise in the segment moving window m(t ′ ) corresponding to the time node t, and δ(t ′ )m(t ′ ) represents the total error in the segment moving window m(t ′ ) corresponding to the time node t.

[0023] In some embodiments, the inputting of the respiratory time-domain data into the preset AR model and the outputting of a multi-order time sequence graph include:

[0024] The respiratory time-domain data is inputted into an autoregressive model of a segment moving window to obtain segment time-domain data.

[0025] According to the coefficient of the preset AR model, the segment time domain data is processed to obtain the multi-order time sequence graph.

[0026] In some embodiments, the processing the multi-order time sequence graph through the window function comprises:

[0027] A Kaiser window function is determined as a target window function from a plurality of candidate window functions.

[0028] The multi-order time sequence graph is processed through the target window function.

[0029] To achieve the above object, another aspect of the embodiments of the present application provides a lung sound analysis device, which comprises:

[0030] A first module is configured to acquire original respiratory data.

[0031] A second module is configured to process the original respiratory data to obtain a respiratory time domain graph.

[0032] A third module is configured to input the respiratory time domain data into a preset AR model to output a multi-order time sequence graph.

[0033] A fourth module is configured to process the multi-order time sequence graph through a window function to obtain a respiratory frequency spectrum graph.

[0034] A fifth module is configured to perform lung sound feature analysis according to the multi-order time sequence graph and the respiratory frequency spectrum graph.

[0035] To achieve the above object, another aspect of the embodiments of the present application provides an electronic device, which comprises:

[0036] At least one processor;

[0037] At least one memory configured to store at least one program;

[0038] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.

[0039] To achieve the above object, another aspect of the embodiments of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above method.

[0040] The embodiments of the present application at least have the following beneficial effects: the present application provides a lung sound analysis method and device, an electronic device and a storage medium, and the scheme obtains a respiratory time domain graph by processing original respiratory data after obtaining the original respiratory data, then inputs the respiratory time domain data into a preset AR model to output a multi-order time sequence curve graph, and processes the multi-order time sequence curve graph through a window function to obtain a respiratory frequency spectrum graph, so as to accelerate the efficiency and accuracy of frequency calculation in a short period, and then make lung sound feature analysis according to the respiratory frequency spectrum graph, so as to effectively improve the accuracy of the lung sound analysis result. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 is a flowchart of a lung sound analysis method provided by the embodiments of the present application;

[0042] Figure 2 is a time domain, a frequency domain and a time sequence graph of different order coefficients of a normal respiratory signal provided by the embodiments of the present application;

[0043] Figure 3 is a time domain, a frequency domain and a time sequence graph of different order coefficients of a respiratory signal provided by the embodiments of the present application;

[0044] Figure 4 is a time domain, a frequency domain and a time sequence graph of different order coefficients of a respiratory signal provided by the embodiments of the present application;

[0045] Figure 5 is a 1oc time sequence curve schematic diagram of MSARM provided by the embodiments of the present application;

[0046] Figure 6 is a 2oc time sequence curve schematic diagram of MSARM provided by the embodiments of the present application;

[0047] Figure 7 is a 3oc time sequence curve schematic diagram of MSARM provided by the embodiments of the present application;

[0048] Figure 8 is a 4oc time sequence curve schematic diagram of MSARM provided by the embodiments of the present application;

[0049] Figure 9 is a schematic diagram of random noise converted by MSARM provided by the embodiments of the present application;

[0050] Figure 10 is a schematic diagram of a pure sine wave converted by MSARM provided by the embodiments of the present application;

[0051] Figure 11 is a frequency spectrum graph corresponding to 1OC provided by the embodiments of the present application;

[0052] Figure 12 is a spectrum diagram corresponding to 2OC provided by an embodiment of the present application;

[0053] Figure 13 is a spectrum diagram corresponding to 3OC provided by an embodiment of the present application;

[0054] Figure 14 is a spectrum diagram corresponding to 4OC provided by an embodiment of the present application;

[0055] Figure 15 is a difference diagram corresponding to 1OC provided by an embodiment of the present application;

[0056] Figure 16 is a difference diagram corresponding to 2OC provided by an embodiment of the present application;

[0057] Figure 17 is a difference diagram corresponding to 3OC provided by an embodiment of the present application;

[0058] Figure 18 is a difference diagram corresponding to 4OC provided by an embodiment of the present application;

[0059] Figure 19 is a structural schematic diagram of a lung sound analysis device provided by an embodiment of the present application;

[0060] Figure 20 is a hardware structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementation manners described in the following exemplary embodiments do not represent all the implementation manners consistent with the embodiments of the present application, but are only examples of devices and methods consistent with some aspects of the embodiments of the present application.

[0062] It can be understood that the terms "first", "second", and the like used in the present application can be used herein to describe various concepts, but unless specifically stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon" or "in response to determining".

[0063] As used herein, the terms “at least one”, “multiple”, “each”, “any”, and the like, include one, two, or more than two, multiple includes two or more than two, each refers to each of the corresponding plurality, and any refers to any one of the plurality.

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification herein is for describing the embodiments of the application only and is not intended to be limiting of the application.

[0065] Before the embodiments of the present application are described in detail, first, some nouns and terms involved in the embodiments of the present application are explained, and the nouns and terms involved in the embodiments of the present application are applicable to the following explanations:

[0066] The time domain graph is used to show the characteristics of the signal changing with time. In the time domain graph, the horizontal axis represents time, and the vertical axis represents the amplitude of the signal. The time domain graph intuitively shows how the amplitude of the signal changes with time, and can be used to observe the periodicity, peak value, valley value, etc. of the signal.

[0067] The time sequence diagram is used to show the characteristics of the signal changing with time, emphasizing the continuity of the time sequence. The time sequence diagram is usually used to display the signal change in continuous time, and the fluctuation and trend of the signal can be clearly seen.

[0068] The frequency spectrum graph is used to show the frequency components of the signal and their amplitudes. In the frequency spectrum graph, the horizontal axis represents frequency, and the vertical axis represents the amplitude of each frequency component. The frequency spectrum graph converts the time domain signal into the frequency domain signal through Fourier transform, and can intuitively see the frequency components contained in the signal and their relative strength, which is very important for frequency analysis and filter design of the signal.

[0069] In the related art, chronic respiratory diseases (CRDs), such as asthma and chronic obstructive pulmonary disease (COPD), are the leading cause of death worldwide. Although both asthma and COPD are inherently difficult to treat, their conditions can be managed professionally through careful and cautious symptom monitoring to prevent disease progression. One key symptom of chronic respiratory disease monitoring is wheezing during breathing, as early detection of wheezing can prevent severe exacerbations.

[0070] Spectrograms are widely used in the classification of lung sounds. The horizontal segment (he) in the frequency spectrum of the sound is a key indicator for identifying wheezing and crackles, which is conducive to image processing and recognition of lung sounds. However, in many cases, wheezing and crackles cannot clearly show he. The spectrogram is a visual representation of dynamic time-frequency signal changes. However, the spectrogram requires considerable computing time to analyze the frequency components in a single short period. However, the coefficients of the AR model and its extended parameters (such as LPCC) facilitate fast calculation in the time domain; therefore, the AR coefficients are the key parameters for data compression.

[0071] Therefore, in the embodiments of the present application, a lung sound analysis method and device, an electronic device and a storage medium are provided. After obtaining the original respiratory data, the original respiratory data is processed to obtain a respiratory time domain graph, and then the respiratory time domain data is input into a preset AR model to output a multi-order time sequence graph. The respiratory frequency spectrum graph is obtained by processing the multi-order time sequence graph through a window function. Thus, the efficiency and accuracy of frequency calculation in a short period can be accelerated, and the accuracy of the lung sound analysis result can be effectively improved according to the lung sound feature analysis based on the respiratory frequency spectrum graph.

[0072] The lung sound analysis method provided in the embodiments of the present application relates to the technical field of lung sound data processing. The lung sound analysis method provided in the embodiments of the present application can be applied to a terminal, can be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, and the like, but is not limited thereto. The server end can be configured as an independent physical server, can be configured as a server cluster or a distributed system composed of multiple physical servers, can be configured as a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms, and the server can also be a node server in a blockchain network. The software can be an application that implements the lung sound analysis method, but is not limited to the above forms.

[0073] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0074] Figure 1 This is an optional flowchart of the lung sound analysis method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S110 to S150:

[0075] Step S110: Obtain raw respiratory data;

[0076] Step S120: Process the raw respiratory data to obtain a respiratory time-domain graph;

[0077] Step S130: Input the respiratory time-domain data into the preset AR model and output the multi-order time-series curve.

[0078] Step S140: Process the multi-order time series curves using a window function to obtain the respiratory spectrum.

[0079] Step S150: Analyze lung sound characteristics based on multi-order time-series curves and respiratory spectrograms.

[0080] It is understood that the raw respiratory data can be respiratory sounds pre-collected by a data acquisition device. This acquisition device can be a stethoscope or other device capable of collecting respiratory sounds. Specifically, in this embodiment, after obtaining the raw respiratory data, the data is normalized to form a respiratory time-domain graph.

[0081] In this embodiment, the process of converting a time-domain signal into a frequency-domain signal is shown in Formula 1:

[0082]

[0083] In the formula, x(t) represents a one-dimensional time-domain signal; e -jωtn" is a phasor operator, which is the same as the phasor operator in a discrete fast Fourier transform (DFT); w * The (t-t) window function represents a Kaiser window.

[0084] The Kaiser window is a window that is similar to a long spherical window, in which the ratio of main lobe energy to side lobe energy is maximum.

[0085] The preset AR model involved in the embodiments of the present application is shown in formula 2.

[0086]

[0087] In the formula, y(t) represents a time-domain signal corresponding to a time node t; y(t-kΔt) represents a time-domain signal corresponding to a time node t-kΔt; A(t) represents white noise corresponding to the time node t; p represents the total order of the preset AR model; k represents the kth order of the preset AR model; Δt represents the period of past respiratory data; φ k represents the error of the kth order, and δ represents the total error.

[0088] The calculation process of the total error is shown in formula 3.

[0089]

[0090] In the formula, μ represents the error mean of past respiratory data, and φ i represents the error of the ith order.

[0091] It can be understood that the coefficients of the AR model in the embodiments can be obtained by approximation through the method of minimum variance. The AR model of the embodiments is a statistical model for analyzing time series data, which assumes that the current value of a variable is a function of past values.

[0092] Specifically, the preset AR model of the embodiments can be a moving window autoregressive model of segments. The moving window of segments is shown in formula 4.

[0093] m(t) = u(t) - u(t-1102Δt) formula 4;

[0094] In the formula, m(t) represents a moving window of segments, u(t) represents a unit step function, and Δt represents the period of past respiratory data.

[0095] It can be understood that the sampling frequency (fs) of the moving window autoregressive model (MSARM) of segments is 11025 Hz, and there are 1102 sampling points in a 100 ms moving window. The moving window starts sampling from the initial signal and runs to the end t e of the respiratory sound signal.

[0096] The embodiment can obtain formula 5 of the autoregressive model of the segment moving window by substituting formula 4 into formula 2.

[0097]

[0098] In the formula, y(t')m(t') represents the time-domain signal in the segment moving window m(t') corresponding to the time node t, y(t'-kΔt)m(t') represents the time-domain signal in the segment moving window m(t') corresponding to the time node t-kΔt, p represents the total order of the preset AR model, k represents the k-th order of the preset AR model, Δt represents the period of the past respiratory data, A(t ′ )m(t ′ ) represents white noise in the segment moving window m(t ′ ) corresponding to the time node t, δ(t ′ )m(t ′ ) represents the total error in the segment moving window m(t ′ ) corresponding to the time node t; t ′ =t-t0, and Δt≤t0≤t e -1102Δt, and φ k (t ′ ) is solved.

[0099] It can be understood that, after obtaining the autoregressive model of the segment moving window, the embodiment draws the coefficient curve of different orders to obtain the multi-order time sequence curve graph by processing the segment time-domain data through the coefficients of the preset AR model after obtaining the segment time-domain data. After obtaining the multi-order time sequence curve graph, the embodiment can determine the Kaiser window function as the target window function from a plurality of candidate window functions, and then process the multi-order time sequence curve graph through the target window function, so that the lung sound feature analysis can be performed based on the processed frequency spectrum graph combined with the multi-order time sequence curve graph to identify whether the user has a chronic respiratory system disease.

[0100] In some embodiments, the method of the embodiment of the present application is applied to MATLAB 2021a (Mathworks, Natick city, MA, USA) for execution, and the specific execution result is as follows:

[0101] Figure 2 The time-domain graph of the normal respiratory signal represented in (a), the frequency-domain graph of the normal respiratory signal represented in (b), and the time sequence graph of the MSARM of different orders (1OC, 2OC, 3OC, and 4OC) represented in (c). From (c) of the normal respiratory signal, it can be seen that 2OC discloses a rectangular wave with a sharp tip on the positive horizontal of the rectangular wave as a normal respiratory feature. Figure 2 From (c) of the normal respiratory signal, it can be seen that 2OC discloses a rectangular wave with a sharp tip on the positive horizontal of the rectangular wave as a normal respiratory feature.

[0102] Figure 3 (a) shows the time-domain plot of the respiratory signal containing crack signals, (b) shows the frequency-domain plot of the respiratory signal containing crack signals, and (c) shows the time series plot of the respiratory signal containing crack signals with different order coefficients (1OC, 2OC, 3OC, and 4OC) of MSARM. Figure 3 As shown in (c), 2OC represents a peaked rectangular wave as a characteristic of a crack. 3OC shows the opposite shape of the rectangular wave. Moreover, the characteristics of these two time series curves, 2OC and 3OC, are very obvious and intuitively visible.

[0103] Figure 4 (a) shows the time-domain plot of the respiratory signal containing wheezing, (b) shows the frequency-domain plot of the respiratory signal containing wheezing, and (c) shows the time-series plot of the presence of wheezing in the respiratory signal for different orders of MSARM coefficients (1OC, 2OC, 3OC, and 4OC). Figure 4 As shown in (c), 2OC exhibits a discrete bimodal (DDP) pattern. 3OC also exhibits dynamic data envelopment (DDP) but is outside the phase of the 2OC curve. The characteristics of these two time series curves, 2OC and 3OC, are readily apparent.

[0104] In this embodiment, the time series curves corresponding to different orders obtained based on the above analysis have certain characteristics. Therefore, this embodiment can also classify the multi-order time series curves output by the AR model by setting a filter, so as to obtain a time series curve that meets the current requirements.

[0105] Since MSARM provides the performance of feature extraction, this embodiment will compare coefficients of different orders (OC values) to determine their performance. Figure 2 , Figure 3 and Figure 4 The time series curves corresponding to coefficients of the same order were rearranged and compared together. The specific results are shown below:

[0106] Figure 5 The 1oc time series curves of MSARM for normal breathing (a), crackling sounds (b), and wheezing sounds (c) are shown. From Figure 5 It can be seen that the waveforms of crackling and wheezing sounds in 1OC of MSARM are different, while the 1OC waveforms of normal breathing and wheezing are similar, but they show different numbers of peaks and different amplitudes. Due to this similarity, it is quite difficult to distinguish between these two different types of lung sound features.

[0107] Figure 6 The 2oc time series curves of MSARM for normal breathing (a), crackling sounds (b), and wheezing sounds (c) are shown. From Figure 6It can be seen that the normal breathing waveform and the wheezing waveform in the 2OC curve of MSARM have great differences, and the 2OC waveform is the characteristic of normal breathing. For crackles, the 2OC curve is a multi-peak rectangular wave. In addition, the DDP is taken as the characteristic of wheezing in the 2OC curve, and the characteristic difference is obvious and intuitive.

[0108] Figure 7 The 3oc time series curve of MSARM of normal breathing (a), crackles (b) and wheezing (c) is shown. From Figure 7 It can be seen that the 3OC MSARM shape represents the opposite phase of the 2OC MSARM. Therefore, similar to the 2OC of MSARM, the 3OC of MSARM can easily identify the three types of lung sounds.

[0109] Figure 8 The 4oc time series curve of MSARM of normal breathing (a), crackles (b) and wheezing (c) is shown. From Figure 8 It can be seen that the 4OC waveforms of normal breathing and wheezing are similar, but show different peak numbers and different amplitudes. Due to this similarity, it is difficult to identify the two different types of lung sounds.

[0110] From the analysis of the OC curve, it can be seen that using 2OC and 3OC curves can clearly identify lung sounds with the naked eye. However, if the 3OC curve is in the same phase as the 2OC curve, the 2OC curve is similar to the 3OC curve. From Figures 5 to 8 It can be seen that the vertical stripe (Ves, Vertical Episode) of the normal breathing signal is the smallest. Since the wheezing sound is harmonic, the segment of the breathing sound clearly exists in the individual spectrum graph and the spectrum graph of the 1OC to 4OC curves of MSARM. Figure 9 and 10 The time series graph, 2OC curve schematic diagram and spectrum graph obtained by converting random noise and pure sine wave between MSARM are respectively given.

[0111] Specifically, the spectrum graphs of each OC curve are shown in Figure 11 , Figure 12 , Figure 13 and Figure 14 The difference graphs of each OC curve are shown in Figure 15 , Figure 16 , Figure 17 and Figure 18 Since the spectrum graph contains rich features of the signal in the time domain and the frequency domain, all the spectrum graphs of the MSARM OC curve can be identified, that is, the curve is clear, so it is easy to distinguish normal breathing signals, crackle signals and wheezing signals. The performance of the OC curve is better than that of the sound spectrum graph of the original data (pulmonary sound time domain). Specifically, Figure 11 (a) in Figure 12Fig. 2 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM, which is denoted as (a) in the figure. Figure 13 Fig. 3 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM, which is denoted as (b) in the figure. Figure 14 Fig. 4 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM, which is denoted as (c) in the figure. Figure 11 Fig. 5 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 12 Fig. 6 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Figure 13 Fig. 7 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure. Figure 14 Fig. 8 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 11 Fig. 9 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Figure 12 Fig. 10 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure. Figure 13 Fig. 11 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 14 Fig. 12 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Figure 11 Fig. 13 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure. Figure 12 Fig. 14 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 13 Fig. 15 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Figure 14 Fig. 16 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure. Figure 11 Fig. 17 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 12 Fig. 18 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Figure 13 Fig. 19 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure. Figure 14 Fig. 20 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 15 Fig. 21 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Figure 16 Fig. 22 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure. Figure 17 Fig. 23 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 18 Fig. 24 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Fig. 25 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure.

[0112] Fig. 26 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 15 Fig. 27 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Figure 16 Fig. 28 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure. Figure 17 Fig. 29 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 18 Fig. 30 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Figure 15 Fig. 31 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure. Figure 16 Fig. 32 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure. Figure 17 Fig. 33 shows the spectrum of the breathing signal with crackles corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (b) in the figure. Figure 18 Fig. 34 shows the spectrum of the breathing signal with wheezes corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (c) in the figure. Figure 15 Fig. 35 shows the spectrum of the normal breathing signal corresponding to the 1OC, 2OC, 3OC and 4OC curves of the MSARM after the DO operation, which is denoted as (a) in the figure.(b) Figure 16 (b) Figure 17 (b) and Figure 18 (b) is the enhanced spectrogram corresponding to the crack signal, which contains many VEs. VEs often appear simultaneously with the breathing signal and are accompanied by a "crackling" sound. Figure 15 (c) Figure 16 (c) Figure 17 (c) and Figure 18 (c) shows the enhanced spectrum corresponding to the gasping signal, which also contains a significant number of VEs. Since the DDP of the MSAR curve corresponding to 1OC to 4OC is in the time domain, when the DDP occurs... Figure 9 (c) Figure 9 (c) Figure 9 (c) and Figure 10 (c) Shows stronger VEs. From Figure 10 , Figure 10 , Figure 19 and Figure 20 It is evident that VEs have been enhanced, and the characteristics of normal breathing, crackling sounds, and wheezing sounds are easily identifiable.

[0113] Specifically, Figure 20 The timing diagram shows a range of random noise between -1 and +1. The random noise is then passed to... ​ On the MSARM 2OC curve in (b), then... ​ (e) shows the spectrum of the MSARM 2OC curve. During normal breathing, the MSARM 2OC curve spectrum does not contain VEs. Therefore, random noise is not a major component of normal breathing. However, the behavior of a pure sine wave differs from that of random noise. Specifically, ​ The time series plot depicts a pure sine wave with a peak amplitude of 1V and a frequency of 50Hz. The linear predictor of the AR model remains unchanged, but periodic adjustments are needed to fix the sine wave. Therefore, the MSARM2OC curve is a perturbed horizontal line, as shown below. ​ The OCs in Figure 2 are shown. The "perturbations" are positive and negative pulses, which can be interpreted as compensation for the linear prediction error of the AR model. MSARM's OCs can stably predict a pure sine wave (50Hz), but cannot predict values ​​near the maximum (+1) and minimum (-1). Therefore, OCs vary more strongly to fit the curve. Thus, VEs are as follows... ​ (c) shows the spectrum of the 2OC curve.

[0114] From the comparison of the two extreme cases, it can be seen that the pure sine wave is the most effective single feature vector, and the feature vector distribution is the most uniform in a certain range of random noise. The signal is based on Fourier transform, which is a specific linear combination of fundamental frequency signal and its harmonics, called harmonic component. In addition, VE represents the duration of stable harmonic components, which is a common phenomenon of lung disease. On the contrary, normal breathing is always noisy due to the strong random circulation of air particles in the airway.

[0115] In summary, the method of the embodiment of the application has the following beneficial effects:

[0116] First, the MSARM 2OC and 3OC curves can easily identify normal breathing, crack and wheezing signals;

[0117] Second, the image clarity of the vertical segment output in the MSARM OC curve spectrum is better than the HE in the original lung sound spectrum, so as to directly support the characteristics of lung sound in time domain and time-frequency analysis. Similar to the HE in the original data spectrum, the new VE represents the "HE" of the MSARM processed data, which can be used as a gold standard measurement for lung sound evaluation.

[0118] Reference ​ The embodiment of the application provides a lung sound analysis device, and the device comprises:

[0119] The first module 1910 is configured to acquire original breathing data.

[0120] The second module 1920 is configured to process the original breathing data to obtain a breathing time domain graph.

[0121] The third module 1930 is configured to input the breathing time domain data into a preset AR model to output a multi-order time sequence curve graph.

[0122] The fourth module 1940 is configured to process the multi-order time sequence curve graph by using a window function to obtain a breathing spectrum graph.

[0123] The fifth module 1950 is configured to perform lung sound feature analysis according to the breathing spectrum graph.

[0124] It can be understood that the contents in the above method embodiments are applicable to the device embodiments, the device embodiments specifically realize the functions of the above method embodiments, and the beneficial effects achieved by the device embodiments are the same as the beneficial effects achieved by the above method embodiments.

[0125] The embodiment of the application further provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor realizes the above lung sound analysis method when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.

[0126] It can be understood that the contents in the above method embodiments are all applicable to the present device embodiments, the present device embodiments specifically implement the functions same as those of the above method embodiments, and achieve the same beneficial effects as those of the above method embodiments.

[0127] Please refer to ​ , ​ The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device comprises:

[0128] The processor 2010 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the present application.

[0129] The memory 2020 can be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 2020 can store an operating system and other application programs. When the technical solutions provided by the present application are implemented by software or firmware, the related program codes are stored in the memory 2020 and are called and executed by the processor 2010 to implement the lung sound analysis method of the present application.

[0130] The input / output interface 2030 is used to realize information input and output.

[0131] The communication interface 2040 is used to realize the communication interaction between the present device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).

[0132] The bus 2050 is used to transmit information between various components (for example, the processor 2010, the memory 2020, the input / output interface 2030, and the communication interface 2040) of the device.

[0133] The processor 2010, the memory 2020, the input / output interface 2030, and the communication interface 2040 are connected to each other through the bus 2050 to realize the communication connection between them in the device.

[0134] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the lung sound analysis method.

[0135] It can be understood that the contents in the method embodiments are applicable to the storage medium embodiments, the storage medium embodiments specifically realize the functions of the method embodiments, and achieve the same beneficial effects as the method embodiments.

[0136] The memory is a non-transitory computer readable storage medium, and can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, for example, at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and the remote memory can be connected to the processor through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0137] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0138] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figures, or combine certain steps, or different steps.

[0139] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, that is, can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.

[0140] Those skilled in the art can understand that all or some steps in the above disclosed method, functions of the modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.

[0141] The terms "first", "second", "third", "fourth", and the like in the description and in the claims of this application, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of orderly or chronological mundane operation, reverse order operation, based on circuitry availability, based on stated preference or the like, and that "default" or other orderings are thus permissible. Further, the terms "comprise", "comprising", "include", "including", and the like, are specifically intended to be open-ended. That is, references to individual steps and the like do not suhstantially exclude the presence of two or more of a given step or its integral presence in the process, method, system, article, or apparatus having been made with a wider scope. The use of notation such as "first", "second", "third", etc. does not generally limit the areas, but is used to connect like elements or to distinguish one claim from another. These terms can be used interchangeably when appropriate. Terms concerning the relative position of elements can be interpreted such that their use adheres to their normal meaning, but they can also be interpreted to mean the opposite according to specific claims.

[0142] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0143] In several embodiments provided by the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical functional division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0144] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the application.

[0145] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0146] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions used to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various other media that can store programs.

[0147] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A method for analyzing lung sounds, characterized in that, The method includes the following steps: Acquire raw respiratory data; The raw respiratory data is processed to obtain respiratory time-domain data; The respiratory time-domain data is input into a preset AR model, and a multi-order time-series curve is output. The multi-order time series curves are processed using window functions to obtain a respiratory spectrum. Lung sound feature analysis was performed based on the multi-order time-series curves and the respiratory spectrum. The preset AR model includes an autoregressive model of a fragment moving window, and the fragment moving window is defined by the following formula: ; In the formula, Indicates the movement of the fragment window. Represents a unit step function. Indicates the period of past respiratory data; The autoregressive model for the moving window of the segment is as follows: ; In the formula, Indicates time node Corresponding fragment movement window The time-domain signal in Indicates time node Corresponding fragment movement window In the time-domain signal, p represents the total order of the preset AR model, and k represents the k-th order of the preset AR model. This indicates the period of past respiratory data. Indicates time node Corresponding fragment movement window White noise in Indicates time node Corresponding fragment movement window Total error in; and ; This indicates the end of the respiratory sound signal when the segment moving window samples the respiratory sound signal; The step of inputting the respiratory time-domain data into a preset AR model and outputting a multi-order time-series curve includes: The respiratory time-domain data is input into the autoregressive model of the segment moving window to obtain the segment time-domain data; The time-domain data of the segment is processed according to the coefficients of the preset AR model to obtain the multi-order time series curve.

2. The method according to claim 1, characterized in that, The preset AR model is as follows: ; In the formula, This represents the time-domain signal corresponding to time node t. Indicates time node The corresponding time-domain signal, Let p represent the white noise corresponding to time node t, p represent the total order of the preset AR model, and k represent the k-th order of the preset AR model. This indicates the period of past respiratory data. This represents the error of order k. This represents the total error.

3. The method according to claim 2, characterized in that, The calculation process for the total error is as follows: ; In the formula, This represents the mean error of past respiratory data. This represents the error of order i.

4. The method according to claim 1, characterized in that, The process of processing the multi-order time series curves using window functions includes: The Kaiser window function is selected as the target window function from a number of candidate window functions. The multi-order time series curves are processed using the target window function.

5. A lung sound analysis device, characterized in that, The device includes: The first module is used to acquire raw respiratory data; The second module is used to process the raw respiratory data to obtain respiratory time-domain data; The third module is used to input the respiratory time-domain data into a preset AR model and output a multi-order time-series curve. The fourth module is used to process the multi-order time series curves using window functions to obtain a respiratory spectrum. The fifth module is used to perform lung sound feature analysis based on the multi-order time-series curves and the respiratory spectrum. The preset AR model includes an autoregressive model of a fragment moving window, and the fragment moving window is defined by the following formula: ; In the formula, Indicates the movement of the fragment window. Represents a unit step function. Indicates the period of past respiratory data; The autoregressive model for the moving window of the segment is as follows: ; In the formula, Indicates time node Corresponding fragment movement window The time-domain signal in Indicates time node Corresponding fragment movement window In the time-domain signal, p represents the total order of the preset AR model, and k represents the k-th order of the preset AR model. This indicates the period of past respiratory data. Indicates time node Corresponding fragment movement window White noise in Indicates time node Corresponding fragment movement window Total error in; and ; This indicates the end of the respiratory sound signal when the segment moving window samples the respiratory sound signal; The step of inputting the respiratory time-domain data into a preset AR model and outputting a multi-order time-series curve includes: The respiratory time-domain data is input into the autoregressive model of the segment moving window to obtain the segment time-domain data; The time-domain data of the segment is processed according to the coefficients of the preset AR model to obtain the multi-order time series curve.

6. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • System and method for lung rale recognition

    CN111009263A

  • VMD-CNN-based lung sound feature recognition and classification method and system

    CN113679413A