Method and system for identifying abnormal breathing sound of patient with chronic obstructive pulmonary disease
By performing analog-to-digital conversion and frame-by-frame spectral processing on the breath sound signals of COPD patients, a peak density variation sequence is constructed, overcoming the limitations of traditional methods in terms of spatial coverage and continuity, and realizing real-time, accurate identification and remote monitoring of abnormal breath sounds.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE FIRST AFFILIATED HOSPITAL OF ARMY MEDICAL UNIV
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional methods for identifying breath sounds in COPD patients have limitations in terms of spatial coverage and continuity. They are difficult to identify short-term high-frequency fluctuations or local mutations during the respiratory process and lack a real-time remote feedback mechanism, which affects the consistency and accuracy of disease management.
By collecting continuous respiratory sound signals from chest wall-attached acoustic sensors, performing analog-to-digital conversion and frame-by-frame spectrum processing, extracting the target frequency band amplitude, constructing a peak density change sequence, and combining the consistency judgment between density fluctuation and peak amplitude change, structured identification information data is generated and transmitted to a mobile terminal via low-power wireless means.
It enhances the ability to capture abnormal changes, enables dynamic tracking and location of abnormal trends, improves the accuracy of identifying complex abnormal states, and enhances remote and portable monitoring capabilities.
Smart Images

Figure CN121963797A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of breath sound recognition technology, and in particular to a method and system for recognizing abnormal breath sounds in patients with COPD. Background Technology
[0002] Breath sound recognition technology refers to a technical system for collecting, analyzing, and judging the acoustic information of airflow generated during human respiration. Its core components include the selection of acquisition methods and locations, signal amplification and noise suppression, time-domain and frequency-domain feature extraction, abnormality type identification, and sample comparison and judgment. Signals are typically acquired using chest wall microphones, electronic stethoscopes, or attached acoustic sensors. Bandpass filtering and amplitude normalization are combined to suppress interference. Short-time Fourier transform is used to extract features such as dominant frequency band energy, spectral peaks, spectral entropy, and zero-crossing rate. Template matching, support vector machines, or decision trees are then used to identify and classify abnormal breath sounds. Traditional methods for identifying abnormal breath sounds in COPD patients refer to the process of detecting and judging abnormal acoustic manifestations related to airway obstruction in COPD patient breath sound data. The technical issues addressed are wheezing and rales in COPD breath sounds. The respiratory sounds of COPD patients are distinguished by differentiating the components and determining their location and severity. Traditionally, an electronic stethoscope is used to collect respiratory sounds from multiple fixed auscultation points on the chest and back. After noise reduction, the sounds are segmented according to the respiratory cycle. The characteristics of the continuous narrow band spectral peaks from 100 Hz to 1000 Hz, which are common for wheezing, and the characteristics of the burst-like short pulses, which are common for rales, are calculated. At the same time, the maximum spectral peak frequency, duration, bandwidth, pulse count, and average energy are combined to establish a rule threshold or use a support vector machine to classify and judge wheezing and rales, so as to complete the identification of abnormal respiratory sounds in COPD patients.
[0003] Traditional breath sound recognition methods rely on intermittent acquisition at fixed auscultation points, which has limitations in spatial coverage and continuity, easily leading to the omission of local features or delayed capture of abnormal changes, thus restricting the timely identification of abnormal events. Data is often analyzed through whole-cycle segmentation, resulting in coarse-grained processing that struggles to identify short-term high-frequency fluctuations or local abrupt changes during respiration, leading to difficulty in distinguishing or misidentifying certain abnormal respiratory events. In terms of feature extraction, reliance on spectral peaks and pulse characteristics within fixed frequency bands is limited by individual differences in respiratory types and complex changes in pathological states, resulting in insufficient generalization ability and a tendency for misclassification or low recognition rates. Furthermore, these methods depend on rule-based or model-based classification decisions in the post-processing stage, failing to dynamically track signal trends and making it difficult to reflect the real-time evolution of respiratory states. At the data transmission level, most solutions lack real-time remote feedback mechanisms and portable wireless transmission capabilities, limiting their application expansion in mobile scenarios. For example, in the dynamic monitoring of COPD patients, traditional methods struggle to acquire and classify abnormal segment information in real time, affecting the consistency and accuracy of disease management. The aforementioned problems result in significant shortcomings of existing technologies in terms of multi-source interference, periodic complexity, and anomaly recognition, making it difficult to meet the needs of intelligent and real-time development of respiratory sound recognition. Summary of the Invention
[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide a method for identifying abnormal breath sounds in patients with COPD, comprising the following steps: S1: Collect continuous respiratory sound signals from chest wall-attached acoustic sensors, convert them from analog to digital waveforms, divide them into frames according to a set time window, perform spectrum conversion, extract the amplitude of the target frequency band, and generate respiratory audio spectrum frame data; S2: Based on the respiratory audio spectrum frame data, identify the local peaks in each frame, count the number and amplitude information of peaks in multiple continuous sub-frequency bands, combine them to generate a feature density information sequence, and construct a peak group density change sequence. S3: Based on the trend of the peak group density change sequence, the frame segments whose density change exceeds the preset change threshold are marked as candidate abnormal segments, and the continuous intervals that meet the stability conditions are screened by judging the consistency between sub-band density fluctuation and peak amplitude change, and the boundary information of abnormal segments is obtained. S4: Extract the start and end frame positions, peak quantity, and amplitude change characteristic parameters of the abnormal segment boundary information, generate structured identification information data, and transmit it to the mobile terminal via low-power wireless method to form the identification content of abnormal breathing sound segments; S5: Based on the identified abnormal breath sound segments, assess the boundary intervals of multiple segments within the same respiratory cycle, determine whether they can be grouped into a single event, integrate consistency information, and generate an abnormality identification interval within the cycle.
[0005] As a further aspect of the present invention, the respiratory audio spectrum frame data includes a frame timestamp, a frequency index table, and an amplitude matrix; the peak group density change sequence includes a sub-band density curve, a peak count vector, and amplitude quantile features; the abnormal segment boundary information includes boundary frame coordinates, interval length parameters, and boundary confidence markers; the respiratory sound abnormal segment identification content includes a segment number, a feature parameter packet, and a transmission verification field; and the abnormal identification interval within a period includes a period number, a merged interval range, and event-level label information.
[0006] As a further aspect of the present invention, the specific steps of S1 are as follows: S101: Acquire continuous respiratory sound signals collected by chest wall-attached acoustic sensors, perform electrical signal numerical conversion on the collected signals using a fixed sampling rate, extract discrete waveform point sequences at equal time intervals, and, in combination with the number of channels set by the sensor and the time sequence order, establish the frame time sequence structure corresponding to the audio waveform to generate discrete waveform frame data. S102: Based on the discrete waveform frame data, call the waveform point amplitude sequence arranged continuously in each frame, perform Fourier transform operation on each frame waveform according to the preset spectrum conversion rule, map the time domain information corresponding to the waveform point to the frequency domain amplitude distribution, arrange the energy density corresponding to the frequency point in frequency order, and generate frequency domain amplitude frame group. S103: Based on the frequency domain amplitude frame group, select the amplitude set of each frame whose frequency is in the target frequency band, extract the continuous amplitude sequence in the corresponding interval according to the frequency interval boundary range, rearrange the amplitude sequence to construct the spectrum frame group data structure, and generate respiratory audio spectrum frame data.
[0007] As a further aspect of the present invention, the specific steps of S2 are as follows: S201: Call the respiratory audio spectrum frame data, perform adjacent amplitude comparison operation on the amplitude point sequence arranged in frequency order in each frame, determine the local peak point position based on the direction of change of the amplitude difference between adjacent frequency points, record the frequency point index and corresponding amplitude value that meet the peak determination condition, and generate the peak point amplitude index sequence. S202: Based on the peak point amplitude index sequence, the peak points are divided into intervals according to the preset sub-band frequency boundary. The number of peak points corresponding to the sub-band is counted in multiple consecutive sub-bands, and the peak point amplitude set in the same interval is extracted simultaneously. The number of peaks in the sub-band and the corresponding peak amplitude features are vector-concatenated according to a preset order to obtain the sub-band peak statistics. S203: Based on the sub-band peak statistics, the peak quantity and amplitude combination results corresponding to the sub-band are sequentially spliced according to the frequency band arrangement order. The combination results of adjacent sub-bands are numerically serialized according to frame time sequence to form a continuously changing data sequence structure and establish a peak group density change sequence.
[0008] As a further aspect of the present invention, the specific steps of S3 are as follows: S301: Based on the difference sequence between the density value of each frame and the adjacent frame in the peak group density change sequence, the density change amount is compared with the set density change threshold frame by frame, the frame index segment in the continuous frame where the density change amount is greater than the density change threshold is extracted, and the corresponding start and end frame numbers are recorded in chronological order to generate candidate abnormal frame segment intervals. S302: Call the sub-band density value sequence and peak point amplitude sequence of the corresponding frame in the candidate abnormal frame segment interval, calculate the difference between the maximum and minimum values of the density sequence in the sub-band, and use it as the density fluctuation range. Calculate the difference sequence of peak amplitude in adjacent frames, and use it as the amplitude change sequence to obtain the candidate frame segment fluctuation parameters. S303: Based on the candidate frame segment fluctuation parameters, perform dual screening on the density fluctuation range value and the maximum amplitude value in the amplitude change sequence of each segment frame by frame, compare them with the stability threshold and the amplitude change threshold respectively, retain the continuous frame index interval that is less than both thresholds at the same time, and extract the start and end frame positions according to the frame sequence position to obtain the abnormal segment boundary information.
[0009] As a further embodiment of the present invention, the density change threshold is a fixed threshold determined based on the statistical results of the peak group density change sequence within a preset time window. The fixed threshold is obtained by weighted calculation of the mean and standard deviation of the density difference between adjacent frames in the peak group density change sequence. The stability threshold is defined as the difference between the maximum and minimum values of the sub-band density numerical sequence of the corresponding frame in the candidate abnormal frame segment interval not exceeding a preset density stability range. The amplitude change threshold is limited to the absolute value of the amplitude change between adjacent frames in the peak point amplitude sequence not exceeding a preset amplitude change upper limit. The retention condition for the continuous frame index interval is limited to the following: within the candidate abnormal frame segment interval, the continuous length of the frame index that simultaneously satisfies the fixed threshold, the stable threshold, and the amplitude change threshold is not less than a preset minimum frame number threshold.
[0010] As a further aspect of the present invention, the specific steps of S4 are as follows: S401: Based on the abnormal segment boundary information, extract the start frame position and end frame position corresponding to each segment, call the peak point index sequence and amplitude sequence associated with the boundary frame index, count the number of frame peak points in the start and end frame interval and calculate the peak amplitude difference between adjacent frames, form a parameter set arranged in time order, and generate an abnormal frame segment feature parameter set. S402: Based on the abnormal frame segment feature parameter set, perform field mapping and sequential arrangement of the start and end frame positions, peak number statistics and amplitude change parameters according to the frame segment number, write the numerical parameters into a unified data structure field, perform length verification and index binding on the field, and establish the respiratory sound abnormal segment identification content. As a further aspect of the present invention, the specific steps of S5 are as follows: S501: Based on the abnormal respiratory sound segment identifier content, obtain the start frame position, end frame position and respiratory cycle index number corresponding to each identifier, group and arrange the segments according to the cycle number, calculate the boundary interval frame number between adjacent segments in the same cycle, record the correspondence between adjacent start and end frame positions, and generate a segment boundary interval sequence within the cycle. S502: Based on the segment boundary interval sequence within the period, a comparison operation is performed on the interval values between the termination frame and the start frame of adjacent segments. The interval values are judged one by one with the preset boundary interval threshold. Segment combinations with interval values less than the fitted threshold are filtered out, and the corresponding segment index set is recorded to obtain a mergeable segment index group. S503: Call the mergeable segment index group, take the minimum value of the starting frame of multiple segments in the same index group, take the maximum value of the ending frame, integrate the consistency identification information of the corresponding segments, form continuous frame interval description data, and output the corresponding interval range according to the period number to generate the abnormal identification interval within the period.
[0011] As a further aspect of the present invention, the preset boundary interval threshold is a fixed frame number threshold obtained based on the statistical analysis of the boundary interval frame number between all adjacent segments within the same respiratory cycle. The fixed frame number threshold is limited to the frame number range corresponding to the median of the boundary interval frame number in the segment boundary interval sequence within the cycle. The generation conditions for the mergeable segment index group are further limited to the following: the respiratory cycle index numbers corresponding to the adjacent segments are consistent, and there are no unmarked abnormal frame breaks between the end frame position and the start frame position of the adjacent segments. The length of the frame sequence corresponding to the start frame position and the end frame position contained in the continuous frame interval description data is limited to not less than a preset minimum abnormal duration frame number threshold, which is a fixed number of frames preset based on the respiratory cycle frame length ratio.
[0012] A system for recognizing abnormal breath sounds in COPD patients, including: The signal framing module is used to perform S1: acquire the continuous respiratory sound signal collected by the chest wall attached acoustic sensor, generate digital waveform through analog-to-digital conversion, and perform framing processing according to the set time window. After performing spectrum conversion on each frame, the target frequency band amplitude is extracted to construct respiratory audio spectrum frame data. The spectrum extraction module is used to execute S2: call the respiratory audio spectrum frame data, identify local peak points in each frame, extract the number and amplitude information of peak points in multiple continuous sub-frequency bands, statistically analyze and combine them to form a feature density information sequence, and construct a peak group density change sequence; The peak density detection module is used to perform S3: based on the density change trend in the peak density change sequence, the frame segments in continuous frames whose density change exceeds the preset change threshold are marked as candidate abnormal segments, the consistency judgment of the sub-frequency band density fluctuation range and peak amplitude change in the candidate frame segments is made, the continuous intervals that meet the stable threshold conditions are selected, and the abnormal segment boundary information is obtained. The anomaly encapsulation module is used to perform S4: based on the boundary information of the anomaly segment, extract the start and end frame positions and the corresponding number of peaks and amplitude change feature parameters, encapsulate them into structured identification information data, and transmit them to the mobile terminal device through a low-power wireless method to form the identification content of the breathing sound anomaly segment; The cycle integration module is used to perform S5: based on the abnormal respiratory sound segment identification content, identify the boundary intervals between multiple segments within the same respiratory cycle, determine whether there are continuous feature segments that can be grouped into a single event, integrate consistency information, and generate an abnormal identification interval within the cycle.
[0013] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, continuous breathing sound signals are converted from analog to digital and processed by framing spectrum to extract the amplitude of the target frequency band and construct audio spectrum frame data, thereby enhancing the ability to capture details of abnormal changes. By identifying the number of peaks and amplitude changes in multiple sub-bands, a peak group density sequence is constructed to achieve dynamic tracking and positioning of abnormal trends. Combining density fluctuations and amplitude consistency for judgment improves the stable identification accuracy of complex abnormal states. The extracted feature data is transmitted wirelessly in a low-power manner, enhancing the remote and portable monitoring capability. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0015] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 This is a detailed schematic diagram of S1 of the present invention; Figure 3 This is a detailed schematic diagram of S2 of the present invention; Figure 4 This is a detailed schematic diagram of S3 of the present invention; Figure 5 This is a detailed schematic diagram of S4 of the present invention; Figure 6 This is a detailed schematic diagram of S5 of the present invention; Figure 7 This is a system module diagram of the present invention. Detailed Implementation
[0016] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0017] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0018] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0019] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0020] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0021] Please see Figure 1 This invention provides a method for identifying abnormal breath sounds in patients with COPD, comprising the following steps: S1: Acquire the continuous respiratory sound signal collected by the chest wall attached acoustic sensor, generate digital waveform through analog-to-digital conversion, and perform frame processing according to the set time window. After performing spectrum conversion on each frame, extract the amplitude in the target frequency band from 200Hz to 2000Hz to construct respiratory audio spectrum frame data. S2: Call the respiratory audio spectrum frame data, identify the local peak points in each frame, extract the number and amplitude information of peak points in multiple continuous sub-frequency bands, count and combine them to form a feature density information sequence, and construct a peak group density change sequence; S3: Based on the density change trend in the peak group density change sequence, the frame segments in continuous frames whose density change exceeds the preset change threshold are marked as candidate abnormal segments. The consistency between the sub-frequency band density fluctuation range and the peak amplitude change in the candidate frame segments is judged, and continuous intervals that meet the stable threshold conditions are selected to obtain the boundary information of abnormal segments. S4: Based on the boundary information of the abnormal segments, extract the start and end frame positions and the corresponding number of peaks and amplitude change feature parameters, encapsulate them into structured identification information data, and transmit them to the mobile terminal device through low-power wireless means to form the identification content of abnormal breathing sound segments. S5: Based on the content of abnormal breath sound fragments, identify the boundary intervals between multiple fragments within the same respiratory cycle, determine whether there are continuous feature fragments that can be grouped into a single event, integrate consistency information, and generate anomaly identification intervals within the cycle.
[0022] The respiratory audio spectrum frame data includes frame timestamps, frequency index tables, and amplitude matrices. The peak group density change sequence includes sub-band density curves, peak count vectors, and amplitude quantile features. The abnormal segment boundary information includes boundary frame coordinates, interval length parameters, and boundary confidence markers. The respiratory sound abnormal segment identification content includes segment number, feature parameter packet, and transmission verification field. The abnormal identification interval within the period includes period number, merged interval range, and event-level label information.
[0023] Please see Figure 2 The specific steps of S1 are as follows: S101: Acquire continuous respiratory sound signals collected by chest wall-attached acoustic sensors, perform electrical signal numerical conversion on the collected signals using a fixed sampling rate, extract discrete waveform point sequences at equal time intervals, and, in combination with the number of channels set by the sensor and the time sequence order, establish the frame time sequence structure corresponding to the audio waveform to generate discrete waveform frame data. Table 1 Data Acquisition and Framing Implementation Field Name numerical values unit Fixed sampling rate 4000 hertz Electrical signal quantization bit width 16 Bit Number of channels 2 road Frame duration 100 millisecond Frame shift duration 50 millisecond Number of waveform points per frame 400 point Single-channel continuous acquisition duration 30 Second Total number of waveform points per channel 120000 point target frequency band lower boundary 80 hertz Upper boundary of target frequency band 2000 hertz Table 1 lists the acquisition, framing, and target frequency band boundary data used throughout the subsequent examples. The upper limit of the target frequency band matches the sampling rate and is consistent with the common range of the main frequency components of breath sounds.
[0024] First, the attachment position of the chest wall-attached acoustic sensor was calibrated. The calibration was performed symmetrically at the right and left anterior chest second intercostal spaces of the same subject. After attachment, a resting noise segment was acquired for each channel, with a duration of 3 seconds. The absolute values of the noise segment amplitude were arranged chronologically to obtain a noise amplitude set. The median and upper quartile of this noise amplitude set were then taken as the noise reference value and noise fluctuation reference value for this acquisition. The noise reference value was used for comparison in subsequent frame quality screening. After calibration, continuous acquisition began, performed at a fixed sampling rate as shown in Table 1. The electrical signal amplitude at each sampling moment was converted into an electrical signal value using a 16-bit quantization width. The measurement range of the analog voltage was mapped to a discrete integer interval and written to the buffer queue in the order of the sampling timestamp, forming a discrete waveform point sequence with equal time intervals. Channel binding was then performed, writing the channel number and timestamp sequence number into a dual-field configuration to form a waveform point record with channel identification. Next, framing is performed. The framing action uses the framing duration and frame shift duration from Table 1 to slide and truncate the discrete waveform point sequence. For each channel, 400 consecutive points are truncated as one frame. The starting point of the next frame is shifted 200 points relative to the starting point of the previous frame to ensure frame overlap. A frame header field is created for each frame, containing the channel number, frame start sampling point number, frame end sampling point number, frame start timestamp, and frame end timestamp. The 400 waveform points within the frame are then written into the frame body field in chronological order, forming the frame timing structure corresponding to the audio waveform. In the example, a single channel has a total of 120,000 points over 30 seconds. Sliding the frame by 200 points, the number of frames is obtained by subtracting the number of points per frame from the total number of points and then summing and rounding by the frame shift, resulting in approximately 599 frames. For both channels, this totals approximately 1198 frames, generating a discrete waveform frame data sequence. To ensure the repeatability of subsequent spectrum conversion, a quality marker is added to each frame during the execution process. The quality marker is obtained by comparing the maximum value of the absolute value sequence of amplitude in this frame with the noise floor reference value. When the maximum value is less than twice the noise floor reference value, it is marked as a weak signal frame and the index is recorded. The weak signal frame index is retained in subsequent statistics but does not participate in the construction of the threshold calibration sample set. The output is discrete waveform frame data arranged in chronological order.
[0025] S102: Based on discrete waveform frame data, call the amplitude sequence of waveform points arranged continuously in each frame, perform Fourier transform operation on each frame waveform according to the preset spectrum conversion rule, map the time domain information corresponding to the waveform points to the frequency domain amplitude distribution, arrange the energy density corresponding to the frequency points in frequency order, and generate frequency domain amplitude frame group. Before performing spectral transformation on each waveform frame, the DC component of the amplitude sequence within the frame is first removed. This involves averaging the amplitude of all waveform points within the frame and subtracting the average from the amplitude of each waveform point to obtain a zero-mean amplitude sequence. Subsequently, before performing amplitude scaling, the maximum absolute value of the zero-mean amplitude sequence is compared with a preset noise floor reference threshold. If the maximum absolute value is greater than the noise floor reference threshold, the frame is determined to be a valid breathing sound frame, and amplitude scaling is performed on the zero-mean amplitude sequence, scaling the maximum absolute value point to 0.9 of the full quantization amplitude. The corresponding scaling factor is written into the frame appendix field to ensure that the amplitude magnitudes of different valid breathing sound frames are comparable. If the maximum absolute value is not greater than the noise floor reference threshold, the frame is determined to be a weak signal frame or a noise floor frame, and amplitude scaling is not performed on the frame; only the zero-mean processing result is retained, thereby avoiding the mis-amplification of noise floor or environmental noise into high-energy signals.
[0026] S103: Based on the frequency domain amplitude frame group, select the amplitude set of each frame whose frequency is in the target frequency band, extract the continuous amplitude sequence in the corresponding interval according to the frequency interval boundary range, rearrange the amplitude sequence to construct the spectrum frame group data structure, and generate respiratory audio spectrum frame data; The frequency point sequence and energy density sequence of each frame are read, and then interval filtering is performed according to the target frequency band boundary from 80 Hz to 2000 Hz in Table 1. The filtering action compares the frequency values of each frequency point against the boundary, and the indexes of frequency points that meet the condition of not less than 80 Hz and not greater than 2000 Hz are added to the retention set to form a continuous index segment. Since the frequency resolution step size is 10 Hz, 80 Hz corresponds to index 8, 2000 Hz corresponds to index 200, and the length of the continuous amplitude sequence is 193 points. Subsequently, a rearrangement is performed. The rearrangement action writes the continuous amplitude sequence into the new spectrum frame body field in order from low frequency to high frequency, and writes the target frequency band lower boundary, target frequency band upper boundary, number of target frequency points, original frame index and channel number into the spectrum frame header. To ensure consistency in subsequent sub-band division, the execution process pre-generates sub-band boundaries for the target frequency band, dividing the 80Hz to 2000Hz target frequency band into 20 consecutive sub-bands, each with a bandwidth of approximately 100Hz. The boundary table is written into the common metadata field of the spectrum frame group. In the example, the energy density sequence of the target frequency band in a certain frame is taken. Several local spikes in energy density appear in the 480Hz to 580Hz sub-band. After rearrangement, the frame still maintains the same relative position in the corresponding index segment, thus allowing subsequent cross-frame comparisons. The spectrum frame group data structure stores the target frequency band energy density sequence of each frame in chronological order and maintains the same frame index continuity as the original frame. Frames marked as weak signals by S101 are still output, but the weak signal mark value is carried in the quality mark field of the frame header, which facilitates unified removal or weighting during subsequent threshold filtering, generating respiratory audio spectrum frame data.
[0027] Please see Figure 3 The specific steps of S2 are as follows: S201: Call the respiratory audio spectrum frame data, perform adjacent amplitude comparison operation on the amplitude point sequence arranged in frequency order in each frame, determine the local peak point position based on the direction of change of the amplitude difference between adjacent frequency points, record the frequency point index and corresponding amplitude value that meet the peak determination condition, and generate the peak point amplitude index sequence. A frame of energy density sequence of 193 points in the target frequency band is read. Then, a three-point window comparison is performed on adjacent frequency points within the sequence. The comparison window consists of the current frequency point, the previous frequency point, and the next frequency point. The decision action calculates the difference between the energy density of the current frequency point and the previous frequency point, and then the difference between the next frequency point and the current frequency point. If the previous difference is positive and the next difference is negative, the current frequency point is identified as a local peak point. To avoid false peaks caused by setting the frequency domain to zero, an amplitude threshold is added to the decision action. The threshold is determined by three times the S102 noise floor threshold; in the example, it is a dimensionless quantity of 0.006. Candidate peak points below this threshold are not recorded. The recording action writes the frequency index, corresponding frequency value, and energy density value of the peak point into the peak point recording table, while maintaining the entries in the recording table sorted from low to high frequency. In the example, a certain frame satisfies the difference direction condition at 200 Hz, 520 Hz, and 980 Hz, respectively, and the energy densities are 0.012, 0.031, and 0.018, respectively, all higher than the 0.006 threshold. Therefore, three peak point records are generated. To ensure that subsequent sub-band statistics can be reproduced, a peak width approximation field is added to each frame's peak point record during the execution process. The peak width approximation is obtained by finding the nearest frequency index where the energy density drops to half of the peak point from the left and right of the peak point. In the example, the half-height of the 520 Hz peak point falls near 500 Hz and 550 Hz, and the peak width is approximately 50 Hz. This field only participates in the subsequent stability criterion calculation of density fluctuations and does not change the result of whether the peak point is recorded. The peak point amplitude index sequence is output.
[0028] S202: Based on the peak point amplitude index sequence, the peak points are divided into intervals according to the preset sub-band frequency boundary. The number of peak points corresponding to the sub-band is counted in multiple consecutive sub-bands, and the peak point amplitude set in the same interval is extracted simultaneously. The number of peaks in the sub-band and the corresponding peak amplitude features are vector-concatenated according to the preset order to obtain the sub-band peak statistics. The peak point record table and common sub-band boundary table of the frame are read. Then, frequency interval comparison is performed on each peak point record. Its frequency value is compared sequentially with the lower and upper boundaries of each sub-band. The peak point index falling into a certain sub-band interval is written into the peak index set of that sub-band. Subsequently, a quantity count is performed on each sub-band. The count action counts the peak points in the peak index set of the sub-band to obtain the number of peak points. At the same time, an amplitude set is formed for the energy density values corresponding to the set, and arranged in descending order of energy density. In this embodiment, the pairing combination operation is fixed to write the peak point count and the first 3 maximum values of the amplitude set side by side. If the amplitude set has less than 3 values, 0 is written in the insufficient positions and a zero-padding mark is recorded. In the example, two peak points appear in the 480 Hz to 580 Hz sub-band, with energy density values of 0.031 and 0.019. Then, the peak statistics of this sub-band are written as peak point count 2, maximum amplitude 0.031, second largest amplitude 0.019, and third amplitude 0. The same statistics are performed on each of the 20 sub-bands, resulting in 20 sets of sub-band peak statistics for the frame. To ensure the consistency of the density change sequence across subsequent frames, an amplitude and statistical value are appended to each sub-band during the process. The amplitude and statistical value are obtained by summing the peak energy densities of all sub-bands; in this example, the amplitude and statistical value for the sub-band are 0.050. The sub-band peak statistics for the frame are output in ascending order of sub-band number, maintaining the same field order across frames, resulting in a sub-band peak statistics sequence.
[0029] S203: Based on the peak statistics of the sub-band, the peak quantity and amplitude combination results of the sub-band are sequentially spliced according to the frequency band arrangement order. The combination results of adjacent sub-bands are numerically serialized according to the frame time sequence to form a continuously changing data sequence structure and establish a peak group density change sequence. The frame contains 20 sets of sub-band peak statistics, each set including the number of peak points, the first three amplitudes, amplitude, and statistical value. The sequential splicing action writes the number of peak points, amplitude, and statistical value into the density vector according to sub-band numbers from 1 to 20. The first position of the density vector contains the number of peak points for sub-band 1, the second position contains the amplitude and statistical value for sub-band 1, and so on, up to sub-band 20, forming a density vector of length 40. In this embodiment, the density value arrangement process is fixed at constructing a sub-band density value for each sub-band. The sub-band density value is composed of the number of peak points, amplitude, and statistical value. The action weights the number of peak points by a preset weight of 0.6, and the amplitude and statistical value by a preset weight of 0.4. The weighted results are then summed to obtain the sub-band density value. The weights were calibrated using a comparative experiment of resting and induced wheezing in 20 subjects. The calibration action involved replacing weights in candidate sets of 0.5 and 0.5, 0.6 and 0.4, and 0.7 and 0.3, calculating the detection rate and false alarm rate of subsequent S301 candidate abnormal frames. Combinations with a detection rate no lower than 0.90 and a false alarm rate no higher than 0.10 were selected; in the example, 0.6 and 0.4 met these conditions. For a certain sub-band, with a peak count of 2 and an amplitude and statistical value of 0.050, substituting these values into the above weighted summation logic yields a sub-band density value of 1.22. Arranging the 20 sub-band density values in band order forms a peak group density vector of length 20 for that frame. Subsequently, inter-frame interpolation is performed on consecutive frames to construct a density change sequence. The interpolation operation subtracts the density values of the same sub-band in adjacent frames and takes the absolute value. In the example, the density values of two adjacent frames of a certain sub-band are 1.22 and 0.510, respectively, so the density change is 0.71. The total density change from one frame to the next is calculated and summed for each of the 20 sub-bands. In the example, the total density change is 2.40. The output is a peak group density change sequence arranged in chronological order.
[0030] Please see Figure 4 The specific steps of S3 are as follows: S301: Based on the difference sequence between the density value of each frame and the adjacent frame in the peak group density change sequence, the density change amount is compared with the set density change threshold frame by frame, the frame index segment in the continuous frame where the density change amount is greater than the density change threshold is extracted, and the corresponding start and end frame numbers are recorded in chronological order to generate candidate abnormal frame segment intervals. The total density change sequence and corresponding frame index sequence are read from the peak density change sequence, and then a density change threshold is established. The threshold setting is based on a dual-set statistical approach using resting normal breathing data segments and labeled abnormal breathing data segments. The resting segment uses 30 seconds of data from 10 subjects each, and the abnormal segment uses 15 seconds of data each from subjects induced with wheezing and moist rales. The median and upper quartile of the total density change are calculated for both sets. The threshold selection process uses the midpoint between the upper quartile of the resting segment and the median of the abnormal segment as the density change threshold. In the example, the upper quartile of the resting segment is 1.10, and the median of the abnormal segment is 2.30. Substituting this into the midpoint selection logic yields a density change threshold of 1.70. The comparison process is performed frame by frame, comparing the total density change between each frame and the next with 1.70. Frames with a value greater than 1.70 are written into the threshold index sequence. Subsequently, continuous segment extraction is performed. The extraction action scans the over-threshold index sequence chronologically. If the difference between two adjacent indices is no greater than 1, they are grouped into the same continuous segment. If the difference is greater than 1, the current segment ends and a new segment begins. The recording action writes the start and end frame numbers to each segment, along with the segment length. The segment length is obtained by subtracting the start frame number from the end frame number and then adding 1. In the example, the over-threshold index appears consecutively from 120 to 128, followed by consecutively from 140 to 145, generating two candidate abnormal frame segment intervals: 120 to 128 and 140 to 145. To exclude short segments caused by single-frame spikes, a minimum length threshold is set for the segment length during execution. This minimum length threshold is obtained by adding 1 to the longest consecutive length of occasional over-threshold events in the resting segment. In the example, the longest consecutive length of the resting segment is 2, so the minimum length threshold is 3. Segments with a length less than 3 are not output. The lengths of the two segments mentioned above are 9 and 6 respectively, both of which meet the requirements, and candidate abnormal frame segment intervals are generated.
[0031] S302: Call the sub-band density value sequence and peak point amplitude sequence of the corresponding frame in the candidate abnormal frame segment interval, calculate the difference between the maximum and minimum values of the density sequence in the sub-band respectively, as the density fluctuation range, calculate the difference sequence of peak amplitude in adjacent frames, as the amplitude change sequence, and obtain the candidate frame segment fluctuation parameters. First, each candidate abnormal frame segment is processed segment by segment. Within each segment, the 20-dimensional peak group density vector and the peak point energy density record table of that frame are read frame by frame. Density fluctuation range calculation is performed independently for each sub-band. The execution action collects the density value sequence of that sub-band within the segment, takes the maximum and minimum values, and calculates the difference to obtain the density fluctuation range of that sub-band. Then, the maximum value of the density fluctuation ranges of the 20 sub-bands is taken as the segment-level density fluctuation range. In the example, within segment 120 to 128, the density value of the 7th sub-band has a maximum of 1.05 and a minimum of 0.62, so the fluctuation range of that sub-band is 0.43. The maximum fluctuation range among the 20 sub-bands is 0.58, so the segment-level density fluctuation range is 0.58. Peak amplitude change sequence calculation is performed on adjacent frames within the segment. The execution action aligns the peak point sets of two adjacent frames by frequency. The alignment rule is to take the maximum peak amplitude of each frame within the same sub-band. If a frame has no peak in that sub-band, the amplitude is taken as 0. Subsequently, the absolute values of the differences between the maximum peak amplitudes of adjacent frames in each sub-band are taken to obtain the change in peak amplitude of adjacent frames in that sub-band. Finally, the maximum value of the changes across the 20 sub-bands is taken as the change in peak amplitude of the adjacent frame pair. The changes in peak amplitude of all adjacent frame pairs within a segment are arranged in chronological order to form an amplitude change sequence. In the example, frames 123 and 124 have maximum peak amplitudes of 0.031 and 0.020 in the 5th sub-band, respectively, so the change in this sub-band is 0.011. The maximum change across all sub-bands is 0.015, so the change in amplitude of the adjacent frame pair is 0.015. Eight adjacent frame pairs are formed for segments 120 to 128, resulting in an amplitude change sequence of length 8. The segment-level density fluctuation range of 0.58 and the amplitude change sequence are written into the candidate frame segment fluctuation parameter structure for S303 dual-threshold screening.
[0032] S303: Based on the fluctuation parameters of the candidate frame segments, perform dual screening on the density fluctuation range value and the maximum amplitude value in the amplitude change sequence of each segment frame by frame, compare them with the stability threshold and the amplitude change threshold respectively, retain the continuous frame index interval that is less than both thresholds at the same time, and extract the start and end frame positions according to the frame sequence position to obtain the abnormal segment boundary information. Establish stability thresholds and amplitude variation thresholds. The stability threshold is set by comparing persistent abnormal segments and transient noise segments from the labeled abnormal segments. Persistent abnormal segments are defined as abnormal sound segments with a duration of at least 300 milliseconds as indicated by a doctor's auscultation, while transient noise segments are defined as segments caused by clothing friction or knocking and lasting no more than 100 milliseconds. The segment-level density fluctuation range distribution is calculated for both types of segments. The stability threshold is taken as the upper quartile of the segment-level density fluctuation range of persistent abnormal segments; in the example, the upper quartile is 0.70, so the stability threshold is 0.70. The amplitude variation threshold is set by referring to the maximum value distribution of the amplitude variation sequence of the same two types of segments. The amplitude variation threshold is taken as the upper quartile of the persistent abnormal segment; in the example, it is 0.020, so the amplitude variation threshold is 0.020. A dual screening process is performed on each candidate abnormal frame segment interval. First, the segment-level density fluctuation range of the segment is compared with 0.70; then, the maximum amplitude value in the amplitude variation sequence of the segment is compared with 0.020. Segments that satisfy both conditions being less than the threshold are included in the retention set. In the example, the segment-level density fluctuation range of segment 120 to 128 is 0.58, which is less than 0.70, and the maximum value of the amplitude change sequence is 0.018, which is less than 0.020. Therefore, this segment is retained. For segment 140 to 145, the segment-level density fluctuation range is 0.92, which is greater than 0.70. Therefore, this segment is not retained. For the retained segments, continuous frame index interval output is performed. The output action is to directly use the start and end frames of the segment as the boundary information of the abnormal segment, and write the number of frames in the segment that meet the weak signal mark in the boundary information. If the proportion of the number of weak signal frames exceeds 0.30, the segment is not output. In the example, the number of weak signal frames in segment 120 to 128 is 1, which accounts for 0.11, meeting the output condition. The boundary information of the abnormal segment is obtained from segment 120 to 128.
[0033] Please see Figure 5 The specific steps of S4 are as follows: S401: Based on the boundary information of the abnormal segment, extract the start frame position and end frame position corresponding to each segment, call the peak point index sequence and amplitude sequence associated with the boundary frame index, count the number of frame peak points in the start and end frame intervals and calculate the peak amplitude difference between adjacent frames, form a parameter set arranged in time order, and generate the abnormal frame segment feature parameter set. The system reads the list of abnormal segment boundary information, takes the start and end frame positions for each segment boundary, and then locates the peak amplitude index sequence corresponding to the frame index in the respiratory audio spectrum frame data. Peak count is performed frame-by-frame within the segment. The execution action counts the peak points in the peak point record table for each frame to obtain the number of peak points for that frame, and arranges the peak point counts of all frames within the segment in chronological order. In the example, the peak point counts for each frame in segments 120 to 128 are 3, 4, 4, 3, 3, 5, 4, 4, 3, respectively. The peak amplitude difference calculation for adjacent frames is performed on adjacent frames within the segment. The execution action takes the maximum peak amplitude across the entire frequency band for each pair of adjacent frames, then calculates the difference and takes the absolute value to obtain the peak amplitude difference for that pair of adjacent frames. In the example, the maximum peak amplitude of frame 120 is 0.031, and the maximum peak amplitude of frame 121 is 0.028, so the difference is 0.003. Eight differences are obtained for eight pairs of adjacent frames within the segment, and arranged in chronological order to form a sequence of amplitude change parameters. Subsequently, a parameter set is formed. The fields in this parameter set are written in a fixed order: segment number, start frame position, end frame position, number of frames within the segment, peak count sequence, amplitude variation parameter sequence, average peak count within the segment, upper quartile of the peak count within the segment, and maximum amplitude variation parameter. In the example, substituting the average peak count within the segment into the above sequence yields 3.67, and the maximum amplitude variation parameter is 0.006. This parameter set is then written into the abnormal frame segment feature parameter set for mapping in the S402 field.
[0034] S402: Based on the abnormal frame segment feature parameter set, perform field mapping and sequential arrangement of the start and end frame positions, peak number statistics and amplitude change parameters according to the frame segment number, write the numerical parameters into a unified data structure field, perform length verification and index binding on the field, and establish the identification content of abnormal breathing sound segments. Each frame segment is assigned a segment number, starting from 1 and incrementing sequentially according to the boundary information list. The field mapping process maps the starting frame position to the starting frame number in the identifier field, the ending frame position to the ending frame number in the identifier field, the number of frames within the segment to the continuous frame number in the identifier field, the average number of peaks to the average number of peaks in the identifier field, the upper quartile of the number of peaks to the upper quartile of the number of peaks in the identifier field, and the maximum value of the amplitude change parameter to the peak value of the amplitude change parameter in the identifier field. The peak number sequence and the amplitude change parameter sequence are truncated or padded with zeros to a fixed length, respectively. The fixed length setting refers to the wireless frame payload limit and the minimum reproducible information content calibration. The peak number sequence length is fixed at 16, and the amplitude change parameter sequence length is fixed at 16. If the segment length is insufficient, zeros are padded at the end and a zero-padding count is written; if the segment length exceeds the limit, only the first 16 items are retained and a truncation count is written. In the example, the number of frames in segment 120 to 128 is 9, which is less than 16. Therefore, the peak count sequence is padded with 7 zeros, and the amplitude change parameter sequence length is padded with 8 zeros. Length verification is performed on each field. The verification action checks that the starting frame number is not greater than the ending frame number, the number of consecutive frames is consistent with the difference between the two, the fixed length sequence field length meets 16, and the numerical field falls within the preset range. The range setting is based on the training and test sample statistics. The average value of the peak is set to a range of 0 to 20, and the peak value of the amplitude change is set to a range of 0 to 0.20. Records outside the range are marked as invalid and do not enter the transmission queue. The index binding action binds the frame segment number with the index of the identification data in the transmission queue, and writes the channel number and the acquisition batch number. The acquisition batch number is obtained by taking the last 6 digits of the second-level integer of the acquisition start timestamp. In the example, the acquisition start timestamp is 1700000123 seconds, so the batch number is 000123. An identifier for abnormal breathing sound segments is established.
[0035] Please see Figure 6 The specific steps of S5 are as follows: S501: Based on the abnormal respiratory sound segment identification content, obtain the start frame position, end frame position and respiratory cycle index number corresponding to each identification, group and arrange the segments according to the cycle number, calculate the boundary interval frame number between adjacent segments in the same cycle, record the correspondence between adjacent start and end frame positions, and generate the segment boundary interval sequence in the cycle. The start and end frame numbers are read from each identified content, and a respiratory cycle index number is generated. The quantization process of the cycle index number is based on the respiratory cycle boundary detection results. In this embodiment, the boundary detection adopts the energy envelope threshold method. The action is to sum the energy density sequence of each frame in the target frequency band to obtain the frame energy value, and then smooth the frame energy value sequence with a smoothing window of 5 frames. Then, an energy threshold is set, which is 1.5 times the median frame energy value of the resting segment. The continuous frame segment exceeding the threshold is regarded as the inspiratory segment, the interval between two inspiratory segments is regarded as the expiratory segment, and the start of the inspiratory segment is regarded as the cycle start. In the example, 20 cycles were detected in 30 seconds of data, so the average cycle duration is about 1.5 seconds, and each cycle corresponds to about 30 frames with a frame shift of 50 milliseconds. For each abnormal segment, the cycle interval in which its start frame number falls is determined as the cycle number of that segment. Then, the segments are grouped and arranged according to the cycle number, and within the same group, they are sorted in ascending order of start frame number. The boundary interval frame count calculation is performed on two adjacent segments within the same group. The action involves taking the difference between the ending frame number of the preceding segment and the starting frame number of the following segment, and then subtracting 1 to obtain the interval frame count. In the example, within the same period, segment 1 ends at frame number 128, and segment 2 starts at frame number 132, so the interval frame count is 3. The recording action writes the ending frame number of the preceding segment and the starting frame number of the following segment as a correspondence, and writes the interval frame count into the interval sequence. This process is repeated for all adjacent segment pairs within the same period to generate a segment boundary interval sequence within the period, and this sequence is bound to the period number for output.
[0036] S502: Based on the segment boundary interval sequence within the period, perform a comparison operation on the interval values between the termination frame and the start frame of adjacent segments, judge the interval values with the preset boundary interval threshold one by one, filter the segment combinations with interval values less than the fitted threshold, and record the corresponding segment index set to obtain the mergeable segment index group. Establish a boundary interval threshold. The threshold setting references the results of manually merging annotated abnormal segments as the truth set. The action involves statistically analyzing the frame distribution of manually merged adjacent segments in the truth set, and taking the upper quartile as the boundary interval threshold. In this example, the upper quartile is 4 frames, so the boundary interval threshold is 4 frames. For each period, the boundary interval sequence is checked one by one, comparing each interval frame number with 4. Adjacent segment pairs with an interval less than 4 are included in the mergeable candidate. In this example, the interval frame number is 3, less than 4, so the segment index of this adjacent segment pair is written into the same index group. For index group construction, transitive closure processing is performed on continuous mergeable relationships. The action is to write segments 1, 2, and 3 into the same index group when segments 1 and 2 are mergeable and segments 2 and 3 are mergeable. This is performed independently for each period, resulting in several mergeable segment index groups. To avoid erroneous merging across periods, the execution process forces all segments within an index group to have consistent period numbers. If inconsistencies are detected, the index group is split according to the period number. The set of mergeable segment index groups is output.
[0037] S503: Call the mergeable segment index group, take the minimum value of the starting frame of multiple segments in the same index group, take the maximum value of the ending frame, integrate the consistency identification information of the corresponding segments, form continuous frame interval description data, and output the corresponding interval range according to the period number to generate the anomaly identification interval within the period. For each mergeable segment index group, the start and end frame numbers of all segments are read. Boundary integration is then performed. The integration action involves taking the minimum start frame number within the index group as the start frame number of the merged interval and the maximum end frame number as the end frame number. In the example, the start frame numbers of the segments within the index group are 120 and 132, and the end frame numbers are 128 and 138, respectively. Therefore, the start frame number of the merged interval is 120, and the end frame number is 138. Next, consistency identifier information is integrated. The consistency identifier information is the consistency of the channel number and the receive verification identifier of the segments within the group. An action is performed to check if all channel numbers within the group are the same. If they are different, the channel number field is written to a mixed flag value, while the segment count for each channel is retained. The receive verification identifier consistency check checks if all segments within the group have passed verification. If there are records of failed verification but successfully retransmitted, they are written as verified; otherwise, they are written as verified and the interval is not output. When forming continuous frame interval description data, the following are written: period number, starting frame number of the merged interval, ending frame number of the merged interval, number of merged segments, list of original segment numbers within the group, minimum interval frame number within the group, and maximum interval frame number within the group. In the example, the number of merged segments is 2, the minimum interval frame number is 3, and the maximum interval frame number is 3. Finally, the corresponding interval range is output according to the period number, and the merged intervals of each period are sorted and output according to the starting frame number to generate the anomaly identification interval within the period.
[0038] Table 2. Threshold calibration and comparison experimental data. Indicator Name Parameter group one Parameter group two Parameter group three unit Peak threshold multiple 2 3 4 times Density change threshold 1.40 1.70 2.00 Dimensionless quantity Stability threshold 0.60 0.70 0.80 Dimensionless quantity Amplitude change threshold 0.015 0.020 0.030 Dimensionless quantity Abnormal segment detection rate 0.86 0.92 0.89 Dimensionless quantity False alarm rate 0.15 0.08 0.05 Dimensionless quantity Table 2 lists the statistical results obtained by replacing the threshold candidate groups with a sample of 20 subjects. Among them, parameter group two meets the value requirements required for subsequent screening under the joint constraints of detection rate and false alarm rate. Table 3. Results of intervals before and after segment merging. Periodic number Pre-merge segment start frame number Termination frame number of the fragment before merging Number of adjacent interval frames Start frame number after merging Termination frame number after merging 7 120,132 128,138 3 120 138 9 210,216,221 212,218,226 3,2 210 226 Table 3 shows the interval results after filtering by boundary interval threshold and integrating the minimum start frame and the maximum end frame, which can be directly used to fill the output field of the anomaly identification interval within the period.
[0039] Please see Figure 7 A system for recognizing abnormal breath sounds in COPD patients, including: The signal framing module is used to perform S1: acquire the continuous respiratory sound signal collected by the chest wall attached acoustic sensor, generate digital waveform through analog-to-digital conversion, and perform framing processing according to the set time window. After performing spectrum conversion on each frame, the target frequency band amplitude is extracted to construct respiratory audio spectrum frame data. The spectrum extraction module is used to execute S2: call the respiratory audio spectrum frame data, identify the local peak points in each frame, extract the number and amplitude information of peak points in multiple continuous sub-frequency bands, count and combine them to form a feature density information sequence, and construct a peak group density change sequence; The peak density detection module is used to perform S3: based on the density change trend in the peak density change sequence, the frame segments in continuous frames whose density change exceeds the preset change threshold are marked as candidate abnormal segments, the consistency judgment of the sub-frequency band density fluctuation range and peak amplitude change in the candidate frame segments is made, the continuous intervals that meet the stable threshold conditions are selected, and the boundary information of abnormal segments is obtained. The anomaly encapsulation module is used to perform S4: based on the boundary information of the anomaly segment, extract the start and end frame positions and the corresponding number of peaks and amplitude change characteristic parameters, encapsulate them into structured identification information data, and transmit them to the mobile terminal device through low-power wireless means to form the identification content of the breathing sound anomaly segment; The cycle integration module is used to execute S5: based on the content of the abnormal breath sound fragment identifier, identify the boundary intervals between multiple fragments within the same respiratory cycle, determine whether there are continuous feature fragments that can be grouped into a single event, integrate consistency information, and generate anomaly identification intervals within the cycle.
[0040] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for identifying abnormal breath sounds in patients with COPD, characterized in that, Includes the following steps: S1: Collect continuous respiratory sound signals from chest wall-attached acoustic sensors, convert them from analog to digital waveforms, divide them into frames according to a set time window, perform spectrum conversion, extract the amplitude in the target frequency band from 200Hz to 2000Hz, and generate respiratory audio spectrum frame data. S2: Based on the respiratory audio spectrum frame data, identify the local peaks in each frame, count the number and amplitude information of peaks in multiple continuous sub-frequency bands, combine them to generate a feature density information sequence, and construct a peak group density change sequence. S3: Based on the trend of the peak group density change sequence, the frame segments whose density change exceeds the preset change threshold are marked as candidate abnormal segments, and the continuous intervals that meet the stability conditions are screened by judging the consistency between sub-band density fluctuation and peak amplitude change, and the boundary information of abnormal segments is obtained. S4: Extract the start and end frame positions, peak quantity, and amplitude change characteristic parameters of the abnormal segment boundary information, generate structured identification information data, and transmit it to the mobile terminal via low-power wireless method to form the identification content of abnormal breathing sound segments; S5: Based on the identified abnormal breath sound segments, assess the boundary intervals of multiple segments within the same respiratory cycle, determine whether they can be grouped into a single event, integrate consistency information, and generate an abnormality identification interval within the cycle.
2. The method for identifying abnormal breath sounds in COPD patients according to claim 1, characterized in that, The respiratory audio spectrum frame data includes frame timestamps, frequency index tables, and amplitude matrices. The peak group density change sequence includes sub-band density curves, peak count vectors, and amplitude quantile features. The abnormal segment boundary information includes boundary frame coordinates, interval length parameters, and boundary confidence markers. The respiratory sound abnormal segment identification content includes segment number, feature parameter packet, and transmission verification field. The abnormal identification interval within the period includes period number, merged interval range, and event-level label information.
3. The method for identifying abnormal breath sounds in COPD patients according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: Acquire continuous respiratory sound signals collected by chest wall-attached acoustic sensors, perform electrical signal numerical conversion on the collected signals using a fixed sampling rate, extract discrete waveform point sequences at equal time intervals, and, in combination with the number of channels set by the sensor and the time sequence order, establish the frame time sequence structure corresponding to the audio waveform to generate discrete waveform frame data. S102: Based on the discrete waveform frame data, call the waveform point amplitude sequence arranged continuously in each frame, perform Fourier transform operation on each frame waveform according to the preset spectrum conversion rule, map the time domain information corresponding to the waveform point to the frequency domain amplitude distribution, arrange the energy density corresponding to the frequency point in frequency order, and generate frequency domain amplitude frame group. S103: Based on the frequency domain amplitude frame group, select the amplitude set of each frame whose frequency is in the target frequency band, extract the continuous amplitude sequence in the corresponding interval according to the frequency interval boundary range, rearrange the amplitude sequence to construct the spectrum frame group data structure, and generate respiratory audio spectrum frame data.
4. The method for identifying abnormal breath sounds in COPD patients according to claim 3, characterized in that, The specific steps of S2 are as follows: S201: Call the respiratory audio spectrum frame data, perform adjacent amplitude comparison operation on the amplitude point sequence arranged in frequency order in each frame, determine the local peak point position based on the direction of change of the amplitude difference between adjacent frequency points, record the frequency point index and corresponding amplitude value that meet the peak determination condition, and generate the peak point amplitude index sequence. S202: Based on the peak point amplitude index sequence, the peak points are divided into intervals according to the preset sub-band frequency boundary. The number of peak points corresponding to the sub-band is counted in multiple consecutive sub-bands, and the peak point amplitude set in the same interval is extracted simultaneously. The number of peaks in the sub-band and the corresponding peak amplitude features are vector-concatenated according to a preset order to obtain the sub-band peak statistics. S203: Based on the sub-band peak statistics, the peak quantity and amplitude combination results corresponding to the sub-band are sequentially spliced according to the frequency band arrangement order. The combination results of adjacent sub-bands are numerically serialized according to frame time sequence to form a continuously changing data sequence structure and establish a peak group density change sequence.
5. The method for identifying abnormal breath sounds in COPD patients according to claim 4, characterized in that, The specific steps for S3 are as follows: S301: Based on the difference sequence between the density value of each frame and the adjacent frame in the peak group density change sequence, the density change amount is compared with the set density change threshold frame by frame, the frame index segment in the continuous frame where the density change amount is greater than the density change threshold is extracted, and the corresponding start and end frame numbers are recorded in chronological order to generate candidate abnormal frame segment intervals. S302: Call the sub-band density value sequence and peak point amplitude sequence of the corresponding frame in the candidate abnormal frame segment interval, calculate the difference between the maximum and minimum values of the density sequence in the sub-band, and use it as the density fluctuation range. Calculate the difference sequence of peak amplitude in adjacent frames, and use it as the amplitude change sequence to obtain the candidate frame segment fluctuation parameters. S303: Based on the candidate frame segment fluctuation parameters, perform dual screening on the density fluctuation range value and the maximum amplitude value in the amplitude change sequence of each segment frame by frame, compare them with the stability threshold and the amplitude change threshold respectively, retain the continuous frame index interval that is less than both thresholds at the same time, and extract the start and end frame positions according to the frame sequence position to obtain the abnormal segment boundary information.
6. The method for identifying abnormal breath sounds in COPD patients according to claim 5, characterized in that, The density change threshold is a fixed threshold determined based on the statistical results of the peak group density change sequence within a preset time window. The fixed threshold is obtained by weighting the mean and standard deviation of the density difference between adjacent frames in the peak group density change sequence. The stability threshold is defined as the difference between the maximum and minimum values of the sub-band density numerical sequence of the corresponding frame in the candidate abnormal frame segment interval not exceeding a preset density stability range. The amplitude change threshold is limited to the absolute value of the amplitude change between adjacent frames in the peak point amplitude sequence not exceeding a preset amplitude change upper limit. The retention condition for the continuous frame index interval is limited to the following: within the candidate abnormal frame segment interval, the continuous length of the frame index that simultaneously satisfies the fixed threshold, the stable threshold, and the amplitude change threshold is not less than a preset minimum frame number threshold.
7. The method for identifying abnormal breath sounds in COPD patients according to claim 5, characterized in that, The specific steps of S4 are as follows: S401: Based on the abnormal segment boundary information, extract the start frame position and end frame position corresponding to each segment, call the peak point index sequence and amplitude sequence associated with the boundary frame index, count the number of frame peak points in the start and end frame interval and calculate the peak amplitude difference between adjacent frames, form a parameter set arranged in time order, and generate an abnormal frame segment feature parameter set. S402: Based on the abnormal frame segment feature parameter set, perform field mapping and sequential arrangement of the start and end frame positions, peak quantity statistics and amplitude change parameters according to the frame segment number, write the numerical parameters into a unified data structure field, perform length verification and index binding on the field, and establish the identification content of abnormal breathing sound segments.
8. The method for identifying abnormal breath sounds in COPD patients according to claim 7, characterized in that, The specific steps of S5 are as follows: S501: Based on the abnormal respiratory sound segment identifier content, obtain the start frame position, end frame position and respiratory cycle index number corresponding to each identifier, group and arrange the segments according to the cycle number, calculate the boundary interval frame number between adjacent segments in the same cycle, record the correspondence between adjacent start and end frame positions, and generate a segment boundary interval sequence within the cycle. S502: Based on the segment boundary interval sequence within the period, a comparison operation is performed on the interval values between the termination frame and the start frame of adjacent segments. The interval values are judged one by one with the preset boundary interval threshold. Segment combinations with interval values less than the fitted threshold are filtered out, and the corresponding segment index set is recorded to obtain a mergeable segment index group. S503: Call the mergeable segment index group, take the minimum value of the starting frame of multiple segments in the same index group, take the maximum value of the ending frame, integrate the consistency identification information of the corresponding segments, form continuous frame interval description data, and output the corresponding interval range according to the period number to generate the abnormal identification interval within the period.
9. The method for identifying abnormal breath sounds in COPD patients according to claim 8, characterized in that, The preset boundary interval threshold is a fixed frame number threshold obtained based on the statistical analysis of the boundary interval frame number between all adjacent segments within the same respiratory cycle. The fixed frame number threshold is limited to the frame number range corresponding to the median of the boundary interval frame number in the segment boundary interval sequence within the cycle. The generation conditions for the mergeable segment index group are further limited to the following: the respiratory cycle index numbers corresponding to the adjacent segments are consistent, and there are no unmarked abnormal frame breaks between the end frame position and the start frame position of the adjacent segments. The length of the frame sequence corresponding to the start frame position and the end frame position contained in the continuous frame interval description data is limited to not less than a preset minimum abnormal duration frame number threshold, which is a fixed number of frames preset based on the respiratory cycle frame length ratio.
10. A system for recognizing abnormal breath sounds in patients with COPD, characterized in that, The system is used to implement the method for identifying abnormal breath sounds in COPD patients according to any one of claims 1-9, the system comprising: The signal framing module is used to perform S1: acquire the continuous respiratory sound signal collected by the chest wall attached acoustic sensor, generate digital waveform through analog-to-digital conversion, and perform framing processing according to the set time window. After performing spectrum conversion on each frame, the target frequency band amplitude is extracted to construct respiratory audio spectrum frame data. The spectrum extraction module is used to execute S2: call the respiratory audio spectrum frame data, identify local peak points in each frame, extract the number and amplitude information of peak points in multiple continuous sub-frequency bands, statistically analyze and combine them to form a feature density information sequence, and construct a peak group density change sequence; The peak density detection module is used to perform S3: based on the density change trend in the peak density change sequence, the frame segments in continuous frames whose density change exceeds the preset change threshold are marked as candidate abnormal segments, the consistency judgment of the sub-frequency band density fluctuation range and peak amplitude change in the candidate frame segments is made, the continuous intervals that meet the stable threshold conditions are selected, and the abnormal segment boundary information is obtained. The anomaly encapsulation module is used to perform S4: based on the boundary information of the anomaly segment, extract the start and end frame positions and the corresponding number of peaks and amplitude change feature parameters, encapsulate them into structured identification information data, and transmit them to the mobile terminal device through a low-power wireless method to form the identification content of the breathing sound anomaly segment; The cycle integration module is used to perform S5: based on the abnormal respiratory sound segment identification content, identify the boundary intervals between multiple segments within the same respiratory cycle, determine whether there are continuous feature segments that can be grouped into a single event, integrate consistency information, and generate an abnormal identification interval within the cycle.