Electrocardio data storage method based on electrocardio feature points

By fusing ECG feature point detection with clinical diagnostic text, a storage priority distribution map is generated, which solves the problems of wasteful ECG data storage resources and quality degradation in the past, and realizes an efficient and highly adaptable storage solution.

CN121789873APending Publication Date: 2026-04-03THE FIRST MEDICAL CENT CHINESE PLA GENERAL HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing ECG data storage methods fail to effectively extract key information, resulting in wasted storage resources or decreased data quality, which cannot meet the needs of clinical diagnosis.

Method used

The ECG feature point detection algorithm identifies ECG feature point sequences, combines them with clinical diagnostic text to construct an ECG feature matrix, generates a storage priority distribution map, and generates storage format constraints based on semantic weights to dynamically adjust the compression scheme.

Benefits of technology

It achieves targeted storage, reduces redundant data usage, ensures the integrity of key information, adapts to the storage needs of different ECG data, and improves storage efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121789873A_ABST
    Figure CN121789873A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electrocardio data storage, and discloses an electrocardio data storage method based on electrocardio feature points. The method comprises the following steps: acquiring an original electrocardiosignal through an electrocardiosignal acquisition device, and identifying an electrocardiosignal feature point sequence from the original electrocardiosignal by adopting an electrocardiosignal feature point detection algorithm; acquiring a corresponding clinical diagnosis text from a medical information system as semantic information; constructing an electrocardio feature matrix containing a feature point sequential relation and waveform morphological features by using the electrocardio feature point sequence and the clinical diagnosis text; performing storage priority evaluation on the electrocardio characteristic matrix to generate a storage priority distribution diagram; generating a storage format constraint condition containing a data compression rate threshold value, a storage format type parameter and a data integrity parameter according to the semantic weight of the distribution diagram and the clinical diagnosis text; generating an electrocardiogram data compression scheme based on the constraint conditions, and controlling the storage device to store the electrocardiogram data according to the scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrocardiogram (ECG) data storage technology, specifically to an ECG data storage method based on ECG feature points. Background Technology

[0002] In the medical field, electrocardiogram (ECG) data, as crucial physiological data reflecting the functional state of the human heart, directly impacts clinical diagnosis, disease monitoring, and medical research through its storage quality and efficiency. With the widespread adoption of ECG monitoring technology, various ECG signal acquisition devices have emerged, capable of acquiring large amounts of raw ECG signals in real time. However, raw ECG signals typically contain complex waveform information and redundant data. Direct storage of these signals would consume significant storage resources, leading to a substantial increase in storage costs and also affecting the efficiency of subsequent data retrieval and analysis.

[0003] Current ECG data storage methods often focus on simple compression of the raw signal, lacking targeted extraction and utilization of key information within the ECG data. For example, some storage schemes only use general data compression algorithms to compress the raw ECG signal without considering the physiological significance of ECG feature points. ECG feature point sequences can intuitively reflect the temporal patterns of cardiac electrical activity. For example, the position and morphological changes of feature points such as QRS complexes, P waves, and T waves are important bases for judging arrhythmias, myocardial ischemia, and other conditions. Ignoring storage strategies for these feature points may lead to the loss of key diagnostic information, affecting the accuracy of subsequent clinical diagnoses.

[0004] Current storage methods generally fail to incorporate semantic information such as clinical diagnostic text. Clinical diagnostic text records doctors' professional judgments of a patient's condition, including key semantic content such as disease type and symptom description. This information is strongly correlated with ECG data and can provide important reference for prioritizing ECG data storage. However, current solutions often store ECG data and clinical diagnostic text separately, failing to achieve collaborative utilization of the two. This leads to unreasonable allocation of storage resources, with some low-value, redundant ECG data occupying a large amount of storage space, while critical data with high diagnostic value may suffer from information distortion due to excessive compression.

[0005] Existing storage solutions often rely on fixed compression ratio thresholds and storage format parameters when generating storage format constraints, lacking dynamic adjustment capabilities. Different patients exhibit varying ECG data characteristics; for example, patients with arrhythmias experience significant ECG signal fluctuations, requiring higher storage integrity to preserve abnormal waveform information, while healthy individuals' ECG data is relatively stable, allowing for a more appropriate compression ratio to conserve storage resources. Fixed storage parameters cannot adapt to the diverse ECG data storage needs of different scenarios, either wasting storage resources or affecting data quality, making it difficult to achieve a balance between storage efficiency and data validity. These issues make current ECG data storage methods insufficient to meet the comprehensive requirements of clinical applications for data storage quality, efficiency, and resource optimization. Summary of the Invention

[0006] The purpose of this invention is to provide a method for storing electrocardiogram (ECG) data based on ECG feature points, so as to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides a method for storing electrocardiogram (ECG) data based on ECG feature points, the method comprising:

[0008] Raw electrocardiogram (ECG) signals are acquired using an ECG signal acquisition device, and an ECG feature point detection algorithm is used to identify ECG feature point sequences from the raw ECG signals.

[0009] Obtain clinical diagnostic text corresponding to electrocardiogram signals from the medical information system as semantic information;

[0010] An electrocardiogram feature matrix containing the temporal relationship and waveform morphology features of feature points was constructed using electrocardiogram feature point sequences and clinical diagnostic text.

[0011] The storage priority of the ECG feature matrix is ​​evaluated, and a storage priority distribution map is generated.

[0012] Storage format constraints are generated based on the storage priority distribution map and the semantic weights of the clinical diagnostic text. The storage format constraints include data compression rate threshold, storage format type parameter, and data integrity parameter.

[0013] Generate an ECG data compression scheme based on storage format constraints; control the storage device to store ECG data according to the ECG data compression scheme.

[0014] Preferably, the step of identifying the ECG feature point sequence from the original ECG signal using the ECG feature point detection algorithm includes: performing multi-scale wavelet transform decomposition on the original ECG signal to extract wavelet coefficients of different frequency bands; processing the wavelet coefficients through adaptive thresholding to suppress noise and enhance the wavelet modulus maxima corresponding to the feature points; locating the positions of the wavelet modulus maxima using the zero-crossing point detection method to preliminarily determine the candidate set of ECG feature points; and applying a hidden Markov model to perform state sequence decoding on the candidate set of ECG feature points to correct false detection points and output an accurate ECG feature point sequence.

[0015] Preferably, the step of constructing an ECG feature matrix containing the temporal relationship and waveform morphology features of feature points using ECG feature point sequences and clinical diagnostic text includes: mapping the ECG feature point sequences into a directed graph structure, where nodes represent feature points and edges represent the time interval and amplitude difference between feature points; extracting medical term entities from the clinical diagnostic text and converting the medical term entities into semantic vectors through a word embedding model; and using a graph attention network to aggregate the node features and semantic vectors of the directed graph structure to generate an ECG feature matrix that integrates temporal and semantic features.

[0016] Preferably, the step of evaluating the storage priority of the ECG feature matrix and generating a storage priority distribution map includes: constructing an evaluation model based on a long short-term memory network, wherein the input layer of the long short-term memory network receives the ECG feature matrix and the hidden layer learns the long-term dependencies of the matrix; applying a softmax function to the output layer to calculate the storage priority score of each feature point; and smoothing the storage priority scores through Gaussian filtering to generate a continuous storage priority distribution map.

[0017] Preferably, the step of generating storage format constraints based on the storage priority distribution map and the semantic weights of the clinical diagnostic text includes: extracting the boundary coordinates and area parameters of high-priority regions from the storage priority distribution map; calculating the semantic weight of each medical term in the clinical diagnostic text using the term frequency-inverse document frequency method; and solving the storage format constraints, including the data compression rate threshold and storage format type parameters, by combining the boundary coordinates, area parameters, and semantic weights using a linear programming method.

[0018] Preferably, the ECG data compression scheme based on storage format constraints includes: designing a compression framework based on dictionary learning, where dictionary learning learns the base dictionary of the ECG feature matrix through sparse coding; taking the storage format constraints as the optimization objective, iteratively updating the base dictionary and sparse coefficients; and outputting the optimized dictionary and coefficients as the ECG data compression scheme.

[0019] Preferably, the control storage device stores ECG data according to the ECG data compression scheme, which includes: parsing the ECG data compression scheme into a storage command sequence; verifying the protocol compatibility between the storage command sequence and the storage device; dynamically adjusting the timing parameters of the storage command sequence according to the verification results, and sending it to the storage device to perform a data writing operation.

[0020] Preferably, the extraction of medical term entities from clinical diagnostic text includes: matching patterns of medical terms in clinical diagnostic text using rule-based regular expressions; standardizing the matched terms using a medical ontology database to eliminate synonym ambiguity; and calculating the contextual relevance of the standardized terms as part of the semantic features.

[0021] Preferably, the construction of the evaluation model based on the Long Short-Term Memory (LSTM) network includes: introducing a gating mechanism into the hidden layer of the LTM network to control the flow of information; using dropout technology to prevent overfitting; and optimizing the weight parameters of the LTM network through the backpropagation algorithm.

[0022] Preferably, the dictionary-based compression framework design includes: initializing the base dictionary using a random matrix; employing the alternating direction multiplier method to solve the sparse coding problem; and setting convergence criteria to control the number of iterations to ensure the quality of the compression scheme.

[0023] Compared with the prior art, the beneficial effects of the present invention are:

[0024] This ECG data storage method based on ECG feature points acquires raw ECG signals using an ECG signal acquisition device, and then uses an ECG feature point detection algorithm to identify ECG feature point sequences, enabling precise extraction of key physiological information from the ECG data. The ECG feature point sequences contain core features reflecting the regularity of cardiac electrical activity, such as the QRS complex, P wave, and T wave. Compared to the traditional method of directly storing raw ECG signals, extracting this sequence first avoids redundant data from the raw signal occupying storage resources, while focusing on key information valuable for clinical diagnosis, making subsequent storage more targeted and reducing unnecessary storage costs.

[0025] By retrieving corresponding clinical diagnostic texts from medical information systems as semantic information and combining them with electrocardiogram (ECG) feature point sequences to construct an ECG feature matrix, a deep fusion of ECG data and clinical semantic information is achieved. The disease type and symptom descriptions contained in the clinical diagnostic texts provide semantic reference value to the ECG feature matrix, breaking the limitations of traditional storage methods that separate ECG data from clinical information. This fusion approach ensures that the ECG feature matrix not only includes the temporal relationship and waveform morphology of feature points but also incorporates professional clinical diagnostic judgments. This makes subsequent storage priority assessment of the ECG feature matrix more aligned with actual clinical needs, avoiding misjudgments in storage priority due to a lack of semantic reference, and ensuring that data with high diagnostic value receives focused attention.

[0026] By evaluating the storage priority of the ECG feature matrix and generating a storage priority distribution map, the importance of storing different parts of the ECG data can be clearly distinguished. Based on this distribution map and the semantic weights of the clinical diagnostic text, storage format constraints are generated. These constraints include data compression rate thresholds, storage format type parameters, and data integrity parameters, enabling dynamic adaptation of storage parameters. For high-priority storage areas, lower compression rate thresholds and higher data integrity parameters can be set to retain the complete information of key data; for lower-priority areas, the compression rate threshold can be appropriately increased. This saves storage resources without affecting core diagnostic needs, effectively balancing storage efficiency and data quality, and avoiding the resource waste or data distortion problems of traditional fixed-parameter storage methods.

[0027] An ECG data compression scheme is generated based on storage format constraints, and the storage device is controlled to store data according to this scheme, further ensuring the standardization and adaptability of the storage process. The compression scheme is generated based on actual storage needs, rather than relying on a general compression algorithm. It can adjust the compression strategy according to the characteristics of different ECG data and clinical needs, ensuring that the compressed data not only meets the requirements of storage resource optimization but also satisfies the data validity requirements of subsequent clinical diagnosis, disease review, and medical research. The entire methodology is interconnected, from data extraction and information fusion to priority evaluation, parameter setting, and compressed storage, forming a complete and targeted storage system. This solves the problems of insufficient targeting, information separation, and fixed parameters in traditional storage methods, better adapting to the comprehensive needs of ECG data storage in clinical scenarios. Attached Figure Description

[0028] Figure 1 This is a schematic diagram illustrating the working principle of the ECG data storage method based on ECG feature points as described in this invention.

[0029] Figure 2 A sub-flowchart for ECG feature point sequence identification;

[0030] Figure 3 A sub-flowchart for constructing the ECG feature matrix. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] Please see Figure 1 This invention provides a method for storing electrocardiogram (ECG) data based on ECG feature points. The method includes acquiring raw ECG signals using an ECG signal acquisition device. The ECG signal acquisition device uses electrode patches that contact the human skin to acquire analog ECG signals and convert them into digital signals via an analog-to-digital converter. An ECG feature point detection algorithm is used to identify ECG feature point sequences from the raw ECG signals. The algorithm processes the raw ECG signals to locate key feature points such as the P wave, QRS complex, and T wave. Clinical diagnostic text corresponding to the ECG signals is obtained from a medical information system as semantic information. The medical information system integrates a hospital database and extracts diagnostic report text through an application programming interface (API). An ECG feature matrix containing the temporal relationship and waveform morphology of the feature points is constructed using the ECG feature point sequences and clinical diagnostic text. The ECG feature matrix integrates time-domain and morphological domain attributes. Storage priority is evaluated on the ECG feature matrix, generating a storage priority distribution map. The storage priority evaluation analyzes the clinical value of different regions in the matrix. Storage format constraints are generated based on the storage priority distribution map and the semantic weights of the clinical diagnostic text. These constraints include a data compression rate threshold, storage format type parameters, and data integrity parameters. An ECG data compression scheme is generated based on storage format constraints, and this scheme optimizes storage resource allocation. The system controls storage devices (including solid-state drives or cloud storage systems) to store ECG data according to the compression scheme and performs data write operations.

[0033] Example 1: See Figure 2The ECG feature point detection algorithm identifies ECG feature point sequences from raw ECG signals based on multi-scale signal analysis. Multi-scale wavelet transform decomposition is the starting point of this analysis. Multi-scale wavelet transform decomposition uses Daubechies wavelet basis functions to perform multi-level decomposition of the raw ECG signal, separating the signal into different frequency sub-bands. The wavelet coefficients of each sub-band characterize the local properties of the signal at a specific scale. These coefficients provide a multi-resolution observation perspective for subsequent feature point localization. Adaptive thresholding of the wavelet coefficients effectively distinguishes real physiological signals from background noise. Adaptive thresholding dynamically calculates the threshold level based on the statistical characteristics of each wavelet coefficient sub-band, suppressing noise coefficients with small amplitudes while preserving and enhancing significant wavelet modulus maxima corresponding to ECG feature points. Wavelet modulus maxima exhibit local extremum characteristics at locations where the signal undergoes abrupt changes. Locating wavelet modulus maxima using the zero-crossing detection method is a precise localization strategy. This method identifies points where the wavelet coefficient signs change to pinpoint the exact location of the modulus maxima. These points correspond to edges in the original ECG signal where waveforms undergo rapid changes, such as the start or peak of the QRS wave. The initially determined candidate set of ECG feature points contains these potential localization points. Applying a Hidden Markov Model (HMM) to decode the state sequence of the candidate set introduces temporal constraints between ECG waveforms. The HMM models the cardiac cycle as a hidden state sequence, where each state corresponds to a specific phase of the ECG waveform. The observation sequence is composed of feature vectors extracted from wavelet coefficients. The Viterbi algorithm is used to find the state path most likely to generate the current observation sequence, thereby eliminating false positives in the initial candidate set and interpolating missed positives, outputting a precise ECG feature point sequence.

[0034] The specific implementation of multi-scale wavelet transform decomposition relies on the recursive filtering and downsampling operations of the discrete wavelet transform algorithm. The discrete wavelet transform algorithm passes the input raw ECG signal through a set of low-pass and high-pass filters to generate approximation coefficients and detail coefficients. The approximation coefficients capture the macroscopic trend and low-frequency components of the signal, while the detail coefficients capture the high-frequency details and transient information. The choice of the number of decomposition layers requires a trade-off between frequency resolution and computational complexity; typically, five layers are used to cover the main energy distribution bands of the ECG signal. The core of adaptive thresholding lies in the selection of the threshold function and the calculation of the threshold size. The soft thresholding function subtracts a threshold from the absolute value of the wavelet coefficients and retains the sign; coefficients smaller than the threshold are set to zero. This nonlinear processing avoids artificially introduced distortion while denoising. The threshold size is calculated using the Stein unbiased risk estimation method, which adaptively determines the optimal threshold by minimizing the mean square error risk function. The implementation of the zero-crossing detection method requires continuous scanning and comparison of the wavelet coefficient sequence. When the product of two adjacent wavelet coefficients is less than zero, it indicates a sign change, and this point is the zero-crossing point. The corresponding wavelet modulus maxima are determined by comparing the amplitudes of the coefficients in the neighborhood. The initially determined candidate set of ECG feature points is a list containing time position and amplitude information. The construction of the Hidden Markov Model requires defining a set of states, a set of observation symbols, and three probability matrices. The set of states typically includes waveform phases such as the P wave, QRS complex, and T wave. The observation symbols are obtained by wavelet coefficient feature quantization. The state transition probability matrix encodes the temporal pattern of the transitions between different phases of the ECG waveform. The observation probability matrix describes the probability of generating a certain observation feature under a specific state. The initial state probability matrix sets the prior distribution of the initial phase.

[0035] The training process of the ECG feature point detection algorithm requires a large amount of well-labeled ECG data. This labeled data is precisely marked by cardiac electrophysiologists according to standard specifications, identifying feature points in the ECG signal. These labeled points serve as supervisory information for training the parameters of the Hidden Markov Model (HMM). The training algorithm employs the Baum-Welch algorithm, an expectation-maximization algorithm that iteratively updates model parameters to maximize the probability of generating observation sequences. The output of the ECG feature point sequence needs to include complete temporal location information and type labels. Each feature point records its relative time offset within the cardiac cycle, its absolute sampling point index, and its type code. The type code follows standard physiological definitions, such as P-wave start point, Q-wave trough point, R-wave peak point, S-wave trough point, and T-wave end point. The sequence data is stored in a structured format for subsequent processing. The computational efficiency of ECG feature point detection algorithms is crucial for real-time processing. Algorithm optimization can be achieved in several ways, such as using fast wavelet transform to reduce the computational cost of convolution operations, using sliding window techniques to avoid full caching of the entire long sequence, and pruning the Viterbi algorithm to reduce the space complexity of state search. These optimizations enable the algorithm to run stably on resource-constrained embedded ECG devices. The robustness of ECG feature point detection algorithms needs to cope with various physiological and non-physiological disturbances. Common disturbances include baseline drift, power line noise, electromyographic noise, and electrode contact noise. Multi-scale wavelet transform decomposition analyzes the signal at different scales, making feature point detection independent of a single frequency component. Adaptive thresholding can adjust sensitivity based on local noise levels, while hidden Markov models utilize the overall morphological regularity of the ECG waveform to correct local detection biases.

[0036] The accuracy of ECG feature point sequences directly affects the quality of subsequent ECG feature matrix construction. Timing errors in feature point localization can lead to waveform morphology distortion, and missed or false detections can disrupt the integrity of temporal relationships. Therefore, ECG feature point detection algorithms require rigorous performance validation. Validation metrics typically include detection sensitivity, positive predictive value, and the mean and standard deviation of localization errors, calculated on independent test datasets. ECG feature point detection algorithms can be further extended to detect more subtle waveform features. Besides basic P waves, QRS complexes, and T waves, algorithms can be designed to detect microvolt-level signals such as U waves, J waves, and ventricular late potentials. This requires higher-precision wavelet transforms and more complex feature extraction methods, such as analyzing wavelet coefficients of specific frequency bands at higher decomposition scales. Combining ECG feature point detection algorithms with clinical diagnostic text information provides context for interpreting the physiological meaning of feature points. For example, detecting specific ST-segment elevation morphological features can be associated with the term "acute myocardial infarction" in diagnostic text. This association enriches the semantic information of the features and provides clinical evidence for subsequent storage priority assessment. The implementation of ECG feature point detection algorithms needs to consider different ECG lead systems. The signal morphology of each lead in a standard 12-lead ECG differs, requiring the algorithm to establish a feature point detection model for each lead separately, or to employ a multi-channel joint analysis method, utilizing the spatial relationships between leads to improve detection consistency. The continuous learning mechanism of the ECG feature point detection algorithm can be achieved by updating the parameters of the Hidden Markov Model online. When new labeled data becomes available, the model parameters can be incrementally updated, adapting to changes in ECG signal characteristics among different populations or under different acquisition environments. This enhances the adaptability of the detection algorithm in long-term monitoring applications.

[0037] Example 2: See Figure 3The process of constructing an ECG feature matrix containing the temporal relationship and waveform morphology of feature points using ECG feature point sequences and clinical diagnostic text begins with data structure transformation. Mapping the ECG feature point sequence to a directed graph structure is the basic step in constructing a directed graph structure. The nodes of the directed graph structure represent individual ECG feature points and store their feature information. The node attributes include feature point type encoding, absolute amplitude value, time offset relative to the reference point, and phase identifier of the cardiac cycle. The edges of the directed graph structure connect feature points with physiological sequence associations. The edge weights quantify the relationship between feature points. The edge weight calculation involves two dimensions: time interval and amplitude difference. The time interval is represented as the absolute value of the difference in the number of sampling points between adjacent feature points, and the amplitude difference is obtained by calculating the normalized difference of the voltage values ​​of consecutive feature points. Extracting medical terminology entities from clinical diagnostic texts requires the application of rule-based regular expression matching. This method relies on a predefined medical terminology pattern library, which contains standard medical terms and their common variants. The regular expression engine scans the string stream of the clinical diagnostic text, identifying substrings that match the pattern definitions. The matching process considers medical abbreviations, compound words, and the negation of terms. The matching results generate a list of candidate medical terms. Standardizing the matched terms using a medical ontology library is crucial for ensuring semantic consistency. This library integrates concept definitions from the SNOMEDCT clinical terminology system or the UMLS unified medical language system. Standardization maps the matched surface-form terms to unique concept identifiers in the ontology library. The mapping process parses the synonym relationships, hierarchical relationships, and semantic types of the terms, eliminating ambiguities caused by differences in expression. Calculating the contextual relevance of standardized terms requires analyzing the distribution characteristics of the terms in the diagnostic text. Contextual relevance is measured by statistically analyzing the association strength between the term and other co-occurring terms in the text. The co-occurrence window is set to the sentence or paragraph range, and the calculated relevance score serves as a supplementary indicator of the semantic importance of the term.

[0038] The physical representation of a directed graph structure can employ an adjacency matrix or adjacency list data structure. An adjacency matrix is ​​a two-dimensional square matrix where row and column indices correspond to feature point numbers, and matrix elements store the weight values ​​of connecting edges. An adjacency list maintains a list of connecting edges for each node, recording the indices of neighboring nodes and edge weights. The specific value of the edge weight is determined by a linear combination of the reciprocal of the time interval and the amplitude difference, with weight values ​​normalized to the zero-to-one interval. The pattern library for rule-based regular expression matching methods requires continuous maintenance and updates. The pattern library is constructed with reference to clinical diagnostic report writing standards, medical terminology dictionaries, and historically accumulated diagnostic text corpora. Each regular expression pattern includes a core term stem, optional prefixes and suffixes, and allowed separator symbols. The matching algorithm employs the longest match principle to improve accuracy, and manual verification of matching results filters out obvious errors. The standardization process of the medical ontology library calls the application programming interface (API) to access a remote terminology service. The API receives terminology string parameters and returns standard concept identifiers and related metadata, including concept definitions, semantic types, and hierarchical relationship chains. For new terms that fail to map, a manual review process is initiated, and consideration is given to expanding the local dictionary. The context relevance calculation adopts a variant of the term frequency-inverse document frequency method. The term frequency counts the number of times a term appears in the current text, while the inverse document frequency is calculated based on a large-scale medical literature corpus. The relevance score is the logarithmic product of the term frequency and the inverse document frequency, and the score is processed by min-max normalization.

[0039] Converting medical term entities into semantic vectors using word embedding models is a method utilizing deep learning techniques. The word embedding model employs a Word2Vec jumper model architecture, pre-trained on a large-scale medical text corpus including academic papers, clinical guidelines, and electronic medical records. The model learns to map each term to a fixed-dimensional real-valued vector. The semantic vector captures the distributed semantic features of the terms, with semantically similar terms positioned close together in the vector space. Using graph attention networks to aggregate node features and semantic vectors in a directed graph structure is a core step in achieving information fusion. Graph attention networks are graph neural networks based on attention mechanisms. For each node in a directed graph structure, the graph attention network calculates the attention weights of its neighboring nodes. The weight values ​​reflect the contribution of neighboring nodes to the feature representation of the central node. The initial feature vector of a node is formed by concatenating feature point attributes and the corresponding term semantic vector. The graph attention network propagates and transforms features through multiple graph attention layers, with each layer outputting an updated node representation. Finally, a fixed-size ECG feature matrix is ​​generated through pooling operations. The row dimension of the ECG feature matrix is ​​consistent with the number of nodes in the directed graph structure, while the column dimension contains a comprehensive expression of the original feature point attributes, temporal relationship features, and semantic features.

[0040] The word embedding model employs negative sampling to accelerate training and improve vector quality. Negative sampling randomly selects non-contextual words from the corpus as negative samples. The model aims to maximize the co-occurrence probability of positive samples and minimize the co-occurrence probability of negative samples. Training is iterated multiple times until the loss function converges. The resulting word vectors are set to 300 dimensions to balance expressive power and computational complexity. The graph attention network implementation includes a multi-head attention mechanism. Each attention head calculates attention weights in a different subspace. The multi-head output vectors are concatenated and linearly transformed to obtain the final node representation. The number of layers in the graph attention network is determined based on the diameter and complexity of the directed graph structure; typically, two to three layers are sufficient to capture local and global structural information. The node feature aggregation function uses a weighted summation method, with weights dynamically determined by the attention coefficients. Generating the ECG feature matrix requires handling variable-length input sequences. For directed graph structures with an indefinite number of nodes, virtual nodes are introduced for padding or global attention pooling is used to ensure the output matrix dimension is consistent and compatible with downstream processing modules. Matrix data is stored as floating-point arrays and supports batch tensor operations. The entire construction process involves the cross-integration of multiple technical fields such as ECG signal processing, natural language processing, and graph representation learning. The constructed ECG feature matrix simultaneously encodes the temporal dynamic characteristics of ECG waveforms and the semantic information of clinical diagnosis, providing rich feature inputs for subsequent storage priority evaluation.

[0041] Example 3: The process of evaluating the storage priority of the ECG feature matrix and generating a storage priority distribution map relies on an evaluation model based on a Long Short-Term Memory (LSTM) network. This LTM-based evaluation model is designed to capture long-term dependency patterns in the ECG feature matrix that evolve over time. These patterns are crucial for determining the clinical value of different waveform segments. The input layer of the LTM-based evaluation model receives the ECG feature matrix. The number of neurons in the input layer perfectly matches the feature dimensions of the ECG feature matrix, ensuring that the feature vector at each time step is fully captured. The hidden layer learns the long-term dependencies of the matrix. The hidden layer consists of multiple LTM units connected in series. Each LTM unit contains two internal memory units: cell state and hidden state. The cell state acts as the carrier of long-term memory throughout the time series, while the hidden state is responsible for the transmission and output of short-term memory. A gating mechanism is introduced into the hidden layer of the LTM-based evaluation model. This gating mechanism consists of three non-linear structures: an input gate, a forget gate, and an output gate. The input gate controls the degree to which the current input information updates the cell state, the forget gate determines the proportion of historical cell state information retained, and the output gate regulates the contribution of the cell state to the output of the current hidden state. Dropout is used to prevent overfitting. During model training, dropout randomly sets the outputs of hidden layer neurons to zero with a certain probability, forcing the network to avoid over-reliance on the activation patterns of a few neurons and enhancing the model's generalization ability. Backpropagation optimizes the weight parameters of the evaluation model based on a Long Short-Term Memory (LSTM) network. Backpropagation calculates the gradient of the loss function with respect to each weight along the time axis, and iteratively updates the weight values ​​using optimization algorithms, gradually reducing the loss function value. A softmax function is applied to the output layer to calculate the storage priority score for each feature point. The softmax function converts the raw scores of the hidden layer's final output into a probability distribution, and the probability value obtained for each feature point represents its relative storage importance level. Gaussian filtering smooths the storage priority scores. Gaussian filtering uses a Gaussian function with a fixed standard deviation as the convolution kernel to perform convolution operations on the priority score sequence, filtering out sharp peaks caused by random fluctuations and generating a continuous storage priority distribution map.

[0042] Training an evaluation model based on Long Short-Term Memory (LSTM) networks requires a high-quality training dataset. This dataset consists of a large number of historical ECG feature matrices and corresponding expert-annotated priority labels. Expert labels assign priority category labels to each time point in the feature matrix based on clinical importance. The model's hyperparameter settings affect learning performance. Key hyperparameters include the number of layers in the LTM network, the number of units per layer, the dropout rate, the learning rate, and the number of training iterations. These parameters are fine-tuned on an independent validation set through cross-validation. The gating mechanism involves two activation functions: sigmoid and hyperbolic tangent. The sigmoid function compresses input values ​​to between 0 and 1 for gating signals, while the hyperbolic tangent function maps values ​​to between -1 and 1 for state updates. The dropout rate is typically set between 0.2 and 0.5. A dropout rate that is too high can lead to underfitting, while a dropout rate that is too low is ineffective in preventing overfitting. Backpropagation typically employs a time-based backpropagation algorithm. This algorithm unfolds the computation graph along the time axis and propagates the error backward. Gradient clipping is used to prevent gradient explosion. The softmax function takes the linear transformation result of the output layer as input and outputs the predicted probability of each priority category. The loss function uses class cross-entropy loss to measure the difference between the predicted probability distribution and the true label distribution.

[0043] Generating a storage priority distribution map requires visual mapping of the smoothed priority scores, mapping the priority scores on the time series to a color space or grayscale space. High-priority areas are represented using warm or dark colors, and low-priority areas using cool or light colors. The distribution map can be output as a two-dimensional image file or a data file containing coordinate-priority value pairs, facilitating parsing and use by subsequent processing modules. The inference phase of the evaluation model based on a Long Short-Term Memory (LSTM) network uses the complete network structure, with a dropout rate set to zero to utilize the full model capacity. Inputting a new ECG feature matrix allows for rapid output of the priority score sequence. The computational efficiency of the priority evaluation model is crucial for practical applications. Model optimization techniques such as layer normalization, weight pruning, and quantization can improve inference speed, enabling the model to meet real-time processing requirements. The interpretability of the model can be enhanced through attention weight analysis, observing which parts of the feature matrix the model focuses on when making priority judgments, which helps verify the rationality of the model's decisions. Combining the storage priority distribution map with the semantic information of clinical diagnostic text can further improve the accuracy of the evaluation, for example, by weighting the priority of regions corresponding to abnormal waveforms mentioned in the diagnostic conclusion.

[0044] Evaluation models based on Long Short-Term Memory (LSTM) networks have high requirements for the quality of the input ECG feature matrix. Noise or outliers in the feature matrix may interfere with the model's judgment; therefore, necessary quality control and preprocessing of the feature matrix are required before inputting it into the model. The model's long-term dependent learning ability enables it to identify complex patterns across multiple cardiac cycles, which is particularly important for evaluating the storage value of continuous events such as those preceding and following arrhythmias. The continuity of the storage priority distribution map allows it to accurately characterize the gradual change of priority over time, rather than just discrete labels.

[0045] The priority score calculation process can be formally expressed as the following formula:

[0046]

[0047] in: Indicates at a point in time The calculated storage priority score vector, This represents the weight matrix from the hidden state to the output layer. It is the Long Short-Term Memory Network at a certain point in time. The resulting hidden state, This is the corresponding bias term. The function ensures that the sum of all elements in the output vector is 1, with each element representing the probability of the corresponding priority class. This formula describes the linear transformation and non-linear normalization process from the hidden state to the final priority score.

[0048] Example 4: The process of generating storage format constraints based on the storage priority distribution map and the semantic weights of clinical diagnostic text begins with a quantitative analysis of the storage priority distribution map. Extracting the boundary coordinates and area parameters of high-priority regions from the map requires region segmentation techniques from image processing. The storage priority distribution map is visualized as a two-dimensional grayscale image where pixel brightness values ​​are proportional to storage priority scores. High-priority regions are defined by setting an adaptive threshold, which is dynamically calculated based on the statistical distribution of pixel values ​​across the entire distribution map. Boundary coordinates are obtained by tracing the contours of high-priority regions. The contour tracing algorithm moves along the region edges and records the coordinate sequence of each boundary point, ultimately representing a series of continuous image pixel positions. The area parameter is obtained by calculating the total number of pixels contained within the high-priority region. This area parameter needs to be calibrated according to the actual physical size of the image to reflect the true time span. The ratio of the area parameter to the total area of ​​the distribution map quantifies the relative importance of high-priority regions. Calculating the semantic weight of each medical term in clinical diagnostic text using the term frequency-inverse document frequency (IF-VRF) method requires constructing a term-document matrix. The term frequency component of the IF-VRF method counts the frequency of each term in the current clinical diagnostic text and normalizes it to eliminate the influence of text length. The inverse document frequency component calculates the prevalence of each term across all documents based on a large-scale medical literature corpus. The inverse document frequency value is obtained by taking the logarithm of the ratio of the total number of documents to the number of documents containing the term. The semantic weight is the product of the term frequency and the inverse document frequency. A higher semantic weight indicates a higher degree of discriminative power and representativeness of the term in the current diagnostic text. The semantic weights of all terms form a weight vector for subsequent linear programming modeling.

[0049] Solving storage format constraints using linear programming by combining boundary coordinates, area parameters, and semantic weights requires transforming the practical problem into a mathematical optimization model. The objective function of the linear programming method is defined as maximizing the preservation of the overall clinical value of the data while meeting storage resource limitations. Decision variables include data compression rate thresholds, storage format type parameters, and data integrity parameters. Boundary coordinates and area parameters define the storage quality requirements related to high-priority regions in the constraints; for example, constraining high-priority regions to use compression rates below a specific threshold to ensure detail retention. Semantic weight vectors are introduced into the objective function as coefficients, giving higher weight to data regions containing important medical terminology during optimization. The linear programming problem is solved using the simplex method or interior-point method, and the optimal solution is the specific numerical value of the storage format constraints. The storage format type parameter in the storage format constraints needs to be mapped to a specific file format encoding; for example, value 1 represents HDF5 format, value 2 represents Parquet format, and value 3 represents a custom binary format. Data integrity parameters define the allowable data error range or checksum algorithm strength level; for example, setting a maximum mean square error threshold or specifying whether to use CRC32 or SHA-256 checksum algorithms. The data compression ratio threshold is expressed as a percentage value, specifying the highest allowed ratio of the compressed data size to the original size.

[0050] Refer to Table 1, which shows the storage format constraint parameter table, generated based on the linear programming solution results of a specific instance.

[0051] Table 1: Storage Format Constraint Parameter Table

[0052] Parameter name Parameter values Unit / Description Data compression rate threshold 15 percentage(%) Storage format type parameters 2 1:HDF5, 2:Parquet, 3:Binary Data Integrity Parameters - Error Tolerance 0.01 Maximum normalized mean square error Data integrity parameters - verification algorithm 1 1: CRC32, 2: SHA-256 Minimum retention quality of high priority areas 0.95 Signal-to-noise ratio threshold (dB)

[0053] The implementation of linear programming involves constructing a coefficient matrix and constraint vectors. The objective function coefficients are derived from a combination of semantic weights and regional importance. Each row of the constraint matrix corresponds to a resource constraint or quality requirement, and each element of the constraint vector specifies the upper and lower bounds of the constraint. Solver configuration includes setting an upper limit on the number of iterations and a convergence tolerance to ensure a feasible solution is obtained within a reasonable time. The generation of storage format constraints is a systematic decision-making process that combines clinical semantic information with signal priority quantification indicators. Mathematical optimization techniques are used to output operable storage parameters, which directly guide the design of subsequent ECG data compression schemes. The dynamic adjustment mechanism of storage format constraints allows the linear programming model to be rerun based on changes in available storage resources, generating constraints adapted to the new resource environment, thereby achieving adaptive optimization of the storage strategy. The verification of storage format constraints is performed by comparing the clinical usability of the data stored under the constraints with the original data, ensuring that key diagnostic information is retained after compressed storage. The matching of storage format constraints with specific storage hardware characteristics considers the I / O performance and cost characteristics of different storage media, reflected in the constraints as different preferences for data compression rate thresholds and storage format type parameters. The final output format of the storage format constraints is a structured data object or configuration file, which facilitates the parsing and application of the ECG data compression scheme module.

[0054] Example 5: The process of generating an ECG data compression scheme based on storage format constraints revolves around a dictionary-based compression framework, which aims to find a sparse representation of the ECG feature matrix. Consider a specific example: a 30-second recording from a 12-lead ECG machine, whose ECG feature matrix has a dimension of 3600 time points multiplied by 256 feature dimensions per time point. The base dictionary is initialized using a random matrix, whose elements are independently sampled from a Gaussian distribution with a mean of zero and a variance of 0.01. The random matrix has a dimension of 256 rows multiplied by 512 columns, meaning the goal is to sparsely represent the original features as a linear combination of 512 basis vectors. The initial state of the dictionary is random and does not contain any structural information about the ECG waveform. The alternating direction multiplier method is used to solve the sparse coding problem. This method decomposes the complex optimization problem into two relatively easy-to-solve subproblems and iterates them alternately. The first sub-problem is updating the sparse coefficient matrix with a fixed base dictionary. In the example, for each of the 3600 time points, an L1-regularized least squares problem needs to be solved to find its sparse representation under the current 512 basis vectors. The dimension of the coefficient matrix is ​​therefore 512 rows multiplied by 3600 columns. The second sub-problem is updating the base dictionary with a fixed sparse coefficient matrix. This optimizes the 512 basis vectors by minimizing the reconstruction error. Each basis vector is updated to better capture common patterns in the ECG feature matrix. Storage format constraints are integrated as part of the optimization objective into the objective function of the alternating direction multiplier method. For example, the data compression rate threshold is transformed into a constraint on the sparsity of the coefficient matrix, requiring that the proportion of non-zero coefficients does not exceed 15%. Storage format type parameters may affect the constraints on the base dictionary, such as requiring dictionary atoms to have a certain orthogonality or smoothness. Data integrity parameters are transformed into an upper limit constraint on the reconstruction error.

[0055] The convergence criterion controls the number of iterations and monitors the relative rate of change of the objective function value. The algorithm is considered convergent when the relative change of the objective function value is less than one part per million over three consecutive iterations. The penalty parameter for the alternating direction multiplier method is set to 1.0, balancing the weight between the original optimization objective and the degree to which the constraints are satisfied. In the example, the algorithm converges after approximately 150 iterations. At this point, the atoms in the base dictionary exhibit clear electrocardiogram (ECG) waveforms; for example, some atoms resemble QRS waves, and others resemble P waves. The number of non-zero elements in each column of the coefficient matrix is ​​controlled to an average of about five, satisfying the sparsity requirement. The optimized dictionary and coefficients are output as an ECG data compression scheme, which consists of two core components: the learned base dictionary file and the corresponding sparse coefficient matrix file. In the example, the base dictionary file is stored as a 512x256 floating-point matrix, and the coefficient matrix is ​​stored as a 512x3600 sparse matrix, recording only the position and value of non-zero elements. Compared to directly storing the original 3600x256=921,600 floating-point numbers, sparse representation only requires storing non-zero coefficients plus the size of the dictionary, totaling approximately 158,720 elements, achieving a considerable compression effect.

[0056] The efficiency of the ECG data compression scheme is crucial for practical applications. Each update step of the alternating direction multiplier method is supported by efficient numerical algorithms; coefficient updates can use coordinate descent, and dictionary updates can use block coordinate descent. Scheme quality can be assessed by calculating the signal-to-noise ratio (SNR) between the reconstructed signal and the original ECG feature matrix. In the example, an SNR of 35 dB indicates that the reconstructed waveform is visually indistinguishable from the original waveform. The ECG data compression scheme must match the storage format type parameter specified in the storage format constraints. For example, if the constraints specify HDF5 format, the dictionary and coefficient files will be organized and stored according to the HDF5 hierarchical data model. The robustness of the ECG data compression scheme is verified through testing on different patient data, ensuring that the learned dictionary has a certain degree of generality rather than overfitting a single record. The scalability of the scheme allows for processing longer durations or more leads of data by simply learning larger dictionaries and coefficient matrices using the same process. The ECG data compression scheme is ultimately passed to the storage control module, which guides the storage device to efficiently write data in the optimized format. The entire compression scheme generation process demonstrates the advantages of learning-based data compression methods, which adaptively discover the inherent structure of ECG data, thereby achieving high-fidelity lossy compression.

[0057] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0058] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for storing electrocardiogram (ECG) data based on ECG feature points, characterized in that, The method includes: acquiring raw electrocardiogram (ECG) signals through an ECG signal acquisition device, and identifying ECG feature point sequences from the raw ECG signals using an ECG feature point detection algorithm; Obtain clinical diagnostic text corresponding to electrocardiogram signals from the medical information system as semantic information; An electrocardiogram feature matrix containing the temporal relationship and waveform morphology features of feature points was constructed using electrocardiogram feature point sequences and clinical diagnostic text. The storage priority of the ECG feature matrix is ​​evaluated, and a storage priority distribution map is generated. Storage format constraints are generated based on the storage priority distribution map and the semantic weights of the clinical diagnostic text. The storage format constraints include data compression rate threshold, storage format type parameter, and data integrity parameter. Generate an ECG data compression scheme based on storage format constraints; control the storage device to store ECG data according to the ECG data compression scheme.

2. The ECG data storage method based on ECG feature points according to claim 1, characterized in that, The method of identifying ECG feature point sequences from the original ECG signal using the ECG feature point detection algorithm includes: performing multi-scale wavelet transform decomposition on the original ECG signal to extract wavelet coefficients of different frequency bands; processing the wavelet coefficients through adaptive thresholding to suppress noise and enhance the wavelet modulus maxima corresponding to the feature points; locating the positions of the wavelet modulus maxima using the zero-crossing point detection method to preliminarily determine the candidate set of ECG feature points; and applying a hidden Markov model to perform state sequence decoding on the candidate set of ECG feature points to correct false detection points and output an accurate ECG feature point sequence.

3. The ECG data storage method based on ECG feature points according to claim 2, characterized in that, The method of constructing an ECG feature matrix containing the temporal relationship and waveform morphology features of feature points using ECG feature point sequences and clinical diagnostic text includes: mapping the ECG feature point sequence into a directed graph structure, where nodes represent feature points and edges represent the time interval and amplitude difference between feature points; extracting medical term entities from the clinical diagnostic text and converting the medical term entities into semantic vectors through a word embedding model; and using a graph attention network to aggregate the node features and semantic vectors of the directed graph structure to generate an ECG feature matrix that integrates temporal and semantic features.

4. The ECG data storage method based on ECG feature points according to claim 3, characterized in that, The process of evaluating the storage priority of the ECG feature matrix and generating a storage priority distribution map includes: constructing an evaluation model based on a long short-term memory network, wherein the input layer of the long short-term memory network receives the ECG feature matrix and the hidden layer learns the long-term dependencies of the matrix; applying the softmax function to the output layer to calculate the storage priority score of each feature point; and smoothing the storage priority scores through Gaussian filtering to generate a continuous storage priority distribution map.

5. The ECG data storage method based on ECG feature points according to claim 4, characterized in that, The process of generating storage format constraints based on the storage priority distribution map and the semantic weights of the clinical diagnostic text includes: extracting the boundary coordinates and area parameters of high-priority regions from the storage priority distribution map; calculating the semantic weight of each medical term in the clinical diagnostic text using the term frequency-inverse document frequency method; and solving the storage format constraints, including the data compression rate threshold and storage format type parameters, by combining the boundary coordinates, area parameters, and semantic weights using a linear programming method.

6. The ECG data storage method based on ECG feature points according to claim 5, characterized in that, The ECG data compression scheme based on storage format constraints includes: designing a compression framework based on dictionary learning, where dictionary learning learns the base dictionary of the ECG feature matrix through sparse coding; taking the storage format constraints as the optimization objective, iteratively updating the base dictionary and sparse coefficients; and outputting the optimized dictionary and coefficients as the ECG data compression scheme.

7. The ECG data storage method based on ECG feature points according to claim 6, characterized in that, The control storage device stores ECG data according to the ECG data compression scheme, which includes: parsing the ECG data compression scheme into a storage command sequence; verifying the protocol compatibility between the storage command sequence and the storage device; dynamically adjusting the timing parameters of the storage command sequence according to the verification results, and sending it to the storage device to perform data writing operations.

8. The ECG data storage method based on ECG feature points according to claim 3, characterized in that, The extraction of medical term entities from clinical diagnostic text includes: matching patterns of medical terms in clinical diagnostic text using rule-based regular expressions; standardizing the matched terms using a medical ontology library to eliminate synonym ambiguity; and calculating the contextual relevance of the standardized terms as part of the semantic features.

9. The ECG data storage method based on ECG feature points according to claim 4, characterized in that, The construction of the evaluation model based on the Long Short-Term Memory (LSTM) network includes: introducing a gating mechanism into the hidden layer of the LSTM network to control the flow of information; using dropout technology to prevent overfitting; and optimizing the weight parameters of the LSTM network through the backpropagation algorithm.

10. The ECG data storage method based on ECG feature points according to claim 6, characterized in that, The proposed compression framework based on dictionary learning includes: initializing the base dictionary using a random matrix; employing the alternating direction multiplier method to solve the sparse coding problem; and setting convergence criteria to control the number of iterations to ensure the quality of the compression scheme.