Adaptive coding and parametric circuit-driven electrocardiographic arrhythmia recognition method and system

The ECG arrhythmia identification method driven by adaptive coding and parameterized quantum circuits solves the problems of model parameter inflation and insufficient feature representation in traditional algorithms in ECG signal processing, and realizes efficient arrhythmia identification on resource-constrained devices, improving identification accuracy and processing speed.

CN122423883APending Publication Date: 2026-07-21THE 988TH HOSPITAL OF THE CHINESE PEOPLES LIBERATION ARMY JOINT LOGISTICS SUPPORT FORCE +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
THE 988TH HOSPITAL OF THE CHINESE PEOPLES LIBERATION ARMY JOINT LOGISTICS SUPPORT FORCE
Filing Date
2026-04-27
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional deep learning algorithms suffer from problems such as model parameter inflation and insufficient feature representation capabilities when processing ECG signals, making them difficult to adapt to resource-constrained clinical terminal devices and unable to meet the needs of real-time monitoring and early warning of cardiovascular diseases.

Method used

An adaptive coding and parameterized circuit-driven method for identifying ECG arrhythmias is proposed. Under the condition of limited quantum bit resources, the method achieves adaptive quantum state characterization of ECG data through data segmentation and adaptive coding module. Combined with parameterized quantum circuit, it performs collaborative analysis and in-depth mining of time domain, frequency domain and nonlinear characteristics, and uses a lightweight fully connected layer for identification.

Benefits of technology

While reducing computing resource consumption, it improves processing speed and recognition accuracy, achieving efficient feature extraction of ECG signals and accurate identification of arrhythmias, and is suitable for resource-constrained clinical terminal equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122423883A_ABST
    Figure CN122423883A_ABST
Patent Text Reader

Abstract

The application discloses an ECG arrhythmia recognition method and system driven by adaptive coding and parameterized circuit, and the method comprises the following steps: preprocessing and segmenting the ECG signal data for training; processing the ECG signal feature data after the segmentation to obtain a feature mapping result; extracting features from the ECG signal feature data after the segmentation according to a parameterized quantum circuit; inputting the extracted features into a lightweight full connection layer to obtain an ECG arrhythmia recognition result; optimizing the adaptive coding module, the parameterized quantum circuit and the lightweight full connection layer; processing target ECG data according to the optimal adaptive coding module, the parameterized quantum circuit and the lightweight full connection layer to complete ECG arrhythmia recognition. The application can reduce delay and improve processing speed in real-time ECG signal anomaly monitoring, and can reduce the consumption of computing resources while ensuring performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent medical technology, and in particular to a method and system for identifying electrocardiographic arrhythmias driven by adaptive coding and parameterized circuits. Background Technology

[0002] With the widespread adoption of wearable medical devices and the rapid development of telemedicine technology, ECG data (electrocardiogram signal data) is growing rapidly at the ZB (zettabyte) level. Monitoring systems utilizing LSTM, CNN-LSTM, and Bi-LSTM for ECG arrhythmia identification already exist. However, traditional deep learning algorithms, such as Long Short-Term Memory (LSTM) networks and Convolutional Neural Networks (CNN), have revealed performance bottlenecks when processing this type of high-dimensional, non-stationary time-series data. On the one hand, to capture the complex time-domain, frequency-domain, and nonlinear coupling features in ECG signals, classic models often require the construction of multi-layered deep network structures, leading to an exponential expansion of model parameters, making them difficult to adapt to resource-constrained clinical terminal devices. On the other hand, when processing the cross-scale correlations between multi-dimensional features of ECG signals, traditional algorithms suffer from insufficient feature representation capabilities, failing to meet the urgent needs of real-time monitoring and early warning of cardiovascular diseases. Summary of the Invention

[0003] To address the problems of excessive model parameters in existing ECG signal processing, making them difficult to adapt to resource-constrained clinical terminal equipment, and the insufficient feature representation capabilities of traditional algorithms, this invention provides an adaptive coding and parameterized circuit-driven method and system for ECG arrhythmia identification. Through data segmentation and an adaptive coding module, it achieves adaptive quantum state representation of time-series ECG data under conditions of limited quantum bit resources, effectively overcoming the shortcomings of traditional coding methods in preserving temporal information. Furthermore, it enables collaborative analysis and in-depth mining of the time-domain, frequency-domain, and nonlinear characteristics of ECG signals based on parameterized quantum circuits. This invention reduces latency and improves processing speed in real-time ECG signal anomaly monitoring, while maintaining performance and reducing computational resource consumption.

[0004] To achieve the above objectives, the technical solution of the present invention is as follows:

[0005] The first aspect of this invention proposes a method for identifying electrocardiographic arrhythmias driven by adaptive coding and parameterized circuits, comprising:

[0006] Step 1: Collect ECG signal data for training, preprocess and segment the ECG signal data for training to obtain feature data that is easy to process later.

[0007] Step 2: The segmented ECG signal feature data is processed by the adaptive coding module to obtain the feature mapping result of the ECG signal feature data in Hilbert space, which is used to achieve efficient quantum representation of ECG signal feature data through multi-dimensional synergy.

[0008] Step 3: Transfer the feature mapping results to the parameterized quantum circuit, extract features from the segmented ECG signal feature data according to the parameterized quantum circuit, and obtain the extracted features for quantum feature evolution to further extract features;

[0009] Step 4: Input the extracted features into a lightweight fully connected layer to obtain the ECG arrhythmia recognition results;

[0010] Step 5: Optimize the adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer according to the lightweight focus loss function optimization strategy to obtain the optimal adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer, which can help improve the accuracy of recognition.

[0011] Step Six: After segmenting and processing the target ECG signal data, input it into the optimal adaptive coding module to obtain the feature mapping result of the target ECG signal data in Hilbert space. Transfer the feature mapping result of the target ECG signal data in Hilbert space to the optimal parameterized quantum circuit and process the target ECG signal data to obtain the extracted target features. Finally, input the extracted target features into the optimal lightweight fully connected layer to complete the ECG arrhythmia identification.

[0012] Furthermore, the segmentation processing of the electrocardiogram signal feature data includes:

[0013] Using a preset number of features as a data segment, the ECG signal feature data is segmented, which facilitates the decomposition of high-dimensional ECG signal feature data into sub-data units of appropriate dimensions while preserving the correlation of key clinical features.

[0014] Furthermore, the process of processing the segmented ECG signal feature data by the adaptive coding module is specifically expressed by the following formula:

[0015]

[0016] In the formula,

[0017]

[0018]

[0019]

[0020] in, For the feature mapping results, This refers to the segmented electrocardiogram (ECG) signal characteristic data. For the set of trainable parameters, The x-axis rotation angle after incorporating trainable parameters. The y-axis rotation angle after incorporating trainable parameters. Let be the rotation angle along the x-axis. Let be the rotation angle along the y-axis. These are trainable parameters in the x-axis direction. These are trainable parameters in the y-axis direction. The tensor product is the feature dimension. For the x-axis rotating door operation, For the y-axis rotating door operation, This is the initial quantum state.

[0021] Furthermore, the parameterized quantum circuit comprises L layers of alternating entangled gates, tunable rotation gates, and measurement operator layers;

[0022] The L layers of alternating entanglement gates and adjustable rotation gates are used to evolve the ECG signal feature data after each segmentation to obtain the output quantum state, which is used for feature enhancement and transformation.

[0023] The measurement operator layer is used to measure the output quantum state and obtain the extracted features.

[0024] Furthermore, the output quantum state is represented by the following formula:

[0025]

[0026] In the formula,

[0027]

[0028] in, To output the quantum state, The set of parameters for controlling the angle of the revolving door on the l-th floor. This represents the evolution of L layers of alternating entangled gates and adjustable rotation gates, where L is the total number of alternating entangled gates and adjustable rotation gates. For the Y-axis adjustable rotation gate of the i-th qubit in the l-th layer, For the ith qubit in the l-th layer, the X-axis adjustable rotation gate It is a set of entanglement operations.

[0029] Furthermore, the extracted features are represented by the following formula:

[0030]

[0031] Where y represents the extracted features. For the m-th measurement operator, To output the left vector of the quantum state, To output the right vector of the quantum state, To output the expected value of the quantum state under the m-th measurement operator.

[0032] Furthermore, the lightweight fully connected layer includes an intermediate mapping layer and a classification output layer; the classification output layer includes a Softmax function.

[0033] The intermediate mapping layer performs feature transformation through a linear transformation and a nonlinear activation function to obtain intermediate features; the intermediate mapping layer is represented by the following formula:

[0034]

[0035] in, As an intermediate feature, It is a lightweight ReLU activation function. This is the weight matrix. Let y be the bias vector, and y be the extracted features.

[0036] Furthermore, the lightweight focus loss function optimization strategy includes:

[0037] First, fix the parameters of the lightweight fully connected layer, and then update the parameters of the parameterized quantum circuit through gradient descent of the lightweight focus loss function;

[0038] Then, with the parameters of the parameterized quantum circuit fixed, the parameters of the lightweight fully connected layer are optimized by gradient descent using a lightweight focus loss function.

[0039] A second aspect of this invention proposes an adaptive coding and parameterized circuit-driven electrocardiogram arrhythmia recognition system, comprising:

[0040] The segmentation unit is used to collect ECG signal data for training, preprocess the ECG signal data for training and segment it to obtain feature data that is easy to process later.

[0041] An adaptive coding unit is used to process the segmented ECG signal feature data according to the adaptive coding module to obtain the feature mapping result of the ECG signal feature data in Hilbert space, which is used to achieve efficient quantum representation of ECG signal feature data through multi-dimensional synergy.

[0042] The parameterized quantum circuit extraction unit is used to transfer the feature mapping results to the parameterized quantum circuit. Based on the parameterized quantum circuit, the feature data of the segmented electrocardiogram signal are extracted to obtain the extracted features, which are then used for quantum feature evolution to further extract features.

[0043] The first recognition unit is used to input the extracted features into the lightweight fully connected layer to obtain the ECG arrhythmia recognition result.

[0044] The training unit is used to optimize the adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer according to the lightweight focus loss function optimization strategy, so as to obtain the optimal adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer.

[0045] The second identification unit is used to process the target ECG signal data into segments and input it into the optimal adaptive coding module to obtain the feature mapping result of the target ECG signal data in Hilbert space. The feature mapping result of the target ECG signal data in Hilbert space is then transferred to the optimal parameterized quantum circuit to process the target ECG signal data and obtain the extracted target features. Finally, the extracted target features are input into the optimal lightweight fully connected layer to complete the identification of ECG arrhythmias.

[0046] The beneficial effects of this invention are:

[0047] First, this invention innovates the architectural design, constructing a quantum-classical hybrid intelligent monitoring framework. It utilizes quantum circuits to achieve feature dimensionality reduction and adaptive high-order feature extraction, combined with classical fully connected layers to achieve accurate classification decisions, significantly reducing the model parameter scale while ensuring diagnostic accuracy. Second, this invention innovates the encoding mechanism, proposing a segmented quantum adaptive rotation encoding strategy. Through data segmentation and an adaptive encoding module, it achieves adaptive quantum state representation of ECG data containing time series data under the condition of limited quantum bit resources, effectively solving the shortcomings of traditional encoding methods in preserving time-series information. Finally, this invention achieves a breakthrough in feature extraction, proposing a multi-dimensional adaptive feature extraction technology driven by parameterized quantum circuits, constructing a cross-dimensional feature correlation model (adaptive encoding module and parameterized quantum circuits), and realizing collaborative analysis and in-depth mining of the time-domain, frequency-domain, and nonlinear features of ECG signals. Attached Figure Description

[0048] Figure 1 The flowchart illustrates the adaptive coding and parameterized circuit-driven ECG arrhythmia identification method provided in this embodiment of the invention.

[0049] Figure 2 This is a schematic diagram of a parameterized quantum circuit provided in an embodiment of the present invention.

[0050] Figure 3 This is a schematic diagram of a comparative model Long Short-Term Memory network provided in an embodiment of the present invention.

[0051] Figure 4 This is a schematic diagram of a convolutional neural network, which is a comparative model provided in an embodiment of the present invention.

[0052] Figure 5 This is an architecture diagram of an ECG arrhythmia recognition system driven by adaptive encoding and parameterization circuits, provided in an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0054] Example 1

[0055] like Figure 1 As shown, this invention proposes an adaptive coding and parameterized circuit-driven method for identifying electrocardiographic arrhythmias, including:

[0056] S101: Collect ECG signal data for training, preprocess the ECG signal data for training, and perform segmentation processing.

[0057] S102: The segmented ECG signal feature data is processed by the adaptive coding module to obtain the feature mapping result of the ECG signal feature data in Hilbert space.

[0058] S103: Transfer the feature mapping results to the parameterized quantum circuit, and extract features from the segmented ECG signal feature data according to the parameterized quantum circuit to obtain the extracted features.

[0059] S104: Input the extracted features into a lightweight fully connected layer to obtain the ECG arrhythmia recognition results.

[0060] S105: Optimize the adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer according to the lightweight focus loss function optimization strategy to obtain the optimal adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer.

[0061] S106: The target ECG signal data is segmented and processed, then input into the optimal adaptive coding module to obtain the feature mapping result of the target ECG signal data in Hilbert space. The feature mapping result of the target ECG signal data in Hilbert space is transferred to the optimal parameterized quantum circuit and processed to obtain the extracted target features. Finally, the extracted target features are input into the optimal lightweight fully connected layer to complete the ECG arrhythmia identification.

[0062] This invention first segments the ECG signal feature data to decompose high-dimensional ECG data (ECG signal data) into appropriately dimensional sub-data units while preserving the correlation of key clinical features. Then, an adaptive coding module processes the segmented ECG signal feature data to obtain the feature mapping results in Hilbert space. This multi-dimensional coding method extracts more discriminative and representative meaningful features from the original data, laying a solid foundation for subsequent efficient training and accurate classification. The feature mapping results are then transferred to a parameterized quantum circuit for feature extraction from the segmented ECG signal feature data. The extracted features effectively reflect the projection characteristics of quantum states under a standard basis, providing quantitative evidence for subsequent ECG arrhythmia detection tasks. A lightweight focus loss function optimization strategy is used to optimize the adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer to improve recognition accuracy. Finally, the target ECG signal data is processed using the optimal adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer to complete the ECG arrhythmia identification. This invention can reduce latency and improve processing speed in real-time ECG signal abnormality monitoring, while reducing the consumption of computing resources while ensuring performance.

[0063] Example 2

[0064] Based on the above embodiments, the present invention proposes a specific process for an adaptive coding and parameterized circuit-driven method for identifying electrocardiographic arrhythmias, including:

[0065] S201: Collect ECG signal data for training, preprocess the ECG signal data for training, and perform segmentation processing.

[0066] Specifically, the ECG signal data used for training is preprocessed to obtain ECG signal feature data mapped to a fixed range.

[0067] In practical applications of quantum computing for processing electrocardiogram (ECG) data, the reasonable segmentation of input data is also of paramount importance. This is closely related to the inherent limitations of current quantum computing hardware resources, and these limitations are particularly prominent in the ECG data encoding stage.

[0068] ECG data typically has high dimensionality. It is time-series data formed by digitizing electrical activity signals of the heart collected from different parts of the body using multiple electrodes. A standard ECG dataset may contain thousands or even tens of thousands of sampling points and may also include information from multiple leads, which often results in a high level of data dimensionality.

[0069] When using amplitude encoding to process ECG data, the core principle is to map N-dimensional ECG data onto the amplitude of quantum states. This characteristic gives it a significant advantage in information compression efficiency, enabling the encoding of N-dimensional ECG data onto quantum states. The quantum state amplitude of a quantum bit. However, this efficient compression method has significant drawbacks. Due to the high dimensionality of ECG data, the constructed quantum circuit needs to contain a large number of multi-qubit gate operations to achieve a complete encoding process, which directly leads to a sharp increase in circuit depth. For example, when the number of sampling points of ECG data increases from a low value to a high level, the circuit depth may increase exponentially. Since the coherence time of existing quantum processors is still at a low level, excessively long circuit depth will cause the quantum state to undergo decoherence due to interaction with the environment before completing the ECG data calculation task. Decoherence leads to the loss of quantum properties such as superposition and entanglement of quantum states, which in turn leads to a significant decrease in the fidelity of ECG data calculation results. In ECG data analysis applications, such as arrhythmia detection and myocardial infarction diagnosis, the accuracy requirements of the results are extremely high. This decrease in fidelity will cause the calculation results to deviate too much from the actual cardiac electrical activity, which may lead to misdiagnosis or missed diagnosis, making it difficult to meet the accuracy requirements of actual clinical applications.

[0070] On the other hand, if rotation encoding is used to process ECG data, its encoding logic uses single-qubit rotation gates to convert the value of each classical feature in the ECG data into the rotation angle of the corresponding qubit, thereby achieving data encoding. This encoding method has a relatively simple circuit structure, mainly composed of single-qubit gates, resulting in low circuit depth, which can effectively mitigate the effects of decoherence to some extent. However, this encoding method suffers from excessive qubit resource consumption, typically requiring a separate qubit to be allocated for each classical feature dimension of the ECG data. ECG data contains rich features, such as heart rate, QRS group width, ST segment offset, etc., coupled with a large number of sampling points, resulting in a high feature dimension. This leads to a linear increase in the number of qubits required when using rotation encoding.

[0071] The qubit resources currently available from quantum hardware are extremely limited. Moreover, the number of qubits that can be effectively manipulated is further limited by issues such as the fidelity of quantum gate operations and crosstalk. Crosstalk causes unnecessary interactions between adjacent qubits, interfering with the accuracy of quantum states. This makes it difficult to use all of the qubits for the direct encoding of high-dimensional ECG data, even if a certain number of qubits are available.

[0072] Therefore, given the aforementioned hardware constraints, scientifically segmenting ECG input data is particularly necessary. From a clinical perspective, effective abnormal features of ECG data (such as premature beats and atrial fibrillation) often exhibit a temporally continuous distribution, typically concentrated within 3-5 consecutive data windows. In view of this, this invention selects to segment ECG data into data segments of 5 features each, and employs a rotational encoding scheme for the segmented data. This segmentation strategy can decompose high-dimensional ECG data into appropriately dimensional sub-data units while preserving the correlation of key clinical features. When using rotational encoding, each data segment containing 5 features requires only 5 qubits to complete the encoding. This qubit requirement matches the current resource supply of quantum hardware, effectively avoiding the problem of insufficient qubits preventing complete encoding of ECG data, thus laying the foundation for the practical application of quantum computing in ECG data processing.

[0073] S202: The segmented ECG signal feature data is processed by the adaptive coding module to obtain the feature mapping result of the ECG signal feature data in Hilbert space.

[0074] Specifically, adaptive multidimensional encoding, as an innovative strategy that deeply integrates classical data preprocessing and fine-tuning of quantum states, can be broken down into two closely linked technical links, which achieve efficient quantum representation of classical data through multidimensional synergy.

[0075] First, based on the fundamental framework of rotation coding, each feature value in the classical dataset is transformed into the initial rotation angle of the corresponding qubit through a specific function mapping (such as a linear transformation or a nonlinear mapping), completing the first round of transformation from the high-dimensional classical feature space to the low-dimensional quantum state space. This process essentially utilizes a single-qubit rotation gate (such as... , The angle parameter carries classical information. If we define the classical features (the segmented ECG signal feature data) as... If n is the feature dimension, then the initial rotation angle can be expressed as: ,in, When it is a mapping function, such as a linear mapping ( (These are fixed coefficients). Based on this, an independent trainable parameter is introduced for the rotation angle of each feature. At this point, the rotation angle is updated to This parameter is dynamically adjusted to achieve adaptive optimization of the encoding process. For example, for... Perform rotation encoding Above, its format is The specific format after using adaptive encoding is as follows: .

[0076] Furthermore, based on existing research, this invention proposes a significantly innovative technical solution—implementing significantly different quantum rotation encoding strategies along the X and Y axes, two orthogonal quantum bit operation dimensions, to construct a truly multi-dimensional encoding system. This innovative method, compared to the traditional single-angle mapping mode, can more effectively overcome its inherent information representation bottleneck: by setting differentiated rotation angle parameters along the X and Y axes respectively. and (in and (For two different training parameters), corresponding to the execution of quantum rotating gate operations. and This enables the hierarchical capture of multi-dimensional feature information in classic data.

[0077] Specifically, let the classic data feature values ​​(the ECG signal feature data after segmentation) be... (where n is the feature dimension), here feature mapping is achieved through quantum rotation encoding, and... and The revolving door completes this mapping process by first converting the feature mapping function of rotation encoding into initial rotation angles in the X and Y axes, respectively. and This step is essentially through and Quantum rotation operations transform data in vector space This is mapped to quantum Hilbert space. An adaptive adjustment mechanism is then introduced, configuring independent trainable parameters for the rotation angles in both directions. and The angle is now updated to and The corresponding revolving door operation becomes and This dynamic adjustment process optimizes the representation of data in quantum Hilbert space, enabling the encoding strategy to adaptively match data features.

[0078] Through the qubit rotating gate and Acting on the initial quantum state This generates encoded quantum states, achieving an adaptive mapping from classical features to quantum states. Specifically, this is expressed by the following formula:

[0079]

[0080] In the formula,

[0081]

[0082]

[0083]

[0084] in, For the feature mapping results, This refers to the segmented electrocardiogram (ECG) signal characteristic data. For the set of trainable parameters, The x-axis rotation angle after incorporating trainable parameters. The y-axis rotation angle after incorporating trainable parameters. Let be the rotation angle along the x-axis. Let be the rotation angle along the y-axis. These are trainable parameters in the x-axis direction. These are trainable parameters in the y-axis direction. The tensor product is the feature dimension. For the x-axis rotating door operation, For the y-axis rotating door operation, This is the initial quantum state.

[0085] This multi-dimensional expansion, combined with the dynamic adjustment of adaptive parameters, not only accurately captures the easily observable explicit relationships between features, but also deeply uncovers the implicit patterns hidden beneath the surface of the data that are difficult to identify directly. More importantly, through this multi-dimensional encoding method, more discriminative and representative meaningful features can be extracted from the original data, laying a solid foundation for subsequent efficient training and accurate classification.

[0086] This design philosophy aims to achieve three core objectives, and these three objectives are inherently synergistic in their optimization logic:

[0087] Firstly, through multi-dimensional feature mapping, multi-dimensional feature extraction can be achieved, uncovering deeper data correlations. (This is achieved by leveraging...) and The rotating door performs feature mapping along both the X and Y axes. Mapping in different dimensions can capture different aspects of the data. Mapping along the X axis may focus more on a certain attribute of the data, while mapping along the Y axis focuses on another type of feature. This multi-dimensional extraction method breaks the limitations of single-dimensional mapping and can fully uncover the complex and potential correlations in the data, making the quantum state a more comprehensive representation of the data.

[0088] Secondly, through iterative optimization of trainable parameters, dynamic calibration of quantum state mapping relationships can be achieved, thereby significantly improving the representation accuracy of encoded features in quantum space. Specifically, classical data often contains a large amount of noise interference (such as EMG artifacts and baseline drift) and feature redundancy. If a fixed angle mapping (i.e., This makes it difficult to adapt to the complex distribution characteristics of data—for example, when eigenvalues ​​are in a nonlinear distribution region, a fixed mapping can lead to overlapping or distortion of quantum states. Trainable parameters... Algorithms such as gradient descent and natural gradient optimization can be used, based on a lightweight focus loss function. The feedback continuously corrects the angle mapping deviation, and its optimization process can be expressed as: ( (For the learning rate). For key features with high discriminative power, the parameters are... It will increase to amplify its corresponding rotation angle weight, that is Increase, thereby enhancing quantum state differences; for noise characteristics, It will shrink to reduce its interference with the quantum state, ultimately improving the matching degree between the quantum state and the essential characteristics of the data.

[0089] Third, these trainable parameters can form a multi-scale collaborative optimization mechanism with the tunable parameters in the subsequent Parameterized Quantum Circuit (PQC), significantly improving the model's training efficiency. In quantum machine learning tasks, the bottleneck of model performance often lies in the ability to explore the parameter space: in traditional encoding methods, the parameter optimization of PQC relies solely on the tunable quantum gates within the circuit (such as variable-angle gates). , Let its parameters be... Here, m represents the dimension of the PQC parameters, which is finite and prone to getting trapped in local optima. Introducing trainable parameters for the adaptive encoding module is equivalent to adding a set of optimizable variables to the "front end" of the parameterized quantum circuit. The "back-end" parameters of PQC Forming a cascaded optimized link – encoding parameters The initial distribution of the quantum state is determined. PQC parameters It is then responsible for performing quantum operations on the initial distribution to evolve it and obtain the final output state. During training, both share gradient information through backpropagation. The gradient of the lightweight focus loss function with respect to the parameters is... and For example, when the model predicts error feedback, the encoding parameters adjust the initial mapping according to the sensitivity of the quantum state, while the PQC parameters optimize the quantum operation path accordingly. This collaborative mechanism can effectively expand the topology of the parameter space, enhance the model's ability to fit complex data patterns (such as early atrial fibrillation features in ECG), and ultimately improve the overall training accuracy by reducing classification error or regression loss.

[0090] This design, which upgrades the encoding process from "static mapping" to "dynamic parameterized control," breaks the fixed limitation of the classical-quantum interface in traditional quantum coding, enabling quantum models to learn during the data input stage. This provides a key technical path for improving model performance under low-noise quantum hardware.

[0091] S203: Transfer the feature mapping results to the parameterized quantum circuit, and extract features from the segmented ECG signal feature data according to the parameterized quantum circuit to obtain the extracted features.

[0092] Specifically, the parameterized quantum circuit takes the encoded quantum state (feature mapping result) as input and performs feature enhancement and transformation through the parameterized quantum circuit. This circuit consists of L layers of alternating entangled gates (such as CNOT gates) and tunable rotation gates (such as… and The structure consists of the revolving door on the l-th floor, whose angle is determined by the parameter. The overall evolutionary process of control can be represented as:

[0093]

[0094] in, The set of parameters for controlling the angle of the revolving door on the l-th floor. This represents the evolution of L layers of alternating entangled gates and adjustable rotation gates, where L is the total number of alternating entangled gates and adjustable rotation gates. For the Y-axis adjustable rotation gate of the i-th qubit in the l-th layer, For the ith qubit in the l-th layer, the X-axis adjustable rotation gate It is a set of entanglement operations.

[0095] After PQC evolution, the output quantum state is:

[0096]

[0097] in, To output the quantum state.

[0098] Then, through the measurement operator (such as calculation base measurement) The classical eigenvectors are obtained by measuring the output quantum state. These are the extracted features. During training, the lightweight focus loss function is minimized. (where t is the target label), while optimizing the adaptive encoding parameters. and PQC parameters The gradient update formula is:

[0099]

[0100] in, The learning rate is used. This two-parameter collaborative optimization mechanism not only enhances the ability of quantum states to represent key features, but also improves the module's fitting accuracy to complex data distributions by expanding the parameter space.

[0101] Although parameterized quantum circuits adopt a unified format framework, the specific parameters of the parameterized quantum circuits used in each segment of the structure are different, and the corresponding circuits are as follows: Figure 2 As shown (parameter values ​​are random).

[0102] In the field of quantum computing, measuring the expected value of a qubit is a core step in obtaining quantum state information. In practical quantum computing systems, this process is typically achieved through multiple repeated measurements, with the final result presented as a vector consisting of the quantum state and its corresponding probability. This invention employs a quantum simulator to conduct verification experiments, enabling high-precision numerical calculations to be performed directly within its simulation environment.

[0103] The measurement of qubits requires expansion based on specific basis vectors. In accordance with the technical requirements of feature dimension compression, all state measurements of qubits in this invention are performed under a standard basis. The standard basis consists of two orthogonal and normalized basis vectors, namely… and Their matrix representations are respectively and The measurement process under the standard basis is essentially projecting the superposition state of the qubit onto the standard basis. or The act of measurement induces the collapse of a quantum state, localizing it to a certain ground state. This collapse can be obtained by statistically analyzing the results of multiple measurements. and The probability distribution.

[0104] Preferably, from the perspective of measurement theory, measurements under the standard basis correspond to two projection operators. and These two operators satisfy the completeness condition. (in (for the unit operator) and orthogonality condition This conforms to the mathematical axioms of quantum measurement. Let the state of the sub-qubit to be measured be a superposition state. (in and If the measurement result is 0, then the probability is... The corresponding collapse state is The probability of the measurement result being 1 is The corresponding collapse state is .

[0105] To address the application requirements of intelligent monitoring of ECG arrhythmias, this invention measures the probability of each qubit measuring a value of 1. As the final extracted feature of ECG, this feature can effectively reflect the projection characteristics of quantum states under the standard basis, providing a quantitative basis for subsequent ECG arrhythmia detection tasks.

[0106] In summary, this invention first segments all ECG signal data and then performs the following process on each segment: Let the i-th data segment be... N represents the total number of segments. The quantum feature extraction process is as follows: First, the quantum state is mapped to the initial quantum state through an adaptive coding module. Then, the feature is enhanced by a parameterized quantum circuit (PQC) to obtain the evolved state. Finally, the quantum state is extracted by a measurement operator. Output classic feature vectors (extracted features). Throughout the process, the encoding parameters for all segments... With PQC parameters Construct the global parameter set And by minimizing the lightweight focus loss function Synchronous optimization is achieved. Ultimately, through the aforementioned collaborative optimization mechanism, feature extraction is performed on all data segments to obtain the final feature representation of the original data (i.e., the extracted features).

[0107] S204: Input the extracted features into a lightweight fully connected layer to obtain the ECG arrhythmia recognition results.

[0108] Specifically, the classical classification decision module, as a lightweight backend component of the quantum-classical hybrid architecture, primarily functions by relying on the Softmax function to achieve rapid classification decisions based on quantum features, directly mapping quantum feature vectors to anomaly type identification results. This module employs a minimally simplistic fully connected structure (containing only two layers), with the input being the feature vector output from the quantum circuit. (where m is the quantum feature dimension), efficient classification is achieved through two layers of direct mapping.

[0109] Specifically, the first layer is an intermediate mapping layer, which performs feature transformation through a linear transformation and a non-linear activation function, providing adaptive features for the classification output. Its parameter is the weight matrix. and bias vector The feature transfer process is as follows:

[0110]

[0111] in, As an intermediate feature, It is a lightweight ReLU activation function that maintains computational efficiency while introducing nonlinear expressive power.

[0112] The second layer is the classification output layer, which directly uses the Softmax function to extract intermediate features. Transform it into a category probability distribution. The parameter is the weight matrix. and bias vector (C is the number of categories), the predicted probability of category c is:

[0113]

[0114] in, Let C be the number of categories. and Here are the weight matrix and bias vector for class c. and For the first The weight matrix and bias vector corresponding to the class, It is an intermediate feature.

[0115] The two-layer parameter design focuses on the "direct mapping" logic, avoiding redundant calculations and ensuring the simplicity of the classification process.

[0116] S205: Optimize the adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer according to the lightweight focus loss function optimization strategy to obtain the optimal adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer.

[0117] Specifically, to address the class imbalance problem in arrhythmia data, a lightweight focus loss function is used for optimization, which simplifies calculations while preserving the core regulation mechanism:

[0118]

[0119] in, For predefined constant weights, By using fixed values, the cost of hyperparameter tuning is reduced while correcting class imbalance. The training process employs a simple alternating optimization strategy: first, the parameters of the lightweight fully connected layers are fixed. The parameters of the parameterized quantum circuit are updated using gradient descent with a lightweight focus loss function to improve the fit between quantum features and classification logic. Then, with the parameters of the parameterized quantum circuit fixed, the parameters of the classical network are optimized using gradient descent with a lightweight focus loss function.

[0120]

[0121] Through "two-layer direct mapping design, simplified parameter logic, and efficient alternating optimization", this module achieves accurate classification in a quantum-classical hybrid architecture with a minimalist structure.

[0122] S206: The target ECG signal data is segmented and processed, then input into the optimal adaptive coding module to obtain the feature mapping result of the target ECG signal data in Hilbert space. The feature mapping result of the target ECG signal data in Hilbert space is transferred to the optimal parameterized quantum circuit and processed to obtain the extracted target features. Finally, the extracted target features are input into the optimal lightweight fully connected layer to complete the ECG arrhythmia identification.

[0123] Example 3

[0124] Based on the above embodiments, this invention proposes a verification process for an adaptive coding and parameterized circuit-driven ECG arrhythmia identification method, specifically including:

[0125] To verify the performance of this invention, the experimental dataset was divided into a training set (80%) and a test set (20%) in an 8:2 ratio. The model was evaluated on the test set independently to ensure that it had excellent generalization ability on new data that had not been used for training.

[0126] The hardware environment consisted of a desktop computer with the following specifications: a 13th-generation Intel(R) Core(TM) i5-13420H (2.10GHz) processor and 16GB of memory, providing stable computational support for the experiment. Evaluation metrics focused on the ECG arrhythmia detection task, comparing it with LSTM (Long Short-Term Memory) networks (LSTM1-LSTM4). Figure 3 As shown, CNN (Convolutional Neural Network) is as follows: Figure 4 The performance of six types of models, including those described in this invention, is presented. Precision, F1-score, Accuracy, and NP (total parameters of the model) are used as evaluation metrics to comprehensively assess the model's performance, as detailed in Table 1.

[0127]

[0128] The PM model (the model of this invention) demonstrates outstanding advantages in both overall performance and segmented scene recognition: its overall accuracy reaches 0.98, ranking first alongside CNN and significantly surpassing the LSTM series models (the highest being only 0.95), reflecting its strong stability in large-scale classification tasks. Among the segmented categories, the "Normal" class achieves an accuracy of 0.98 and an F1-score of 0.99, on par with the best model CNN and exhibiting extremely strong classification stability; the "APC" class achieves an accuracy of 0.97 and an F1-score of 0.95, also approaching the best level with extremely high classification confidence; the "Others" class achieves a perfect accuracy of 1.00 and an F1-score of 0.99, demonstrating complete accuracy in identifying this marginal category among all models, with particularly outstanding generalization ability; the "PVC" class achieves an accuracy of 0.93, significantly better than CNN's 0.82, showing greater advantage in the accuracy of this category; and the "PB" class achieves an accuracy of 0.84, also higher than CNN's 0.73, performing better in tasks that emphasize accuracy. In summary, the PM model not only boasts top-tier overall performance but also demonstrates significant advantages in accurate identification of subdivided scenarios, balanced category coverage, and generalization ability for marginal cases. It is an excellent model for this classification task, combining high accuracy with strong adaptability. Table 2 shows the model parameter scale.

[0129]

[0130] From a comprehensive analysis of parameter count and performance, the PM model demonstrates significant advantages. PM has only 5429 parameters, far fewer than other comparable models (such as CNN with 556549 parameters and LSTM4 with 239237 parameters, tens or even hundreds of times larger). Despite this significant parameter reduction, the PM model achieves an overall accuracy of 0.98, tying for first place with CNN and far surpassing the LSTM series. In specific scenarios, its performance in "Normal," "APC," and "Others" classes is on par with the best models, while its accuracy in "PVC" and "PB" classes surpasses that of CNN. This fully demonstrates that the PM model, while ensuring top-tier classification performance, possesses extremely high parameter efficiency. The model is also more lightweight, reducing computational resource consumption while exhibiting stronger generalization ability and engineering practicality, making it a high-quality model with both excellent performance and efficiency.

[0131] To fully verify the actual performance of each core component in the proposed adaptive multidimensional coding method, this invention meticulously designed a series of ablation experiments. Using the controlled variable method, the independent roles and synergistic effects of the multidimensional coding mechanism and the adaptive adjustment strategy were investigated one by one. The specific comparative models involved are as follows:

[0132] Firstly, a multi-dimensional coding model without adaptive coding (MEORxwA): This model only retains the multi-dimensional rotation coding structure of the X and Y axes (i.e., simultaneously employing...). and The rotating door performs feature mapping, but does not introduce trainable adaptive parameters. Its rotation angle is fixed at ), and By comparing with the core method, the performance-enhancing effect of the adaptive adjustment strategy can be evaluated independently.

[0133] Secondly, only in The model encoded on the X-axis (excluding adaptive encoding) (MEORxWA): This model only uses rotational encoding in the X-axis direction (only using... (Revolving door), and lacks adaptive parameter adjustment. The rotation angle is This model is used to verify the basic performance of single-dimensional (X-axis) encoding without an adaptive mechanism, providing a reference for the advantages of multi-dimensional encoding.

[0134] Thirdly, only The model encoded on the top (without adaptation) (MEORywA): Similar to the model above, it only uses rotation encoding in the Y-axis direction (only using... Revolving door), no adaptive parameters The rotation angle is This model is also used to verify the basic performance of single-dimensional (Y-axis) encoding without an adaptive mechanism, providing a reference for the advantages of multi-dimensional encoding.

[0135] Fourth, only in The model encoded on the top (including adaptation) (MEORyWA): only the X-axis rotation encoding structure is retained, but adaptive parameters are introduced. The rotation angle is updated to This model is used to evaluate the optimization effect of adaptive adjustment strategies on feature representation capabilities in a single dimension (X-axis).

[0136] Fifth, only in The model encoded on top (including adaptive ones) (MDEwAC): only retains the Y-axis rotation encoding structure and introduces adaptive parameters. The rotation angle is updated to This model is used to evaluate the optimization effect of adaptive adjustment strategies on feature representation capabilities in a single dimension (Y-axis).

[0137] The adaptive multi-dimensional encoding model proposed in this invention serves as the core method, simultaneously integrating multi-dimensional encoding mechanisms for the X and Y axes (using...). and (Revolving door) and their respective independent adaptive adjustment parameters and The rotation angle is and By comprehensively comparing the performance of this model with the five types of ablation experimental models mentioned above, the synergistic gain of the multi-dimensional encoding mechanism and adaptive adjustment strategy in the intelligent monitoring task of ECG arrhythmia can be systematically quantified, as well as their respective independent contributions to model performance, thereby clarifying the technical advantages and core innovations of the proposed method.

[0138] To verify the effectiveness of each core module, detailed ablation experiments were conducted. The results are shown in Table 3. Removing the segmented quantum encoding reduced the model accuracy to 95.1%; disabling multi-dimensional feature extraction reduced the AUC-ROC value by 0.037; and neither quantum circuits nor classical classifiers alone could achieve the performance level of the hybrid architecture. This fully demonstrates that the synergistic effect between segmented quantum adaptive rotation encoding, multi-dimensional feature extraction, and the quantum-classical hybrid architecture is a key factor in achieving high-performance models.

[0139]

[0140] Example 4

[0141] Based on the above embodiments, such as Figure 5 As shown, this invention proposes an adaptive coding and parameterized circuit-driven ECG arrhythmia recognition system, comprising:

[0142] The segmentation unit is used to collect ECG signal data for training, preprocess the ECG signal data for training, and segment it.

[0143] The adaptive coding unit is used to process the segmented ECG signal feature data according to the adaptive coding module to obtain the feature mapping result of the ECG signal feature data in Hilbert space.

[0144] The parameterized quantum circuit extraction unit is used to transfer the feature mapping results to the parameterized quantum circuit, and to extract features from the segmented ECG signal feature data according to the parameterized quantum circuit to obtain the extracted features.

[0145] The first recognition unit is used to input the extracted features into a lightweight fully connected layer to obtain the ECG arrhythmia recognition result.

[0146] The training unit is used to optimize the adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer according to the lightweight focus loss function optimization strategy, so as to obtain the optimal adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer.

[0147] The second identification unit is used to process the target ECG signal data into segments and input it into the optimal adaptive coding module to obtain the feature mapping result of the target ECG signal data in Hilbert space. The feature mapping result of the target ECG signal data in Hilbert space is then transferred to the optimal parameterized quantum circuit to process the target ECG signal data and obtain the extracted target features. Finally, the extracted target features are input into the optimal lightweight fully connected layer to complete the identification of ECG arrhythmias.

[0148] It should be noted that the adaptive coding and parameterized circuit-driven ECG arrhythmia recognition system provided in this embodiment of the invention is for implementing the above-mentioned adaptive coding and parameterized circuit-driven ECG arrhythmia recognition method. Its specific functions can be referred to in the above-mentioned method embodiments, and will not be repeated here.

[0149] In summary, this invention first innovates the architectural design, constructing a quantum-classical hybrid intelligent monitoring framework. It utilizes quantum circuits to achieve feature dimensionality reduction and adaptive high-order feature extraction, combined with classical fully connected layers to achieve accurate classification decisions, significantly reducing the model parameter scale while ensuring diagnostic accuracy. Secondly, this invention innovates the encoding mechanism, proposing a segmented quantum adaptive rotation encoding strategy. Through data segmentation and an adaptive encoding module, it achieves adaptive quantum state representation of ECG data containing time series data under the condition of limited quantum bit resources, effectively addressing the shortcomings of traditional encoding methods in preserving time-series information. Finally, this invention achieves a breakthrough in feature extraction, proposing a multi-dimensional adaptive feature extraction technology driven by parameterized quantum circuits, constructing a cross-dimensional feature correlation model (adaptive encoding module and parameterized quantum circuits), and realizing collaborative analysis and in-depth mining of the time-domain, frequency-domain, and nonlinear features of ECG signals.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An adaptive coding and parameterized circuit-driven method for identifying electrocardiographic arrhythmias, characterized in that, include: Step 1: Collect ECG signal data for training, preprocess the ECG signal data for training, and perform segmentation processing; Step 2: The segmented ECG signal feature data is processed by the adaptive coding module to obtain the feature mapping results of the ECG signal feature data in Hilbert space; Step 3: Transfer the feature mapping results to the parameterized quantum circuit, and extract features from the segmented ECG signal feature data according to the parameterized quantum circuit to obtain the extracted features; Step 4: Input the extracted features into a lightweight fully connected layer to obtain the ECG arrhythmia recognition results; Step 5: Optimize the adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer according to the lightweight focus loss function optimization strategy to obtain the optimal adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer; Step Six: After segmenting and processing the target ECG signal data, input it into the optimal adaptive coding module to obtain the feature mapping result of the target ECG signal data in Hilbert space. Transfer the feature mapping result of the target ECG signal data in Hilbert space to the optimal parameterized quantum circuit and process the target ECG signal data to obtain the extracted target features. Finally, input the extracted target features into the optimal lightweight fully connected layer to complete the ECG arrhythmia identification.

2. The method for identifying electrocardiographic arrhythmias driven by adaptive coding and parameterized circuits according to claim 1, characterized in that, The segmentation processing of electrocardiogram signal feature data includes: The ECG signal feature data is segmented into segments, with a preset number of features as each segment.

3. The method for identifying electrocardiographic arrhythmias driven by adaptive coding and parameterized circuits according to claim 1, characterized in that, The process of processing the segmented ECG signal feature data using the adaptive coding module is specifically expressed by the following formula: In the formula, in, For the feature mapping results, This refers to the segmented electrocardiogram (ECG) signal characteristic data. For the set of trainable parameters, The x-axis rotation angle after incorporating trainable parameters. The y-axis rotation angle after incorporating trainable parameters. Let be the rotation angle along the x-axis. Let be the rotation angle along the y-axis. These are trainable parameters in the x-axis direction. These are trainable parameters in the y-axis direction. The tensor product is the feature dimension. For the x-axis rotating door operation, For the y-axis rotating door operation, This is the initial quantum state.

4. The method for identifying electrocardiographic arrhythmias driven by adaptive coding and parameterized circuits according to claim 1, characterized in that, The parameterized quantum circuit includes L layers of alternating entangled gates, tunable rotation gates, and measurement operator layers; The L layers of alternating entanglement gates and adjustable rotation gates are used to evolve the ECG signal feature data after each segmentation to obtain the output quantum state; The measurement operator layer is used to measure the output quantum state and obtain the extracted features.

5. The method for identifying electrocardiographic arrhythmias driven by adaptive coding and parameterized circuits according to claim 3 or 4, characterized in that, The output quantum state is expressed by the following formula: In the formula, in, To output the quantum state, The set of parameters for controlling the angle of the revolving door on the l-th floor. This represents the evolution of L layers of alternating entangled gates and adjustable rotation gates, where L is the total number of alternating entangled gates and adjustable rotation gates. For the Y-axis adjustable rotation gate of the i-th qubit in the l-th layer, For the ith qubit in the l-th layer, the X-axis adjustable rotation gate It is a set of entanglement operations.

6. The method for identifying electrocardiographic arrhythmias driven by adaptive coding and parameterized circuits according to claim 4, characterized in that, The extracted features are expressed by the following formula: Where y represents the extracted features. For the m-th measurement operator, To output the left vector of the quantum state, To output the right vector of the quantum state, To output the expected value of the quantum state under the m-th measurement operator.

7. The method for identifying electrocardiographic arrhythmias driven by adaptive coding and parameterized circuits according to claim 1, characterized in that, The lightweight fully connected layer includes an intermediate mapping layer and a classification output layer; the classification output layer includes a Softmax function. The intermediate mapping layer performs feature transformation through a linear transformation and a nonlinear activation function to obtain intermediate features; The intermediate mapping layer is represented by the following formula: in, As an intermediate feature, It is a lightweight ReLU activation function. This is the weight matrix. Let y be the bias vector, and y be the extracted features.

8. The method for identifying electrocardiographic arrhythmias driven by adaptive coding and parameterized circuits according to claim 1, characterized in that, The lightweight focus loss function optimization strategy includes: First, fix the parameters of the lightweight fully connected layer, and then update the parameters of the parameterized quantum circuit through gradient descent of the lightweight focus loss function; Then, with the parameters of the parameterized quantum circuit fixed, the parameters of the lightweight fully connected layer are optimized by gradient descent using a lightweight focus loss function.

9. An ECG arrhythmia recognition system driven by adaptive encoding and parameterization circuits, characterized in that, include: The segmentation unit is used to collect ECG signal data for training, preprocess the ECG signal data for training, and segment it. An adaptive coding unit is used to process the segmented ECG signal feature data according to the adaptive coding module to obtain the feature mapping result of the ECG signal feature data in Hilbert space; The parameterized quantum circuit extraction unit is used to transfer the feature mapping results to the parameterized quantum circuit, and to extract features from the segmented ECG signal feature data according to the parameterized quantum circuit to obtain the extracted features. The first recognition unit is used to input the extracted features into the lightweight fully connected layer to obtain the ECG arrhythmia recognition result. The training unit is used to optimize the adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer according to the lightweight focus loss function optimization strategy, so as to obtain the optimal adaptive coding module, parameterized quantum circuit, and lightweight fully connected layer. The second identification unit is used to process the target ECG signal data into segments and input it into the optimal adaptive coding module to obtain the feature mapping result of the target ECG signal data in Hilbert space. The feature mapping result of the target ECG signal data in Hilbert space is then transferred to the optimal parameterized quantum circuit to process the target ECG signal data and obtain the extracted target features. Finally, the extracted target features are input into the optimal lightweight fully connected layer to complete the identification of ECG arrhythmias.