A method and system for lung sound data similarity matching

The lung sound data similarity matching model constructed by wavelet transform and deep learning solves the problem of low efficiency in lung sound data similarity matching, and achieves efficient and accurate diagnosis of lung diseases.

CN116597867BActive Publication Date: 2026-02-24GUANGDONG BAIYUN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310495870.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-04
Publication Date
2026-02-24
Estimated Expiration
2043-05-04

AI Technical Summary

Technical Problem

Existing technologies suffer from low efficiency and accuracy in lung sound data similarity matching, making it difficult to effectively diagnose lung diseases through auscultation.

Method used

Wavelet transform was used to decompose lung sound data, extract feature matrices, and a deep learning-based lung sound data similarity matching model was constructed. The model was trained and matched using a BP neural network framework, and the collection area was labeled to improve diagnostic efficiency.

Benefits of technology

It improves the processing efficiency and diagnostic accuracy of lung sound data, and enhances the diagnostic efficiency and matching accuracy of lung auscultation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116597867B_ABST
    Figure CN116597867B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of lung sound data processing, in particular to a lung sound data similarity matching method and system, the method comprising: collecting and preprocessing lung sound data to be matched; decomposing the preprocessed lung sound data to be matched based on wavelet transform to form a feature matrix of the preprocessed lung sound data to be matched; constructing a lung sound data similarity matching model based on deep learning, training the lung sound data similarity matching model based on the feature matrix; performing similarity matching on the lung sound data to be matched based on the trained lung sound data similarity matching model; and performing accuracy analysis on the similarity matching result. The present application decomposes the lung sound data to be matched by wavelet transform, extracts a feature matrix with strong feature information, constructs a lung sound data similarity matching model for similarity matching, improves the processing efficiency of lung sound data, and further improves the diagnostic efficiency of lung auscultation.
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 data similarity matching method and system. BACKGROUND

[0002] The lung is an important organ for the human body to interact with the atmosphere, and lung diseases caused by the lung have a high incidence and strong lethality, becoming one of the diseases that cannot be ignored. Various environmental factors currently existing increase the risk of people suffering from lung diseases. Common lung diseases include pneumonia, tuberculosis, pulmonary edema, lung cancer, etc. In clinical practice, the main means for diagnosing lung diseases are thoracoscopy, chest X-ray and auscultation. The thoracoscopy and chest X-ray means can reflect the process of lesions through images, but through auscultation, lung sound data is collected, and lung sound is the sound emitted by the lung system when working. The diagnosis result is obtained by analyzing the collected lung sound data. However, there are certain problems in diagnosing the lung physiological state through the auscultation method: in actual auscultation, it is difficult to distinguish the similarity and difference of different lung sounds only by the human ear, and the current sound matching field has the problems of low matching efficiency and low matching accuracy in lung sound similarity matching. Therefore, how to improve the matching efficiency of lung sound data similarity is the key. SUMMARY

[0003] The present application provides a lung sound data similarity matching method and system, which decomposes the lung sound data to be matched by a wavelet transform method, extracts a feature matrix with strong feature information, constructs a lung sound data similarity matching model for similarity matching, improves the processing efficiency of lung sound data, and further improves the diagnosis efficiency of lung auscultation.

[0004] The present application provides a lung sound data similarity matching method, characterized in that the method comprises:

[0005] Collecting lung sound data to be matched, and preprocessing the lung sound data to be matched to obtain preprocessed lung sound data to be matched;

[0006] Decomposing the preprocessed lung sound data to be matched based on a wavelet transform method, extracting a feature vector of the preprocessed lung sound data to be matched, and forming a feature matrix of the preprocessed lung sound data to be matched;

[0007] Constructing a lung sound data similarity matching model based on deep learning, training the lung sound data similarity matching model based on the feature matrix of the preprocessed lung sound data to be matched, and obtaining a trained lung sound data similarity matching model;

[0008] perform similarity matching on the to-be-matched lung sound data based on the trained lung sound data similarity matching model to obtain a similarity matching result.

[0009] perform precision analysis on the similarity matching result.

[0010] Further, the to-be-matched lung sound data is collected and preprocessed to obtain preprocessed to-be-matched lung sound data, which includes:

[0011] collecting, by a collection device, original lung sound data of the to-be-matched lung sound data and environmental noise data of the to-be-matched lung sound data;

[0012] performing noise reduction on the original lung sound data based on the environmental noise data to obtain denoised to-be-matched lung sound data;

[0013] performing, in sequence, pre-emphasis, framing, windowing, amplification, filtering, analog-to-digital conversion, and sampling processing on the denoised to-be-matched lung sound data to obtain preliminarily processed to-be-matched lung sound data.

[0014] Further, the to-be-matched lung sound data is collected and preprocessed to obtain preprocessed to-be-matched lung sound data, which further includes:

[0015] annotating the preliminarily processed to-be-matched lung sound data based on a collection region.

[0016] Further, the annotating the preliminarily processed to-be-matched lung sound data based on a collection region includes:

[0017] setting a collection region, the collection region including a throat, a left lung, a right lung, a trachea, a bronchus, and alveoli;

[0018] determining a collection region to which the preliminarily processed to-be-matched lung sound data belongs, and adding annotation information to the preliminarily processed to-be-matched lung sound data based on the collection region to generate preprocessed to-be-matched lung sound data.

[0019] Further, the decomposing, by the wavelet transform method, the preprocessed to-be-matched lung sound data, extracting a feature vector of the preprocessed to-be-matched lung sound data, and forming a feature matrix of the preprocessed to-be-matched lung sound data includes:

[0020] performing wavelet decomposition on the preprocessed to-be-matched lung sound data based on an original frequency range of the preprocessed to-be-matched lung sound data to obtain a plurality of layers of low-frequency wavelet coefficients;

[0021] performing wavelet decomposition on the plurality of layers of low-frequency wavelet coefficients in sequence to obtain a plurality of layers of high-frequency wavelet coefficients;

[0022] construct a feature matrix of the preprocessed lung sound data based on the high-frequency wavelet coefficients of the plurality of layers.

[0023] Further, the constructing the feature matrix of the preprocessed lung sound data based on the high-frequency wavelet coefficients of the plurality of layers comprises:

[0024] calculating an energy feature vector corresponding to each high-frequency wavelet coefficient of the high-frequency wavelet coefficients of the plurality of layers;

[0025] calculating a mean value of each high-frequency wavelet coefficient of the high-frequency wavelet coefficients of the plurality of layers;

[0026] calculating a maximum value of an absolute value of the high-frequency wavelet coefficient based on the mean value and an initial value of each high-frequency wavelet coefficient of the high-frequency wavelet coefficients of the plurality of layers;

[0027] constructing the feature matrix of the preprocessed lung sound data based on the energy feature vector, the mean value, and the maximum value of the absolute value.

[0028] Further, the constructing the lung sound data similarity matching model based on deep learning comprises training the lung sound data similarity matching model based on the feature matrix of the preprocessed lung sound data, to obtain a trained lung sound data similarity matching model, and the training comprises:

[0029] constructing a lung sound data similarity matching model based on a BP neural network framework;

[0030] dividing the feature matrix of the preprocessed lung sound data into a training set and a test set, training the lung sound data similarity matching model based on the feature vectors in the training set, and obtaining the trained lung sound data similarity matching model.

[0031] Further, the method further comprises:

[0032] testing the trained lung sound data similarity matching model based on the test set, and determining whether the trained lung sound data similarity matching model achieves a preset training effect based on the test set.

[0033] Further, the similarity matching of the lung sound data to be matched based on the trained lung sound data similarity matching model to obtain a similarity matching result comprises:

[0034] inputting the lung sound data to be matched into the trained lung sound data similarity matching model, and obtaining a similarity value of the lung sound data to be matched;

[0035] The degree of similarity between the lung sound data to be matched is determined based on the similarity value of the lung sound data to be matched.

[0036] The present invention also proposes a system for lung sound data similarity matching, characterized in that the system comprises:

[0037] The acquisition and preprocessing module is used to acquire lung sound data to be matched and preprocess the lung sound data to be matched to obtain preprocessed lung sound data to be matched.

[0038] The feature extraction module is used to decompose the preprocessed lung sound data to be matched based on the wavelet transform method, extract the feature vector of the preprocessed lung sound data to be matched, and form the feature matrix of the preprocessed lung sound data to be matched.

[0039] A matching model construction module is used to construct a lung sound data similarity matching model based on deep learning. The lung sound data similarity matching model is trained based on the feature matrix of the preprocessed lung sound data to be matched to obtain the trained lung sound data similarity matching model.

[0040] The data matching module is used to perform similarity matching on the lung sound data to be matched based on the trained lung sound data similarity matching model, and obtain similarity matching results;

[0041] A precision analysis module is used to perform precision analysis on the similarity matching results.

[0042] This invention decomposes the lung sound data to be matched using wavelet transform, obtaining eigenvalues ​​with strong feature information to form a feature matrix. This matrix is ​​then applied to the training of a lung sound data similarity matching model, enabling rapid matching of lung sound data similarity and improving processing efficiency. The use of a matching model based on a BP neural network framework effectively enhances the model's matching performance. Adding acquisition area annotations to the lung sound data facilitates identification by operators, improving the diagnostic efficiency of lung auscultation. Accuracy analysis of the similarity matching results allows for assessment of the model's matching precision, facilitating future improvements. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart of the lung sound data similarity matching method in an embodiment of the present invention;

[0045] Figure 2 This is a flowchart of the acquisition and preprocessing of lung sound data to be matched in an embodiment of the present invention;

[0046] Figure 3 This is a flowchart illustrating the formation of a feature matrix for lung sound data to be matched in an embodiment of the present invention;

[0047] Figure 4 This is a flowchart illustrating the construction of a lung sound data similarity matching model in an embodiment of the present invention;

[0048] Figure 5 This is a schematic diagram of the system structure for lung sound data similarity matching in an embodiment of the present invention. Detailed Implementation

[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] In this invention, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, figures, steps, behaviors, components, portions or combinations thereof disclosed in this specification, and are not intended to exclude the possibility that one or more other features, figures, steps, behaviors, components, portions or combinations thereof are present or added.

[0051] It should also be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0052] Example 1

[0053] This invention relates to a method for lung sound data similarity matching, the method comprising: acquiring lung sound data to be matched, and preprocessing the lung sound data to obtain preprocessed lung sound data to be matched; decomposing the preprocessed lung sound data to be matched based on wavelet transform, extracting feature vectors of the preprocessed lung sound data to be matched, and forming a feature matrix of the preprocessed lung sound data to be matched; constructing a lung sound data similarity matching model based on deep learning, training the lung sound data similarity matching model based on the feature matrix of the preprocessed lung sound data to be matched, and obtaining a trained lung sound data similarity matching model; performing similarity matching on the lung sound data to be matched based on the trained lung sound data similarity matching model, and obtaining a similarity matching result; and performing accuracy analysis on the similarity matching result.

[0054] In one optional implementation of this embodiment, such as Figure 1 As shown, Figure 1 A flowchart of a lung sound data similarity matching method according to an embodiment of the present invention is shown, including the following steps:

[0055] S101. Collect lung sound data to be matched, and preprocess the lung sound data to be matched to obtain preprocessed lung sound data to be matched.

[0056] In one optional implementation of this embodiment, such as Figure 2 As shown, Figure 2 The flowchart of lung sound data acquisition and preprocessing in an embodiment of the present invention is shown, including the following steps:

[0057] S201. Collect raw lung sound data and environmental noise data of the lung sound data to be matched based on the acquisition device;

[0058] In one optional implementation of this embodiment, the raw lung sound data to be matched is collected based on a 3M stethoscope, and the environmental noise data to be matched is collected based on a pickup device.

[0059] Furthermore, the raw lung sound data and its corresponding environmental noise data can be extracted from the lung sound database to be matched.

[0060] It should be noted that the original lung sound data to be matched consists of three consecutive lung sound data segments of the same duration, and each lung sound data segment includes at least one complete exhalation and inhalation process.

[0061] Here, relatively complete lung sound data is extracted to meet the training requirements of the subsequent lung sound data similarity matching model.

[0062] S202. Based on the environmental noise data, the original lung sound data is denoised to obtain the denoised lung sound data to be matched.

[0063] In an optional implementation of this embodiment, the noise signal intensity of the environmental noise data is calculated, a noise reduction threshold for the environmental noise data is set, and noise in the environmental noise data that is below the noise reduction threshold is filtered out.

[0064] S203. The lung sound data to be matched after noise reduction is sequentially subjected to pre-emphasis, windowing, framing, amplification, filtering, analog-to-digital conversion and sampling to obtain the lung sound data to be matched after preliminary processing.

[0065] In one optional implementation of this embodiment, the pre-emphasis processing involves inputting high-frequency components into the noise-reduced lung sound data to be matched for compensation, thereby obtaining the pre-emphasis processed lung sound data to be matched.

[0066] In an optional implementation of this embodiment, the frame segmentation process involves dividing the pre-emphasized lung sound data to be matched into several segments of the same frame length and the same sliding duration to obtain the frame-segmented lung sound data to be matched.

[0067] In one optional implementation of this embodiment, the windowing process involves selecting an appropriate window function for each frame of the lung sound data to be matched after frame-segmentation processing, and then recombining the data into the original data after processing based on the window function to obtain the windowed lung sound data to be matched.

[0068] In one optional implementation of this embodiment, the amplification process involves amplifying the windowed lung sound data to be matched by a certain proportion to obtain amplified lung sound data to be matched.

[0069] In an optional implementation of this embodiment, the filtering process involves filtering out signals below 300Hz and above 2400Hz from the amplified lung sound data to be matched. This is done based on prior information that the frequency of the lung sound audio signal is above 300Hz and below 2400Hz.

[0070] In an optional implementation of this embodiment, the analog-to-digital conversion process converts the filtered lung sound data to be matched from an analog signal to a digital signal.

[0071] In an optional implementation of this embodiment, the sampling process involves sampling the lung sound data to be matched after the analog-to-digital conversion process to obtain pre-processed lung sound data to be matched.

[0072] S204. Based on the acquisition area, the pre-processed lung sound data to be matched is labeled to generate pre-processed lung sound data to be matched.

[0073] In an optional implementation of this embodiment, a collection area is set, the collection area to which the pre-processed lung sound data to be matched belongs is determined, and annotation information is added to the pre-processed lung sound data to be matched based on the collection area to generate pre-processed lung sound data to be matched.

[0074] Specifically, the collection area includes the larynx, left lung, right lung, trachea, bronchi, and alveoli. The left lung includes the left posterior lung, left upper lung, left lower lung, and left middle lung. The right lung includes the right posterior lung, right upper lung, right lower lung, and right middle lung. The bronchi include the left bronchus and right bronchus. The alveoli include the alveoli of the left lung, right lung, left bronchial alveoli, and right bronchial alveoli.

[0075] Furthermore, annotation information for the corresponding acquisition area is added to the pre-processed lung sound data to be matched, generating pre-processed lung sound data to be matched.

[0076] Here, the acquisition area is marked in the lung sound data to be matched, which makes it easier for operators to identify and improves the diagnostic efficiency of lung auscultation.

[0077] S102. The preprocessed lung sound data to be matched is decomposed based on the wavelet transform method, the feature vector of the preprocessed lung sound data to be matched is extracted, and the feature matrix of the preprocessed lung sound data to be matched is formed.

[0078] In one optional implementation of this embodiment, such as Figure 3 As shown, Figure 3 The flowchart illustrating the formation of a feature matrix of lung sound data to be matched in an embodiment of the present invention is shown, including the following steps:

[0079] S301. Based on the original frequency range of the preprocessed lung sound data to be matched, wavelet decomposition is performed on the preprocessed lung sound data to be matched to obtain several layers of low-frequency wavelet coefficients.

[0080] In one optional implementation of this embodiment, based on the original frequency range of the preprocessed lung sound data to be matched being 0-2400Hz, a first-level low-frequency wavelet coefficient x1 (frequency band 0-1200Hz) is generated after the first wavelet decomposition, a second-level low-frequency wavelet coefficient x2 (frequency band 0-600Hz) is generated after the second wavelet decomposition, a third-level low-frequency wavelet coefficient x3 (frequency band 0-300Hz) is generated after the third wavelet decomposition, a fourth-level low-frequency wavelet coefficient x4 (frequency band 0-150Hz) is generated after the fourth wavelet decomposition, and a fifth-level low-frequency wavelet coefficient x5 (frequency band 0-75Hz) is generated after the fifth wavelet decomposition. At this point, the frequency band is small enough to meet the requirements.

[0081] S302. Perform wavelet decomposition on the several layers of low-frequency wavelet coefficients in sequence to obtain several layers of high-frequency wavelet coefficients.

[0082] In an optional implementation of this embodiment, in step S301, the first layer of high-frequency wavelet coefficients y1 (frequency band 1200Hz-2400Hz) is generated simultaneously with the first wavelet decomposition; the second layer of high-frequency wavelet coefficients y2 (frequency band 600Hz-1200Hz) is generated simultaneously with the second wavelet decomposition; the third layer of high-frequency wavelet coefficients y3 (frequency band 300Hz-600Hz) is generated simultaneously with the third wavelet decomposition; the fourth layer of high-frequency wavelet coefficients y4 (frequency band 150Hz-300Hz) is generated simultaneously with the fourth wavelet decomposition; and the fifth layer of high-frequency wavelet coefficients y5 (frequency band 75Hz-150Hz) is generated simultaneously with the fifth wavelet decomposition. Arranged from high to low frequency band range, the five layers of high-frequency wavelet coefficients are [y5, y4, y2, y2, y1].

[0083] S303. Construct the feature matrix of the preprocessed lung sound data to be matched based on the aforementioned high-frequency wavelet coefficients.

[0084] In an optional implementation of this embodiment, the energy feature vector corresponding to each layer of high-frequency wavelet coefficients is calculated.

[0085] Specifically, the energy eigenvectors corresponding to the five-layer high-frequency wavelet coefficients in step S302 are calculated using the following formula:

[0086]

[0087] In the formula, y i E represents the high-frequency wavelet coefficients of the i-th layer. i Let y be the high-frequency wavelet coefficients of the i-th layer. i The corresponding energy value, y i,j Let y be the high-frequency wavelet coefficients of the i-th layer. iThe j-th element in the matrix, where n is the high-frequency wavelet coefficient y of the i-th layer. i The dimension of.

[0088] After the above calculation, the energy feature vector [E5,E4,E3,E2,E1] composed of the energy values ​​corresponding to the five layers of high-frequency wavelet coefficients is obtained.

[0089] In one optional implementation of this embodiment, the average value of the high-frequency wavelet coefficients of each of the plurality of high-frequency wavelet coefficients is calculated.

[0090] Specifically, the average value of the five high-frequency wavelet coefficients in step S302 is calculated using the following formula:

[0091]

[0092] In the formula, y i Let A be the high-frequency wavelet coefficients of the i-th layer. i Let y be the high-frequency wavelet coefficients of the i-th layer. i The corresponding average value, y i,j Let y be the high-frequency wavelet coefficients of the i-th layer. i The j-th element in the matrix, where n is the high-frequency wavelet coefficient y of the i-th layer. i The dimension of.

[0093] After the above calculation, the average feature vector [A5,A4,A3,A2,A1] composed of the average values ​​of the five layers of high-frequency wavelet coefficients is obtained.

[0094] In one optional implementation of this embodiment, the maximum absolute value of the corresponding high-frequency wavelet coefficient is calculated based on the average value and initial value of each layer of high-frequency wavelet coefficients.

[0095] Specifically, given the initial value and average value of each layer of high-frequency wavelet coefficients, the maximum absolute value of the five layers of high-frequency wavelet coefficients in step S302 is calculated using the following formula:

[0096]

[0097] In the formula, M i Let y be the high-frequency wavelet coefficients of the i-th layer. i The maximum value of the corresponding absolute value, A i Let y be the high-frequency wavelet coefficients of the i-th layer. i The corresponding average value, I i Let y be the high-frequency wavelet coefficients of the i-th layer. i The corresponding initial value.

[0098] After the above calculation, the maximum absolute value feature vector [M5,M4,M3,M2,M1] is obtained, which is composed of the maximum absolute values ​​of the five layers of high-frequency wavelet coefficients.

[0099] In an optional implementation of this embodiment, the feature matrix of the preprocessed lung sound data to be matched is constructed based on the maximum value of the energy feature vector, the average value, and the absolute value.

[0100] Specifically, the energy feature vector [E5, E4, E3, E2, E1], the average value feature vector [A5, A4, A3, A2, A1], and the maximum absolute value feature vector [M5, M4, M3, M2, M1] are combined to generate the feature matrix C of the preprocessed lung sound data to be matched. Since the original lung sound data to be matched consists of three consecutive lung sound segments of the same duration, three feature matrices C1, C2, and C3 are generated. These three feature matrices are then fused into the feature matrix C of the preprocessed lung sound data to be matched using a linear fusion method. The calculation formula is as follows:

[0101]

[0102] In the formula, C is the feature matrix of the preprocessed lung sound data to be matched after linear fusion, C1 is the feature matrix of the first lung sound data, C2 is the feature matrix of the second lung sound data, and C3 is the feature matrix of the third lung sound data.

[0103] S103. Construct a lung sound data similarity matching model based on deep learning. Train the lung sound data similarity matching model based on the feature matrix of the preprocessed lung sound data to be matched to obtain the trained lung sound data similarity matching model.

[0104] In one optional implementation of this embodiment, such as Figure 4 As shown, Figure 4 The flowchart illustrating the construction of a lung sound data similarity matching model in an embodiment of the present invention is shown, including the following steps:

[0105] S401. Construct a lung sound data similarity matching model based on the BP neural network framework;

[0106] In one optional implementation of this embodiment, the BP (Back Propagation Neural Network) is a multi-layer feedforward neural network trained using an error backpropagation algorithm. It can memorize the characteristics of training samples and automatically identify the category of a test sample when it is input. It uses unidirectional propagation; the nodes of the input layer and hidden layers, and the nodes of the hidden layers and output layers are connected, but the neurons in each layer are not interconnected. Its neuron activation function is the sigmoid function.

[0107] Specifically, in this embodiment, sparse inhibition of neuronal activity is employed, and the average activity of hidden neuron j is selected as follows:

[0108]

[0109] In the formula, m represents the number of training iterations. For a given input x (i) Under certain conditions, the activity level of hidden neuron j.

[0110] Furthermore, to limit the activity of hidden neuron j, let p j =ρ, where ρ is the sparsity parameter, with a value of 0.03.

[0111] S402. Divide the feature matrix of the preprocessed lung sound data to be matched into a training set and a test set. Train the lung sound data similarity matching model based on the feature vectors in the training set to obtain the trained lung sound data similarity matching model.

[0112] In an optional implementation of this embodiment, the training process of the lung sound data similarity matching model of the BP neural network framework includes: At the initial stage of network computation, the BP backpropagation algorithm sets the step size n for network weights in the range [-1, 1]. The system starts with values ​​from -1, and the training function `trainlm()` uses Newton's algorithm. The next network weight is trained with a value of -1 + n. This continues, with each subsequent training value being n larger than the previous one. During training, the error gradually converges, and the speed of convergence is used to evaluate the network's performance. After repeated corrections and iterations, a set of network weights and thresholds that minimizes the error between the network output and the expected value is obtained, forming the optimal structure of the neural network. Here, the step size should be as small as possible according to requirements to ensure the final selection of the optimal network weights.

[0113] In one optional implementation of this embodiment, the trained lung sound data similarity matching model is tested based on the test set, and it is determined based on the test set whether the trained lung sound data similarity matching model has achieved the preset training effect.

[0114] Specifically, if it is determined that the trained lung sound data similarity matching model has not achieved the preset training effect, the backpropagation algorithm is used to optimize the model, as follows:

[0115] W′ ij =W ij +ΔW ij +Lr*weight decay *W ij

[0116]

[0117] In the formula, W i ′ j W represents the updated coefficients of the i-th and j-th parameter vectors in the trained model. ij The weights are the coefficients of the i-th and j-th parameter vectors of the trained model. decay is the weight decay coefficient, with a value of 0.0005; Lr is the learning rate, with a value of 0.01; L is the updated loss function; and momentum is the momentum parameter, with a value of 0.09.

[0118] S104. Based on the trained lung sound data similarity matching model, perform similarity matching on the lung sound data to be matched to obtain similarity matching results;

[0119] In an optional implementation of this embodiment, the lung sound data to be matched is input into the trained lung sound data similarity matching model to obtain the similarity value of the lung sound data to be matched; and the degree of similarity of the lung sound data to be matched is determined based on the similarity value of the lung sound data to be matched.

[0120] S105. Perform accuracy analysis on the similarity matching results.

[0121] In an optional implementation of this embodiment, precision, recall, F1, intersection-over-union (IoU), and mean IoU (mIoU) are used as evaluation criteria to measure the performance of the lung sound data similarity matching model. The calculation formulas include:

[0122]

[0123]

[0124]

[0125]

[0126]

[0127] Where TP is the true positive class, FP is the false positive class, FN is the false negative class, TN is the true negative class, and k represents the class (0, 1).

[0128] In summary, Embodiment 1 of this invention proposes a method for lung sound data similarity matching. By decomposing the lung sound data to be matched using wavelet transform, a feature matrix is ​​formed by obtaining feature values ​​with strong characteristic information from the lung sound data to be matched. This matrix is ​​then applied to the training of a lung sound data similarity matching model, enabling rapid matching of lung sound data similarity and improving the processing efficiency of lung sound data. The use of a matching model based on a BP neural network framework effectively improves the model's matching performance. Adding acquisition area annotations to the lung sound data to be matched facilitates identification by operators, improving the diagnostic efficiency of lung auscultation. Accuracy analysis of the similarity matching results helps determine the matching accuracy of the lung sound data similarity matching model, thus facilitating improvements.

[0129] Example 2

[0130] This invention also relates to a system for lung sound data similarity matching, such as... Figure 5 As shown, Figure 5 A schematic diagram of a system structure for lung sound data similarity matching in an embodiment of the present invention is shown. The system includes:

[0131] Acquisition and preprocessing module 10, the acquisition and preprocessing module is used to acquire lung sound data to be matched, and to preprocess the lung sound data to be matched to obtain preprocessed lung sound data to be matched;

[0132] The feature extraction module 20 is used to decompose the preprocessed lung sound data to be matched based on the wavelet transform method, extract the feature vector of the preprocessed lung sound data to be matched, and form the feature matrix of the preprocessed lung sound data to be matched.

[0133] The matching model construction module 30 is used to construct a lung sound data similarity matching model based on deep learning. The lung sound data similarity matching model is trained based on the feature matrix of the preprocessed lung sound data to be matched to obtain the trained lung sound data similarity matching model.

[0134] The data matching module 40 is used to perform similarity matching on the lung sound data to be matched based on the trained lung sound data similarity matching model, and obtain similarity matching results;

[0135] Accuracy analysis module 50, which is used to perform accuracy analysis on the similarity matching results.

[0136] In summary, Embodiment 2 of this invention proposes a system for lung sound data similarity matching, which performs a method for lung sound data similarity matching. By decomposing the lung sound data to be matched using wavelet transform, feature values ​​with strong characteristic information can be obtained to form a feature matrix, which is then applied to the training of the lung sound data similarity matching model. This allows for rapid lung sound data similarity matching, improving the processing efficiency of lung sound data. The use of a matching model based on a BP neural network framework effectively improves the model's matching performance. Adding acquisition area annotations to the lung sound data to be matched facilitates identification by operators, improving the diagnostic efficiency of lung auscultation. Accuracy analysis of the similarity matching results facilitates the assessment of the matching accuracy of the lung sound data similarity matching model, thereby enabling improvements.

[0137] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0138] Furthermore, the embodiments of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for lung sound data similarity matching, characterized in that, The method includes: Collect lung sound data to be matched, and preprocess the lung sound data to be matched to obtain preprocessed lung sound data to be matched; The process of acquiring lung sound data to be matched and preprocessing the lung sound data to obtain preprocessed lung sound data to be matched includes: acquiring raw lung sound data and environmental noise data of the lung sound data to be matched based on the acquisition device; reducing noise in the raw lung sound data based on the environmental noise data to obtain noise-reduced lung sound data to be matched; and sequentially performing pre-emphasis, framing, windowing, amplification, filtering, analog-to-digital conversion, and sampling on the noise-reduced lung sound data to obtain pre-processed lung sound data to be matched. The preprocessed lung sound data to be matched is decomposed based on the wavelet transform method, the feature vector of the preprocessed lung sound data to be matched is extracted, and the feature matrix of the preprocessed lung sound data to be matched is formed. The step of decomposing the preprocessed lung sound data to be matched based on wavelet transform, extracting the feature vector of the preprocessed lung sound data to be matched, and forming the feature matrix of the preprocessed lung sound data to be matched includes: performing wavelet decomposition on the preprocessed lung sound data to be matched based on the original frequency range of the preprocessed lung sound data to be matched, obtaining several layers of low-frequency wavelet coefficients; performing wavelet decomposition on the several layers of low-frequency wavelet coefficients sequentially, obtaining several layers of high-frequency wavelet coefficients; and constructing the feature matrix of the preprocessed lung sound data to be matched based on the several layers of high-frequency wavelet coefficients. A lung sound data similarity matching model based on deep learning is constructed. The lung sound data similarity matching model is trained based on the feature matrix of the preprocessed lung sound data to be matched, and the trained lung sound data similarity matching model is obtained. The step of constructing a deep learning-based lung sound data similarity matching model, and training the lung sound data similarity matching model based on the feature matrix of the preprocessed lung sound data to be matched, to obtain a trained lung sound data similarity matching model includes: constructing a lung sound data similarity matching model based on a BP neural network framework; dividing the feature matrix of the preprocessed lung sound data to be matched into a training set and a test set; and training the lung sound data similarity matching model based on the feature vectors in the training set to obtain a trained lung sound data similarity matching model. Based on the trained lung sound data similarity matching model, the lung sound data to be matched is similarly matched to obtain the similarity matching result; The step of performing similarity matching on the lung sound data to be matched based on the trained lung sound data similarity matching model to obtain similarity matching results includes: inputting the lung sound data to be matched into the trained lung sound data similarity matching model to obtain the similarity value of the lung sound data to be matched; and judging the degree of similarity of the lung sound data to be matched based on the similarity value of the lung sound data to be matched. Accuracy analysis is performed on the similarity matching results.

2. The method for lung sound data similarity matching as described in claim 1, characterized in that, The process of acquiring lung sound data to be matched and preprocessing the lung sound data to obtain preprocessed lung sound data to be matched further includes: The pre-processed lung sound data to be matched is labeled based on the acquisition area.

3. The method for lung sound data similarity matching as described in claim 2, characterized in that, The annotation of the pre-processed lung sound data to be matched based on the acquisition area includes: The collection area is set, which includes the larynx, left lung, right lung, trachea, bronchi, and alveoli; Determine the acquisition area to which the pre-processed lung sound data to be matched belongs, and add annotation information to the pre-processed lung sound data to be matched based on the acquisition area to generate pre-processed lung sound data to be matched.

4. The method for lung sound data similarity matching as described in claim 1, characterized in that, The feature matrix of the preprocessed lung sound data to be matched, constructed based on the aforementioned high-frequency wavelet coefficients, includes: Calculate the energy feature vector corresponding to each layer of high-frequency wavelet coefficients in the plurality of layers of high-frequency wavelet coefficients; Calculate the average value of the high-frequency wavelet coefficients in each of the aforementioned high-frequency wavelet coefficient layers; The maximum absolute value of the corresponding high-frequency wavelet coefficient is calculated based on the average value and initial value of each layer of high-frequency wavelet coefficients. The feature matrix of the preprocessed lung sound data to be matched is constructed based on the energy feature vector, the average value, and the maximum absolute value.

5. The method for lung sound data similarity matching as described in claim 1, characterized in that, The method further includes: The trained lung sound data similarity matching model is tested based on the test set, and it is determined whether the trained lung sound data similarity matching model has achieved the preset training effect based on the test set.

6. A system for lung sound data similarity matching, characterized in that, The system includes: The acquisition and preprocessing module is used to acquire lung sound data to be matched and preprocess the lung sound data to be matched to obtain preprocessed lung sound data to be matched. The process of acquiring lung sound data to be matched and preprocessing the lung sound data to obtain preprocessed lung sound data to be matched includes: acquiring raw lung sound data and environmental noise data of the lung sound data to be matched based on the acquisition device; reducing noise in the raw lung sound data based on the environmental noise data to obtain noise-reduced lung sound data to be matched; and sequentially performing pre-emphasis, framing, windowing, amplification, filtering, analog-to-digital conversion, and sampling on the noise-reduced lung sound data to obtain pre-processed lung sound data to be matched. The feature extraction module is used to decompose the preprocessed lung sound data to be matched based on the wavelet transform method, extract the feature vector of the preprocessed lung sound data to be matched, and form the feature matrix of the preprocessed lung sound data to be matched. The step of decomposing the preprocessed lung sound data to be matched based on wavelet transform, extracting the feature vector of the preprocessed lung sound data to be matched, and forming the feature matrix of the preprocessed lung sound data to be matched includes: performing wavelet decomposition on the preprocessed lung sound data to be matched based on the original frequency range of the preprocessed lung sound data to be matched, obtaining several layers of low-frequency wavelet coefficients; performing wavelet decomposition on the several layers of low-frequency wavelet coefficients sequentially, obtaining several layers of high-frequency wavelet coefficients; and constructing the feature matrix of the preprocessed lung sound data to be matched based on the several layers of high-frequency wavelet coefficients. A matching model construction module is used to construct a lung sound data similarity matching model based on deep learning. The lung sound data similarity matching model is trained based on the feature matrix of the preprocessed lung sound data to be matched to obtain the trained lung sound data similarity matching model. The lung sound data similarity matching model is trained using the feature matrix of the lung sound data to be matched, and the trained lung sound data similarity matching model is obtained by: constructing a lung sound data similarity matching model based on a BP neural network framework; dividing the feature matrix of the preprocessed lung sound data to be matched into a training set and a test set, and training the lung sound data similarity matching model based on the feature vectors in the training set, thereby obtaining the trained lung sound data similarity matching model; The data matching module is used to perform similarity matching on the lung sound data to be matched based on the trained lung sound data similarity matching model, and obtain similarity matching results; The step of performing similarity matching on the lung sound data to be matched based on the trained lung sound data similarity matching model to obtain similarity matching results includes: inputting the lung sound data to be matched into the trained lung sound data similarity matching model to obtain the similarity value of the lung sound data to be matched; and judging the degree of similarity of the lung sound data to be matched based on the similarity value of the lung sound data to be matched. A precision analysis module is used to perform precision analysis on the similarity matching results.

Citation Information

Patent Citations

  • Breath sound recognition method and system

    CN112668556A

  • Lung sound classification method and system based on deep learning, and storage medium

    CN112883812A