CN110795996A - Method, device and equipment for classifying heart sound signals and storage medium - Google Patents

Method, device and equipment for classifying heart sound signals and storage medium Download PDF

Info

Publication number
CN110795996A
CN110795996A CN201910881574.7A CN201910881574A CN110795996A CN 110795996 A CN110795996 A CN 110795996A CN 201910881574 A CN201910881574 A CN 201910881574A CN 110795996 A CN110795996 A CN 110795996A
Authority
CN
China
Prior art keywords
signal
sample
heart sound
trained
abnormal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910881574.7A
Other languages
Chinese (zh)
Other versions
CN110795996B (en
Inventor
王健宗
吴文启
瞿晓阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910881574.7A priority Critical patent/CN110795996B/en
Priority to PCT/CN2019/117590 priority patent/WO2021051559A1/en
Publication of CN110795996A publication Critical patent/CN110795996A/en
Application granted granted Critical
Publication of CN110795996B publication Critical patent/CN110795996B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • G06F2218/10Feature extraction by analysing the shape of a waveform, e.g. extracting parameters relating to peaks
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B7/00Instruments for auscultation
    • A61B7/003Detecting lung or respiration noise
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B7/00Instruments for auscultation
    • A61B7/02Stethoscopes
    • A61B7/04Electric stethoscopes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching
    • G06F2218/14Classification; Matching by matching peak patterns

Landscapes

  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Veterinary Medicine (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Biomedical Technology (AREA)
  • Acoustics & Sound (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Signal Processing (AREA)
  • Pulmonology (AREA)
  • Measuring Pulse, Heart Rate, Blood Pressure Or Blood Flow (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for classifying heart sound signals, wherein the classification method stores the heart sound signals to be classified into a cache module when the processor receives the heart sound signals to be classified sent by a user side, and determines a preset signal classification model corresponding to the heart sound signals to be classified in the storage module; the processor acquires the signal characteristics of the abnormal standard signals and the signal characteristics of the normal standard signals in the signal classification model, and acquires the signal characteristics of the heart sound signals to be classified; the processor compares the heart sound signals to be classified with the signal characteristics of the abnormal standard signals and the normal standard signals respectively to determine the category of the heart sound signals. The method constructs the heart sound signal classification model, determines the heart sound signals to be classified based on the abnormal standard signals and the signal characteristics corresponding to the normal standard signals, and improves the identification efficiency of the abnormal heart sound signals.

Description

Method, device and equipment for classifying heart sound signals and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for classifying a heart sound signal.
Background
Heart sound is the result of the interaction of the heart's blood flow dynamics with the cardiovascular system, a mechanical vibration. The normal heart sounds typically range in frequency from 20Hz to 200Hz, while the heart murmurs typically do not exceed 800Hz and are within the hearing range of the human ear. In view of the mechanism of generation of heart sounds, heart sounds carry a great deal of information about the health of the cardiovascular system, and are an important source of information for diagnosing heart diseases and evaluating heart functions. At present, the methods for identifying the heart murmurs of the patient are judged by auscultation of the heart of the patient by doctors, and the judgment accuracy is low. Therefore, how to solve the technical problem of low accuracy rate of the conventional abnormal heart sound signal identification becomes a technical problem to be solved urgently at present.
Disclosure of Invention
The invention mainly aims to provide a method, a device and equipment for classifying heart sound signals and a computer readable storage medium, and aims to solve the technical problem that the existing abnormal heart sound signals are low in identification accuracy.
In order to achieve the above object, the present invention provides a method for classifying a heart sound signal, the method for classifying a heart sound signal is applied to a system for classifying a heart sound signal, the system for classifying a heart sound signal includes a storage module, a buffer module and a processor, and the method for classifying a heart sound signal includes the following steps:
when receiving a heart sound signal to be classified sent by a user side, the processor stores the heart sound signal to be classified into the cache module, and determines a preset signal classification model corresponding to the heart sound signal to be classified in the storage module;
the processor acquires the signal characteristics of an abnormal standard signal and the signal characteristics of a normal standard signal in the signal classification model, and acquires the signal characteristics of the heart sound signal to be classified, wherein the signal characteristics comprise time domain characteristics and frequency domain characteristics;
the processor compares the signal characteristics of the heart sound signals to be classified with the signal characteristics of the abnormal standard signals and the signal characteristics of the normal standard signals respectively to determine that the heart sound signals to be classified are abnormal heart sound signals or normal heart sound signals, and sends the classification categories of the heart sound signals to be classified to the user side.
Optionally, when receiving the to-be-classified heart sound signal sent by the user side, the processor stores the to-be-classified heart sound signal to the cache module, and before the step of determining the preset signal classification model corresponding to the to-be-classified heart sound signal in the storage module, the processor further includes:
the processor acquires a signal sample to be trained in the storage module, wherein the signal sample to be trained comprises a normal signal sample to be trained and an abnormal signal sample to be trained;
the processor respectively calculates the normal signal to be trained and the normal signal sample time domain characteristics and the abnormal signal sample time domain characteristics corresponding to the abnormal signal to be trained according to a preset time domain characteristic calculation formula, wherein the sample time domain characteristics comprise one or more of sample energy entropy, sample short-time energy and sample zero crossing rate;
the processor respectively calculates normal signal sample frequency domain characteristics and abnormal signal sample frequency domain characteristics corresponding to the normal signal to be trained and the abnormal signal to be trained according to a preset frequency domain characteristic calculation formula, wherein the sample frequency domain characteristics comprise sample cut-off frequency, a sample spectrum centroid value, sample spectrum flux, an average value of a system after sample discrete Fourier transform and sample linear prediction coding;
and the processor trains the model template in the storage module according to the normal signal sample time domain characteristic, the normal signal sample frequency domain characteristic, the abnormal signal sample time domain characteristic and the abnormal signal sample frequency domain characteristic to generate a signal classification model, and stores the signal classification model in the storage module.
Optionally, the step of calculating, by the processor, the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained respectively according to a preset time domain feature calculation formula specifically includes:
the processor calculates the normal signal sample energy entropy and the abnormal signal sample energy entropy corresponding to the normal signal to be trained and the abnormal signal to be trained according to an energy entropy calculation formula, and the normal signal sample energy entropy and the abnormal signal sample energy entropy are respectively used as the normal signal sample time domain feature and the abnormal signal sample time domain feature, wherein the energy entropy calculation formula is that
Figure BDA0002206026510000021
N is the number of the discrete heart sound signal in the signal sample to be trained, x (N) is the discrete heart sound signal in the signal sample to be trained, and N is the number of the signal samples to be trained in the same category.
Optionally, the step of calculating, by the processor, the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained respectively according to a preset time domain feature calculation formula further includes:
the processor calculates the short-time energy of the normal signal sample and the short-time energy of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a short-time energy calculation formula, and the short-time energy are respectively used as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample, wherein the short-time energy calculation formula is
Figure BDA0002206026510000031
Omega (m-N) is a window function for filtering noise signals in the heart sound signals, x (N) is discrete heart sound signals in the signal samples to be trained, N is the number of the discrete heart sound signals in the signal samples to be trained, m is the number of the noise signals in the signal samples to be trained, and N is the number of the signal samples to be trained in the same category.
Optionally, the step of calculating, by the processor, the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained respectively according to a preset time domain feature calculation formula further includes:
the processor calculates the zero crossing rate of the normal signal sample and the zero crossing rate of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a zero crossing rate calculation formula, and the zero crossing rate calculation formula is that the zero crossing rate of the normal signal sample and the zero crossing rate of the abnormal signal sample are respectively used as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample, wherein the zero crossing rate calculation formula
Figure BDA0002206026510000032
x (N) is a discrete heart sound signal in the signal sample to be trained, N is the number of the signal samples to be trained of the same category, N is the number of the discrete heart sound signal in the signal sample to be trained, sgn (x (N)) is a sign function corresponding to the discrete heart sound signal and used for determining the frequency band value of the discrete heart sound signal, wherein,
Figure BDA0002206026510000033
optionally, the processor calculates, according to a preset frequency domain feature calculation formula, a normal signal sample frequency domain feature and an abnormal signal sample frequency domain feature corresponding to the normal signal to be trained and the abnormal signal to be trained, respectively, where the sample frequency domain feature includes a sample cut-off frequency, a sample spectrum centroid value, a sample spectrum flux, an average value of a system after sample discrete fourier transform, and a sample linear prediction encoding, and the step specifically includes:
the processor calculates a spectrum centroid value of a normal signal sample and a spectrum centroid value of an abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a spectrum centroid value calculation formula, and the spectrum centroid values are respectively used as a frequency domain feature of the normal signal sample and a frequency domain feature of the abnormal signal sample, wherein the spectrum centroid value calculation formula is
Figure BDA0002206026510000034
x (n) is a discrete heart sound signal in the signal sample to be trained, f (x (n)) is a frequency spectrum function of x (n), and n is the number of the discrete heart sound signal in the signal sample to be trained;
the processor calculates the spectral flux of a normal signal sample and the spectral flux of an abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a spectral flux calculation formula, and the spectral fluxes are respectively used as the frequency domain characteristic of the normal signal sample and the frequency domain characteristic of the abnormal signal sample, wherein the spectral centroid value formula is
Figure BDA0002206026510000041
The processor calculates the average value of normal signal samples and the average value of abnormal signal samples corresponding to the normal signal to be trained and the abnormal signal to be trained according to an average value calculation formula of coefficients after discrete Fourier transform, and the average values are respectively used as the frequency domain characteristics of the normal signal samples and the frequency domain characteristics of the abnormal signal samples, wherein the spectral flux calculation formula isWherein, ω ═ 1, 2.., k, k is the discrete sampling number of the discrete heart sound signal in the signal sample to be trained;
the processor calculates the average value of normal signal samples and the average value of abnormal signal samples corresponding to the normal signal to be trained and the abnormal signal to be trained according to an average value calculation formula of coefficients after discrete Fourier transform, and the average values are respectively used as the frequency domain characteristics of the normal signal samples and the frequency domain characteristics of the abnormal signal samples, wherein the sample average value calculation formula isWherein s (n) is a sampling value of the original heart sound signal at the time of n, e (n) is a prediction error, p is the number of prediction coefficients, the value range of p is between 10 and 15, akLinear predictive coding of the samples to be trained that need to be computed.
Optionally, the processor calculates a normal signal sample time domain feature and an abnormal signal sample time domain feature corresponding to the normal signal to be trained and the abnormal signal to be trained, respectively, according to a preset time domain feature calculation formula, where before the step of calculating the sample time domain feature including one or more of a sample energy entropy, a sample short-time energy, and a sample zero crossing rate, the method further includes:
the processor calculates a normal signal to be trained, and a normal signal sample time crest factor and an abnormal signal sample time crest factor corresponding to the abnormal signal to be trained, wherein the time crest factor is the absolute value of the peak value of a time domain oscillogram of the sample signal to be trained divided by the effective value of the time domain oscillogram, and the effective value of the oscillogram is the root-mean-square of the waveform;
and the processor determines invalid signals in the normal signal to be trained and the abnormal signal to be trained based on the normal signal sample time crest factor and the abnormal signal sample time crest factor, and eliminates the invalid signals in the normal signal to be trained and the abnormal signal to be trained.
In order to achieve the above object, the present invention also provides a device for classifying a heart sound signal, including:
the classification model determining module is used for storing the heart sound signals to be classified into the cache module when the processor receives the heart sound signals to be classified sent by the user side, and determining a preset signal classification model corresponding to the heart sound signals to be classified in the storage module;
the signal feature extraction module is used for the processor to obtain the signal features of the abnormal standard signals and the normal standard signals in the signal classification model and obtain the signal features of the heart sound signals to be classified, wherein the signal features comprise time domain features and frequency domain features;
and the heart sound signal classification module is used for comparing the signal characteristics of the heart sound signals to be classified with the signal characteristics of the abnormal standard signals and the signal characteristics of the normal standard signals by the processor respectively so as to determine that the heart sound signals to be classified are the abnormal heart sound signals or the normal heart sound signals, and the classification categories of the heart sound signals to be classified are sent to the user side.
In addition, to achieve the above object, the present invention further provides a device for classifying a heart sound signal, including a processor, a memory, and a program for classifying a heart sound signal stored in the memory and executable by the processor, wherein the program for classifying a heart sound signal when executed by the processor implements the steps of the method for classifying a heart sound signal as described above.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, on which a classification program of a heart sound signal is stored, wherein when the classification program of the heart sound signal is executed by a processor, the steps of the classification method of the heart sound signal are implemented.
The invention provides a method for classifying heart sound signals, which comprises the steps that when a processor receives a heart sound signal to be classified sent by a user side, the heart sound signal to be classified is stored in a cache module, and a preset signal classification model corresponding to the heart sound signal to be classified is determined in the storage module; the processor acquires the signal characteristics of an abnormal standard signal and the signal characteristics of a normal standard signal in the signal classification model, and acquires the signal characteristics of the heart sound signal to be classified, wherein the signal characteristics comprise time domain characteristics and frequency domain characteristics; the processor compares the signal characteristics of the heart sound signals to be classified with the signal characteristics of the abnormal standard signals and the signal characteristics of the normal standard signals respectively to determine that the heart sound signals to be classified are abnormal heart sound signals or normal heart sound signals, and sends the classification categories of the heart sound signals to be classified to the user side. Through the method, the heart sound signal classification model is constructed, and the heart sound signal to be classified is determined to be the normal heart sound signal or the abnormal heart sound signal based on the abnormal standard signal in the signal classification model and the signal characteristics corresponding to the normal standard signal, so that the abnormal heart sound signal identification efficiency is improved, and the technical problem of low identification accuracy of the existing abnormal heart sound signal is solved.
Drawings
Fig. 1 is a schematic diagram of a hardware configuration of a classification apparatus for a heart sound signal according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for classifying a heart sound signal according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for classifying a heart sound signal according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for classifying a heart sound signal according to a third embodiment of the present invention;
fig. 5 is a functional block diagram of a first embodiment of the apparatus for classifying a heart sound signal according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The method for classifying the heart sound signals is mainly applied to equipment for classifying the heart sound signals, and the equipment for classifying the heart sound signals can be equipment with display and processing functions, such as a PC (personal computer), a portable computer, a mobile terminal and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a classification apparatus for a heart sound signal according to an embodiment of the present invention. In the embodiment of the present invention, the apparatus for classifying a heart sound signal may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a magnetic disk memory), and optionally, the memory 1005 may be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 does not constitute a definition of a classification device for heart sound signals and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
With continued reference to fig. 1, the memory 1005 of fig. 1, which is one type of computer-readable storage medium, may include an operating system, a network communication module, and a classification program of the heart sound signal.
In fig. 1, the network communication module is mainly used for connecting to a server and performing data communication with the server; and the processor 1001 may call the classification procedure of the heart sound signal stored in the memory 1005 and perform the classification method of the heart sound signal provided by the embodiment of the present invention.
The embodiment of the invention provides a method for classifying heart sound signals.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for classifying a heart sound signal according to a first embodiment of the present invention.
In this embodiment, the method for classifying a heart sound signal is applied to a system for classifying a heart sound signal, the system for classifying a heart sound signal includes a storage module, a buffer module, and a processor, and the method for classifying a heart sound signal includes the following steps:
step S10, when receiving a heart sound signal to be classified sent by a user end, the processor stores the heart sound signal to be classified into the cache module, and determines a preset signal classification model corresponding to the heart sound signal to be classified in the storage module;
at present, the methods for identifying the heart murmurs of the patient are judged by auscultation of the heart of the patient by doctors, and the judgment accuracy is low. Therefore, there is a technical problem that the accuracy of recognizing the abnormal heart sound signal is low. In order to solve the above problem, in this embodiment, a heart sound signal classification model is constructed, and based on an abnormal standard signal in the signal classification model and a signal feature corresponding to a normal standard signal, a heart sound signal to be classified is determined to be a normal heart sound signal or an abnormal heart sound signal, so that the identification efficiency of the abnormal heart sound signal is improved. Specifically, when receiving a heart sound signal sent by a user through a user terminal, the processor needs to determine whether the heart sound signal is a normal heart sound signal or an abnormal heart sound signal, that is, a heart sound signal to be classified. The processor stores the heart sound signals to be classified into the cache module for caching so as to carry out classification and identification subsequently. And then acquiring a signal classification module for carrying out heart sound signal identification in the storage module, and identifying and classifying the heart sound signals to be classified in the cache module. The signal classification model in the storage module is obtained in advance according to a training sample training template model corresponding to the normal heart sound signal and the abnormal heart sound signal in the storage module. The storage module can also store other classification modules for classifying other data, so that a corresponding signal classification model can be determined in the storage module according to the type of the psychogenic signal to be classified.
Step S20, the processor obtains the signal characteristics of the abnormal standard signals and the normal standard signals in the signal classification model, and obtains the signal characteristics of the heart sound signals to be classified, wherein the signal characteristics comprise time domain characteristics and frequency domain characteristics;
in this embodiment, the processor inputs the heart sound signal to be classified into the signal classification model for classification. That is, the signal characteristics of the abnormal standard signal, the signal characteristics of the normal standard signal and the signal characteristics of the heart sound signal to be classified in the signal classification model are obtained, and then the signal characteristics of the heart sound signal to be classified are compared with the signal characteristics of the abnormal standard signal and the signal characteristics of the normal standard signal. The signal features include time-domain features and frequency-domain features, that is, the time-domain features and the frequency-domain features of the to-be-classified heart sound signals are compared with the time-domain features and the frequency-domain features of the abnormal standard signals and the time-domain features and the frequency-domain features of the normal standard signals, so that the category of the to-be-classified heart sound signals is determined.
Step S30, the processor compares the signal characteristics of the heart sound signal to be classified with the signal characteristics of the abnormal standard signal and the signal characteristics of the normal standard signal, respectively, to determine that the heart sound signal to be classified is an abnormal heart sound signal or a normal heart sound signal, and sends the classification category of the heart sound signal to be classified to the user terminal.
In this embodiment, if the processor determines that the time domain feature and the frequency domain feature of the to-be-classified heart sound signal are matched with the time domain feature and the frequency domain feature of the abnormal standard signal, the to-be-classified heart sound signal is an abnormal heart sound signal. And if the time domain characteristic and the frequency domain characteristic of the heart sound signal to be classified are matched with the time domain characteristic and the frequency domain characteristic of the normal standard signal, the heart sound signal to be classified is a normal heart sound signal. And sending the classification type of the heart sound signal to be classified to the user side so that the user can know whether the heart sound signal to be classified is a normal heart sound signal or an abnormal heart sound signal.
The embodiment provides a method for classifying heart sound signals, which includes storing, by a processor, a heart sound signal to be classified to a cache module when the processor receives the heart sound signal to be classified sent by a user side, and determining, in the storage module, a preset signal classification model corresponding to the heart sound signal to be classified; the processor acquires the signal characteristics of an abnormal standard signal and the signal characteristics of a normal standard signal in the signal classification model, and acquires the signal characteristics of the heart sound signal to be classified, wherein the signal characteristics comprise time domain characteristics and frequency domain characteristics; the processor compares the signal characteristics of the heart sound signals to be classified with the signal characteristics of the abnormal standard signals and the signal characteristics of the normal standard signals respectively to determine that the heart sound signals to be classified are abnormal heart sound signals or normal heart sound signals, and sends the classification categories of the heart sound signals to be classified to the user side. Through the method, the heart sound signal classification model is constructed, and the heart sound signal to be classified is determined to be the normal heart sound signal or the abnormal heart sound signal based on the abnormal standard signal in the signal classification model and the signal characteristics corresponding to the normal standard signal, so that the abnormal heart sound signal identification efficiency is improved, and the technical problem of low identification accuracy of the existing abnormal heart sound signal is solved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for classifying a heart sound signal according to a second embodiment of the present invention.
Based on the foregoing embodiment shown in fig. 2, in this embodiment, before the step S10, the method further includes:
step S01, the processor obtains a signal sample to be trained in the storage module, wherein the signal sample to be trained comprises a normal signal sample to be trained and an abnormal signal sample to be trained;
in this embodiment, the processor downloads a training sample, i.e., a signal sample to be trained, from the storage module, i.e., a training database. The signal samples to be trained comprise a plurality of heart sound signals, and the plurality of heart sound signals comprise a plurality of normal heart sound signals and a plurality of abnormal heart sound signals, namely a plurality of normal signal samples to be trained and a plurality of abnormal signal samples to be trained. Specifically, the heart sound signal to be trained in this embodiment uses an unfragmented heart sound diagram, that is, the downloaded training sample is not fragmented, but is subjected to denoising and normalization and then directly subjected to feature extraction, thereby simplifying the flow of data preprocessing.
Step S02, the processor respectively calculates the normal signal to be trained and the normal signal sample time domain characteristics and the abnormal signal sample time domain characteristics corresponding to the abnormal signal to be trained according to a preset time domain characteristic calculation formula, wherein the sample time domain characteristics comprise one or more of sample energy entropy, sample short-time energy and sample zero crossing rate;
in this embodiment, the processor extracts, according to a preset time domain feature calculation formula, time domain features of a sample signal to be trained, that is, time domain features of a normal signal sample and time domain features of an abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained. Wherein the sample time-domain features include one or more of sample energy entropy, sample short-time energy and sample zero crossing rate, that is, extracting the time-domain features of the training samples includes: calculating the energy entropy of each class training sample, calculating the short-time energy of each class training sample, and calculating the zero crossing rate of each class training sample.
Step S03, the processor respectively calculates the normal signal to be trained and the normal signal sample frequency domain characteristics and the abnormal signal sample frequency domain characteristics corresponding to the abnormal signal to be trained according to a preset frequency domain characteristic calculation formula, wherein the sample frequency domain characteristics comprise a sample cut-off frequency, a sample spectrum centroid value, a sample spectrum flux, an average value of a system after sample discrete Fourier transform and a sample linear prediction code;
in this embodiment, the processor extracts the frequency domain features of the to-be-trained sample signal according to a preset frequency domain feature calculation formula, that is, the to-be-trained normal signal and the to-be-trained abnormal signal correspond to the frequency domain features of the normal signal sample and the frequency domain features of the abnormal signal sample. Wherein, the sample frequency domain features include a sample cut-off frequency, a sample spectrum centroid value, a sample spectrum flux, an average value of a system after sample discrete fourier transform, and a sample linear prediction code, that is, taking the frequency domain features of the training samples includes: calculating the cut-off frequency of each class training sample, calculating the spectral centroid value of each class training sample, calculating the spectral flux of each class training sample, calculating the average value of the discrete Fourier transformed coefficients of each class training sample, and calculating the linear predictive coding of each class training sample.
Step S04, the processor trains the model template in the storage module according to the normal signal sample time domain feature, the normal signal sample frequency domain feature, the abnormal signal sample time domain feature, and the abnormal signal sample frequency domain feature to generate a signal classification model, and stores the signal classification model in the storage module.
In this embodiment, the processor inputs the extracted time-domain feature of the normal signal sample, the frequency-domain feature of the normal signal sample, the time-domain feature of the abnormal signal sample, and the frequency-domain feature of the abnormal signal sample into a model template to be trained for training, and iterates repeatedly until the model converges to obtain a signal classification model. And then storing the signal classification model into the storage module so as to call the signal classification model subsequently.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for classifying a heart sound signal according to a third embodiment of the present invention.
Based on the foregoing embodiment shown in fig. 3, in this embodiment, before the step S02, the method further includes:
step S05, the processor calculates a normal signal to be trained and a normal signal sample time crest factor and an abnormal signal sample time crest factor corresponding to the abnormal signal to be trained, wherein the time crest factor is the absolute value of the peak value of the time domain oscillogram of the sample signal to be trained divided by the effective value of the time domain oscillogram, and the effective value of the oscillogram is the root-mean-square of the waveform;
step S06, the processor determines invalid signals in the normal signal to be trained and the abnormal signal to be trained based on the normal signal sample time crest factor and the abnormal signal sample time crest factor, and removes the invalid signals in the normal signal to be trained and the abnormal signal to be trained.
In this embodiment, the processor calculates a time crest factor of each category of signal sample to be trained, where the time crest factor is specifically obtained by dividing an absolute value of a peak value of a time-domain waveform diagram of a training sample by an effective value of the time-domain waveform diagram, where the effective value of the waveform diagram is a root-mean-square of the waveform, and the time crest factor is used to determine whether the heart sound signal is an effective heart sound signal. Therefore, based on the normal signal sample time crest factor and the abnormal signal sample time crest factor, invalid signals in the normal signal to be trained and the abnormal signal to be trained are determined, the invalid signals in the normal signal to be trained and the abnormal signal to be trained are eliminated, and the accuracy of feature extraction is improved. And taking the time crest factor of the training sample obtained by calculation as a time domain feature corresponding to the class of training samples.
Further, the step S02 specifically includes:
the processor calculates the normal signal sample energy entropy and the abnormal signal sample energy entropy corresponding to the normal signal to be trained and the abnormal signal to be trained according to an energy entropy calculation formula, and the normal signal sample energy entropy and the abnormal signal sample energy entropy are respectively used as the normal signal sample time domain feature and the abnormal signal sample time domain feature, wherein the energy entropy calculation formula is that
Figure BDA0002206026510000111
N is the number of the discrete heart sound signal in the signal sample to be trained, x (N) is the discrete heart sound signal in the signal sample to be trained, and N is the number of the signal samples to be trained in the same category;
in this embodiment, the energy entropy of each class training sample, that is, the energy entropy of the normal signal sample and the energy entropy of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained are calculated, where the calculation formula of the energy entropy is:
Figure BDA0002206026510000112
wherein, x (N) is a discrete heart sound signal in the signal sample to be trained, and N is the number of the signal samples to be trained in the same category; specifically, the value of the energy entropy of a heart sound signal represents the degree of confusion of the heart sound signal, the entropy of the noise is higher than the entropy of the speech signal, i.e., the relationship between the value of the energy entropy and the probability that the heart sound signal is abnormal heart sound is positive, that is, the higher the energy entropy is, the higher the probability that the heart sound signal is abnormal is. And taking the energy entropy of the training sample obtained by calculation as a time domain feature corresponding to the training sample of the category, namely respectively as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample.
Further, the step S02 specifically includes:
the processor calculates the short-time energy of the normal signal sample and the short-time energy of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a short-time energy calculation formula, and the short-time energy are respectively used as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample, wherein the short-time energy calculation formula is
Figure BDA0002206026510000113
Omega (m-N) is a window function for filtering noise signals in the heart sound signals, x (N) is discrete heart sound signals in the signal samples to be trained, N is the number of the discrete heart sound signals in the signal samples to be trained, m is the number of the noise signals in the signal samples to be trained, and N is the number of the signal samples to be trained in the same categoryThe number of the cells;
in this embodiment, the short-time energy of each class training sample, that is, the short-time energy of the normal signal sample and the short-time energy of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained are calculated, and the calculation formula of the short-time energy is as follows:omega (m-N) is a window function for filtering noise signals in the heart sound signals, x (N) is discrete heart sound signals in the signal samples to be trained, and N is the number of the signal samples to be trained in the same category. Omega (m-n) is used for filtering noise in the heart sound signal; the short-time energy of the noise is obviously higher than that of the unvoiced sound, and the relationship between the value of the short-time energy and the probability that the heart sound signal is abnormal heart sound is in positive correlation, namely, the higher the value of the short-time energy is, the higher the probability that the heart sound signal is abnormal is. And taking the short-time energy of the training sample obtained by calculation as a time domain feature corresponding to the class of training sample, namely respectively as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample.
Further, the step S02 specifically includes:
the processor calculates the zero crossing rate of the normal signal sample and the zero crossing rate of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a zero crossing rate calculation formula, and the zero crossing rate calculation formula is that the zero crossing rate of the normal signal sample and the zero crossing rate of the abnormal signal sample are respectively used as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample, wherein the zero crossing rate calculation formula
Figure BDA0002206026510000122
x (N) is a discrete heart sound signal in the signal sample to be trained, N is the number of the signal samples to be trained of the same category, N is the number of the discrete heart sound signal in the signal sample to be trained, sgn (x (N)) is a sign function corresponding to the discrete heart sound signal and used for determining the frequency band value of the discrete heart sound signal, wherein,
Figure BDA0002206026510000123
this implementationIn the example, the zero crossing rate of each class training sample is calculated, that is, the zero crossing rate of the normal signal sample and the zero crossing rate of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained, and the zero crossing rate calculation formula is
Figure BDA0002206026510000124
x (N) is the discrete heart sound signal in the signal sample to be trained, and N is the number of the signal samples to be trained in the same category. The zero crossing rate measures the frequency of the heart sound signal changing from positive to negative, the relationship between the value of the zero crossing rate and the probability that the heart sound signal is abnormal heart sound is in negative correlation, namely, the smaller the value of the zero crossing rate is, the higher the probability that the heart sound signal is abnormal heart sound signal is, the zero crossing rate of the training sample obtained by calculation is used as a time domain feature corresponding to the training sample of the category, namely, the zero crossing rate is respectively used as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample.
Further, the step S03 specifically includes:
the processor calculates a spectrum centroid value of a normal signal sample and a spectrum centroid value of an abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a spectrum centroid value calculation formula, and the spectrum centroid values are respectively used as a frequency domain feature of the normal signal sample and a frequency domain feature of the abnormal signal sample, wherein the spectrum centroid value formula is
Figure BDA0002206026510000131
x (n) is a discrete heart sound signal in the signal sample to be trained, f (x (n)) is a frequency spectrum function of x (n), and n is the number of the discrete heart sound signal in the signal sample to be trained;
the processor calculates the spectral flux of a normal signal sample and the spectral flux of an abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a spectral flux calculation formula, and the spectral fluxes are respectively used as the frequency domain characteristic of the normal signal sample and the frequency domain characteristic of the abnormal signal sample, wherein the spectral centroid value formula is
Figure BDA0002206026510000132
The processor calculates the average value of normal signal samples and the average value of abnormal signal samples corresponding to the normal signal to be trained and the abnormal signal to be trained according to an average value calculation formula of coefficients after discrete Fourier transform, and the average values are respectively used as the frequency domain characteristics of the normal signal samples and the frequency domain characteristics of the abnormal signal samples, wherein the formula of the spectrum centroid value is
Figure BDA0002206026510000133
Wherein, ω ═ 1, 2.., k, k is the discrete sampling number of the discrete heart sound signal in the signal sample to be trained;
the processor calculates the average value of normal signal samples and the average value of abnormal signal samples corresponding to the normal signal to be trained and the abnormal signal to be trained according to an average value calculation formula of coefficients after discrete Fourier transform, and the average values are respectively used as the frequency domain characteristics of the normal signal samples and the frequency domain characteristics of the abnormal signal samples, wherein the formula of the spectrum centroid value is
Figure BDA0002206026510000134
Wherein s (n) is a sampling value of the original heart sound signal at the time of n, e (n) is a prediction error, p is the number of prediction coefficients, the value range of p is between 10 and 15, akLinear predictive coding of the samples to be trained that need to be computed.
In this embodiment, due to the non-stationary and time-varying properties of the heart sound signal, the frequency domain features of the training samples are further extracted in the feature extraction process of this embodiment to improve the classification accuracy of the classification model, wherein the extracting of the frequency domain features of the training samples includes:
1) the processor calculates the spectrum centroid value of each class of training sample, namely the spectrum centroid value of the normal signal sample and the spectrum centroid value of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained, and the spectrum centroid values are respectively used as the frequency domain feature of the normal signal sample and the frequency domain feature of the abnormal signal sample. Wherein the formula of the mass center value of the spectrum is
Figure BDA0002206026510000141
x (n) is the discrete heart sound signal in the signal sample to be trained, and f (x (n)) is the spectrum function of x (n). Specifically, the spectrum centroid represents the center of the spectrum of the heart sound signal, the spectrum centroid value quantifies the brightness of the heart sound signal, and the relationship between the spectrum centroid value and the probability that the heart sound signal is an abnormal heart sound is in positive correlation, that is, the smaller the spectrum centroid value is, the more spectral energy in the heart sound signal is represented to be concentrated in a low frequency range, and the lower the probability that the heart sound signal is an abnormal heart sound signal is.
2) The processor calculates the spectral flux of each class of training samples, namely the spectral flux of the normal signal sample and the spectral flux of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained, wherein the calculation formula of the spectral flux is
Figure BDA0002206026510000142
Specifically, the spectral flux is determined by the change of the power spectrum of the heart sound signal, the power spectrum change of the heart sound signal is calculated by comparing the power spectrums of the current frame and the previous frame, the spectral flux describes the change situation of the frequency spectrums of the adjacent frames, the relationship between the value of the spectral flux and the probability that the heart sound signal is an abnormal heart sound is in positive correlation, that is, the smaller the value of the spectral flux is, the lower the probability that the heart sound signal is an abnormal heart sound signal is, and the spectral flux of each category of training samples is calculated to be respectively used as the frequency domain feature of the normal signal sample and the frequency domain feature of the abnormal signal sample.
3) The processor calculates the average value of the coefficient after discrete Fourier transform of each class of training sample, namely the average value of the normal signal sample and the average value of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained, wherein the average value calculation formula of the coefficient after discrete Fourier transform is as follows
Figure BDA0002206026510000143
Wherein, ω ═ 1, 2.., k, k is the discrete sampling number of the discrete heart sound signal in the signal sample to be trained; normal heart sound signal and abnormal heart sound signalAnd calculating the average value of the coefficient after the discrete Fourier transform of each class of training sample as the frequency domain characteristic of the normal signal sample and the frequency domain characteristic of the abnormal signal sample respectively.
4) The processor calculates the linear predictive coding of each category of training samples, namely the linear predictive coding of the normal signal samples and the linear predictive coding of the abnormal signal samples corresponding to the normal signal to be trained and the abnormal signal to be trained, wherein the linear predictive coding calculation formula is
Figure BDA0002206026510000144
Wherein s (n) is a sampling value of the original heart sound signal at the time of n, e (n) is a prediction error, p is the number of prediction coefficients, the value range of p is between 10 and 15, akLinear predictive coding of the samples to be trained that need to be computed. And taking the linear predictive coding of the training sample obtained by calculation as a frequency domain characteristic corresponding to the training sample of the category, namely respectively as the frequency domain characteristic of the normal signal sample and the frequency domain characteristic of the abnormal signal sample.
In a specific embodiment, extracting the frequency domain features of the training samples further includes:
5) the processor calculates the cut-off frequency of each class training sample, and the calculation formula of the cut-off frequency is as follows:
Figure BDA0002206026510000151
the heart sound signal higher than the cut-off frequency is an abnormal heart sound signal, the heart sound signal lower than the cut-off frequency is a normal heart sound signal, and the cut-off frequency of the training sample obtained through calculation is used as a frequency domain characteristic corresponding to the class of training samples.
Therefore, based on the feature extraction method, feature extraction is performed on training sample data to obtain a plurality of time domain features and frequency domain features.
In addition, the embodiment of the invention also provides a device for classifying the heart sound signals.
Referring to fig. 5, fig. 5 is a functional block diagram of a first embodiment of the apparatus for classifying a heart sound signal according to the present invention.
In this embodiment, the apparatus for classifying a heart sound signal includes:
the classification model determining module 10 is configured to, when the processor receives a heart sound signal to be classified sent by a user, store the heart sound signal to be classified in the cache module, and determine a preset signal classification model corresponding to the heart sound signal to be classified in the storage module;
a signal feature extraction module 20, configured to obtain, by the processor, signal features of an abnormal standard signal and signal features of a normal standard signal in the signal classification model, and obtain signal features of the heart sound signal to be classified, where the signal features include a time domain feature and a frequency domain feature;
the heart sound signal classification module 30 is configured to compare the signal characteristics of the to-be-classified heart sound signals with the signal characteristics of the abnormal standard signals and the signal characteristics of the normal standard signals, to determine that the to-be-classified heart sound signals are the abnormal heart sound signals or the normal heart sound signals, and send the classification categories of the to-be-classified heart sound signals to the user side.
Further, the apparatus for classifying a heart sound signal further includes:
a training sample obtaining module, configured to obtain, by the processor, a to-be-trained signal sample in the storage module, where the to-be-trained signal sample includes a to-be-trained normal signal sample and a to-be-trained abnormal signal sample;
the time domain feature extraction module is used for the processor to respectively calculate the normal signal to be trained and the normal signal sample time domain feature and the abnormal signal sample time domain feature corresponding to the abnormal signal to be trained according to a preset time domain feature calculation formula, wherein the sample time domain feature comprises one or more of sample energy entropy, sample short-time energy and sample zero crossing rate;
the frequency domain characteristic extraction module is used for the processor to respectively calculate the normal signal to be trained and the normal signal sample frequency domain characteristic and the abnormal signal sample frequency domain characteristic corresponding to the abnormal signal to be trained according to a preset frequency domain characteristic calculation formula, wherein the sample frequency domain characteristic comprises a sample cut-off frequency, a sample spectrum centroid value, a sample spectrum flux, an average value of a system after sample discrete Fourier transform and a sample linear prediction code;
and the distribution model generation module is used for training the model template in the storage module by the processor according to the normal signal sample time domain characteristics, the normal signal sample frequency domain characteristics, the abnormal signal sample time domain characteristics and the abnormal signal sample frequency domain characteristics to generate a signal classification model, and storing the signal classification model in the storage module.
Further, the time domain feature extraction module is further configured to:
the processor calculates the normal signal sample energy entropy and the abnormal signal sample energy entropy corresponding to the normal signal to be trained and the abnormal signal to be trained according to an energy entropy calculation formula, and the normal signal sample energy entropy and the abnormal signal sample energy entropy are respectively used as the normal signal sample time domain feature and the abnormal signal sample time domain feature, wherein the energy entropy calculation formula is that
Figure BDA0002206026510000161
x (N) is the discrete heart sound signal in the signal sample to be trained, and N is the number of the signal samples to be trained in the same category.
Further, the time domain feature extraction module is further configured to:
the processor calculates the short-time energy of the normal signal sample and the short-time energy of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a short-time energy calculation formula, and the short-time energy are respectively used as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample, wherein the short-time energy calculation formula is
Figure BDA0002206026510000162
ω (m) is a window function for filtering noise in the heart sound signal, x (N) is a discrete heart sound signal in the signal samples to be trained, and N is the number of signal samples to be trained of the same category.
Further, the time domain feature extraction module is further configured to:
the processor calculates the zero crossing rate of the normal signal sample and the zero crossing rate of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a zero crossing rate calculation formula, and the zero crossing rate calculation formula is that the zero crossing rate of the normal signal sample and the zero crossing rate of the abnormal signal sample are respectively used as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample, wherein the zero crossing rate calculation formula
Figure BDA0002206026510000163
x (N) is the discrete heart sound signal in the signal sample to be trained, and N is the number of the signal samples to be trained in the same category.
Further, the frequency domain feature extraction module is further configured to:
the processor calculates a spectrum centroid value of a normal signal sample and a spectrum centroid value of an abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a spectrum centroid value calculation formula, and the spectrum centroid values are respectively used as a frequency domain feature of the normal signal sample and a frequency domain feature of the abnormal signal sample, wherein the spectrum centroid value formula is
Figure BDA0002206026510000171
x (n) is a discrete heart sound signal in the signal sample to be trained, and f (x (n)) is a spectrum function of x (n);
the processor calculates the spectral flux of a normal signal sample and the spectral flux of an abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a spectral flux calculation formula, and the spectral fluxes are respectively used as the frequency domain characteristic of the normal signal sample and the frequency domain characteristic of the abnormal signal sample, wherein the spectral centroid value formula is
The processor calculates the average value of normal signal samples and the average value of abnormal signal samples corresponding to the normal signal to be trained and the abnormal signal to be trained according to the average value calculation formula of the coefficient after discrete Fourier transform, and the average values are respectively used as the average value of the normal signal samples and the average value of the abnormal signal samplesThe frequency domain characteristics of the normal signal sample and the frequency domain characteristics of the abnormal signal sample are obtained, wherein the spectral centroid value formula is
Figure BDA0002206026510000173
Wherein, ω ═ 1, 2.., k, k is the discrete sampling number of the discrete heart sound signal in the signal sample to be trained;
the processor calculates the average value of normal signal samples and the average value of abnormal signal samples corresponding to the normal signal to be trained and the abnormal signal to be trained according to an average value calculation formula of coefficients after discrete Fourier transform, and the average values are respectively used as the frequency domain characteristics of the normal signal samples and the frequency domain characteristics of the abnormal signal samples, wherein the formula of the spectrum centroid value isWherein s (n) is a sampling value of the original heart sound signal at the time of n, e (n) is a prediction error, p is the number of prediction coefficients, the value range of p is between 10 and 15, akLinear predictive coding of the samples to be trained that need to be computed.
The processor calculates the cut-off frequency of each class training sample, and the calculation formula of the cut-off frequency is as follows:
Figure BDA0002206026510000175
the heart sound signal higher than the cut-off frequency is an abnormal heart sound signal, the heart sound signal lower than the cut-off frequency is a normal heart sound signal, and the cut-off frequency of the training sample obtained through calculation is used as a frequency domain characteristic corresponding to the class of training samples.
Further, the apparatus for classifying a heart sound signal further includes:
the time crest factor calculation module is used for calculating a normal signal to be trained and a normal signal sample time crest factor and an abnormal signal sample time crest factor corresponding to an abnormal signal to be trained by the processor, wherein the time crest factor is the absolute value of the peak value of a time domain oscillogram of the sample signal to be trained divided by the effective value of the time domain oscillogram, and the effective value of the oscillogram is the root mean square of the waveform;
and the invalid signal removing module is used for determining invalid signals in the normal signals to be trained and the abnormal signals to be trained by the processor based on the normal signal sample time crest factor and the abnormal signal sample time crest factor, and removing the invalid signals in the normal signals to be trained and the abnormal signals to be trained.
Each module in the apparatus for classifying a heart sound signal corresponds to each step in the embodiment of the method for classifying a heart sound signal, and the functions and implementation processes thereof are not described in detail herein.
In addition, the embodiment of the invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores a classification program of a heart sound signal, wherein the classification program of the heart sound signal is executed by a processor to realize the steps of the classification method of the heart sound signal.
The method for implementing the classification procedure of the heart sound signal may refer to various embodiments of the classification method of the heart sound signal of the present invention, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for classifying a heart sound signal is applied to a system for classifying a heart sound signal, the system for classifying a heart sound signal comprises a storage module, a buffer module and a processor, and the method for classifying a heart sound signal comprises the following steps:
when receiving a heart sound signal to be classified sent by a user side, the processor stores the heart sound signal to be classified into the cache module, and determines a preset signal classification model corresponding to the heart sound signal to be classified in the storage module;
the processor acquires the signal characteristics of an abnormal standard signal and the signal characteristics of a normal standard signal in the signal classification model, and acquires the signal characteristics of the heart sound signal to be classified, wherein the signal characteristics comprise time domain characteristics and frequency domain characteristics;
the processor compares the signal characteristics of the heart sound signals to be classified with the signal characteristics of the abnormal standard signals and the signal characteristics of the normal standard signals respectively to determine that the heart sound signals to be classified are abnormal heart sound signals or normal heart sound signals, and sends the classification categories of the heart sound signals to be classified to the user side.
2. The method for classifying a heart sound signal according to claim 1, wherein the processor stores the heart sound signal to be classified in the buffer module when receiving the heart sound signal to be classified sent by the user side, and before the step of determining the preset signal classification model corresponding to the heart sound signal to be classified in the storage module, the method further comprises:
the processor acquires a signal sample to be trained in the storage module, wherein the signal sample to be trained comprises a normal signal sample to be trained and an abnormal signal sample to be trained;
the processor respectively calculates the normal signal to be trained and the normal signal sample time domain characteristics and the abnormal signal sample time domain characteristics corresponding to the abnormal signal to be trained according to a preset time domain characteristic calculation formula, wherein the sample time domain characteristics comprise one or more of sample energy entropy, sample short-time energy and sample zero crossing rate;
the processor respectively calculates normal signal sample frequency domain characteristics and abnormal signal sample frequency domain characteristics corresponding to the normal signal to be trained and the abnormal signal to be trained according to a preset frequency domain characteristic calculation formula, wherein the sample frequency domain characteristics comprise sample cut-off frequency, a sample spectrum centroid value, sample spectrum flux, an average value of a system after sample discrete Fourier transform and sample linear prediction coding;
and the processor trains the model template in the storage module according to the normal signal sample time domain characteristic, the normal signal sample frequency domain characteristic, the abnormal signal sample time domain characteristic and the abnormal signal sample frequency domain characteristic to generate a signal classification model, and stores the signal classification model in the storage module.
3. The method for classifying a heart sound signal according to claim 2, wherein the step of calculating the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained respectively by the processor according to a preset time domain feature calculation formula specifically comprises:
the processor calculates the normal signal sample energy entropy and the abnormal signal sample energy entropy corresponding to the normal signal to be trained and the abnormal signal to be trained according to an energy entropy calculation formula, and the normal signal sample energy entropy and the abnormal signal sample energy entropy are respectively used as the normal signal sample time domain feature and the abnormal signal sample time domain feature, wherein the energy entropy calculation formula is that
Figure FDA0002206026500000021
N is the number of the discrete heart sound signal in the signal sample to be trained, x (N) is the discrete heart sound signal in the signal sample to be trained, and N is the number of the signal samples to be trained in the same category.
4. The method for classifying a heart sound signal according to claim 2, wherein the step of calculating the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained respectively by the processor according to a preset time domain feature calculation formula further comprises:
the processor calculates the short-time energy of the normal signal sample and the short-time energy of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a short-time energy calculation formula, and the short-time energy are respectively used as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample, wherein the short-time energy calculation formula is
Figure FDA0002206026500000022
Omega (m-N) is a window function for filtering noise signals in the heart sound signals, x (N) is discrete heart sound signals in the signal samples to be trained, N is the number of the discrete heart sound signals in the signal samples to be trained, m is the number of the noise signals in the signal samples to be trained, and N is the number of the signal samples to be trained in the same category.
5. The method for classifying a heart sound signal according to claim 2, wherein the step of calculating the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained respectively by the processor according to a preset time domain feature calculation formula further comprises:
the processor calculates the zero crossing rate of the normal signal sample and the zero crossing rate of the abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a zero crossing rate calculation formula, and the zero crossing rate calculation formula is that the zero crossing rate of the normal signal sample and the zero crossing rate of the abnormal signal sample are respectively used as the time domain feature of the normal signal sample and the time domain feature of the abnormal signal sample, wherein the zero crossing rate calculation formula
Figure FDA0002206026500000031
x (N) is a discrete heart sound signal in the signal sample to be trained, N is the number of the signal samples to be trained of the same category, N is the number of the discrete heart sound signal in the signal sample to be trained, sgn (x (N)) is a sign function corresponding to the discrete heart sound signal and used for determining the frequency band value of the discrete heart sound signal, wherein,
Figure FDA0002206026500000032
6. the method for classifying a heart sound signal according to claim 2, wherein the processor calculates the normal signal sample frequency domain feature and the abnormal signal sample frequency domain feature corresponding to the normal signal to be trained and the abnormal signal to be trained respectively according to a preset frequency domain feature calculation formula, wherein the step of calculating the sample frequency domain features includes the steps of sample cutoff frequency, sample spectrum centroid value, sample spectrum flux, average value of the system after sample discrete fourier transform and sample linear predictive coding specifically includes:
the processor calculates a spectrum centroid value of a normal signal sample and a spectrum centroid value of an abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a spectrum centroid value calculation formula, and the spectrum centroid values are respectively used as a frequency domain feature of the normal signal sample and a frequency domain feature of the abnormal signal sample, wherein the spectrum centroid value calculation formula is
Figure FDA0002206026500000033
x (n) is a discrete heart sound signal in the signal sample to be trained, f (x (n)) is a frequency spectrum function of x (n), and n is the number of the discrete heart sound signal in the signal sample to be trained;
the processor calculates the spectral flux of a normal signal sample and the spectral flux of an abnormal signal sample corresponding to the normal signal to be trained and the abnormal signal to be trained according to a spectral flux calculation formula, and the spectral fluxes are respectively used as the frequency domain characteristic of the normal signal sample and the frequency domain characteristic of the abnormal signal sample, wherein the spectral centroid value formula is
The processor calculates the average value of normal signal samples and the average value of abnormal signal samples corresponding to the normal signal to be trained and the abnormal signal to be trained according to an average value calculation formula of coefficients after discrete Fourier transform, and the average values are respectively used as the frequency domain characteristics of the normal signal samples and the frequency domain characteristics of the abnormal signal samples, wherein the spectral flux calculation formula is
Figure FDA0002206026500000041
Wherein, ω ═ 1, 2.., k, k is the discrete sampling number of the discrete heart sound signal in the signal sample to be trained;
the processor calculates the average value of normal signal samples and the average value of abnormal signal samples corresponding to the normal signal to be trained and the abnormal signal to be trained according to an average value calculation formula of coefficients after discrete Fourier transform, and the average values are respectively used as the frequency domain characteristics of the normal signal samples and the frequency domain characteristics of the abnormal signal samples, wherein the sample average value calculation formula is
Figure FDA0002206026500000042
Wherein s (n) is a sampling value of the original heart sound signal at the time of n, e (n) is a prediction error, p is the number of prediction coefficients, and the value range of p is 10-15A iskLinear predictive coding of the samples to be trained that need to be computed.
7. The method for classifying a heart sound signal according to any one of claims 2 to 5, wherein the processor respectively calculates the normal signal sample time domain feature and the abnormal signal sample time domain feature corresponding to the normal signal to be trained and the abnormal signal to be trained according to a preset time domain feature calculation formula, wherein before the step of one or more of sample energy entropy, sample short-time energy and sample zero crossing rate, the method further comprises:
the processor calculates a normal signal to be trained, and a normal signal sample time crest factor and an abnormal signal sample time crest factor corresponding to the abnormal signal to be trained, wherein the time crest factor is the absolute value of the peak value of a time domain oscillogram of the sample signal to be trained divided by the effective value of the time domain oscillogram, and the effective value of the oscillogram is the root-mean-square of the waveform;
and the processor determines invalid signals in the normal signal to be trained and the abnormal signal to be trained based on the normal signal sample time crest factor and the abnormal signal sample time crest factor, and eliminates the invalid signals in the normal signal to be trained and the abnormal signal to be trained.
8. A classification apparatus for a heart sound signal, characterized by comprising:
the classification model determining module is used for storing the heart sound signals to be classified into the cache module when the processor receives the heart sound signals to be classified sent by the user side, and determining a preset signal classification model corresponding to the heart sound signals to be classified in the storage module;
the signal feature extraction module is used for the processor to obtain the signal features of the abnormal standard signals and the normal standard signals in the signal classification model and obtain the signal features of the heart sound signals to be classified, wherein the signal features comprise time domain features and frequency domain features;
and the heart sound signal classification module is used for comparing the signal characteristics of the heart sound signals to be classified with the signal characteristics of the abnormal standard signals and the signal characteristics of the normal standard signals by the processor respectively so as to determine that the heart sound signals to be classified are the abnormal heart sound signals or the normal heart sound signals, and the classification categories of the heart sound signals to be classified are sent to the user side.
9. A device for classifying a heart sound signal, comprising a processor, a memory, and a program for classifying a heart sound signal stored on the memory and executable by the processor, wherein the program for classifying a heart sound signal when executed by the processor implements the steps of the method for classifying a heart sound signal according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a classification program of a heart sound signal is stored, wherein the classification program of a heart sound signal, when executed by a processor, implements the steps of the method of classifying a heart sound signal according to any one of claims 1 to 7.
CN201910881574.7A 2019-09-18 2019-09-18 Method, device, equipment and storage medium for classifying heart sound signals Active CN110795996B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910881574.7A CN110795996B (en) 2019-09-18 2019-09-18 Method, device, equipment and storage medium for classifying heart sound signals
PCT/CN2019/117590 WO2021051559A1 (en) 2019-09-18 2019-11-12 Categorizing method for heart sound signal, device, equipment, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910881574.7A CN110795996B (en) 2019-09-18 2019-09-18 Method, device, equipment and storage medium for classifying heart sound signals

Publications (2)

Publication Number Publication Date
CN110795996A true CN110795996A (en) 2020-02-14
CN110795996B CN110795996B (en) 2024-03-12

Family

ID=69427270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910881574.7A Active CN110795996B (en) 2019-09-18 2019-09-18 Method, device, equipment and storage medium for classifying heart sound signals

Country Status (2)

Country Link
CN (1) CN110795996B (en)
WO (1) WO2021051559A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582020A (en) * 2020-03-25 2020-08-25 平安科技(深圳)有限公司 Signal processing method, signal processing device, computer equipment and storage medium
CN116364117A (en) * 2023-03-23 2023-06-30 南京市浦口医院 Low-frequency electronic auscultation system based on sound vibration microphone

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020043997A (en) * 2000-12-05 2002-06-14 윤종용 Heart sound classification method by principal components analysis
CN1850007A (en) * 2006-05-16 2006-10-25 清华大学深圳研究生院 Heart disease automatic classification system based on heart sound analysis and heart sound segmentation method
CN101930734A (en) * 2010-07-29 2010-12-29 重庆大学 Classification and identification method and device for cardiechema signals
CN107811649A (en) * 2017-12-13 2018-03-20 四川大学 A kind of more sorting techniques of heart sound based on depth convolutional neural networks
CN109961017A (en) * 2019-02-26 2019-07-02 杭州电子科技大学 A kind of cardiechema signals classification method based on convolution loop neural network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2608714A4 (en) * 2010-08-25 2017-03-08 Diacoustic Medical Devices (Pty) Ltd A system and method for classifying a heart sound
CN110123367B (en) * 2019-04-04 2022-11-15 平安科技(深圳)有限公司 Computer device, heart sound recognition method, model training device, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020043997A (en) * 2000-12-05 2002-06-14 윤종용 Heart sound classification method by principal components analysis
CN1850007A (en) * 2006-05-16 2006-10-25 清华大学深圳研究生院 Heart disease automatic classification system based on heart sound analysis and heart sound segmentation method
CN101930734A (en) * 2010-07-29 2010-12-29 重庆大学 Classification and identification method and device for cardiechema signals
CN107811649A (en) * 2017-12-13 2018-03-20 四川大学 A kind of more sorting techniques of heart sound based on depth convolutional neural networks
CN109961017A (en) * 2019-02-26 2019-07-02 杭州电子科技大学 A kind of cardiechema signals classification method based on convolution loop neural network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582020A (en) * 2020-03-25 2020-08-25 平安科技(深圳)有限公司 Signal processing method, signal processing device, computer equipment and storage medium
CN116364117A (en) * 2023-03-23 2023-06-30 南京市浦口医院 Low-frequency electronic auscultation system based on sound vibration microphone

Also Published As

Publication number Publication date
WO2021051559A1 (en) 2021-03-25
CN110795996B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
US9058816B2 (en) Emotional and/or psychiatric state detection
EP3839942A1 (en) Quality inspection method, apparatus, device and computer storage medium for insurance recording
JP4177755B2 (en) Utterance feature extraction system
US8655656B2 (en) Method and system for assessing intelligibility of speech represented by a speech signal
WO2020073518A1 (en) Voiceprint verification method and apparatus, computer device, and storage medium
JP2007156422A (en) Living body recognition method, living body recognition system and program
JP6371516B2 (en) Acoustic signal processing apparatus and method
CN109256138A (en) Auth method, terminal device and computer readable storage medium
CN111902862A (en) Ear voice processing method and device
CN110795996B (en) Method, device, equipment and storage medium for classifying heart sound signals
CN113327626A (en) Voice noise reduction method, device, equipment and storage medium
CN111968651A (en) WT (WT) -based voiceprint recognition method and system
JP5803125B2 (en) Suppression state detection device and program by voice
CN110931019B (en) Public security voice data acquisition method, device, equipment and computer storage medium
Singh et al. Novel feature extraction algorithm using DWT and temporal statistical techniques for word dependent speaker’s recognition
CN111640450A (en) Multi-person audio processing method, device, equipment and readable storage medium
Nirjon et al. sMFCC: exploiting sparseness in speech for fast acoustic feature extraction on mobile devices--a feasibility study
JP2010102129A (en) Fundamental frequency extracting method, fundamental frequency extracting device, and program
JP2019035935A (en) Voice recognition apparatus
CN110767238B (en) Blacklist identification method, device, equipment and storage medium based on address information
JP7184236B2 (en) Voiceprint Recognition Method, Apparatus, Equipment, and Storage Medium
CN113077794A (en) Human voice recognition system
JP7279287B2 (en) Emotion estimation device and emotion estimation system
JP2019045527A (en) Voice processing program, voice processing method and voice processing device
CN115862636B (en) Internet man-machine verification method based on voice recognition technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40020232

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant