Method for obtaining heart sound training sample and electronic device

CN122949865APending Publication Date: 2026-10-20SHANGHAI UNITED IMAGING RES INST OF INTELLIGENT IMAGING +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611256865.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2026-10-20

AI Technical Summary

Benefits of technology

[0012]本申请实施例与现有技术相比存在的有益效果是:通过将心音训练样本分别输入目标网络和第一子网络中,可以获取目标网络输出的第一心音特征以及第一子网络输出的第二心音特征。其中,目标网络为心音识别网络提供了辅助捕捉心音特征的特征表示,心音的周期特征是心音信号的重要特征,反映了心脏活动的节律性,能够辅助模型对心音信号进行识别和分析。基于此,基于第一心音特征和第二心音特征更新第一子网络中的当前模型参数,能够对第一子网络进行微调。此时,微调后的第一子网络能够更好地适应特殊心音的特征,提高其对新的心音特征的提取能力。进而,在第一子网络提取特征能力被提升的基础上,第二子网络基于高质量的心音特征进行心音类别预测,能够提高对心音信号识别分类的准确率。并且,基于上述方式对第一子网络的当前模型参数进行更新时,第一子网络能够自动从输入的心音训练样本中挖掘出有价值的特征信息,并通过与目标网络输出的第一心音特征进行对比学习,能够自适应地调整自身的参数。进而,可以无需人工对心音训练样进行标注,减少人力成本和时间成本。以及,仅对第一子网络的当前模型参数进行更新(不对第二子网络的模型参数进行更新),还可以提高第一子网络的更新效率,减少模型更新时的计算量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application applies to the field of heart sound processing, providing a training method, apparatus, and electronic device for a heart sound recognition network. The method includes: inputting heart sound training samples into a target network and a first sub-network of the heart sound recognition network, respectively, to obtain a first heart sound feature output by the target network and a second heart sound feature output by the first sub-network; the target network is used to provide a feature representation to assist the heart sound recognition network in capturing heart sound features; the heart sound recognition network is a trained network model; the heart sound recognition network includes a first sub-network and a second sub-network for predicting heart sound categories based on the second heart sound feature; updating the current model parameters in the first sub-network based on the first and second heart sound features to obtain the target heart sound recognition network. Using this method, the ability of the target heart sound recognition network to extract new heart sound features can be improved, thereby improving the accuracy of heart sound signal recognition and classification.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of patent application No. 202510811425.9 filed with the Chinese Patent Office on June 17, 2025, entitled “Training Method, Apparatus and Electronic Equipment for Heart Sound Recognition Network”. Technical Field

[0002] This application belongs to the field of heart sound processing technology, and particularly relates to a training method, apparatus and electronic device for a heart sound recognition network. Background Technology

[0003] Heart sounds contain a wealth of physiological and pathological information about the heart, and their accurate identification and analysis are of great significance in the diagnosis of cardiovascular diseases and other fields.

[0004] Currently, heart sound signals are mainly identified and analyzed using neural network models. Training these neural network models relies on manually labeled heart sound training samples.

[0005] However, manually labeling training samples requires significant manpower and time. Furthermore, neural network models are primarily trained on fixed, limited labeled datasets. Once training is complete, the model's parameters are largely fixed, making it difficult to adaptively adjust to new, unlabeled individual heart sound data. Consequently, when faced with new heart sound features, it becomes challenging to accurately identify and analyze heart sound signals. Summary of the Invention

[0006] This application provides a training method, apparatus, and electronic device for a heart sound recognition network, which can accurately identify and analyze heart sound signals when faced with new heart sound features.

[0007] In a first aspect, embodiments of this application provide a method for training a heart sound recognition network, the method comprising: Heart sound training samples are input into the first sub-network of the target network and the heart sound recognition network, respectively, to obtain the first heart sound feature output by the target network and the second heart sound feature output by the first sub-network; the target network is used to provide a feature representation to assist the heart sound recognition network in capturing heart sound features; the heart sound recognition network is a trained network model; the heart sound recognition network includes the first sub-network and the second sub-network for predicting heart sound categories based on the second heart sound feature; The target heart sound recognition network is obtained by updating the current model parameters in the first sub-network based on the first and second heart sound features.

[0008] Secondly, embodiments of this application provide a training apparatus for a heart sound recognition network, the apparatus comprising: The input module is used to input heart sound training samples into the first sub-network of the target network and the heart sound recognition network, respectively, to obtain the first heart sound feature output by the target network and the second heart sound feature output by the first sub-network; the target network is used to provide a feature representation to assist the heart sound recognition network in capturing heart sound features; the heart sound recognition network is a trained network model; the heart sound recognition network includes the first sub-network and the second sub-network for predicting heart sound categories based on the second heart sound feature; The update module is used to update the current model parameters in the first sub-network based on the first heart sound features and the second heart sound features, so as to obtain the target heart sound recognition network.

[0009] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0010] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect above.

[0011] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute the method described in the first aspect.

[0012] The beneficial effects of this application embodiment compared to the prior art are as follows: By inputting heart sound training samples into the target network and the first sub-network respectively, the first heart sound feature output by the target network and the second heart sound feature output by the first sub-network can be obtained. The target network provides a feature representation to assist the heart sound recognition network in capturing heart sound features. The periodicity of heart sounds is an important feature of heart sound signals, reflecting the rhythmicity of heart activity and assisting the model in recognizing and analyzing heart sound signals. Based on this, updating the current model parameters in the first sub-network based on the first and second heart sound features allows for fine-tuning of the first sub-network. At this point, the fine-tuned first sub-network can better adapt to the features of specific heart sounds, improving its ability to extract new heart sound features. Furthermore, with the improved feature extraction ability of the first sub-network, the second sub-network predicts heart sound categories based on high-quality heart sound features, thereby improving the accuracy of heart sound signal recognition and classification. Furthermore, when updating the current model parameters of the first sub-network using the above method, the first sub-network can automatically extract valuable feature information from the input heart sound training samples and adaptively adjust its parameters by comparing and learning with the first heart sound features output by the target network. This eliminates the need for manual annotation of the heart sound training samples, reducing labor and time costs. Moreover, updating only the current model parameters of the first sub-network (without updating the model parameters of the second sub-network) improves the update efficiency of the first sub-network and reduces the computational load during model updates. Attached Figure Description

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

[0014] Figure 1 This is a flowchart illustrating the implementation of a training method for a heart sound recognition network according to an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a target network and a heart sound recognition network provided in an embodiment of this application; Figure 3 This is a schematic diagram illustrating one implementation method for obtaining heart sound training samples in a training method for a heart sound recognition network provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating one implementation of determining the target energy envelope in a training method for a heart sound recognition network provided in an embodiment of this application; Figure 5This is a schematic diagram illustrating one implementation of determining the heart sound cycle in a training method for a heart sound recognition network provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a training device for a heart sound recognition network provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0015] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0016] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0017] It should be noted that the information collection process (such as patient information collection process, physiological information collection process, etc.) / feature extraction process involved in this application is carried out with the user's knowledge and permission. That is, the information collection process / feature extraction process complies with the requirements of laws and regulations and does not constitute an act that harms the public interest.

[0018] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0019] Heart sounds contain a wealth of physiological and pathological information about the heart, and their accurate identification and analysis are of great significance in the diagnosis of cardiovascular diseases and other fields.

[0020] For example, heart sound signals have a crucial potential role in the field of cardiac and great vessel functional imaging in magnetic resonance imaging (MRI). Currently, to ensure MRI image quality and reduce motion artifacts, gating techniques are typically relied upon to synchronize the acquisition process with the cardiac cycle.

[0021] However, commonly used ECG gating and pulse gating each have their shortcomings. Specifically, ECG gating is susceptible to magnetohydrodynamic interference in high magnetic field environments, causing ECG signal distortion and affecting the accuracy of gating triggering. Pulse gating, on the other hand, is unreliable due to significant individual differences in the time delay between the pulse wave signal and cardiac mechanical motion, as well as the poor quality of pulse signals from patients with poor peripheral circulation. Currently, because heart sound signals contain rich information about cardiac activity, reflecting cardiac contraction, relaxation, and valve opening and closing, it can be considered that heart sound signals can be used for the aforementioned gating techniques.

[0022] To accurately identify and analyze the collected heart sound signals, neural network models are currently the primary method used. Training these neural network models relies on manually labeled heart sound training samples.

[0023] However, manually labeling training samples requires significant manpower and time. Furthermore, neural network models are primarily trained on fixed, limited labeled datasets. Once training is complete, the model's parameters are largely fixed, making it difficult to adaptively adjust to new, unlabeled individual heart sound data. Consequently, when faced with new heart sound features, it becomes challenging to accurately identify and analyze heart sound signals.

[0024] Based on this, in order to improve the accuracy of heart sound signal recognition and analysis, one embodiment of this application provides a training method for a heart sound recognition network. This method can be applied to electronic devices such as tablet computers, laptops, ultra-mobile personal computers (UMPCs), and netbooks. This embodiment of the application does not impose any restrictions on the specific type of electronic device.

[0025] Please see Figure 1 , Figure 1 The following is a flowchart illustrating the implementation of a training method for a heart sound recognition network according to an embodiment of this application. The method includes the following steps: S101. Input the heart sound training samples into the first sub-network of the target network and the heart sound recognition network respectively to obtain the first heart sound feature output by the target network and the second heart sound feature output by the first sub-network.

[0026] In one embodiment, the aforementioned heart sound training samples are data used to train the heart sound recognition network and the target network, comprising a sample set of heart sound signal segments. These heart sound signal segments are obtained by processing the sounds produced by the human heartbeat. The heart sound signals in these segments typically contain physiological and pathological information about the heart, such as the sound characteristics produced by the opening and closing of heart valves, and the contraction and relaxation of the myocardium. During training, using these heart sound training samples allows the target network and the heart sound recognition network to learn heart sound patterns and characteristics under different conditions.

[0027] The target network described above is an auxiliary network whose function is to provide feature representations to help the heart sound recognition network capture heart sound characteristics. The structure of the target network can be similar to that of the first sub-network in the heart sound recognition network. The difference lies in that the model parameters of the target network are updated relatively slowly and stably. For example, methods such as moving averages can be used to update the parameters.

[0028] Understandably, in practical applications, the characteristics of heart sound signals typically change relatively slowly. Slowly updating the model parameters of the target network can better simulate these real-world variations, enabling the target network to adapt to subtle differences in heart sound signals at different times and among different individuals, thus improving the stability and robustness of the heart sound recognition network.

[0029] Furthermore, the primary role of the target network is to provide a stable feature representation to assist the first sub-network in the heart sound recognition network in capturing heart sound features. If the model parameters of the target network are updated too quickly, its output features may change frequently, failing to provide a stable reference standard for the first sub-network and hindering the first sub-network from learning accurate heart sound features.

[0030] Meanwhile, slowly updating model parameters prevents the target network from developing an overly strong "memory" of heart sound training samples during training, reducing its fitting to noisy and outlier data and thus mitigating the risk of overfitting. Consequently, the target network can better generalize to new heart sound sample data, providing a more universal feature representation for the heart sound recognition network.

[0031] The aforementioned heart sound recognition network is a trained network model designed to classify and identify heart sounds. It mainly consists of a first sub-network and a second sub-network. The first sub-network extracts features from the input heart sound signal, while the second sub-network predicts the heart sound category based on the features output by the first sub-network.

[0032] It should be noted that with the increase in data volume and the development of technology, the heart sound recognition network may need further optimization to improve performance indicators such as accuracy and recall. By training with more new data (new heart sound training samples), the heart sound recognition network can learn more heart sound features and patterns, thereby better distinguishing different types of heart sounds and improving its ability to identify various heart diseases.

[0033] Furthermore, as medical knowledge and diagnostic standards continue to evolve and update, new types of heart diseases (specific heart sound signals) may be discovered, or the understanding and diagnostic criteria for existing diseases may change. To ensure the heart sound recognition network meets the latest medical requirements, it needs to be trained using heart sound training samples that include new disease types or are labeled according to new diagnostic standards. This allows the network to accurately identify and classify heart sound signals. Therefore, it is necessary to retrain the already trained network model using heart sound training samples.

[0034] The aforementioned first sub-network is a component of the heart sound recognition network, and its main function is to extract features from the input heart sound training samples. This first sub-network can be composed of neural network structures such as convolutional layers, pooling layers, and fully connected layers. Through these network structures, the heart sound signal can be processed layer by layer and its features extracted, transforming the original heart sound signal into a representative feature vector.

[0035] The aforementioned second sub-network is used to predict the heart sound category based on the second heart sound features output by the first sub-network. It is usually a classifier, such as a fully connected layer combined with a softmax function, which maps the features extracted by the first sub-network to different heart sound categories, thereby achieving the classification and recognition of heart sounds.

[0036] As a specific example, refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of a target network and a heart sound recognition network provided in an embodiment of this application. The first sub-network can have a structure similar to the target network. For example, both can be composed of convolutional layers (e.g., one-dimensional convolutional layers) and pooling layers. Specifically, there can be two convolutional layers and one pooling layer. The first and second convolutional layers can employ a multi-scale convolutional structure to fully extract heart sound features from heart sound signals at different time scales. The pooling layer can be an adaptive pooling structure, which can process the heart sound features output by the second convolutional layer, ensuring that the dimension of the processed data is fixed. That is, the output second heart sound features are feature values ​​of fixed dimensions.

[0037] Furthermore, the second sub-network can sequentially include an attention mechanism module, a gated recurrent unit, a fully connected layer, and a classifier. The attention mechanism module learns the importance weights of each channel by performing global average pooling on the input heart sound features and then passing them through a fully connected neural network. Finally, the channels of the heart sound features are weighted according to their importance, thereby adjusting the importance of different channels. This allows the heart sound recognition network to focus more on important detailed feature information.

[0038] Gated recurrent units (GRUs) are primarily used to process sequential data and can effectively capture long-term dependencies in heart sound signals. For heart sound signals that change over time, GRUs can remember past information and update their state based on current input, thereby gaining a better understanding of the overall patterns and dynamic changes in heart sound signals.

[0039] Each neuron in a fully connected layer is connected to all neurons in the previous layer, enabling comprehensive integration of the features output from the previous layer. Then, through the learned weight matrix, the input features are linearly transformed and mapped to a new feature space, allowing the heart sound recognition network to learn higher-level, more abstract feature representations, forming a comprehensive description of the entire heart sound signal.

[0040] The classifier is used to map features extracted from the fully connected layer to classify heart sound signals. For example, the classifier can map features based on activation functions such as softmax to obtain the probability of each category. Finally, the classification result is output based on the probability of each category (e.g., the category corresponding to the maximum probability is the final classification result).

[0041] Based on the above Figure 2 The target network can perform preliminary feature extraction on the heart sound signals in the heart sound training samples based on two convolutional layers and pooling layers, converting the heart sound signals into heart sound features with different channels (first heart sound features). Each channel can represent different feature information of the heart sound.

[0042] Similarly, the first sub-network can also output heart sound features from different channels (second heart sound features). Then, the attention mechanism module processes these heart sound features from different channels to analyze the importance of each feature. Furthermore, channels that are more helpful in identifying different styles of heart sound information can be given higher weights, while relatively unimportant channels have lower weights. Consequently, the features output by the attention mechanism module can better highlight key features related to heart sound style and suppress irrelevant or interfering information.

[0043] Then, GRU can capture the long-term dependencies of heart sounds based on the features processed by the attention mechanism module, thereby better adapting to different styles of heart sound information and improving the ability to understand and recognize heart sound signals. For example, it can accurately identify the unique heart sound styles corresponding to different types of heart diseases, or distinguish between the different styles of normal and abnormal heart sounds.

[0044] Finally, the fully connected layer integrates the features output by the GRU to form a comprehensive description of the entire heart sound signal (the final feature representation), which is then input into the classifier for classification and prediction.

[0045] S102. Update the current model parameters in the first sub-network based on the first heart sound features and the second heart sound features to obtain the target heart sound recognition network.

[0046] In one embodiment, the electronic device can calculate a feature prediction loss based on a first heart sound feature and a second heart sound feature, and update the current model parameters based on the feature prediction loss.

[0047] For example, the electronic device can calculate a feature prediction loss between the first and second heart sound features based on a selected loss function (e.g., mean squared error loss, cosine similarity loss, etc.). This feature prediction loss reflects the degree of difference between the features output by the current first sub-network and the features output by the target network; the smaller the feature prediction loss, the more similar the two features are. Then, backpropagation (e.g., stochastic gradient descent, adaptive moment estimation, etc.) is performed based on the feature prediction loss to update the current model parameters.

[0048] It should be noted that, based on the explanation of the target network and the first sub-network in S101 above, both the first and second heart sound features are features processed by their respective convolutional and pooling layers. However, while the outputs of the convolutional and pooling layers contain some feature information, they are usually insufficient to directly complete complex learning tasks. Examples include sample discrimination in contrastive learning or various prediction tasks in self-supervised learning.

[0049] Therefore, in order to enable the target network to output higher-quality feature representations and provide effective supervision signals, refer to Figure 2 The target network may further include a first projection module, and the heart sound recognition network may further include a second projection module and a prediction module. In this case, the electronic device can first perform feature mapping on the first heart sound features based on the first projection module to obtain a first projected representation. Then, it can perform feature mapping on the second heart sound features based on the second projection module to obtain a second projected representation, and process the second projected representation based on the prediction module to obtain a predicted representation. Finally, a feature prediction loss is generated based on the first projected representation and the predicted representation.

[0050] The first projection module can be similar to the second projection module, both being specially designed neural network modules. For example, the first projection module is used to perform feature mapping operations on the input first heart sound features. For example, the first projection module can contain multiple neurons and a specific weight matrix to map the first heart sound features from the original feature space to a new feature space through corresponding linear and nonlinear transformations, obtaining the first projected representation.

[0051] It should be noted that the mapping operation can transform the first heart sound features into a representation that is more suitable for subsequent processing and model learning. The new feature space can better capture the intrinsic structure and semantic information of the heart sound features, which helps to improve the model's ability to understand and analyze heart sound data, and provides a more representative feature representation for subsequent tasks such as calculating feature prediction loss.

[0052] The second projection module and prediction module are similar to the first projection module and will not be described in detail. It should be noted that the prediction module can convert the second projection representation into an output format (predicted representation) suitable for a specific task. Different heart sound recognition tasks may have different requirements and objectives, and the prediction module can introduce specific information according to the specific task to generate the predicted representation. This allows the predicted representation to provide supervision for the training of the heart sound recognition network. That is, the difference between the output (predicted representation) of the prediction module and the output (first projection representation) of the target network guides the training of the heart sound recognition network, helping it learn more meaningful feature representations.

[0053] In one embodiment, the method of generating the feature prediction loss based on the first projection representation and the prediction representation can be similar to the method of generating the feature prediction loss based on the first heart sound feature and the second heart sound feature described above, and will not be described further.

[0054] It should be noted that if the current model parameters are updated solely based on feature prediction loss, the heart sound recognition network may overemphasize perfect fitting to the heart sound training samples, thus learning noise or special cases from these samples. However, this is not a universal phenomenon in practical applications. Consequently, the heart sound recognition network's generalization ability on new heart sound signals decreases, leading to overfitting.

[0055] Furthermore, the lack of consideration for changes in model parameters and the complexity limitations of the heart sound recognition network may lead to unstable updates of the current model parameters during training, thereby ignoring the overall stability and rationality of the heart sound recognition network, resulting in fluctuations or performance degradation during training.

[0056] Based on this, in order to improve the recognition accuracy of the trained target heart sound recognition network, the electronic device can generate a feature prediction loss based on the first and second heart sound features; generate a model drift loss based on the current model parameters and the initial model parameters of the first sub-network; and generate a regularization loss based on the current model parameters. Finally, the current model parameters are updated based on the feature prediction loss, model drift loss, and regularization loss to obtain the target heart sound recognition network.

[0057] The aforementioned current model parameters are the set of values ​​for parameters such as connection weights and biases of neurons in each layer of the first sub-network during training, used to determine the model's mapping relationship and functional performance. During training, the current model parameters will be continuously updated. At this point, the model parameters to be updated in the first sub-network are the current model parameters.

[0058] The aforementioned initial model parameters can be the initial values ​​of the weights, biases, and other parameters of each layer of the model before the first sub-network begins executing step S101.

[0059] The model drift loss described above measures the degree of deviation between the current model parameters and the initial model parameters, preventing excessively drastic parameter changes during training that could lead to model performance instability or overfitting. The electronic device can predefine metrics to measure parameter differences. For example, it can calculate the norm of the differences between corresponding elements of the current and initial model parameters. The resulting value is the model drift loss, used to quantify the degree of parameter drift.

[0060] Furthermore, the aforementioned regularization loss serves as a penalty term to prevent overfitting of the model, constraining the current model parameters and prompting the heart sound recognition network to learn parameters with better generalization ability. Electronic devices can calculate the regularization loss using methods such as L1 regularization and L2 regularization; there are no restrictions on which method is used. Specifically, L1 regularization calculates the sum of the absolute values ​​of the model parameters multiplied by a regularization coefficient; L2 regularization calculates the sum of the squares of the model parameters multiplied by a regularization coefficient. The result calculated based on these regularization methods is the regularization loss.

[0061] As a concrete example, the feature prediction loss, model drift loss, and regularization loss can be calculated using the following formulas. Details are as follows: ; ; ; in, Let represent the feature prediction loss, q represent the prediction representation, and z represent the first projection representation; Indicates the current model parameters. This represents the initial model parameters.

[0062] In one embodiment, after obtaining the feature prediction loss, model drift loss, and regularization loss, the feature prediction loss, model drift loss, and regularization loss can be summed to obtain the total loss, and the current model parameters can be iteratively updated based on the total loss.

[0063] However, if the total loss is obtained by direct summation and then used for model training, it is difficult to balance the influence of different losses. Understandably, different loss terms (feature prediction loss, model drift loss, and regularization loss) may have varying degrees of importance in reflecting different aspects of the model's performance. For example, in this heart sound recognition network, the feature prediction loss primarily measures the model's ability to learn the similarity of heart sound feature representations, the model drift loss focuses on the stability of model parameters, and the regularization loss focuses on preventing overfitting.

[0064] Therefore, since the aforementioned loss terms have varying degrees of impact on the final model performance, the electronic device can flexibly adjust the proportion of each loss term in the total loss by setting weights, allowing the model to achieve a better balance in different aspects. For example, if the model is prone to parameter instability in the early stages of training, the weight corresponding to the model drift loss can be increased, making the model focus more on optimizing parameter stability. In this embodiment, the weights corresponding to each loss term are not limited.

[0065] For example, the main purpose of updating the current model parameters of the first sub-network is to improve its feature extraction capability for heart sound signals, so that the heart sound features output by the first sub-network can more realistically describe the heart sound situation, laying the foundation for subsequent heart sound classification. Based on this, the weight corresponding to the feature prediction loss can be set to 1, and the weights corresponding to the model drift loss and regularization loss can be values ​​less than 1.

[0066] It's worth noting that updating the current model parameters based on the aforementioned various losses not only guides the model to update parameters in a direction that reduces this discrepancy through feature prediction loss, enabling the model to better fit the training data, but also limits the model's complexity based on regularization loss, preventing the model from overfitting the training data during training. This allows the model to maintain good performance even when faced with new and unseen heart sound signals. Furthermore, model drift loss can prevent instability or performance degradation caused by overly drastic parameter updates during model training, ensuring relatively stable parameter updates and improving the model's robustness.

[0067] In one embodiment, since only the current model parameters in the first sub-network are updated, the heart sound recognition network is formed by the updated first sub-network and the original second sub-network. Furthermore, since the heart sound recognition network is a trained network model, it can be assumed that in real-world scenarios, the second sub-network possesses the ability to classify heart sounds based on the heart sound features output by the first sub-network. Moreover, because the heart sound features output by the trained first sub-network more realistically describe heart sound conditions, it can be assumed that the accuracy of the second sub-network's heart sound classification based on the heart sound features output by the first sub-network will also be higher.

[0068] It is important to note that the trained heart sound recognition network has already learned a large number of general features and patterns of heart sounds, such as the basic characteristics of normal heart sounds and some typical features of heart sounds in common heart diseases, which are of great value to the heart sound recognition task. If a completely new heart sound recognition network is to be trained, it will need to learn all this knowledge from scratch, which will consume a lot of time and computational resources.

[0069] Furthermore, updating only the first sub-network allows for targeted learning of specific information from new heart sound training samples, building upon existing model knowledge. Also, since it eliminates the need to retrain the entire heart sound recognition network, updating only a portion of the network structure reduces the number of training parameters and computational load, thereby improving training efficiency and enabling the model to adapt to the characteristics of new samples more quickly.

[0070] Furthermore, retraining the entire heart sound recognition network might cause the model to focus too much on new heart sound training samples, neglecting previously learned general knowledge and features, which could easily lead to overfitting to new data. Therefore, by updating only the first sub-network, a balance can be struck between learning from new data and retaining existing knowledge, reducing the possibility of overfitting and allowing the model to maintain good performance on both new and old data.

[0071] In this embodiment, by inputting heart sound training samples into the target network and the first sub-network respectively, the first heart sound feature output by the target network and the second heart sound feature output by the first sub-network can be obtained. The target network provides a feature representation to assist the heart sound recognition network in capturing heart sound features. The periodicity of heart sounds is an important feature of heart sound signals, reflecting the rhythm of heart activity and assisting the model in recognizing and analyzing heart sound signals. Based on this, updating the current model parameters in the first sub-network based on the first and second heart sound features allows for fine-tuning of the first sub-network. The fine-tuned first sub-network can then better adapt to the features of specific heart sounds, improving its ability to extract new heart sound features. Furthermore, with the improved feature extraction ability of the first sub-network, the second sub-network predicts heart sound categories based on high-quality heart sound features, improving the accuracy of heart sound signal recognition and classification. Moreover, when updating the current model parameters of the first sub-network in the above manner, the first sub-network can automatically extract valuable feature information from the input heart sound training samples and adaptively adjust its parameters by comparing and learning with the first heart sound features output by the target network. Furthermore, manual annotation of heart sound training samples is unnecessary, reducing labor and time costs. Additionally, updating only the current model parameters of the first sub-network (without updating the model parameters of the second sub-network) improves the update efficiency of the first sub-network and reduces the computational load during model updates.

[0072] In another embodiment, high-quality heart sound training samples are one of the key elements for improving the recognition accuracy of the target heart sound recognition network. Currently, a large number of heart sound signal segments in the heart sound training samples are acquired by acquisition devices (such as stethoscopes). However, such directly acquired heart sound signal segments are often filled with a lot of noise and may not cover substantial heart sound features (such as the periodic features of heart sounds). This results in poor performance when directly using such heart sound training samples to train the heart sound recognition network.

[0073] Therefore, in order to improve the recognition accuracy of the target heart sound recognition network, the electronic device can also, as shown in the example... Figure 3 Steps S301-S304, as shown, are used to obtain heart sound training samples. Details are as follows: S301. Obtain the heart sound signal sequence.

[0074] The heart sound signal sequence includes heart sound signals at multiple points in time. Specifically, the heart sound signal sequence is a collection of heart sound signals arranged in chronological order, recording the sound signals generated by the heartbeat at multiple points in time, and reflecting the dynamic changes in heart activity over a period of time.

[0075] In one embodiment, the electronic device can acquire heart sound signals based on a heart sound acquisition device (e.g., a stethoscope, a heart sound sensor, etc.) to obtain the aforementioned heart sound signal sequence.

[0076] It should be noted that multiple moments refer to a continuous series of time points in the time dimension, ensuring the temporal continuity of heart sound signal acquisition and thus completely recording the process of heart sound changes generated by the periodic beating of the heart. For example, the acquisition device can sample the heart sound signal at a certain sampling frequency (e.g., 1000Hz), with each sampling point corresponding to a moment. By continuously sampling, the above-mentioned heart sound signal sequence is obtained.

[0077] S302. Determine the target energy envelope for each heart sound signal.

[0078] In one embodiment, the aforementioned target energy envelope is a mathematical representation used to describe the energy distribution characteristics of heart sound signals. By analyzing and processing the energy of heart sound signals, an envelope curve reflecting the energy changes of heart sound signals at different time points can be obtained.

[0079] In one embodiment, the target energy includes, but is not limited to, the Shannon energy envelope, the Hilbert envelope, and the Viola integral envelope.

[0080] As an example, taking the Shannon energy envelope as the target energy envelope, the electronic device can calculate the target energy envelope based on a preset Shannon energy formula. Details are as follows: ; in, Indicates the time of heart sound signals The energy envelope, Indicates the time of heart sound signals amplitude, Indicates prevention A tiny constant.

[0081] S303. Determine the heart sound period of the center tone of the heart sound signal sequence based on multiple target energy envelopes.

[0082] In one embodiment, the aforementioned heart sound cycle refers to a complete cycle of heart sound changes produced by the heart during one contraction and relaxation. A heart sound cycle typically includes a first heart sound, a second heart sound, and sometimes a third and fourth heart sound. The first heart sound marks the beginning of ventricular contraction, and the second heart sound marks the beginning of ventricular relaxation.

[0083] As an example, the first and second heart sounds typically have relatively high energies, thus corresponding to relatively distinct peaks in the target energy envelope. Furthermore, the target energy envelope exhibits relatively low troughs between the first and second heart sounds, and between the second heart sound and the first heart sound of the next cycle.

[0084] Based on this, electronic devices can determine the start and end points of the heart sound cycle according to the feature points of the target energy envelope. For example, the time interval between the peak points corresponding to two adjacent first heart sounds can be considered as a heart sound cycle.

[0085] S304. Extract two segments of heart sound signals from the heart sound signal sequence and use them as heart sound training samples.

[0086] In one embodiment, a heart sound cycle contains characteristic information generated by a complete contraction and relaxation process of the heart, such as the first heart sound, the second heart sound, and other iconic heart sound components. Extracting a segment of at least one heart sound cycle duration ensures that the heart sound training samples contain complete cardiac activity features, which helps the model learn accurate heart sound patterns and features, and improves the ability to analyze and recognize heart sound signals. That is, the duration of each of the above-mentioned heart sound signal segments is at least greater than or equal to one heart sound cycle.

[0087] In one embodiment, the duration of a heart sound signal segment is an integer multiple of the heart sound cycle; for example, the duration can be one heart sound cycle. Furthermore, two heart sound signal segments can be two adjacent heart sound signal segments.

[0088] Understandably, using an integer multiple of the heart sound cycle as the step size and extracting two adjacent time windows as heart sound training samples can ensure that each heart sound signal segment covers the features of all parts of the heart sound, helping the model to comprehensively learn the characteristics of the heart sound, and can effectively reduce unnecessary data processing and optimize computational efficiency.

[0089] It is worth noting that extracting two heart sound signal segments as training samples allows the heart sound recognition network to compare the two segments with each other when learning heart sound features, thereby enhancing the model's adaptability and generalization ability to different heart sound states and improving training results.

[0090] It is understandable that, since each heart sound signal segment has a duration of at least one heart sound cycle, it contains complete or nearly complete features of the cardiac activity cycle. Therefore, the heart sound training sample can be considered a positive sample with the target features or capable of being used for heart sound classification. In this embodiment, training can be performed solely based on positive samples, without the need for training with negative samples that cannot be used for heart sound classification.

[0091] Negative samples refer to samples that lack the target features and represent the opposite category to positive samples. For example, samples that do not contain complete heart sound cycle features, or are interference signals that differ greatly from normal heart sound patterns and do not provide positive assistance in heart sound classification.

[0092] It should be noted that positive samples can fully demonstrate the key patterns and features of normal heart sounds. By learning from positive heart sound training samples, the heart sound recognition network can quickly understand the patterns of normal heart sounds and thus perform classification. However, the non-target categories represented by negative samples are complex and diverse and have little correlation with the heart sound classification task. Therefore, adding negative samples may introduce noise interference, increasing the complexity and uncertainty of training the heart sound recognition network.

[0093] In this embodiment, by acquiring a heart sound signal sequence containing heart sound signals at multiple time points and determining the target energy envelope of each heart sound signal, the various features of the heart sound signal can be intuitively quantified. Furthermore, determining the heart sound cycle based on the target energy envelope that can intuitively quantify the features of the heart sound signal can improve the accuracy of heart sound cycle determination. Finally, extracting two heart sound signal segments with a duration of at least one heart sound cycle from the heart sound signal sequence as heart sound training samples ensures that the heart sound training samples cover key features of cardiac activity, allowing the model to learn comprehensive and crucial heart sound patterns. Moreover, by comparing the two heart sound signal segments, the model's adaptability and generalization ability to different heart sound states are enhanced, improving the training effect.

[0094] It should be noted that during the process of acquiring the heart sound signal sequence in S301 above, the heart sound signal is easily affected by noise interference in the magnetic resonance environment, resulting in noise in the extracted heart sound signal.

[0095] Therefore, in order to reduce noise in the heart sound signal sequence, electronic devices can acquire the patient's sound wave signal sequence using acquisition devices attached to the patient's chest cavity; these acquisition devices include MRI-compatible devices. The sound wave signal sequence is then transmitted to a signal processing device located outside the magnet for processing to obtain the heart sound signal sequence.

[0096] In one embodiment, the thoracic cavity includes, but is not limited to, the cardiac auscultation areas such as the apex of the heart and the left sternal border, to ensure that clear heart sound signals can be effectively acquired, but this is not limited.

[0097] The above explanation of the acquisition equipment will not be repeated here. It should be noted that MRI-compatible equipment refers to equipment that can operate normally in a magnetic resonance imaging (MRI) environment without interfering with the magnetic field of the MRI equipment, and is not damaged or have its performance affected by strong magnetic fields, radio frequency pulses, or other factors. Furthermore, in scenarios involving the acquisition of heart sound signals, this ensures that the acquired heart sound signals are not distorted.

[0098] The aforementioned data acquisition equipment can be made using special materials. For example, non-magnetic materials, special metallic materials (titanium and titanium alloys, as well as nickel-titanium alloys), etc., are not limited to these.

[0099] The aforementioned acoustic signal sequence refers to the collection of acoustic information from the patient's chest cavity recorded sequentially by the acquisition device over a certain period of time. It includes acoustic signals generated by various physiological activities such as heartbeat and respiration, and is the raw acquisition data.

[0100] The aforementioned magnet is the core component in a magnetic resonance imaging (MRI) system that generates a strong, uniform magnetic field. It is used to magnetize the hydrogen nuclei in human tissue and cause energy level splitting, forming the basis of MRI imaging. The area outside the magnet can be considered as the region far from the magnet's center where the magnetic field strength is below a certain safety threshold. Typically, this region refers to the space outside the magnet's effective magnetic field range, where it is not directly affected by the strong magnetic field.

[0101] As an example, areas outside the magnet's preset range (e.g., 1m) can be considered as outside the magnet. The acquisition device can transmit the acoustic signal sequence to a signal processing device located outside the magnet via a wired (e.g., silicone tubing) or wireless method.

[0102] The aforementioned signal processing device is a transducer that converts acoustic signals into electrical signals. In this scenario, it is used to receive the acoustic signal sequence transmitted from the acquisition device and perform preliminary processing on it, such as amplification and filtering, so as to further analyze and process it to obtain the heart sound signal sequence.

[0103] For example, the signal processing devices mentioned above include, but are not limited to, microphone devices (e.g., condenser microphones, electret microphones, etc.), piezoelectric sensors, etc., and are not limited thereto.

[0104] Understandably, using MRI-compatible equipment to acquire the sound wave signal sequence from the patient's chest cavity and transmitting it to signal processing equipment outside the magnet for processing to obtain the heart sound signal sequence can avoid magnetic field interference in the acquisition of heart sound signals and improve the acquisition quality of heart sound signals.

[0105] In another embodiment, since there may still be some noise in the acquired heart sound signal sequence, therefore, if the heart sound signal sequence in step S302 is directly used... If the target energy envelope is determined, there may be energy values ​​corresponding to noise in the target energy envelope, which may cause the envelope to fail to accurately reflect the true energy changes of the heart sound.

[0106] Therefore, in order to ensure that the target energy envelope can accurately reflect the real energy changes of the heart sound, the electronic device can first determine the initial energy envelope of the heart sound signal based on the above formula, and then correct the initial energy envelope according to the preset correction coefficient to obtain the target energy envelope.

[0107] The preset correction coefficient can be set according to the actual situation, and there is no limitation on it.

[0108] However, preset correction coefficients are fixed values ​​and typically cannot be adaptively adjusted based on the characteristics of different heart sound signals and the actual conditions during the acquisition process. It is understandable that heart sound signals often vary due to individual differences, physiological states, disease types, and other factors; a fixed preset correction coefficient is insufficient to adapt to these complex and variable situations. Consequently, it may lead to poor correction results, failing to accurately highlight heart sound characteristics or effectively suppress noise.

[0109] Therefore, in order to obtain a precise target energy envelope, electronic devices can, according to, such as Figure 4 The process shown in steps S401-S403 is performed to obtain the final product. Details are as follows: S401. For any heart sound signal, determine the initial energy envelope of the heart sound signal.

[0110] S402. Based on the preset window length, determine the heart sound window containing the heart sound signal.

[0111] The method for determining the initial energy envelope has already been explained above and will not be repeated here. Furthermore, the aforementioned window length is a time window size set when analyzing heart sound signals, representing the time range of the heart sound signals considered when correcting the initial energy envelope.

[0112] As an example, an electronic device can determine the start and end times of a window based on the time corresponding to the heart sound signal and the window length. For instance, the end time can be determined by adding the time to the window length and subtracting 1; and the end time can be determined by subtracting the time from the window length. In this case, each heart sound signal within the window start and end times in the heart sound signal sequence can be considered a windowed heart sound signal.

[0113] S403. Based on the heart sound signals of each window located in the heart sound window, the initial energy envelope is corrected to obtain the target energy envelope.

[0114] In one embodiment, the electronic device can analyze the short-time zero-crossing rate, frequency distribution, amplitude statistics, and other characteristics of the heart sound signal within the window length to determine the correction coefficient based on the relationship model between the above characteristics and the correction coefficient.

[0115] As an example, an electronic device can determine the short-time zero-crossing rate based on the heart sound signals in each window. Then, the initial energy envelope is corrected based on the short-time zero-crossing rate to obtain the target energy envelope.

[0116] The electronic device can calculate the short-term zero crossover rate using the following formula, detailed below: ; in, Let L represent the short-time zero-crossing rate of the heart sound signal at time t, S represent the window length, and F represent the window start time and window end time. This represents the amplitude of the window heart sound signal at time i.

[0117] It should be noted that the short-time zero-crossing rate reflects the number of zero-crossings of the heart sound signal within a short period of time, and can be used to measure the frequency characteristics and complexity of the signal. For example, a high short-time zero-crossing rate indicates the presence of more high-frequency noise, and a larger correction factor can be used to correct the initial energy envelope to enhance the suppression of noise in the initial energy envelope; conversely, a low short-time zero-crossing rate allows for the use of a smaller correction factor to correct the initial energy envelope, reducing the impact on the true energy of the heart sound signal.

[0118] In one embodiment, after obtaining the short-time zero crossover rate, the aforementioned correction coefficient can be determined based on the mapping relationship between the short-time zero crossover rate and the preset correction coefficient, so as to correct the initial energy envelope.

[0119] In another embodiment, the electronic device may further correct the initial energy envelope based on the following formula, detailed below: ; in, This represents the target energy envelope corresponding to the heart sound signal at time t. This represents the initial energy envelope corresponding to the heart sound signal at time t. This represents the preset weighting factor. This represents the short-time zero-crossing rate of the heart sound signal at time t.

[0120] It should be noted that, in this embodiment, since the heart sound signals within the heart sound window contain local information within a specific time period, analyzing and correcting the heart sound signals of each window within the heart sound window can better capture the characteristic changes of the heart sound signals in different local regions. Different heart sound windows may correspond to different physiological stages of the heart, such as systole and diastole, and the heart sound characteristics are different in each stage. Correction based on the heart sound window can refine the processing of these local features and more accurately reflect the true energy distribution of the heart sound signal.

[0121] Furthermore, by modifying the heart sound signals in each window within the heart sound window, noise can be specifically suppressed according to the specific situation of the heart sound signals in each window, while enhancing the useful features of the heart sound signals.

[0122] In contrast, if correction is based solely on adjacent heart sound signals, the results may be unstable due to the excessive sensitivity to changes between adjacent heart sound signals, making them susceptible to individual outliers or noise. This results in an inaccurate reflection of the overall characteristics and energy distribution of the heart sound signals.

[0123] Furthermore, noise in heart sound signals typically has a high frequency, manifesting as rapid fluctuations in the signal, leading to an increased short-term zero-crossing rate. Based on this, correcting the initial energy envelope using the short-term zero-crossing rate can identify these high-frequency noise components. Moreover, when the short-term zero-crossing rate exceeds a certain threshold, the value of the initial energy envelope is correspondingly reduced, thereby suppressing the influence of noise on the energy envelope and making the target energy envelope more accurately reflect the true energy distribution of the heart sound signal.

[0124] In another embodiment, due to differences in cardiac physiological structure and function among individuals, the generation and conduction of heart sounds will also vary. Certain physiological conditions, such as valvular heart disease and cardiomyopathy, may alter the intensity, frequency, and duration of heart sounds, changing the characteristics of the first heart sound and increasing the difficulty of accurately identifying the peak point. Furthermore, if additional heart sounds are present, such as a third or fourth heart sound, or a pathological murmur, the target energy envelope will be extremely complex. In this case, the aforementioned additional heart sounds may produce peak-like characteristics on the target energy envelope, interfering with the judgment of the first heart sound peak and leading to inaccurate determination of the heart sound cycle.

[0125] Therefore, in order to improve the accuracy of determining the heart sound cycle in step S303 above, the electronic device can, according to, as follows: Figure 5 The steps S501-S503 shown determine the heart sound cycle. Details are as follows: S501. For any period in the preset period interval, determine the delayed energy envelope of each heart sound signal after the delayed period.

[0126] In one embodiment, the preset period interval can be a pre-defined time range used to define the possible range of values ​​for the heart sound cycle. Typically, this preset period interval can be determined based on factors such as the general characteristics of heart sound signals and the actual application scenario. For example, the heart sound cycle of a normal adult usually fluctuates within a certain time range; the preset period interval can be set based on this prior knowledge to allow for subsequent analysis and processing of the heart sound signal within a reasonable range.

[0127] In one embodiment, the aforementioned delayed energy envelope refers to the target energy envelope corresponding to the heart sound signal after being delayed according to a given period.

[0128] S502. Based on multiple corresponding target energy envelopes and delayed energy envelopes, determine the similarity between the heart sound signal sequence and the heart sound signal sequence after the delay period.

[0129] In one embodiment, the heart sound signal sequence after the aforementioned delay period is a new sequence obtained by delaying the original heart sound signal sequence according to a specific period. By comparing the similarity between these two sequences, the similarity and periodicity characteristics of the heart sound signals at different time points can be understood.

[0130] In one embodiment, the electronic device may further delay only the heart sound signals of each window within the heart sound window, so as to determine the above similarity based on the target energy envelopes corresponding to the delayed heart sound signals of each window and the target energy envelopes corresponding to the undelayed heart sound signals of each window. This will not be described in detail.

[0131] In one embodiment, the methods for determining similarity described above include, but are not limited to, calculation methods such as autocorrelation coefficient, Euclidean distance, Manhattan distance, and Pearson correlation coefficient, which will not be described in detail.

[0132] As an example, electronic devices can calculate the above similarity using the following formula, detailed below: ; in, Indicates period, Indicates period The corresponding similarity, where T represents the total length of the heart sound signal sequence. This represents the target energy envelope corresponding to the heart sound signal at time t. This represents the delayed energy envelope corresponding to the heart sound signal after a delay period at time t.

[0133] S503. The period corresponding to the maximum similarity is determined as the heart sound period.

[0134] It should be noted that step S501 above describes performing this step and step S502 for any cycle within the preset cycle interval. Therefore, the similarity score for each cycle will be obtained. At this point, the cycle corresponding to the maximum similarity score can be considered as the heart sound cycle.

[0135] It is understandable that heart sound signals may exhibit variability among different individuals and even within the same individual under different physiological states, including variations in cycle length. Based on this, by traversing different cycles within a preset cycle interval, calculating the similarity between the delayed energy envelope and the target energy envelope, and selecting the cycle corresponding to the maximum similarity as the heart sound cycle, the true cycle of the heart sound signal can be captured more accurately, making the determined heart sound cycle more adaptable to the variability of the heart sound signal. Compared to some fixed threshold or simple template matching methods, this approach has better robustness and adaptability.

[0136] In another embodiment, since the heart sound signals are acquired under the high noise characteristics of the magnetic resonance environment, in order to avoid incorporating heart sound signals containing too much contamination into the model training and causing model degradation, it is also necessary to examine the acquired heart sound signal sequence to determine whether it contains the required quality.

[0137] For example, after obtaining the heart sound signal sequence, the amplitude of the heart sound signal can be checked to see if it is within a reasonable range. Since noise in the magnetic resonance environment may cause abnormal signal amplitude, if the amplitude is too high or too low, it can be considered that the heart sound signal has been severely interfered with.

[0138] Alternatively, check the continuity of the heart sound signal, observing whether there are obvious interruptions or abrupt changes. Under normal circumstances, the heart sound signal should be continuous and smooth. If there are sudden jumps or interruptions, it may be due to noise interference or equipment failure during the acquisition process.

[0139] In another embodiment, the electronic device may further generate an envelope histogram based on each target energy envelope. Then, from the envelope histogram, the proportion of regions where the target energy envelope is lower than a preset energy envelope is determined. Finally, when the proportion of the region is greater than or equal to the preset proportion, the step of determining the heart sound period of the center tone of the heart sound signal sequence based on multiple target energy envelopes is performed. Otherwise, when the proportion of the region is less than the preset proportion, the generation of heart sound training samples based on the heart sound signal sequence is stopped.

[0140] In one embodiment, the envelope histogram described above is a statistical graph used to display the distribution of signal envelope characteristics. After obtaining the target energy envelope, the values ​​of the target energy envelope can be statistically grouped, and the number of data points in each energy interval can be counted to construct the envelope histogram.

[0141] The preset energy envelope and preset percentage can be set according to actual conditions and are not limited thereto. For example, the preset percentage can be 25%.

[0142] Specifically, taking an adult's heart rate as an example, an adult's heart rate is approximately 65 beats per minute. From this, the duration of one heart sound cycle can be calculated. Heart rate refers to the number of times the heart beats per minute, so the time of each heartbeat (i.e., the heart sound cycle) is approximately 60 ÷ 65 ≈ 0.923 seconds. Furthermore, heart sounds mainly consist of the first heart sound (S1), the second heart sound (S2), and the physiologically significant parts of each heart sound, reflecting important physiological activities such as the closure of heart valves. S1 occupies approximately 0.08 seconds, and S2 occupies approximately 0.15 seconds. Therefore, S1 and S2 together account for approximately 0.23 seconds of the heart sound cycle duration, with the remaining portion accounting for approximately 0.693 seconds.

[0143] Based on this, it can be assumed that the remaining part accounts for approximately 0.693 ÷ 0.923 ≈ 0.75 of the entire heart sound cycle, and that S1 and S2 account for approximately 25% of the heart sound cycle.

[0144] Based on the above explanation, when analyzing heart sound signals, if the proportion of the regions corresponding to S1 and S2 is greater than or equal to 25%, the heart sound signal sequence can be considered to be of good quality and more consistent with the characteristics of normal heart sounds; conversely, if the proportion of the regions is less than 25%, the heart sound signal sequence can be considered to be of poor quality and contain more noise interference.

[0145] It should be noted that although time-domain analysis can directly observe the amplitude changes of the signal on the time axis to determine the quality of the heart sound signal sequence, the high noise in the magnetic resonance environment can easily cause fluctuations, spikes, or discontinuities in the amplitude of the heart sound signal. Furthermore, this noise interference can easily be misinterpreted as a characteristic of the heart sound signal, leading to biased assessments of the signal quality and making it difficult to accurately determine the true characteristics and quality of the signal.

[0146] In this embodiment, since the target energy envelope can accurately reflect the true energy changes of heart sounds, generating an envelope histogram based on each target energy envelope allows for an accurate and intuitive understanding of the energy distribution of the heart sound signal. Furthermore, based on the proportion of regions in the envelope histogram that are below the preset energy envelope and the magnitude of that proportion, the quality of the heart sound signal sequence can be accurately evaluated.

[0147] To more clearly illustrate the solution in this application, specific embodiments are used below to describe the solution. For example, when a patient undergoes an examination, a heart sound gating device (e.g., a data acquisition device, a flexible tube, and a microphone device) can be installed so that the patient's sound wave signal can be led out of the magnet hole through the flexible tube and processed by the microphone device (e.g., a USB sound card) to obtain the heart sound signal.

[0148] Then, the electronic device can input the real-time acquired heart sound signals into the target heart sound recognition network. At the start of the check, the electronic device can determine whether the proportion of regions in the envelope histogram below the preset energy envelope is greater than or equal to a preset proportion. If the proportion of regions is determined to be greater than or equal to the preset proportion, the aforementioned heart sound training samples are generated, and steps S101-S102 are executed to fine-tune the current model parameters in the first sub-network, thus obtaining the target heart sound recognition network.

[0149] Finally, the target heart sound recognition network is used to identify and predict subsequent heart sound segments acquired from the patient to determine the gating signal. This gating signal is used to control medical devices (e.g., magnetic resonance imaging equipment) to perform imaging scans of the patient's heart.

[0150] For example, at the end of a certain heart sound segment, when the probability corresponding to the first heart sound component (S1) is the highest in the softmax output, the electronic device can send a gating signal to the magnetic resonance imaging device to start the imaging process.

[0151] Based on the above explanation, the heart sound training samples can be considered as samples collected and generated in real time from the patient's heart sound signals. In other words, the heart sound training samples are generated based on the heart sound signals of the patient requiring imaging.

[0152] Therefore, even though there are individual differences in heart sound signals among different patients, the heart sound recognition network can learn and analyze the heart sound signals acquired in real time by the patient, automatically adapting to these individual differences and generating a corresponding target heart sound recognition network. Furthermore, by recognizing the patient's heart sound signals based on the target heart sound recognition network adapted to individual patient differences, it can accurately identify appropriate trigger points, ensuring that the imaging process can be precisely triggered according to the specific situation of each patient, thus improving the adaptability and versatility of the imaging technology for different patients.

[0153] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a training device for a heart sound recognition network provided in an embodiment of this application. The training device for the heart sound recognition network in this embodiment includes modules for executing... Figures 1 to 5 The steps in the corresponding embodiments. Please refer to the details. Figures 1 to 5 as well as Figures 1 to 5 The relevant descriptions in the corresponding embodiments are shown below. For ease of explanation, only the parts relevant to this embodiment are shown. See also... Figure 6 The training device 600 for the heart sound recognition network may include: an input module 610 and an update module 620, wherein: The input module 610 is used to input heart sound training samples into the first sub-network of the target network and the heart sound recognition network respectively, to obtain the first heart sound feature output by the target network and the second heart sound feature output by the first sub-network; the target network is used to provide a feature representation to assist the heart sound recognition network in capturing heart sound features; the heart sound recognition network is a trained network model; the heart sound recognition network includes the first sub-network and the second sub-network for predicting heart sound categories based on the second heart sound feature.

[0154] The update module 620 is used to update the current model parameters in the first sub-network based on the first heart sound features and the second heart sound features, so as to obtain the target heart sound recognition network.

[0155] In one embodiment, the training device 600 for the heart sound recognition network further includes: The acquisition module is used to acquire the heart sound signal sequence; the heart sound signal sequence includes heart sound signals at multiple time points.

[0156] The first determining module is used to determine the target energy envelope of each heart sound signal.

[0157] The second determining module is used to determine the heart sound period of the center tone of the heart sound signal sequence based on multiple target energy envelopes.

[0158] The extraction module is used to extract two heart sound signal segments from the heart sound signal sequence as heart sound training samples; the duration of each heart sound signal segment is at least greater than or equal to one heart sound cycle.

[0159] In one embodiment, the first determining module is further configured to: For any heart sound signal, determine the initial energy envelope of the heart sound signal; based on a preset window length, determine the heart sound window containing the heart sound signal; based on the heart sound signals in each window of the heart sound window, correct the initial energy envelope to obtain the target energy envelope.

[0160] In one embodiment, the first determining module is further configured to: Based on the heart sound signals of each window, the short-time zero crossover rate is determined; the initial energy envelope is corrected based on the short-time zero crossover rate to obtain the target energy envelope.

[0161] In one embodiment, the second determining module is further configured to: For any period within a preset period interval, the delayed energy envelope of each heart sound signal after the delayed period is determined; based on multiple corresponding target energy envelopes and delayed energy envelopes, the similarity between the heart sound signal sequence and the heart sound signal sequence after the delayed period is determined; the period corresponding to the maximum similarity is determined as the heart sound period.

[0162] In one embodiment, the training device 600 for the heart sound recognition network further includes: The generation module is used to generate an envelope histogram based on each target energy envelope.

[0163] The third determination module is used to determine the proportion of regions where the target energy envelope is lower than the preset energy envelope from the envelope histogram.

[0164] The execution module is used to perform the step of determining the heart sound period of the center tone of the heart sound signal sequence based on multiple target energy envelopes if the region proportion is greater than or equal to the preset proportion; and to stop generating heart sound training samples based on the heart sound signal sequence if the region proportion is less than the preset proportion.

[0165] In one embodiment, the update module 620 is further configured to: Based on the first and second heart sound features, a feature prediction loss is generated; based on the current model parameters and the initial model parameters of the first sub-network, a model drift loss is generated; based on the current model parameters, a regularization loss is generated; based on the feature prediction loss, model drift loss, and regularization loss, the current model parameters are updated to obtain the target heart sound recognition network.

[0166] In one embodiment, the target network further includes a first projection module, and the heart sound recognition network further includes a second projection module and a prediction module; the update module 620 is also used for: The first projection module performs feature mapping on the first heart sound features to obtain a first projection representation; the second projection module performs feature mapping on the second heart sound features to obtain a second projection representation; the prediction module processes the second projection representation to obtain a prediction representation; and a feature prediction loss is generated based on the first projection representation and the prediction representation.

[0167] When it is understood that, Figure 6 In the schematic diagram of the training device for the heart sound recognition network shown, each module is used to perform... Figures 1 to 5 The steps in the corresponding embodiments, and for Figures 1 to 5 The steps in the corresponding embodiments have been explained in detail in the above embodiments. Please refer to them for details. Figures 1 to 5 as well as Figures 1 to 5 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0168] Figure 7 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Figure 7 As shown, the electronic device 700 of this embodiment includes: a processor 710, a memory 720, and a computer program 730 stored in the memory 720 and executable on the processor 710, such as a program for training a heart sound recognition network. When the processor 710 executes the computer program 730, it implements the steps of each embodiment of the heart sound recognition network training method described above, for example... Figure 1S101 to S102 are shown. Alternatively, the processor 710 implements the above when executing the computer program 730. Figure 6 The functions of each module in the corresponding embodiments, for example, Figure 6 For details on the functions of each module shown, please refer to [link / reference]. Figure 6 The relevant descriptions in the corresponding embodiments.

[0169] For example, the computer program 730 can be divided into one or more modules, one or more of which are stored in the memory 720 and executed by the processor 710 to implement the training method of the heart sound recognition network provided in the embodiments of this application. One or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 730 in the electronic device 700. For example, the computer program 730 can implement the training method of the heart sound recognition network provided in the embodiments of this application.

[0170] Electronic device 700 may include, but is not limited to, processor 710 and memory 720. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 700 and does not constitute a limitation on electronic device 700. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device may also include input / output devices, network access devices, buses, etc.

[0171] The processor 710 may be a central processing unit, or it may be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0172] The memory 720 can be an internal storage unit of the electronic device 700, such as a hard disk or RAM of the electronic device 700. The memory 720 can also be an external storage device of the electronic device 700, such as a plug-in hard disk, smart memory card, flash memory card, etc., equipped on the electronic device 700. Furthermore, the memory 720 can include both internal storage units and external storage devices of the electronic device 700.

[0173] This application provides a computer-readable storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the training method of the heart sound recognition network as described in the above embodiments.

[0174] This application provides a computer program product that, when run on an electronic device, causes the electronic device to execute the training method of the heart sound recognition network described in the above embodiments.

[0175] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for obtaining heart sound training samples, characterized in that, The method further includes: Acquire a heart sound signal sequence; the heart sound signal sequence includes heart sound signals at multiple time points; Determine the target energy envelope for each of the heart sounds; The heart sound period of the central tone of the heart sound signal sequence is determined based on multiple target energy envelopes; Two heart sound signal segments are extracted from the heart sound signal sequence and used as heart sound training samples; the duration of each heart sound signal segment is at least greater than or equal to one heart sound cycle.

2. The method according to claim 1, characterized in that, The step of determining the target energy envelope for each of the heart sound signals includes: For any of the aforementioned heart sound signals, determine the initial energy envelope of the heart sound signal; Based on a preset window length, a heart sound window containing the heart sound signal is determined; Based on the heart sound signals of each window located in the heart sound window, the initial energy envelope is corrected to obtain the target energy envelope.

3. The method according to claim 2, characterized in that, The step of correcting the initial energy envelope based on the heart sound signals located in each window of the heart sound window to obtain the target energy envelope includes: The short-time zero crossover rate is determined based on the heart sound signals of each window. The initial energy envelope is corrected based on the short-term zero crossover rate to obtain the target energy envelope.

4. The method according to claim 1, characterized in that, The step of determining the heart sound period of the center tone of the heart sound signal sequence based on multiple target energy envelopes includes: For any period within a preset period interval, determine the delayed energy envelope of each heart sound signal after delaying the period. Based on multiple corresponding target energy envelopes and delayed energy envelopes, the similarity between the heart sound signal sequence and the heart sound signal sequence after the period is delayed is determined; The period corresponding to the maximum value of the similarity is determined as the heart sound period.

5. The method according to claim 1, characterized in that, After determining the target energy envelope of each of the heart sound signals, the method further includes: Based on each of the target energy envelopes, an envelope histogram is generated; From the envelope histogram, determine the percentage of regions where the target energy envelope is lower than the preset energy envelope; If the region proportion is greater than or equal to the preset proportion, then the step of determining the heart sound period of the central tone of the heart sound signal sequence based on multiple target energy envelopes is executed; If the proportion of the region is less than the preset proportion, then the generation of the heart sound training sample based on the heart sound signal sequence will stop.

6. The method according to claim 1, characterized in that, The step of extracting two heart sound signal segments from the heart sound signal sequence as heart sound training samples includes: Using an integer multiple of the heart sound cycle as the step size, two adjacent time windows are extracted from the heart sound signal sequence as the heart sound training samples; the heart sound cycle refers to a complete cycle of heart sound changes produced by the heart during one contraction and relaxation.

7. The method according to claim 1, characterized in that, The method further includes: The heart sound training samples are respectively input into the first sub-network of the target network and the heart sound recognition network to obtain the first heart sound feature output by the target network and the second heart sound feature output by the first sub-network; the target network is used to provide a feature representation to assist the heart sound recognition network in capturing heart sound features; the heart sound recognition network is a trained network model; the heart sound recognition network includes the first sub-network and the second sub-network for predicting heart sound categories based on the second heart sound feature; The target heart sound recognition network is obtained by updating the current model parameters in the first sub-network based on the first heart sound features and the second heart sound features.

8. The method according to claim 7, characterized in that, The step of updating the current model parameters in the first sub-network based on the first heart sound features and the second heart sound features to obtain the target heart sound recognition network includes: Based on the first heart sound features and the second heart sound features, a feature prediction loss is generated; Based on the current model parameters and the initial model parameters of the first sub-network, generate the model drift loss; Based on the current model parameters, generate a regularized loss; The target heart sound recognition network is obtained by updating the current model parameters based on the feature prediction loss, the model drift loss, and the regularization loss.

9. The method according to claim 8, characterized in that, The target network further includes a first projection module, and the heart sound recognition network further includes a second projection module and a prediction module; the step of generating a feature prediction loss based on the first heart sound features and the second heart sound features includes: Based on the first projection module, feature mapping is performed on the first heart sound features to obtain the first projection representation; The second projection module performs feature mapping on the second heart sound features to obtain a second projection representation, and the prediction module processes the second projection representation to obtain a predicted representation. The feature prediction loss is generated based on the first projection representation and the prediction representation.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 9.