Mental disease medical auxiliary diagnosis method based on bimodal knowledge graph and related device
By building an auxiliary diagnosis system based on a dual-modal knowledge graph, combining static and personal dynamic knowledge graphs, the subjective and dynamic problems in the diagnosis of mental illness are solved, accurate auxiliary diagnosis and continuous optimization are achieved, and systematic diagnosis and treatment support is provided.
Patent Information
- Application Number
- CN202510965859.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-10-17
AI Technical Summary
In existing mental illness diagnosis technologies, diagnostic results are easily influenced by personal experience, lack support for diagnostic ambiguity and the dynamic nature of the disease, and are difficult to achieve personalized auxiliary diagnosis and continuous optimization.
Build an auxiliary diagnosis system based on a bimodal knowledge graph, through the closed-loop management of static medical diagnosis knowledge graph and personal dynamic knowledge graph, combined with a large language model to generate a scenario-based question library, to achieve accurate diagnosis and disease tracking.
It achieves the objectivity, dynamism and accuracy of mental illness diagnosis, provides systematic decision-making support, ensures knowledge updating and accuracy, and supports doctors in diagnosis and treatment assistance and disease tracking.
Smart Images

Figure CN120809167A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mental illness diagnosis, in particular to a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph and related devices. BACKGROUND
[0002] In the clinical diagnosis of mental illness, the diagnosis results of doctors are easily affected by personal experience and subjective judgment, resulting in insufficient diagnostic consistency. Existing mental illness knowledge graphs mainly focus on basic disease knowledge and lack support for diagnostic ambiguity and disease dynamics. Moreover, they do not form a closed-loop management mechanism of "diagnosis-tracing-optimization", which is difficult to meet the needs of individualized auxiliary diagnosis. Therefore, there is an urgent need for a technical solution that can integrate static medical knowledge and dynamic patient data to achieve accurate auxiliary diagnosis and continuous optimization. SUMMARY
[0003] The purpose of the present application is to provide a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph and related devices, which can realize accurate auxiliary diagnosis and continuous automatic optimization of mental illness.
[0004] To achieve the above purpose, the present application provides the following solutions:
[0005] In a first aspect, the present application provides a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph, comprising the following steps:
[0006] Knowledge extraction is performed on medical diagnosis data to extract triples in an entity-relation joint extraction manner, and a static medical diagnosis knowledge graph is constructed. The static medical diagnosis knowledge graph contains disease information, diagnosis standards and symptom manifestations of mental illness.
[0007] A retrieval-enhancement-generation algorithm is used to generate a scenario-based question bank based on the static medical diagnosis knowledge graph through a large language model. The scenario-based question bank is used for disease screening and symptom tracking.
[0008] Based on the user's personal dynamic knowledge graph and the scenario-based question bank, interactive questioning and answering are performed with the user, and the personal dynamic knowledge graph is updated according to the user's answers. The personal dynamic knowledge graph is associated with the user's symptom quantification information and disease association information.
[0009] The static medical diagnosis knowledge graph is optimized based on the personal dynamic knowledge graph to form a closed-loop auxiliary diagnosis of mental illness.
[0010] Optionally, knowledge extraction is performed on medical diagnosis data to extract triples in an entity-relation joint extraction manner, and a static medical diagnosis knowledge graph is constructed, specifically including:
[0011] Acquire medical diagnosis data, and construct a static medical diagnosis knowledge graph ontology by using an improved IDEF5 method. The medical diagnosis data includes a mental illness diagnosis scale and medical case data; the static medical diagnosis knowledge graph ontology covers entities and relationship definitions of mental illness, diagnosis standards, and symptom manifestations.
[0012] Based on the Bert pre-training model, triplets are extracted from multi-source medical knowledge text data in an entity-relation joint extraction manner to obtain an initial static medical diagnosis knowledge graph.
[0013] A hybrid graph neural network model is used to perform link prediction on the initial static medical diagnosis knowledge graph to complete the missing relationships between entities, thereby obtaining a static medical diagnosis knowledge graph.
[0014] Optionally, the hybrid graph neural network model includes a semantic information encoding module, a structural information encoding module, a feature fusion module, and an optimization and prediction module. The hybrid graph neural network model is used to perform link prediction on the initial static medical diagnosis knowledge graph to complete the missing relationships between entities, thereby obtaining a static medical diagnosis knowledge graph, specifically including:
[0015] For the initial static medical diagnosis knowledge graph, the semantic information encoding module generates semantic embedding vectors of the head entity, the relationship, and the tail entity. The semantic embedding vectors are optimized through a context enhancement mechanism and a dynamic weighting distribution strategy.
[0016] The initial static medical diagnosis knowledge graph generates graph structure embedding vectors through the structural information encoding module. The graph structure embedding vectors aggregate local structural information through a graph convolution network, aggregate global path information through a graph attention network, and are optimized in combination with a multi-relation conversion mechanism.
[0017] The feature fusion module dynamically adjusts the weights of the semantic embedding vectors and the structural embedding vectors using an attention mechanism to generate a comprehensive feature vector representation.
[0018] The optimization and prediction module trains the model based on a preset scoring function and a loss optimization strategy to complete the missing relationships between entities, thereby obtaining a static medical diagnosis knowledge graph.
[0019] Optionally, a retrieval-enhancement-generation algorithm is used to generate a scenario-based question library based on the static medical diagnosis knowledge graph, specifically including:
[0020] The retrieval-enhancement-generation algorithm queries the static medical diagnosis knowledge graph through Cypher language to obtain associated information of mental illness and symptoms.
[0021] The associated information is bound to the mental illness diagnosis scale, and the big language model is used to establish a mapping relationship between symptoms and scale questions through semantic matching, and is provided for artificial review and verification.
[0022] Based on the preset prompt template, the large language model is fine-tuned by prompt learning to generate question pairs conforming to daily scenarios, forming a scenario-based question library; the question pair includes a question, a scenario, options, symptom information, and disease information.
[0023] Optionally, based on the user's personal dynamic knowledge graph and the scenario-based question library, interactive question and answer is conducted with the user, and the personal dynamic knowledge graph is updated according to the user's answers, specifically including:
[0024] Based on the Bayesian inference method, the target question is selected from the scenario-based question library according to the user's initial information and the user's personal dynamic knowledge graph.
[0025] The unstructured answer of the user to the target question is obtained, the unstructured answer is matched with the options of the target question through semantic analysis by the large language model, and a quantitative score is obtained.
[0026] Based on the quantitative score, the Bayesian method is used to update the severity of the symptoms associated with the user, and the personal dynamic knowledge graph is dynamically updated; the personal dynamic knowledge graph takes the user as a core node, is associated with symptom nodes and disease nodes, and the attribute of the symptom node is the quantitative score.
[0027] Optionally, the static medical diagnosis knowledge graph is optimized based on the personal dynamic knowledge graph to form a closed-loop auxiliary diagnosis of mental illness, specifically including:
[0028] The association frequency of diseases and symptoms in the personal dynamic knowledge graphs of a plurality of users is counted.
[0029] When the association frequency meets a preset threshold, it is determined that there is an added association relationship between the disease and the symptom.
[0030] The added association relationship is supplemented to the static medical diagnosis knowledge graph after semantic review, and the static medical diagnosis knowledge graph is iteratively optimized.
[0031] In a second aspect, the present application provides a mental illness medical auxiliary diagnosis system based on a dual-modal knowledge graph, comprising:
[0032] A static knowledge graph construction unit is configured to extract triples in an entity-relation joint extraction manner by knowledge extraction on medical diagnosis data, and construct a static medical diagnosis knowledge graph; the static medical diagnosis knowledge graph contains disease information, diagnosis standards and symptom manifestations of mental illness.
[0033] A scenario-based question library construction unit is configured to generate a scenario-based question library by a large language model based on the static medical diagnosis knowledge graph using a retrieval-enhancement-generation algorithm; the scenario-based question library is used for disease screening and symptom tracking.
[0034] The human-computer interaction and atlas updating unit is configured to interact with the user based on the personal dynamic knowledge graph and the scenario-based question bank, and update the personal dynamic knowledge graph according to the user's answers; and optimize the static medical diagnosis knowledge graph based on the personal dynamic knowledge graph, to form a closed-loop auxiliary diagnosis of mental illness; and the personal dynamic knowledge graph is associated with the symptom quantification information and the disease-related information of the user.
[0035] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the mental illness medical auxiliary diagnosis method based on the dual-modal knowledge graph.
[0036] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executable on a processor to implement the steps of the mental illness medical auxiliary diagnosis method based on the dual-modal knowledge graph.
[0037] In a fifth aspect, the present application provides a computer program product comprising a computer program executable on a processor to implement the steps of the mental illness medical auxiliary diagnosis method based on the dual-modal knowledge graph.
[0038] According to the specific embodiments provided in the present application, the present application discloses the following technical effects:
[0039] The present application provides a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph and related devices, which integrates the diagnosis knowledge in the field of mental illness by constructing a static medical diagnosis knowledge graph, thereby solving the problem of fragmented diagnosis basis; generates a scenario-based question bank and selects appropriate questions according to the personal dynamic knowledge graph of the user, to realize accurate diagnosis and solve the problem of ambiguous symptom expression; quantitatively tracks the changes of the user's symptoms by dynamically updating the personal dynamic knowledge graph according to the semantic analysis of the user's answers, thereby solving the problem of insufficient dynamic monitoring of the disease course; and finally, the static medical diagnosis knowledge graph is continuously improved through a closed-loop optimization mechanism, thereby solving the problem of lagging knowledge update. In summary, the present application realizes the objectivity, dynamics and accuracy of mental illness auxiliary diagnosis, realizes the systematic organization and personalized application of medical knowledge, and further realizes the functions of assisting doctors in diagnosis and treatment and subsequent disease tracking, thereby providing systematic auxiliary decision support for doctors, and realizing the function of continuously improving based on the existing fixed knowledge according to subsequent supplementary content, to ensure the knowledge update and accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described below only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0041] Figure 1 A flow chart of a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph provided by an embodiment of the present application.
[0042] Figure 2 A detailed flow chart of step A1 in a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph provided by an embodiment of the present application.
[0043] Figure 3 A schematic diagram of an ontology model of a static medical diagnosis knowledge graph in a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph provided by an embodiment of the present application.
[0044] Figure 4 A structural schematic diagram of a mixed graph neural network model in a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph provided by an embodiment of the present application.
[0045] Figure 5 A schematic diagram of a question pair in a Json format in a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph provided by an embodiment of the present application.
[0046] Figure 6 A schematic diagram of a question pushing process in a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph provided by an embodiment of the present application.
[0047] Figure 7 A schematic diagram of an ontology model of a personal dynamic knowledge graph in a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph provided by an embodiment of the present application.
[0048] Figure 8 A schematic diagram of the overall technical route of a mental illness medical auxiliary diagnosis method based on a dual-modal knowledge graph provided by an embodiment of the present application.
[0049] Figure 9 A structural schematic diagram of a mental illness medical auxiliary diagnosis system based on a dual-modal knowledge graph provided by an embodiment of the present application.
[0050] Figure 10 A structural schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the scope of protection of the present application.
[0052] In the basic process of clinical diagnosis and treatment, doctors collect patient information, combine their existing experience and knowledge to determine the specific diagnosis and treatment measures of the next clinical stage. However, the judgment of the doctors on the patient information may be affected by specific circumstances, sensory ability and practical experience, and the judgment is subjective and difficult to unify the standard. Therefore, it is necessary to convert the experience of the doctor's diagnosis process into knowledge, so that the diagnosis result is objective and traceable, which is the direction of the change of the current diagnosis method. To complete this change, building a reliable medical knowledge graph to assist diagnosis is the research focus in the future.
[0053] The knowledge graph related to mental illness patients currently mainly focuses on the basic knowledge of the disease, and for the field of mental illness diagnosis, the traditional diagnosis and treatment mode faces many problems, such as the fuzziness of symptom expression, the complexity of disease tracking, and the closed-loop management of patient disease dynamic monitoring and personalized intervention has not yet formed a systematic technical support, therefore, the present application proposes to construct a "static-dynamic" dual-mode knowledge graph system, the main content of which is to take medical diagnosis knowledge as the center, design question and answer guide templates, select symptoms from disease information, generate diagnosis criteria based on static medical diagnosis knowledge graph and user symptoms, and design mental state evaluation framework combined with large models, realize auxiliary diagnosis and evaluation of mental and psychological diseases, realize systematic organization and personalized application of medical knowledge, and then realize the function of helping doctors to perform diagnosis and treatment assistance and subsequent disease tracking. The framework can realize the function of constantly improving based on the existing fixed knowledge according to the subsequent supplementary content, and ensure the knowledge update and accuracy. Referring to the related cases of medical knowledge graph technology application at home and abroad, combined with the actual medical diagnosis platform design, an application demonstration platform of medical diagnosis and information retrieval based on knowledge graph is built, and the application value of realizing auxiliary decision-making based on medical diagnosis is displayed.
[0054] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0055] The mental illness medical auxiliary diagnosis method based on the dual-mode knowledge graph provided in the embodiments of the present application, in one exemplary embodiment, as shown in Figure 1 The method comprises the following steps:
[0056] A1, extract triples in an entity-relation joint extraction manner by knowledge extraction on medical diagnosis data to construct a static medical diagnosis knowledge graph; the static medical diagnosis knowledge graph contains disease information, diagnosis standards and symptom manifestations of mental diseases.
[0057] The construction of the static medical diagnosis knowledge graph includes ontology construction and data completion. Based on the collection of medical data, the improved IDEF5 method is used to construct the ontology of the static medical diagnosis knowledge graph in the embodiment. In the embodiment, as shown in Figure 2 the step A1 specifically includes the following steps:
[0058] A11, obtain medical diagnosis data and construct the ontology of the static medical diagnosis knowledge graph by using the improved IDEF5 method. The medical diagnosis data includes mental disease diagnosis scales and medical case data; the ontology of the static medical diagnosis knowledge graph covers the entity and relation definitions of mental diseases, diagnosis standards and symptom manifestations.
[0059] The mental disease diagnosis scale is a standardized tool used in clinical psychology and psychiatry to objectively assess the severity of patient symptoms. Through a structured item and a quantitative scoring system, it assists doctors in disease screening, diagnosis and efficacy monitoring. The core of the scale is to convert subjective mental disease inquiry and symptoms into comparable numerical indicators, improving the consistency and repeatability of diagnosis. Taking the Hamilton Depression Rating Scale (HAMD) as an example, this scale is a classic tool for clinical diagnosis and efficacy evaluation of depression. The Hamilton Depression Rating Scale contains 17 (or 24 extended version) symptom items, covering core manifestations of depression such as low mood, insomnia, anxiety and somatic symptoms. Each symptom is divided into 0-4 points (part of the items are 0-2 points), and the total score ranges from 0 to 52, as shown in Table 1.
[0060] Table 1 Hamilton Depression Rating Scale
[0061]
[0062]
[0063] The diagnostic process using a scale is generally divided into two parts: clinical interview and observation, and scoring and grading. First, the doctor assesses the frequency, intensity, and functional impact of symptoms item by item through open-ended questions (such as "How are you feeling lately?") and observation of the patient's behavior, which takes approximately 20 to 30 minutes. Finally, the patient's answers are scored and rated, and the total score is accumulated. The severity of depression is determined based on a threshold. The cumulative score is 0-7 points: no depression; 8-16 points: mild depression; 17-23 points: moderate depression; ≥24 points: severe depression. Because the scale has high reliability and validity and is widely used in clinical diagnosis and treatment tracking, and the semantic knowledge contained therein is easy to obtain and analyze, the scale data is used as the knowledge source for constructing the medical knowledge graph ontology.
[0064] Medical diagnostic data primarily comes from the Diagnostic and Statistical Manual of Mental Disorders (Fifth Edition) (DSM-5) and compiled medical corpora. The DSM-5, developed by the American Psychiatric Association, is a book on the classification of mental disorders. It provides diagnostic criteria for mental illness and has become a standard reference for clinical practice in the field of mental health. The DSM-5 is the latest version of the classification and diagnostic criteria for mental illness developed in the United States. Incorporating the opinions and suggestions of hundreds of top psychology experts and scholars from around the world, the DSM-5 organizes and redefines the names, definitions, and diagnostic criteria of all mental illnesses currently experienced by humans, making it a highly scientific reference.
[0065] Therefore, choosing DSM-5 as a text dataset is more accurate and can provide more professional guidance when constructing the knowledge graph ontology. At the same time, the DSM-5 corpus is a text corpus, from which key entities can be extracted to construct the entity layer of the knowledge graph. This requires processing the text corpus through word segmentation, annotation, word vector training, etc., and converting it into data expressed in the form of word vectors, and then performing knowledge extraction to construct the knowledge graph. In addition, in order to obtain specific and actual medical diagnosis data, other data were obtained while focusing on DSM-5, such as semi-structured knowledge from medical websites, the Hamilton Depression Rating Scale and PHQ-9 scale related to depression, the ABC scale and CARS scale related to autism, medical diagnosis guidelines, and medical case data.
[0066] A12. Based on the BERT pre-training model, triples are extracted from multi-source medical knowledge text data in an entity-relationship joint extraction manner to obtain the initial static medical diagnosis knowledge graph.
[0067] The data source of the static graph construction is derived from text materials and Internet resources, and the triples are extracted through multi-source data extraction to form a corresponding knowledge graph. For the widely existing unstructured text knowledge, the embodiment adopts a Bert pre-training model to extract triples from the collected corpus (including diagnosis manuals and scientific research literature) in an entity-relation joint extraction manner, and constructs a static medical diagnosis knowledge graph according to the extracted results, so as to realize the structured and unified representation of medical diagnosis data. For the possible missing relationship between data, data completion is used to improve it.
[0068] Bert (Bidirectional Encoder Representations from Transformers) is a pre-training language model released by Google in 2018. It adopts the Transformer architecture and is unsupervised trained on large-scale unlabeled text data to learn a general language representation. Compared with traditional language models, Bert not only considers the influence of the previous word on the current word, but also considers the influence of the following word on the current word, thereby realizing bidirectional language modeling. Using the Bert model has the following advantages: as a pre-training model, it does not need a large amount of corpus to train when used in a specific scene, and has strong generalization ability; Bert is an end-to-end model that does not need to adjust the network structure, only needs to be added to the output layer of a specific downstream task, and it is a bidirectional model that is trained in combination with the context, and has better performance
[0069] Finally, the corresponding ontology model is obtained through the analysis of the existing medical diagnosis data by the method, as shown in Figure 3
[0070] Through the above method, the construction of the knowledge graph based on medical diagnosis data has been completed, but the current static medical diagnosis knowledge graph still needs to be further optimized, improved and managed and maintained for a long time due to the data source. For this, the embodiment proposes a solution. In order to complete the knowledge graph completion task to optimize the graph, the embodiment proposes a knowledge reasoning method based on a graph convolution model, which deeply mines the implicit relationship between entities, and realizes the automatic completion of the graph in a link prediction manner.
[0071] A13, a hybrid graph neural network model is used to predict the link of the initial static medical diagnosis knowledge graph, complete the missing relationship between entities, and obtain the static medical diagnosis knowledge graph. As shown in Figure 4 As shown, the hybrid graph neural network model includes a semantic information encoding module, a structural information encoding module, a feature fusion module, and an optimization and prediction module. Specifically, in the hybrid graph neural network model, the static medical diagnosis knowledge graph is represented as G = {(h, r, t)}, where h, r, and t represent the head entity, the relationship, and the tail entity, respectively. In the semantic information encoding module, context-based semantic embedding vectors E sem are generated; and in the structural information encoding module, graph structure-based embedding vectors E str are generated. Subsequently, the feature fusion module generates comprehensive feature representation E f through a dynamically adjusted attention mechanism. Finally, the optimization and prediction module trains the model and scores and ranks the triplets to obtain a predicted triplet set, and link prediction is used to complete the knowledge graph. Step A13 specifically includes the following steps:
[0072] A131, for the initial static medical diagnosis knowledge graph, the semantic embedding vectors of the head entity, the relationship, and the tail entity are generated through the semantic information encoding module; the semantic embedding vectors are optimized through the context enhancement mechanism and the dynamic weighted distribution strategy.
[0073] Specifically, in the medical diagnosis field, entities and their mutual relationships usually exhibit significant context-dependent features. Taking the emotional state as an example, "emotional agitation in an anxious state" and "emotional depression in a depressed state" may have similar emotional attributes on the surface, but their semantic connotations are essentially different. However, traditional knowledge graph embedding methods are difficult to fully capture such context-dependent semantic features. To address this limitation, the semantic information encoding module is proposed, which integrates a context enhancement mechanism and a dynamic weighted distribution strategy, aiming to dynamically capture and optimize context-aware semantic representations.
[0074] The core of the context enhancement mechanism is to integrate dynamic semantic information extracted from the context to enhance the representation ability of traditional triplet embeddings. Specifically, for each training triplet (h, r, t), the module extracts context features (c h , c r , c t ) related to the head entity h, the relationship r, and the tail entity t, respectively. Subsequently, these features are fused to construct an enhanced triplet feature representation, represented as (h, c h , r, c r , t, c t ). To adapt to the input requirements of the Bert pre-training model, the enhanced triplet features are further converted into vector representations that meet the model input requirements, and the conversion formula is:
[0075]
[0076] In the formula, T h , T r and T t represent the text description of entities and relations, and and T ct represent the context description between the corresponding entities and relations.
[0077] The enhanced triple feature representation is input into the Bert pre-training model to obtain semantic embedding vectors E sem , and the conversion formula is as shown below.
[0078] E sem =(h sem ,r sem ,t sem ).
[0079] In the formula, h sem , r sem and t sem represent the high-dimensional vector representation of the head entity, the relation and the tail entity respectively.
[0080] Although the context enhancement mechanism can effectively improve the effect of semantic representation, this mechanism may also introduce low-quality context information, causing noise interference in the semantic learning process. To solve this problem, the embodiment adopts a dynamic weighting distribution strategy, which consists of two parts: context weight adjustment and context consistency scoring mechanism, aiming to optimize the selection and representation of semantic features, thereby improving the robustness and generalization ability of the model. In the knowledge graph, although the context features of the triple (h, r, t) and its reverse form (t, r -1 , h) are not completely symmetric, they still have significant relevance in semantics. To capture this asymmetry and dynamically adjust the training proportion between the forward relation and the reverse relation, the embodiment introduces a context adjustment weight α flip , which is used to construct the loss function, as shown in the formula below.
[0081] L flip =α flip ·L(h,r,t)+(1-α flip )·L(t,r -1 ,h).
[0082] In the formula, L(h, r, t) represents the cross-entropy loss function of the forward triple, and L(t, r -1 , h) represents the cross-entropy loss function of the reverse triple. The weight α flip is determined by the semantic similarity between the forward and reverse contexts, and the calculation formula is as shown below.
[0083] α flip =Sim(c h ,ct ) / (Sim(c h ,c t )+Sim(c t ,c h ))。
[0084] where Sim(c h ,c t ) represents the cosine similarity between the head and tail entity context embeddings, and the weight reflects the consistency of the forward and reverse triple semantic representations, to dynamically adjust the weights of the forward and reverse relationships.
[0085] In the training process, negative samples are usually generated by random replacement strategy, but this method may introduce semantically irrelevant or inconsistent samples, thus reducing the training efficiency. To solve this problem, the embodiment adopts a context consistency scoring mechanism to calculate the score β neg for screening negative samples to improve the quality of training data. The specific calculation formula of the scoring mechanism is as follows.
[0086]
[0087] where e neg and e pos represent the context embeddings of negative and positive samples respectively, and n represents the number of negative samples. The Sim function is used to calculate the cosine similarity between the embeddings to measure the semantic consistency between negative and positive samples. In the training process, only negative samples that satisfy β neg ≥η neg are retained, where η neg is a manually set scoring threshold that is dynamically adjusted according to the training results. By filtering low-score negative samples, this mechanism reduces noise interference and thus enhances the training effect.
[0088] A132, an initial static medical diagnosis knowledge graph, generates a graph structure embedding vector through a structure information encoding module; the graph structure embedding vector aggregates local structure information through a graph convolution network, aggregates global path information through a graph attention network, and is optimized in combination with a multi-relation conversion mechanism.
[0089] Specifically, the structural features of the static medical diagnosis knowledge graph play an important role in capturing the dependency and hierarchical relationships between entities. To obtain the graph structure information of the knowledge graph, the embodiment adopts a graph structure encoding mechanism that integrates local structure information, global path information, and a multi-relation dynamic adjustment strategy to embed the graph structure information.
[0090] For local structure information, a graph convolution network (GCN) is used in the module to aggregate field information to generate an embedding representation of local information features. For a triple (h, r, t), the field representation of the head entity h and the tail entity t is:
[0091] N h = {(r i ,t i ) | (h, r i ,t i ) ∈ G}.
[0092]
[0093] After obtaining the field representation of the triple, it is input into the graph convolution model to obtain the embedding vector E l , and the calculation formula is as follows.
[0094] E l = GCN (N h ,N t ).
[0095] In addition to the direct neighborhood, the static medical diagnosis knowledge graph also contains multi-hop relationships between diagnosis-related entities and relationships, and these entities and relationships involve the global topology structure of the entire graph. To embed the multi-hop relationship into a vector, the application uses a graph attention network (GAT) to encode the weighted multi-hop relationship path and extract the multi-hop path P h→t , and the formula is as follows.
[0096] P h→t = {(h, r1, m1, …, m k-1 , r k , t}.
[0097] In the formula, k represents the number of hops of the multi-hop path, and m k represents an intermediate entity.
[0098] After obtaining the multi-hop path, the attention weight of the path needs to be calculated, and the calculation formula is:
[0099] α p = Softmax (W p , P h→t ).
[0100] In the formula, W p represents the weight of the path. According to the above formula, an embedding vector E g that aggregates global structure information can be obtained, and the calculation formula is as follows.
[0101] E g = GAT (P h→t ).
[0102] In the static medical diagnosis knowledge graph, there is usually a complex multi-relationship interaction between entities. For example, a single disease may be associated with multiple symptoms. To effectively capture such dynamic characteristics, the embodiment introduces a specific relationship-based conversion mechanism, and the specific conversion formula is as shown below.
[0103] R r =W r ·R+b r .
[0104] In the formula, W r and b r represent the training parameters corresponding to the relationship r. Under the action of this mechanism, the structure information embedding of the entity is dynamically adjusted to generate an embedding representation related to the relationship, and the formula is as shown below.
[0105] E str =(E l ,E g ,R r )。
[0106] The graph encoding mechanism adopted by the embodiment effectively integrates local, global and specific relationship-based structure information, thereby realizing the graph structure representation of complex diseases and symptom interactions in the knowledge graph.
[0107] A133, by adopting an attention mechanism, the feature fusion module dynamically adjusts the weights of the semantic embedding vector and the structure embedding vector to generate a comprehensive feature vector representation.
[0108] Specifically, the feature fusion module fuses the embedding vectors generated by the semantic information encoding module and the structure information encoding module for subsequent model training. The feature fusion module ensures that the model can organically combine text semantic features and graph structure features to generate embedding representations that meet the link prediction scoring function.
[0109] In order to dynamically adjust the weights of semantic and structure embedding representations, the embodiment adopts an attention fusion mechanism to calculate the weights of the two, and the calculation formula for E str and E sem is as shown below.
[0110] α s =Softmax(W f (E sem ,E str )+b f )。
[0111] In the formula, W f and b f represent the parameters to be trained, and the weights are normalized using the Softmax function.
[0112] According to the above formula, the fusion embedding vector E f is calculated as follows:
[0113] E f = a s E sem + (1-a s )E str .
[0114] This mechanism dynamically balances the weights of semantic and structural features according to the input features, effectively obtaining the complex information between entities and relationships in the static medical diagnosis knowledge graph.
[0115] In order to avoid overfitting and ensure the effectiveness of the fusion embedding representation, the embodiment adopts a feature regularization processing method, and the specific formula is as follows.
[0116]
[0117] In the formula, λ sem and λ str represent hyperparameters that control the regularization strength. This method encourages the model to find a suitable fusion vector embedding representation and reduces the risk of overfitting.
[0118] A134, by optimizing and predicting the model based on the preset scoring function and loss optimization strategy, the missing relationships between entities are completed, and the static medical diagnosis knowledge graph is obtained.
[0119] Specifically, in the optimization and prediction module, the scoring function and loss optimization strategy are used to train the model, and finally an improved hybrid graph convolution model is realized. The core goal of the module is to ensure that the model can effectively predict the missing knowledge triples while maintaining high computational efficiency.
[0120] 1) Scoring function
[0121] In order to evaluate the rationality of the triple, the calculation formula of the scoring function f is as follows:
[0122]
[0123] In the formula, E f (h), E f (r), and E f (t) represent the fusion embedding representation of the head entity, the relationship, and the tail entity, respectively. The lower the score of the scoring function, the higher the rationality of the triple.
[0124] 2) Loss function
[0125] In order to train the model, the embodiment adopts a margin ranking loss function, and the specific formula is as follows:
[0126] L M = -∑ n max(0, γ + f - f').
[0127] where n represents the number of triplets of positive samples, γ represents the margin hyperparameter, f represents the scoring function of the positive sample triplets, and f ' represents the scoring function of the negative sample triplets.
[0128] 3) Prediction
[0129] The generation of negative samples is achieved by replacing the head or tail entity in the positive sample triplet. In order to ensure that the negative sample has semantic features in the static medical diagnosis knowledge graph, a context consistency scoring mechanism is combined when generating negative samples, aiming to further improve the training efficiency.
[0130] In the link prediction process, the model scores and ranks the candidate triplets through the scoring function, and finally selects the triplets with scores exceeding the set threshold as the result of link prediction. After semantic review, the triplets are supplemented to the static medical diagnosis knowledge graph, realizing graph completion and completing the optimization of the knowledge graph.
[0131] A2, based on the static medical diagnosis knowledge graph, a scenario-based question library is generated through a large language model using a retrieval-enhancement-generation algorithm; the scenario-based question library is used for disease screening and symptom tracking. In this step, the problem generation logic is defined through a prompt template, medical terminology is identified by combining entity matching technology, and a large language model (such as Deepseek) is fine-tuned using a prompt learning method to dynamically generate a medical diagnosis question library that fits daily life, covering disease screening, symptom tracking, and other content.
[0132] The question library is mainly generated through prompt learning, and a large language model is guided to produce a large number of high-quality scenario-based questions through the design of a prompt template. In this embodiment, a retrieval-enhancement-generation architecture (RAG) is used to generate a scenario-based question library. This architecture can integrate diagnostic bases from the static medical diagnosis knowledge graph, dynamically optimize the generated content through a prompt learning method, and establish a content verification mechanism to ensure the effectiveness and professionalism of the question library. The retrieval-enhancement-generation architecture RAG mainly consists of three key parts: information retrieval component, information enhancement component, and text generation component. In this embodiment, step A2 specifically includes the following steps:
[0133] A21, the static medical diagnosis knowledge graph is queried by the Cypher language to obtain the association information between mental illness and symptoms by using the retrieval-enhancement-generation algorithm. The information retrieval component first obtains the document fragments related to the input query from the knowledge source. In this embodiment, the Cypher language in Neo4j is used to query the static medical diagnosis knowledge graph as the retrieval part in the RAG framework, and the mental illness and the corresponding symptoms in the knowledge graph are searched out.
[0134] A22, the association information is bound to the mental illness diagnosis scale, the mapping relationship between the symptoms and the scale questions is established by using the semantic matching of the large language model, and the artificial verification is provided. The information enhancement component then filters and reorganizes these retrieval results to form optimized context information
[0135] After obtaining the association information of the disease and the symptoms, the content obtained by the graph retrieval is bound to the mental illness scale to enhance the context information of the retrieval content. Specifically, the questions in the scale are abstracted as {question:…}, represented by q i ; the options are abstracted as {option A:…; option B:…;…}, represented by a i ={o1,o2,…,o n}, where i represents the number of question pairs, and n represents the number of options. And the triple obtained by the knowledge graph retrieval is represented as s=(h d ,r d ,t d ), where h d , r d and t d represent the head entity disease, the related relationship and the tail entity symptom respectively. In this embodiment, the mapping relationship between the symptom entity and the scale question is established by using the large model semantic matching+artificial verification. Taking the self-rating depression scale as an example, the triple set with the head entity “depression” and the relationship “Has_symptom” is screened, and the tail entity symptom t d is input into the large model as a classified object, and the question q i is also input into the large model, and the mapping between q i and t d is established by analyzing the large model. One q i can map multiple symptoms, and the completed question pair is represented as {q i ,a i ,h d ,t d}, and the effectiveness of the associated mapping in the generated question pair is ensured by artificial verification and expert inquiry, and the enhancement of the retrieval entity is completed.
[0136] A23, based on the preset prompt template, the prompt learning fine-tuning large language model is used to generate the question pair conforming to the daily scene, and the scene question library is formed. The question pair includes question, scene, option, symptom and disease information. Finally, the text generation component generates the final output based on the enhanced context. The specific implementation process includes: first, design a prompt template P containing question elements, answer points and entity information, etc. The template is shown in Table 2.
[0137] Table 2 Large language model prompt template
[0138]
[0139] Subsequently, the q i and t d are extracted from the entity enhanced question pair. Fill these structured information into the pre-defined template to form a complete prompt input. Finally, use the generation ability of the large language model to efficiently output the question pair and store it in the Json format, as shown in Figure 5 Take depression as an example, a question pair related to depression is shown, which contains question, scene, option, symptom and disease. Similarly, the output question pair is manually reviewed to ensure that the semantic information is correct and effective, and then stored in the form of attribute graph to realize the construction of the scene question library, providing support for subsequent medical question and answer evaluation and personal dynamic knowledge graph construction.
[0140] A3, based on the user's personal dynamic knowledge graph and scene question library, interact with the user and update the personal dynamic knowledge graph according to the user's answer. The personal dynamic knowledge graph is associated with the user's symptom quantification information and disease related information. In this step, according to the user's initial information and the existing data information in the personal dynamic graph, the appropriate question is selected based on the Bayesian inference method, and the question is optimized through the large model according to this method.
[0141] For example, patients diagnosed with a disease will select relevant follow-up questions for their disease, and people without a history of disease will select preliminary screening questions for accurate subdivision. Then the patient's answer is collected and analyzed based on the large model. The patient's unstructured text answer is matched with the structured option in the question pair. According to the matching result, the numerical scoring method is used to quantitatively analyze and calculate the symptoms associated with the question pair. Then the symptom condition is counted to update the personal dynamic knowledge graph. For example, for the question pair given in the previous step, the user's answer "feeling unwell every day" is analyzed by the large model, and the answer is matched with the option "most of the time (4)", and the corresponding numerical value is extracted. The accurate question pushing process is as follows Figure 6The core goal is to accurately identify the patient's disease state through interactive consultation and dynamically update the personal dynamic knowledge graph. Combining structured questions with unstructured semantic analysis, a closed-loop evaluation from initial screening to disease quantification is achieved.
[0142] In this embodiment, step A3 specifically comprises the following steps:
[0143] A31, based on Bayesian inference method, according to the user's initial information and the user's personal dynamic knowledge graph, the target question is selected from the scenario question bank.
[0144] A32, obtain the user's unstructured answer to the target question, perform semantic analysis through a large language model, match the unstructured answer with the options of the target question, and obtain a quantitative score.
[0145] A33, based on the quantitative score, update the user's associated symptom severity using the Bayesian method, and dynamically update the personal dynamic knowledge graph; the personal dynamic knowledge graph takes the user as the core node, and is associated with the symptom node and the disease node. The attribute of the symptom node is the quantitative score.
[0146] The ontology model of the personal dynamic knowledge graph is as shown in Figure 7 , wherein the patient is the core node, and is associated with the symptoms and diseases. The patient node contains the basic information of the patient as its attribute value, and the symptom is quantified as an attribute value.
[0147] In practical application, the color of the symptom node in the graph represents the severity of the symptom. Green represents a lower severity of the symptom, and red represents a higher severity. The value is calculated by the medical question and answer evaluation, and is dynamically updated after each evaluation. The calculation method of data update is to obtain the question type and the value obtained by the large model, take the result as the posterior data based on the existing score of the user, and use the Bayesian inference method to calculate the score again to obtain the current user's disease severity data.
[0148] A4, based on the personal dynamic knowledge graph, optimize the static medical diagnosis knowledge graph, and form a closed-loop auxiliary diagnosis of mental illness. In this embodiment, step A4 specifically comprises the following steps:
[0149] A41, count the association frequency of diseases and symptoms in the personal dynamic knowledge graphs of multiple users.
[0150] A42, when the association frequency meets the preset threshold, it is determined that there is a new association relationship between the disease and the symptom.
[0151] A43, supplement the new association relationship to the static medical diagnosis knowledge graph after semantic review, and realize the iterative optimization of the static medical diagnosis knowledge graph.
[0152] Specifically, the frequency of disease-symptom associations in multiple personal dynamic graphs is counted (for example, 800 out of 1,000 depression patients are associated with "insomnia"). When the frequency exceeds a threshold (such as 70%), (depression, Has_symptom, insomnia) is added to the static graph after expert review to achieve knowledge iteration.
[0153] like Figure 8 The overall technical roadmap shown in the figure forms a closed loop after the personal dynamic knowledge graph receives data updates. Simultaneously, the correlation between symptom severity and disease in the personal dynamic knowledge graph can, to a certain extent, update the diagnostic criteria and other content in the static medical diagnosis knowledge graph. Specifically, when multiple users identify a disease and simultaneously discover the presence of certain symptoms, the correlation between the two can be confirmed to a certain extent, thereby addressing any deficiencies in the static knowledge graph and completing the entire framework cycle.
[0154] Through the above embodiments, this application provides standardized diagnostic basis through static graphs, tracks personalized disease conditions through dynamic graphs, and continuously optimizes knowledge through a closed-loop mechanism, effectively improving the objectivity and accuracy of auxiliary diagnosis of mental illness.
[0155] In another exemplary embodiment of the present application, in order to ensure the accuracy of question push, a user stratification step can be added before step A3 to divide user types (such as initial diagnosis, follow-up, high-risk) based on initial information such as user age and medical history, and adjust the question screening logic in a targeted manner.
[0156] This application also provides an application scenario: in community mental health services, primary doctors use this framework to conduct initial screening of residents. The system provides diagnostic basis based on static graphs, records follow-up data through dynamic graphs, and after accumulating cases, feeds back to the static graph to improve the knowledge associated with high-incidence symptoms in the region, thereby enhancing primary diagnosis capabilities.
[0157] The above embodiment of the present application provides a method for medical auxiliary diagnosis of mental illness based on a bimodal knowledge graph. By constructing a static knowledge graph to integrate fixed knowledge in the field of mental illness, it solves the problem of fragmented diagnostic basis; by generating a scenario-based question library to achieve accurate diagnosis, it solves the problem of ambiguity in symptom expression; by dynamically updating personal dynamic knowledge graphs to achieve quantitative tracking of the disease, it solves the problem of insufficient dynamic monitoring of the disease course; by continuously improving the static knowledge graph through a closed-loop optimization mechanism, it solves the problem of lagging knowledge updates. In summary, this application achieves the objectivity, dynamism and accuracy of auxiliary diagnosis of mental illness, and provides doctors with systematic auxiliary decision support.
[0158] Based on the same inventive concept, the embodiments of the present application also provide a system for implementing the mental illness auxiliary diagnosis method based on the dual-modal knowledge graph. The system provides a solution to the implementation similar to the implementation described in the above method. In one exemplary embodiment, as shown in Figure 9 FIG. 8, a mental illness auxiliary diagnosis system based on a dual-modal knowledge graph is provided, which includes:
[0159] A static knowledge graph construction unit is configured to extract triples in an entity-relation joint extraction manner by performing knowledge extraction on medical diagnosis data to construct a static medical diagnosis knowledge graph. The static medical diagnosis knowledge graph contains disease information, diagnosis standards and symptom manifestations of mental illness.
[0160] A scenario-based question bank construction unit is configured to generate a scenario-based question bank based on the static medical diagnosis knowledge graph by a retrieval-enhancement-generation algorithm through a large language model. The scenario-based question bank is used for disease screening and symptom tracking.
[0161] A human-computer interaction and knowledge graph updating unit is configured to interact with the user through question and answer based on the user's personal dynamic knowledge graph and the scenario-based question bank, and update the personal dynamic knowledge graph according to the user's answers. The personal dynamic knowledge graph is associated with the user's symptom quantification information and disease-related information. The static medical diagnosis knowledge graph is optimized based on the personal dynamic knowledge graph to form a closed-loop auxiliary diagnosis of mental illness. The personal dynamic knowledge graph is associated with the user's symptom quantification information and disease-related information.
[0162] Of course, Figure 9 The architecture shown in FIG. 8 is only exemplary. When implementing different functions, one or at least two components of the system shown in FIG. 8 can be omitted according to actual needs. Figure 9
[0163] In one exemplary embodiment, a computer device is provided, which can be a server or a terminal. The internal structure diagram of the computer device can be as shown in Figure 10 As shown in the figure. The computer device includes a processor, a memory, an input / output interface (I / O for short) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor, which can realize the mental illness medical auxiliary diagnosis method based on the dual-modal knowledge graph provided in the above embodiment.
[0164] Those skilled in the art can understand that, Figure 10 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0165] In an exemplary embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to realize the steps in the above method embodiments.
[0166] In an exemplary embodiment, a computer readable storage medium is provided, storing a computer program, which is executed by a processor to realize the steps in the above method embodiments.
[0167] In an exemplary embodiment, a computer program product is provided, including a computer program, which is executed by a processor to realize the steps in the above method embodiments.
[0168] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0169] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0170] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0171] The principles and implementation modes of the present application are described by applying specific examples in the present embodiment. The above embodiment is only used to help understand the method and core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In conclusion, the content of the present application should not be understood as a limitation.
Claims
1. A method for medical auxiliary diagnosis of mental illness based on a bimodal knowledge graph, characterized in that: include: By extracting knowledge from medical diagnosis data, triples are extracted using entity-relationship joint extraction to construct a static medical diagnosis knowledge graph; the static medical diagnosis knowledge graph contains disease information, diagnostic criteria, and symptom manifestations of mental illness; A retrieval-augmentation-generation algorithm is used to generate a scenario-based question library based on the static medical diagnosis knowledge graph through a large language model; the scenario-based question library is used for disease screening and symptom tracking; Based on the user's personal dynamic knowledge graph and the scenario-based question library, interactive questions and answers are conducted with the user, and the personal dynamic knowledge graph is updated according to the user's answers; the personal dynamic knowledge graph is associated with the user's symptom quantitative information and disease-related information; The static medical diagnosis knowledge graph is optimized based on the personal dynamic knowledge graph to form a closed-loop auxiliary diagnosis of mental illness.
2. The method for medical auxiliary diagnosis of mental illness based on a bimodal knowledge graph according to claim 1, characterized in that: By extracting knowledge from medical diagnosis data, triples are extracted using entity-relationship joint extraction to construct a static medical diagnosis knowledge graph, specifically including: Obtain medical diagnostic data and construct a static medical diagnostic knowledge graph ontology using an improved IDEF5 method; the medical diagnostic data includes a mental illness diagnostic scale and medical case data; the static medical diagnostic knowledge graph ontology covers entity and relationship definitions of mental illness, diagnostic criteria, and symptom manifestations; Based on the BERT pre-trained model, triples are extracted from multi-source medical knowledge text data using entity-relationship joint extraction to obtain the initial static medical diagnosis knowledge graph; A hybrid graph neural network model is used to perform link prediction on the initial static medical diagnosis knowledge graph, complete the missing relationships between entities, and obtain a static medical diagnosis knowledge graph.
3. The method for medical auxiliary diagnosis of mental illness based on a bimodal knowledge graph according to claim 2 is characterized in that: The hybrid graph neural network model includes a semantic information encoding module, a structural information encoding module, a feature fusion module, and an optimization and prediction module. The hybrid graph neural network model is used to perform link prediction on the initial static medical diagnosis knowledge graph, completing the missing relationships between entities, and obtaining a static medical diagnosis knowledge graph. Specifically, it includes: For the initial static medical diagnosis knowledge graph, the semantic information encoding module generates semantic embedding vectors of the head entity, relationship, and tail entity; the semantic embedding vectors are optimized through a context enhancement mechanism and a dynamic weighted allocation strategy; The initial static medical diagnosis knowledge graph generates a graph structure embedding vector through the structural information encoding module; the graph structure embedding vector aggregates local structural information through a graph convolutional network and global path information through a graph attention network, and is optimized in combination with a multi-relationship conversion mechanism; Dynamically adjusting the weights of the semantic embedding vector and the structural embedding vector by using an attention mechanism in the feature fusion module to generate a comprehensive feature vector representation; The optimization and prediction module trains the model based on a preset scoring function and loss optimization strategy to complete the missing relationships between entities and obtain the static medical diagnosis knowledge graph.
4. The method for medical auxiliary diagnosis of mental illness based on a bimodal knowledge graph according to claim 1, characterized in that: A retrieval-enhancement-generation algorithm is used to generate a scenario-based question library based on the static medical diagnosis knowledge graph through a large language model, specifically including: Adopting a retrieval-augmentation-generation algorithm, the static medical diagnosis knowledge graph is queried using the Cypher language to obtain the association information between mental illness and symptoms; Binding the associated information to a mental illness diagnostic scale, using semantic matching with a large language model to establish a mapping relationship between symptoms and scale questions, and providing manual review and verification; Based on preset prompt templates, prompt learning is used to fine-tune the large language model to generate question pairs that conform to daily scenarios, forming the scenario-based question library; the question pairs include questions, scenarios, options, symptoms and disease information.
5. The method for medical auxiliary diagnosis of mental illness based on bimodal knowledge graph according to claim 1, characterized in that: Based on the user's personal dynamic knowledge graph and the scenario-based question library, interactive Q&A with the user is performed, and the personal dynamic knowledge graph is updated according to the user's answers, specifically including: Based on the Bayesian inference method, according to the user's initial information and the user's personal dynamic knowledge graph, the target question is screened from the scenario-based question library; Obtaining the user's unstructured answer to the target question, performing semantic analysis using a large language model, matching the unstructured answer with the options of the target question, and obtaining a quantitative score; Based on the quantitative score, the Bayesian method is used to update the severity of the user-associated symptoms, and the personal dynamic knowledge graph is dynamically updated; the personal dynamic knowledge graph takes the user as the core node, associates symptom nodes and disease nodes, and the attributes of the symptom nodes are quantitative scores.
6. The method for medical auxiliary diagnosis of mental illness based on a bimodal knowledge graph according to claim 1, characterized in that: The static medical diagnosis knowledge graph is optimized based on the personal dynamic knowledge graph to form a closed-loop auxiliary diagnosis of mental illness, specifically including: Count the association frequencies between diseases and symptoms in multiple users’ personal dynamic knowledge graphs; When the association frequency meets a preset threshold, it is determined that a new association relationship exists between the disease and the symptom; The newly added association relationships are added to the static medical diagnosis knowledge graph after semantic review to achieve iterative optimization of the static medical diagnosis knowledge graph.
7. A medical auxiliary diagnosis system for mental illness based on a bimodal knowledge graph, characterized in that: include: A static knowledge graph construction unit is used to extract triples from medical diagnosis data by entity-relationship joint extraction to construct a static medical diagnosis knowledge graph; the static medical diagnosis knowledge graph contains disease information, diagnostic criteria, and symptom manifestations of mental illness; A scenario-based question library construction unit, configured to generate a scenario-based question library using a large language model based on the static medical diagnosis knowledge graph using a retrieval-enhancement-generation algorithm; The scenario-based question library is used for disease screening and symptom tracking; The human-computer interaction and graph update unit is used to conduct interactive Q&A with the user based on the user's personal dynamic knowledge graph and the scenario-based question library, and update the personal dynamic knowledge graph according to the user's answers; and optimize the static medical diagnosis knowledge graph based on the personal dynamic knowledge graph to form a closed-loop auxiliary diagnosis of mental illness; the personal dynamic knowledge graph associates the user's symptom quantitative information and disease association information.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the medical auxiliary diagnosis method for mental illness based on a dual-modal knowledge graph as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the medical auxiliary diagnosis method for mental illness based on a dual-modal knowledge graph as described in any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the medical auxiliary diagnosis method for mental illness based on a dual-modal knowledge graph as described in any one of claims 1 to 6.
Citation Information
Cited By
Fatigue detection method based on multilayer perceptron
CN121059165A
Intelligent driving medical map construction, labeling and vectorization integration method and device
CN121524368A