Construction of Migraine Knowledge Graph Based on Diagnosis and Treatment Guidelines of Integrative Medicine

Abstract Our objective was to transform the text data in migraine diagnosis and treatment guidelines into a visualized knowledge graph by using knowledge graph technology, visually display the clinical diagnosis and treatment process, and provide assistance for the standardization of diagnosis and treatment of migraine with integrative medicine. Manual extraction, knowledge fusion, and standardization were performed on the text data in the migraine diagnosis and treatment guidelines. Combined with the clinical diagnosis and treatment process, the data of Chinese and Western medicine diagnosis and treatment of migraine were visualized and stored through the Neo4j graph database. A knowledge graph of Chinese and Western medicine diagnosis and treatment of migraine including 616 entities and 615 entity relationships was constructed, which realized the visual display of the diagnosis and treatment process of integrative medicine for migraine including examination, diagnosis, and treatment. Based on the guidelines for the diagnosis and treatment of migraine, this study visualized the diagnosis and treatment process of integrative medicine for migraine through knowledge graph technology, which is of great significance for the clinical implementation of relevant guidelines for the diagnosis and treatment and the standardization of integrative medicine diagnosis and treatment for the dominant diseases in Chinese medicine.

trend year by year, and the economic burden on patients and society has also become heavier.Severe migraine is considered to be the most disabling and chronic disease. 5,6The etiology of migraine is still unclear in modern medicine, and the main treatment is drug therapy.However, patients often relapse due to alcohol drinking or mental stress, and the headache is refractory and difficult to heal.Nearly half of the patients are not satisfied with the curative effect.In Chinese medicine, it is believed that the main causes of migraine are visceral imbalance, disorder of qi, blood, yin and yang, blockage of brain collaterals or mal-nourishment of brain collaterals, etc. 7 At the acute stage, it is mainly treated with acupuncture, and at the remission stage, it is treated with Chinese herbs as a preventive treatment, which has a significant effect on relieving headache and improving the quality of life of migraine patients. 8"Recurrent headache" is a difficult clinical treatment of migraine at present, and the advantage of integrative medicine is to reduce the frequency of headache attacks and relieve the severity of headache.There are also advantages in terms of quality of life for the patients.
Diagnosis and treatment with integrative medicine are commonly applied, but the diagnosis and treatment methods of different doctors, including diagnosis and treatment ideas, syndrome differentiation methods, treatment methods, etc., are different and overlap each other.At present, it still lacks effective and unified clinical standards.The 2020 edition of Clinical Practice Guidelines of Chinese Medicine for Migraine and the 2022 edition of Diagnosis and Treatment Guidelines for Migraine in China are diagnosis and treatment guidelines based on expert experience and evidence-based evidence, which are normative and authoritative in the diagnosis and treatment fields of migraine treated with integrative medicine and can standardize and improve the clinical diagnosis and treatment.The essence of the knowledge graph is to store different types of data and build a giant networked knowledge system with the semantic network as the skeleton.By drawing, mining, analyzing, and displaying domain concepts and their interrelationships, it connects trivial and fragmented knowledge and visualizes data and their correlation. 9Knowledge graph has a wide range of application values in the field of Chinese medicine, including professional information retrieval of Chinese medicine, visual analysis of Chinese medicine data, and intelligent question-and-answer-assisted diagnosis and treatment.Knowledge graph-assisted diagnosis and treatment can give concise and accurate answers based on input questions. 10 For example, researchers have realized real-time consultation services for coronavirus disease 2019 (COVID-19) by establishing a knowledge graph intelligent questionand-answer system for COVID-19. 11Using the knowledge graph technology to visualize the normative data in the clinical diagnosis and treatment guidelines has significance of promoting the implementation and application of the diagnosis and treatment guidelines in clinical practice and improving the standardization of integrative medicine diagnosis and treatment.Therefore, based on the guidelines for the diagnosis and treatment of migraine, this study visual-ized the diagnosis and treatment process of migraine treated with integrative medicine through knowledge graph technology, hoping to provide a basis for the standardization of integrative medicine diagnosis and treatment of dominant diseases in Chinese medicine and improve the clinical implementation of relevant diagnosis and treatment guidelines.

Knowledge Graph Construction Method Data Sources
The data used in this study came from the Diagnosis and Treatment Guidelines for Migraine in China and the Clinical Practice Guidelines of Chinese Medicine for Migraine. 12The relevant literature 4,13 was simultaneously consulted for supplementation. 14

Software Tools
The graph database Neo4j was used for the knowledge graph of this study.Neo4j is a high-performance graph database for building knowledge graphs.It described the data model through graph-related concepts and saved data as nodes in the graph and the relationship between nodes. 15Neo4j is based on disk persistent storage, which has the advantages of supporting massive data, quickly querying graphs, and adding and changing data at any time, 16 so it can be used as a practical tool for storing and sorting out a large amount of Chinese and Western medical diagnosis and treatment data.The text data in the diagnosis and treatment guidelines are connected in series through the Neo4j graph database to realize the structured storage of Chinese and Western medicine diagnosis and treatment data and provide visual display and query retrieval services at the same time.

Entity Extraction
Entity extraction is to extract all terms related to the diagnosis and treatment of migraine in Chinese and Western medicine, including examination, diagnosis, etiology and pathogenesis, treatment, prevention and health maintenance, etc., from relevant guidelines.
Entity extraction principles 17 : this included (1) comprehensively extracting all terms in the examination, diagnosis, etiology, pathogenesis, treatment, prevention, and health maintenance of migraine in the guidelines; (2) accurately extracting relevant technical terms, performing professional classification of terms while extracting, and paying attention to the accuracy of entity entry; and (3) ensuring that all data entered are well documented in relevant guidelines or the literature.
Entity extraction method: in the order of the clinical diagnosis and treatment process of migraine, the related terms of migraine examination, diagnosis, etiology, pathogenesis, treatment, prevention, and health maintenance were extracted from relevant diagnosis and treatment guidelines, 4,12 such as "stinging pain," "migraine," "blood stasis," "Xuefu Zhuyu Decoction," "Taoren (Persicae Semen) ", etc., and the relevant literature to supplement was consulted. 13,14n the basis of ensuring authenticity and reliability, the diagnostic and treatment terms in integrative medicine for migraine was comprehensively collected.All collected unstructured text data were manually entered into Word document for storage.
Based on the above entity extraction criteria and methods, comprehensive analysis and summarization of Chinese and Western medicine diagnosis and treatment data for migraine were conducted, and classified into five primary categories: "examination," "diagnosis," "etiology and pathogenesis," "treatment," and "prevention and health maintenance." "Examination" was divided into "Chinese medicine examination" and "modern medical examination"; "diagnosis" was divided into "modern medical diagnosis" "Chinese medicine diagnosis" and "migraine assessment"; "etiology and pathogenesis" was divided into "modern medical mechanism" and "Chinese medicine etiology and pathogenesis"; "treatment" was divided into "effectiveness indicators" "principles and treatment methods" "patient education" "modern drug therapy" "Chinese medicine treatment" and "other therapies"; "prevention and health maintenance" includes "health maintenance based on Chinese medicine"; and "health maintenance based on modern medicine."The above secondary items were subdivided in turn for further management.The summarized and sorted structured data were stored in EXCEL form (Migraine Chinese and Western Medicine Knowledge Atlas Database.xlsx).A total of 616 term entities were extracted, and each term was written with a unique ID number.The entity data format requirements are shown in ►Table 1.

Relationship Extraction
Relationship extraction is to redefine or adjust the relationship between the extracted migraine diagnosis and treatment entities in the process of reinduction and sorting.The relationship between Chinese and Western medicine diagnosis and treatment entities of migraine is hierarchical, such as examination-modern medical examination, modern medical examination-history collection, diagnosis-modern medical diagnosis, modern medical diagnosis-migraine, etiology and pathogenesis of Chinese medicine-brain collateral blockage, etc. Entity relationship extraction is relatively simple, which is the relationship between part and whole.A total of 615 hierarchical relationships were defined by combining the Chinese medicine and Western medicine terms for migraine, as shown in ►Table 2.

Knowledge Fusion
Entity relationships are obtained from the unstructured or semistructured data by entity extraction and relationship extraction.However, these results may contain a large amount of redundant information.The relationship between data is flat, and some data lack hierarchy and logic.For example, some entities may have different expressions,

Results
Through knowledge extraction, knowledge fusion, and data import, the knowledge graph of migraine diagnosis and treatment was constructed, including 616 entities and 615 entity relationships.Among them, entities included individual migraine entity, 257 examination entities, 22 diagnostic entities, 31 etiology and pathogenesis entities, 290 treatment entities, and 15 prevention and health maintenance entities.As there were many constructed knowledge graph nodes, it was difficult to clearly display them on one graph, so some nodes were used for representative display.
As shown in ►Fig.2, the "migraine" entities included the "examination" entity, the "diagnosis" entity, the "etiology and pathogenesis" entity, the "treatment" entity, and the "prevention and health maintenance" entity.The six entities constituted five entity relationships.
The examination part included 257 examination entities and 256 entity relationships.As shown in ►Fig. 3,the orange nodes represented entities, and the directional arrows between entities represented the relationship between the two.The "examination" entities included the "modern medical examination" entity and the "Chinese medicine examination" entity.The "Chinese medicine examination" entity included the "headache characteristics" entity, the "accompanying symptoms of headache" entity, and the "tongue and pulse" entity.The diagnostic section included 22 diagnostic entities and 21 entity relationships.As shown in ►Fig. 4,the "diagnosis" entities included the "modern medical diagnosis" entity, the "Chinese medicine diagnosis" entity, and the "migraine assessment" entity.The etiology and pathogenesis part included 31 etiology and pathogenesis entities and 30 entity relationships.As shown in ►Fig.5, the "etiology and pathogenesis" entities included the "modern medical pathogenesis" entity and the "Chinese medicine etiology and pathogenesis" entity.The treatment part included 290 treatment entities and 289 entity relationships, as shown in ►Fig. 6.The "treatment" entities included the "effectiveness indicators" entity, "treatment principle and method" entity, "patient education" entity, "modern drug treatment" entity, "Chinese medicine treatment" entity, and "other therapies".
The prevention and health maintenance part included 15 prevention and health maintenance entities and 14 relationships.As shown in ►Fig. 7,the "prevention and health maintenance" entities included the "modern medical regulation" entity and the "Chinese medicine regulation" entity.

Providing a Carrier for Storing Knowledge of Diagnosis and Treatment of Migraine by Integrative Medicine
The Neo4j graph database is an advantageous carrier of the knowledge graph of diagnosis and treatment for migraine by integrative medicine, which can convert text data into structured diagnosis and treatment data and provide visual display.There are a lot of integrative medical diagnosis and treatment data for migraine, and the scale of interrelated diagnosis and treatment data continues to expand, and the storage of data and their associations has become an urgent problem to be solved, 19 and Neo4j provides a way for it.In the process of extracting and storing relevant diagnosis and treatment terms, this study summarized the ontologies in the field of diagnosis and treatment of migraine in integrative medicine into five categories: examination, diagnosis, etiology and pathogenesis, treatment, prevention and health maintenance, and subdivided the affiliation of all ontologies.Structured or semistructured diagnosis and treatment data were converted into structured data for storage.Secondly, Neo4j belongs to the graph database.The nodes of the graph represented all the ontologies of integrative medicine diagnosis and treatment of migraine, and the edges of the graph represented the relationship between the ontologies, form-ing a relationship network.The Chinese and Western medicine diagnosis and treatment terms of migraine and their relationships were integrated, and they were visualized in the form of images.Compared with text data, the relationship between diagnosis and treatment data was presented in the form of nodes and graph edges, which created a sense of visualization 20 and was easier to be obtained by clinicians, thereby improving the clinical application.In addition, Neo4j could realize the query retrieval and application of Chinese and Western medicine diagnosis and treatment terms of migraine, and the speed of transaction processing and data relationship processing was relatively fast.The relationships among migraine diagnosis and treatment terms were attached to their nodes.Therefore, regardless of the number or depth of the relationship, it could ensure zero delay and realtime performance during query retrieval and application, which was more efficient than traditional databases. 16As a result, Neo4j can flexibly expand the Chinese and Western medical diagnosis and treatment data network for migraine,     and add or change data at any time, 21 meeting the requirement to update data according to latest development in clinical knowledge.This study transformed migraine-related text data into structured data through Neo4j, providing clinicians with a more convenient and accurate way to obtain diagnosis and treatment knowledge.The knowledge structure and the interrelationships were visually displayed in a graphical way 22 so that clinicians can not only grasp the key knowledge points from a large amount of clinical data, but also quickly obtain the logical relationship between knowledge.

Improving the Clinical Standardization of Diagnosis and Treatment for Migraine by Integrative Medicine
The knowledge graph of diagnosis and treatment of migraine by integrative medicine can promote the clinical implementation of migraine clinical practice guidelines and improve the standardization of clinical diagnosis and treatment of integrative medicine.The knowledge graph of diagnosis and treatment for migraine by integrative medicine can guide clinical examination and diagnosis.The clinical examination part includes modern medical examination and Chinese medicine examination.First, whether the patient has migraine can be determined by a series of modern medical tests.The method is to collect medical history, conduct physical examination and auxiliary examination for the patient in sequence, and determine whether the patient has atypical manifestations.The patient's medical history was taken in the first process, including identifying the characteristics of the pain, such as its location, nature, degree, duration, and accompanying symptoms; the cause of pain, prodromal symptoms, aura, aggravating and relieving factors, and medical history, etc., were determined.For the second process, physical examination on the patient was performed, including basic vital signs examination, head and face examination, neck examination, nervous system examination, and fundus examination in sequence.For the third process, combine the results of medical history and physical examination and select corresponding auxiliary examinations as needed, including blood tests, electroencephalogram, transcranial Doppler ultrasound, lumbar puncture, computed tomography, and magnetic resonance imaging examinations.Through the above modern medical examinations, the disease identification of migraine patients is completed, so as to produce a microscopic and accurate understanding of the patients' condition.The second step is to synthesize the data obtained from the four diagnostic methods of inspection, listening and smelling, inquiry, pulse taking, and palpation in order to learn about the general location of headache, the nature, degree and duration of pain, as well as the accompanying symptoms and conditions of the tongue and pulse of the migraine patients.It is necessary to determine whether the disease is caused by external factors such as wind-cold-dampness pathogen, phlegm turbidity, blood stasis, liver yang hyperactivity, or qi stagnation, or whether it is caused by qi and blood deficiency, kidney essence deficiency, or empty marrow sea, in order to grasp the current stage and dynamic transformation process of migraine patients.After the above Chinese medicine examinations, the syndrome differentiation of the migraine patient is com-pleted, and the overall body status and the balance between the body and disease of the migraine patient are mastered.
The knowledge graph of diagnosis and treatment for migraine by integrative medicine is of guiding significance for the clinical standard diagnosis and treatment.According to the actual situation of patients, Chinese medicine treatment and Western medicine treatment were combined, and the treatment methods are applied selectively.In the attack period of migraine, modern medical treatment combined with Chinese medicine acupuncture can be adopted with accurate action sites, immediate and good curative effects.During the remission period, Chinese medicine treatment can significantly relieve the frequency and pain of migraine attacks and improve the quality of life of patients by longterm regulation.Through the guidance of the knowledge graph of migraine diagnosis and treatment, the diagnosis and treatment process of integrative medicine can be standardized and the overall regulation and local treatment can be taken into account simultaneously, thereby improving the clinical efficacy and reducing the treatment cost.

Conclusion
Based on the clinical diagnosis and treatment guidelines for migraine, the text data in the guidelines are converted into structured data through Neo4j chart database and the diagnosis and treatment process of migraine is visualized.It is of great significance to improve the clinical implementation of the relevant diagnosis and treatment guidelines and standardize the diagnosis and treatment of dominant diseases in Chinese medicine with integrative medicine.

1. 3 . 4
Import of DataThe xlsx file was converted into a CSV file suitable for importing Neo4j, including five entity files and five entity relationship files, and they were imported into the Neo4j graph database in batches.Enter in the Neo4j program code input box:LOAD CSV WITH HEADERS FROM "file:///ptt.csv"AS line CREATE (p:ptt {pttname:line.pttname,pttid:line.pttid}).Entity nodes can be created for all of the checked terms.Create entity nodes for diagnosis, etiology and pathogenesis, treatment, prevention, and health maintenance.Enter in the Neo4j program code input box:LOAD CSV WITH HEADERS FROM "file:///pttgx.csv"AS line.Match (from:ptt {pttid:line.pttid1}),(to:ptt{pttid:line.pttid2})Merge (from)-[:Including]-(to).Entity relationships can be created for all examination terms.Create the entity relationship of diagnosis, etiology and pathogenesis, treatment, prevention, and health maintenance.The knowledge graph construction process is shown in ►Fig. 1.

Fig. 1
Fig. 1 Construction process of migraine knowledge graph based on diagnosis and treatment guidelines of integrative medicine.
Construction of Migraine Knowledge Graph Jiang et al. e97

Fig. 7
Fig. 7 Display of "prevention and health maintenance" knowledge graph.
Construction of Migraine Knowledge Graph Jiang et al. e99

Table 2
Example of relational data

Table 1
Example table of node data and a specific title may correspond to multiple different entities.Therefore, after entity extraction and relationship extraction, they were cleaned and checked.Through knowledge fusion, the ambiguity concept was eliminated, and the redundancy concept was eliminated to ensure the high quality of the knowledge graph.