Electrocardiogram data processing method and device and storage medium
By using an end-to-end ECG data processing model, the heartbeat distribution and event information in the ECG data are directly output, which solves the problems of insufficient information mining and low accuracy caused by reliance on assumptions in the existing technology, and realizes high-accuracy global vision analysis.
Patent Information
- Application Number
- CN202411332533.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-09-24
AI Technical Summary
Existing technologies cannot effectively extract various types of information from electrocardiogram (ECG) data, especially when cardiac electrophysiological activity is abnormal, resulting in low accuracy. Furthermore, the reliance on assumed information in analysis leads to inaccurate results.
An end-to-end ECG data processing model is adopted. By extracting and fusing global and local ECG features, the model directly outputs heartbeat distribution information and cardiac electrophysiological activity event information without the need for fixed-length segmentation. The model also improves accuracy by utilizing a global perspective and a bidirectional long short-term memory network.
It significantly improves the accuracy of mining information on cardiac electrophysiological events, avoids dependence on assumed information, and can accurately identify cardiac electrical activity under abnormal conditions.
Smart Images

Figure CN119181513B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to an electrocardiogram data processing method and device and a storage medium. BACKGROUND
[0002] Electrocardiogram data is an important medical data, but the related art lacks the ability to mine information from electrocardiogram data. For example, the related art can usually only rely on an artificial intelligence model without a global perspective to identify a single heartbeat in a fixed-length electrocardiogram data segment, and then further analyze more cardiac electrophysiological activity event information based on the identified single heartbeat in combination with other electrocardiogram data analysis methods, and cannot directly mine multiple types of information including cardiac electrophysiological activity event information based on an end-to-end artificial intelligence model. Moreover, the fixed-length electrocardiogram data segment is relatively short, usually only about 30 seconds, and the effective information content for analyzing cardiac electrophysiological activity event information is insufficient, which reduces the recognition accuracy of cardiac electrophysiological activity event information.
[0003] Further, when analyzing cardiac electrophysiological activity event information, the related art usually needs to rely on assumed information, such as assuming that the position of a heartbeat has a certain regularity, and then analyzing cardiac electrophysiological activity event information. However, when some abnormal events of cardiac electrophysiological activity occur, the assumption does not hold, which directly leads to inaccurate results of mining cardiac electrophysiological activity event information by the related art. SUMMARY
[0004] Embodiments of the present application provide an electrocardiogram data processing method, device and storage medium to at least solve the foregoing technical problem.
[0005] According to an aspect of an embodiment of the present application, an electrocardiogram data processing method is provided, the method comprising:
[0006] obtaining a target electrocardiogram sequence;
[0007] inputting the target electrocardiogram sequence into an electrocardiogram data processing model to mine electrocardiogram information, to obtain heartbeat distribution information and cardiac electrophysiological activity event information, the heartbeat distribution information including a heartbeat type in the target electrocardiogram sequence, and the event information including an event coverage area and an event type;
[0008] The electrocardiogram data processing model is an end-to-end model that synchronously outputs the heartbeat type, the event coverage area and the event type.
[0009] In an exemplary embodiment, the method further comprises:
[0010] calibrate the beat distribution information based on the event information to obtain calibrated beat distribution information;
[0011] or,
[0012] calibrate the event information based on the beat distribution information to obtain calibrated event information.
[0013] In an exemplary embodiment, the electrocardiogram data processing model is obtained by training through the following method:
[0014] obtain a sample electrocardiogram sequence, and obtain beat reference information and event reference information corresponding to the sample electrocardiogram sequence;
[0015] construct a preset model, the preset model comprising a global electrocardiogram feature extraction module, a local electrocardiogram feature extraction module, an electrocardiogram feature fusion module, an event positioning module, an event classification module, and a beat classification module;
[0016] extract global electrocardiogram features from the sample electrocardiogram sequence based on the global electrocardiogram feature extraction module to obtain global electrocardiogram features;
[0017] extract local electrocardiogram features from the global electrocardiogram features based on the local electrocardiogram feature extraction module to obtain local electrocardiogram features;
[0018] input the global electrocardiogram features and the local electrocardiogram features into the electrocardiogram feature fusion module to perform electrocardiogram feature fusion and obtain fused electrocardiogram features;
[0019] input the fused electrocardiogram features into the beat classification module, the event positioning module, and the event classification module respectively to perform beat classification, event positioning, and event classification respectively, and obtain sample beat distribution information and sample event information of cardiac electrophysiological activity;
[0020] determine a first loss based on a difference between the sample beat distribution information and the beat reference information;
[0021] determine a second loss based on a difference between the sample event information and the event reference information;
[0022] adjust parameters of each module in the preset model based on the first loss and the second loss to obtain the electrocardiogram data processing model.
[0023] In an exemplary embodiment, the method further comprises:
[0024] divide the sample electrocardiogram sequence into a plurality of equal-length sample electrocardiogram segments based on a first preset step size;
[0025] divide each of the sample ECG segments into a plurality of sample ECG regions with equal length based on a second preset step size;
[0026] The heart beat reference information comprises a reference heart beat type corresponding to each of the sample ECG regions, and the event reference information comprises a reference event coverage region and a reference event type corresponding to each of the sample ECG segments.
[0027] In an exemplary embodiment, the method further comprises:
[0028] The first preset step size and the second preset step size are determined based on a variation of a time scale in the global ECG feature extraction process.
[0029] In an exemplary embodiment, the sample heart beat distribution information comprises a predicted heart beat type corresponding to each of the sample ECG regions, and the first loss is determined based on a difference between the sample heart beat distribution information and the heart beat reference information, comprising:
[0030] For any of the sample ECG regions, a heart beat type prediction loss is determined based on a difference between the reference heart beat type corresponding to the sample ECG region and the predicted heart beat type corresponding to the sample ECG region.
[0031] The first loss is determined based on the heart beat type prediction loss corresponding to each of the sample ECG regions.
[0032] In an exemplary embodiment, the sample event information comprises a predicted event coverage region and a predicted event type corresponding to each of the sample ECG segments, and the second loss is determined based on a difference between the sample event information and the event reference information, comprising:
[0033] For any of the sample ECG segments, an event positioning loss is determined based on a difference between the reference event coverage region corresponding to the sample ECG segment and the predicted event coverage region corresponding to the sample ECG segment, and an event type prediction loss is determined based on a difference between the reference event type corresponding to the sample ECG segment and the predicted event type corresponding to the sample ECG segment.
[0034] The second loss is determined based on the event positioning loss corresponding to each of the sample ECG segments and the event type prediction loss corresponding to each of the sample ECG segments.
[0035] In an exemplary embodiment, the global ECG feature extraction module comprises at least two convolution layers for generating the variation of the time scale.
[0036] The local ECG feature extraction module comprises at least two bidirectional long short-term memory network layers.
[0037] The electrocardio feature fusion module is configured to splice the features output by the last network layer of the global electrocardio feature extraction module and the features output by the last network layer of the local electrocardio feature extraction module, and perform feature fusion on the spliced result.
[0038] According to an aspect of an embodiment of the present application, an electrocardio data processing apparatus is provided, the apparatus comprising:
[0039] a target electrocardio sequence acquisition module configured to acquire a target electrocardio sequence;
[0040] a target electrocardio sequence processing module configured to input the target electrocardio sequence into an electrocardio data processing model to perform electrocardio information mining, and obtain heart beat distribution information and event information of cardiac electrical activity, the heart beat distribution information comprising a heart beat type in the target electrocardio sequence, and the event information comprising an event coverage area and an event type;
[0041] The electrocardio data processing model is an end-to-end model that synchronously outputs the heart beat type, the event coverage area and the event type.
[0042] In an exemplary embodiment, the target electrocardio sequence processing module is configured to perform the following operations:
[0043] based on the event information, calibrating the heart beat distribution information to obtain calibrated heart beat distribution information;
[0044] or,
[0045] based on the heart beat distribution information, calibrating the event information to obtain calibrated event information.
[0046] In an exemplary embodiment, the target electrocardio sequence processing module is configured to perform the following operations:
[0047] acquire a sample electrocardio sequence, and acquire heart beat reference information and event reference information corresponding to the sample electrocardio sequence;
[0048] construct a preset model, the preset model comprising a global electrocardio feature extraction module, a local electrocardio feature extraction module, an electrocardio feature fusion module, an event positioning module, an event classification module, and a heart beat classification module;
[0049] based on the global electrocardio feature extraction module, perform global electrocardio feature extraction on the sample electrocardio sequence to obtain global electrocardio features;
[0050] based on the local electrocardio feature extraction module, perform local electrocardio feature extraction on the global electrocardio features to obtain local electrocardio features;
[0051] input the global electrocardio feature and the local electrocardio feature into the electrocardio feature fusion module, perform electrocardio feature fusion, and obtain a fusion electrocardio feature;
[0052] input the fusion electrocardio feature into the heart beat classification module, the event positioning module and the event classification module respectively, perform heart beat classification, event positioning and event classification respectively, and obtain sample heart beat distribution information and sample event information of cardiac electrophysiological activity;
[0053] determine a first loss based on a difference between the sample heart beat distribution information and the heart beat reference information;
[0054] determine a second loss based on a difference between the sample event information and the event reference information;
[0055] adjust parameters of each module in the preset model based on the first loss and the second loss, and obtain the electrocardio data processing model.
[0056] In an exemplary embodiment, the target electrocardio sequence processing module is configured to perform the following operations:
[0057] divide the sample electrocardio sequence into a plurality of equal-length sample electrocardio segments based on a first preset step size;
[0058] divide each of the sample electrocardio segments into a plurality of equal-length sample electrocardio regions based on a second preset step size;
[0059] The heart beat reference information includes a reference heart beat type corresponding to each of the sample electrocardio regions, and the event reference information includes a reference event coverage region and a reference event type corresponding to each of the sample electrocardio segments.
[0060] In an exemplary embodiment, the target electrocardio sequence processing module is configured to perform the following operations:
[0061] determine the first preset step size and the second preset step size based on a variation of a time scale in a global electrocardio feature extraction process.
[0062] In an exemplary embodiment, the sample heart beat distribution information includes a predicted heart beat type corresponding to each of the sample electrocardio regions, and the target electrocardio sequence processing module is configured to perform the following operations:
[0063] For any of the sample electrocardio regions, determine a corresponding heart beat type prediction loss based on a difference between a reference heart beat type corresponding to the sample electrocardio region and a corresponding predicted heart beat type;
[0064] determine the first loss based on the heart beat type prediction loss corresponding to each of the sample electrocardio regions.
[0065] In an example embodiment, the sample event information includes a predicted event coverage area and a predicted event type corresponding to each of the sample ECG segments, and the target ECG sequence processing module is configured to perform the following operations:
[0066] For any of the sample ECG segments, an event positioning loss corresponding to the sample ECG segment is determined based on a difference between a reference event coverage area corresponding to the sample ECG segment and a predicted event coverage area corresponding to the sample ECG segment, and an event type prediction loss corresponding to the sample ECG segment is determined based on a difference between a reference event type corresponding to the sample ECG segment and a predicted event type corresponding to the sample ECG segment.
[0067] The second loss is determined based on the event positioning loss corresponding to each of the sample ECG segments and the event type prediction loss corresponding to each of the sample ECG segments.
[0068] In an example embodiment, the global ECG feature extraction module includes at least two convolutional layers configured to generate a change in a time scale.
[0069] The local ECG feature extraction module includes at least two bidirectional long short-term memory network layers.
[0070] The ECG feature fusion module is configured to concatenate the feature output by the last network layer of the global ECG feature extraction module with the feature output by the last network layer of the local ECG feature extraction module, and perform feature fusion on the concatenation result.
[0071] According to an aspect of an embodiment of the present application, a computer device is provided, which includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the above-mentioned ECG data processing method.
[0072] According to an aspect of an embodiment of the present application, a computer readable storage medium is provided, which stores at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by a processor to implement the above-mentioned ECG data processing method.
[0073] According to an aspect of an embodiment of the present application, a computer program product is provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to perform to implement the above-mentioned ECG data processing method.
[0074] The technical scheme provided by the embodiments of the present application can bring the following beneficial effects:
[0075] The embodiments of the present application provide an electrocardio data processing method and device and a storage medium. The electrocardio data processing model is directly trained in an end-to-end manner, without relying on other electrocardio signal analysis methods. For an input target electrocardio sequence, the electrocardio data processing model can directly output the heartbeat distribution information and the event information of the cardiac electrical activity in the target electrocardio sequence in an end-to-end manner. Moreover, the electrocardio data processing model has a global view, and has no limitation on the length of the input target electrocardio sequence. The electrocardio data processing model can directly input the electrocardio data without cutting the electrocardio data into fixed-length electrocardio data segments. The electrocardio data processing model directly mines the event information of the cardiac electrical activity in an end-to-end manner, without relying on assumed information, and greatly improves the mining accuracy of the event information of the cardiac electrical activity. BRIEF DESCRIPTION OF DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0077] Figure 1 is a schematic diagram of an application running environment provided by an embodiment of the present application;
[0078] Figure 2 is a flowchart of an electrocardio data processing method provided by an embodiment of the present application;
[0079] Figure 3 is a flowchart of an electrocardio data processing model training method provided by an embodiment of the present application;
[0080] Figure 4 is a schematic diagram of a preset model architecture provided by an embodiment of the present application;
[0081] Figure 5 is a flowchart of a first loss determination method provided by an embodiment of the present application;
[0082] Figure 6 is a flowchart of a second loss determination method provided by an embodiment of the present application;
[0083] Figure 7 is a block diagram of an electrocardio data processing device provided by an embodiment of the present application;
[0084] Figure 8is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0085] For the purpose, technical solutions and advantages of the present application to be clearer, the embodiments of the present application will be further described in detail below with reference to the drawings. It should be noted that the various data used by the embodiments of the present application are fully authorized by the relevant subjects before use.
[0086] Reference is made to Figure 1 which shows a schematic diagram of an application running environment provided by an embodiment of the present application in an exemplary embodiment. The application running environment can include a terminal 10 and a server 20.
[0087] The terminal 10 includes but is not limited to a mobile phone, a computer, a smart voice interactive device, a smart home appliance, a vehicle-mounted terminal, a game console, an e-book reader, a multimedia playback device, a wearable device, and the like. The terminal 10 can install a client of an application.
[0088] In the embodiments of the present application, the above-mentioned application can be any application running an electrocardiogram data processing service and supporting electrocardiogram data processing. Typically, the application is a smart medical application. Of course, in addition to the smart medical application, other types of applications can also run the electrocardiogram data processing service and support the electrocardiogram data processing. For example, a virtual reality (Virtual Reality, VR) application, an augmented reality (Augmented Reality, AR) application, and the like, which are not limited by the embodiments of the present application. Optionally, the terminal 10 runs a client of the above-mentioned application.
[0089] The server 20 is configured to provide a background service for the client of the application in the terminal 10. For example, the server 20 can be a background server of the above-mentioned application. The server 20 can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, and the like. Basic cloud computing services. Optionally, the server 20 simultaneously provides a background service for the applications in multiple terminals 10.
[0090] Optionally, the terminal 10 and the server 20 can communicate with each other through a network 30. The terminal 10 and the server 20 can be directly or indirectly connected through wired or wireless communication, which is not limited by the present application.
[0091] Referring to Figure 2 , a flow chart of an electrocardiogram data processing method is shown. The method can be applied in a computer device, which is an electronic device with data computing and processing capability. The execution subject of each step can be a device in the application environment as shown. Figure 1 The method can include the following steps:
[0092] Step S201. Obtain a target electrocardiogram sequence.
[0093] The target electrocardiogram sequence can be a sequence obtained by sampling an ECG signal, which is not described herein.
[0094] Step S202. Input the target electrocardiogram sequence into an electrocardiogram data processing model to perform electrocardiogram information mining, to obtain heart beat distribution information and event information of cardiac electrical activity, the heart beat distribution information including heart beat types in the target electrocardiogram sequence, and the event information including event coverage areas and event types; wherein the electrocardiogram data processing model is an end-to-end model that synchronously outputs the heart beat types, the event coverage areas and the event types.
[0095] In the embodiments of the present application, a heart beat refers to a complete process of heart contraction and relaxation, including ventricular contraction (pumping blood out of the heart) and relaxation (refilling the ventricle with blood). Under normal circumstances, heart beats are regular, and each heartbeat is accompanied by a heartbeat sound. Heart beat frequency is usually referred to as heart rate, i.e. the number of heartbeats per minute. Different behaviors of heart beats can be classified into several types. In an exemplary embodiment, the heart beat types can be divided into 11 types, namely, heart beat O, normal heart beat N, atrial premature beat S, ventricular premature beat V, bundle branch block B, ventricular pre-excitation M, atrial escape Se, ventricular escape Ve, junctional escape Je, non-transmitted atrial premature beat Sa, and artifact X.
[0096] In the embodiments of the present application, the event information of cardiac electrical activity refers to events generated by cardiac electrical activity. The specific event types of events generated by cardiac electrical activity are not limited in the embodiments of the present application. In an exemplary embodiment, the events can be divided into 24 types, namely, sinus rhythm, sinus bradycardia, sinus tachycardia, single atrial premature beat, paired atrial premature beat, atrial premature beat bigeminy, atrial premature beat trigeminy, atrial tachycardia, single ventricular premature beat, paired ventricular premature beat, ventricular premature beat bigeminy, ventricular premature beat trigeminy, ventricular tachycardia, pause, atrial fibrillation, atrial fibrillation with slow ventricular rate, atrial fibrillation with fast ventricular rate, ST segment elevation, ST segment depression, first degree atrioventricular block, second degree type I atrioventricular block, second degree type II atrioventricular block, third degree atrioventricular block, and second degree type II atrioventricular block. The event coverage area refers to the corresponding area in the target electrocardiogram sequence where the corresponding event occurs.
[0097] The electrocardio data processing method proposed in the embodiments of the present application is implemented through the trained end-to-end electrocardio data processing model. The electrocardio data processing model synchronously outputs the heartbeat type, the event coverage area and the event type, so that the heartbeat distribution information and the event information of the cardiac electrophysiological activity in the target electrocardio sequence can be directly output in an end-to-end mode without combining other electrocardio signal analysis methods. Moreover, the electrocardio data processing model has a global view, and the length of the target electrocardio sequence input is not limited, and the target electrocardio sequence does not need to be cut into electrocardio data segments of a fixed length, but can be directly input into the electrocardio data processing model. The electrocardio data processing model directly mines the event information of the cardiac electrophysiological activity in an end-to-end mode without relying on the assumed information, and greatly improves the mining accuracy of the event information of the cardiac electrophysiological activity.
[0098] In an exemplary embodiment, the method further comprises: calibrating the heartbeat distribution information based on the event information to obtain calibrated heartbeat distribution information; or, calibrating the event information based on the heartbeat distribution information to obtain calibrated event information. That is, the event information and the heartbeat distribution information can each serve as a kind of calibration information for the other to improve the accuracy of the other. This is because the event information and the heartbeat distribution information are simultaneously predicted by the end-to-end electrocardio data processing model and have the same source characteristics, so they can further mutually calibrate each other to improve the accuracy of each other.
[0099] For example, in some cases, such as the presence of events such as block, pause, frequent atrial tachycardia, sinus tachycardia, atrial fibrillation, etc., it is difficult to distinguish heartbeats such as atrial premature beats S and non-transmitted atrial premature beats Sa, but if the type and coverage area of these events are assisted in heartbeat discrimination, the discrimination difficulty can be significantly reduced, and the accuracy can be greatly improved. Of course, the specific way of mutual calibration is not limited by the embodiments of the present application, and does not constitute an implementation obstacle.
[0100] Please refer to Figure 3 which shows a flowchart of an electrocardio data processing model training method in the embodiments of the present application. The electrocardio data processing model is obtained by training the following method:
[0101] Step S301. Obtain a sample electrocardio sequence, and obtain heartbeat reference information and event reference information corresponding to the sample electrocardio sequence.
[0102] For any sample ECG sequence, the sample ECG sequence can be divided into a plurality of equal-length sample ECG segments based on a first preset step size; each of the sample ECG segments can be divided into a plurality of equal-length sample ECG regions based on a second preset step size; the reference heartbeat information includes a reference heartbeat type corresponding to each of the sample ECG regions; and the event reference information includes a reference event coverage region and a reference event type corresponding to each of the sample ECG segments. The specific values of the first preset step size and the second preset step size are not limited in the embodiments of the present application, but are related to the structure of the ECG data processing model and cannot be set at will.
[0103] The reference heartbeat type indicates the specific heartbeat type of the corresponding sample ECG region. In an exemplary embodiment, the reference heartbeat type is represented by the following encoding table:
[0104]
[0105]
[0106] The reference event coverage region indicates the duration region of the event of the cardiac electrophysiological activity occurring in the corresponding sample ECG segment, which is a kind of positioning information. The reference event type indicates the type of the event of the cardiac electrophysiological activity occurring in the corresponding sample ECG segment, which is a kind of type information.
[0107] The reference heartbeat type, the reference event coverage region, and the reference event type are reference information for each sample ECG segment and each sample ECG region, which are determined according to the heartbeat type that has been marked out in the sample ECG sequence, the occurrence position of the heartbeat type, the type of the event of the cardiac electrophysiological activity, and the action region. These reference information are used as the true value data used in model training.
[0108] Step S302. Construct a preset model, which includes a global ECG feature extraction module, a local ECG feature extraction module, an ECG feature fusion module, an event positioning module, an event classification module, and a heartbeat classification module.
[0109] The preset model is a model specially set in the embodiments of the present application for training the end-to-end ECG data processing model. Please refer to Figure 4Fig. 1 is a schematic diagram of an architecture of a preset model in an embodiment of the present application. The global ECG feature extraction module 401 is connected to the local ECG feature extraction module 402 in the preset model, and the ECG feature fusion module 403 is used to splice the features output by the last network layer of the global ECG feature extraction module 401 and the features output by the last network layer of the local ECG feature extraction module 402, and perform feature fusion on the spliced result. The fusion result is transmitted to the event positioning module 404, the event classification module 405 and the heartbeat classification module 406 respectively to perform event positioning, event classification and heartbeat classification respectively, so as to achieve the technical purpose of synchronous output of the prediction result of event positioning (predicted event coverage area in the following), the prediction result of event classification (predicted event type in the following) and the prediction result of heartbeat classification (predicted heartbeat type in the following).
[0110] For example, the global ECG feature extraction module 401 includes at least two convolutional layers for generating changes in the time scale; for example, the global ECG feature extraction module 401 includes 5 convolutional layers, and the step length of each convolutional layer is 2, so that after the global ECG feature extraction module 401, the data undergoes 5 times of dimension reduction, and the length is reduced by 32 times. In cooperation with the structure, the present application designs the specific values of the first preset step length and the second preset step length, and the specific expression of the heartbeat reference information and the event reference information, so as to achieve the purpose of constructing specific true value data and model training in cooperation with the preset model structure, and finally realize end-to-end model training.
[0111] Exemplarily, the local electrocardio feature extraction module 402 includes at least two bidirectional long short-term memory network layers (BiLSTM). For example, the local electrocardio feature extraction module 402 can include three bidirectional long short-term memory network layers (BiLSTM layers), the first BiLSTM layer can process sequences and capture long-term dependencies in the sequences, which is particularly important for ECG signal analysis. The second BiLSTM layer and the third BiLSTM are used to enhance the model's ability to capture sequence features. The introduction of several BiLSTM layers in the preset model can significantly improve the model's ability to integrate time series features. The BiLSTM layer can more comprehensively capture the temporal dependencies in the electrocardio signal by simultaneously analyzing past and future information, which is crucial for identifying and distinguishing different types of heartbeats and arrhythmias. This bidirectional information flow enables the model to provide richer feature representations with a global perspective, thereby improving the accuracy of classification and reducing false positives. In addition, the bidirectional nature of the BiLSTM layer helps improve the model's generalization ability, allowing it to maintain stable performance when faced with new, unseen data. The BiLSTM layer also improves the model's robustness to noise by reducing the impact of noise through its memory cells and more accurately locating the positions of heartbeats.
[0112] Further, in the electrocardio feature fusion layer, feature splicing can be performed, and the splicing result is fused by a 1x1 convolution layer, which allows the model to recombine and fuse the channels of the features without changing the spatial dimensions. This helps the model learn the correlation between different channels and enhance the expressiveness of the features. After feature fusion, the model synchronously transmits the fusion results to the event positioning module 404, the event classification module 405, and the heartbeat classification module 406. This structural design has the following effects:
[0113] 1. Information sharing: By sharing the same high-dimensional features, the event positioning module 404, the event classification module 405, and the heartbeat classification module 406 can use the same information base for their respective tasks. This helps reduce redundant calculations and improve model efficiency. The results output by the event positioning module 404, the event classification module 405, and the heartbeat classification module 406 are homologous, thereby supporting mutual correction.
[0114] 2. Feature complementarity: The event positioning module 404, the event classification module 405, and the heartbeat classification module 406 may extract different information from the shared features. For example, the event positioning module 404 may focus more on spatially related signals, while the event classification module 405 and the heartbeat classification module 406 may focus more on the statistical features of the signals. This complementarity helps the model understand the data from multiple perspectives and improve the comprehensiveness of the output.
[0115] 3. Improve learning ability: Event positioning module 404, event classification module 405, and heart beat classification module 406 each learn from each other's strengths and weaknesses, thereby achieving a partner learning effect and improving learning ability together. The model supports end-to-end training, which means that the model can optimize the parameters of all modules simultaneously through a backpropagation algorithm. This end-to-end learning helps improve the overall performance of the model.
[0116] Step S303. Based on the global electrocardio feature extraction module, global electrocardio features are extracted from the sample electrocardio sequence.
[0117] The first preset step size and the second preset step size can be determined based on the amount of change in the time scale during the global electrocardio feature extraction process. Using the previous example, the global electrocardio feature extraction module includes 5 convolutional layers, each with a step size of 2. After passing through the global electrocardio feature extraction module, the data is reduced in dimension by 5 times, and the length is reduced by 32 times.
[0118] In this case, each sampling point in the sample electrocardio sequence corresponds to an electrocardio signal, and the actual time it represents is 2ms. The sample electrocardio sequence is divided into several sample electrocardio segments, each with 32000 sampling points (i.e., 64s of actual time). If the last sample electrocardio segment is not enough, zeros are added to the end until there are 32000 sampling points, resulting in multiple equal-length sample electrocardio segments. For each sample electrocardio segment Mi, there are 32000 sampling points, each representing 2ms of actual time.
[0119] Since the 5-layer dimension reduction reduces the data by 32 times, after global electrocardio feature extraction, each point corresponds to an actual time of 64ms. For Mi, after global electrocardio feature extraction, the data points in CNN_Mi become 32000 / 32 = 1000, each representing 64ms of actual time. Based on this, each sample electrocardio segment Mi with 32000 sampling points can be further divided into 1000 (second preset step size) sample electrocardio regions Bi, each containing 32 points. After global electrocardio feature extraction, each sample electrocardio region Bi has only one point, equivalent to the original 32 sampling points.
[0120] Step S304. Based on the local electrocardio feature extraction module, the global electrocardio feature is subjected to local electrocardio feature extraction to obtain a local electrocardio feature; the global electrocardio feature and the local electrocardio feature are input into the electrocardio feature fusion module for electrocardio feature fusion to obtain a fused electrocardio feature; the fused electrocardio feature is input into the heartbeat classification module, the event positioning module and the event classification module respectively for heartbeat classification, event positioning and event classification to obtain sample heartbeat distribution information and sample event information of cardiac electrophysiological activity.
[0121] Specifically, the sample heartbeat distribution information includes a predicted heartbeat type corresponding to each sample electrocardio region, and the sample event information includes a predicted event coverage region and a predicted event type corresponding to each sample electrocardio segment.
[0122] Step S305. Based on the difference between the sample heartbeat distribution information and the heartbeat reference information, a first loss is determined.
[0123] Please refer to Figure 5 which shows a first loss determination method flowchart in the embodiment of the present application. Specifically, the first loss is determined based on the difference between the sample heartbeat distribution information and the heartbeat reference information, including:
[0124] Step S501. For any sample electrocardio region, a heartbeat type prediction loss corresponding to the sample electrocardio region is determined based on the difference between the reference heartbeat type corresponding to the sample electrocardio region and the predicted heartbeat type corresponding to the sample electrocardio region.
[0125] The embodiment of the present application does not limit the quantification method of the difference between the reference heartbeat type corresponding to the sample electrocardio region and the predicted heartbeat type corresponding to the sample electrocardio region, for example, cross-entropy loss can be used.
[0126] Step S502. The first loss is determined based on the heartbeat type prediction loss corresponding to each sample electrocardio region.
[0127] For example, the sum of the heartbeat type prediction loss corresponding to each sample electrocardio region is determined as the first loss.
[0128] Step S306. Based on the difference between the sample event information and the event reference information, a second loss is determined.
[0129] Please refer to Figure 6 which shows a second loss determination method flowchart in the embodiment of the present application. Specifically, the second loss is determined based on the difference between the sample event information and the event reference information, including:
[0130] Step S601. For any of the sample ECG segments, determining a corresponding event positioning loss based on a difference between a corresponding reference event coverage region and a corresponding predicted event coverage region of the sample ECG segment, and determining a corresponding event type prediction loss based on a difference between a corresponding reference event type and a corresponding predicted event type of the sample ECG segment.
[0131] The embodiments of the present application do not limit the quantification method of the difference between the corresponding reference event coverage region and the corresponding predicted event coverage region of the sample ECG segment, for example, the mean absolute error loss can be used. Of course, the quantification method of the difference between the corresponding reference event type and the corresponding predicted event type of the sample ECG segment is also not limited, for example, the cross-entropy loss can be used.
[0132] Step S602. Determining the second loss based on the event positioning loss corresponding to each of the sample ECG segments respectively and the event type prediction loss corresponding to each of the sample ECG segments respectively.
[0133] For example, the sum of the event positioning loss corresponding to each of the sample ECG segments respectively and the event type prediction loss corresponding to each of the sample ECG segments respectively can be determined as the second loss.
[0134] Step S307. Adjusting the parameters of each module in the preset model based on the first loss and the second loss to obtain the ECG data processing model.
[0135] Specifically, the weighted sum value of the first loss and the second loss can be used as the total loss of the model, and of course, the embodiments of the present application do not limit the weight value, which can be set according to the actual situation, and based on the total loss, the parameters of each module in the preset model are adjusted, and after the parameter adjustment is stopped, the ECG data processing model is obtained.
[0136] The embodiments of the present application do not limit the parameter adjustment method, for example, the gradient descent method can be used. The parameter adjustment can be stopped when the number of parameter adjustment reaches a preset number threshold or when the total loss is less than a preset loss threshold, and the ECG data processing model is obtained. The embodiments of the present application do not set the preset number threshold and the preset loss threshold, which can be freely selected according to the actual situation, and does not constitute an implementation obstacle.
[0137] The following is an embodiment of the device of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0138] Please refer to Figure 7FIG. 1 is a block diagram of an electrocardio data processing device according to an example embodiment. The device has functions to implement the electrocardio data processing method described above, which can be implemented by hardware or by executing corresponding software by hardware. The device can be a computer device or can be arranged in a computer device. The device can include:
[0139] an object electrocardio sequence acquisition module 701 configured to acquire an object electrocardio sequence;
[0140] an object electrocardio sequence processing module 702 configured to input the object electrocardio sequence into an electrocardio data processing model to perform electrocardio information mining, to obtain heart beat distribution information and event information of cardiac electrical activity, the heart beat distribution information including a heart beat type in the object electrocardio sequence, and the event information including an event coverage area and an event type;
[0141] The electrocardio data processing model is an end-to-end model that synchronously outputs the heart beat type, the event coverage area, and the event type.
[0142] In an example embodiment, the object electrocardio sequence processing module 702 is configured to perform the following operations:
[0143] calibrate the heart beat distribution information based on the event information to obtain calibrated heart beat distribution information;
[0144] or,
[0145] calibrate the event information based on the heart beat distribution information to obtain calibrated event information.
[0146] In an example embodiment, the object electrocardio sequence processing module 702 is configured to perform the following operations:
[0147] acquire a sample electrocardio sequence, and acquire heart beat reference information and event reference information corresponding to the sample electrocardio sequence;
[0148] construct a preset model, the preset model including a global electrocardio feature extraction module, a local electrocardio feature extraction module, an electrocardio feature fusion module, an event positioning module, an event classification module, and a heart beat classification module;
[0149] extract global electrocardio features from the sample electrocardio sequence based on the global electrocardio feature extraction module to obtain the global electrocardio features;
[0150] extract local electrocardio features from the global electrocardio features based on the local electrocardio feature extraction module to obtain the local electrocardio features;
[0151] input the global electrocardio feature and the local electrocardio feature into the electrocardio feature fusion module, perform electrocardio feature fusion, and obtain a fusion electrocardio feature;
[0152] input the fusion electrocardio feature into the heart beat classification module, the event positioning module and the event classification module respectively, perform heart beat classification, event positioning and event classification respectively, and obtain sample heart beat distribution information and sample event information of cardiac electrophysiological activity;
[0153] determine a first loss based on a difference between the sample heart beat distribution information and the heart beat reference information;
[0154] determine a second loss based on a difference between the sample event information and the event reference information;
[0155] adjust parameters of each module in the preset model based on the first loss and the second loss, and obtain the electrocardio data processing model.
[0156] In an exemplary embodiment, the target electrocardio sequence processing module 702 is configured to perform the following operations:
[0157] divide the sample electrocardio sequence into a plurality of equal-length sample electrocardio segments based on a first preset step size;
[0158] divide each of the sample electrocardio segments into a plurality of equal-length sample electrocardio regions based on a second preset step size;
[0159] The heart beat reference information includes a reference heart beat type corresponding to each of the sample electrocardio regions, and the event reference information includes a reference event coverage region and a reference event type corresponding to each of the sample electrocardio segments.
[0160] In an exemplary embodiment, the target electrocardio sequence processing module 702 is configured to perform the following operations:
[0161] determine the first preset step size and the second preset step size based on a variation of time scale in a global electrocardio feature extraction process.
[0162] In an exemplary embodiment, the sample heart beat distribution information includes a predicted heart beat type corresponding to each of the sample electrocardio regions, and the target electrocardio sequence processing module 702 is configured to perform the following operations:
[0163] For any of the sample electrocardio regions, determine a corresponding heart beat type prediction loss based on a difference between a reference heart beat type corresponding to the sample electrocardio region and a corresponding predicted heart beat type;
[0164] determine the first loss based on the heart beat type prediction loss corresponding to each of the sample electrocardio regions respectively.
[0165] In an example embodiment, the sample event information includes a predicted event coverage area and a predicted event type corresponding to each of the sample ECG segments, and the target ECG sequence processing module 702 is configured to perform the following operations:
[0166] For any of the sample ECG segments, determine a corresponding event positioning loss based on a difference between the corresponding reference event coverage area and the corresponding predicted event coverage area of the sample ECG segment, and determine a corresponding event type prediction loss based on a difference between the corresponding reference event type and the corresponding predicted event type of the sample ECG segment.
[0167] Determine the second loss based on the event positioning loss corresponding to each of the sample ECG segments and the event type prediction loss corresponding to each of the sample ECG segments.
[0168] In an example embodiment, the global ECG feature extraction module includes at least two convolutional layers for generating a change in time scale.
[0169] The local ECG feature extraction module includes at least two bidirectional long short-term memory network layers.
[0170] The ECG feature fusion module is configured to concatenate the feature output by the last network layer of the global ECG feature extraction module with the feature output by the last network layer of the local ECG feature extraction module, and perform feature fusion on the concatenation result.
[0171] It should be noted that the device provided in the above embodiments, in realizing its functions, is only exemplified by the above division of functional modules, and in actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is described in detail in the method embodiments, which will not be repeated here.
[0172] Please refer to Figure 8 which shows a structural block diagram of a computer device in an example embodiment for executing the above ECG data processing method. Specifically:
[0173] The computer device 800 includes a central processing unit (CPU) 801, a system memory 804, including a random access memory (RAM) 802 and a read-only memory (ROM) 803, and a system bus 805 that couples the system memory 804 to the central processing unit 801. The computer device 800 also includes an input / output (I / O) system 806 that helps transfer information between the various devices within the computer, and a mass storage device 807 for storing an operating system 813, application programs 814, and other program modules 815.
[0174] The I / O system 806 includes a display 808 for displaying information and an input device 809, such as a mouse, keyboard, or the like, for inputting information into the computer. Both the display 808 and the input device 809 are connected to the central processing unit 801 through an input / output controller 810 that is connected to the system bus 805. The I / O system 806 can also include the input / output controller 810 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 810 also provides output to a display screen, printer, or other type of output device.
[0175] The mass storage device 807 is connected to the central processing unit 801 through a mass storage controller (not shown) that is connected to the system bus 805. The mass storage device 807 and its associated computer-readable media provide non-volatile storage for the computer device 800. That is, the mass storage device 807 can include a computer- readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0176] Without loss of generality, the computer readable medium can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid state memory technology, CD-ROM, DVD (Digital Video Disc), or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, computer storage media does not limit to the above-mentioned several kinds. The system memory 804 and the mass storage device 807 mentioned above can be collectively referred to as memory.
[0177] According to various embodiments of the present application, the computer device 800 can also run on a remote computer connected to the network through a network such as the Internet. That is, the computer device 800 can be connected to the network 812 through the network interface unit 811 connected to the system bus 805, or can be connected to other types of networks or remote computer systems (not shown) using the network interface unit 811.
[0178] The above-mentioned memory further includes a computer program stored in the memory and configured to be executed by one or more processors to implement the above-mentioned electrocardio data processing method.
[0179] In the exemplary embodiments, a computer readable storage medium is also provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and when executed by a processor, the at least one instruction, the at least one program, the code set or the instruction set implement the above-mentioned electrocardio data processing method.
[0180] Specifically, the electrocardio data processing method includes:
[0181] obtaining a target electrocardio sequence;
[0182] inputting the target electrocardio sequence into an electrocardio data processing model for electrocardio information mining to obtain heartbeat distribution information and event information of cardiac electrical activity, the heartbeat distribution information including heartbeat types in the target electrocardio sequence, and the event information including event coverage area and event type;
[0183] The ECG data processing model is an end-to-end model that synchronously outputs the heartbeat type, the event coverage area, and the event type.
[0184] In an exemplary embodiment, the method further comprises:
[0185] Based on the event information, the heartbeat distribution information is calibrated to obtain calibrated heartbeat distribution information.
[0186] Or,
[0187] Based on the heartbeat distribution information, the event information is calibrated to obtain calibrated event information.
[0188] In an exemplary embodiment, the ECG data processing model is obtained by training the following method:
[0189] Obtain a sample ECG sequence, and obtain heartbeat reference information and event reference information corresponding to the sample ECG sequence;
[0190] Construct a preset model, the preset model comprising a global ECG feature extraction module, a local ECG feature extraction module, an ECG feature fusion module, an event positioning module, an event classification module, and a heartbeat classification module;
[0191] Based on the global ECG feature extraction module, the global ECG feature extraction module is used to extract global ECG features from the sample ECG sequence;
[0192] Based on the local ECG feature extraction module, the local ECG feature extraction module is used to extract local ECG features from the global ECG features;
[0193] The global ECG features and the local ECG features are input into the ECG feature fusion module for ECG feature fusion to obtain fused ECG features;
[0194] The fused ECG features are input into the heartbeat classification module, the event positioning module, and the event classification module, respectively, for heartbeat classification, event positioning, and event classification to obtain sample heartbeat distribution information and sample event information of cardiac electrophysiological activity;
[0195] Based on the difference between the sample heartbeat distribution information and the heartbeat reference information, a first loss is determined;
[0196] Based on the difference between the sample event information and the event reference information, a second loss is determined;
[0197] Based on the first loss and the second loss, the parameters of each module in the preset model are adjusted to obtain the ECG data processing model.
[0198] In an exemplary embodiment, the method further comprises:
[0199] dividing the sample electrocardio sequence into a plurality of equal-length sample electrocardio segments based on a first preset step size;
[0200] dividing each of the sample electrocardio segments into a plurality of equal-length sample electrocardio regions based on a second preset step size;
[0201] wherein the heart beat reference information comprises a reference heart beat type corresponding to each of the sample electrocardio regions; and the event reference information comprises a reference event coverage region and a reference event type corresponding to each of the sample electrocardio segments.
[0202] In an exemplary embodiment, the method further comprises:
[0203] determining the first preset step size and the second preset step size based on a variation of time scale in a global electrocardio feature extraction process.
[0204] In an exemplary embodiment, the sample heart beat distribution information comprises a predicted heart beat type corresponding to each of the sample electrocardio regions, and determining the first loss based on a difference between the sample heart beat distribution information and the heart beat reference information comprises:
[0205] for any of the sample electrocardio regions, determining a corresponding heart beat type prediction loss based on a difference between the reference heart beat type corresponding to the sample electrocardio region and the predicted heart beat type corresponding to the sample electrocardio region;
[0206] determining the first loss based on the heart beat type prediction loss corresponding to each of the sample electrocardio regions.
[0207] In an exemplary embodiment, the sample event information comprises a predicted event coverage region and a predicted event type corresponding to each of the sample electrocardio segments, and determining the second loss based on a difference between the sample event information and the event reference information comprises:
[0208] for any of the sample electrocardio segments, determining a corresponding event positioning loss based on a difference between the reference event coverage region corresponding to the sample electrocardio segment and the predicted event coverage region corresponding to the sample electrocardio segment, and determining a corresponding event type prediction loss based on a difference between the reference event type corresponding to the sample electrocardio segment and the predicted event type corresponding to the sample electrocardio segment;
[0209] determining the second loss based on the event positioning loss corresponding to each of the sample electrocardio segments and the event type prediction loss corresponding to each of the sample electrocardio segments.
[0210] In an exemplary embodiment, the global electrocardio feature extraction module comprises at least two convolutional layers for generating a change in time scale;
[0211] The local electrocardio feature extraction module comprises at least two bidirectional long short-term memory network layers.
[0212] The electrocardio feature fusion module is configured to concatenate the feature output by the last network layer of the global electrocardio feature extraction module and the feature output by the last network layer of the local electrocardio feature extraction module, and perform feature fusion on the concatenation result.
[0213] Optionally, the computer readable storage medium can include ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), optical disc, etc. Among them, the random access memory can include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0214] In an exemplary embodiment, a computer program product or computer program is also provided, which comprises computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the above-mentioned electrocardio data processing method.
[0215] It should be understood that "multiple" mentioned herein refers to two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship. In addition, the step numbers described herein only exemplarily show a possible execution order between steps, and in some other embodiments, the above steps can also be executed in a different order from the number order, such as simultaneously executing two steps with different numbers, or executing two steps with different numbers in an order opposite to the illustration, and the embodiments of the present application do not limit this.
[0216] In addition, in the specific embodiments of the present application, data related to user information and the like are involved, and when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of countries and regions.
[0217] The above are only exemplary embodiments of the present application and are not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. An electrocardiogram data processing method, characterized in that, the method comprises: obtaining a target electrocardiogram sequence; inputting the target electrocardiogram sequence into an electrocardiogram data processing model to perform electrocardiogram information mining, to obtain heartbeat distribution information and event information of cardiac electrical activity, the heartbeat distribution information comprising a heartbeat type in the target electrocardiogram sequence, and the event information comprising an event coverage area and an event type; wherein the electrocardiogram data processing model is an end-to-end model that synchronously outputs the heartbeat type, the event coverage area, and the event type; and the electrocardiogram data processing model is obtained by training through the following method: obtaining a sample electrocardiogram sequence, and obtaining heartbeat reference information and event reference information corresponding to the sample electrocardiogram sequence; constructing a preset model, the preset model comprising a global electrocardiogram feature extraction module, a local electrocardiogram feature extraction module, an electrocardiogram feature fusion module, an event positioning module, an event classification module, and a heartbeat classification module; based on the global electrocardiogram feature extraction module, performing global electrocardiogram feature extraction on the sample electrocardiogram sequence to obtain global electrocardiogram features; based on the local electrocardiogram feature extraction module, performing local electrocardiogram feature extraction on the global electrocardiogram features to obtain local electrocardiogram features; inputting the global electrocardiogram features and the local electrocardiogram features into the electrocardiogram feature fusion module to perform electrocardiogram feature fusion, to obtain fused electrocardiogram features; inputting the fused electrocardiogram features into the heartbeat classification module, the event positioning module, and the event classification module, respectively, to perform heartbeat classification, event positioning, and event classification, respectively, to obtain sample heartbeat distribution information and sample event information of cardiac electrical activity; based on a difference between the sample heartbeat distribution information and the heartbeat reference information, determining a first loss; based on a difference between the sample event information and the event reference information, determining a second loss; based on the first loss and the second loss, adjusting parameters of each module in the preset model to obtain the electrocardiogram data processing model; based on the event information, calibrating the heartbeat distribution information to obtain calibrated heartbeat distribution information; or, based on the heartbeat distribution information, calibrating the event information to obtain calibrated event information.
2. The method of claim 1, characterized in that, the method further comprises: dividing the sample electrocardiogram sequence into a plurality of equal-length sample electrocardiogram segments based on a first preset step length; dividing each of the sample electrocardiogram segments into a plurality of equal-length sample electrocardiogram regions based on a second preset step length; wherein the heartbeat reference information comprises a reference heartbeat type corresponding to each of the sample electrocardiogram regions; and the event reference information comprises a reference event coverage area and a reference event type corresponding to each of the sample electrocardiogram segments.
3. The method of claim 2, characterized in that, the method further comprises: based on a variation amount of a time scale in a global electrocardiogram feature extraction process, determining the first preset step length and the second preset step length.
4. The method of claim 3, characterized in that, The sample heartbeat distribution information includes a predicted heartbeat type corresponding to each sample electrocardio region, and the first loss is determined based on a difference between the sample heartbeat distribution information and the heartbeat reference information. For any sample electrocardio region, a corresponding heartbeat type prediction loss is determined based on a difference between a reference heartbeat type corresponding to the sample electrocardio region and a predicted heartbeat type corresponding to the sample electrocardio region. The first loss is determined based on the heartbeat type prediction loss corresponding to each sample electrocardio region.
5. The method of claim 4, wherein the sample event information includes a predicted event coverage region and a predicted event type corresponding to each sample electrocardio segment, and the second loss is determined based on a difference between the sample event information and the event reference information. For any sample electrocardio segment, an event positioning loss is determined based on a difference between a reference event coverage region corresponding to the sample electrocardio segment and a predicted event coverage region corresponding to the sample electrocardio segment, and an event type prediction loss is determined based on a difference between a reference event type corresponding to the sample electrocardio segment and a predicted event type corresponding to the sample electrocardio segment. The second loss is determined based on the event positioning loss corresponding to each sample electrocardio segment and the event type prediction loss corresponding to each sample electrocardio segment.
6. The method of claim 5, wherein the global electrocardio feature extraction module includes at least two convolution layers for generating a change in time scale. The local electrocardio feature extraction module includes at least two bidirectional long short-term memory network layers. The electrocardio feature fusion module is configured to concatenate the feature output by the last network layer of the global electrocardio feature extraction module with the feature output by the last network layer of the local electrocardio feature extraction module, and perform feature fusion on the concatenation result.
7. An electrocardio data processing apparatus, comprising: a target electrocardio sequence acquisition module configured to acquire a target electrocardio sequence; a target electrocardio sequence processing module configured to input the target electrocardio sequence into an electrocardio data processing model to perform electrocardio information mining, to obtain heartbeat distribution information and event information of cardiac electrical activity, the heartbeat distribution information including a heartbeat type in the target electrocardio sequence, and the event information including an event coverage region and an event type; wherein the electrocardio data processing model is an end-to-end model that synchronously outputs the heartbeat type, the event coverage region, and the event type; and the electrocardio data processing model is trained by the following method: acquiring a sample electrocardio sequence, and acquiring heartbeat reference information and event reference information corresponding to the sample electrocardio sequence; constructing a preset model, the preset model including a global electrocardio feature extraction module, a local electrocardio feature extraction module, an electrocardio feature fusion module, an event positioning module, an event classification module, and a heartbeat classification module; performing global electrocardio feature extraction on the sample electrocardio sequence based on the global electrocardio feature extraction module, to obtain global electrocardio features. extracting the local electrocardio feature based on the local electrocardio feature extraction module, to obtain a local electrocardio feature; inputting the global electrocardio feature and the local electrocardio feature into the electrocardio feature fusion module to perform electrocardio feature fusion, to obtain a fused electrocardio feature; inputting the fused electrocardio feature into the heartbeat classification module, the event positioning module and the event classification module respectively to perform heartbeat classification, event positioning and event classification respectively, to obtain sample heartbeat distribution information and sample event information of cardiac electrophysiological activity; determining a first loss based on a difference between the sample heartbeat distribution information and the heartbeat reference information; determining a second loss based on a difference between the sample event information and the event reference information; adjusting parameters of each module in the preset model based on the first loss and the second loss, to obtain the electrocardio data processing model; calibrating the heartbeat distribution information based on the event information, to obtain calibrated heartbeat distribution information; or, calibrating the event information based on the heartbeat distribution information, to obtain calibrated event information. 8.A computer readable storage medium, characterized in that, at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the electrocardio data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Electrocardiosignal analysis method, device, storage medium and processor
CN110393519A
Method, device, equipment and storage medium for detecting atrial flutter
CN110720894A
Heart beat classification model training method, classification method, equipment and storage medium
CN116342963A