A blockchain-based electrocardio monitoring method and system

CN121705586BActive Publication Date: 2026-09-11THE FIRST AFFILIATED HOSPITAL OF ANHUI MEDICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511897306.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-09-11
Estimated Expiration
2045-12-16

AI Technical Summary

Technical Problem

[0004]针对现有技术的不足,本发明提供了一种基于区块链的心电监测方法及系统,解决了随身装置的通用信号处理算法在滤除噪声时,可能会扭曲具有诊断价值的个体化心电波形形态特征,从而容易在后续产生误诊的技术问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121705586B_ABST
    Figure CN121705586B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electrocardio monitoring, and particularly relates to an electrocardio monitoring method and system based on block chain; the present application realizes quality control and credible traceability of the whole process from original electrocardio signal collection, processing to transmission by combining the self-adaptive filter constrained by the dynamically generated reference template and the block chain credible storage, solves the problems of waveform distortion caused by individual differences and motion interference in wireless electrocardio monitoring, ensures the data unalterability and the verifiability of the processing process through the block chain technology, finally outputs the credible corrected electrocardio signal for doctor diagnosis, significantly improves the reliability and clinical value of mobile electrocardio monitoring, and guarantees the data accuracy for doctor diagnosis; the technical problem that the general signal processing algorithm of the portable device may distort the individualized electrocardio waveform form features with diagnostic value when filtering noise, thereby easily causing misdiagnosis in the subsequent process is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrocardiogram (ECG) monitoring technology, and in particular to an ECG monitoring method and system based on blockchain. Background Technology

[0002] In hospital clinical monitoring scenarios, traditional wired electrocardiogram (ECG) monitors collect and display ECG data by attaching multiple electrode pads to the patient's chest wall and connecting them to the main unit via long wires. This method severely restricts the patient's freedom of movement, making it difficult for them to get out of bed and causing great inconvenience to their daily life. At the same time, the multiple wires are tangled together, which not only increases the workload of medical staff, but also creates the hidden danger of poor connection leading to signal interruption or quality degradation.

[0003] Therefore, the industry has gradually adopted wireless wearable devices, such as smart bracelets, to establish data interaction with monitoring terminals to complete ECG monitoring. However, this technology has also revealed certain technical defects in daily use: the general signal processing algorithms of wearable devices may distort the individualized ECG waveform morphology characteristics that have diagnostic value when filtering out noise. This is because traditional ECG signal filtering algorithms, such as high-pass, low-pass, and notch filters, are mainly designed for common noises such as power frequency interference and electromyographic noise. However, in wireless mobile monitoring scenarios, signals are more susceptible to interference, and different patients... Individual differences in age, physical condition, skin-electrode interface impedance, and specific pathological conditions (such as myocardial ischemia and electrolyte imbalance) can lead to non-pathological distortions in the morphology of key diagnostic regions of the electrocardiogram (ECG) signal, such as the P wave, T wave, and ST segment, coupled with interference such as motion artifacts. However, existing general filtering algorithms cannot distinguish between these morphological changes caused by individual differences and novel interferences and real noise. They often smooth or distort subtle features with diagnostic value (such as slight ST segment depression or T wave flattening) along with noise during the filtering process, which can easily lead to misdiagnosis in the future. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a blockchain-based electrocardiogram (ECG) monitoring method and system, which solves the technical problem that general signal processing algorithms for wearable devices may distort the diagnostic value of individualized ECG waveform morphology when filtering noise, thus easily leading to misdiagnosis in the future.

[0005] To address the aforementioned technical problems, this invention provides the following technical solution: a blockchain-based electrocardiogram (ECG) monitoring method, comprising a wearable device for collecting the user's ECG signals, the method comprising the following steps: S1. Real-time acquisition of the user's raw electrocardiogram (ECG) signal, and using an adaptive filter constrained by a reference template dynamically generated based on the user's raw ECG signal, real-time filtering and waveform morphology correction of the raw ECG signal, outputting the corrected ECG signal and key parameter set; S2. Calculate the hash value of the key parameter set as the data payload to construct the evidence storage transaction, embed the address pointer of the evidence storage verification smart contract, and digitally sign the evidence storage transaction through the private key bound to the personal device. Then, upload the evidence storage transaction to the blockchain network and generate an immutable evidence storage record, blockchain evidence storage index identifier and trusted mark corresponding to the corrected electrocardiogram signal through the consensus mechanism. S3. Obtain the corrected ECG signal, blockchain evidence index identifier and trusted mark through the monitoring terminal, verify the corresponding blockchain evidence record, output the diagnosis result based on the corrected ECG signal, and trigger the corresponding alarm action based on the verification result and diagnosis result.

[0006] Preferably, step S1 specifically includes the following steps: S11. Real-time acquisition of the user's raw electrocardiogram signal, and QRS wave detection to locate the start and end points of each heartbeat cycle to obtain several heartbeat cycles; S12. Calculate the signal-to-noise ratio and baseline drift index of the waveform for each cardiac cycle; S13. Select the heartbeat cycle waveforms that simultaneously meet the conditions of a signal-to-noise ratio greater than a preset signal-to-noise ratio threshold and a baseline drift index greater than a preset baseline drift index threshold to obtain a standard heartbeat waveform. S14. Select standard heartbeat waveforms from several consecutive sampling times, calculate the weighted average of each standard heartbeat waveform based on the user's current heartbeat waveform, and perform a weighted average of the waveform vectors of the standard heartbeat waveforms to generate a reference template representing the waveform vector of the user's current heartbeat waveform. The calculation formula is as follows: In the above formula, Indicates the baseline template. This represents the waveform vector of the k-th standard heartbeat waveform. There are a total of N standard heartbeat waveforms. This represents the weight of the k-th standard heartbeat waveform. This represents the average value of the current heartbeat waveform. This represents the average value of the k-th standard heartbeat waveform and the current heartbeat waveform. It is inversely proportional to the root mean square error; S15. Construct an adaptive filter and introduce a morphological similarity constraint term based on the benchmark template and the real-time output waveform segment of the filter to establish a cost function for optimizing the filter weight vector, the expression of which is: In the above formula, Represents the cost function, This represents the expectation operation. Desired signal With the filter output signal The difference, This represents the shape constraint weight factor. Represents the similarity measurement function, This represents the key waveform segment extracted from the current filter output. This indicates the portion extracted from the baseline template and... Key waveform segments corresponding to the time period; S16. Iteratively update the weight vector of the adaptive filter according to the cost function. The update formula is as follows: In the above formula, and Let these represent the filter weight vectors for the nth and (n+1)th iterations, respectively. The iteration step size, Represents the cost function The gradient relative to the filter weight vector W; S17. The steady-state signal output by the iteratively updated adaptive filter is used as the corrected electrocardiogram signal, and a set of key parameters for blockchain notarization is output. The set of key parameters includes several parameters in the calculation process of the corrected electrocardiogram signal.

[0007] Preferably, in step S17, the set of key parameters includes at least the hardware unique identifier of the wearable device, the original electrocardiogram signal and cryptographic hash value, the hash value of the benchmark template, the morphological constraint weight factor, the similarity score calculated by the similarity measurement function, and the start and end timestamps of the corrected electrocardiogram signal.

[0008] Preferably, in step S15, the specific steps for extracting the key waveform segment are as follows: S151. Obtain the waveform to be processed from which the key waveform segment needs to be extracted. The waveform to be processed includes the waveform output in real time by the current adaptive filter and the reference template for the corresponding time. S152. Identify physiological landmarks on the waveform to be processed that include the start point of the QRS complex, the peak point of the R wave, the J point, and the end point of the T wave. S153. According to the preset pathological diagnosis rules, a method for dividing key waveforms based on physiological landmarks is used to extract key waveform segments from the waveform to be processed. The pathological diagnosis rules at least include ST-T segment delineation rules for diagnosing myocardial ischemia. The ST-T segment delineation rules are as follows: the key waveform segment is the segment starting from point J... The waveform segment from the start of the millisecond to the end of the T-wave, and .

[0009] Preferably, step S2 specifically includes the following steps: S21. Calculate the hash value of the key parameter set as the data payload and construct a blockchain-based notarization transaction. S22. Embed the address pointer of a smart contract for verifying the blockchain notarization transaction in the notarization transaction, wherein the smart contract predefines the verification logic of the hash value of the key parameter set. S23. Digitally sign the evidence storage transaction using the private key bound to the personal device; S24. Broadcast the digitally signed evidence storage transaction and digital signature to the blockchain network, and after verification by the consensus mechanism of the blockchain network, package the evidence storage transaction into a new block and append it to the blockchain to form an immutable evidence storage record and a corresponding unique blockchain evidence storage index identifier. S25. The blockchain network returns the unique blockchain evidence storage index identifier of the evidence storage record to the wearable device and the monitoring terminal. S26. The blockchain network triggers the notarization verification smart contract associated with the notarization transaction and verifies whether the hardware unique identifier of the wearable device is in the authorized legal list. If the verification is successful, the smart contract automatically generates a trust token and associates the trust token with the evidence record, and then proceeds to step S3; If the verification fails, the smart contract checks the current status of the hardware unique identifier in the blockchain device register and evaluates and processes the corresponding device.

[0010] Preferably, the specific steps for the smart contract to evaluate and process the wearable device corresponding to the hardware unique identifier are as follows: S261. In response to the smart contract detecting that the current state of the hardware unique identifier in the blockchain device register is a preset state, the smart contract calculates the risk score of this verification failure based on the number of times the hardware unique identifier has failed verification in the past. S262. Set a risk warning range. If the current risk score is within the risk warning range, add the hardware unique identifier and its corresponding personal device to the temporary blacklist and set the duration of the ban when added to the temporary blacklist. If the risk score is less than the minimum value of the risk warning range, an alarm flag is generated and associated with the evidence storage record of this verification. Then, an alarm notification is sent to the preset regulatory address. If the risk score is greater than the maximum value of the risk warning range, the hardware unique identifier and its corresponding personal device will be added to the permanent blacklist. S263. In response to the addition of the hardware unique identifier and its corresponding personal device to the permanent blacklist, the smart contract synchronizes the current permanent blacklist record and its risk score to at least one other medical data blockchain network through a cross-chain communication protocol. S264. The smart contract generates a cryptographic random number as a verification challenge and sends it to the corresponding wearable device, triggering the trusted execution environment within the wearable device to perform the following operations: Calculate the cryptographic hash value of the current device firmware within the secure enclave; The cryptographic random number and cryptographic hash value are digitally signed using the device's unique key to generate an integrity proof report; Submit the integrity proof report to the blockchain network; S265. The smart contract receives the integrity certificate report from the wearable device and performs the following steps: Verify the digital signature and compare the cryptographic hash value in the integrity proof report with the pre-stored legitimate firmware baseline value; If the cryptographic hash value is equal to the pre-stored valid firmware baseline value, the verification will fail and the device will be marked as stolen and the preset management system will be notified. If the cryptographic hash value is not equal to the pre-stored legitimate firmware baseline value, a determination that the device has been compromised is generated and recorded.

[0011] Preferably, in step S262, the calculation process for the blocking duration is as follows: The basic ban duration is calculated based on the risk score, and the calculation formula is as follows: In the above formula, Indicates the basic ban duration. Risk score impact coefficient; The number of valid violations is calculated based on the historical number of verification failures of the hardware unique identifier and the time elapsed since those failures occurred. The calculation formula is as follows: In the above formula, Indicates the number of valid violations. This indicates the number of times the hardware unique identifier has failed verification in its history. Indicates the time decay coefficient. Indicates the current time. This indicates the time when the k-th verification of the hardware unique identifier fails. The aggravation factor is calculated based on the number of verification failures in the history of the hardware unique identifier. The calculation formula is as follows: In the above formula, As an aggravating factor, As an aggravation factor, This indicates the number of times the hardware unique identifier has failed verification in the past. The final ban duration is calculated by multiplying the base ban duration by the aggravation factor.

[0012] Preferably, step S3 specifically includes the following steps: S31. The monitoring terminal receives the corrected electrocardiogram signal and the corresponding blockchain evidence index identifier, and queries the blockchain network for the corresponding evidence record and its associated trusted marker through the blockchain evidence index identifier, and verifies the evidence record. S32. Determine whether the evidence storage record has passed verification and whether a trusted marker exists; If so, the corrected ECG signal is analyzed to generate a first-class diagnostic report as the diagnostic result; If not, a data credibility alert will be triggered, and a second type of diagnostic report containing the unreliability of the data source will be generated as the diagnostic result; S33. Package the first type of diagnostic report and the second type of diagnostic report and the corresponding blockchain evidence storage index identifier, calculate their hash value and store them in the blockchain network to form an associated record; S34. Based on the current diagnostic results and the verification results of the evidence records, trigger the corresponding alarm action in conjunction with the preset alarm mechanism.

[0013] Preferably, in step S261, the formula for calculating the risk score is: In the above formula, Indicates risk score, As a risk weighting factor, This indicates the number of times the hardware unique identifier has failed verification in its history. Indicates risk adjustment factor, Indicates the indicator weighting factor. This is a key indicator; it takes a value of 1 when the set of key parameters contains specific pathological features, and 0 otherwise.

[0014] The present invention also provides a blockchain-based electrocardiogram (ECG) monitoring system, including a processor and a memory, wherein the memory is used to store a computer program, and the computer program, when executed by the processor, implements the blockchain-based ECG monitoring method.

[0015] By employing the above technical solutions, the present invention provides a blockchain-based electrocardiogram monitoring method and system, which has at least the following beneficial effects: 1. This invention uses a dynamic reference template to constrain the adaptive filter and combines it with blockchain trusted evidence storage to achieve quality control and reliable traceability of the entire process from raw ECG signal acquisition, processing to transmission. It not only solves the problem of waveform distortion caused by individual differences and motion interference in wireless ECG monitoring, but also ensures the immutability of data and the verifiability of the processing through blockchain technology. Finally, it outputs a reliable corrected ECG signal for doctors to use in diagnosis, significantly improving the reliability and clinical value of mobile ECG monitoring.

[0016] 2. By constructing a benchmark template and designing an adaptive filter with morphological constraints, key diagnostic waveform features are acquired at the source of signal processing. This effectively overcomes the shortcomings of general filters in smoothing individual pathological features and is particularly suitable for protecting subtle morphological changes related to myocardial ischemia, such as ST segments and T waves, thereby enhancing the diagnostic value of electrocardiogram signals.

[0017] 3. By precisely defining the truncation rules of key waveform segments and focusing on the relevant waveband intervals for specific pathological diagnoses, this invention enables morphological similarity constraints to be precisely applied to the most clinically valuable electrocardiogram signal wavebands, significantly improving the pertinence and effectiveness of morphological preservation and providing technical support for the accurate diagnosis of specific diseases such as myocardial ischemia.

[0018] 4. By constructing a blockchain-based evidence storage system that includes smart contracts, this invention enables automatic verification and trusted tag generation of key parameters in signal processing. It not only establishes a trusted chain between data sources and processing procedures, but also enables risk assessment, quantification, and management of abnormal devices, forming a proactive security defense system that extends from data trust to device trust.

[0019] 5. This invention introduces a method for calculating the ban duration based on time-weighted effective violation counts and risk scores, thereby enabling the management of violating devices. It takes into account both the device's historical behavior patterns and the density of its recent verification failures, making the security policy both effective in deterring malicious behavior and avoiding excessive penalties, thus greatly improving the intelligence and fairness of the device management mechanism. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of the ECG monitoring method based on blockchain according to the present invention. Detailed Implementation

[0021] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.

[0022] When filtering noise, the general signal processing algorithms of wireless wearable devices may produce mathematically "smooth" output signals if the algorithm takes "minimizing the mean square error" as the sole optimization objective. However, in a clinical sense, these signals may be "distorted." For example, a high-pass filter designed to eliminate baseline drift caused by motion may inadvertently weaken the ST segment depression caused by myocardial ischemia, resulting in the loss or significant reduction of key pathological information. Thus, while wireless devices solve the problem of mobility, they may bring new risks to diagnostic reliability, leading to missed or misdiagnosed cases by automatic diagnostic algorithms, or misleading doctors' interpretations.

[0023] To address the technical problem that general signal processing algorithms for wearable devices may distort the diagnostic value of individualized ECG waveform morphology when filtering noise, potentially leading to misdiagnosis, this invention provides a blockchain-based ECG monitoring method. This method can be implemented on resource-constrained portable devices and intelligently identifies and maintains individualized ECG waveform morphology in a wireless environment, thereby improving the reliability of mobile ECG monitoring and diagnosis. The method involves collecting the user's ECG signal by wearing a smart bracelet or other wearable device. The specific steps of this ECG monitoring method are as follows: S1. Real-time acquisition of the user's raw ECG signal, and using an adaptive filter constrained by a reference template dynamically generated based on the user's raw ECG signal, real-time filtering and waveform morphology correction of the raw ECG signal are performed, outputting the corrected ECG signal and key parameter set. The ECG processing flow of traditional wireless devices is "acquisition-general filtering-transmission", while this invention improves it to "acquisition-individualized reference template construction-morphological constraint filtering". The core of this transformation is to enable the device to learn to recognize and protect the unique and diagnostically valuable ECG characteristics of each user, specifically including the following steps: S11. Since the raw ECG signal collected by the wireless wearable device is mixed with cardiac activity, various noises and interferences, it is an undivided data stream. The QRS complex is the most prominent and stable feature of the ECG signal. Using it as an anchor point, the continuous signal can be divided into several individual heartbeat cycles, which is a prerequisite for subsequent waveform analysis and processing. Therefore, a real-time QRS detection algorithm is used for processing, such as the Pan-Tompkins algorithm and its optimized variants. That is, the user's raw ECG signal is collected in real time and QRS wave detection is performed on it to locate the start and end points of each heartbeat cycle, so as to obtain several heartbeat cycles. The mixed continuous signal is converted into discrete individual heartbeat cycles that can be finely analyzed, providing a reliable data source for the subsequent construction of individualized benchmark templates.

[0024] S12. Calculate the signal-to-noise ratio (SNR) and baseline drift index of each cardiac cycle waveform. The SNR quantifies the power ratio of useful components (such as cardiac electrical activity) to noise components (such as electromyography, power line interference, and environmental electromagnetic noise) in the signal. The higher the value, the clearer the cardiac waveform and the less it is affected by noise. The baseline drift index quantifies the degree of deviation of the signal baseline over time due to breathing and body movement. The lower the value, the more stable the baseline and the less affected the morphology of the cardiac cycle waveform is by low-frequency motion. Thus, the SNR and baseline drift index are used as indicators to reflect the quality of each cardiac cycle waveform.

[0025] S13. Select the heartbeat cycle waveforms that simultaneously meet the conditions of a signal-to-noise ratio greater than a preset signal-to-noise ratio threshold and a baseline drift index less than a preset baseline drift index threshold to obtain a standard heartbeat waveform. This ensures that the obtained standard heartbeat waveform has a clear shape, low noise, and a stable baseline, thereby guaranteeing the reliability of the subsequently established benchmark template.

[0026] S14. Select standard heartbeat waveforms from several consecutive sampling times, calculate the weighted average of each standard heartbeat waveform based on the user's current heartbeat waveform, and perform a weighted average of the waveform vectors of the standard heartbeat waveforms to generate a reference template representing the waveform vector of the user's current heartbeat waveform. The calculation formula is as follows: In the above formula, The reference template is a waveform vector. This represents the waveform vector of the k-th standard heartbeat waveform. There are a total of N standard heartbeat waveforms. This represents the weight of the k-th standard heartbeat waveform. This represents the average value of the current heartbeat waveform. This represents the average value of the k-th standard heartbeat waveform and the current heartbeat waveform. The root mean square error is inversely proportional to the morphology of the heartbeat, making the most typical heartbeat contribute more to the baseline template. The smaller the value, the more similar the heartbeat is to the population average morphology, and the more typical its morphology is. At this time, its weight is also greater, thus ensuring that the baseline template is dominated by the most typical heartbeat.

[0027] S15. Traditional adaptive filters (such as LMS and NLMS) typically use only the mean square error as their cost function, which makes the output signal statistically closest to a desired response. This can lead to neglect of waveform morphology details. This invention constructs an adaptive filter and introduces a morphological similarity constraint term based on a reference template and the real-time output waveform segment of the filter to establish a cost function for optimizing the filter weight vector. The update of the filter weight vector will aim to minimize this cost function, thus transforming the filter's optimization objective from a single "error minimization" to a "dual optimization of noise suppression and morphology preservation." Its expression is: In the above formula, Represents the cost function, This represents the expectation operation. Desired signal With the filter output signal The difference, The mean square error term, retained from the traditional adaptive filter, is responsible for driving the filter to suppress random noise and ensure the smoothness of the output signal. This represents the shape constraint weight factor. This represents a similarity metric function used to quantify the morphological differences between two waveform segments. It can be calculated using methods such as dynamic time warping distance. Its key characteristic is its sensitivity to the overall shape, trend, and key point locations of the waveform. This represents the key waveform segment extracted from the current filter output. This indicates the portion extracted from the baseline template and... The filter identifies key waveform segments corresponding to specific time periods, enabling it to actively and intelligently pull back key waveform segments (such as the ST segment) in the real-time signal that may be distorted due to interference, while simultaneously filtering out noise, to reflect the user's individualized, typical healthy morphology. Different segments of the electrocardiogram (ECG) signal carry different pathological information; for example, the ST-T segment is closely related to myocardial ischemia. If morphological comparison is performed over the entire cardiac cycle, noise may be introduced due to irrelevant factors such as the PR interval and QRS width. This invention focuses on specific key diagnostic waveform segments, making morphological similarity measurement more accurate and clinically targeted. Therefore, the following specific steps for key waveform segment extraction are designed: S151. Obtain the waveform to be processed from which the key waveform segment needs to be extracted. The waveform to be processed includes the waveform output in real time by the current adaptive filter and the reference template at the corresponding time.

[0028] S152. Identify physiological landmarks on the waveform to be processed, including the start point of the QRS complex, the peak point of the R wave, the J point, and the end point of the T wave. These landmarks are the basis for accurately delineating key waveform segments such as the ST-T segment. Accurate landmark detection is a prerequisite for achieving waveform segment alignment and effective morphological comparison. The rules for dividing these physiological landmarks will not be elaborated here.

[0029] S153. According to the preset pathological diagnosis rules, the key waveform segments on the waveform to be processed are extracted based on the method of dividing key waveforms based on physiological landmarks. The pathological diagnosis rules include at least the ST-T segment delineation rules for the diagnosis of myocardial ischemia. The ST-T segment delineation rules are as follows: the key waveform segment is the segment starting from point J. The waveform segment from the start of the millisecond to the end of the T-wave, and Starting from point J is to avoid the brief period of instability at the end of the QRS complex (such as the rise at point J), ensuring that the captured segment is a stable ST segment. (Time parameter...) The range of values ​​is set based on clinical medical knowledge to ensure coverage of diagnostically significant ST segments.

[0030] S16. Iteratively update the weight vector of the adaptive filter according to the cost function. The update formula is as follows: In the above formula, and Let these represent the filter weight vectors for the nth and (n+1)th iterations, respectively. The iteration step size is a positive real number that controls the convergence speed and stability. Too large a step size will cause oscillations, while too small a step size will slow down convergence. Represents the cost function The gradient relative to the filter weight vector W indicates the gradient required to make the filter weight vector W more stable. The weights should be reduced, and the direction and magnitude of the adjustment should be determined. The final filter parameters should ensure that the output signal of the filter simultaneously meets the requirements of "low noise" and "high morphological fidelity".

[0031] S17. The steady-state signal output by the iteratively updated adaptive filter is used as the corrected ECG signal, and a set of key parameters for blockchain notarization is output. This set of key parameters includes several parameters used in the calculation of the corrected ECG signal. Specifically, the set of key parameters includes at least the hardware unique identifier of the wearable device, the original ECG signal and its cryptographic hash value, the hash value of the baseline template, the morphological constraint weight factor, the similarity score calculated by the similarity metric function, and the start and end timestamps of the corrected ECG signal. The hardware unique identifier is used to bind the data source device, preventing device impersonation and ensuring the credibility of the data source. The cryptographic hash value of the ECG signal ensures the integrity of the original data by guaranteeing that any tampering with the original data will result in a change in the hash value. The hash value of the baseline template serves as evidence of the standard upon which this correction was based, allowing anyone to verify whether subsequent corrections are based on this template. The morphological constraint weighting factor demonstrates the trade-off between morphological preservation and noise suppression during this processing. The similarity score demonstrates the morphological similarity between the corrected ECG signal and the baseline template, serving as a key indicator for evaluating the quality of this processing. The start and end timestamps of the corrected ECG signal clearly define the effective time range of the signal, facilitating subsequent correlation with other data. By storing this set of key parameters on the blockchain, any subsequent diagnostic results can be traced back and re-verified. For example, if a signal segment is questioned, the processing procedure can be reconstructed using the on-chain stored key parameter set, thereby re-evaluating the diagnostic results. This provides a solid technical foundation for medical data auditing and liability determination.

[0032] S2. Calculate the hash value of the key parameter set as the data payload to construct the evidence storage transaction, embed the address pointer of the evidence storage verification smart contract, and digitally sign the evidence storage transaction using the private key bound to the personal device. Then, upload the evidence storage transaction to the blockchain network and generate an immutable evidence storage record, a blockchain evidence storage index identifier, and a trusted marker corresponding to the corrected ECG signal through the consensus mechanism. Directly storing the entire content of the key parameter set on the blockchain may be costly and inefficient. Calculating its hash value as the data payload is a classic and efficient approach. The hash value, as the digital fingerprint of the original data, is unique. Any tampering with the original parameters will cause the hash value to change, thus ensuring data integrity with minimal storage cost. The specific steps include the following: S21. Calculate the hash value of the key parameter set as the data payload and construct the blockchain evidence storage transaction.

[0033] S22. Embed the address pointer of the smart contract used for verification of the blockchain evidence storage transaction. The smart contract predefines the verification logic of the hash value of the key parameter set, so that the evidence storage transaction is bound to a piece of executable verification code from the beginning. This realizes the logical association between data and verification rules on the blockchain, so that the evidence storage is no longer a static data record, but a smart evidence storage that can be automatically verified and executed, laying the foundation for the automated evidence storage verification in S26.

[0034] S23. Digitally sign the evidence storage transaction using the private key bound to the personal device, and use asymmetric encryption technology to achieve identity authentication. Only those who hold the private key bound to the personal device can generate a valid digital signature, and the blockchain network can use the corresponding public key to verify the signature.

[0035] S24. The digitally signed evidence transaction and digital signature are broadcast to the blockchain network. After verification by the consensus mechanism of the blockchain network, the evidence transaction is packaged into a new block and appended to the blockchain to form an immutable evidence record and a corresponding unique blockchain evidence index. This utilizes the decentralized trust and immutability of the blockchain to create a permanent and verifiable proof of existence for the key parameter set.

[0036] S25. Since the unique blockchain evidence index is the key to subsequent querying and verification of the evidence record, the blockchain network returns the unique blockchain evidence index of the evidence record to the wearable device and the monitoring terminal, so that both the wearable device user and the monitoring terminal obtain the credentials to access this trusted record. The monitoring terminal needs to use this index to query the complete evidence information and trusted mark on the chain.

[0037] S26. The blockchain network triggers the evidence verification smart contract associated with the evidence storage transaction and verifies whether the hardware unique identifier of the wearable device is in the authorized legal list, which is updated by the administrator, i.e., the hospital. If the verification passes, indicating that the data comes from a legitimate and managed device, the smart contract automatically generates a trust token and associates the trust token with the evidence record, and then proceeds to step S3; If verification fails, indicating a questionable device identity, the smart contract checks the current status of the hardware's unique identifier in the blockchain device register and evaluates and processes the corresponding device. To further analyze the device's status and take appropriate measures, since the primary users are patients and hospitals, simply blacklisting the device if the verification failure is due to unforeseen circumstances could hinder patient monitoring. Therefore, the following steps are taken: S261. In response to the smart contract detecting that the current state of the hardware unique identifier in the blockchain device register is a preset state, the smart contract calculates the risk score of this verification failure based on the historical number of verification failures of the hardware unique identifier, thereby achieving a quantitative assessment of this verification failure. The calculation formula is as follows: In the above formula, Indicates risk score, As a risk weighting factor, This indicates the number of times the hardware unique identifier has failed verification in its history. Indicates risk adjustment factor, Indicates the indicator weighting factor. As a key indicator, it takes a value of 1 when the key parameter set contains specific pathological features, and 0 otherwise. By introducing medical context, if the data corresponding to the failure of this validation happens to contain critical features, it is considered to have a higher potential risk, because the consequences of misdiagnosis or missed diagnosis are more serious.

[0038] S262. Set a risk warning range. If the current risk score is within the risk warning range, add the hardware unique identifier and its corresponding personal device to the temporary blacklist and set the duration of the ban when added to the temporary blacklist. If the risk score is less than the minimum value of the risk warning range, an alarm flag is generated and associated with the evidence record of this verification. Then, an alarm notification is sent to the preset regulatory address, such as the hospital's back-end management department, indicating that the failure of this verification may be an isolated case. Only an alarm flag is generated and the administrator is notified, without immediately restricting the device function, to avoid over-response. If the risk score exceeds the maximum value of the risk warning range, the hardware unique identifier and its corresponding personal device will be added to the permanent blacklist.

[0039] The calculation process for the ban duration is as follows: The basic ban duration is calculated based on the risk score, and the calculation formula is as follows: In the above formula, Indicates the basic ban duration. Risk score impact coefficient; The number of valid violations is calculated based on the historical number of verification failures of the hardware unique identifier and the time elapsed since those failures occurred. The calculation formula is as follows: In the above formula, Indicates the number of valid violations. This indicates the number of times the hardware unique identifier has failed verification in its history. Indicates the time decay coefficient. Indicates the current time. This indicates the time when the k-th verification of the hardware unique identifier fails. The aggravation factor is calculated based on the number of verification failures in the history of the hardware unique identifier. The calculation formula is as follows: In the above formula, As an aggravating factor, As an aggravation factor, This indicates the number of times the hardware unique identifier has failed verification in the past. The final ban duration is calculated by multiplying the base ban duration by the aggravation factor. Its calculation formula can be expressed as: That is, the product of the two can be used directly as the final ban duration, or further processing and calculation can be performed on this basis.

[0040] S263. In response to the addition of the hardware unique identifier and its corresponding wearable device to the permanent blacklist, the smart contract synchronizes the current permanent blacklist record and its risk score to at least one other medical data blockchain network through a cross-chain communication protocol. In a distributed medical environment, a device may attempt to access multiple different medical blockchain systems. If it is only blocked on the current chain, it may still intentionally harm other systems. Therefore, the blacklist record is synchronized to other consortium chains or networks through cross-chain communication protocols (such as relay chains and hash time locks).

[0041] S264. Device verification failure may be due to device loss or malicious firmware tampering. Traditional remote verification cannot be securely performed on resource-constrained embedded devices. However, the portable device of this invention can be distributed through hospitals and achieves efficient remote verification by combining blockchain smart contracts and a pre-established Trusted Execution Environment (TEE) within the device. The TEE can be ARM TrustZone or Intel SGX, providing an isolated and secure memory area (also called a secure enclave) within the device. Even if the device's main operating system is compromised, the code and data within the TEE can be protected. Therefore, the root cause of device violations can be further investigated through the following steps: The smart contract generates a cryptographic random number as a verification challenge and sends it to the corresponding portable device, triggering the TEE within the portable device to perform the following operations: The cryptographic hash value of the current device firmware is calculated within the secure enclave. Then, the device's unique key is used to digitally sign the cryptographic random number and the cryptographic hash value to generate an integrity proof report. This process ensures the authenticity and integrity of the report. Finally, the integrity proof report is submitted to the blockchain network, thereby achieving remote and trusted verification of the device's internal health status (i.e., firmware integrity).

[0042] S265. The smart contract receives the integrity certificate report from the wearable device and performs the following steps: Verify the digital signature and compare the cryptographic hash value in the integrity proof report with the pre-stored legitimate firmware baseline value; If the cryptographic hash value is equal to the pre-stored valid firmware baseline value, it indicates that the firmware is intact. In this case, the verification failure will be marked as the device being stolen and the preset management system will be notified for subsequent recovery. If the cryptographic hash value is not equal to the pre-stored legitimate firmware baseline value, it indicates that the firmware has been tampered with. This generates a judgment that the device has been compromised and records it, providing irrefutable evidence for subsequent legal tracing, vulnerability analysis, and batch investigation of devices of the same model.

[0043] S3. Acquire the corrected ECG signal, blockchain evidence index identifier, and trusted tag through the monitoring terminal, verify the corresponding blockchain evidence record, output the diagnostic result based on the corrected ECG signal, and trigger corresponding alarm actions based on the verification result and diagnostic result. The specific steps include the following: S31. The monitoring terminal receives the corrected ECG signal and the corresponding blockchain evidence index identifier, and queries the blockchain network for the corresponding evidence record and its associated trusted marker through the blockchain evidence index identifier, and verifies the evidence record. The monitoring terminal (such as the hospital central monitoring station and doctor's workstation) is the final node for making medical decisions. It needs to obtain both the data itself (i.e., the corrected ECG signal) and the data's trust certificate (evidence index identifier). The monitoring terminal actively queries the blockchain network using the evidence index identifier to verify the integrity of the data and the compliance of the processing process, ensuring that the received data is tamper-proof and reliable data from legitimate devices.

[0044] S32. Determine whether the evidence storage record has passed verification and whether a trusted marker exists; If so, the system can confidently analyze the corrected ECG signal to generate a first-class diagnostic report as the diagnostic result; If not, a data credibility alarm will be triggered. At this time, the data itself may be fine, but its source or processing process cannot be verified as credible. The system will not completely discard the data because it may contain valuable information, but it will generate a second type of diagnostic report containing data from an unreliable source as the diagnostic result. When doctors see the second type of report, they will realize that they need to make a comprehensive judgment by combining other clinical information, thereby avoiding being misled by unreliable data and improving medical safety.

[0045] S33. Package the first type of diagnostic report and the second type of diagnostic report and the corresponding blockchain evidence index identifier, calculate their hash value and store them in the blockchain network to form an associated record.

[0046] S34. Based on the current diagnostic results and the verification results of the stored records, and combined with the preset alarm mechanism, trigger the corresponding alarm action. The specific content of the alarm mechanism can be set as follows: if a first-class diagnostic report is generated and critical electrocardiogram characteristics are detected, trigger a high-level medical alarm; if a second-class diagnostic report is generated, trigger a data credibility alarm; if the corresponding stored record is not found within the preset time, trigger a system integrity alarm. This hierarchical alarm mechanism helps medical staff quickly determine the nature of the problem, prioritize the handling of real medical emergencies, and at the same time does not ignore the technical risks of the system itself.

[0047] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0048] The various embodiments in this specification are described 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. Since the above embodiments are substantially similar to the method embodiments, their descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0049] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A blockchain-based electrocardiogram (ECG) monitoring method, comprising a wearable device for collecting the user's ECG signals, characterized in that, The method includes the following steps: S1. Real-time acquisition of the user's raw electrocardiogram (ECG) signal, and using an adaptive filter constrained by a reference template dynamically generated based on the user's raw ECG signal, real-time filtering and waveform morphology correction of the raw ECG signal, outputting the corrected ECG signal and key parameter set; S2. Calculate the hash value of the key parameter set as the data payload to construct the evidence storage transaction, embed the address pointer of the evidence storage verification smart contract, and digitally sign the evidence storage transaction through the private key bound to the personal device. Then, upload the evidence storage transaction to the blockchain network and generate an immutable evidence storage record, blockchain evidence storage index identifier and trusted mark corresponding to the corrected electrocardiogram signal through the consensus mechanism. S3. Obtain the corrected ECG signal, blockchain evidence index identifier and trusted mark through the monitoring terminal, verify the corresponding blockchain evidence record, output the diagnosis result based on the corrected ECG signal, and trigger the corresponding alarm action based on the verification result and diagnosis result. Step S1 specifically includes the following steps: S11. Real-time acquisition of the user's raw electrocardiogram signal, and QRS wave detection to locate the start and end points of each heartbeat cycle to obtain several heartbeat cycles. S12. Calculate the signal-to-noise ratio and baseline drift index of the waveform for each cardiac cycle; S13. Select the heartbeat cycle waveforms that simultaneously meet the conditions of a signal-to-noise ratio greater than a preset signal-to-noise ratio threshold and a baseline drift index less than a preset baseline drift index threshold to obtain a standard heartbeat waveform. S14. Select standard heartbeat waveforms from several consecutive sampling times, calculate the weighted average of each standard heartbeat waveform based on the user's current heartbeat waveform, and perform a weighted average of the waveform vectors of the standard heartbeat waveforms to generate a reference template representing the waveform vector of the user's current heartbeat waveform. The calculation formula is as follows: ; ; In the above formula, Indicates the baseline template. This represents the waveform vector of the k-th standard heartbeat waveform. There are a total of N standard heartbeat waveforms. This represents the weight of the k-th standard heartbeat waveform. This represents the average value vector of the current heartbeat waveform. This represents the average value of the k-th standard heartbeat waveform and the current heartbeat waveform. The root mean square error; S15. Construct an adaptive filter and introduce a morphological similarity constraint term based on the benchmark template and the real-time output waveform segment of the filter to establish a cost function for optimizing the filter weight vector, the expression of which is: ; ; In the above formula, Represents the cost function, This represents the expectation operation. Desired signal With the filter output signal The difference, This represents the shape constraint weight factor. Represents the similarity measurement function, This represents the key waveform segment extracted from the current filter output. This indicates the portion extracted from the baseline template and... Key waveform segments corresponding to the time period; S16. Iteratively update the weight vector of the adaptive filter according to the cost function. The update formula is as follows: ; In the above formula, and Let these represent the filter weight vectors for the nth and (n+1)th iterations, respectively. The iteration step size, Represents the cost function The gradient relative to the filter weight vector W; S17. The steady-state signal output by the iteratively updated adaptive filter is used as the corrected electrocardiogram signal, and a set of key parameters for blockchain notarization is output. The set of key parameters includes several parameters in the calculation process of the corrected electrocardiogram signal.

2. The electrocardiogram monitoring method according to claim 1, characterized in that, In step S17, the key parameter set includes at least the hardware unique identifier of the wearable device, the original ECG signal and cryptographic hash value, the hash value of the benchmark template, the morphological constraint weight factor, the similarity score calculated by the similarity measurement function, and the start and end timestamps of the corrected ECG signal.

3. The electrocardiogram monitoring method according to claim 1, characterized in that, In step S15, the specific steps for extracting the key waveform segment are as follows: S151. Obtain the waveform to be processed from which the key waveform segment needs to be extracted. The waveform to be processed includes the waveform output in real time by the current adaptive filter and the reference template for the corresponding time. S152. Identify physiological landmarks on the waveform to be processed that include the start point of the QRS complex, the peak point of the R wave, the J point, and the end point of the T wave. S153. According to the preset pathological diagnosis rules, a method for dividing key waveforms based on physiological landmarks is used to extract key waveform segments from the waveform to be processed. The pathological diagnosis rules at least include ST-T segment delineation rules for diagnosing myocardial ischemia. The ST-T segment delineation rules are as follows: the key waveform segment is the segment starting from point J... The waveform segment from the start of the millisecond to the end of the T-wave, and .

4. The electrocardiogram monitoring method according to claim 1, characterized in that, Step S2 specifically includes the following steps: S21. Calculate the hash value of the key parameter set as the data payload and construct a blockchain-based notarization transaction. S22. Embed the address pointer of a smart contract for verifying the blockchain notarization transaction in the notarization transaction, wherein the smart contract predefines the verification logic of the hash value of the key parameter set. S23. Digitally sign the evidence storage transaction using the private key bound to the personal device; S24. Broadcast the digitally signed evidence storage transaction and digital signature to the blockchain network, and after verification by the consensus mechanism of the blockchain network, package the evidence storage transaction into a new block and append it to the blockchain to form an immutable evidence storage record and a corresponding unique blockchain evidence storage index identifier. S25. The blockchain network returns the unique blockchain evidence storage index identifier of the evidence storage record to the wearable device and the monitoring terminal. S26. The blockchain network triggers the notarization verification smart contract associated with the notarization transaction and verifies whether the hardware unique identifier of the wearable device is in the authorized legal list. If the verification is successful, the smart contract automatically generates a trust token and associates the trust token with the evidence record, and then proceeds to step S3; If the verification fails, the smart contract checks the current status of the hardware unique identifier in the blockchain device register and evaluates and processes the corresponding device.

5. The electrocardiogram monitoring method according to claim 4, characterized in that, The specific steps for the smart contract to evaluate and process the wearable device corresponding to the unique hardware identifier are as follows: S261. In response to the smart contract detecting that the current state of the hardware unique identifier in the blockchain device register is a preset state, the smart contract calculates the risk score of this verification failure based on the number of times the hardware unique identifier has failed verification in the past. S262. Set a risk warning range. If the current risk score is within the risk warning range, add the hardware unique identifier and its corresponding personal device to the temporary blacklist and set the duration of the ban when added to the temporary blacklist. If the risk score is less than the minimum value of the risk warning range, an alarm flag is generated and associated with the evidence storage record of this verification. Then, an alarm notification is sent to the preset regulatory address. If the risk score is greater than the maximum value of the risk warning range, the hardware unique identifier and its corresponding personal device will be added to the permanent blacklist. S263. In response to the addition of the hardware unique identifier and its corresponding personal device to the permanent blacklist, the smart contract synchronizes the current permanent blacklist record and its risk score to at least one other medical data blockchain network through a cross-chain communication protocol. S264. The smart contract generates a cryptographic random number as a verification challenge and sends it to the corresponding wearable device, triggering the trusted execution environment within the wearable device to perform the following operations: Calculate the cryptographic hash value of the current device firmware within the secure enclave; The cryptographic random number and cryptographic hash value are digitally signed using the device's unique key to generate an integrity proof report; Submit the integrity proof report to the blockchain network; S265. The smart contract receives the integrity certificate report from the wearable device and performs the following steps: Verify the digital signature and compare the cryptographic hash value in the integrity proof report with the pre-stored legitimate firmware baseline value; If the cryptographic hash value is equal to the pre-stored valid firmware baseline value, the verification will fail and the device will be marked as stolen and the preset management system will be notified. If the cryptographic hash value is not equal to the pre-stored legitimate firmware baseline value, a determination that the device has been compromised is generated and recorded.

6. The electrocardiogram monitoring method according to claim 5, characterized in that, In step S262, the calculation process for the blocking duration is as follows: The basic ban duration is calculated based on the risk score, and the calculation formula is as follows: ; In the above formula, Indicates the basic ban duration. Risk score impact coefficient Risk scoring The square of; The number of valid violations is calculated based on the historical number of verification failures of the hardware unique identifier and the time elapsed since those failures occurred. The calculation formula is as follows: ; In the above formula, Indicates the number of valid violations. Indicates the time decay coefficient. Indicates the current time. This indicates the time when the k-th verification of the hardware unique identifier fails. This indicates the number of times the hardware unique identifier has failed verification in the past. The aggravation factor is calculated based on the number of verification failures in the history of the hardware unique identifier. The calculation formula is as follows: ; In the above formula, As an aggravating factor, This is an aggravation factor; The final ban duration is calculated by multiplying the base ban duration by the aggravation factor.

7. The electrocardiogram monitoring method according to claim 1, characterized in that, Step S3 specifically includes the following steps: S31. The monitoring terminal receives the corrected electrocardiogram signal and the corresponding blockchain evidence index identifier, and queries the blockchain network for the corresponding evidence record and its associated trusted marker through the blockchain evidence index identifier, and verifies the evidence record. S32. Determine whether the evidence storage record has passed verification and whether a trusted marker exists; If so, the corrected ECG signal is analyzed to generate a first-class diagnostic report as the diagnostic result; If not, a data credibility alert will be triggered, and a second type of diagnostic report containing the unreliability of the data source will be generated as the diagnostic result; S33. Package the first type of diagnostic report and the second type of diagnostic report and the corresponding blockchain evidence storage index identifier, calculate their hash value and store them in the blockchain network to form an associated record; S34. Based on the current diagnostic results and the verification results of the evidence records, trigger the corresponding alarm action in conjunction with the preset alarm mechanism.

8. The electrocardiogram monitoring method according to claim 5, characterized in that, In step S261, the formula for calculating the risk score is: ; In the above formula, Indicates risk score, As a risk weighting factor, This indicates the number of times the hardware unique identifier has failed verification in its history. Indicates risk adjustment factor, Indicates the indicator weighting factor. This is a key indicator; it takes a value of 1 when the set of key parameters contains specific pathological features, and 0 otherwise.

9. A system for implementing the blockchain-based electrocardiogram monitoring method according to any one of claims 1-8, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, which, when executed by the processor, implements the blockchain-based electrocardiogram monitoring method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Electrocardiosignal data processing method based on block chain

    CN115470832A

  • Contract signing system and method based on trusted digital identity and CA electronic signature

    CN119740218A