Electrocardiogram rhythm feature recognition data processing method, system, medium and program product

CN122594942APending Publication Date: 2026-08-18RUIJIN HOSPITAL AFFILIATED TO SHANGHAI JIAO TONG UNIV SCHOOL OF MEDICINE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611081143.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

专业设备分析依托高精度采集装置,数据稳定性和精度较高,但设备成本高、部署场景受限,难以支撑海量心电数据的批量处理;且多针对长程信号设计,对短程阵发性节律特征的分类适配性不足,不适用于大规模心电数据集的快速筛查与标注

Benefits of technology

1)本发明以短程抗干扰的数据特征分类为核心,解决便携设备心电数据处理抗干扰能力不足、依赖长程信号的问题,在保留其便携优势的基础上,实现复杂环境下无需长程信号即可精准识别目标不规则心电节律特征,更好适配各类终端设备的即时数据筛查场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594942A_ABST
    Figure CN122594942A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of electrocardiosignal data processing, and discloses an electrocardio rhythm feature recognition data processing method, system, medium and program product, which comprises double verification of heartbeat quantity and ventricular premature beat proportion on acquired electrocardio feature data; generation of an instantaneous heart rate sequence, dynamic determination of a total number of bins and a heart rate step, mapping to obtain a symbol array and constructing a word sequence; calculation of Shannon information entropy and P wave disappearance probability; determination of a Shannon information entropy threshold and a P wave disappearance probability threshold, combined feature joint classification matching of the Shannon information entropy and the P wave disappearance probability, and output of a final electrocardio rhythm feature classification label result. The present application solves the problems of insufficient anti-interference ability and dependence on long-range signals in electrocardio data processing of portable devices, and realizes accurate identification of target irregular electrocardio rhythm features in complex environments without long-range signals on the basis of retaining the portability of the devices, thereby better adapting to instant data screening scenes of various terminal devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrocardiogram (ECG) signal data processing technology, and in particular to ECG rhythm feature recognition data processing methods, systems, media, and program products. Background Technology

[0002] Irregular RR intervals accompanied by the disappearance of P waves are a typical ECG rhythm pattern. Automated classification of this type of feature can be applied to scenarios such as batch labeling of ECG data, data preprocessing for wearable devices, and retrieval and classification of ECG databases. Because this type of rhythm is often paroxysmal, short in duration, and its signal characteristics are easily masked by noise, short-range, interference-resistant, and efficient identification algorithms are the core support for improving the efficiency of large-scale ECG data processing and a key foundation for the implementation of ECG health data screening technology.

[0003] Existing ECG rhythm feature classification technologies are mainly divided into two categories: high-precision analysis using specialized equipment and data processing using portable devices. Specialized equipment analysis relies on high-precision acquisition devices, resulting in high data stability and accuracy. However, the equipment is expensive and its deployment scenarios are limited, making it difficult to support the batch processing of massive ECG data. Furthermore, it is mostly designed for long-range signals and lacks sufficient adaptability for classifying short-range paroxysmal rhythm features, making it unsuitable for the rapid screening and annotation of large-scale ECG datasets.

[0004] However, portable devices for ECG data processing still have significant technical limitations in practical applications: due to limitations in device size, power consumption, and usage scenarios, the signals acquired by portable devices have weak anti-interference capabilities and are easily affected by electromyographic noise, motion artifacts, electrode contact, and electromagnetic interference, resulting in a low signal-to-noise ratio and high false positive and false negative rates for rhythm feature classification, making it difficult to achieve high-precision data classification requirements. Furthermore, existing algorithms often rely on long-range signals to effectively extract features, exhibiting poor real-time processing capabilities and failing to meet the demands of scenarios requiring efficient response, such as rapid classification of fragmented short-range data and rapid screening of batch data.

[0005] Therefore, how to provide a method, system, medium, and program product for processing ECG rhythm feature recognition data is an urgent problem to be solved. Summary of the Invention

[0006] The present invention provides a method, system, medium, and program product for processing electrocardiogram rhythm feature recognition data to solve the problems of the above-mentioned technologies in the prior art.

[0007] According to a first aspect of the present invention, a method for processing electrocardiogram rhythm feature recognition data is provided.

[0008] In one embodiment, the ECG rhythm feature recognition data processing method is completed entirely in the local device memory, without relying on external servers, disk I / O, or cloud intervention, to achieve memory-based closed data processing. The method includes: S1. Acquire electrocardiogram (ECG) characteristic data and perform dual verification on the acquired ECG characteristic data, including the number of heartbeats and the proportion of premature ventricular contractions. S2. Based on the ECG feature data after double verification, generate instantaneous heart rate sequence, dynamically determine the total number of bins and heart rate step size, map to obtain symbol array and construct word sequence; S3. Calculate the frequency and probability of occurrence of each symbol in the statistical word sequence, and combine it with the total number of heartbeats to calculate the Shannon information entropy and the probability of P wave disappearance, so as to quantify the irregularity of the RR interval; S4. Based on the data processing scenario, real-time operating parameters of the equipment, and individual baselines, determine the Shannon information entropy threshold and the P wave disappearance probability threshold, and perform joint feature classification matching by combining the Shannon information entropy and the P wave disappearance probability to output the final ECG rhythm feature classification labeling result.

[0009] In one embodiment, acquiring electrocardiogram (ECG) characteristic data and performing dual verification of the acquired ECG characteristic data based on the number of heartbeats and the proportion of premature ventricular contractions includes: S101. Obtain the raw electrocardiogram (ECG) signal data collected and stored by the wearable device, extract the R-peak position array, P-wave position array, ventricular premature beat state array and total heart rate locally, and store the raw ECG signal and locally extracted ECG feature data locally. S102. Determine whether the total number of heartbeats extracted locally is less than the preset heartbeat threshold. If so, determine that the number of heartbeats is insufficient and directly return the classification label result that does not meet the target irregular electrocardiogram rhythm characteristics. If not, proceed to step S103. S103. Calculate the proportion of premature ventricular contractions (PVCs) in all effective heartbeats to obtain the PVC ratio, and determine whether the PVC ratio is greater than the preset ratio threshold. If so, it is determined to be a rhythm abnormality caused by PVCs, and the classification label result that does not conform to the target irregular electrocardiographic rhythm characteristics is directly returned. If not, proceed to step S2.

[0010] In one embodiment, the local extraction of the R-peak position array, P-wave position array, ventricular premature beat status array, and total heart rate includes: The R-peak position and P-wave position are extracted using the peak detection method, and the R-peak position array and P-wave position array are determined based on the extracted R-peak position and P-wave position. The state of premature ventricular contractions (PVCs) is identified based on the correlation between heartbeats and normal heartbeat templates, and an array of PVC states is determined based on the identified PVC states. The total number of heartbeats is determined based on the total number of valid R peaks in the collected data.

[0011] In one embodiment, the step of generating an instantaneous heart rate sequence based on double-checked ECG feature data, dynamically determining the total number of bins and the heart rate step size, mapping to obtain a symbol array, and constructing a word sequence includes: S201. Based on the R-peak position array and the sampling frequency of the ECG signal, calculate the instantaneous heart rate corresponding to each heartbeat, and generate an instantaneous heart rate sequence based on the instantaneous heart rate of each heartbeat; S202. Based on the total number of heartbeats and upper and lower limit constraints, dynamically determine the total number of symbol bins, and calculate the heart rate step size corresponding to a single symbol based on the total number of symbol bins. S203. Based on the heart rate step length, the instantaneous heart rate sequence is mapped to a symbol array of preset length, and a continuous symbol sequence is constructed according to the symbol array to obtain the word sequence.

[0012] In one embodiment, before generating the instantaneous heart rate sequence, the method further includes: removing heart rates that are outside the physiological range and heart rates whose adjacent heart rate changes are greater than a preset heart rate threshold from the instantaneous heart rate sequence.

[0013] In one embodiment, the formula for calculating the instantaneous heart rate is: ; In the formula, For the first A momentary heart rate, For the first indivual The sampling point location of the peak, The sampling frequency of the electrocardiogram (ECG) signal. This represents the total number of heartbeats.

[0014] In one embodiment, the formula for calculating the heart rate step length is: ; ; In the formula, Heart rate stride length, To round down, This represents the total number of symbol bins.

[0015] In one embodiment, the expression for the word sequence is: ; ; In the formula, For the first One word, For the first A symbol, It is a left shift operator. This is the bitwise OR operator.

[0016] In one embodiment, the frequency and probability of occurrence of each symbol in the statistical word sequence are combined with the total number of heartbeats to calculate Shannon information entropy and the probability of P-wave disappearance, in order to quantify the irregularity of the RR interval, including: S301. Count the number of occurrences of each unique symbol in the word sequence, and calculate the probability of occurrence of each symbol based on the number of occurrences and the total number of heartbeats; S302. Based on the occurrence probability, calculate the Shannon information entropy of the entire heartbeat sequence, and determine the probability of P wave disappearance according to the number of heartbeats with missing P waves within the window, so as to quantify the irregularity of the RR interval and the degree of P wave absence.

[0017] In one embodiment, the formula for calculating the probability of occurrence is: ; In the formula, The probability of occurrence for each symbol, This represents the number of occurrences of each unique symbol in the word sequence. This represents the total number of heartbeats.

[0018] In one embodiment, the formula for calculating the Shannon information entropy is: ; The formula for calculating the probability of P-wave disappearance is: ; In the formula, For Shannon's information entropy, The probability of the P-wave disappearing. This represents the number of heartbeats with missing P waves within the window.

[0019] In one embodiment, the process involves determining the Shannon information entropy threshold and the P-wave disappearance probability threshold based on the data processing scenario, real-time device operating parameters, and individual baselines. Then, combining the Shannon information entropy and the P-wave disappearance probability, a joint feature classification and matching is performed to output the final ECG rhythm feature classification labeling result, including: S401. Obtain the normalized Shannon information entropy and P wave disappearance probability, and obtain the current data processing scenario type, real-time operating parameters of the device, and individual ECG baseline data. S402. Using the publicly available ECG data standard reference value as the benchmark threshold, determine the initial thresholds for Shannon information entropy and P wave disappearance probability, and use the individual ECG baseline to perform individualized adaptation and adjustment of the initial thresholds to obtain the adjusted Shannon information entropy threshold and P wave disappearance probability threshold. S403. Based on the current data processing scenario requirements and the real-time operating status of the equipment, make compensatory corrections to the adjusted Shannon information entropy threshold and P-wave disappearance probability threshold to obtain Shannon information entropy threshold and P-wave disappearance probability threshold that are suitable for the current working conditions. S404. Based on the Shannon information entropy threshold and P wave disappearance probability threshold under the current working conditions, perform joint feature classification matching on the normalized Shannon information entropy and P wave disappearance probability to obtain the final classification label result that conforms to or does not conform to the target irregular electrocardiogram rhythm feature. S405. Output the final classification label result and store the processed feature data and classification result into the local optimization unit for subsequent dynamic iteration of the threshold, so as to realize the real-time closed loop of data processing.

[0020] In one embodiment, the expression for the joint feature classification matching is: ; In the formula, For Shannon's information entropy, The probability of the P-wave disappearing. For OR, && for AND; When satisfied and ,or If the determination result is yes, it is marked as conforming to the target irregular electrocardiogram rhythm characteristics, and the corresponding classification label is returned; otherwise, if the determination result is no, it is marked as not conforming to the target irregular electrocardiogram rhythm characteristics, and the corresponding classification label is returned.

[0021] According to a second aspect of the present invention, an electrocardiogram rhythm feature recognition data processing system is provided.

[0022] In one embodiment, the electrocardiogram rhythm feature recognition data processing system includes: The ECG feature data verification module is used to acquire ECG feature data and perform dual verification on the acquired ECG feature data, including the number of heartbeats and the proportion of premature ventricular contractions. The heart rate sequence symbolization encoding module is used to generate instantaneous heart rate sequences based on double-checked ECG feature data, dynamically determine the total number of bins and heart rate step size, map them to obtain symbol arrays, and construct word sequences. The core feature calculation module is used to count the frequency and probability of occurrence of each symbol in the word sequence, and to calculate the Shannon information entropy and the probability of P wave disappearance in combination with the total number of heartbeats, so as to quantify the irregularity of the RR interval. The rhythm feature joint classification module is used to determine the Shannon information entropy threshold and the P wave disappearance probability threshold based on the data processing scenario, real-time equipment operating parameters and individual baseline, and to perform joint feature classification matching by combining the Shannon information entropy and the P wave disappearance probability, and output the final ECG rhythm feature classification labeling result.

[0023] According to a third aspect of the present invention, a computer-readable storage medium is provided.

[0024] In one embodiment, a computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the above method.

[0025] According to a fourth aspect of the present invention, a computer program product is provided.

[0026] In one embodiment, the computer program product stores a computer program that, when executed by a processor, implements the steps of the method.

[0027] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: 1) This invention focuses on short-range anti-interference data feature classification to solve the problems of insufficient anti-interference capability and reliance on long-range signals in the processing of ECG data in portable devices. While retaining its portability advantage, it enables accurate identification of target irregular ECG rhythm features without long-range signals in complex environments, and is better adapted to real-time data screening scenarios of various terminal devices.

[0028] 2) This invention utilizes core technologies such as RR interval symbol encoding and Shannon entropy calculation to address the shortcomings of existing portable ECG acquisition devices, including poor anti-interference, high misclassification rate, and reliance on long-range signals and insufficient real-time performance. It achieves accurate short-range feature classification, effectively filtering interference and reducing the misclassification rate. It is compatible with various portable devices, retaining the advantages of being compact, easy to operate, and low-cost. It is suitable for multiple scenarios and users of various types, assisting in large-scale ECG data screening and long-term data management. At the same time, relying on rigorous algorithms and a complete technical system, it solves the problem of missed identification of hidden rhythm abnormalities, supporting personalized cardiovascular health data management.

[0029] 3) The entire process of ECG data reading, feature extraction, threshold optimization and feature classification in this invention is completed locally on the wearable device. The original physiological data and processing results are stored locally throughout the process without the need to transmit to a remote server, thereby avoiding the leakage of personal health data from the source and ensuring user data security and privacy.

[0030] 4) This invention can not only match differentiated classification thresholds based on different scenarios such as batch data annotation and daily data monitoring, but also compensate and adjust the real-time status of the device such as signal quality and power consumption mode. At the same time, it supports individualized correction based on individual resting baseline, which significantly improves the data processing adaptability of different groups and scenarios compared with fixed threshold schemes.

[0031] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0033] Figure 1 This is a flowchart illustrating a method for processing electrocardiogram rhythm feature recognition data according to an exemplary embodiment; Figure 2 This is a structural block diagram of an electrocardiogram rhythm feature recognition data processing system according to an exemplary embodiment; Figure 3 This is a RR interval sequence diagram of the algorithm input in the electrocardiogram rhythm feature recognition data processing method according to an exemplary embodiment; Figure 4 This is an instantaneous heart rate sequence diagram calculated from the RR interval in an electrocardiogram rhythm feature recognition data processing method according to an exemplary embodiment; Figure 5 It is a symbol sequence diagram obtained in step 6 of the electrocardiogram rhythm feature recognition data processing method according to an exemplary embodiment; Figure 6 It is a word sequence diagram obtained in step 7 of the electrocardiogram rhythm feature recognition data processing method according to an exemplary embodiment; Figure 7 This is a schematic diagram of the structure of a computer device according to an exemplary embodiment. Detailed Implementation

[0034] The following description and accompanying drawings fully illustrate specific embodiments described herein to enable those skilled in the art to practice them. Some portions and features of certain embodiments may be included in or replace portions and features of other embodiments. The scope of the embodiments herein includes the entire scope of the claims and all available equivalents thereof. The various embodiments described herein are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments; similar or identical parts between embodiments can be referred to interchangeably.

[0035] The modules in the apparatus or system of this application can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0036] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0037] Figure 1 An embodiment of the electrocardiogram rhythm feature recognition data processing method of the present invention is shown.

[0038] In this optional embodiment, the ECG rhythm feature recognition data processing method is completed entirely in the local device memory, without relying on external servers, disk I / O, or cloud intervention, to achieve memory-based closed data processing, specifically including: S1. Acquire electrocardiogram (ECG) characteristic data and perform dual verification on the acquired ECG characteristic data, including the number of heartbeats and the proportion of premature ventricular contractions. S2. Based on the ECG feature data after double verification, generate instantaneous heart rate sequence, dynamically determine the total number of bins and heart rate step size, map to obtain symbol array and construct word sequence; S3. Calculate the frequency and probability of occurrence of each symbol in the statistical word sequence, and combine it with the total number of heartbeats to calculate the Shannon information entropy and the probability of P wave disappearance, so as to quantify the irregularity of the RR interval; S4. Based on the data processing scenario, real-time operating parameters of the equipment, and individual baselines, determine the Shannon information entropy threshold and the P wave disappearance probability threshold, and perform joint feature classification matching by combining the Shannon information entropy and the P wave disappearance probability to output the final ECG rhythm feature classification labeling result.

[0039] In this optional embodiment, the step of acquiring electrocardiogram (ECG) characteristic data and performing dual verification of the acquired ECG characteristic data on the number of heartbeats and the proportion of premature ventricular contractions includes: S101. Obtain the raw electrocardiogram (ECG) signal data collected and stored by the wearable device, extract the R-peak position array, P-wave position array, ventricular premature beat state array and total heart rate locally, and store the raw ECG signal and locally extracted ECG feature data locally. S102. Determine whether the total number of heartbeats extracted locally is less than the preset heartbeat threshold. If so, determine that the number of heartbeats is insufficient and directly return the classification label result that does not meet the target irregular electrocardiogram rhythm characteristics. If not, proceed to step S103. S103. Calculate the proportion of premature ventricular contractions (PVCs) in all effective heartbeats to obtain the PVC ratio, and determine whether the PVC ratio is greater than the preset ratio threshold. If so, it is determined to be a rhythm abnormality caused by PVCs, and the classification label result that does not conform to the target irregular electrocardiographic rhythm characteristics is directly returned. If not, proceed to step S2.

[0040] In this optional embodiment, the local extraction of the R-peak position array, P-wave position array, ventricular premature beat status array, and total heart rate includes: The R-peak position and P-wave position are extracted using the peak detection method, and the R-peak position array and P-wave position array are determined based on the extracted R-peak position and P-wave position. The state of premature ventricular contractions (PVCs) is identified based on the correlation between heartbeats and normal heartbeat templates, and an array of PVC states is determined based on the identified PVC states. The total number of heartbeats is determined based on the total number of valid R peaks in the collected data.

[0041] In this optional embodiment, the step of generating an instantaneous heart rate sequence based on double-checked ECG feature data, dynamically determining the total number of bins and the heart rate step size, mapping to obtain a symbol array, and constructing a word sequence includes: S201. Based on the R-peak position array and the sampling frequency of the ECG signal, calculate the instantaneous heart rate corresponding to each heartbeat, and generate an instantaneous heart rate sequence based on the instantaneous heart rate of each heartbeat; S202. Based on the total number of heartbeats and upper and lower limit constraints, dynamically determine the total number of symbol bins, and calculate the heart rate step size corresponding to a single symbol based on the total number of symbol bins. S203. Based on the heart rate step length, the instantaneous heart rate sequence is mapped to a symbol array of preset length, and a continuous symbol sequence is constructed according to the symbol array to obtain the word sequence.

[0042] In this optional embodiment, before generating the instantaneous heart rate sequence, the method further includes: removing heart rates that are outside the physiological range (40-240 BPM) and heart rates whose adjacent heart rate changes are greater than a preset heart rate threshold (adjacent RR interval difference > 400 ms).

[0043] In this optional embodiment, the formula for calculating the instantaneous heart rate is: ; In the formula, For the first A momentary heart rate, For the first indivual The sampling point location of the peak, The sampling frequency of the electrocardiogram (ECG) signal. This represents the total number of heartbeats.

[0044] In this optional embodiment, the formula for calculating the heart rate step length is: ; ; In the formula, Heart rate stride length, To round down, This represents the total number of symbol bins.

[0045] In this optional embodiment, the expression for the word sequence is: ; ; In the formula, For the first One word, For the first A symbol, It is a left shift operator. This is the bitwise OR operator.

[0046] In this optional embodiment, the frequency and probability of occurrence of each symbol in the statistical word sequence are combined with the total number of heartbeats to calculate the Shannon information entropy and the probability of P wave disappearance, in order to quantify the irregularity of the RR interval, including: S301. Count the number of occurrences of each unique symbol in the word sequence, and calculate the probability of occurrence of each symbol based on the number of occurrences and the total number of heartbeats; S302. Based on the occurrence probability, calculate the Shannon information entropy of the entire heartbeat sequence, and determine the probability of P wave disappearance according to the number of heartbeats with missing P waves within the window, so as to quantify the irregularity of the RR interval and the degree of P wave absence.

[0047] In this optional embodiment, the formula for calculating the probability of occurrence is: ; In the formula, The probability of occurrence for each symbol, This represents the number of occurrences of each unique symbol in the word sequence. This represents the total number of heartbeats.

[0048] In this optional embodiment, the formula for calculating the Shannon information entropy is: ; The formula for calculating the probability of P-wave disappearance is: ; In the formula, For Shannon's information entropy, The probability of the P-wave disappearing. This represents the number of heartbeats with missing P waves within the window.

[0049] In this optional embodiment, the process of determining the Shannon information entropy threshold and the P-wave disappearance probability threshold based on the data processing scenario, real-time device operating parameters, and individual baseline, and then performing joint feature classification matching by combining the Shannon information entropy and the P-wave disappearance probability to output the final ECG rhythm feature classification labeling result includes: S401. Obtain the normalized Shannon information entropy and P wave disappearance probability, and obtain the current data processing scenario type, real-time operating parameters of the device, and individual ECG baseline data. S402. Using the publicly available ECG data standard reference value as the benchmark threshold, determine the initial thresholds for Shannon information entropy and P wave disappearance probability, and use the individual ECG baseline to perform individualized adaptation and adjustment of the initial thresholds to obtain the adjusted Shannon information entropy threshold and P wave disappearance probability threshold. S403. Based on the current data processing scenario requirements and the real-time operating status of the equipment, make compensatory corrections to the adjusted Shannon information entropy threshold and P-wave disappearance probability threshold to obtain Shannon information entropy threshold and P-wave disappearance probability threshold that are suitable for the current working conditions. S404. Based on the Shannon information entropy threshold and P wave disappearance probability threshold under the current working conditions, perform joint feature classification matching on the normalized Shannon information entropy and P wave disappearance probability to obtain the final classification label result that conforms to or does not conform to the target irregular electrocardiogram rhythm feature. S405. Output the final classification label result and store the processed feature data and classification result into the local optimization unit for subsequent dynamic iteration of the threshold, so as to realize the real-time closed loop of data processing.

[0050] In this optional embodiment, the expression for the joint feature classification matching is: ; In the formula, For Shannon's information entropy, The probability of the P-wave disappearing. For OR, && for AND; When satisfied and ,or If the determination result is yes, it is marked as conforming to the target irregular electrocardiogram rhythm characteristics, and the corresponding classification label is returned; otherwise, if the determination result is no, it is marked as not conforming to the target irregular electrocardiogram rhythm characteristics, and the corresponding classification label is returned.

[0051] Figure 2 An embodiment of an electrocardiogram rhythm feature recognition data processing system according to the present invention is shown.

[0052] In this optional embodiment, the electrocardiogram rhythm feature recognition data processing system includes: The ECG feature data verification module 201 is used to acquire ECG feature data and perform dual verification on the acquired ECG feature data, including the number of heartbeats and the proportion of premature ventricular contractions. The heart rate sequence symbolization encoding module 202 is used to generate an instantaneous heart rate sequence based on the double-checked electrocardiogram feature data, dynamically determine the total number of bins and the heart rate step size, map them to obtain a symbol array, and construct a word sequence. The core feature calculation module 203 is used to count the frequency and probability of occurrence of each symbol in the word sequence, and to calculate the Shannon information entropy and the probability of P wave disappearance in combination with the total number of heartbeats, so as to quantify the irregularity of the RR interval. The rhythm feature joint classification module 204 is used to determine the Shannon information entropy threshold and the P wave disappearance probability threshold based on the data processing scenario, real-time equipment operating parameters and individual baseline, and to perform feature joint classification matching by combining the Shannon information entropy and the P wave disappearance probability, and output the final ECG rhythm feature classification labeling result.

[0053] To facilitate understanding of the above technical solutions of the present invention, the following further explains the above technical solutions of the present invention from the perspective of architecture and principle, as follows: A method for processing electrocardiogram rhythm feature recognition data includes: Step 1: Input the preprocessed ECG feature data, including: R-peak position array, P-wave position array, ventricular premature beat (PVC) status array corresponding to each R-peak, and total heart rate N. The R-peak and P-wave positions can be extracted using a peak-detection-based R-wave detection algorithm and a P-wave recognition algorithm. The PVC status is determined by extracting a normal heartbeat template and using the correlation between each heartbeat and the template as the standard. The total heart rate N represents the total number of valid R-peaks in the input data.

[0054] Step 2: Determine if the total number of heartbeats N in the input data is less than 15: If the result is yes, it is determined that the number of heartbeats is insufficient and cannot meet the statistical requirements for ECG rhythm feature classification, and the classification label result is returned as 0 (does not meet the target irregular ECG rhythm feature), and the process ends; if the result is no, proceed to step 3.

[0055] Step 3: Calculation of the proportion of premature ventricular contractions (PVCs) and screening for rhythm disturbances: Calculate the proportion of PVCs in all heartbeats. The formula is: ; judge Is it greater than 15%? If the result is yes, it is determined that the RR interval is irregular due to frequent premature ventricular contractions. This irregular fluctuation does not belong to the target irregular electrocardiographic rhythm characteristics. The classification label result is returned as 0 (does not meet the target irregular electrocardiographic rhythm characteristics), and the process ends. If the result is no, proceed to step 4.

[0056] Step 4: Based on the R-peak position array, calculate the instantaneous heart rate corresponding to each heartbeat, using the following formula: ; In the formula, For the first A momentary heart rate, For the first indivual The sampling point location of the peak, The sampling frequency of the electrocardiogram (ECG) signal. This represents the total number of heartbeats. The final result is an instantaneous heart rate array of length N-1. Figure 3 Showcased by The calculated RR interval sequence, Figure 4 This displays the heart rate sequence calculated in step 4. .

[0057] Step 5: Calculate the total number of symbols The formula is: ; In the formula, To round down, 18 and 315 here impose upper and lower limits on the total number of symbols, respectively, in the number of symbols. The purpose of this step is to dynamically adjust the symbol granularity according to the signal length, while limiting the problem of granularity being too fine or too coarse when the signal is too long or too short.

[0058] Step 6: Calculate the heart rate step length corresponding to a single symbol. The formula is: ; And based on step size ,like Figure 5 As shown, the instantaneous heart rate array is mapped to a symbol array of length N-1. The formula is: ; This step discretizes similar heart rate values ​​into symbols, providing a foundation for the subsequent construction of symbol sequences.

[0059] Step 7: As Figure 6 As shown, symbol sequence construction is based on symbol arrays. Construct a continuous sequence of symbols The formula is: ; In the formula, For the first One word, For the first A symbol, It is a left shift operator. This is the bitwise OR operator.

[0060] By concatenating three consecutive symbols bit by bit, a unique symbol sequence feature is generated, ultimately resulting in a sequence of length N. 2 word sequence arrays .

[0061] Step 8: Statistical analysis of word sequences The number of occurrences of each unique symbol in Calculate the probability of occurrence of each symbol. The formula is: ; In the formula, The probability of occurrence for each symbol, This represents the number of occurrences of each unique symbol in the word sequence. This represents the total number of heartbeats.

[0062] And based on probability Calculate the Shannon information entropy of the entire heartbeat sequence. The formula is: ; Used to quantify the irregularity of the RR interval, the higher the entropy value, the stronger the disorder of the RR interval, and the higher the matching degree with the target irregular electrocardiographic rhythm characteristics.

[0063] Step 9: Calculate the probability of the P wave disappearing, using the following formula: ; In the formula, The probability of the P-wave disappearing. This represents the number of heartbeats with missing P waves within the window (i.e., the number of heartbeats with zero P waves within the window).

[0064] The disappearance of the P wave is one of the typical signal characteristics of the target irregular electrocardiographic rhythm, and this probability is used to quantify the degree of P wave absence.

[0065] Step 10: Final classification and matching of target irregular ECG rhythm features 1) Obtain the normalized Shannon information entropy and P wave disappearance probability, and collect the current data processing scenario type, real-time operating parameters of the device, and individual ECG baseline data; 2) Using publicly available ECG data as a reference value as a baseline threshold, determine the initial thresholds for Shannon information entropy and P wave disappearance probability, and then use individual ECG baselines to individually adapt and adjust the initial thresholds to obtain the adjusted Shannon information entropy thresholds and P wave disappearance probability thresholds. Specifically, the individual baseline is established in the following way: the system collects the user's electrocardiogram data for a preset duration (e.g., the first 10 minutes before the user's first use) in the initial resting state to establish the individual heart rate baseline, and uses ±20% of the baseline as the basis for individualized threshold adjustment, replacing the statistical value of a fixed population.

[0066] 3) Based on the current data processing scenario requirements and the real-time operating status of the equipment, the adjusted Shannon information entropy threshold and P-wave disappearance probability threshold are compensated and corrected to obtain Shannon information entropy threshold and P-wave disappearance probability threshold that are suitable for the current working conditions. Specifically, the threshold adaptation rules based on data processing scenarios include: Batch data annotation scenario: targeting asymptomatic individuals, using standard heart rate reference values ​​and feature classification benchmark thresholds specified in medical guidelines (heart rate 60~100 bpm, respiratory rate 12~20 breaths / min). For home or long-term data management scenarios: targeting middle-aged and elderly or post-operative users, a narrow heart rate safety range (e.g., 55~95 bpm) is determined by combining industry-standard reference data, and the threshold range for judging Shannon entropy and P wave disappearance probability is adjusted accordingly to improve the classification and recall sensitivity of target rhythm features.

[0067] Specifically, the threshold compensation rules based on the real-time operating parameters of the equipment include: Signal quality index compensation: When the device detects a low signal quality index, motion artifacts, or poor electrode contact, the feature classification threshold range can be appropriately widened, or the trigger confirmation time can be extended to reduce false markings caused by noise. Power consumption mode compensation: In low power or energy-saving mode, configure relatively relaxed feature trigger conditions to reduce power consumption caused by frequent alarms.

[0068] 4) Based on the Shannon information entropy threshold and the P-wave disappearance probability threshold under the current operating conditions, perform joint feature classification and matching on the normalized Shannon information entropy and P-wave disappearance probability: ; In the formula, Shannon's information entropy, ranging from 0 to 1. The expression is OR, and && is AND; the result of the entire expression is yes if the first two expressions or the third expression are satisfied at the same time, otherwise it is no. If the matching result is yes, then the RR interval is determined to be irregular and the P wave is absent; or the RR interval is extremely irregular, which meets the target irregular ECG rhythm characteristics, and the classification label result is returned as 1, and the process ends. If the matching result is negative, it is determined that the irregularity of the RR interval is not significant, there is no obvious P wave disappearance feature, and it does not meet the target irregular ECG rhythm characteristics. The classification label result is returned as 0, and the process ends.

[0069] 5) Output the final classification and labeling results, and store the feature data and processing results of this processing into the local optimization unit for subsequent dynamic iteration of the threshold, so as to realize the real-time closed loop of on-site data processing.

[0070] Specifically, the on-site real-time closed-loop process is as follows: The local optimization unit is deployed on the wearable device's local processor to collect real-time signal and noise levels, user movement status, and feedback data from historical processing. It fine-tunes the classification threshold based on locally accumulated historical processing data, using preset threshold base values ​​and safety boundaries as constraints. The adjusted threshold is directly applied to the next ECG data classification process. The entire threshold optimization is completed locally, without relying on cloud computing power or external data input, achieving a real-time closed loop between on-site data processing and threshold optimization.

[0071] In this embodiment, the sampling frequency The frequency can be adjusted from 250Hz to 1000Hz depending on the hardware configuration of the wearable device; total number of symbols The upper and lower limits, information entropy threshold (0.56, 0.7), and P wave disappearance probability threshold (0.08) can be adaptively adjusted according to the physiological characteristics of different populations (such as the elderly and athletes) to improve the accuracy of ECG rhythm feature classification in different scenarios. Simultaneously, this invention effectively eliminates misclassification of irregular RR intervals caused by frequent premature ventricular contractions (PVCs) through PVC ratio screening, improving the robustness of the algorithm in complex ECG scenarios and making it suitable for embedded low-power real-time ECG data classification processing in wearable devices.

[0072] Table 1 below shows the test results of this algorithm on the MIT-BIH AFDB database. The data is divided into 30-second slices with 15-second overlaps. The irregular rhythm segments officially labeled in the AFDB dataset are used as the baseline labels (whether they are corresponding rhythm samples). The classification results of this algorithm on the slices are compared with the baseline labels.

[0073] Table 1: Classification results of target rhythm features in the AFDB dataset In Table 1, FP represents a false positive, FN a false negative, TP a true positive, and TN a true negative. Accuracy is the proportion of correctly classified samples in the total sample; precision is the proportion of samples labeled as matching the features that are actually corresponding rhythm samples; sensitivity is the proportion of correctly classified corresponding rhythm samples; and specificity is the proportion of correctly excluded non-corresponding rhythm samples. As shown in Table 1, the algorithm achieves an overall accuracy of 97.96% and a specificity of 98.72% for classifying target irregular ECG rhythm features, indicating a very strong ability to exclude non-target rhythm samples. The overall precision and sensitivity are 97.05% and 96.23%, respectively, indicating that the model achieves a good balance between feature labeling reliability and recall. The performance of each record is stable, with the classification accuracy exceeding 99% for most records.

[0074] It should be noted that this method is only used for the automated classification and labeling of ECG data. The output results are only for data processing and archiving reference and do not constitute any medical diagnosis or health assessment conclusion.

[0075] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores static and dynamic information data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the above method embodiments.

[0076] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0077] In addition, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0078] In addition, the present invention also provides a computer program product on which a computer program is stored, which, when executed by a processor, implements the steps in the above method embodiments.

[0079] In addition, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0080] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0081] This invention is not limited to the structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this invention is limited only by the appended claims.

Claims

1. A method of processing electrocardiogram rhythm feature recognition data, characterized in that, The method includes: S1. Acquire electrocardiogram (ECG) characteristic data and perform dual verification on the acquired ECG characteristic data, including the number of heartbeats and the proportion of premature ventricular contractions. S2. Based on the ECG feature data after double verification, generate instantaneous heart rate sequence, dynamically determine the total number of bins and heart rate step size, map to obtain symbol array and construct word sequence; S3. Calculate the frequency and probability of occurrence of each symbol in the statistical word sequence, and combine it with the total number of heartbeats to calculate the Shannon information entropy and the probability of P wave disappearance, so as to quantify the irregularity of the RR interval; S4. Based on the data processing scenario, real-time operating parameters of the equipment, and individual baselines, determine the Shannon information entropy threshold and the P wave disappearance probability threshold, and perform joint feature classification matching by combining the Shannon information entropy and the P wave disappearance probability to output the final ECG rhythm feature classification labeling result.

2. The electrocardiogram rhythm feature recognition data processing method according to claim 1, characterized in that, The acquisition of electrocardiogram (ECG) characteristic data, and the dual verification of the acquired ECG characteristic data in terms of heart rate and the proportion of premature ventricular contractions, includes: S101. Obtain the raw electrocardiogram (ECG) signal data collected and stored by the wearable device, extract the R-peak position array, P-wave position array, ventricular premature beat state array and total heart rate locally, and store the raw ECG signal and locally extracted ECG feature data locally. S102. Determine whether the total number of heartbeats extracted locally is less than the preset heartbeat threshold. If so, determine that the number of heartbeats is insufficient and directly return the classification label result that does not meet the target irregular electrocardiogram rhythm characteristics. If not, proceed to step S103. S103. Calculate the proportion of premature ventricular contractions (PVCs) in all effective heartbeats to obtain the PVC ratio, and determine whether the PVC ratio is greater than the preset ratio threshold. If so, it is determined to be a rhythm abnormality caused by PVCs, and the classification label result that does not conform to the target irregular electrocardiographic rhythm characteristics is directly returned. If not, proceed to step S2.

3. The electrocardiogram rhythm feature recognition data processing method according to claim 2, characterized in that, The locally extracted arrays include the R-peak position array, P-wave position array, ventricular premature beat status array, and total heart rate. The R-peak position and P-wave position are extracted using the peak detection method, and the R-peak position array and P-wave position array are determined based on the extracted R-peak position and P-wave position. The state of premature ventricular contractions (PVCs) is identified based on the correlation between heartbeats and normal heartbeat templates, and an array of PVC states is determined based on the identified PVC states. The total number of heartbeats is determined based on the total number of valid R peaks in the collected data.

4. The electrocardiogram rhythm feature recognition data processing method according to claim 1, characterized in that, The method involves generating an instantaneous heart rate sequence based on the double-checked ECG feature data, dynamically determining the total number of bins and the heart rate step size, mapping this to obtain a symbol array, and constructing a word sequence, including: S201. Based on the R-peak position array and the sampling frequency of the ECG signal, calculate the instantaneous heart rate corresponding to each heartbeat, and generate an instantaneous heart rate sequence based on the instantaneous heart rate of each heartbeat; S202. Based on the total number of heartbeats and upper and lower limit constraints, dynamically determine the total number of symbol bins, and calculate the heart rate step size corresponding to a single symbol based on the total number of symbol bins. S203. Based on the heart rate step length, the instantaneous heart rate sequence is mapped to a symbol array of preset length, and a continuous symbol sequence is constructed according to the symbol array to obtain the word sequence.

5. The electrocardiogram rhythm feature recognition data processing method according to claim 4, characterized in that, Before generating the instantaneous heart rate sequence, the process also includes: removing heart rates that are outside the physiological range and heart rates whose adjacent heart rate changes are greater than a preset heart rate threshold.

6. The method for processing electrocardiogram rhythm feature recognition data according to claim 4, characterized in that, The formula for calculating the instantaneous heart rate is: ; In the formula, For the first A momentary heart rate, For the first indivual The sampling point location of the peak, The sampling frequency of the electrocardiogram (ECG) signal. This represents the total number of heartbeats.

7. The method for processing electrocardiogram rhythm feature recognition data according to claim 6, characterized in that, The formula for calculating the heart rate step length is: ; ; In the formula, Heart rate stride length, To round down, This represents the total number of symbol bins.

8. The method for processing electrocardiogram rhythm feature recognition data according to claim 7, characterized in that, The expression for the word sequence is: ; ; In the formula, For the first One word, For the first A symbol, It is a left shift operator. This is the bitwise OR operator.

9. The method for processing electrocardiogram rhythm feature recognition data according to claim 1, characterized in that, The frequency and probability of each symbol in the statistical word sequence, combined with the total number of heartbeats to calculate Shannon information entropy and the probability of P-wave disappearance, are used to quantify the irregularity of the RR interval, including: S301. Count the number of occurrences of each unique symbol in the word sequence, and calculate the probability of occurrence of each symbol based on the number of occurrences and the total number of heartbeats; S302. Based on the occurrence probability, calculate the Shannon information entropy of the entire heartbeat sequence, and determine the probability of P wave disappearance according to the number of heartbeats with missing P waves within the window, so as to quantify the irregularity of the RR interval and the degree of P wave absence.

10. The method for processing electrocardiogram rhythm feature recognition data according to claim 9, characterized in that, The formula for calculating the probability of occurrence is: ; In the formula, The probability of occurrence for each symbol, This represents the number of occurrences of each unique symbol in the word sequence. This represents the total number of heartbeats.

11. The method for processing electrocardiogram rhythm feature recognition data according to claim 10, characterized in that, The formula for calculating Shannon's information entropy is as follows: ; The formula for calculating the probability of P-wave disappearance is: ; In the formula, For Shannon's information entropy, The probability of the P-wave disappearing. This represents the number of heartbeats with missing P waves within the window.

12. The method for processing electrocardiogram rhythm feature recognition data according to claim 1, characterized in that, Based on the data processing scenario, real-time equipment operating parameters, and individual baselines, the Shannon information entropy threshold and the P-wave disappearance probability threshold are determined. Then, combined with the Shannon information entropy and P-wave disappearance probability, feature joint classification matching is performed, outputting the final ECG rhythm feature classification labeling results, including: S401. Obtain the normalized Shannon information entropy and P wave disappearance probability, and collect the current data processing scenario type, real-time operating parameters of the device, and individual ECG baseline data. S402. Using the publicly available ECG data standard reference value as the benchmark threshold, determine the initial thresholds for Shannon information entropy and P wave disappearance probability, and use the individual ECG baseline to perform individualized adaptation and adjustment of the initial thresholds to obtain the adjusted Shannon information entropy threshold and P wave disappearance probability threshold. S403. Based on the current data processing scenario requirements and the real-time operating status of the equipment, make compensatory corrections to the adjusted Shannon information entropy threshold and P-wave disappearance probability threshold to obtain Shannon information entropy threshold and P-wave disappearance probability threshold that are suitable for the current working conditions. S404. Based on the Shannon information entropy threshold and P wave disappearance probability threshold under the current working conditions, perform joint feature classification matching on the normalized Shannon information entropy and P wave disappearance probability to obtain the final classification label result that conforms to or does not conform to the target irregular electrocardiogram rhythm feature. S405. Output the final classification label result and store the processed feature data and classification result into the local optimization unit for subsequent dynamic iteration of the threshold, so as to realize the real-time closed loop of data processing.

13. The method for processing electrocardiogram rhythm feature recognition data according to claim 12, characterized in that, The expression for the joint feature classification matching is: ; In the formula, For Shannon's information entropy, The probability of the P-wave disappearing. For OR, && for AND; When satisfied and ,or If the judgment result is yes, it is marked as conforming to the target irregular electrocardiogram rhythm characteristics, and the corresponding classification label is returned; Otherwise, if the result is negative, it is marked as not conforming to the target irregular electrocardiogram rhythm characteristics, and the corresponding classification label is returned.

14. A data processing system for recognizing electrocardiogram rhythm features, characterized in that, include: The ECG feature data verification module is used to acquire ECG feature data and perform dual verification on the acquired ECG feature data, including the number of heartbeats and the proportion of premature ventricular contractions. The heart rate sequence symbolization encoding module is used to generate instantaneous heart rate sequences based on double-checked ECG feature data, dynamically determine the total number of bins and heart rate step size, map them to obtain symbol arrays, and construct word sequences. The core feature calculation module is used to count the frequency and probability of occurrence of each symbol in the word sequence, and to calculate the Shannon information entropy and the probability of P wave disappearance in combination with the total number of heartbeats, so as to quantify the irregularity of the RR interval. The rhythm feature joint classification module is used to determine the Shannon information entropy threshold and the P wave disappearance probability threshold based on the data processing scenario, real-time equipment operating parameters and individual baseline, and to perform joint feature classification matching by combining the Shannon information entropy and the P wave disappearance probability, and output the final ECG rhythm feature classification labeling result.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.

16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.