Arrhythmia identification method and device, storage medium and wearable equipment

By extracting multidimensional physical features in parallel and weighting them together, and combining them with the user's own normal conduction spectrum, the problem of lack of physiological mechanisms and poor personalization adaptability in the MCG identification method is solved, thus achieving high-precision arrhythmia identification and improving clinical reliability.

CN121890973APending Publication Date: 2026-04-21杭州极弱磁场国家重大科技基础设施研究院
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
杭州极弱磁场国家重大科技基础设施研究院
Filing Date
2026-03-26
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing MCG identification methods rely on black-box deep learning models, lack physiological mechanism support, have poor personalization adaptability, and cannot meet clinical reliability requirements.

Method used

By extracting multidimensional physical features in parallel and combining them with the user's own normal conduction spectrum to construct personalized propagation divergence indicators, including dynamic trajectory features, evolutionary manifold features, and topological dynamic features, these indicators are weighted and fused before being input into a classifier for arrhythmia identification.

Benefits of technology

It significantly improves the accuracy and clinical reliability of arrhythmia identification, reduces reliance on labeled data, and enhances the transparency of system decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121890973A_ABST
    Figure CN121890973A_ABST
Patent Text Reader

Abstract

The invention discloses an arrhythmia recognition method and device, a storage medium and wearable equipment, and relates to the technical field of electrocardiosignal processing. According to the method, multi-dimensional features such as an equivalent current dipole dynamic trajectory, an evolution manifold and topological dynamics are synchronously and parallelly extracted from a magnetocardiogram to describe a general cardiac electrical activity rule. And meanwhile, a personalized theoretical probability propagation map is constructed according to historical data of sinus rhythm of the user, and propagation divorcing features are generated by comparing the personalized theoretical probability propagation map with an actual activation time map to describe individual specific lesions from a personalized space-time conduction dimension. And performing attention gating weight fusion on the multi-dimensional features and the propagation departure features, inputting the fused features into a classifier to match a classification rule, and determining the arrhythmia type and the confidence coefficient thereof. Therefore, the recognition precision of complex arrhythmia is greatly improved by using a multi-level complementary feature system, personalized adaptation is realized depending on individual historical normal data, and the dependence on labeled data is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electrocardiogram signal processing technology, and in particular to a method, apparatus, storage medium and wearable device for identifying arrhythmias. Background Technology

[0002] Cardiac arrhythmias are a core emergency threatening cardiovascular health, and early and accurate identification is crucial for preventing sudden death and guiding treatments such as radiofrequency ablation. Traditional electrocardiograms (ECGs) suffer from low spatial resolution and are easily interfered with by surface tissues, making it difficult to capture the spatiotemporal propagation characteristics of deep cardiac electrical activity. However, with the breakthrough in Optically Pumped Magnetometer (OPM) technology, Magnetocardiography (MCG) has broken free from the stringent environmental limitations of traditional equipment. It can reconstruct the origin and conduction pathway of abnormal electrical excitation through magnetic field signals with millisecond-level and centimeter-level precision, providing a completely new technological approach for arrhythmia identification.

[0003] However, existing MCG recognition methods still have many shortcomings: (1) Most rely on black-box deep learning models, the decision-making lacks physiological mechanism support and is not traceable, and the model training is highly dependent on expert-annotated data, resulting in insufficient generalization ability and personalized adaptability; (2) There is a lack of personalized modeling for user anatomical structure and conduction characteristics, resulting in poor adaptability to individual differences. This makes the MCG recognition results unable to meet the credibility requirements of clinical practice. Summary of the Invention

[0004] In view of this, this application provides a method, device, storage medium and wearable device for arrhythmia identification. By extracting multidimensional physical features in parallel and combining them with the user's own normal conduction spectrum to construct personalized transmission deviation indicators, the system can significantly improve the transparency and clinical credibility of decision-making while ensuring high identification accuracy.

[0005] According to a first aspect of this application, a method for identifying cardiac arrhythmia is provided, the method comprising: Obtain the user's target magnetic field map sequence and its historical magnetic field map sequences under normal sinus rhythm; The following feature extraction steps are performed in parallel: S1: Extract dynamic trajectory features reflecting the motion law of the cardiac equivalent current dipole from the sequence of cardiac magnetographs to be tested; S2: Extract evolutionary manifold features describing the continuous-time evolution of the field map from the sequence of magnetic field maps to be tested; S3: Extract topological dynamic features characterizing the spatial topology of the magnetic field from the sequence of magnetic field maps to be tested; S4: Based on the historical magnetocardiogram sequence, a personalized theoretical probability propagation map is constructed, and based on the magnetocardiogram sequence to be tested, an actual activation time map is constructed. By comparing the two, the propagation deviation characteristics reflecting individualized conduction abnormalities are determined. The dynamic trajectory features, evolutionary manifold features, topological dynamic features, and propagation divergence features are weighted and fused to obtain a fused feature vector; The fused feature vector is input into the classifier to obtain the classification results of the arrhythmia type and its confidence level.

[0006] According to a second aspect of this application, an arrhythmia identification device is provided, the device comprising: The acquisition module is used to acquire the magnetocardiogram sequence to be tested and the historical magnetocardiogram sequences acquired by the user to which the magnetocardiogram sequence to be tested belongs under normal sinus rhythm. The feature extraction module is used to perform the following feature extraction steps in parallel: S1: Extract the dynamic trajectory features of the equivalent current dipole from the magnetic field map sequence to be tested; S2: Extract evolutionary manifold features from the magnetocardiogram sequence to be tested; S3: Extract topological dynamic features from the magnetocardiogram sequence to be tested; S4: Construct a theoretical probability propagation map based on the historical magnetocardiogram sequence, and construct an actual activation time map based on the magnetocardiogram sequence to be tested. By comparing the theoretical probability propagation map with the actual activation time map, determine the propagation divergence characteristics. The feature fusion module is used to perform weighted fusion of the dynamic trajectory features, the evolutionary manifold features, the topological dynamics features, and the propagation divergence features to obtain a fused feature vector; The identification module is used to input the fused feature vector into the classifier to obtain the type of arrhythmia and its confidence level.

[0007] According to a third aspect of this application, a readable storage medium is provided on which a program or instructions are stored, which, when executed by a processor, implement the steps of the above-described arrhythmia identification method.

[0008] According to a fourth aspect of this application, a wearable device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described arrhythmia recognition method.

[0009] By employing the aforementioned technical solution, multidimensional features with clear physical meaning, such as the dynamic trajectory of equivalent current dipoles, evolving manifolds, and topological dynamics, are extracted synchronously and in parallel from magnetocardiograms. These multidimensional features are then used to describe the general laws of cardiac electrical activity from multiple perspectives. Simultaneously, a personalized theoretical probability propagation map is constructed using the user's historical sinus rhythm data. By comparing this map with the actual activation time map, propagation divergence features are generated, and these features are used to describe individual-specific lesions from a personalized spatiotemporal conduction dimension. The multidimensional features and propagation divergence features are then weighted and fused, and input into a classifier to match classification rules, determining the type of arrhythmia and its confidence level. This approach not only fully integrates the spatiotemporal propagation characteristics and electromagnetic physics of cardiac electrical activity, significantly improving the recognition accuracy of complex arrhythmias such as atrial fibrillation and reentrant tachycardia through a multi-level complementary feature system, but also achieves personalized adaptation based on individual historical normal data, reducing reliance on labeled data. Therefore, while ensuring high recognition accuracy, it significantly improves the transparency and clinical credibility of system decision-making.

[0010] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 One of the flowcharts of the arrhythmia identification method provided in this application is shown; Figure 2 The second schematic flowchart of the arrhythmia identification method provided in this application embodiment is shown; Figure 3 A structural block diagram of the arrhythmia recognition device provided in an embodiment of this application is shown; Figure 4 A schematic diagram of the electronic structure of a wearable device provided in an embodiment of this application is shown. Detailed Implementation

[0012] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0013] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0014] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “attached” to another element, it can be directly connected or attached to the other element, or there may be intermediate elements. Furthermore, “connected” or “attached” as used herein can include wireless connections or wireless interconnections. The term “and / or” as used herein includes all or any unit and all combinations of one or more associated listed items.

[0015] Exemplary embodiments according to this application will now be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein. It should be understood that these embodiments are provided so that the disclosure of this application is thorough and complete, and that the concept of these exemplary embodiments is fully conveyed to those skilled in the art.

[0016] This embodiment provides a method for identifying arrhythmias, such as Figure 1 As shown, the method includes: Step 101: Obtain the magnetocardiogram sequence to be tested and the historical magnetocardiogram sequences collected by the user to whom the magnetocardiogram sequence belongs under normal sinus rhythm.

[0017] The magnetocardiography (MCG) sequence comprises multiple MCG images, used to record the spatial distribution of magnetic field intensity generated by cardiac electrical activity in the chest region at a given moment. This can be acquired using an optically pumped magnetometer (OPM) sensor array positioned in the user's chest region. The storage period for historical MCG sequences can be appropriately set based on the device's memory capacity.

[0018] In practical applications, step 101, obtaining the magnetocardiogram sequence of the target heart, specifically includes the following steps: Step 101-1: Acquire the cardiac magnetic field signal collected by the optical pump magnetometer.

[0019] Step 101-2: Spatial interpolation reconstruction of the cardiac magnetic field signal is performed to generate a spatiotemporally aligned sequence of cardiac magnetic field maps to be tested.

[0020] Specifically, spatial interpolation methods such as Kriging or Radial Basis Function (RBF) interpolation can be used to improve reconstruction accuracy. Spatial interpolation reconstruction can be expressed as: ; In the formula, For the first Physical coordinates of an optically pumped magnetometer; For the optically pumped magnetometer at time The measured value; This is the sequence of magnetocardiograms of the heart to be tested.

[0021] In this embodiment, the cardiac magnetic field signals acquired from all channels are spatially interpolated and reconstructed at each time frame to generate a magnetic field distribution map on a two-dimensional regular grid. This effectively overcomes the spatial information loss problem caused by the irregular array of patch-style OPM sensors while preserving the original spatiotemporal information of the cardiac biomagnetic field, providing standardized, high-quality input data for subsequent parallel extraction of multidimensional features.

[0022] Step 102: Perform feature extraction in parallel.

[0023] Specifically, the feature extraction steps include: S1: Extract the dynamic trajectory features of the equivalent current dipole from the magnetocardiogram sequence of the target heart.

[0024] Among them, dynamic trajectory features are used to distinguish ectopic pacing from normal conduction. Dynamic trajectory features include at least one of the following: trajectory velocity, acceleration, curvature, starting point distance deviation, trajectory fractal dimension, and Hausdorff distance.

[0025] S2: Extract evolutionary manifold features from the magnetocardiogram sequence to be tested.

[0026] Among them, evolutionary manifold features are used to detect abnormal heartbeats.

[0027] S3: Extract topological dynamic features from the magnetocardiogram sequence to be tested.

[0028] Among them, topological dynamic features are used to identify heart rhythm. Topological dynamic features include at least one of the following: number of short-lived connected components, proportion of long-lived connected components, number of one-dimensional holes, average durability of one-dimensional holes, topological entropy, and dimensionality ratio.

[0029] S4: Construct a theoretical probability propagation map based on historical magnetocardiogram sequences, and construct an actual activation time map based on the magnetocardiogram sequences to be tested. By comparing the theoretical probability propagation map with the actual activation time map, the propagation divergence characteristics are determined.

[0030] Among them, the propagation divergence features include at least one of the following: Kullback-Leibler Divergence, Earth Mover's Distance, and Hausdorff Distance.

[0031] Specifically, the KL divergence can be expressed as: ; The Wasserstein distance can be expressed as: ; The Hausdorff distance can be expressed as: ; The propagation divergence index after weighted combination is: .

[0032] In the formula, PPM is the predicted probability map of the current heartbeat; The current heartbeat's actual activation time distribution; W2 is the second-order Wasserstein distance; A set of points of an ideal or standard shape; The set of points representing the actual shape; For point With point The Euclidean distance between them; sup is the supremum, i.e., the maximum value; inf is the infrem, i.e., the minimum value. The maximum and minimum distances from the standard shape to the actual shape; This represents the maximum and minimum distances from the actual shape to the standard shape.

[0033] In this embodiment, a multi-parallel architecture is employed to simultaneously extract three complementary features with different sensitivities to different arrhythmia types from the magnetocardiogram (MCG) sequence under test. This provides multi-dimensional coverage of cardiac electrical activity information from physical sources, dynamic processes, to spatial structures, overcoming the limitations of single features in characterizing complex arrhythmias and improving the accuracy of complex arrhythmia identification. Simultaneously, the activation times of the current MCG sequence under test and historical MCG sequences are calculated using the same method, and a probability propagation map is constructed based on this. By comparing the theoretical probability propagation map with the actual activation time map, the propagation divergence characteristics of the two are calculated. This allows for the establishment of a personalized normal conduction template based on the user's historical normal heartbeat data, calculating the propagation divergence index. This overcomes the differences in cardiac anatomy and conduction velocity between individuals, establishing a unique normal dynamic baseline for each user and significantly reducing false alarms caused by individual differences.

[0034] In practical application scenarios, step S1 specifically includes: inputting the sequence of cardiac magnetic field maps to be tested into a pre-trained equivalent current dipole estimation network to obtain the dipole parameters of the equivalent current dipole in each frame of the cardiac magnetic field map; and generating the magnetic dipole motion trajectory based on the continuous dipole parameters within the cardiac cycle.

[0035] The equivalent current dipole (ECD) is used to characterize cardiac electrical activity.

[0036] In this embodiment, a deep learning inversion network is used to invert and solve for the dipole parameters of the equivalent current dipole in each frame of the magnetic field map of the heart. The dipole parameters of consecutive frames of magnetic field maps within the cardiac cycle are then connected to form a magnetic dipole motion trajectory. This achieves high spatiotemporal resolution reconstruction of electrocardiographic activity without interfering with the physiological state, transforming abstract heart rhythm rules into observable physical trajectories. The dynamic trajectory features extracted through the magnetic dipole motion trajectory can intuitively reflect the spatiotemporal evolution of cardiac electrical activity, such as the origin, propagation direction, and conduction velocity of cardiac electrical excitation waves, thus solving the black-box problem of traditional AI.

[0037] It is understandable that the magnetic field generated by an equivalent magnetic dipole should conform to the magnetostatic equation, which can be expressed as: ; In the formula, For observation point The magnetic flux density at that location; The vector of the dipole moment of the equivalent current dipole; This represents the dipole position of the equivalent current dipole. Location of the observation point; is the vacuum permeability.

[0038] Furthermore, the training method for the equivalent magnetic dipole source estimation network includes: using a lightweight convolutional neural network to extract spatial features from the magnetocardiogram samples to obtain a spatial feature map; inputting the one-dimensional feature vector of the spatial feature map into an initial estimation network to output predicted dipole parameters; substituting the predicted dipole parameters into Maxwell's equations for forward modeling to obtain a theoretical magnetocardiogram, and calculating the first deviation between the theoretical magnetocardiogram and the magnetocardiogram samples; calculating the second deviation between the predicted dipole parameters and the true values ​​of the corresponding labels of the magnetocardiogram samples; calculating the third deviation of the dipole position difference between adjacent frames based on the predicted dipole parameters of adjacent frames of magnetocardiogram samples; constructing a composite loss function based on the first, second, and third deviations, and training the initial estimation network based on the composite loss function to obtain the equivalent magnetic dipole source estimation network. In this embodiment, a lightweight convolutional network is used to efficiently extract spatial features of the magnetocardiogram, balancing computational efficiency and expressive power, and supporting low-power real-time inference on edge devices. On the other hand, a composite loss function is constructed and used for model training based on forward modeling of Maxwell's equations (first bias), parameter truth supervision (second bias), and temporal continuity constraints (third bias). This not only embeds the electromagnetic physics model into the deep learning framework, ensuring that the prediction results conform to the laws of electromagnetic physics, enhancing model interpretability and single-frame estimation accuracy, and enabling the solution of differentiable inverse problems, but also solves the problem of dipole trajectory jitter between adjacent frames through smoothing constraints.

[0039] It should be noted that the initial estimation network can include a position sub-network and a moment quantum network. The position sub-network outputs dipole coordinates and dipole depth, while the moment quantum network outputs the dipole moment and orientation angle. The dipole coordinates and dipole depth can be expressed as... The dipole moment can be expressed as The direction angle can be expressed as This allows for the separate handling of the regression position task and the moment parameter task through a two-branch sub-network, enabling independent optimization of coordinates, depth, dipole moment, and orientation angle, thus better aligning with the physical structure of the dipole parameter.

[0040] Specifically, the composite loss function can be expressed as: ; In the formula, α , β , γ These are the weighting coefficients; This is a theoretical magnetic field diagram of the heart; This is a sample of a cardiac magnetograph. To predict dipole parameters; The actual value of the label; For the first Frame and the The coordinate difference vector of the frame dipole positions; For the first Frame and the The coordinate difference vector of the frame dipole positions; To calculate the Euclidean square norm.

[0041] It is worth mentioning that a physical residual loss term can be constructed based on the divergence-free magnetic field and the curl-current relationship, and then added to the aforementioned composite loss function. This loss term does not depend on the true labels, but directly embeds the core constraints of Maxwell's equations. This allows the model to still output results that conform to electromagnetic logic in real clinical scenarios where precise annotations are lacking or where labels are uncertain. This reduces the reliance on a large amount of manually labeled data, enhances the physical consistency and generalization ability of the equivalent magnetic dipole source estimation network, and significantly reduces the need for expert-annotated samples.

[0042] For example, under low-frequency (≈0Hz) conditions, the magnetic field generated by biological tissue can be used to negligible displacement current, and the magnetostatic approximation applies: For non-magnetic biological tissues (magnetization = 0), there is Therefore, we can obtain .

[0043] If the source current model is known, the magnetic field can be calculated using the Biot-Savart law: ; In the formula, Current density; The magnetic field strength; It exhibits vortex characteristics; For divergence operators; It represents the magnetic flux density; The vacuum permeability; Location of the observation point Position of the current element; For the entire volume of current distribution Integrate the points.

[0044] Let the output of the neural network be the predicted magnetic field strength. The residuals of the two physical conservation laws are defined as Gauss's Law for Magnetism and Ampère's Law Residual, respectively.

[0045] No divergence constraint is represented as: ; Curl-current coherence is expressed as: ; In the formula, The source current distribution or initial coarse inverse solution can be simultaneously estimated from a known dipole forward model or network.

[0046] The physical residual loss is: In the formula, The weights can be dynamically adjusted using an automatic weighting strategy (such as uncertainty weighting).

[0047] After being incorporated into the overall composite loss function, a data fidelity term is used for labeled data: ; At this point, the updated composite loss function is expressed as: ; In the formula, , Used to control the balance between monitoring signals and physical constraints.

[0048] In practical applications, step S2 specifically includes: performing continuous-time modeling of the magnetic field map sequence to be tested based on ordinary differential equations, and solving to obtain the continuous hidden state trajectory; calculating the manifold deviation index between the continuous hidden state trajectory and the preset normal heart rhythm benchmark manifold, as an evolutionary manifold feature.

[0049] In this embodiment, continuous-time modeling of the magnetocardiogram (MCG) sequence under test is performed using ordinary differential equations, transforming the MCG sequence into a smooth and continuous evolution of cardiac electrical activity over continuous time. This allows the obtained continuous hidden-state trajectory to more accurately reflect the intrinsic dynamic characteristics of the magnetocardiogram signal, solving the problem of traditional discrete-time models that process signals with fixed sampling intervals and are unable to accurately characterize physiological dynamics such as changes in cardiac cycle length. Moreover, inference and interpolation can be performed at any time point during the continuous-time modeling process, better adapting to different heart rates, irregular rhythms, and non-uniform sampling scenarios. Furthermore, by calculating the manifold deviation index between this trajectory and the normal heart rhythm baseline manifold, the degree of deviation of the current heartbeat from the normal physiological pattern in the high-dimensional state space is quantified, thus eliminating the need for training with a large number of abnormal samples; deviation behavior can be identified simply by setting the normal manifold.

[0050] Specifically, the ordinary differential equation can be expressed as: ; In the formula, The time derivative of the hidden state; A vector field function parameterized by a deep neural network; It is in a hidden state, and ; It is a time variable.

[0051] The manifold deviation index between this trajectory and the baseline manifold of a normal heart rhythm can be calculated using the following formula: ; In the formula, MDI is the manifold deviation index; This represents the total duration of the time series. The trajectory represents a continuous hidden state. This is the baseline manifold for normal heart rhythm.

[0052] In one embodiment, continuous-time modeling of the cardiac magnetograph sequence under test is performed based on ordinary differential equations, and the ordinary differential equations are solved. Specifically, this includes: using an attention pooling mechanism to perform weighted summation of the low-dimensional features of the cardiac magnetograph sequence under test to obtain the initial hidden state of cardiac electrical activity in the continuous-time domain; constructing a dynamic function based on the initial hidden state and its time using ordinary differential equations; and performing numerical integration on the dynamic function to evolve from the initial hidden state to obtain the continuous hidden state trajectory in continuous time.

[0053] In this embodiment, attention pooling is used to assign higher weights to key time-domain segments in the magnetocardiogram sequence to be tested, improving the focus and robustness of feature representation. Then, starting from the initial hidden state after weighted fusion, a continuous-time dynamic model is constructed using ordinary differential equations. Smooth, continuous hidden state trajectories are generated through numerical integration, realistically reflecting the intrinsic evolution of cardiac electrical excitation over time. This provides a high-fidelity, structured dynamic representation for subsequent manifold analysis, anomaly detection, and other tasks, significantly enhancing the model's sensitivity and generalization ability to subtle or early cardiac arrhythmias.

[0054] It is understandable that a low-dimensional feature of each frame of the magnetocardiogram can be obtained by encoding the high-dimensional sequence of the magnetocardiogram to be tested through an encoder.

[0055] Specifically, the key time-domain segments include at least one of the QRS complex, T band, and P band. The QRS complex represents the electrical activity generated during ventricular depolarization and excitation, i.e., the excitation wave; the T band represents the process of cardiac repolarization, i.e., the process of the ventricle returning to a resting state from depolarization and excitation, usually the process of ventricular diastole; the P band represents atrial electrical activity.

[0056] Attention pooling mechanism can be represented as: ; ; In the formula, The number of frames preceding the key segment; This is the vector of the initial hidden state, containing information about the starting point of normal activation; For the first Attention weights for frames; For the first The feature vector corresponding to the frame; These are learnable weight parameters.

[0057] For example, for each new heartbeat cycle, a one-dimensional or two-dimensional convolutional network (1D-CNN or ResNet-18 variant) is used to process each frame in the MCG field map sequence. Encode to obtain a compact feature representation Multiple frames obtained The data is composed of a time series. An attention pooling mechanism is used to determine the initial state. With the current hidden state z and time t As input, derivative As output, a dynamic function is trained based on a multilayer fully connected network (MLP). Numerical integration is performed using the Dormand-Prince method with adaptive step size in the ODE solver, and the hidden state is decoded. Mapping back to the original field diagram space generates the predicted continuous hidden state trajectory. The true trajectory is obtained by encoding the observed data. The difference between it and the continuous hidden state trajectory is calculated as a manifold deviation index.

[0058] The ODE solver can be represented as: .

[0059] In practical application scenarios, step S3 specifically includes: performing topological data analysis on the magnetic field map sequence to be tested, obtaining the continuous coherence features of each frame and generating persistent images; and performing feature encoding on the continuous persistent images to obtain topological dynamic features.

[0060] Among them, the continuous homology features include connected components and one-dimensional holes.

[0061] In this embodiment, the 0th-order (connected components) and 1st-order (one-dimensional holes) of each frame's field map are continuously cohomologically calculated through topological data analysis and visualized and quantified in the form of persistent barcodes and persistent images. This transforms the specific numerical values ​​of complex and abstract magnetic cardiomyocyte signal sequences into highly persistent two-dimensional geometric features. This not only preserves the global geometric and dynamic structural information of the magnetic cardiomyocyte signal but also effectively enhances the sensitivity to subtle arrhythmias. Furthermore, by feature encoding the continuous persistent images, physiologically interpretable topological dynamic features are obtained, providing robust, low-dimensional, and highly discriminative feature representations for heart rhythm recognition. Even without precise labels, potential lesions can be detected through topological anomalies, contributing to improved early detection accuracy and automated diagnostic capabilities for cardiac diseases such as arrhythmias.

[0062] Specifically, topological data analysis is performed on the magnetocardiogram (MCG) sequence to be tested to obtain the persistent cohomology features of each frame and generate a persistent image. This includes: identifying the persistent cohomology features of the MCG sequence to be tested within the cardiac cycle using topological data analysis tools, visualizing the persistent cohomology features, and generating a persistent barcode containing birth and death thresholds that include the persistent cohomology features; using the feature persistence calculated based on the birth and death thresholds as weights, the persistent barcode is converted into a persistent image using a Gaussian kernel density function.

[0063] Topological data analysis (TDA) tools are used to extract the inherent geometric and connectivity features of two-dimensional topological spaces, such as GUDHI, Dionysus, or scikit-tda. The birth threshold refers to the threshold at which a topological feature first appears, while the death threshold refers to the threshold at which a topological feature is merged or disappears.

[0064] For example, for each frame field map Construct a threshold Sub-level set filtering is used to capture the connectivity structure of low-value magnetic field regions. ; and / or, use a superlevel set filter to focus on the topological changes of strong magnetic field foci: .

[0065] With threshold a Changes from low to high, set Gradually growing, forming a series of nested topological spaces. Generate a persistent barcode set. Among them, the 0th order homology ( H 0) represents the number of connected components, i.e., the number of "islands"; the first-order homology ( H 1) It is a one-dimensional hole (Loops / Cycles), that is, a "ring structure".

[0066] In the persistent barcode set, each horizontal bar represents a topological feature, with the left endpoint corresponding to the birth threshold. The right endpoint corresponds to the death threshold. The length of the horizontal bar represents the persistence of this topological feature, i.e. When a localized strong magnetic field is triggered by an excitation point in a certain location, a new connected component will be formed under a specific threshold. If the excitation is short-lived, it will die quickly, forming a short-lived component.

[0067] Because persistent barcodes are non-differentiable and difficult to input directly into neural networks, they need to be converted into a fixed-dimensional vector representation. Each frame of persistent barcode is converted into a bimodal persistent image (PI), specifically: all points ( b, d Mapping to a plane, construct a two-dimensional density function: ; In the formula, the weights , , =1 or 2; [0.01, 0.05] represents the Gaussian kernel standard deviation.

[0068] Sampling on the [0,1]×[0,1] grid generates matrices corresponding to the 0th and 1st order homology, respectively. The concatenation forms a joint topological feature map of dimension matrix; flattened, it becomes a vector. The lightweight convolutional network TDANet is used to process persistent image output topological dynamic features.

[0069] Specifically, the number of short-lived connected components can be expressed as: , It is used to reflect multifocal ectopic excitation and is commonly seen in the early stages of atrial fibrillation; The proportion of long-lived connected components can be expressed as: To reflect wavefront propagation, a main island should exist for a long period of time; The number of one-dimensional holes can be expressed as: This is used to indicate the existence of a turnaround path; The average durability of a one-dimensional hole can be expressed as: This is used to reflect the stability of the turnaround; Topological entropy can be expressed as: This is used to measure the structural complexity of the field diagram, and it increases during atrial fibrillation. The dimensionality ratio can be expressed as: This is used to reflect that abnormal conduction is often accompanied by more ring structures.

[0070] In the formula, For the first Durability of individual island structural units; This is the short lifespan threshold; proportionality coefficient The average durability of all island structural units; This represents the total number of structural units. Durability of the ring-shaped structural unit; For the first Durability of each structural unit.

[0071] It is worth mentioning that, in addition to analyzing single-frame topology, persistent images can also be extracted from the T-frame field maps within each cardiac cycle, and the sequence {PI1,PI2,...,PI...} can be further analyzed. TInput LSTM or Transformer to model the temporal evolution of the topology and construct a topological evolution sequence. During atrial fibrillation, the topology oscillates violently, while normal rhythms exhibit a periodic repetitive pattern.

[0072] In practical application scenarios, step S4 involves constructing a theoretical probability propagation map and an actual activation time map. Specifically, this includes: calculating the average activation time of each spatial location in the historical magnetocardiogram sequence and the magnetocardiogram sequence to be tested; constructing a theoretical probability propagation map based on the average activation time and its distribution at each location in the historical magnetocardiogram sequence; and constructing an actual activation time map based on the average activation time at each location in the magnetocardiogram sequence to be tested.

[0073] In this embodiment, the theoretical probability propagation map and the actual activation time map are constructed using the average activation time and its distribution at each position of the magnetocardiogram sequence. This allows for a full consideration of the normal cardiac electrical activity propagation pattern within the range of physiological variations, making the activation time map more accurately reflect cardiac physiological fluctuations. This facilitates the location of abnormal regions, path distortions, or time delays in the propagation of cardiac electrical activity, and helps distinguish between physiological fluctuations and true pathological changes.

[0074] For example, during the initial wear phase or in a resting state each morning, an MCG signal lasting 5-10 minutes is automatically acquired via OPM. An R-wave detection algorithm is used to identify normal sinus rhythm heartbeats within the signal. Specific screening criteria include: RR interval variability <10%, QRS morphology consistency >95%, and absence of premature beats, conduction delays, or other abnormal events. All qualified heartbeats are aligned according to their R-wave peak values ​​to form a time-synchronized set of MCG field maps. ,in Indicates the first A normal cardiac cycle.

[0075] For each pair of adjacent frames and The pixel-level displacement vector field, representing the spatial movement direction and velocity of the magnetic field intensity mode, is calculated based on the optical flow optimization objective function. This pixel-level displacement vector field can be expressed as: The dynamics of magnetic field propagation within a cardiac cycle can be represented by a three-dimensional tensor. express .

[0076] The objective function for optical flow optimization is expressed as: ; In the formula, This is the error in the assumption of constant brightness; This is a space smoothing regularization term.

[0077] For each spatial location Define its activation time The time point at which a significant change in the magnetic field first occurs is: ; In the formula, An adaptive threshold, for example, the global mean change plus 2 standard deviations.

[0078] The activation time distribution at each position in all normal heartbeat samples from historical magnetocardiogram sequences and in the current heartbeat signal from the magnetocardiogram sequence to be tested is statistically analyzed: Calculate the average activation time plot: ; Calculate the activation time variance plot: This reflects local stability; Constructing a Propagation Probability Map (PPM) using activation time: ; In the formula, For each location At any moment The probability of being activated.

[0079] It is worth mentioning that the visualized activation time map can be configured as a heatmap animation, which can show the superposition effect of the playback probability propagation map and the actual propagation path, and highlight the delayed or early activation areas.

[0080] Step 103: The dynamic trajectory features, evolutionary manifold features, topological dynamic features, and propagation divergence features are weighted and fused to obtain a fused feature vector.

[0081] Step 104: Input the fused feature vector into the classifier to obtain the type of arrhythmia and its confidence level.

[0082] The arrhythmia identification method provided in this application extracts multidimensional features with clear physical meaning from magnetocardiograms, including the dynamic trajectory of equivalent current dipoles, evolving manifolds, and topological dynamics. These multidimensional features are then used to describe the general laws of cardiac electrical activity from multiple perspectives. Simultaneously, a personalized theoretical probability propagation map is constructed using the user's historical sinus rhythm data. By comparing this map with the actual activation time map, propagation divergence features are generated, and these features are used to describe individual-specific lesions from an individualized spatiotemporal conduction dimension. The multidimensional features and propagation divergence features are then fused with attention-gated weighted data and input into a classifier to match classification rules, determining the arrhythmia type and its confidence level. This method not only fully integrates the spatiotemporal propagation characteristics and electromagnetic physics of cardiac electrical activity, significantly improving the identification accuracy of complex arrhythmias such as atrial fibrillation and reentrant tachycardia through a multi-level complementary feature system, but also achieves personalized adaptation based on individual historical normal data, reducing reliance on labeled data. Therefore, while ensuring high identification accuracy, it significantly improves the transparency and clinical credibility of system decision-making.

[0083] For example, such as Figure 2 As shown, a weak magnetic field signal generated by the heart is acquired through an OPM sensor array, and the original signal is filtered and denoised to eliminate environmental interference and baseline drift. The sparse multi-channel signal is interpolated into a regular grid MCG field map sequence to provide standardized input for subsequent feature extraction. Then, based on electromagnetic principles such as Maxwell's equations, physical residuals are calculated to generate physically enhanced field map sequences, making the data more consistent with biophysical laws. Four parallel feature extraction scores are used to process the physically enhanced field map sequences to mine arrhythmia features from different dimensions. Multi-dimensional features such as magnetic dipole dynamic trajectory features, waveform features, topological features, and propagation dispersion index are integrated to form a high-dimensional feature vector. The features are weighted and fused using an attention mechanism through a physically consistent gating fusion layer, prioritizing the retention of reliable features that conform to physical laws and suppressing noise interference. Finally, a lightweight classifier is used as input to the fused features to output the arrhythmia type, confidence level, and localization heatmap.

[0084] In practical applications, the classifier includes an extraction unit and a classification unit. Step 104 involves inputting the fused feature vector into the classifier, which then matches the features with classification rules to determine the type of arrhythmia and its confidence level. This specifically includes the following steps: Step 104-1: The fused feature vector is fused with the temporal representation features extracted from the magnetocardiogram sequence to be tested by the feature extraction unit to form a joint feature vector.

[0085] Step 104-2: Input the joint feature vector into the classification unit for classification.

[0086] In this embodiment, the classifier's front-end extraction unit first captures the spatiotemporal evolution of high-dimensional magnetic-cardiogram signals from the original signals, which is also known as time-series representation features. The joint feature vector, obtained by fusing the time-series representation features with the fused feature vector, is input into the classifier's back-end classification unit. This classification unit maps the feature vector to specific arrhythmia categories using learned nonlinear mapping rules and outputs the arrhythmia classification results and confidence levels.

[0087] In one embodiment, the method for obtaining temporal representation features includes: the extraction unit uses the Mobile Net V3-small network to extract features from the regular grid field map sequence obtained by spatial interpolation reconstruction of the magnetic field map sequence to be tested, determines the spatial embedding vector, and uses the Tiny Transformer encoder to model the time series composed of the spatial embedding vector to determine the context-aware temporal representation features.

[0088] Understandably, the classifier's front-end and back-end consist of lightweight models such as the depthwise separable convolution MobileNet V3-small and the simplified TinyTransformer, respectively, compressing the total parameters of the classifier to less than 5MB while maintaining the model's expressive power. This extremely small model size and computational cost allow the entire classifier recognition algorithm to run entirely on resource-constrained embedded edge devices (such as MCUs) without relying on the cloud, making it applicable to wearable, long-term, continuous cardiac arrhythmia monitoring scenarios.

[0089] In one embodiment, the training method for the extraction unit specifically includes: acquiring an unlabeled training field map sequence; inputting the training field map sequence into the extraction unit; reconstructing a random mask region based on the features output by the extraction unit; and training the extraction unit based on the reconstruction loss with the goal of minimizing the reconstruction error of the random mask region by the extraction unit.

[0090] In this training field map sequence, each frame contains a random masked region. The reconstruction loss function can be expressed as: ; In the formula, M It is the set of mask coordinates.

[0091] In this embodiment, by randomly masking a portion of the unlabeled training field image sequence and reconstructing the masked content using an extraction unit, the reconstruction error is used as the optimization target for training, effectively uncovering the inherent spatiotemporal structure and contextual dependencies of the magnetocardiogram. This eliminates the need for extensive manual annotation data, significantly reducing annotation costs, while simultaneously improving the extraction unit's perception and generalization capabilities of key features of the magnetocardiogram signal. This provides more discriminative and robust feature representations for subsequent downstream heart rhythm classification tasks, especially in sports scenarios where users wear OPMs, reducing data loss due to movement.

[0092] In one embodiment, the classification unit can learn classification rules for different types of arrhythmias and different features, so as to accurately capture the unique patterns of different arrhythmias in the fused feature space, thereby significantly improving classification accuracy, especially for easily confused complex arrhythmias.

[0093] For example, classification rules may include: (1) Regarding the dynamic trajectory characteristics of the equivalent current dipole.

[0094] Normal sinus rhythm: The dipole originates in the upper right (approximately corresponding to the RA / SAN region), and propagates along the atrioventricular node → His bundle → left and right bundle branches in sequence, with a smooth trajectory and consistent direction.

[0095] Premature ventricular contractions (PVCs): The starting point is located in the distal part of the ventricle (lower left quadrant); the initial velocity is high, and the acceleration change is obvious; the trajectory is "jumping" initiation, and the Hausdorff distance is large.

[0096] Premature atrial contractions (APCs): The origin is located in other areas of the right atrium (not SAN); the early propagation direction is abnormal, but it is still conducted through the AVN in the later stage.

[0097] Atrial fibrillation (AF): Multiple dipole sources compete for space, and the trajectory restarts frequently; the fractal dimension is significantly increased (>1.6 vs. normal <1.2); acceleration fluctuates violently, and curvature peaks are dense.

[0098] Conduction block (e.g., LBBB): left-sided activation is delayed, and the trajectory shows a "U-shaped loop"; the mean velocity is reduced, but the local acceleration is increased in the right bundle branch region.

[0099] (2) Evolutionary manifold characteristics of the magnetic field map sequence to be tested.

[0100] Normal sinus rhythm: The manifold deviation index (MDI) of a heartbeat is less than or equal to the preset value.

[0101] Atrial fibrillation: Multiple ectopic excitators cause dramatic changes in trajectory, and MDI increases significantly.

[0102] Premature ventricular contractions (PVCs): The initial segment deviates significantly from the normal path, and the MDI rises rapidly in the early stage.

[0103] Conduction block: slow propagation in the later stages, trailing trajectory, and increased integral MDI.

[0104] (3) Topological dynamic characteristics of persistent images of the magnetocardiogram sequence to be tested.

[0105] Normal sinus rhythm: A single main island persists, there is no significant loop structure, the topological entropy is low, and the evolution is stable.

[0106] Premature atrial contractions (APCs): An additional short-lived island (pacing point) appears, which is briefly interrupted by the main island and then recovers.

[0107] Premature ventricular contractions (PVCs): The main island appears prematurely and is located low in the ventricular zone, often accompanied by a brief coexistence of both islands.

[0108] Atrial fibrillation (AF): Multiple short-lived islands frequently form and disappear. Significantly increased, >2.5.

[0109] Atrial flutter (AFL): The presence of one or more highly persistent ring-like structures. Abnormally prolonged.

[0110] Left bundle branch block (LBBB): The main island splits into two parts, which later merge, exhibiting a "U-shaped" topological trajectory.

[0111] (4) Targeting the characteristics of the spread of divorce.

[0112] Conduction block: The Propagation Dissemination Index (PDI) exhibits a specific spatial pattern and temporal delay, such as a persistent high value area in the left side of the heart.

[0113] Atrial fibrillation: The PDI is high and fluctuates dramatically.

[0114] Premature ventricular contractions (PDI): The PDI rises rapidly to its peak value in the early stage of the heartbeat (the beginning of the QRS wave) or the high value area of ​​the PDI is concentrated in the ventricular region (such as the apex of the heart, left / right ventricle), and the starting point deviates greatly from the sinoatrial node region of the normal baseline.

[0115] Premature atrial contractions / ectopic pacing: Early high values ​​of PDI are located in the atrial region, but not in the sinoatrial node.

[0116] Autonomic nervous system dysregulation: PDI values ​​in all regions show consistency, slight negative or positive deviations, or a slow trend of increase or decrease with physiological states (such as sleep-wake cycles).

[0117] In one embodiment, after step 104, the arrhythmia identification method further includes: based on the comparison result between the propagation divergence characteristics and the warning threshold, outputting the target arrhythmia type with a confidence level greater than the first confidence threshold.

[0118] In this embodiment, the propagation divergence feature directly corresponds to the propagation path deviation of cardiac electrical excitation. This feature can not only be used to analyze arrhythmia types, but also to trigger the system to output the target arrhythmia type by comparing the propagation divergence feature with the warning threshold. This effectively filters out false positives caused by individual physiological fluctuations, greatly enhancing the system's robustness to critical or noisy interference states and reducing the interference of invalid warnings on users.

[0119] For example, the initial stage is based on the previous Estimate the mean of a PDI sequence of subnormal heartbeats. Standard deviation Set the individualized alarm threshold to Monitor the PDI value for each hop in real time. These are marked as potential anomalies. Two consecutive exceedances or a single exceedance of more than 5 times the limit trigger a local alert and record the segment. All normal heartbeats within the most recent 24 hours can be periodically reassessed. If the new average PDI is lower than the old map's prediction error for that batch of data, the new map replaces the old one, allowing the alert threshold to change with physiological state, thus helping to reduce false alarm rates.

[0120] In one embodiment, after step 104, the arrhythmia identification method further includes: verifying the arrhythmia type and corresponding confidence level output by the classifier; if the verification result is normal, displaying the arrhythmia type with a confidence level greater than or equal to the first confidence threshold as the target arrhythmia type; if the verification result is inconsistent, generating a corresponding simulated magnetocardiogram sequence based on the inconsistent arrhythmia type, and selecting the target arrhythmia type from the inconsistent arrhythmia types for display based on the similarity between the simulated magnetocardiogram sequence and the magnetocardiogram sequence to be tested, as well as the physical rationality of the simulated magnetocardiogram sequence.

[0121] In this embodiment, considering the varying sensitivity of multi-source features to the same arrhythmia type, it is possible that too many reliable results may be identified for different features, or there may be contradictions among multiple results. After obtaining the possible arrhythmia types and their confidence levels through the classifier, the system initiates a discrepancy check. If the check result is normal, it indicates that the reliability of the classifier's output is high, and the system can output the target arrhythmia type with high confidence. Conversely, if there is a discrepancy in the check result, the system can objectively arbitrate the contradiction by using the physical laws of the simulated magnetocardiogram sequence derived from reverse engineering and the similarity to the test sequence as dual standards. This allows the system to determine from the root which arrhythmia type is more consistent with the actual data and filter out obviously unreasonable results. This effectively eliminates misjudgments caused by noise, artifacts, or distribution shifts in the model, improves the system's decision-making accuracy in complex and ambiguous cases, and reduces misjudgments caused by atypical presentations.

[0122] In one embodiment, the verification of the arrhythmia type results and corresponding confidence levels output by the classifier can be achieved in the following manner: Method 1: If the first number of different reference arrhythmia types is greater than the first number threshold, then a discrepancy is determined in the test.

[0123] Method 2: If the second number of reference arrhythmia types output for any of the dynamic trajectory features, evolutionary manifold features, topological dynamic features, and propagation divergence features is greater than the second number threshold, then a discrepancy is determined to have occurred in the test.

[0124] Method 3: If any of the dynamic trajectory characteristics, evolutionary manifold characteristics, topological dynamics characteristics, and propagation divergence characteristics do not conform to the user baseline, then a discrepancy is determined to have occurred in the test.

[0125] Method 4: If there is a logical contradiction between different reference arrhythmia types output by the classifier, then it is determined that a discrepancy has occurred in the test.

[0126] The reference arrhythmia type is the arrhythmia type with a confidence level greater than or equal to the second confidence threshold. The first quantity threshold, the second quantity threshold, the first confidence threshold, and the second confidence threshold can be reasonably set according to the system's recognition accuracy.

[0127] In one embodiment, to simplify the arbitration process, different features can be pre-numbered according to their level of confidence, and different quantity thresholds can be set for different numbering intervals. After an arbitration conflict is triggered, the arrhythmia types obtained from different features can be compared. If the number of different features for the same arrhythmia type is greater than the quantity threshold of the average number of these different features, it indicates that multiple different features point to the same identification result, and the confidence level is high.

[0128] For example, the four branches A, B, C, and D of the classifier correspond to dynamic trajectory features, evolutionary manifold features, topological dynamics features, and propagation divergence features, respectively. The reliability of branch D is greater than that of branches A, B, and C.

[0129] If branches A, B, and C output atrial fibrillation, while branch D outputs conduction block, then the determination of atrial fibrillation is more reliable.

[0130] If the output results of branches A and B are atrial fibrillation, the output result of branch C is atrial premature beats, and the output result of branch D is conduction block, then the reliability of the determination of conduction block and atrial fibrillation is higher.

[0131] If branch A outputs a result indicating ventricular origin, and branch D shows a propagation path that perfectly matches the atrial pattern, then branch D wins this arbitration.

[0132] In one embodiment, after determining the target arrhythmia type, the device system can upload the acquired raw MCG signal, current model version number and device ID, target arrhythmia type, timestamp, and geo-anonymization identifier to the cloud server via AES-256 encryption and a TLS secure channel, without uploading any other historical data, user identity information, or a complete database. The cloud-based AI system can further analyze the source location, rhythm classification, etc., of the target arrhythmia type uploaded by the device. If it is confirmed to be a pathological event, a structured label is returned, and a doctor's reminder or family member notification can be optionally triggered.

[0133] The arrhythmia identification method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, wearable device, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0134] It should be noted that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0135] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0136] Furthermore, such as Figure 3 As shown, as a specific implementation of the above-mentioned arrhythmia recognition method, this application provides an arrhythmia recognition device 300, which includes: an acquisition module 301, a feature extraction module 302, and a recognition module 303.

[0137] The acquisition module 301 is used to acquire the magnetocardiogram sequence to be tested and the historical magnetocardiogram sequences acquired by the user to which the magnetocardiogram sequence to be tested belongs under normal sinus rhythm. The feature extraction module 302 is used to perform the following feature extraction steps in parallel: S1: Extract the dynamic trajectory features of the equivalent current dipole from the magnetocardiogram sequence to be tested; S2: Extract the evolutionary manifold features from the magnetocardiogram sequence to be tested; S3: Extract the topological dynamic features from the magnetocardiogram sequence to be tested; S4: Construct a theoretical probability propagation map based on the historical magnetocardiogram sequence, and construct an actual activation time map based on the magnetocardiogram sequence to be tested. By comparing the theoretical probability propagation map and the actual activation time map, the propagation divergence features are determined. The feature fusion module 303 is used to weightedly fuse dynamic trajectory features, evolutionary manifold features, topological dynamic features and propagation divergence features to obtain a fused feature vector; The identification module 304 is used to input the fused feature vector into the classifier to obtain the type of arrhythmia and its confidence level.

[0138] Furthermore, the feature extraction module 302 is specifically used to input the sequence of the cardiac magnetic field map to be tested into a pre-trained equivalent current dipole estimation network to obtain the dipole parameters of the equivalent current dipole in each frame of the cardiac magnetic field map; generate the magnetic dipole motion trajectory based on the continuous dipole parameters within the cardiac cycle; and extract dynamic trajectory features from the motion trajectory, the dynamic trajectory features including at least one of the following: trajectory velocity, acceleration, curvature, starting point distance deviation, trajectory fractal dimension, and Hausdorff distance.

[0139] Furthermore, the feature extraction module 302 is also used to extract spatial features from the magnetocardiogram samples using a lightweight convolutional neural network to obtain a spatial feature map; input the one-dimensional feature vector of the spatial feature map into the initial estimation network and output the predicted dipole parameters through the initial estimation network; substitute the predicted dipole parameters into Maxwell's equations for forward modeling to obtain the theoretical magnetocardiogram, and calculate the first deviation between the theoretical magnetocardiogram and the magnetocardiogram samples; calculate the second deviation between the predicted dipole parameters and the true values ​​of the corresponding labels of the magnetocardiogram samples; calculate the third deviation of the dipole position difference between adjacent frames based on the predicted dipole parameters of adjacent frames of magnetocardiogram samples; construct a composite loss function based on the first, second, and third deviations, and train the initial estimation network based on the composite loss function to obtain the equivalent magnetic dipole source estimation network.

[0140] Furthermore, the feature extraction module 302 is also used to construct a physical residual loss term based on the magnetic field divergence-curl-current relationship; and to add the physical residual loss term to the composite loss function to update the electromagnetic physical constraints of the composite loss function.

[0141] Furthermore, the feature extraction module 302 is specifically used to perform continuous-time modeling of the magnetic field map sequence of the target heart based on ordinary differential equations, solve for the continuous hidden state trajectory, and calculate the manifold deviation index between the continuous hidden state trajectory and the preset normal heart rhythm reference manifold as the evolutionary manifold feature.

[0142] Furthermore, the feature extraction module 302 is specifically used to use an attention pooling mechanism to perform weighted summation of the low-dimensional features of the magnetocardiogram sequence to be tested, thereby obtaining the initial hidden state of cardiac electrical activity in the continuous time domain; based on the initial hidden state and its time, a dynamic function is constructed using ordinary differential equations; and the dynamic function is numerically integrated to evolve from the initial hidden state to obtain the continuous hidden state trajectory in the continuous time domain.

[0143] Furthermore, the feature extraction module 302 is specifically used to perform topological data analysis on the magnetic field map sequence to be tested, obtain the continuous coherence features of each frame and generate persistent images; perform feature encoding on the continuous persistent images to obtain topological dynamic features, which include at least one of the following: number of short-lived connected components, proportion of long-lived connected components, number of one-dimensional holes, average persistence of one-dimensional holes, topological entropy, and dimensionality ratio.

[0144] Furthermore, the feature extraction module 302 is specifically used to identify the persistent cohomology features of the magnetic field map sequence to be tested within the cardiac cycle through topological data analysis tools, visualize the persistent cohomology features, and generate a persistent barcode containing birth and death thresholds that include persistent cohomology features. The persistent cohomology features include connected components and one-dimensional holes. Using the feature persistence calculated based on the birth and death thresholds as weights, the persistent barcode is converted into a persistent image through a Gaussian kernel density function.

[0145] Furthermore, the feature extraction module 302 is specifically used to calculate the average activation time of each spatial location in the historical magnetocardiogram sequence and the magnetocardiogram sequence to be tested, respectively; construct a theoretical probability propagation map based on the average activation time and its distribution at each location in the historical magnetocardiogram sequence; and construct an actual activation time map based on the average activation time at each location in the magnetocardiogram sequence to be tested.

[0146] Furthermore, the arrhythmia detection device 300 also includes: The display module (not shown in the figure) is used to display the target arrhythmia type with a confidence level greater than the first confidence threshold based on the comparison results between the propagation separation characteristics and the warning threshold.

[0147] Furthermore, the classifier is a lightweight neural network classifier with a total number of parameters not exceeding 5MB.

[0148] Furthermore, the classifier includes an extraction unit and a classification unit; the recognition module 304 is specifically used to fuse the fused feature vector with the temporal representation features extracted by the feature extraction unit from the magnetocardiogram sequence to be tested, forming a joint feature vector; and input the joint feature vector into the classification unit for classification.

[0149] Furthermore, the arrhythmia detection device 300 also includes: The training module (not shown in the figure) is used to acquire an unlabeled training field map sequence, wherein each frame of the training field map sequence contains a random mask region; the training field map sequence is input into the extraction unit; the random mask region is reconstructed based on the features output by the extraction unit; the extraction unit is trained based on the reconstruction loss with the goal of minimizing the reconstruction error of the random mask region by the extraction unit.

[0150] Furthermore, the arrhythmia detection device 300 also includes: The verification module (not shown in the figure) is used to verify the arrhythmia type and corresponding confidence level output by the classifier. The display module is also used to display the arrhythmia type with a confidence level greater than or equal to the first confidence threshold as the target arrhythmia type if the test result is normal. The verification module is also used to generate a corresponding simulated magnetocardiogram sequence based on the discrepancy type of the arrhythmia if there is a discrepancy in the verification results. Based on the similarity between the simulated magnetocardiogram sequence and the magnetocardiogram sequence to be tested, as well as the physical rationality of the simulated magnetocardiogram sequence, the target arrhythmia type is selected from the discrepancy types. The display module is also used to display the target arrhythmia type selected from the divergent arrhythmia types.

[0151] Furthermore, the verification module is specifically used to determine that a discrepancy has occurred if the first number of different reference arrhythmia types is greater than a first number threshold; or, if the second number of reference arrhythmia types output for any one of dynamic trajectory features, evolutionary manifold features, topological dynamic features, and propagation divergence features is greater than a second number threshold; or, if any one of dynamic trajectory features, evolutionary manifold features, topological dynamic features, and propagation divergence features does not conform to the user baseline; or, if there is a logical contradiction between different reference arrhythmia types output by the classifier, then a discrepancy has occurred; wherein, the reference arrhythmia type is an arrhythmia type with a confidence level greater than or equal to a second confidence threshold.

[0152] Specific limitations regarding the arrhythmia recognition device can be found in the limitations of the arrhythmia recognition method described above, and will not be repeated here. Each module in the aforementioned arrhythmia recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the wearable device, or stored in software in the memory of the wearable device, so that the processor can call and execute the corresponding operations of each module.

[0153] Based on the above, Figure 1 Accordingly, embodiments of this application also provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. Figure 1 The method for identifying arrhythmias shown is illustrated.

[0154] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive) and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.

[0155] Based on the above, Figure 1 The method shown, and Figure 3 The virtual device embodiment shown is designed to achieve the above objectives, such as... Figure 4 As shown in the figure, this application embodiment also provides a wearable device, the wearable device 400 including a processor 401 and a memory 402, the memory 402 storing a program or instructions that can run on the processor 401, the program or instructions being executed by the processor 401 to implement the above-mentioned... Figure 1 The method for identifying arrhythmias shown is illustrated.

[0156] The memory 402 can be used to store software programs and various data. The memory 402 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 402 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 402 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0157] Processor 401 may include one or more processing units; optionally, processor 401 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 401.

[0158] Those skilled in the art will understand that the wearable device structure provided in this embodiment does not constitute a limitation on the wearable device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0159] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platform, or it can be implemented by hardware.

[0160] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.

[0161] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A method for identifying cardiac arrhythmias, characterized in that, The method includes: Obtain the magnetocardiogram sequence to be tested and the historical magnetocardiogram sequences collected by the user to which the magnetocardiogram sequence to be tested belongs under normal sinus rhythm; The following feature extraction steps are performed in parallel: S1: Extract the dynamic trajectory features of the equivalent current dipole from the magnetic field map sequence to be tested; S2: Extract evolutionary manifold features from the magnetocardiogram sequence to be tested; S3: Extract topological dynamic features from the magnetocardiogram sequence to be tested; S4: Construct a theoretical probability propagation map based on the historical magnetocardiogram sequence, and construct an actual activation time map based on the magnetocardiogram sequence to be tested. By comparing the theoretical probability propagation map with the actual activation time map, determine the propagation divergence characteristics. The dynamic trajectory features, evolutionary manifold features, topological dynamic features, and propagation divergence features are weighted and fused to obtain a fused feature vector; The fused feature vector is input into the classifier to obtain the type of cardiac arrhythmia and its confidence level.

2. The method according to claim 1, characterized in that, Step S1 includes: The sequence of magnetocardiograms to be tested is input into a pre-trained equivalent current dipole estimation network to obtain the dipole parameters of the equivalent current dipole in each frame of the magnetocardiogram. The magnetic dipole motion trajectory is generated based on the continuous dipole parameters within the cardiac cycle. The dynamic trajectory features are extracted from the motion trajectory, and the dynamic trajectory features include at least one of the following: trajectory velocity, acceleration, curvature, starting point distance deviation, trajectory fractal dimension, and Hausdorff distance.

3. The method according to claim 1, characterized in that, Step S2 includes: The magnetic field map sequence to be tested is modeled continuously in time based on ordinary differential equations, and the continuous hidden state trajectory is obtained by solving the problem. The manifold deviation index between the continuous hidden state trajectory and the preset normal heart rhythm baseline manifold is calculated and used as the evolutionary manifold feature.

4. The method according to claim 1, characterized in that, Step S3 includes: Topological data analysis was performed on the magnetocardiogram sequence to be tested to obtain the continuous coherence features of each frame and generate a persistent image. The continuous persistent image is feature-encoded to obtain the topological dynamic features, which include at least one of the following: number of short-lived connected components, proportion of long-lived connected components, number of one-dimensional holes, average durability of one-dimensional holes, topological entropy, and dimensionality ratio.

5. The method according to claim 1, characterized in that, In step S4, constructing the theoretical probability propagation map and the actual activation time map includes: Calculate the average activation time at each spatial location in the historical magnetocardiogram sequence and the magnetocardiogram sequence to be tested, respectively. Based on the average activation time and its distribution at each position of the historical magnetocardiogram sequence, the theoretical probability propagation map is constructed. Based on the average activation time at each position of the magnetocardiogram sequence to be tested, the actual activation time map is constructed.

6. The method according to any one of claims 1-5, characterized in that, The classifier is a lightweight neural network classifier with a total parameter count of no more than 5MB.

7. The method according to claim 6, characterized in that, The classifier includes a feature extraction unit and a classification unit; inputting the fused feature vector into the classifier includes: The fused feature vector is fused with the temporal representation features extracted by the feature extraction unit from the magnetocardiogram sequence to be tested to form a joint feature vector; The joint feature vector is input into the classification unit for classification.

8. A cardiac arrhythmia identification device, characterized in that, The apparatus includes a module for performing the method according to any one of claims 1 to 7.

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

10. A wearable device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Equivalent source reconstruction method of visual CRBBB / CLBBB heart electrical activity

    CN103654775A

  • Cardiac magnetic dipole center track parameter determination system

    CN120827381A

  • Beam branch conduction block analysis method based on magnetocardiogram

    CN121416044A

  • Ischemia identification, quantification and partial localization in MCG

    CN1471374A

  • Cardiac magnetic field diagnozer for atrial flutter and atrial fibrillation and method for identifying electric turning path of atrial flutter and atrial fibrillation

    US20040077964A1