Method, device, terminal and storage medium for detecting electrocardiosignals

文档序号:740581 发布日期:2021-04-23 浏览:26次 中文

阅读说明:本技术 一种检测心电信号的方法、装置、终端及存储介质 (Method, device, terminal and storage medium for detecting electrocardiosignals ) 是由 赵婷婷 孙行智 朱昭苇 徐卓扬 刘卓 于 2020-12-25 设计创作,主要内容包括:本申请适用于计算机技术领域,提供了一种检测心电信号的方法、装置、终端及存储介质,包括:获取待检测的心电信号;将该心电信号输入到已训练的心电信号检测模型中进行处理,得到该心电信号中异常心电信号的位置以及该异常心电信号对应的异常类型。上述方式,基于该心电信号检测模型中的异常心电信号筛选模块可以从心电信号中筛选出异常心电信号,并确定该异常心电信号的位置,该心电信号检测模型中的分类模块可以对异常心电信号进行分析,得到该异常心电信号对应的异常类型。基于该方法,不仅可以准确地对待检测的心电信号中的异常心电信号进行定位,同时还可以准确地识别出该异常心电信号的异常类型,提升了解读心电信号的速率以及准确率。(The application is applicable to the technical field of computers, and provides a method, a device, a terminal and a storage medium for detecting electrocardiosignals, which comprise the following steps: acquiring an electrocardiosignal to be detected; and inputting the electrocardiosignals into a trained electrocardiosignal detection model for processing to obtain the positions of abnormal electrocardiosignals in the electrocardiosignals and the abnormal types corresponding to the abnormal electrocardiosignals. In the above manner, based on the abnormal electrocardiosignal screening module in the electrocardiosignal detection model, the abnormal electrocardiosignal can be screened from the electrocardiosignals, and the position of the abnormal electrocardiosignal is determined, and the classification module in the electrocardiosignal detection model can analyze the abnormal electrocardiosignal to obtain the abnormal type corresponding to the abnormal electrocardiosignal. Based on the method, the abnormal electrocardiosignals in the electrocardiosignals to be detected can be accurately positioned, the abnormal types of the abnormal electrocardiosignals can be accurately identified, and the rate and the accuracy of reading the electrocardiosignals are improved.)

1. A method of detecting an electrocardiographic signal, comprising:

acquiring an electrocardiosignal to be detected;

inputting the electrocardiosignals into a trained electrocardiosignal detection model for processing to obtain the positions of abnormal electrocardiosignals in the electrocardiosignals and the abnormal types corresponding to the abnormal electrocardiosignals;

the electrocardiosignal detection model comprises an abnormal electrocardiosignal screening module and an abnormal electrocardiosignal classification module, wherein the abnormal electrocardiosignal screening module is used for screening the abnormal electrocardiosignals from the electrocardiosignals and determining the positions of the abnormal electrocardiosignals, and the abnormal electrocardiosignal classification module is used for analyzing the abnormal electrocardiosignals to obtain the abnormal types corresponding to the abnormal electrocardiosignals.

2. The method according to claim 1, wherein the step of inputting the electrocardiographic signal into a trained electrocardiographic signal detection model for processing to obtain a position of an abnormal electrocardiographic signal in the electrocardiographic signal and an abnormal type corresponding to the abnormal electrocardiographic signal comprises:

dividing the electrocardiosignals into a plurality of electrocardiosignal segments;

selecting a first electrocardiosignal segment and a second electrocardiosignal segment from the plurality of electrocardiosignal segments, wherein the first electrocardiosignal segment is adjacent to the second electrocardiosignal segment, and the first electrocardiosignal segment is any one of the plurality of electrocardiosignal segments;

inputting the first electrocardiosignal segment and the second electrocardiosignal segment into the abnormal electrocardiosignal screening module for screening treatment to obtain the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment;

when the matching degree is detected to be smaller than a preset threshold value, respectively marking the first electrocardiosignal segment and the second electrocardiosignal segment as abnormal electrocardiosignals, and determining the positions of the first electrocardiosignal segment and the second electrocardiosignal segment in the electrocardiosignals;

inputting a third electrocardiosignal segment and a fourth electrocardiosignal segment in the plurality of electrocardiosignal segments into the abnormal electrocardiosignal screening module for screening treatment to obtain the matching degree between the third electrocardiosignal segment and the fourth electrocardiosignal segment, wherein the first electrocardiosignal segment, the second electrocardiosignal segment, the third electrocardiosignal segment and the fourth electrocardiosignal segment are adjacent in sequence;

when the matching degree between the third electrocardiosignal segment and the fourth electrocardiosignal segment is detected to be smaller than a preset threshold value, respectively marking the third electrocardiosignal segment and the fourth electrocardiosignal segment as abnormal electrocardiosignals, and determining the positions of the third electrocardiosignal segment and the fourth electrocardiosignal segment in the electrocardiosignals;

analyzing the abnormal electrocardiosignals based on the abnormal electrocardiosignal classification module to obtain abnormal types corresponding to the abnormal electrocardiosignals;

or the like, or, alternatively,

when the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment is detected to be larger than or equal to the preset threshold value, the first electrocardiosignal segment or the second electrocardiosignal segment is reserved, and the reserved electrocardiosignal segment and the third electrocardiosignal segment are input into the abnormal electrocardiosignal screening module for screening processing, so that the matching degree between the reserved electrocardiosignal segment and the third electrocardiosignal segment is obtained.

3. The method of claim 2, wherein the inputting the first cardiac signal segment and the second cardiac signal segment into the abnormal cardiac signal filtering module for filtering to obtain the matching degree between the first cardiac signal segment and the second cardiac signal segment comprises:

extracting a first feature vector corresponding to the first electrocardiosignal segment based on the abnormal electrocardiosignal screening module;

extracting a second feature vector corresponding to the second electrocardiosignal segment based on the abnormal electrocardiosignal screening module;

and calculating the similarity between the first characteristic vector and the second characteristic vector to obtain the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment.

4. The method according to claim 2, wherein said analyzing said abnormal cardiac electrical signal based on said abnormal cardiac electrical signal classification module to obtain an abnormal type corresponding to said abnormal cardiac electrical signal comprises:

extracting abnormal feature vectors corresponding to the abnormal electrocardiosignals based on the abnormal electrocardiosignal classification module;

and classifying the abnormal feature vectors to obtain the abnormal type corresponding to the abnormal electrocardiosignals.

5. The method according to any one of claims 1 to 4, wherein, prior to acquiring the electrocardiosignals to be detected, the method further comprises:

acquiring a first sample training set; the first sample training set comprises a plurality of sample electrocardiosignal segments;

screening the plurality of sample electrocardiosignal fragments based on an initial screening network to obtain a second sample training set; the sample electrocardiosignal segments in the second sample training set comprise abnormal sample electrocardiosignal segments and normal sample electrocardiosignal segments;

labeling each sample electrocardiosignal segment in the second sample training set to obtain a classification type corresponding to each sample electrocardiosignal segment;

training an initial classification network based on each sample electrocardiosignal fragment in the second sample training set and the classification type corresponding to each sample electrocardiosignal fragment, and updating the parameters of the initial classification network based on the training result;

and when the loss function corresponding to the initial classification network is converged, generating the trained electrocardiosignal detection model based on the initial classification network and the initial screening network at the moment.

6. The method according to any one of claims 1 to 4, wherein after the electrocardiographic signal is input into a trained electrocardiographic signal detection model and processed to obtain a position of an abnormal electrocardiographic signal in the electrocardiographic signal and an abnormal type corresponding to the abnormal electrocardiographic signal, the method further comprises:

and uploading the electrocardiosignal detection model and the abnormal type corresponding to the abnormal electrocardiosignal to a block chain.

7. An apparatus for detecting a cardiac electrical signal, comprising:

the first acquisition unit is used for acquiring an electrocardiosignal to be detected;

the processing unit is used for inputting the electrocardiosignals into a trained electrocardiosignal detection model for processing to obtain the positions of abnormal electrocardiosignals in the electrocardiosignals and the abnormal types corresponding to the abnormal electrocardiosignals; the electrocardiosignal detection model comprises an abnormal electrocardiosignal screening module and an abnormal electrocardiosignal classification module, wherein the abnormal electrocardiosignal screening module is used for screening the abnormal electrocardiosignals from the electrocardiosignals and determining the positions of the abnormal electrocardiosignals, and the abnormal electrocardiosignal classification module is used for analyzing the abnormal electrocardiosignals to obtain the abnormal types corresponding to the abnormal electrocardiosignals.

8. The apparatus of claim 7, wherein the apparatus further comprises:

a second obtaining unit, configured to obtain a first sample training set; the first sample training set comprises a plurality of sample electrocardiosignal segments;

the third acquisition unit is used for screening the plurality of sample electrocardiosignal fragments based on the initial screening network to obtain a second sample training set; the sample electrocardiosignal segments in the second sample training set comprise abnormal sample electrocardiosignal segments and normal sample electrocardiosignal segments;

the labeling unit is used for labeling each sample electrocardiosignal segment in the second sample training set to obtain a classification type corresponding to each sample electrocardiosignal segment;

the first training unit is used for training an initial classification network based on each sample electrocardiosignal fragment in the second sample training set and the classification type corresponding to each sample electrocardiosignal fragment, and updating the parameters of the initial classification network based on the training result;

and the second training unit is used for generating the trained electrocardiosignal detection model based on the initial classification network and the initial screening network when the loss function corresponding to the initial classification network is converged.

9. A terminal for detecting electrocardiographic signals, comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the method according to any one of claims 1 to 6 when executing said computer program.

10. A computer storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any one of claims 1 to 6.

Technical Field

The present application belongs to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for detecting an electrocardiographic signal.

Background

Electrocardiosignals, which are important information reflecting vital signs of patients, have been widely used in diagnosing various cardiac abnormalities, and also in predicting morbidity, mortality, and the like of cardiovascular diseases. Early, correct diagnosis of cardiac abnormalities may increase the chances of successful treatment. However, the manual interpretation of the electrocardiographic signals is time-consuming and labor-consuming, and the requirements on medical staff are high. Therefore, it is necessary to automatically interpret the electrocardiographic signals based on the neural network model.

However, the existing neural network model cannot identify the abnormal type corresponding to the abnormal electrocardiosignal while locating the position of the abnormal electrocardiosignal, and is not beneficial to the interpretation of the electrocardiosignal.

Disclosure of Invention

In view of this, embodiments of the present application provide a method, an apparatus, a terminal, and a storage medium for detecting an electrocardiographic signal, so as to solve the problem that an existing neural network model cannot identify an abnormal type corresponding to an abnormal electrocardiographic signal while locating the position of the abnormal electrocardiographic signal, and is not beneficial to reading the electrocardiographic signal.

A first aspect of an embodiment of the present application provides a method for detecting an electrocardiographic signal, including:

acquiring an electrocardiosignal to be detected;

inputting the electrocardiosignals into a trained electrocardiosignal detection model for processing to obtain the positions of abnormal electrocardiosignals in the electrocardiosignals and the abnormal types corresponding to the abnormal electrocardiosignals;

the electrocardiosignal detection model comprises an abnormal electrocardiosignal screening module and an abnormal electrocardiosignal classification module, wherein the abnormal electrocardiosignal screening module is used for screening the abnormal electrocardiosignals from the electrocardiosignals and determining the positions of the abnormal electrocardiosignals, and the abnormal electrocardiosignal classification module is used for analyzing the abnormal electrocardiosignals to obtain the abnormal types corresponding to the abnormal electrocardiosignals.

A second aspect of the embodiments of the present application provides an apparatus for detecting an electrocardiographic signal, including:

the first acquisition unit is used for acquiring an electrocardiosignal to be detected;

the processing unit is used for inputting the electrocardiosignals into a trained electrocardiosignal detection model for processing to obtain the positions of abnormal electrocardiosignals in the electrocardiosignals and the abnormal types corresponding to the abnormal electrocardiosignals; the electrocardiosignal detection model comprises an abnormal electrocardiosignal screening module and an abnormal electrocardiosignal classification module, wherein the abnormal electrocardiosignal screening module is used for screening the abnormal electrocardiosignals from the electrocardiosignals and determining the positions of the abnormal electrocardiosignals, and the abnormal electrocardiosignal classification module is used for analyzing the abnormal electrocardiosignals to obtain the abnormal types corresponding to the abnormal electrocardiosignals.

A third aspect of the embodiments of the present application provides a terminal for detecting an electrocardiograph signal, 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 steps of the method for detecting an electrocardiograph signal according to the first aspect.

A fourth aspect of embodiments of the present application provides a computer storage medium, which stores a computer program that, when being executed by a processor, implements the steps of the method for detecting an electrocardiographic signal according to the first aspect.

A fifth aspect of embodiments of the present application provides a computer program product, which, when running on a terminal for detecting an electrocardiograph signal, causes the terminal for detecting an electrocardiograph signal to execute the steps of the method for detecting an electrocardiograph signal according to the first aspect.

The method for detecting the electrocardiosignals, the device for detecting the electrocardiosignals, the terminal for detecting the electrocardiosignals and the storage medium have the following beneficial effects that:

according to the embodiment of the application, the electrocardiosignals to be detected are processed based on the pre-trained electrocardiosignal detection model. The abnormal electrocardiosignal screening module in the electrocardiosignal detection model can screen abnormal electrocardiosignals from the electrocardiosignals and determine the positions of the abnormal electrocardiosignals, and the classification module in the electrocardiosignal detection model can analyze the abnormal electrocardiosignals screened by the abnormal electrocardiosignal screening module to obtain the abnormal types corresponding to the abnormal electrocardiosignals. Based on the method, the abnormal electrocardiosignals in the electrocardiosignals to be detected can be accurately positioned, the abnormal types of the abnormal electrocardiosignals can be accurately identified, and the rate and the accuracy of reading the electrocardiosignals are improved.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.

FIG. 1 is a schematic flow chart diagram of a method for detecting an ECG signal according to an embodiment of the present invention;

FIG. 2 is a schematic flow chart diagram of a method for detecting an ECG signal according to another embodiment of the present invention;

FIG. 3 is a schematic diagram of the division of the cardiac signal according to an embodiment of the present invention;

FIG. 4 is a schematic flow chart diagram of a method for detecting an ECG signal according to yet another embodiment of the invention;

FIG. 5 is a schematic flow chart diagram of a method for detecting an ECG signal according to another embodiment of the present invention;

FIG. 6 is a schematic flow chart diagram of a method for detecting an ECG signal according to yet another embodiment of the invention;

FIG. 7 is a schematic diagram of an apparatus for detecting cardiac electrical signals according to an embodiment of the present application;

fig. 8 is a schematic diagram of a terminal for detecting an ecg signal according to another embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

Electrocardiosignals, which are important information reflecting vital signs of patients, have been widely used in diagnosing various cardiac abnormalities, and also in predicting morbidity, mortality, and the like of cardiovascular diseases. Early, correct diagnosis of cardiac abnormalities may increase the chances of successful treatment. However, the manual interpretation of the electrocardiographic signals is time-consuming and labor-consuming, and the requirements on medical staff are high. Therefore, it is necessary to automatically interpret the electrocardiographic signals based on the neural network model.

However, in the training process of the existing neural network model, the selected training samples are not comprehensive and inaccurate, so that the trained neural network model cannot locate the position of the abnormal electrocardiosignal and cannot accurately identify the abnormal type corresponding to the abnormal electrocardiosignal.

In view of this, the present application provides a method for detecting an electrocardiographic signal, which processes an electrocardiographic signal to be detected based on a pre-trained electrocardiographic signal detection model. The abnormal electrocardiosignal screening module in the electrocardiosignal detection model can screen abnormal electrocardiosignals from the electrocardiosignals and determine the positions of the abnormal electrocardiosignals, and the classification module in the electrocardiosignal detection model can analyze the abnormal electrocardiosignals screened by the abnormal electrocardiosignal screening module to obtain the abnormal types corresponding to the abnormal electrocardiosignals. Based on the method, the abnormal electrocardiosignals in the electrocardiosignals to be detected can be accurately positioned, the abnormal types of the abnormal electrocardiosignals can be accurately identified, and the rate and the accuracy of reading the electrocardiosignals are improved.

Referring to fig. 1, fig. 1 is a schematic flow chart of a method for detecting an electrocardiograph signal according to an embodiment of the present invention. In this embodiment, the main executing body of the method for detecting a cardiac electric signal is a terminal, and the terminal includes but is not limited to a mobile terminal such as a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like, and may further include a terminal such as a desktop computer, a server, and the like. The method for detecting an electrocardiographic signal shown in fig. 1 may include steps S101 to S102, which are as follows:

s101: acquiring an electrocardiosignal to be detected.

The waveform that can completely represent one cardiac cycle of the heart is called a cardiac beat signal, and the cardiac signal to be detected can include several cardiac beat signals.

When the electrocardiosignal of a certain user needs to be detected whether is abnormal or not, the electrocardiosignal of the user can be input to a terminal for detecting the electrocardiosignal, namely the electrocardiosignal to be detected is input, and the terminal for detecting the electrocardiosignal receives the electrocardiosignal to be detected.

Or storing the electrocardiosignals to be detected in a certain preset folder of the terminal in advance, and extracting the electrocardiosignals to be detected in the preset folder when receiving an electrocardiosignal detection instruction.

The medical detection equipment can also be used for detecting the heart of the user to generate the electrocardiosignal to be detected, transmitting the electrocardiosignal to be detected to a terminal for detecting the electrocardiosignal, and receiving the electrocardiosignal to be detected by the terminal. The description is given for illustrative purposes only and is not intended to be limiting.

S102: inputting the electrocardiosignals into a trained electrocardiosignal detection model for processing to obtain the positions of abnormal electrocardiosignals in the electrocardiosignals and the abnormal types corresponding to the abnormal electrocardiosignals;

the electrocardiosignal detection model comprises an abnormal electrocardiosignal screening module and an abnormal electrocardiosignal classification module, wherein the abnormal electrocardiosignal screening module is used for screening the abnormal electrocardiosignals from the electrocardiosignals and determining the positions of the abnormal electrocardiosignals, and the abnormal electrocardiosignal classification module is used for analyzing the abnormal electrocardiosignals to obtain the abnormal types corresponding to the abnormal electrocardiosignals.

In this embodiment, the terminal stores a pre-trained electrocardiographic signal detection model in advance. The electrocardiosignal detection model is obtained by training a first sample training set and a second sample training set based on an initial screening network and an initial classification network by using a machine learning algorithm. It can be understood that the electrocardiographic signal detection model can be trained by the terminal in advance, or a file corresponding to the electrocardiographic signal detection model can be transplanted to the terminal after being trained by other equipment in advance. That is, the executive body who trains the electrocardiographic signal detection model may be the same as or different from the executive body who uses the electrocardiographic signal detection model.

Illustratively, the trained cardiac signal detection model may include an abnormal cardiac signal screening module and an abnormal cardiac signal classification module. The abnormal electrocardiosignal screening module is obtained by training a first sample training set based on an initial screening network. The abnormal electrocardiosignal screening module screens the electrocardiosignals to be detected, screens abnormal electrocardiosignals in the electrocardiosignals to be detected, and can determine the positions of the abnormal electrocardiosignals. It is worth to be noted that, when there is no abnormal electrocardiosignal in the electrocardiosignal to be detected, the abnormal electrocardiosignal screening module will output a null value if the abnormal electrocardiosignal is not detected. It can be understood that when no abnormal electrocardiosignal exists in the electrocardiosignal to be detected, the output of the trained electrocardiosignal detection model is null.

The abnormal electrocardiosignal classification module is obtained by training a second sample training set based on an initial classification network. The abnormal electrocardiosignal classification module analyzes the abnormal electrocardiosignals obtained by screening of the abnormal electrocardiosignal screening module to obtain the abnormal types corresponding to the abnormal electrocardiosignals.

The abnormal type refers to a category to which the abnormal electrocardiosignal belongs. For example, the abnormality types may include atrial fibrillation, one degree atrioventricular block, left bundle branch block, right bundle branch block, atrial premature beat, ventricular premature beat, ST segment and T wave abnormality (ST-T change), P wave abnormality, QRS wave and ST-T significant change, arrhythmia, and the like. The abnormal type can be used for assisting a doctor to judge the disease condition of the user, for example, the abnormal type corresponding to the abnormal electrocardiosignal of the user is P-wave abnormality, and the user can be judged to have large probability of atrial hypertrophy according to the conventional experience; the abnormal type corresponding to the abnormal electrocardiosignal of the user is ST-T change, and myocardial ischemia of the user can be judged according to the usual experience. The description is given for illustrative purposes only and is not intended to be limiting.

It is worth to be noted that, when there is no abnormal electrocardiosignal in the electrocardiosignal to be detected, the abnormal electrocardiosignal screening module will output a null value if it cannot detect the abnormal electrocardiosignal, and accordingly, the abnormal electrocardiosignal classifying module will output a null value if it has no processable abnormal electrocardiosignal. Finally, the trained electrocardiosignal detection model outputs null.

Referring to fig. 2, fig. 2 is a schematic flow chart of a method for detecting an electrocardiograph signal according to another embodiment of the present invention. Optionally, in a possible implementation manner, as shown in fig. 2, the S102 may include S1021 to S1028, which are specifically as follows:

s1021: and dividing the electrocardiosignal into a plurality of electrocardiosignal segments.

The electrocardiosignal is divided into a plurality of electrocardiosignal segments with the same length in sequence. For example, according to the original sequence of each heartbeat signal in the electrocardiosignals to be detected, dividing every 2 heartbeats of signals or every 3 heartbeats of signals to obtain a plurality of electrocardiosignal segments, wherein each electrocardiosignal segment contains 2 heartbeats of signals or 3 heartbeats of signals. The description is given for illustrative purposes only and is not intended to be limiting.

Referring to fig. 3, fig. 3 is a schematic diagram of cardiac signal division according to an embodiment of the present invention. Fig. 3 shows only a certain segment of the electrocardiographic signals, and as shown in fig. 3, the electrocardiographic signal segment selected in each rectangular frame represents the divided electrocardiographic signal segments, and there are four electrocardiographic signal segments in total, the first electrocardiographic signal segment contains 3 cardiotachometer signals, and the second electrocardiographic signal, the third electrocardiographic signal, and the third electrocardiographic signal each contain 2 cardiotachometer signals. This diagram is merely exemplary and not limiting.

S1022: selecting a first electrocardiosignal segment and a second electrocardiosignal segment from the plurality of electrocardiosignal segments, wherein the first electrocardiosignal segment is adjacent to the second electrocardiosignal segment, and the first electrocardiosignal segment is any one of the plurality of electrocardiosignal segments.

The first electrocardiosignal segment refers to any one of the plurality of electrocardiosignal segments obtained by division, and the second electrocardiosignal segment refers to an electrocardiosignal segment adjacent to the first electrocardiosignal segment. Generally, a first electrocardiographic signal segment is selected from the plurality of electrocardiographic signal segments according to a time-division sequence, and a next electrocardiographic signal segment adjacent to the first electrocardiographic signal segment is selected as a second electrocardiographic signal segment.

Illustratively, as shown in fig. 3, four cardiac signal segments are selected, the first cardiac signal segment on the left is selected as the first cardiac signal segment, and the next cardiac signal segment adjacent to the first cardiac signal segment is selected as the second cardiac signal segment. If the third one is the first electrocardiosignal segment, the last electrocardiosignal segment adjacent to the third one is the second electrocardiosignal segment. This diagram is merely exemplary and not limiting.

S1023: and inputting the first electrocardiosignal segment and the second electrocardiosignal segment into the abnormal electrocardiosignal screening module for screening treatment to obtain the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment.

The degree of matching can be understood as the degree of similarity, i.e. the degree of similarity between two electrocardiographic signal segments. In this embodiment, the similarity between the first cardiac signal segment and the second cardiac signal segment is determined.

Illustratively, the matching degree can be represented by 1 and 0, where 1 represents that the matching degree of the two electrocardiographic signal segments is high, and 0 represents that the matching degree of the two electrocardiographic signal segments is low. Inputting the first electrocardiosignal segment and the second electrocardiosignal segment into an abnormal electrocardiosignal screening module for screening, and when the abnormal electrocardiosignal screening module outputs 1, indicating that the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment is high; when the abnormal electrocardiosignal screening module outputs 0, the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment is low.

Alternatively, in a possible implementation, the matching degree may also be expressed by a specific value, percentage, and the like, for example, the matching degree may be 95, 90, 80, 30, 95%, 60%, and the like. The description is given for illustrative purposes only and is not intended to be limiting.

And comparing the matching degree with a preset threshold, executing S1024-S1027 when the matching degree is smaller than the preset threshold, and executing S1028 when the matching degree is greater than or equal to the preset threshold.

S1024: when the matching degree is detected to be smaller than a preset threshold value, the first electrocardiosignal segment and the second electrocardiosignal segment are respectively marked as abnormal electrocardiosignals, and the positions of the first electrocardiosignal segment and the second electrocardiosignal segment in the electrocardiosignals are respectively determined.

The preset threshold is used for comparing with the matching degree, and the comparison result is used for assisting in judging whether the first electrocardiosignal segment and the second electrocardiosignal segment are marked as abnormal electrocardiosignals. When the expression of the matching degree is different, the preset threshold value can be adjusted correspondingly.

Illustratively, when the matching degrees are represented by 1 and 0, the preset threshold may be set to 1. For example, the matching degree between the first electrocardiographic signal segment and the second electrocardiographic signal segment is 0, and at this time, it is detected that the matching degree 0 is smaller than the preset threshold value 1, and it is proved that the matching degree between the first electrocardiographic signal segment and the second electrocardiographic signal segment is low, that is, the similarity degree is low, it can be understood that the first electrocardiographic signal segment and the second electrocardiographic signal segment are two electrocardiographic signal segments with a large difference, and the first electrocardiographic signal segment and the second electrocardiographic signal segment are abnormal electrocardiographic signals with a large probability, so that the first electrocardiographic signal segment and the second electrocardiographic signal segment are respectively marked as abnormal electrocardiograph.

The method comprises the steps of respectively marking a first electrocardiosignal segment and a second electrocardiosignal segment as abnormal electrocardiosignals, and simultaneously acquiring the positions of the first electrocardiosignal segment and the second electrocardiosignal segment in the whole electrocardiosignals to be detected respectively, namely acquiring the coordinates of the first electrocardiosignal segment and the second electrocardiosignal segment in the whole electrocardiosignals to be detected respectively. Alternatively, the position or the coordinates may also be represented by descriptions of several segments, for example, the position of the first electrocardiographic signal segment in the entire electrocardiographic signal to be detected is the first electrocardiographic signal segment, and the position of the second electrocardiographic signal segment in the entire electrocardiographic signal to be detected is the second electrocardiographic signal segment. The description is given for illustrative purposes only and is not intended to be limiting.

Optionally, the electrocardiographic signal segments marked as abnormal electrocardiographic signals may be marked with rectangular frames, for example, a first electrocardiographic signal segment and a second electrocardiographic signal segment marked as abnormal electrocardiographic signals are framed by rectangular frames with colors different from the color of the electrocardiographic signals, so that a doctor can directly check which ones of the electrocardiographic signals to be detected are abnormal electrocardiographic signals.

S1025: inputting a third electrocardiosignal segment and a fourth electrocardiosignal segment in the plurality of electrocardiosignal segments into the abnormal electrocardiosignal screening module for screening treatment to obtain the matching degree between the third electrocardiosignal segment and the fourth electrocardiosignal segment, wherein the first electrocardiosignal segment, the second electrocardiosignal segment, the third electrocardiosignal segment and the fourth electrocardiosignal segment are adjacent in sequence.

The next electrocardiosignal segment adjacent to the second electrocardiosignal segment is a third electrocardiosignal segment, and the next electrocardiosignal segment adjacent to the third electrocardiosignal segment is a fourth electrocardiosignal segment. Namely, the first electrocardiosignal segment, the second electrocardiosignal segment, the third electrocardiosignal segment and the fourth electrocardiosignal segment are adjacent in sequence.

Illustratively, the four cardiac signal segments shown in fig. 3 are, from left to right, a first cardiac signal segment, a second cardiac signal segment, a third cardiac signal segment, and a fourth cardiac signal segment. In S1023 and S1024, the first electrocardiographic signal segment and the second electrocardiographic signal segment are processed, and then the third electrocardiographic signal segment and the fourth electrocardiographic signal segment are processed. Specifically, the third electrocardiosignal segment and the fourth electrocardiosignal segment are input into an abnormal electrocardiosignal screening module for screening treatment, so as to obtain the matching degree between the third electrocardiosignal segment and the fourth electrocardiosignal segment. When the matching degree is detected to be smaller than a preset threshold value, the third electrocardiosignal segment and the fourth electrocardiosignal segment are respectively marked as abnormal electrocardiosignals, and the positions of the third electrocardiosignal segment and the fourth electrocardiosignal segment in the electrocardiosignals are determined. When the matching degree is detected to be larger than or equal to the preset threshold value, the third electrocardiosignal segment or the fourth electrocardiosignal segment is reserved, the reserved electrocardiosignal segment and the fifth electrocardiosignal segment are input into the abnormal electrocardiosignal screening module for screening processing, and the fourth electrocardiosignal segment is adjacent to the fifth electrocardiosignal segment. And circulating the steps until a plurality of electrocardiosignal segments corresponding to the electrocardiosignals to be detected are processed. It can be understood that the first electrocardiographic signal segment, the second electrocardiographic signal segment, the third electrocardiographic signal segment, and the fourth electrocardiographic signal segment are all used to refer to a certain electrocardiographic signal segment of the plurality of electrocardiographic signal segments that need to be processed, which is for the purpose of more clearly explaining the present solution, and is not limited to the first electrocardiographic signal segment, the second electrocardiographic signal segment, and the like.

S1026: when the matching degree between the third electrocardiosignal segment and the fourth electrocardiosignal segment is detected to be smaller than a preset threshold value, respectively marking the third electrocardiosignal segment and the fourth electrocardiosignal segment as abnormal electrocardiosignals, and determining the positions of the third electrocardiosignal segment and the fourth electrocardiosignal segment in the electrocardiosignals.

Illustratively, when the matching degrees are represented by 1 and 0, the preset threshold may be set to 1. For example, the matching degree between the third electrocardiographic signal segment and the fourth electrocardiographic signal segment is 0, and at this time, it is detected that the matching degree 0 is smaller than the preset threshold value 1, and it is proved that the matching degree between the third electrocardiographic signal segment and the fourth electrocardiographic signal segment is low, that is, the similarity degree is low, it can be understood that the third electrocardiographic signal segment and the fourth electrocardiographic signal segment are two electrocardiographic signal segments with a large difference, and the most probability is an abnormal electrocardiographic signal segment, so that the third electrocardiographic signal segment and the fourth electrocardiographic signal segment are respectively marked as abnormal electrocardiographic signals.

And respectively marking the third electrocardiosignal segment and the fourth electrocardiosignal segment as abnormal electrocardiosignals, and simultaneously acquiring the positions of the third electrocardiosignal segment and the fourth electrocardiosignal segment in the whole electrocardiosignals to be detected respectively, namely acquiring the coordinates of the third electrocardiosignal segment and the fourth electrocardiosignal segment in the whole electrocardiosignals to be detected respectively. Alternatively, the description of the fourth cardiac signal segment may be used to represent the position or the coordinate, for example, the position of the third cardiac signal segment in the entire cardiac signal to be detected is the third cardiac signal segment, and the position of the fourth cardiac signal segment in the entire cardiac signal to be detected is the fourth cardiac signal segment. The description is given for illustrative purposes only and is not intended to be limiting.

Optionally, the electrocardiographic signal segments marked as abnormal electrocardiographic signals may be marked with rectangular frames, for example, a third electrocardiographic signal segment and a fourth electrocardiographic signal segment marked as abnormal electrocardiographic signals are framed by rectangular frames with colors different from the color of the electrocardiographic signals, so that a doctor can directly check which ones of the electrocardiographic signals to be detected are abnormal electrocardiographic signals.

S1027: and analyzing the abnormal electrocardiosignals based on the abnormal electrocardiosignal classification module to obtain the abnormal type corresponding to the abnormal electrocardiosignals.

And analyzing the abnormal electrocardiosignals based on the abnormal electrocardiosignal classification module to obtain the abnormal type corresponding to the abnormal electrocardiosignals.

And analyzing the electrocardiosignal segments marked as abnormal electrocardiosignals through an abnormal electrocardiosignal classification module to obtain the abnormal type corresponding to each abnormal electrocardiosignal. For example, the abnormal cardiac signal classification module may extract a feature vector of the abnormal cardiac signal, and classify the feature vector to obtain an abnormal type corresponding to the abnormal cardiac signal.

Alternatively, when the matching degree is greater than or equal to the preset threshold, S1028 is performed.

S1028: when the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment is detected to be larger than or equal to the preset threshold value, the first electrocardiosignal segment or the second electrocardiosignal segment is reserved, and the reserved electrocardiosignal segment and the third electrocardiosignal segment are input into the abnormal electrocardiosignal screening module for screening processing, so that the matching degree between the reserved electrocardiosignal segment and the third electrocardiosignal segment is obtained.

Illustratively, when the matching degrees are represented by 1 and 0, the preset threshold may be set to 1. For example, the matching degree between the first electrocardiographic signal segment and the second electrocardiographic signal segment is 1, and at this time, it is detected that the matching degree 1 is equal to the preset threshold value 1, and it is proved that the matching degree between the first electrocardiographic signal segment and the second electrocardiographic signal segment is high, that is, the similarity is high, it can be understood that the first electrocardiographic signal segment and the second electrocardiographic signal segment are two electrocardiographic signal segments with small difference, and the probability is a normal electrocardiographic signal segment, so that the first electrocardiographic signal segment or the second electrocardiographic signal segment is retained, the retained electrocardiographic signal segment is used for continuously performing screening processing with the third electrocardiographic signal segment, the matching degree between the retained electrocardiographic signal segment and the third electrocardiographic signal segment is obtained, and the electrocardiographic signal segment which is not retained can be rejected. And after the matching degree between the reserved electrocardiosignal segment and the third electrocardiosignal segment is obtained, comparing the matching degree with a preset threshold value, when the matching degree between the reserved electrocardiosignal segment and the third electrocardiosignal segment is smaller than the preset threshold value, respectively marking the reserved electrocardiosignal segment and the third electrocardiosignal segment as abnormal electrocardiosignals, and determining the positions of the reserved electrocardiosignal segment and the third electrocardiosignal segment in the electrocardiosignals. When the matching degree between the retained electrocardiosignal segment and the third electrocardiosignal segment is greater than or equal to a preset threshold value, the retained electrocardiosignal segment or the third electrocardiosignal segment is retained, and the retained electrocardiosignal segment and the fourth electrocardiosignal segment are input into an abnormal electrocardiosignal screening module for screening treatment to obtain the matching degree between the retained electrocardiosignal segment and the fourth electrocardiosignal segment. The process is circulated until all the electrocardiosignal segments in the electrocardiosignal segments are screened. The description is given for illustrative purposes only and is not intended to be limiting.

For example, the first electrocardiosignal segment is retained, the first electrocardiosignal segment and the third electrocardiosignal segment are input into the abnormal electrocardiosignal screening module for screening treatment to obtain the matching degree between the first electrocardiosignal segment and the third electrocardiosignal segment, and then the steps are executed in a circulating manner until a plurality of electrocardiosignal segments corresponding to the electrocardiosignals to be detected are processed.

Or, the second electrocardiosignal segment is reserved, the second electrocardiosignal segment and the third electrocardiosignal segment are input into the abnormal electrocardiosignal screening module for screening treatment to obtain the matching degree between the second electrocardiosignal segment and the third electrocardiosignal segment, and then the steps are executed in a circulating mode until a plurality of electrocardiosignal segments corresponding to the electrocardiosignals to be detected are processed.

By adopting the method, a large number of identical electrocardiosignal fragments can be filtered, so that the workload of a subsequent electrocardiosignal detection model for classifying abnormal electrocardiosignals is reduced, and the classification result is accurate.

Referring to fig. 4, fig. 4 is a schematic flow chart of a method for detecting an electrocardiograph signal according to another embodiment of the present invention. Optionally, in a possible implementation manner, as shown in fig. 4, the S1023 may include S10231 to S10233, which are as follows:

s10231: and extracting a first feature vector corresponding to the first electrocardiosignal segment based on the abnormal electrocardiosignal screening module.

The abnormal electrocardiosignal screening module can be obtained based on twin network training. The twin network is actually realized by two parallel networks with shared parameters and consistent structures, and the network structure adopted by the twin network is not limited. May be a VGG-16 structure, a Resnet-50 structure, a Resnet-101 structure, etc. Two parallel networks in the twin network respectively process the first electrocardiosignal segment and the second electrocardiosignal segment, extract a first feature vector corresponding to the first electrocardiosignal segment and extract a second feature vector corresponding to the second electrocardiosignal segment.

In this embodiment, the twin network includes a plurality of convolutional layers, and the first electrocardiographic signal segment may be normalized first, and the normalized first electrocardiographic signal segment is transmitted to the first convolutional layer, and the first convolutional layer performs convolutional processing on the first electrocardiographic signal segment, extracts a feature corresponding to the first electrocardiographic signal segment, and outputs a feature map based on the extracted feature. The first convolution layer inputs the feature map into the first sampling layer, the first sampling layer performs feature selection on the feature map, removes redundant features, reconstructs a new feature map, and transmits the new feature map to the second convolution layer. And the second convolution layer carries out secondary feature extraction on the new feature map and outputs the feature map again based on the extracted features, the second convolution layer transmits the feature map output again to the second sampling layer, and the second sampling layer carries out secondary feature selection to reconstruct the feature map. And repeating the steps until the last sampling layer in the twin network finishes processing the last sampling layer, and obtaining a first feature vector corresponding to the first electrocardiosignal segment. The description is given for illustrative purposes only and is not intended to be limiting.

S10232: extracting a second feature vector corresponding to the second electrocardiosignal segment based on the abnormal electrocardiosignal screening module;

the specific process of the abnormal electrocardiosignal screening module extracting the second feature vector corresponding to the second electrocardiosignal segment can refer to the specific process of the abnormal electrocardiosignal screening module extracting the first feature vector corresponding to the first electrocardiosignal segment in S10231, and is not repeated here.

S10233: and calculating the similarity between the first characteristic vector and the second characteristic vector to obtain the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment.

Inputting the first characteristic vector and the second characteristic vector into a cosine distance formula for calculation, wherein the obtained value is the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment, and the cosine distance formula is as follows:

in the above formula (1), cos θ represents the matching degree, and the closer the value of cos θ is to 1, the more similar the first feature vector and the second feature vector are, that is, the more similar the first electrocardiosignal segment and the second electrocardiosignal segment are; a represents a first feature vector, B represents a second feature vector; i represents the corresponding dimension of the first feature vector and the second feature vector, namely AiI in (a) represents the dimension corresponding to the first feature vector, BiI in (2) represents the corresponding dimension of the second feature vector.

Alternatively, the pearson correlation coefficient may also be used to determine a degree of match between the first and second cardiac signal segments. And (3) inputting the first characteristic vector and the second characteristic vector into a preset formula (2) for calculation to obtain the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment. The preset formula (2) is as follows:

in the above formula (2), X represents a first feature vector, Y represents a second feature vector, ρx,yA pearson correlation coefficient representing a first eigenvector and a second eigenvector, which is also understood as a degree of matching between the first electrocardiographic signal segment and the second electrocardiographic signal segment; cov (X, Y) denotes the covariance, σ, of X, YXDenotes the standard deviation, σ, of XYThe standard deviation of Y is shown.

Alternatively, in one possible implementation, when the matching degrees are represented by 1 and 0, the numerical values calculated by the above two formulas may be mapped to the manner represented by 1 and 0. For example, if the calculated value is within a first preset value range, the matching degree is 1; and if the calculated value is within a second preset value range, the matching degree is 0. The first preset value range and the second preset value range are set by a user according to actual conditions and can be used for assisting in judging the similarity degree between the two electrocardiosignal segments. The description is given for illustrative purposes only and is not intended to be limiting.

Referring to fig. 5, fig. 5 is a schematic flow chart of a method for detecting an electrocardiograph signal according to another embodiment of the present invention. Optionally, in a possible implementation manner, as shown in fig. 5, the S1027 may include S10271 to S10272, which are specifically as follows:

s10271: and extracting an abnormal feature vector corresponding to the abnormal electrocardiosignal based on the abnormal electrocardiosignal classification module.

The abnormal electrocardiosignal classification module can be obtained based on Long-Short Term Memory artificial neural network (LSTM) training. The LSTM model includes a plurality of network layers, and the example of the LSTM model including 3 cardiac beat signals is described. Inputting the abnormal electrocardiosignals into an LSTM model, extracting a characteristic vector corresponding to the 1 st heartbeat signal by a first network layer, and inputting the characteristic vector into a second network layer; the second network layer extracts a feature vector corresponding to the 2 nd heartbeat signal, fuses the feature vector corresponding to the 2 nd heartbeat signal and the feature vector corresponding to the 1 st heartbeat signal and transmits the fused feature vectors to the 3 rd network layer; and the third network layer extracts the feature vector corresponding to the 3 rd heartbeat signal, and fuses the feature vector corresponding to the 3 rd heartbeat signal with the feature vector output by the second network layer to obtain the abnormal feature vector corresponding to the abnormal electrocardiosignal. It is understood that, when the abnormal cardiac signal includes a plurality of cardiac signals, the above steps may be continuously performed until all the cardiac signal processing is completed. The description is given for illustrative purposes only and is not intended to be limiting.

S10272: and classifying the abnormal feature vectors to obtain the abnormal type corresponding to the abnormal electrocardiosignals.

The abnormal feature vectors extracted in S10271 are passed to the output layer in the LSTM model, i.e., to the fully connected layer. And a normalized exponential function (Softmax function) in the full connection layer classifies the feature vectors transmitted by the previous network layer to obtain the abnormal type corresponding to the abnormal electrocardiosignals. Namely, the abnormal electrocardiosignal is judged to belong to any one of atrial fibrillation, first degree atrioventricular block, left bundle branch block and the like.

According to the embodiment of the application, the electrocardiosignals to be detected are processed based on the pre-trained electrocardiosignal detection model. The abnormal electrocardiosignal screening module in the electrocardiosignal detection model can screen abnormal electrocardiosignals from the electrocardiosignals and determine the positions of the abnormal electrocardiosignals, and the classification module in the electrocardiosignal detection model can analyze the abnormal electrocardiosignals screened by the abnormal electrocardiosignal screening module to obtain the abnormal types corresponding to the abnormal electrocardiosignals. Based on the method, the abnormal electrocardiosignals in the electrocardiosignals to be detected can be accurately positioned, so that a user can quickly and accurately find the positions of the abnormal electrocardiosignals in the whole electrocardiosignals conveniently, the abnormal types of the abnormal electrocardiosignals can be accurately identified, a doctor can be conveniently assisted to diagnose diseases of the patient according to the abnormal types, and the speed and the accuracy of reading the electrocardiosignals are improved based on the method.

Referring to fig. 6, fig. 6 is a schematic flow chart of a method for detecting an electrocardiograph signal according to another embodiment of the present invention. The method may include S201 to S207. Steps S206 to S207 shown in fig. 6 may refer to the description of steps S101 to S102 in the embodiment corresponding to fig. 1, and are not repeated here for brevity. The following specifically describes steps S201 to S205.

S201: acquiring a first sample training set; the first sample training set comprises a plurality of sample cardiac electrical signal segments.

The first sample training set may comprise a plurality of sample cardiac electrical signal segments. For example, sample electrocardiographic signals of a large number of different users may be collected in advance on a network or in a hospital, and these sample electrocardiographic signals may include electrocardiographic signals of normal persons or electrocardiographic signals of persons with various diseases. The sample electrocardiosignals are divided into a plurality of sample electrocardiosignal segments, and a plurality of abnormal sample electrocardiosignal segments and a plurality of normal sample electrocardiosignal segments are correspondingly obtained. The division manner can refer to the description in S1021, and is not described herein again.

S202: screening the plurality of sample electrocardiosignal fragments based on an initial screening network to obtain a second sample training set; the sample electrocardiosignal segments in the second sample training set comprise abnormal sample electrocardiosignal segments and normal sample electrocardiosignal segments.

The initial screening network can adopt a twin network, and the sample electrocardiosignal segments in the second sample training set are obtained after screening, so that a large number of identical electrocardiosignal segments and a large number of normal sample electrocardiosignal segments are filtered out from the obtained second sample training set. That is, although the first sample training set and the second sample training set both include abnormal sample electrocardiographic signal segments and normal sample electrocardiographic signal segments, the number of the abnormal sample electrocardiographic signal segments and the normal sample electrocardiographic signal segments in the second sample training set is less than that in the first sample training set, and especially the number of the normal sample electrocardiographic signal segments is much less than that in the first sample training set.

The specific process of screening multiple sample electrocardiographic signal segments by using the initial screening network may be to screen multiple sample electrocardiographic signal segments corresponding to each sample electrocardiographic signal by using the initial screening network, and specifically, refer to the process of screening an electrocardiographic signal by using the abnormal electrocardiographic signal screening module in S102, which is not described herein again.

Optionally, in a possible implementation manner, in order to ensure that the number of the abnormal sample electrocardiographic signal segments is balanced with that of the normal sample electrocardiographic signal segments, the appropriate number of the normal sample electrocardiographic signal segments may be selected according to the number of the abnormal sample electrocardiographic signal segments obtained after the screening processing. Therefore, when the electrocardiosignal detection model is trained, the model learns various types of characteristics, and the classification result of the electrocardiosignal detection model obtained by training is more accurate.

S203: and labeling each sample electrocardiosignal segment in the second sample training set to obtain a classification type corresponding to each sample electrocardiosignal segment.

And marking each sample electrocardiosignal segment in the second sample training set by adopting a manual marking mode, namely marking the classification type corresponding to each sample electrocardiosignal segment.

S204: training an initial classification network based on each sample electrocardiosignal segment in the second sample training set and the classification type corresponding to each sample electrocardiosignal segment, and updating the parameters of the initial classification network based on the training result.

The initial classification network may employ an LSTM network. Illustratively, the LSTM network is adopted to classify each sample electrocardiosignal segment and output an actual classification type corresponding to each sample electrocardiosignal segment. The specific classification process refers to the description in S1027 above, and is not described in detail here.

And calculating a loss value based on the actual classification type corresponding to each sample electrocardiosignal segment output by the LSTM network and the classification type manually labeled to the sample electrocardiosignal segment. Comparing the loss value with a preset loss threshold value, adjusting the parameters of the LSTM network when the loss value is larger than the preset loss threshold value, and continuing to train the LSTM network; and when the loss value is less than or equal to the preset loss threshold value, stopping training, and finishing the training of the LSTM network at the moment. The LSTM network at the moment can be understood as a trained abnormal electrocardiosignal classification module.

S205: and when the loss function corresponding to the initial classification network is converged, generating the trained electrocardiosignal detection model based on the initial classification network and the initial screening network at the moment.

Optionally, in a possible implementation manner, in the process of training the initial classification network, it may also be determined whether a loss function corresponding to the initial classification network converges. And when the loss function corresponding to the initial classification network is not converged, adjusting the parameters of the initial classification network, and continuing to train the initial classification network. When the loss function corresponding to the initial classification network is converged, a trained abnormal electrocardiosignal classification module is obtained. After the initial screening network screens a plurality of sample electrocardiosignal fragments, the network is very stable, which is equivalent to obtaining a trained abnormal electrocardiosignal screening module. And constructing and generating a trained electrocardiosignal detection model based on the abnormal electrocardiosignal screening module and the abnormal electrocardiosignal classification module.

In the embodiment of the application, the electrocardiosignal detection model obtained by the training in the above manner comprises an abnormal electrocardiosignal screening module and an abnormal electrocardiosignal classification module, and in the use process of the electrocardiosignal detection model, a large number of identical electrocardiosignal fragments in the electrocardiosignals to be detected can be filtered out through the abnormal electrocardiosignal screening module, and a large number of normal electrocardiosignal fragments in the electrocardiosignals to be detected can also be filtered out (generally, the abnormal electrocardiosignals only account for part of the whole electrocardiosignals, and most of the abnormal electrocardiosignals are normal electrocardiosignals). When the abnormal electrocardiosignal classification module classifies and processes the abnormal electrocardiosignals, the workload is reduced, and the processed abnormal types are more accurate.

Optionally, in a possible implementation manner, the electrocardiographic signal detection model and the abnormal type corresponding to the abnormal electrocardiographic signal may also be uploaded to the block chain.

In this embodiment, the electrocardiosignal detection model and the abnormal type corresponding to the abnormal electrocardiosignal are uploaded to the block chain, so that the safety and the fair transparency to the user can be ensured. The electrocardiosignal detection model and the abnormal type corresponding to the abnormal electrocardiosignal are uploaded to the block chain, and by means of the characteristic that files on the block chain cannot be tampered randomly, the electrocardiosignal detection model and the abnormal type corresponding to the abnormal electrocardiosignal can be prevented from being tampered maliciously, so that a subsequent user can directly and accurately obtain the abnormal type corresponding to the abnormal electrocardiosignal, and the subsequent user can use the electrocardiosignal detection model conveniently.

The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.

Referring to fig. 7, fig. 7 is a schematic view of an apparatus for detecting an electrocardiograph signal according to an embodiment of the present application. The device comprises units for performing the steps in the embodiments corresponding to fig. 1, 2, 4-6. Please refer to fig. 1, fig. 2, and fig. 4 to fig. 6 for a corresponding embodiment. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 7, including:

a first obtaining unit 310, configured to obtain an electrocardiographic signal to be detected;

the processing unit 320 is configured to input the electrocardiographic signal into a trained electrocardiographic signal detection model for processing, so as to obtain a position of an abnormal electrocardiographic signal in the electrocardiographic signal and an abnormal type corresponding to the abnormal electrocardiographic signal; the electrocardiosignal detection model comprises an abnormal electrocardiosignal screening module and an abnormal electrocardiosignal classification module, wherein the abnormal electrocardiosignal screening module is used for screening the abnormal electrocardiosignals from the electrocardiosignals and determining the positions of the abnormal electrocardiosignals, and the abnormal electrocardiosignal classification module is used for analyzing the abnormal electrocardiosignals to obtain the abnormal types corresponding to the abnormal electrocardiosignals.

Optionally, the processing unit 320 includes:

the dividing unit is used for dividing the electrocardiosignals into a plurality of electrocardiosignal segments;

a selection unit, configured to select a first electrocardiographic signal segment and a second electrocardiographic signal segment from the plurality of electrocardiographic signal segments, where the first electrocardiographic signal segment is adjacent to the second electrocardiographic signal segment, and the first electrocardiographic signal segment is any one of the plurality of electrocardiographic signal segments;

the first screening unit is used for inputting the first electrocardiosignal segment and the second electrocardiosignal segment into the abnormal electrocardiosignal screening module for screening treatment to obtain the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment;

the marking unit is used for marking the first electrocardiosignal segment and the second electrocardiosignal segment as abnormal electrocardiosignals respectively and determining the positions of the first electrocardiosignal segment and the second electrocardiosignal segment in the electrocardiosignals respectively when the matching degree is detected to be smaller than a preset threshold value;

the second screening unit is used for inputting a third electrocardiosignal segment and a fourth electrocardiosignal segment in the plurality of electrocardiosignal segments into the abnormal electrocardiosignal screening module for screening processing to obtain the matching degree between the third electrocardiosignal segment and the fourth electrocardiosignal segment, and the first electrocardiosignal segment, the second electrocardiosignal segment, the third electrocardiosignal segment and the fourth electrocardiosignal segment are adjacent in sequence;

the detection unit is used for respectively marking the third electrocardiosignal segment and the fourth electrocardiosignal segment as abnormal electrocardiosignals and determining the positions of the third electrocardiosignal segment and the fourth electrocardiosignal segment in the electrocardiosignals when the matching degree between the third electrocardiosignal segment and the fourth electrocardiosignal segment is detected to be smaller than a preset threshold;

the analysis unit is used for analyzing the abnormal electrocardiosignals based on the abnormal electrocardiosignal classification module to obtain abnormal types corresponding to the abnormal electrocardiosignals;

and the third screening unit is used for reserving the first electrocardiosignal segment or the second electrocardiosignal segment when the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment is detected to be greater than or equal to the preset threshold, and inputting the reserved electrocardiosignal segment and the third electrocardiosignal segment into the abnormal electrocardiosignal screening module for screening processing to obtain the matching degree between the reserved electrocardiosignal segment and the third electrocardiosignal segment.

Optionally, the first screening unit is specifically configured to:

extracting a first feature vector corresponding to the first electrocardiosignal segment based on the abnormal electrocardiosignal screening module;

extracting a second feature vector corresponding to the second electrocardiosignal segment based on the abnormal electrocardiosignal screening module;

and calculating the similarity between the first characteristic vector and the second characteristic vector to obtain the matching degree between the first electrocardiosignal segment and the second electrocardiosignal segment.

Optionally, the analysis unit is specifically configured to:

extracting abnormal feature vectors corresponding to the abnormal electrocardiosignals based on the abnormal electrocardiosignal classification module;

and classifying the abnormal feature vectors to obtain the abnormal type corresponding to the abnormal electrocardiosignals.

Optionally, the apparatus further comprises:

a second obtaining unit, configured to obtain a first sample training set; the first sample training set comprises a plurality of sample electrocardiosignal segments;

the third acquisition unit is used for screening the plurality of sample electrocardiosignal fragments based on the initial screening network to obtain a second sample training set; the sample electrocardiosignal segments in the second sample training set comprise abnormal sample electrocardiosignal segments and normal sample electrocardiosignal segments;

the labeling unit is used for labeling each sample electrocardiosignal segment in the second sample training set to obtain a classification type corresponding to each sample electrocardiosignal segment;

the first training unit is used for training an initial classification network based on each sample electrocardiosignal fragment in the second sample training set and the classification type corresponding to each sample electrocardiosignal fragment, and updating the parameters of the initial classification network based on the training result;

and the second training unit is used for generating the trained electrocardiosignal detection model based on the initial classification network and the initial screening network when the loss function corresponding to the initial classification network is converged.

Optionally, the apparatus further comprises:

and the uploading unit is used for uploading the electrocardiosignal detection model and the abnormal type corresponding to the abnormal electrocardiosignal to the block chain.

Referring to fig. 8, fig. 8 is a schematic diagram of a terminal for detecting an electrocardiograph signal according to another embodiment of the present application. As shown in fig. 8, the terminal 4 for detecting an electrocardiographic signal according to this embodiment includes: a processor 40, a memory 41, and computer instructions 42 stored in the memory 41 and executable on the processor 40. The processor 40, when executing the computer instructions 42, implements the steps in the above-described embodiments of the method for detecting an electrocardiographic signal, such as S101 to S102 shown in fig. 1. Alternatively, the processor 40, when executing the computer instructions 42, implements the functions of the units in the embodiments described above, such as the functions of the units 310 to 320 shown in fig. 7.

Illustratively, the computer instructions 42 may be divided into one or more units that are stored in the memory 41 and executed by the processor 40 to accomplish the present application. The unit or units can be a series of computer instruction segments capable of performing specific functions, and the instruction segments are used for describing the execution process of the computer instructions 42 in the terminal 4 for detecting electrocardiosignals. For example, the computer instructions 42 may be divided into a first acquisition unit and a processing unit, each unit functioning specifically as described above.

The terminal for detecting the electrocardiosignals can include, but is not limited to, the processor 40 and the memory 41. It will be understood by those skilled in the art that fig. 8 is only an example of the terminal 4 for detecting electrocardiographic signals, and does not constitute a limitation to the terminal for detecting electrocardiographic signals, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal for detecting electrocardiographic signals may further include an input-output terminal, a network access terminal, a bus, etc.

The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

The memory 41 may be an internal storage unit of the terminal for detecting electrocardiographic signals, such as a hard disk or a memory of the terminal for detecting electrocardiographic signals. The memory 41 may also be an external storage terminal of the terminal for detecting electrocardiographic signals, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal for detecting electrocardiographic signals. Further, the memory 41 may include both an internal storage unit and an external storage terminal of the terminal for detecting electrocardiographic signals. The memory 41 is used for storing the computer instructions and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output.

The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not cause the essential features of the corresponding technical solutions to depart from the spirit scope of the technical solutions of the embodiments of the present application, and are intended to be included within the scope of the present application.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:3D电活动表示

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!