A headache cause analysis method based on a knowledge graph and deep learning
By constructing a global knowledge graph and using topology pruning techniques for graph neural networks, the problem of causal path deduction in headache etiology analysis was solved, improving feature extraction capabilities and analysis accuracy, and reducing bias in causal link deduction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 河北中石油中心医院
- Filing Date
- 2026-05-05
- Publication Date
- 2026-07-03
Smart Images

Figure CN122334428A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for analyzing the causes of headaches based on knowledge graphs and deep learning, belonging to the field of knowledge graph and deep learning technology. Background Technology
[0002] Currently, in graph database construction and information retrieval systems for complex unstructured data, establishing semantic relationships between entities in complex domains (such as medical entities) using knowledge graphs is a widely recognized technical approach. This method extracts entity information from multi-source heterogeneous data (such as medical records) and constructs semantic networks, providing structured support for deep learning inference engines. Taking the pathological process of headache as a typical application scenario, it exhibits a dynamic evolution pattern of prodromal, aura, headache, and recovery stages. This pathological mechanism involves a cascade reaction of neurochemical neurotransmitter release and anatomical structural variations. When this type of data, which has strong temporal constraints and complex logical networks, is mapped to graph structure data using knowledge graphs for deep learning computation, it places stringent demands on the representation capabilities of the underlying data structure. In existing technologies, optimizing feature extraction from a data-driven perspective, in addition to improving the front-end acquisition hardware and entity mapping relationships, optimizing the back-end control methods and inference models is also crucial for improving analysis accuracy. For example, Chinese invention patent CN115719625B discloses a diabetes prediction method and system that integrates knowledge graph and deep learning. It uses the TransR model to construct a knowledge graph and combines self-attention mechanism and convolutional neural network to extract patient feature matrix, thereby realizing classification prediction based on knowledge and data dual-drive.
[0003] When processing multimodal heterogeneous data such as chief complaint texts, temporal signs, and imaging features, existing deep learning and graph data processing methods typically maintain constant edge weights in static semantic networks. This design, lacking the ability to represent the time decay features during symptom evolution, leads to semantic aliasing during the feature fusion stage, reducing the learning performance and retrieval efficiency of graph neural network models under complex graph structured features. When the input sequence contains a long time span, increasing the depth of the neural network often results in excessive smoothing during graph convolution aggregation. Due to the lack of an effective causal path isolation mechanism, the model cannot distinguish between concurrent symptoms and causal cascade symptoms, causing core pathogenic feature nodes to be submerged by frequently occurring common features. Although the industry has attempted to use attention mechanisms to allocate weights, such statistical paths, without the constraints of medical ontology logic, are prone to producing unprofessional logical outputs. In situations where chief complaint descriptions are chaotic and symptoms are highly intertwined, existing methods cannot guarantee the certainty of inference conclusions and risk deriving non-true causal chains.
[0004] Therefore, constructing a computational architecture that can integrate temporal fuzzy probability and ontological logic constraints to solve the problem of causal path deduction in the dynamic evolution process of heterogeneous multimodal sequences has become the technical problem to be solved by this invention. Summary of the Invention
[0005] To address the problems in the background art, the technical solution of the present invention is as follows: A method for analyzing the causes of headaches based on knowledge graphs and deep learning includes the following steps:
[0006] Step 101: Obtain unstructured text vectors representing the initial state of the object to be analyzed and multidimensional physical quantity time series sequences representing the evolution of physiological state. Perform modal alignment processing on the unstructured text vectors and multidimensional physical quantity time series sequences to extract multidimensional feature tensors of related heterogeneous data features.
[0007] Step 102: Construct a global knowledge graph containing domain logical evolution constraints and store it in a graph database; extract the directed causal constraint weights between pathological entities from the global knowledge graph; and establish unidirectional logical triggering paths between nodes.
[0008] Step 103: Extract a dynamic local topological subgraph describing the causal evolution trajectory based on the multidimensional feature tensor, and generate a dynamic edge feature matrix representing the node connection relationship in the dynamic local topological subgraph. The dynamic edge feature matrix is used to quantify the correlation strength of each symptom node in the time window dimension.
[0009] Step 104: Construct a logical topology gating matrix with the same dimension as the dynamic local topology subgraph based on the directed causal constraint weights. When a unidirectional logical triggering path exists, set the element at the corresponding position in the logical topology gating matrix to 1. When a unidirectional logical triggering path does not exist, set the element at the corresponding position in the logical topology gating matrix to 0.
[0010] Step 105: Calculate the nonlinear Hadamard product of the dynamic edge feature matrix and the logical topology gate matrix to obtain the path response intensity matrix;
[0011] Step 106: Input the path response intensity matrix into the graph neural network. The path response intensity matrix performs topological pruning on the feature aggregation process of neighboring nodes, blocking feature transmission paths that deviate from the directed causal constraint weights. This allows the update process of the dynamic embedding vector to converge to the preset medical knowledge manifold space, and outputs a risk probability index representing the distribution of causes.
[0012] Preferably, step 101 includes the following sub-steps: Step 1011, converting discrete timestamps in the time series of multidimensional physical quantities into continuous time feature vectors using a Gaussian probability density function; Step 1012, mapping fuzzy time descriptions in unstructured text vectors into feature representations with spatiotemporal overlap probability distributions; Step 1013, correcting the dynamic edge feature matrix by calculating the integral overlap between the source activation node and the target activation node in the time window dimension, thereby reducing the topology deduction deviation caused by data acquisition fluctuations.
[0013] Preferably, the construction of the global knowledge graph in step 102 includes: extracting logical causal relationships from domain literature, establishing a set of entity nodes consisting of pathogenic factor entities, physiological response entities, and category entities; establishing semantic associations and nonlinear evolution weights between nodes in the entity node set, forming a set of knowledge triples with directed edge constraints; and storing the set of knowledge triples in a graph database to form a global knowledge graph that serves as a reasoning bias.
[0014] Preferably, step 103, generating the dynamic edge feature matrix, includes: identifying the temporal order of appearance of each feature entity in the multidimensional feature tensor, establishing the mapping relationship between the feature entities and the corresponding nodes in the global knowledge graph; assigning time decay weights to the edges in the dynamic local topological subgraph according to the temporal order, and calculating the association strength between each node at the current time segment.
[0015] Preferably, the graph neural network adopts a two-layer collaborative architecture, and step 106 includes the following sub-steps: Step 1061, extracting the global topological embedding of the global knowledge graph through the first layer network as the prior feature bias of the node; Step 1062, utilizing the second layer network in the path response intensity matrix Under hard constraints, targeted feature aggregation is implemented, and nodes are updated using the following formula. Hidden state : ,in, For nodes The set of neighboring nodes, The weight matrix is a learnable matrix. It is a non-linear activation function. Represents the target node The hidden state feature vector, Represents the path response intensity matrix In the middle, from the source node Point to target node The nonlinear response coefficient of the unidirectional path; Step 1063, extract the node feature vector output by the second layer network as a risk probability index.
[0016] Preferably, the targeted feature aggregation includes: real-time monitoring of the variance change of feature vectors in the graph neural network to assess the smoothness during feature processing; when the feature similarity between adjacent network layers exceeds a preset threshold, adjusting the sparsity of the path response intensity matrix to enhance the discriminability of the topology and suppress the over-smoothing effect.
[0017] Preferably, step 101, which performs modal alignment processing, includes: extracting semantic embedding vectors describing the state of the object; normalizing the physiological data to generate physiological feature vectors; and using a cross-attention mechanism to calculate the association weights between the semantic embedding vectors and the physiological feature vectors to generate an alignment sequence representing the multimodal fusion features.
[0018] Preferably, step 106 outputs the risk probability index, which includes: mapping the node feature vectors output by the graph neural network to a preset classification feature space; calculating the Euclidean distance between the node feature vectors and each candidate center; and outputting a probability ranking representing the likelihood of different causes based on the Euclidean distance.
[0019] Preferably, it also includes: establishing a matching degree verification rule between the risk probability index and the historical known modes; when the confidence level of the risk probability index is lower than the preset level, extracting the specific node that causes the logical conflict in the multidimensional feature tensor, and outputting a data supplementation trigger instruction for the specific node.
[0020] Preferably, it also includes: monitoring the state changes of the path response intensity matrix at different time steps, recording the path blocking frequency that does not conform to the directed causal constraint weights; dynamically adjusting the edge weight parameters stored in the global knowledge graph according to the path blocking frequency, so as to realize the topological co-evolution of domain logic and real-time feature sequences.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] 1. In the analysis of headache etiology, by applying ontology-guided asymmetric topological pruning gating in the graph convolution computation stage, the unidirectional causal constraints of the medical ontology are mapped to physical filtering criteria of the graph connection structure. This restricts the feature aggregation process to be within a manifold space that conforms to pathological logic, blocks the ineffective energy transmission between irrelevant symptom nodes, and overcomes the oversmoothing problem that deep graph neural networks are prone to when dealing with fully connected complex associations from the underlying computer science level of graph neural networks. This ensures the accuracy of high-dimensional feature vectors in distinguishing subtle pathogenic factors and improves the feature extraction capability, information retrieval efficiency and generalization performance of deep learning models on heterogeneous graph data.
[0023] 2. The discrete timestamps in unstructured clinical sequences are transformed into continuous representations using Gaussian probability density functions, and the ambiguous time descriptions in the chief complaint text are mapped into feature vectors with spatiotemporal overlap probability distributions. The dynamic edge feature matrix is corrected by calculating the integral overlap between the source activation node and the target activation node in the time window dimension, thereby achieving semantic alignment of asynchronous multimodal data in the dynamic graph topology and reducing the deviation in causal evolution link inference caused by data acquisition noise. Attached Figure Description
[0024] Figure 1 This is a flowchart illustrating the overall process of etiological analysis of ontological pruning and dynamic topology involved in this invention.
[0025] Figure 2 This invention relates to a logic diagram for result confidence assessment and knowledge graph feedback optimization. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0027] A method for analyzing the causes of headaches based on knowledge graphs and deep learning includes the following steps:
[0028] Step 101: Obtain unstructured text vectors representing the initial state of the object to be analyzed and multidimensional physical quantity time series sequences representing the evolution of physiological state. Perform modal alignment processing on the unstructured text vectors and multidimensional physical quantity time series sequences to extract multidimensional feature tensors of related heterogeneous data features.
[0029] Step 102: Construct a global knowledge graph containing domain logical evolution constraints and store it in a graph database; extract the directed causal constraint weights between pathological entities from the global knowledge graph; and establish unidirectional logical triggering paths between nodes.
[0030] Step 103: Extract a dynamic local topological subgraph describing the causal evolution trajectory based on the multidimensional feature tensor, and generate a dynamic edge feature matrix representing the node connection relationship in the dynamic local topological subgraph. The dynamic edge feature matrix is used to quantify the correlation strength of each symptom node in the time window dimension.
[0031] Step 104: Construct a logical topology gating matrix with the same dimension as the dynamic local topology subgraph based on the directed causal constraint weights. When a unidirectional logical triggering path exists, set the element at the corresponding position in the logical topology gating matrix to 1. When a unidirectional logical triggering path does not exist, set the element at the corresponding position in the logical topology gating matrix to 0.
[0032] Step 105: Calculate the nonlinear Hadamard product of the dynamic edge feature matrix and the logical topology gate matrix to obtain the path response intensity matrix;
[0033] Step 106: Input the path response intensity matrix into the graph neural network. The path response intensity matrix performs topological pruning on the feature aggregation process of neighboring nodes, blocking feature transmission paths that deviate from the directed causal constraint weights. This allows the update process of the dynamic embedding vector to converge to the preset medical knowledge manifold space, and outputs a risk probability index representing the distribution of causes.
[0034] Preferably, step 101 includes the following sub-steps: Step 1011, converting discrete timestamps in the time series of multidimensional physical quantities into continuous time feature vectors using a Gaussian probability density function; Step 1012, mapping fuzzy time descriptions in unstructured text vectors into feature representations with spatiotemporal overlap probability distributions; Step 1013, correcting the dynamic edge feature matrix by calculating the integral overlap between the source activation node and the target activation node in the time window dimension, thereby reducing the topology deduction deviation caused by data acquisition fluctuations.
[0035] Preferably, the construction of the global knowledge graph in step 102 includes: extracting logical causal relationships from domain literature, establishing a set of entity nodes consisting of pathogenic factor entities, physiological response entities, and category entities; establishing semantic associations and nonlinear evolution weights between nodes in the entity node set, forming a set of knowledge triples with directed edge constraints; and storing the set of knowledge triples in a graph database to form a global knowledge graph that serves as a reasoning bias.
[0036] Preferably, step 103, generating the dynamic edge feature matrix, includes: identifying the temporal order of appearance of each feature entity in the multidimensional feature tensor, establishing the mapping relationship between the feature entities and the corresponding nodes in the global knowledge graph; assigning time decay weights to the edges in the dynamic local topological subgraph according to the temporal order, and calculating the association strength between each node at the current time segment.
[0037] Preferably, the graph neural network adopts a two-layer collaborative architecture, and step 106 includes the following sub-steps: Step 1061, extracting the global topological embedding of the global knowledge graph through the first layer network as the prior feature bias of the node; Step 1062, utilizing the second layer network in the path response intensity matrix Under hard constraints, targeted feature aggregation is implemented, and nodes are updated using the following formula. Hidden state : ,in, For nodes The set of neighboring nodes, The weight matrix is a learnable matrix. It is a non-linear activation function. Represents the target node The hidden state feature vector, Represents the path response intensity matrix In the middle, from the source node Point to target node The nonlinear response coefficient of the unidirectional path; Step 1063, extract the node feature vector output by the second layer network as a risk probability index.
[0038] Preferably, the targeted feature aggregation includes: real-time monitoring of the variance change of feature vectors in the graph neural network to assess the smoothness during feature processing; when the feature similarity between adjacent network layers exceeds a preset threshold, adjusting the sparsity of the path response intensity matrix to enhance the discriminability of the topology and suppress the over-smoothing effect.
[0039] Preferably, step 101, which performs modal alignment processing, includes: extracting semantic embedding vectors describing the state of the object; normalizing the physiological data to generate physiological feature vectors; and using a cross-attention mechanism to calculate the association weights between the semantic embedding vectors and the physiological feature vectors to generate an alignment sequence representing the multimodal fusion features.
[0040] Preferably, step 106 outputs the risk probability index, which includes: mapping the node feature vectors output by the graph neural network to a preset classification feature space; calculating the Euclidean distance between the node feature vectors and each candidate center; and outputting a probability ranking representing the likelihood of different causes based on the Euclidean distance.
[0041] Preferably, it also includes: establishing a matching degree verification rule between the risk probability index and the historical known modes; when the confidence level of the risk probability index is lower than the preset level, extracting the specific node that causes the logical conflict in the multidimensional feature tensor, and outputting a data supplementation trigger instruction for the specific node.
[0042] Preferably, it also includes: monitoring the state changes of the path response intensity matrix at different time steps, recording the path blocking frequency that does not conform to the directed causal constraint weights; dynamically adjusting the edge weight parameters stored in the global knowledge graph according to the path blocking frequency, so as to realize the topological co-evolution of domain logic and real-time feature sequences.
[0043] Example 1: When the system faces the inference scenario of a high-dimensional heterogeneous graph network containing ambiguous temporal descriptions of the chief complaint and long-span physiological multidimensional physical quantity time series, the conventional static graph neural network architecture, due to the lack of time decay operators in the connection weights between nodes, causes semantic aliasing of the vector representations of concurrent nodes and causal cascade nodes when calculating large-scale neighbor node feature aggregation, resulting in excessive smoothing in the graph topology space. To solve this topology inference bias, the system restricts the temporal multimodal fusion process to the topological asymmetric pruning process within the structured prior constraint domain. By mapping the unidirectional causal triggering direction of the medical ontology to the logic gate switch inside the graph convolution operator, the false positive causal chain in the fully connected topology is blocked before the feature aggregation operation is executed.
[0044] The system utilizes the Gaussian probability density function to transform fuzzy temporal descriptions in unstructured text vectors and discrete timestamps in multidimensional physical quantity time-series sequences into continuous temporal feature vectors. It then uses integral operations to calculate the integral overlap between source and target activation nodes along the time window dimension, generating a dynamic edge feature matrix. This dynamic edge feature matrix quantifies the correlation strength of each symptom node along the time window dimension. Simultaneously, it extracts directed causal constraint weights from the global knowledge graph stored in the graph database, constructing a logical topology gating matrix consistent with the dimension of the dynamic local topological subgraph. The system sets the corresponding element in the logical topology gating matrix to 1 when a unidirectional logical trigger path exists, and 0 otherwise. The system calculates the nonlinear Hadamard product of the dynamic edge feature matrix and the logical topology gating matrix to obtain the path response intensity matrix. This collaborative computing mechanism relies on a pre-defined prior ontology structure to filter out pseudo-correlation topological noise caused by data acquisition fluctuations.
[0045] A two-layer graph convolutional neural network receives the path response intensity matrix and performs targeted topology pruning on the feature aggregation process of neighboring nodes. The two-layer graph convolutional neural network then uses the path response intensity matrix to perform feature aggregation operations in the second layer, updating the hidden states of the nodes. The specific formula for calculating the hidden states is as follows: ,in, This is the updated hidden state feature vector of the target node. The initial hidden state feature vector of the source node. For the corresponding node in the path response intensity matrix With nodes Weights of nonlinear coefficients for unidirectional paths. The weight matrix is the learnable weight matrix for the second layer network. For the target node The set of neighboring nodes determined based on logical topology. It is a non-linear activation function; based on feature aggregation operation, the feature transmission path in the original dynamic feature topology that deviates from the causal constraint manifold is blocked, and the dynamic embedding vector sequence converges into the preset knowledge manifold space. The fully connected classification layer maps the dynamic embedding vector sequence to output a risk probability index matrix representing the triggering nodes of different pathological mechanisms.
[0046] To address the inherent inter-layer smoothing convergence physical phenomenon in the aforementioned network feature aggregation operations, the system synchronously executes an online topology sparsity calibration procedure based on cosine distance metric during the hidden state update cycle. The system extracts the hidden layer feature vector sequence generated by two adjacent iterations, substitutes it into the cosine similarity operator to output the inter-layer similarity scalar, monitors this similarity scalar, and when it exceeds the preset smoothing threshold in memory, the system triggers a forced sparsity interrupt. The system reads the path response intensity matrix of the current time step, executes the absolute value sorting algorithm, extracts the matrix element addresses whose values are in the top 10% interval of ascending sort, and sends an overwrite instruction via the data bus to forcibly modify the matrix elements in the extracted addresses to a constant 0, thereby physically blocking the transmission link of low-weight redundant features and maintaining the asymmetric discriminability of the high-dimensional topology.
[0047] In the differential diagnosis of migraine and tension headache, the system extracts patient complaint text features containing the nature and triggers of pain, and simultaneously acquires physiological parameter streams collected by wearable medical sensors, but not limited to frontalis muscle electromyography signals with a sampling frequency of 100Hz. Using a cross-attention mechanism, the system spatiotemporally aligns the pain burst points in the complaint text with the vasodilation peaks in the physiological sequence. Subsequently, based on the pathological causal chain in the global knowledge graph, the system uses a nonlinear Adama product to calculate the logical topology gating matrix, setting the weights of path edges that deviate from the causal relationship to 0. This topology pruning process blocks the interference of irrelevant features, forces the embedding update of the graph neural network to converge to a specific medical knowledge manifold space, and finally outputs a high-confidence risk probability index.
[0048] The system establishes a unified time benchmark and integrates patients' subjective pain perception with objective physiological indicators into a joint probability representation vector. The specific logic for extracting heterogeneous features is as follows: First, for vascular headaches, the throbbing pain points in the patient's complaint text are nonlinearly superimposed with sequences of vascular pulsation and blood pressure fluctuations to extract physical evolution features. Second, for headache auras, unstructured semantics such as visual flashes are mapped to heart rate variability sequences to quantify stress disorder in the autonomic nervous system. Finally, for precipitating interference, the delay and intensity of the pathological response are assessed by calculating the mutual information between the text record and the physiological sequence. The resulting composite technical parameters have clear clinical semantics and physiological meanings, effectively supporting subsequent causal path reasoning in the global knowledge graph.
[0049] During the targeted feature aggregation process, the system extracts the full node feature matrix of adjacent layers and obtains the centroid feature vector through global mean pooling. and And calculate the cosine similarity. To capture the rank collapse phenomenon in the feature space, the system simultaneously calculates the singular value distribution entropy of the feature matrix and applies a weighted correction to the similarity index to accurately quantify the lack of feature recognition. Simultaneously, a similarity threshold is set. Set as an adaptive variable, the variance of the feature vector is monitored by the system in real time. The system dynamically adjusts its rate of change; when the variance decreases and the smoothness increases, the system automatically triggers the sparsification of the path response intensity matrix through the closed-loop control loop, ensuring that the topology pruning is always within the optimal triggering range of the medical knowledge manifold, thereby suppressing the negative impact of excessive smoothing on recognition accuracy.
[0050] Example 2: When the system faces the input of multimodal headache data containing different time drift interferences, the open-source MIMIC-IV intensive care multimodal dataset is selected as the test basis. Gaussian white noise is applied to the extracted physiological time series, and time drift variables following a uniform distribution are injected into the timestamp of the chief complaint text to simulate the temporal semantic acquisition distortion in the emergency environment. At the same time, hash mapping is used to de-identify all patient identity attribute features. The setting of the time window width faces a technical trade-off between capturing the integrity of time dependencies and preventing false positive causal chain computational overload. The system determines the integration time window based on the variance distribution of headache attack frequency. When the frequency variance distribution of the input feature sequence shows a wide frequency feature, the time window value for calculating the integral overlap tends to the lower limit to avoid feature aliasing in non-associative time sections. In the chronic migraine evolution test, the time window width is set to 24h and the signal sampling frequency is set to 100Hz to form the test data benchmark.
[0051] The experiment included a control group, a partially missing control group, and an experimental group. The control group used a static fully connected graph convolutional network architecture. The partially missing control group used a dynamic edge feature matrix to update edge weights, without introducing a logical topological gating matrix. The experimental group used a two-layer graph convolutional neural network with a received path response intensity matrix. Three temporal perturbation levels were set: low-level, medium-level, and high-level drift, corresponding to maximum time drift values of 2h, 6h, and 12h, respectively. The system fed multimodal data containing perturbations into the network for feature aggregation. Under the low-level drift perturbation, the matching accuracy of the risk probability index matrix output by the control group to the actual pathological nodes was 85.2%, while the matching accuracy of the partially missing control group was 88%. The experimental group achieved a matching accuracy of 94.1% at 0.5%. As the time drift disturbance level increased to a moderate level, topological inference bias caused by data acquisition fluctuations became apparent. The matching accuracy of the control group decreased to 71.4% due to over-smoothing, and the matching accuracy of the partially missing control group decreased to 79.6%. The experimental group relied on the discrete binary hard pruning mechanism provided by the logical topological gating matrix to block associations deviating from the medical prior ontology, maintaining a matching accuracy of 92.5%. At a high drift disturbance level, semantic aliasing occurred at the system input. At this point, the matching accuracy of the control group decreased to 54.3%, and the matching accuracy of the partially missing control group decreased to 62.1%. The path response intensity matrix calculated by the experimental group... Filtering non-causal edge features, the matching accuracy was recorded at 87.8%. Multi-dimensional comparative data confirmed that the collaborative operation of dynamic temporal overlap and the nonlinear Adama product of the logical topology gating matrix isolated the propagation of erroneous topological logic in heterogeneous noise environments. The extended integration time window test showed the nonlinear inflection point law of graph neural network performance. When the time window width increased from 24h to 36h, the matching accuracy of the experimental group decreased from 94.1% to 93.5%. When the time window width exceeded the 48h threshold, the accuracy index dropped to 81.2%. This nonlinear degradation trend is consistent with the smooth physical law of graph topology under ultra-large receptive field, confirming that the 24h integration time window constitutes the preferred working interval of this scheme. This directional topology pruning mechanism overcomes the feature aliasing technical problem of heterogeneous medical data under temporal offset by quantifying the collaborative mapping of temporal correlation and ontological constraints.
[0052] Before conducting gradient-based temporal perturbation level tests, this embodiment evaluates system performance using the following procedures: First, based on the PyTorch framework, 5000 sets of medical records with two or more confirmed cases are extracted from the MIMIC-IV dataset as test samples; second, the matching accuracy is quantified using the Top-1 classification accuracy metric in statistics, and its calculation formula is as follows: ,in, This refers to the number of samples where the causal node with the highest probability value in the system's output risk probability index matches the actual pathological node. This represents the total number of test samples at the current disturbance level. The matching accuracy is used to quantify the system's performance in etiological analysis. Finally, to eliminate random noise, each experimental group underwent 10 independent Monte Carlo simulations, and the arithmetic mean was taken as the final matching accuracy to ensure the statistical significance of the comparative data.
[0053] Example 3: When the system encounters a high-dimensional heterogeneous clinical data log input scenario containing unstructured complaint text records and multidimensional physical quantity time series, the system receives the underlying clinical log tensor de-identified by hash mapping, parses the temporal semantic tags in the unstructured complaint text records, extracts the historical time anchors of the target objects, sets a sliding sampling time window, calculates the width of the sliding sampling time window by multiplying the maximum time span of the historical time anchors by the preset sampling frequency, calls the Gaussian probability density function to convert the discrete timestamps in the multidimensional physical quantity time series into continuous time distribution curves, calculates the overlap area between the time distribution curves corresponding to the source activation node and the target activation node within the time interval based on the sliding sampling time window, and assigns the value of the overlap area to the elements in the dynamic edge feature matrix. ,in, For the source node To the target node Dynamic correlation weights between them.
[0054] To construct the structured prior constraint boundary applied to the dynamic relevance weights, the system accesses the global knowledge graph stored in the graph database and extracts nodes from the global knowledge graph. With nodes The ontological association attributes between them trigger the system's logical judgment operator when the global knowledge graph records nodes. To node When a unidirectional directed path exists, the system sets the logical topology gating matrix elements. The value is 1; when there is no unidirectional directed edge path, the system sets the logical topology gating matrix elements to 1. The value of is 0, where, To characterize the binary switching parameters of the prior hard constraints, the system reads the generated... and Calculate the nonlinear Adama product and output the path response intensity coefficient. The specific mathematical formula is as follows: ,in, These are the edge weight coefficients of the graph after constraint processing.
[0055] The system inputs the path response intensity matrix, which contains the path response intensity coefficients of all nodes, into the hidden layer of the two-layer graph convolutional neural network. The two-layer graph convolutional neural network relies on logical topology gating matrix elements with a value of 0 to block the propagation channels of features without logical correlation, and at the same time relies on logical topology gating matrix elements with a value of 1 combined with dynamic correlation weights to amplify the effective node feature flow. The system traverses all graph nodes to complete the network iterative update. The fully connected classification layer calculates and outputs the risk probability index matrix representing the state distribution of the target node based on the converged hidden layer topology. The system relies on the mathematical mapping of the aforementioned overlapping area integral and binarization gating to eliminate the spatiotemporal misalignment introduced by irregular sampling data and maintain the network convergence trajectory when processing heterogeneous feature sequences.
[0056] The system uses a Gaussian probability density function and Make the nodes continuous on the time axis and calculate the sliding sampling window. The area of intersection within the boundary is used to obtain the integral overlap, which characterizes the spatiotemporal co-occurrence intensity. The system will Real-time assignment to elements of the dynamic edge feature matrix The traditional 0 / 1 discrete weights are modified into continuous probability intensity values. Based on the smoothness characteristics of the integral operator, this modification mechanism not only maintains the logical continuity of weight evolution, but also effectively eliminates isolated pseudo-activation points on the time axis, ensuring that only nodes with significant spatiotemporal overlap probabilities are enhanced, thereby providing physically interpretable input parameters for subsequent nonlinear Adama product operations.
[0057] Regarding the calculation of time decay weight and association strength, this embodiment follows the procedure: based on the occurrence time of the feature entity. Compared with the current analysis section Time difference Calculate weights using an exponential function , A preset distribution smoothing factor is used to ensure that symptoms closer to the current observation point contribute more to causal inference; subsequently, the system applies this weight to the integral overlap. Combined, through formula Calculate the dynamic association strength; the physical significance of this procedure is to limit the association score to be subject to the dual constraints of spatiotemporal overlap probability and physical attenuation degree; and to provide a quantitative basis with temporal tension for subsequent topology pruning.
[0058] In the context of headache etiology analysis, physiological data are collected synchronously through clinical monitoring equipment or sensors, covering the following heterogeneous parameter dimensions: vascular dynamics, including transcranial Doppler acquisition of middle cerebral artery blood flow velocity and pulsatility index, and photoplethysmography (PPG) extraction of vasomotor amplitude, to reflect the contraction or relaxation state of vascular headaches; neuroelectrophysiology, including multi-channel electroencephalogram (EEG) signals monitoring the evolution of headache aura, and electromyography amplitudes of the frontalis and neck muscles for tension headaches; autonomic nervous function, including heart rate variability and skin conductance levels, to quantify stress responses to pain irritation; and environmental and behavioral coupling, including synchronously recorded blood oxygen saturation, respiratory rate, and body movement frequency. The physical quantities of the above dimensions are sampled using a unified time reference to form a high-dimensional feature tensor, and then nonlinear normalization is used to eliminate dimensional differences, generating physiological feature vectors for alignment.
[0059] Regarding the conversion of Euclidean distance into a risk probability index, this embodiment executes the following logic: The system calculates the set of Euclidean distances between the node feature vectors and each candidate causal center. in Given the preset total number of candidate etiology categories, the normalization mapping operator is used to calculate the number of... Risk probability of individual etiology , ,in This is a preset distribution smoothing factor used to adjust the sensitivity of the probability distribution; this negative exponential mapping ensures the Euclidean distance. A smaller center corresponds to a higher risk probability value. And the output sequence satisfies Interval distribution, and satisfying The system is subject to mathematical constraints; it sorts probabilities from high to low and outputs a risk probability index matrix representing the distribution of causes; this procedure realizes the transformation from geometric distance measurement to pathological diagnostic probability, ensuring the certainty and scientific nature of the conclusion output.
[0060] Example 4: When the system faces deployment conditions involving heterogeneous deviations in the underlying physical quantity acquisition platforms across institutions, the system initiates an offline calibration data filling procedure before receiving real-time data; it reads the de-identified historical clinical logs of the target institution and extracts pathogenic factor entities and physiological response entities from past cases; it counts the co-occurrence frequency of the source activation node to the target activation node across historical time segments, and calculates the transition probability of the unidirectional logical triggering path based on the co-occurrence frequency; the system assigns the transition probability as a directed causal constraint weight and writes it into the graph database, completing the structured filling of the global knowledge graph. The procedure provides prior bias for the extraction of the logical topology gating matrix. The system sets the base; triggers a pre-deployment calibration procedure to set time boundaries; extracts a multi-dimensional physical quantity time series as the calibration baseline, calls the Fast Fourier Transform algorithm to analyze the spectral distribution, and extracts the center frequency; calculates the safe sampling rate based on the Nyquist criterion and the center frequency, and sets the reciprocal of the safe sampling rate as the reference resolution of the time distribution curve; the system reads unstructured text vectors and extracts the maximum time span of historical time anchors; calculates the ratio of the maximum time span to the reference resolution, outputs the corrected sliding sampling time window width, and the numerical parameters output by the procedure are the numerical boundaries for the generation of the dynamic edge feature matrix.
[0061] Example 5: In an operating environment with cross-regional deployment and inconsistent clock deviations among the data acquisition terminals, the system extracts a baseline data stream for a specific disease as a calibration target, extracts the time difference sequence between symptom trigger time and log generation time, and calculates the mathematical expectation of this sequence through maximum likelihood estimation. and variance The system will calculate Assign the value to the variance parameter in the mapping function and set the boundary of the integration window to . ,in, The mean of the time deviation distribution. To determine the corresponding time deviation standard deviation, the system performs a hard truncation operation on data points that fall outside the integration window, assigning the corresponding overlap area value to 0. This procedure limits the physical dispersion range of the kernel density through deterministic probabilistic statistical boundaries, thereby restricting the propagation range of noise signals in the dynamic edge feature matrix.
[0062] When the system initializes the weight matrix of the second layer of the graph convolutional neural network At this time, the system reads the set of ontology relation weights from the global knowledge graph from the graph database as initialization constraints, calculates the initial transition amount based on the unidirectional logical triggering path of each causal edge, processes the initial transition amount using the orthogonal initialization operator and generates the initial values of the matrix elements, and sets the calculation error threshold for each convolution iteration step. It is 0.001, where, To characterize the convergence criterion constant for numerical approximation accuracy, the system calculates the hidden state feature vectors generated in two consecutive iterations. The L2 norm of the difference is compared with the calculation error threshold. When the L2 norm is less than the calculation error threshold, the system locks the path response intensity coefficient. This procedure limits the initial energy distribution of the feature transformation of the fully connected layer, so that the heterogeneous feature aggregation process remains monotonically convergent in the medical knowledge manifold space that meets the prior constraints.
[0063] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A headache cause analysis method based on a knowledge graph and deep learning, characterized in that, Includes the following steps: Step 101: Obtain unstructured text vectors representing the initial state of the object to be analyzed and multidimensional physical quantity time series sequences representing the evolution of physiological state. Perform modal alignment processing on the unstructured text vectors and multidimensional physical quantity time series sequences to extract multidimensional feature tensors of related heterogeneous data features. Step 102: Construct a global knowledge graph containing domain logical evolution constraints and store it in a graph database; extract the directed causal constraint weights between pathological entities from the global knowledge graph; and establish unidirectional logical triggering paths between nodes. Step 103: Extract a dynamic local topological subgraph describing the causal evolution trajectory based on the multidimensional feature tensor, and generate a dynamic edge feature matrix representing the node connection relationship in the dynamic local topological subgraph. The dynamic edge feature matrix is used to quantify the correlation strength of each symptom node in the time window dimension. Step 104: Construct a logical topology gating matrix with the same dimension as the dynamic local topology subgraph based on the directed causal constraint weights. When a unidirectional logical triggering path exists, set the element at the corresponding position in the logical topology gating matrix to 1. When a unidirectional logical triggering path does not exist, set the element at the corresponding position in the logical topology gating matrix to 0. Step 105: Calculate the nonlinear Hadamard product of the dynamic edge feature matrix and the logical topology gate matrix to obtain the path response intensity matrix; Step 106: Input the path response intensity matrix into the graph neural network. The path response intensity matrix performs topological pruning on the feature aggregation process of neighboring nodes, blocking feature transmission paths that deviate from the directed causal constraint weights. This allows the update process of the dynamic embedding vector to converge to the preset medical knowledge manifold space, and outputs a risk probability index representing the distribution of causes.
2. The headache cause analysis method based on a knowledge graph and deep learning according to claim 1, characterized in that, Step 101 includes the following sub-steps: Step 1011, using the Gaussian probability density function to convert the discrete timestamps in the time series of multidimensional physical quantities into continuous time feature vectors; Step 1012, mapping the fuzzy time descriptions in unstructured text vectors into feature representations with spatiotemporal overlap probability distributions. Step 1013: The dynamic edge feature matrix is corrected by calculating the integral overlap between the source activation node and the target activation node in the time window dimension, thereby reducing the topology deduction deviation caused by data acquisition fluctuations. 3.The headache cause analysis method based on knowledge graph and deep learning according to claim 1, characterized in that, The construction of the global knowledge graph in step 102 includes: extracting logical causal relationships from domain literature, establishing a set of entity nodes consisting of pathogenic factor entities, physiological response entities, and category entities; establishing semantic associations and nonlinear evolution weights between nodes in the entity node set, forming a set of knowledge triples with directed edge constraints; and storing the set of knowledge triples in a graph database to form a global knowledge graph that serves as a reasoning bias. 4.The headache cause analysis method based on a knowledge graph and deep learning according to claim 1, characterized in that, Step 103, generating the dynamic edge feature matrix, includes: identifying the temporal order of each feature entity in the multidimensional feature tensor, establishing the mapping relationship between the feature entities and the corresponding nodes in the global knowledge graph; assigning time decay weights to the edges in the dynamic local topological subgraph according to the temporal order, and calculating the association strength between each node at the current time segment.
5. The headache etiology analysis method based on knowledge graphs and deep learning according to claim 1, characterized in that, The graph neural network adopts a two-layer collaborative architecture. Step 106 includes the following sub-steps: Step 1061, extract the global topological embedding of the global knowledge graph through the first layer network as the prior feature bias of the node. Step 1062, utilize the second-layer network in the path response intensity matrix Under hard constraints, targeted feature aggregation is implemented, and nodes are updated using the following formula. Hidden state : ,in, For nodes The set of neighboring nodes, The weight matrix is a learnable matrix. It is a non-linear activation function. Represents the target node The hidden state feature vector, Represents the path response intensity matrix In the middle, from the source node Point to target node The nonlinear response coefficient of the unidirectional path; Step 1063, extract the node feature vector output by the second layer network as a risk probability index.
6. The headache etiology analysis method based on knowledge graphs and deep learning according to claim 5, characterized in that, Targeted feature aggregation includes: real-time monitoring of the variance changes of feature vectors in graph neural networks to assess the smoothness of the feature processing; and when the feature similarity between adjacent network layers exceeds a preset threshold, adjusting the sparsity of the path response intensity matrix to enhance the discriminability of the topology.
7. The headache etiology analysis method based on knowledge graphs and deep learning according to claim 1, characterized in that, Step 101, which involves performing modal alignment processing, includes: extracting semantic embedding vectors that describe the state of the object; normalizing the physiological data to generate physiological feature vectors; and using a cross-attention mechanism to calculate the association weights between the semantic embedding vectors and the physiological feature vectors to generate an alignment sequence that represents the multimodal fusion features.
8. The headache etiology analysis method based on knowledge graphs and deep learning according to claim 1, characterized in that, Step 106 outputs risk probability indicators, including: mapping the node feature vectors output by the graph neural network to a preset classification feature space; calculating the Euclidean distance between the node feature vectors and each candidate center; and outputting a probability ranking representing the likelihood of different causes based on the Euclidean distance.
9. The headache etiology analysis method based on knowledge graphs and deep learning according to claim 1, characterized in that, It also includes: establishing matching degree verification rules between risk probability indicators and historical known modes; when the confidence level of the risk probability indicator is lower than the preset level, extracting specific nodes that cause logical conflicts in the multidimensional feature tensor and outputting data supplementation trigger instructions for specific nodes.
10. The headache etiology analysis method based on knowledge graphs and deep learning according to claim 1, characterized in that, Also includes: Monitor the state changes of the path response intensity matrix at different time steps, record the path blocking frequency that does not conform to the directed causal constraint weights, and dynamically adjust the edge weight parameters stored in the global knowledge graph based on the path blocking frequency.
Citation Information
Patent Citations
CN115719625B