Atrial fibrillation detection method and system

By employing an end-to-end collaborative reasoning mechanism that combines PPG signals and personal health information, the problems of untraceable reasoning links and insufficient information fusion in atrial fibrillation detection are solved, achieving high-precision and interpretable atrial fibrillation screening.

CN122478484APending Publication Date: 2026-07-31HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI UNIV OF TECH
Filing Date
2026-05-18
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies for atrial fibrillation detection suffer from problems such as untraceable reasoning links, lack of external evidence, and insufficient information fusion, which limit the accuracy and generalization of screening high-risk groups.

Method used

An end-to-end collaborative reasoning mechanism is adopted. By acquiring PPG signals and personal health information, preprocessing and quality assessment are performed to extract multidimensional heart rhythm features. Clinical reference information is retrieved from historical case databases and PPG-health information knowledge graphs to construct collaborative reasoning prompts. These prompts are then input into a large language model for end-to-end collaborative reasoning. A self-verification mechanism is combined to ensure the interpretability and reliability of the results.

Benefits of technology

It improves the generalizability of screening in high-risk groups, ensures the interpretability and reliability of output results, meets the regulatory requirements for medical auxiliary diagnosis, and achieves high-precision atrial fibrillation screening.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122478484A_ABST
    Figure CN122478484A_ABST
Patent Text Reader

Abstract

This application provides a method and system for atrial fibrillation detection, belonging to the field of intelligent medical technology. The method acquires and integrates PPG signals with personal health information at an early stage. After signal-to-noise ratio quality control and multidimensional cardiac rhythm feature extraction, clinical reference information is retrieved from a historical case database and knowledge graph. Prompt words are constructed by embedding signal-risk hierarchical reasoning rules to drive a large language model to first objectively determine the cardiac rhythm type, and then combine clinical references to complete a risk assessment, outputting an initial atrial fibrillation detection result. This application solves the problems of insufficient interpretability, lack of evidence-based support, and fragmented information fusion in existing solutions, achieving high-precision atrial fibrillation detection with a traceable and verifiable reasoning process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of intelligent medical technology, and in particular relates to a method and system for detecting atrial fibrillation. Background Technology

[0002] Atrial fibrillation (AF) is the most common arrhythmia in clinical practice, with an incidence rate that increases significantly with age. It also increases the risk of ischemic stroke and is a significant risk factor for cardiovascular death in middle-aged and elderly individuals. Early AF often presents as paroxysmal with insidious symptoms, and clinical diagnosis relies on a 12-lead electrocardiogram (ECG). However, traditional ECG equipment is difficult to use for long-term continuous home monitoring, and many paroxysmal AF events cannot be detected in time. In recent years, with the widespread use of wearable devices such as smartwatches, non-invasive AF screening based on photoplethysmography (PPG) has become a mainstream research direction. Existing technologies for the automatic detection of PPG signals can be mainly categorized into three types: traditional machine learning and deep learning solutions, direct application of general-purpose large language models, and large language models combined with personal health information calibration.

[0003] The first type of approach extracts multidimensional features from PPG signals and uses neural network models to classify heart rhythms; some studies have achieved high accuracy in offline testing. The second type of approach uses pre-trained large language models to directly analyze PPG features and clinical text to generate diagnostic conclusions for heart rhythm abnormalities. The third type of approach adopts a "signal discrimination first, numerical calibration later" architecture, where the signal discrimination module outputs preliminary results, which are then post-corrected based on individual age, underlying medical history, medication history, and other information to improve the individualized suitability of screening. However, all three types of approaches have revealed limitations to varying degrees in actual clinical deployment.

[0004] For the first type of solution, the decision-making process is essentially a nonlinear mapping of high-dimensional features. The diagnostic conclusions output by the model lack physiological basis and reasoning links that can be verified item by item by clinicians. However, the current medical device regulatory system requires that auxiliary diagnostic systems must have an understandable reasoning process. The insufficient interpretability of the black-box model will directly hinder its compliance requirements. For the second type of solution, the large language model performs medical reasoning in the absence of external clinical evidence constraints. It is prone to producing content that is fluent in expression but lacks evidence-based support. The output diagnostic conclusions lack clear evidence-based basis and a traceable logical chain, and the reliability and safety are difficult to meet the requirements of medical scenarios. For the third type of solution, its linear serial architecture of "discrimination first, calibration later" leads to a structural disconnect between signal features and personal health information in the reasoning link: the large language model locks the discrimination framework at the front end based on incomplete signal information. Subsequent calibration can only make local fine adjustments through linear offsets, which cannot fundamentally correct the inference bias caused by missing information. This severely restricts the accuracy and generalization of screening for high-risk subgroups such as the elderly and those with multiple underlying diseases. Summary of the Invention

[0005] This application provides an atrial fibrillation detection method and system that solves the problems of untraceable reasoning links, lack of external evidence, and insufficient information fusion in the prior art through an end-to-end collaborative reasoning mechanism.

[0006] In a first aspect, this application provides a method for detecting atrial fibrillation, comprising: Acquire the PPG signal and personal health information of the subject to be tested; The PPG signal is preprocessed and its quality is evaluated to output a qualified PPG signal; The pulse interval sequence is extracted from the qualified PPG signal, and multidimensional heart rhythm features are calculated based on the pulse interval sequence. Using the aforementioned multidimensional heart rhythm features and personal health information as the basis for querying, and simultaneously searching in the pre-constructed historical case database and PPG-health information knowledge graph, clinical reference information is output. After integrating the multidimensional heart rhythm features, personal health information and clinical reference information, collaborative reasoning prompts are constructed according to the preset signal-risk stratification reasoning rules. The signal-risk stratification reasoning rules include two independent reasoning processes. One reasoning process determines the heart rhythm type based solely on heart rhythm features, while the other reasoning process combines personal health information and clinical reference information to complete the risk assessment. The collaborative reasoning prompts are input into the trained large language model, end-to-end collaborative reasoning is performed, and the initial atrial fibrillation detection results, including heart rhythm type and risk assessment results, are output.

[0007] For example, the preprocessing and quality assessment of the PPG signal to output a qualified PPG signal includes: The PPG signal is subjected to wavelet denoising, baseline drift correction and outlier removal in sequence to obtain the preprocessed PPG signal; Calculate the signal-to-noise ratio of the preprocessed PPG signal; Delete the preprocessed PPG signals that are less than the preset signal-to-noise ratio threshold, and reacquire the PPG signal of the object to be detected until the signal-to-noise ratio of the preprocessed PPG signal is greater than or equal to the preset signal-to-noise ratio threshold, thus obtaining a qualified PPG signal.

[0008] For example, the step of extracting the pulse interval sequence from the qualified PPG signal and calculating multidimensional heart rhythm features based on the pulse interval sequence includes: The pulse peak is extracted from the qualified PPG signal using a sliding window algorithm; The difference between the time point corresponding to the current pulse peak and the time point corresponding to the next pulse peak is taken as the pulse interval corresponding to the current pulse peak. Multidimensional heart rhythm features are calculated based on the pulse intervals corresponding to all pulse peaks; among them, the multidimensional heart rhythm features include time domain features, frequency domain features, and nonlinear features.

[0009] For example, the step of using the multidimensional heart rhythm features and the personal health information as query criteria, while simultaneously searching in a pre-built historical case database and the PPG-health information knowledge graph to output clinical reference information, includes: The multidimensional heart rhythm features and personal health information are encoded separately and then concatenated into a fusion query vector; In the historical case database, the cosine similarity between the fusion query vector and the embedding vector of each historical case is calculated, and a target number of cases that meet the similarity threshold are selected as case reference information. In the PPG-health information knowledge graph, the matching degree between the fusion query vector and each node is calculated by a comprehensive matching function, and a target number of nodes are selected as risk evidence-based information. The case reference information and risk-based evidence information are integrated into clinical reference information.

[0010] For example, the step of integrating the multidimensional heart rhythm features, personal health information, and clinical reference information, and constructing collaborative reasoning prompts according to preset signal-risk stratification reasoning rules, includes: Use a template engine to build prompt word templates; The multidimensional heart rhythm characteristics, personal health information, and clinical reference information are respectively filled into the corresponding fields of the prompt word template; The signal-risk hierarchical reasoning rule is embedded in the prompt word template to generate collaborative reasoning prompt words; the total length of the collaborative reasoning prompt words is controlled within a preset percentage of the large language model context window.

[0011] Exemplarily, it is characterized by further comprising: The initial atrial fibrillation detection results are integrated with the collaborative inference prompts to generate self-verification prompts. The self-verification prompt is input again into the pre-trained large language model to verify the consistency between the initial atrial fibrillation detection result and the input information, the degree of adherence of the reasoning process to the hierarchical reasoning rules, and the standardization of the output format, and outputs the corrected atrial fibrillation detection result.

[0012] Secondly, this application provides an atrial fibrillation detection system, comprising: The acquisition module is used to acquire the PPG signal and personal health information of the object to be tested; The signal processing module is used to preprocess and evaluate the quality of the PPG signal in order to output a qualified PPG signal. A multidimensional feature extraction module is used to extract the pulse interval sequence from the qualified PPG signal and calculate multidimensional heart rhythm features based on the pulse interval sequence. The retrieval module is used to query based on the multidimensional heart rhythm features and the personal health information, and simultaneously search in the pre-constructed historical case database and PPG-health information knowledge graph to output clinical reference information; The prompt word construction module is used to integrate the multidimensional heart rhythm features, personal health information and clinical reference information, and construct collaborative reasoning prompt words according to the preset signal-risk stratification reasoning rules. The signal-risk stratification reasoning rules include two independent reasoning processes. One reasoning process is based solely on heart rhythm features to determine the heart rhythm type, and the other reasoning process combines personal health information and clinical reference information to complete the risk assessment. The atrial fibrillation result detection module is used to input the collaborative reasoning prompts into the trained large language model, perform end-to-end collaborative reasoning, and output the initial atrial fibrillation detection result containing the heart rhythm type and risk assessment result.

[0013] Thirdly, this application provides a computer device including a processor and a memory; wherein the processor executes a computer program stored in the memory to implement the steps of the atrial fibrillation detection method described in the first aspect.

[0014] Fourthly, this application provides a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, it implements the steps of the atrial fibrillation detection method described in the first aspect.

[0015] Fifthly, this application provides a computer program product, including computer-executable instructions or a computer program, which, when executed by a processor, implement the steps of the atrial fibrillation detection method described in the first aspect.

[0016] Beneficial effects: By acquiring the PPG signal and personal health information of the subjects to be tested, and encoding and concatenating the two types of data into a fusion query vector at an early stage, this overcomes the limitation of traditional schemes that separate signal features and personal health information in the inference chain. This early fusion mechanism ensures that the large language model has a complete input context before performing logical reasoning, avoiding discrimination path locking and inference bias caused by missing information, thereby significantly improving the screening generalization in high-risk subgroups such as the elderly and those with multiple underlying diseases.

[0017] When preprocessing and quality assessing PPG signals to output qualified PPG signals, a dynamic quality control mechanism based on signal-to-noise ratio can automatically eliminate low-quality signal segments caused by wrist movement or loosening of the wristband. This technique eliminates the interference of invalid noise data on subsequent pulse interval extraction, ensuring the physiological fidelity of the input features from the source, rather than relying on a later model to forcibly fit the noise.

[0018] When extracting pulse interval sequences from qualified PPG signals and calculating multidimensional rhythm features, multidimensional features such as time domain, frequency domain, and nonlinear features are used to construct rhythm representations. These features directly correspond to the recognized diagnostic criteria for atrial fibrillation in clinical electrophysiology (such as rhythm variability), providing clear, objective, and calculable indicators for the large language model. This enables the signal layer discrimination in subsequent hierarchical inference to have quantitative numerical support, solving the problem that the diagnostic conclusions of traditional black-box models lack physiological basis.

[0019] Using multidimensional cardiac rhythm features and personal health information as query criteria, and simultaneously retrieving data from a pre-built historical case database and the PPG-health information knowledge graph to output clinical reference information, this external knowledge enhancement mechanism compensates for the vulnerability of large language models to illusions in the closed medical domain. Furthermore, the retrieval provides highly matched real-world case evidence and evidence-based medical knowledge for each inference dynamic, ensuring that the model's output no longer relies on parametric memory but is based on a traceable and verifiable chain of clinical evidence, meeting the stringent regulatory requirements for the reliability and safety of conclusions in medical auxiliary diagnosis.

[0020] When constructing collaborative reasoning prompts, a pre-defined signal-risk hierarchical reasoning rule is forcibly introduced, constraining the reasoning process into a two-tiered progressive process: first, objectively determining the heart rhythm type based on heart rhythm characteristics, and then completing a risk assessment by combining personal health information and clinical reference information. This decoupled reasoning eliminates confusion and pre-existing biases in reasoning logic, ensuring that the implicit thought chain generated by the large language model strictly follows clinical diagnostic logic. Simultaneously, the total length of the reasoning prompts is controlled within a preset percentage of the large language model's context window, ensuring the focus of the attention mechanism and guaranteeing the stability of complex reasoning within long contexts.

[0021] By inputting collaborative reasoning prompts into a pre-trained large language model to perform end-to-end collaborative reasoning, this application achieves high-precision atrial fibrillation screening without requiring model fine-tuning for specific hospitals or equipment. It achieves this solely through prompt engineering and retrieval enhancement. Furthermore, by introducing a self-verification mechanism, the large language model performs consistency checks and logical verification on the initial atrial fibrillation detection results, automatically correcting unfounded or rule-violating content. This "generation-verification" closed-loop architecture significantly suppresses the randomness of content generation, ensuring that the final output heart rate type and risk assessment results are not only formatted and parsable but also clinically interpretable and factually consistent, truly achieving a trustworthy and traceable decision-making process. Attached Figure Description

[0022] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A schematic flowchart of an atrial fibrillation detection method provided in an embodiment of this application; Figure 2 This is a schematic diagram of an atrial fibrillation detection system provided in an embodiment of this application. Detailed Implementation

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

[0025] Example 1 like Figure 1 As shown, this embodiment provides a method for detecting atrial fibrillation, including: Step 101: Obtain the PPG signal and personal health information of the subject to be tested.

[0026] In this step, the raw PPG signal of the subject to be tested is collected through a wearable health device (smartwatch / bracelet), with a sampling rate set to ≥100Hz and a single continuous acquisition duration of ≥30 seconds; at the same time, the personal health information of the subject to be tested is acquired, including: ① basic physiological parameters: age, gender, BMI index; ② medical history: history of hypertension, history of diabetes, history of cardiovascular disease; ③ medication history: history of use of anticoagulants, beta-blockers, and antiarrhythmic drugs.

[0027] Step 102: Preprocess and evaluate the quality of the PPG signal to output a qualified PPG signal.

[0028] In this step, the original PPG signal is preprocessed sequentially as follows to obtain the preprocessed PPG signal: (1) Wavelet denoising: The original PPG signal is decomposed and reconstructed using the 5th order db4 wavelet transform to suppress high-frequency random noise.

[0029] (2) Baseline drift correction: The third-order polynomial fitting method is used to eliminate low-frequency baseline drift caused by breathing and body position changes.

[0030] (3) Outlier removal: Based on the physiological threshold of the adult cardiac cycle, outlier sampling points that exceed the range of 300ms-2000ms are removed.

[0031] It should be noted that the above signal processing procedure is a well-known technique in the field of electrocardiogram signal analysis, and will not be elaborated here.

[0032] It is important to note in this step that the preprocessing process must fully preserve the effective components of the PPG signal related to cardiac activity, and excessive filtering should be avoided to prevent the loss of pulse peak characteristics.

[0033] The signal-to-noise ratio (SNR) of the preprocessed PPG signal is calculated using the following formula: .

[0034] Among them, P sig P represents the effective component power related to cardiac activity in the preprocessed PPG signal; noi This represents the power of the noise component in the preprocessed PPG signal.

[0035] A signal qualification threshold is set, which is a preset signal-to-noise ratio threshold. If the preprocessed PPG signal reaches the qualification threshold, it is determined to be a qualified PPG signal. If the preprocessed PPG signal does not reach the qualification threshold, the current detection process is terminated directly, and a prompt "Signal quality is poor, please keep your wrist still and remeasure after wearing it properly" is output. That is, the PPG signal of the object to be tested is reacquired until the signal-to-noise ratio of the preprocessed PPG signal is greater than or equal to the preset signal-to-noise ratio threshold, thus obtaining a qualified PPG signal and avoiding invalid data from interfering with subsequent analysis.

[0036] Step 103: Extract the pulse interval sequence from the qualified PPG signal, and calculate multidimensional heart rhythm features based on the pulse interval sequence.

[0037] A sliding window algorithm is used to detect the pulse peak of qualified PPG signals, avoiding detection bias under different individuals and signal quality conditions with a fixed threshold. The calculation formula for the sliding window algorithm is as follows: .

[0038] in, Let be the pulse peak detection threshold for the i-th sliding detection window; Let $\frac{i}{i}$ be the average amplitude of the qualified PPG signal within the i-th sliding detection window, and set the sliding window size to 1 second (corresponding to 100 sampling points). The peak detection sensitivity parameter is empirically set to 0.3; Let be the standard deviation of the amplitude of the qualified PPG signal within the i-th sliding detection window.

[0039] After retaining pulse peaks in the qualified PPG signal that are greater than or equal to the pulse peak detection threshold, the peaks are subjected to secondary verification to remove spurious peaks with an interval of less than 300ms between adjacent peaks, finally obtaining the time point sequence t of adjacent pulse peaks. N (N is the total number of pulse peaks obtained), and the pulse interval (PPI) sequence is calculated using the following formula: PPI n =t n+1 -t n .

[0040] Among them, PPI n The nth pulse interval represents the time interval between two consecutive heartbeats, measured in milliseconds; t n t represents the time point corresponding to the nth pulse peak; n+1 This is the time point corresponding to the (n+1)th pulse peak.

[0041] Three types of features strongly correlated with the occurrence of atrial fibrillation were extracted from the PPI sequence. All feature calculation results were rounded to three decimal places. Specifically, these include: (1) Temporal characteristics: including the average value of the pulse interval sequence and / or standard deviation of pulse interval sequence and / or coefficient of variation of pulse interval sequences The proportion of the total sample size where the root mean square of the continuous difference (RMSSD) and / or the difference between adjacent pulse intervals is greater than 50 ms (NN50) NN50 : ; ; ; ; ; Among them, PPI n+1 NN50 represents the (n+1)th pulse interval; NN50 represents the number of samples where the difference between adjacent pulse intervals is greater than 50ms.

[0042] (2) Frequency domain characteristics: The power spectral density of the PPI sequence was estimated by Welch method, and the power in the low frequency band of 0.04Hz-0.15Hz, the power in the high frequency band of 0.15Hz-0.4Hz, and the power ratio of low frequency to high frequency were calculated respectively.

[0043] (3) Nonlinear characteristics: Shannon entropy, calculated as follows: .

[0044] Where SE is the Shannon entropy of the pulse interval sequence, representing the complexity of the heart rhythm sequence; M is the total number of bins after normalization of the pulse interval sequence; p i' denoted as , which represents the probability of a sample falling into the i'th bin after the pulse interval sequence has been normalized.

[0045] In this step, all features need to be encoded to ensure a consistent format so that they can be directly parsed by a large language model.

[0046] Step 104: Using the multidimensional heart rhythm features and the personal health information as the query basis, and simultaneously searching in the pre-constructed historical case database and PPG-health information knowledge graph, clinical reference information is output.

[0047] In this step, the multidimensional heart rhythm features and personal health information are encoded separately and then concatenated into a fusion query vector.

[0048] Furthermore, the obtained multidimensional heart rhythm features are converted into a 768-dimensional feature vector F. ppg The acquired personal health information is encoded into a 256-dimensional feature vector H. user The concatenation yields a 1024-dimensional fused query vector q. ret : .

[0049] Here, concat(·) is a vector concatenation function used to merge two feature vectors into a fusion vector; the fusion query vector must contain both PPG multidimensional heart rhythm features and personal health information to achieve early deep fusion of the two types of information and avoid the separation of subsequent reasoning logic.

[0050] In the historical case database, the cosine similarity between the fusion query vector and the embedding vector of each historical case is calculated, and a target number of cases that meet the similarity threshold are selected as case reference information.

[0051] Data on desensitized cases diagnosed by 12-lead electrocardiogram were collected, covering two categories: atrial fibrillation and normal sinus rhythm. The sample size for each disease was ≥500 cases. Each case included standard PPG signals, personal health information, expert diagnostic conclusions, and evidence-based diagnostic basis. After the case data was coded, it was converted into a 1024-dimensional fixed-dimensional feature vector through a medical pre-trained embedding model, stored in the Milvus vector database, and an IVF_FLAT retrieval index was established to complete the construction of the historical case database.

[0052] Furthermore, the fused query vector q ret Mapped to a uniform-dimensional embedding vector E(q) ret In a pre-built historical case vector database, the matching degree between the vector and the historical case embedding vector is calculated using cosine similarity. The formula for calculating cosine similarity is: .

[0053] in, The embedding vector E(q) of the query vector is fused to the object to be detected. ret The embedding vector of the i''th case in the historical case database Cosine similarity; The value range is [-1, 1], and the higher the value, the stronger the matching degree; |·| represents the magnitude of the vector.

[0054] Select a target number of similar cases (e.g., 3) with a similarity of ≥0.85, extract the corresponding expert diagnostic conclusions and diagnostic basis, and use them as case retrieval enhancement information; if no cases meet the similarity threshold, mark them as "no matching similar cases for reference".

[0055] In the PPG-health information knowledge graph, the matching degree between the fusion query vector and each node is calculated by a comprehensive matching function, and a target number of nodes are selected as risk evidence-based information.

[0056] Based on the clinical guidelines "Atrial Fibrillation: Current Understanding and Treatment Recommendations" and historical case data, a graph-structured knowledge graph is constructed. The formal definition of the graph is: G=(V,E,W G ).

[0057] Where G represents the overall graph structure of the PPG-health information knowledge graph; V is the set of nodes in the knowledge graph; V is centered on PPG signal feature nodes and associated with three types of sub-nodes: ① basic physiological parameter nodes (age, gender, and BMI index); ② disease history nodes (hypertension, diabetes, and cardiovascular diseases); ③ medication history nodes (anticoagulants, beta-blockers, and antiarrhythmic drugs); E is the set of directed edges representing clinical relationships between nodes in the knowledge graph; W GThis is a set of relational weights between nodes in the knowledge graph. The weights are determined based on the evidence-based levels of clinical guidelines and the results of logistic regression analysis of real cases.

[0058] Graph Attention Network (GAT) is used to train and learn the node feature vectors. The update formula for node features is: .

[0059] in, This is the updated feature vector of the target node p in the (k+1)th layer of the graph attention network. The LeakyReLU activation function is used to introduce a nonlinear transformation; N(p) is the set of neighboring nodes of the target node p; w pq W represents the attention weight between the target node p and its neighbor node q, characterizing the degree of influence of the neighbor node q on the target node p. L The learnable weight matrix for the graph attention network is used for linear transformation of node features; Let q be the original feature vector of a neighbor node q in the k-th layer graph attention network.

[0060] After multi-layer graph propagation training, a final 1024-dimensional feature vector for each node is obtained, constructing a knowledge graph node vector library that can be used for retrieval and matching. The node relationship weights in the knowledge graph must conform to clinical evidence-based medicine conclusions, and no clinically unfounded associations should be set.

[0061] Furthermore, the matching degree between the fused query vector and the pre-constructed knowledge graph node vector is calculated using a comprehensive matching function. The formula for the comprehensive matching function is: .

[0062] in, For fusion query vector q ret The degree of matching with the k-th node in the knowledge graph; The cosine similarity of the PPG features between the object to be detected and the k-th node. The weights; The Euclidean distance matching degree between the target object and the demographic information of the k-th node. The weights; The matching degree between the subject to be tested and the disease risk Jaccard coefficient of the i-th node. The weight.

[0063] Select multiple (e.g., 3) relevant nodes that best match the risk, and extract the corresponding evidence-based knowledge on atrial fibrillation risk as enhanced information for risk retrieval.

[0064] In this step, the search results must be based on a pre-constructed knowledge graph and must not generate content without clinical basis. The PPG-health information knowledge graph uses PPG signal feature nodes as central nodes, and associates them with basic physiological parameter nodes, disease history nodes, and medication history nodes. The relationship weights between nodes are determined based on the evidence-based levels of clinical guidelines and the results of regression analysis of real cases.

[0065] The case reference information and risk-based evidence information are integrated into clinical reference information, that is, the case retrieval enhancement information and risk retrieval enhancement information are integrated to obtain the final clinical reference information.

[0066] Step 105: After integrating the multidimensional heart rhythm features, personal health information and clinical reference information, construct collaborative reasoning prompts according to the preset signal-risk stratification reasoning rules; the signal-risk stratification reasoning rules include two independent reasoning processes, one of which determines the heart rhythm type based solely on heart rhythm features, and the other of which combines personal health information and clinical reference information to complete the risk assessment.

[0067] In this step, the core of the pre-set signal-risk stratification reasoning rule is: (1) The forced reasoning process is divided into two independent and irreversible levels: the first level is the objective discrimination of the signal level, which is based solely on the PPG rhythm characteristics to determine the rhythm type, clearly explaining the corresponding characteristic numerical basis, and not introducing personal health information and reference information; the second level is the comprehensive assessment of the risk level, which combines personal health information and clinical reference information to complete the atrial fibrillation risk assessment, clearly explaining the corresponding risk basis.

[0068] (2) Only three mutually exclusive results can be output for heart rhythm type: normal sinus rhythm, atrial fibrillation and indeterminate result.

[0069] (3) All judgments must be based on corresponding input information as the sole basis, and it is strictly forbidden to output unsupported content.

[0070] (4) The output format is strictly limited to JSON format that can be directly parsed.

[0071] The Jinja2 template engine is used to construct the prompt word template. Multidimensional heart rhythm features, personal health information and clinical reference information are filled into the corresponding fields of the prompt word template. At the same time, the above-mentioned hierarchical reasoning rules are embedded to generate the final collaborative reasoning prompt words.

[0072] In this step, the total length of the prompt words should be controlled within 70% of the context window of the large language model to avoid context overflow.

[0073] Step 106: Input the collaborative reasoning prompts into the trained large language model, perform end-to-end collaborative reasoning, and output the initial atrial fibrillation detection results including heart rhythm type and risk assessment results.

[0074] In this step, collaborative reasoning prompts are input into the trained large language model. The large language model, according to the preset hierarchical reasoning rules, first completes the heart rhythm type discrimination at the signal layer, then completes the comprehensive risk assessment, and outputs the initial screening results in JSON format.

[0075] The large language model used in this step does not require parameter fine-tuning for the atrial fibrillation screening task. It only completes task adaptation through prompt word engineering and retrieval enhancement. Optional models include, but are not limited to, Qwen-Plus, DeepSeek-R1, and Qwen-14B-Chat.

[0076] For example, after obtaining the initial atrial fibrillation detection result, the initial atrial fibrillation detection result is integrated with the collaborative reasoning prompt word to generate a self-verification prompt word.

[0077] The self-verification prompt is input again into the pre-trained large language model to verify the consistency between the initial atrial fibrillation detection result and the input information, the degree of adherence of the reasoning process to the hierarchical reasoning rules, and the standardization of the output format, and outputs the corrected atrial fibrillation detection result.

[0078] Furthermore, the initial atrial fibrillation detection results are integrated with the original collaborative inference prompts to construct self-verification prompts, guiding the large language model to review three core aspects: ① whether the initial results are completely consistent with the input information and whether there is any unfounded content; ② whether the inference process strictly follows the hierarchical inference rules; ③ whether the output format is standard JSON format.

[0079] Input the self-checking prompts back into the same pre-trained large language model to complete consistency review and logical verification, and output the corrected screening results.

[0080] If the output of the large language model cannot be parsed into standard JSON format, it will automatically retry 1-2 times. If it still fails, it will output "The result of this test is uncertain. It is recommended that you go to the hospital to complete a 12-lead electrocardiogram to clarify the diagnosis".

[0081] The final output of atrial fibrillation test results must include five core components: heart rhythm type identification results, atrial fibrillation risk probability, signal layer identification criteria, risk layer assessment criteria, and personalized clinical recommendations.

[0082] In summary, this embodiment provides a method for atrial fibrillation detection. By acquiring PPG signals and personal health information and encoding and splicing them into a fusion query vector at an early stage, it breaks the limitation of the separation between signal and health information reasoning in traditional schemes. This ensures that the large language model has complete context before reasoning, avoids inference bias caused by missing information, and improves the generalization of high-risk subgroup screening.

[0083] Dynamic quality control based on signal-to-noise ratio is performed on PPG signals to output qualified PPG signals, and low-quality data is automatically eliminated to ensure the physiological fidelity of input features from the source and prevent invalid noise from interfering with subsequent analysis.

[0084] By extracting pulse interval sequences from qualified PPG signals and calculating time-domain, frequency-domain, and nonlinear multidimensional cardiac rhythm features, quantitative indicators that conform to clinical electrophysiological consensus are provided for cardiac rhythm discrimination, enabling hierarchical reasoning to have objective numerical basis and solving the problem of insufficient interpretability of black box models.

[0085] Based on multidimensional cardiac rhythm characteristics and personal health information, the system simultaneously searches historical case databases and knowledge graphs, outputting clinical reference information containing real case evidence and evidence-based medical knowledge. This compensates for the lack of evidence-based support in large language models, providing a traceable and verifiable external evidence chain for reasoning and meeting the regulatory requirements for medical auxiliary diagnosis.

[0086] When constructing collaborative reasoning prompts, signal-risk hierarchical reasoning rules are embedded, which force the objective determination of heart rhythm type based on heart rhythm characteristics first, and then complete the risk assessment by combining health information and clinical references, so that the reasoning process strictly follows the logic of clinical diagnosis; at the same time, the length of the prompts is controlled within a preset percentage of the context window to ensure the stability of complex reasoning in long contexts.

[0087] By using prompt word engineering and retrieval enhancement, the large language model can be driven to complete end-to-end collaborative reasoning without the need for model fine-tuning. With the help of a self-verification mechanism, the initial test results are checked for consistency and logic, and unfounded content is automatically corrected, so that the decision-making process is traceable and verifiable, and the output results are both clinically interpretable and factually consistent.

[0088] Example 2 Based on the same inventive concept as Embodiment 1, this embodiment also provides an atrial fibrillation detection system. Since the principle of this system in solving the problem is similar to that of the aforementioned atrial fibrillation detection method, the implementation of this system can refer to the implementation of the atrial fibrillation detection method.

[0089] like Figure 2 As shown, the atrial fibrillation detection system includes: The acquisition module 10 is used to acquire the PPG signal and personal health information of the object to be detected.

[0090] The signal processing module 20 is used to preprocess and evaluate the quality of the PPG signal in order to output a qualified PPG signal. The multidimensional feature extraction module 30 is used to extract the pulse interval sequence from the qualified PPG signal and calculate multidimensional heart rhythm features based on the pulse interval sequence.

[0091] The retrieval module 40 is used to search based on the multidimensional heart rhythm features and the personal health information, and simultaneously search in the pre-constructed historical case database and PPG-health information knowledge graph to output clinical reference information.

[0092] The prompt word construction module 50 is used to integrate the multidimensional heart rhythm features, personal health information and clinical reference information, and construct collaborative reasoning prompt words according to the preset signal-risk stratification reasoning rules. The signal-risk stratification reasoning rules include two independent reasoning processes. One reasoning process is based solely on heart rhythm features to determine the heart rhythm type, and the other reasoning process combines personal health information and clinical reference information to complete the risk assessment.

[0093] The atrial fibrillation result detection module 60 is used to input the collaborative reasoning prompts into the trained large language model, perform end-to-end collaborative reasoning, and output an initial atrial fibrillation detection result containing heart rhythm type and risk assessment results.

[0094] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in Example 1, which will not be repeated here.

[0095] Example 3 This embodiment provides a computer device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the steps of the atrial fibrillation detection method described in Embodiment 1.

[0096] For a more detailed explanation of the above method, please refer to the relevant content disclosed in Example 1, which will not be repeated here.

[0097] Example 4 This embodiment provides a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, it implements the steps of the atrial fibrillation detection method described in Embodiment 1.

[0098] For a more detailed explanation of the above method, please refer to the relevant content disclosed in Example 1, which will not be repeated here.

[0099] Example 5 This embodiment provides a computer program product, including computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, they implement the steps of the atrial fibrillation detection method described in Embodiment 1.

[0100] For a more detailed explanation of the above method, please refer to the relevant content disclosed in Example 1, which will not be repeated here.

[0101] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems, devices, storage media, and computer program products disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.

[0102] Those skilled in the art will clearly understand that the techniques in the embodiments of this application can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application or some parts of the embodiments.

[0103] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0104] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0105] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0106] It should be noted that 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. The collection, use and processing of the relevant data must comply with relevant regulations.

[0107] The present application has been described in detail above with reference to specific embodiments and exemplary examples; however, these descriptions should not be construed as limiting the present application. Those skilled in the art will understand that various equivalent substitutions, modifications, or improvements can be made to the technical solutions and implementation methods of the present application without departing from the spirit and scope of the present application, and all such modifications and improvements fall within the scope of the present application. The scope of protection of the present application is determined by the appended claims.

Claims

1. A method of atrial fibrillation detection, characterized by, include: Acquire the PPG signal and personal health information of the subject to be tested; The PPG signal is preprocessed and its quality is evaluated to output a qualified PPG signal; The pulse interval sequence is extracted from the qualified PPG signal, and multidimensional heart rhythm features are calculated based on the pulse interval sequence. Using the aforementioned multidimensional heart rhythm features and personal health information as the basis for querying, and simultaneously searching in the pre-constructed historical case database and PPG-health information knowledge graph, clinical reference information is output. After integrating the multidimensional heart rhythm features, personal health information and clinical reference information, collaborative reasoning prompts are constructed according to the preset signal-risk stratification reasoning rules. The signal-risk stratification reasoning rules include two independent reasoning processes. One reasoning process determines the heart rhythm type based solely on heart rhythm features, while the other reasoning process combines personal health information and clinical reference information to complete the risk assessment. The collaborative reasoning prompts are input into the trained large language model, end-to-end collaborative reasoning is performed, and the initial atrial fibrillation detection results, including heart rhythm type and risk assessment results, are output.

2. The method of atrial fibrillation detection according to claim 1, characterized in that, The preprocessing and quality assessment of the PPG signal to output a qualified PPG signal includes: The PPG signal is subjected to wavelet denoising, baseline drift correction and outlier removal in sequence to obtain the preprocessed PPG signal; Calculate the signal-to-noise ratio of the preprocessed PPG signal; Delete the preprocessed PPG signals that are less than the preset signal-to-noise ratio threshold, and reacquire the PPG signal of the object to be detected until the signal-to-noise ratio of the preprocessed PPG signal is greater than or equal to the preset signal-to-noise ratio threshold, thus obtaining a qualified PPG signal.

3. The method of atrial fibrillation detection according to claim 1, characterized in that, The step of extracting the pulse interval sequence from the qualified PPG signal and calculating multidimensional heart rhythm features based on the pulse interval sequence includes: The pulse peak is extracted from the qualified PPG signal using a sliding window algorithm; The difference between the time point corresponding to the current pulse peak and the time point corresponding to the next pulse peak is taken as the pulse interval corresponding to the current pulse peak. Multidimensional heart rhythm features are calculated based on the pulse intervals corresponding to all pulse peaks; among them, the multidimensional heart rhythm features include time domain features, frequency domain features, and nonlinear features.

4. The method of atrial fibrillation detection according to claim 1, characterized in that, The system uses the multidimensional cardiac rhythm features and personal health information as query criteria, and simultaneously searches the pre-constructed historical case database and PPG-health information knowledge graph to output clinical reference information, including: The multidimensional heart rhythm features and personal health information are encoded separately and then concatenated into a fusion query vector; In the historical case database, the cosine similarity between the fusion query vector and the embedding vector of each historical case is calculated, and a target number of cases that meet the similarity threshold are selected as case reference information. In the PPG-health information knowledge graph, the matching degree between the fusion query vector and each node is calculated by a comprehensive matching function, and a target number of nodes are selected as risk evidence-based information. The case reference information and risk-based evidence information are integrated into clinical reference information.

5. The method of atrial fibrillation detection according to claim 1, characterized in that, The process involves integrating the multidimensional cardiac rhythm features, personal health information, and clinical reference information, and then constructing collaborative reasoning prompts according to preset signal-risk stratification reasoning rules, including: Use a template engine to build prompt word templates; The multidimensional heart rhythm characteristics, personal health information, and clinical reference information are respectively filled into the corresponding fields of the prompt word template; The signal-risk hierarchical reasoning rule is embedded in the prompt word template to generate collaborative reasoning prompt words; the total length of the collaborative reasoning prompt words is controlled within a preset percentage of the large language model context window.

6. The method of atrial fibrillation detection according to claim 1, characterized in that, Also includes: The initial atrial fibrillation detection results are integrated with the collaborative inference prompts to generate self-verification prompts. The self-verification prompt is input again into the pre-trained large language model to verify the consistency between the initial atrial fibrillation detection result and the input information, the degree of adherence of the reasoning process to the hierarchical reasoning rules, and the standardization of the output format, and outputs the corrected atrial fibrillation detection result.

7. A system for atrial fibrillation detection, characterized by include: The acquisition module is used to acquire the PPG signal and personal health information of the object to be tested; The signal processing module is used to preprocess and evaluate the quality of the PPG signal in order to output a qualified PPG signal. A multidimensional feature extraction module is used to extract the pulse interval sequence from the qualified PPG signal and calculate multidimensional heart rhythm features based on the pulse interval sequence. The retrieval module is used to query based on the multidimensional heart rhythm features and the personal health information, and simultaneously search in the pre-constructed historical case database and PPG-health information knowledge graph to output clinical reference information; The prompt word construction module is used to integrate the multidimensional heart rhythm features, personal health information and clinical reference information, and construct collaborative reasoning prompt words according to the preset signal-risk stratification reasoning rules. The signal-risk stratification reasoning rules include two independent reasoning processes. One reasoning process is based solely on heart rhythm features to determine the heart rhythm type, and the other reasoning process combines personal health information and clinical reference information to complete the risk assessment. The atrial fibrillation result detection module is used to input the collaborative reasoning prompts into the trained large language model, perform end-to-end collaborative reasoning, and output the initial atrial fibrillation detection result containing the heart rhythm type and risk assessment result.

8. A computer device, characterized in that, It includes a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the steps of the atrial fibrillation detection method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, Used to store computer programs; when executed by a processor, the computer programs implement the steps of the atrial fibrillation detection method according to any one of claims 1-6.

10. A computer program product, characterized in that, It includes computer-executable instructions or computer programs, which, when executed by a processor, implement the steps of the atrial fibrillation detection method according to any one of claims 1-6.