Resident health suggestion recommendation method, system and equipment based on chronic disease knowledge graph and large model, and medium

Through the combination of Llama and Bert models, chronic disease keywords are extracted from natural language descriptions and matched with the knowledge graph, solving the problems of restricted user expression and inaccurate information in traditional methods, providing accurate health suggestions, and improving the effectiveness of chronic disease management.

CN120526977APending Publication Date: 2025-08-22山东浪潮智慧医疗科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510395473.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

The existing health recommendation methods rely on fixed input boxes and preset rules, resulting in limited user expressions, incomplete or inaccurate information, lack of in-depth semantic understanding, difficulty in making full use of chronic disease knowledge graphs, and lack of accurate health recommendations in chronic disease health management.

Method used

The Llama model is used to extract chronic disease health keywords, combine the Bert model to encode and align and match the entity words of the chronic disease knowledge graph, convert it into natural description language, and analyze the maximum risk chronic diseases through the Llama model to provide health advice.

Benefits of technology

It improves the flexibility and accuracy of information collection, ensures the comprehensiveness of knowledge matching, provides accurate health advice, and improves the effectiveness of chronic disease health management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120526977A_ABST
    Figure CN120526977A_ABST
Patent Text Reader

Abstract

The invention provides a resident health suggestion recommendation method, system and device based on a chronic disease knowledge graph and a large model and a medium, and belongs to the technical field of health suggestion recommendation. The method comprises the steps that resident health description of a user is responded, and chronic disease health keywords are extracted through a Lma model; coding chronic disease health keywords based on a Bert model, then aligning the chronic disease health keywords with entity words in the chronic disease knowledge graph, and extracting chronic disease related knowledge from the chronic disease knowledge graph; the chronic disease related knowledge is converted into a natural description language, and chronic disease related knowledge description is obtained; the chronic disease related knowledge description and the resident health description are assembled and then input into a Lama model for analysis, and the chronic disease with the maximum risk is obtained; and searching health suggestion knowledge of the highest-risk chronic disease from the chronic disease knowledge graph, and returning the health suggestion knowledge to the user. According to the method, key information is extracted from natural language description of residents by combining the LLaMA model and the Bert model, and accurate health suggestions are provided based on the knowledge graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of health advice recommendation, and specifically relates to a method, system, device and medium for recommending resident health advice based on chronic disease knowledge graph and large model. Background Art

[0002] With the development of knowledge graph technology, the industry has built various mature medical knowledge graphs, such as OMAHA and CMeKG. These knowledge graphs have played a significant role in chronic disease management, especially those based on evidence-based medicine, which have become relatively mature. However, how to apply these mature chronic disease knowledge graphs to chronic disease health management and provide appropriate health recommendations based on residents' chronic disease history and related physical indicators remains a pressing issue.

[0003] Traditional health advice recommendation methods usually rely on fixed input boxes and preset rules, which have certain limitations. For example, users need to enter information in a fixed format, and residents are restricted in their expressions. This is not only inflexible, but may also lead to incomplete or inaccurate information. In addition, traditional recommendation methods often lack a deep semantic understanding of user input information. For example, the chronic disease, symptom, and sign keywords extracted from the input natural language cannot be fully matched with the entity words in the knowledge graph, resulting in knowledge loss, making it difficult to fully utilize the content in the knowledge graph, and the accuracy is not high when analyzing high-risk chronic diseases and giving health advice.

[0004] While medical natural language processing technology continues to advance, enabling functions such as text classification, information extraction, semantic analysis, text generation, and question-answering systems, there is still a lack of effective methods for efficiently integrating knowledge graphs and natural language processing technologies to accurately provide health recommendations for chronic disease prevention and treatment in the context of chronic disease knowledge graphs for health management. While there has been progress in the application of knowledge graphs in healthcare, such as diagnostic assistance, treatment plan recommendations, disease prediction, and medical resource optimization, their specific application in chronic disease health management, providing precise health recommendations based on individual chronic disease history and physical indicators, remains imperfect. Summary of the Invention

[0005] In a first aspect, the present invention provides a method for recommending health advice to residents based on a chronic disease knowledge graph and a large model, comprising the following steps: S1. Respond to the user's description of residents' health and extract chronic disease health keywords through the Llama model; S2. Encode the extracted chronic disease health keywords based on the Bert model, align them with the relevant entity words in the chronic disease knowledge graph, and extract chronic disease-related knowledge from the chronic disease knowledge graph based on the alignment results; S3. Convert the extracted chronic disease-related knowledge into a natural description language to obtain a chronic disease-related knowledge description; S4. Assemble the chronic disease-related knowledge description and the resident health description and input them into the Llama model for analysis to obtain the chronic disease with the greatest risk; S5. Search for health advice knowledge on the chronic diseases with the highest risk from the chronic disease knowledge graph, and return the health advice knowledge to the user in a preset format.

[0006] Furthermore, the specific steps of step S1 are as follows: S11. Construct chronic disease extraction prompt words to guide the extraction of chronic disease health keywords from natural language descriptions; the chronic disease health keywords include chronic disease names, chronic disease symptoms, and chronic disease signs; S12. Obtain the resident's health description, assemble the resident's health description with the chronic disease extraction prompt words, and input the result into the Llama model; S13. Receive the chronic disease health keywords returned by the Llama model.

[0007] Furthermore, the specific steps of step S11 are as follows: S111. Examples of establishing natural language description examples and extracting chronic disease keywords from natural language description examples; S112. Construct chronic disease extraction prompt words for the purpose of extracting chronic disease names, chronic disease symptoms, and chronic disease signs from the target natural language description; S113. Add examples to the prompt words for chronic disease extraction and specify the output format.

[0008] Furthermore, the specific steps of step S2 are as follows: S21. Use the Bert model to extract chronic disease health keywords and encode them according to the preset encoding length; the chronic disease health keywords include chronic disease names, chronic disease symptoms and chronic disease signs; S22. Extract entities related to each chronic disease health keyword from the chronic disease knowledge graph, and encode them using the Bert model according to a preset encoding length to obtain entity codes; the entities include disease entities, symptom entities, and sign entities; S23. Compare the code of each chronic disease health keyword with the code of the corresponding related entity and calculate the distance; S24. Filter out the top N entities with the smallest distance for each chronic disease health keyword as related entity words; S25. Extract chronic disease-related knowledge from the chronic disease knowledge graph based on the extracted relevant entity words, and construct knowledge elements according to the set representation format.

[0009] Furthermore, the specific steps of step S3 are as follows: S31. Definition of knowledge conversion form for natural language conversion to construct representation format of knowledge elements; S32. Use the defined knowledge conversion form to convert each knowledge element into a natural description language in turn; S33. Assemble the natural language descriptions of each knowledge element in sequence to obtain a description of chronic disease-related knowledge.

[0010] Furthermore, the specific steps of step S4 are as follows: S41. Combine the description of chronic disease-related knowledge and the description of residents' health to construct chronic disease analysis prompt words with the purpose of analyzing the chronic diseases with the greatest risk; S42. Input chronic disease analysis prompt words and residents' health descriptions into the Llama model; S43. Receive the highest risk chronic diseases returned by the Llama model.

[0011] Furthermore, the specific steps of step S5 are as follows: S51. Search the chronic disease knowledge graph based on the highest risk chronic disease to obtain health advice knowledge for the highest risk chronic disease; S52. Construct the output result format, assemble the knowledge of chronic diseases with the highest risk and health recommendations according to the output result format, and return it to the user.

[0012] In a second aspect, the present application also provides a resident health advice recommendation system based on a chronic disease knowledge graph and a large model, including: The user interaction module is used to receive the resident health description input by the user, and provide the resident health description in the form of a string to the chronic disease keyword extraction module, and return health advice knowledge to the user; Chronic disease keyword extraction module, used to extract chronic disease health keywords through the Llama model; Chronic disease knowledge graph module, used to store knowledge about complications, symptoms, examinations, and health advice related to chronic diseases; The knowledge query module is used to encode chronic disease health keywords and then align them with relevant entity words in the chronic disease knowledge graph. Based on the alignment results, chronic disease-related knowledge is extracted from the chronic disease knowledge graph, and health advice knowledge for the highest risk chronic diseases is found in the chronic disease knowledge graph. The chronic disease-related knowledge includes complication knowledge, symptom knowledge, and examination knowledge. The high-risk chronic disease recommendation module assembles the chronic disease-related knowledge description and the resident health description and inputs them into the Llama model for analysis to obtain the highest-risk chronic disease; The health advice generation module outputs the health advice knowledge to the user interaction module in a preset format.

[0013] In a third aspect, an embodiment of the present application also provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the method for recommending resident health advice based on a chronic disease knowledge graph and a large model as described in the first aspect are implemented.

[0014] In a fourth aspect, an embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for recommending resident health advice based on a chronic disease knowledge graph and a large model as in the first aspect are implemented.

[0015] It can be seen from the above technical solutions that this application has the following advantages: The method, system, device and medium for recommending resident health advice based on chronic disease knowledge graph and large model provided in this application improve the matching probability between residents' expression content and knowledge base knowledge by integrating Bert model for entity alignment, ensuring that comprehensive and accurate knowledge can be obtained from chronic disease knowledge graph; through Llama model analysis, multi-source knowledge is integrated to accurately analyze high-risk chronic diseases and give targeted health advice, solving the difficulties faced by chronic disease knowledge graph in chronic disease health management applications. Compared with traditional health advice recommendation methods, it allows residents to input health information in the form of free expression, improves the flexibility of interaction, and improves the accuracy of recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for the description. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0017] Figure 1 This is a flow chart of the method for recommending health advice to residents based on the chronic disease knowledge graph and large model of the present invention.

[0018] Figure 2 This is a flow chart of the resident health advice recommendation system based on the chronic disease knowledge graph and large model of the present invention. DETAILED DESCRIPTION

[0019] The specific steps of the resident health advice recommendation method based on the chronic disease knowledge graph and the large model will be described in detail below, and various embodiments of the present disclosure will be described more comprehensively. The present disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but rather the present disclosure should be understood to cover all adjustments, equivalents and / or alternatives that fall within the spirit and scope of the various embodiments of the present disclosure.

[0020] For example, with the development of knowledge graph technology, the industry has now built a variety of mature medical knowledge graphs, such as OMAHA and CMeKG. These knowledge graphs have played an important role in the field of chronic disease management, especially those based on evidence-based medical knowledge, which have reached a relatively mature stage. However, how to effectively apply these mature chronic disease knowledge graphs to chronic disease health management and provide corresponding health advice based on residents' chronic disease history and related physical signs and indicators remains a key issue that needs to be addressed.

[0021] Traditional health advice recommendation methods often rely on fixed input boxes and preset rules, which have obvious limitations. Specifically, users need to enter information in a fixed format, which restricts the expression of residents. This is not only inflexible, but also easily makes the information incomplete or inaccurate. In addition, traditional recommendation methods usually lack the ability to deeply understand the semantics of user input information. For example, when extracting keywords such as chronic diseases, symptoms, and signs from the input natural language, these keywords often cannot be fully matched with the entity words in the knowledge graph, resulting in knowledge loss and difficulty in fully utilizing the rich content in the knowledge graph. Moreover, when analyzing high-risk chronic diseases and giving health advice, its accuracy is not high enough.

[0022] Although medical natural language processing technology continues to develop and has been able to achieve a variety of functions such as text classification, information extraction, semantic analysis, text generation, and question-answering systems, when applying chronic disease knowledge graphs to health management scenarios, there is still a lack of a method that can efficiently integrate knowledge graphs and natural language processing technologies to provide residents with accurate health advice and recommendation services for chronic disease prevention and treatment. Although the application of knowledge graphs in the medical and health field has made certain progress, such as in diagnostic assistance, treatment plan recommendations, disease prediction, and medical resource optimization, the specific application of providing accurate health advice based on an individual's chronic disease history and physical signs in chronic disease health management is still not perfect.

[0023] To address the above issues, this embodiment provides a method for recommending resident health advice based on a chronic disease knowledge graph and a large model. By combining the advantages of the LLaMA model and the Bert model, it extracts key information from residents' natural language descriptions and provides accurate health advice based on the knowledge graph.

[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0025] See also Figure 1 FIG. 1 is a flowchart of a method for recommending resident health advice based on a chronic disease knowledge graph and a large model in a specific embodiment. The method includes the following steps: S1. Respond to the user's description of residents' health and extract chronic disease health keywords through the Llama model; It should be noted that the Llama model is suitable for semantic understanding needs. It can directly analyze residents' freely expressed health descriptions and extract chronic disease health keywords. This breaks the limitations of traditional fixed input boxes and allows residents to conveniently provide health information, improving the efficiency and accuracy of information collection while also enhancing the user experience. S2. Encode the extracted chronic disease health keywords based on the Bert model, align them with the relevant entity words in the chronic disease knowledge graph, and extract chronic disease-related knowledge from the chronic disease knowledge graph based on the alignment results; It should be noted that the Bert model is suitable for semantic representation. By encoding and aligning chronic disease health keywords and knowledge graph entity words, it can solve the problem of inconsistency between user-input keywords and knowledge graph entity words, and improve the success rate of knowledge matching. Extracting chronic disease-related knowledge based on the alignment results can ensure that the acquired knowledge is accurate and comprehensive, providing a data foundation for subsequent analysis. S3. Convert the extracted chronic disease-related knowledge into a natural description language to obtain a chronic disease-related knowledge description; It should be noted that the structured knowledge extracted from the knowledge graph is converted into natural description language to facilitate the understanding and processing of the Llama model. This makes the knowledge presentation more consistent with the expression habits of natural language, preparing the Llama model to integrate residents' health descriptions and chronic disease-related knowledge, thereby conducting in-depth analysis and reasoning. S4. Assemble the chronic disease-related knowledge description and the resident health description and input them into the Llama model for analysis to obtain the chronic disease with the greatest risk; It should be noted that the Llama model is suitable for processing natural language and combining the description of chronic disease-related knowledge with the description of residents' health for analysis. It can make full use of the information of both, comprehensively judge the health status of residents, and accurately identify the chronic diseases with the greatest risk. S5. Search the chronic disease knowledge graph for health advice knowledge related to the highest risk chronic disease, and return the health advice knowledge to the user in a preset format; It should be noted that by searching for corresponding health advice knowledge from the chronic disease knowledge graph and returning it to users in a preset format, clear and specific health advice can be provided to residents, which can reduce the risk of chronic diseases to a certain extent and improve the effectiveness of residents' health management.

[0026] This embodiment starts by responding to residents' health descriptions. Through the interactive collaboration between the Llama model, the Bert model, and the chronic disease knowledge graph, it realizes chronic disease health keyword extraction, knowledge matching and extraction, risk analysis, and health advice output, providing support for accurate chronic disease health management.

[0027] Furthermore, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process in this embodiment, another method for recommending resident health advice based on a chronic disease knowledge graph and a large model is provided, which includes the following steps: S1. Respond to the user's resident health description and extract chronic disease health keywords through the Llama model; the specific steps of step S1 are as follows: S11. Construct chronic disease extraction prompt words to guide the extraction of chronic disease health keywords from natural language descriptions; the chronic disease health keywords include chronic disease names, chronic disease symptoms, and chronic disease signs; For example, the prompt words for extracting chronic diseases are as follows: 'instruction':"""Please extract the chronic disease-related keywords (diag), symptoms (symptom), and signs (sign) from the following description and output them in JSON format.

[0028] ””” S12. Obtain the resident's health description, assemble the resident's health description with the chronic disease extraction prompt words, and input the result into the Llama model; For example, the health of residents is described as follows: "I was diagnosed with diabetes three years ago. I developed fatigue symptoms a day ago and my blood pressure was 100-160 mmHg." The format for assembling the resident health description and chronic disease advance warning phrases is as follows: { 'instruction':"""Please extract the chronic disease-related keywords (diag), symptoms (symptom), and signs (sign) from the following description and output them in JSON format.

[0029] ””” 'input':"""I was diagnosed with diabetes three years ago. I developed fatigue symptoms a day ago and my blood pressure is 100-160 mmHg.""" } S13. Receive the chronic disease health keywords returned by the Llama model; For example, the assembled content is input into the Llama model, and the output is as follows: “””{'diag':['diabetes'],'symptom':['fatigue'],'sign':['blood pressure']}””” S2. Encode the extracted chronic disease health keywords based on the Bert model, align them with the relevant entity words in the chronic disease knowledge graph, and extract chronic disease-related knowledge from the chronic disease knowledge graph based on the alignment results; the specific steps of step S2 are as follows: S21. Use the Bert model to extract chronic disease health keywords and encode them according to the preset encoding length; the chronic disease health keywords include chronic disease names, chronic disease symptoms and chronic disease signs; For example, The extracted chronic disease health keywords are encoded through Bert, and the results in the following format are obtained, where n is the specified encoding length. In order to save computing resources while meeting the semantic expression requirements, it is generally set to 128.

[0030] { 'diag':[('diabetes',[x11,x12,x13...,x1n])], 'symptom':[('fatigue',[y11,y12,y13...,y1n])], 'sign':[('blood pressure',[z11,z12,z13...,z1n])] } S22. Extract entities related to each chronic disease health keyword from the chronic disease knowledge graph, and encode them using the Bert model according to a preset encoding length to obtain entity codes; the entities include disease entities, symptom entities, and sign entities; For example, disease entities, symptom entities, and sign entities are extracted from the chronic disease knowledge graph, and n-bit encoding is performed using the Bert model. The results are as follows: { 'diag':[('D1',[d11,d12,d13...,d1n]),('D2',[d21,d22,d23...,d2n])...], 'symptom':[('S1',[s11,s12,s13...,s1n]),('S2',[s21,s22,s23...,s2n])...], 'sign':[('G1',[g11,g12,g13...,g1n]),('G2',[g21,g22,g23...,g2n])...] } S23. Compare the code of each chronic disease health keyword with the code of the corresponding related entity and calculate the distance; Specifically, the keyword codes of the chronic disease names are compared with the entity codes of each disease entity, the keyword codes of the chronic disease symptoms are compared with the entity codes of each symptom entity, and the keywords of the chronic disease signs are compared with the entity codes of each sign entity; S24. Filter out the top N entities with the smallest distance for each chronic disease health keyword as related entity words; Specifically, for chronic disease names, the top N disease entities with the smallest distances are screened out from each disease entity; for chronic disease symptoms, the top N symptom entities with the smallest distances are screened out from each symptom entity; for chronic disease signs, the top N sign entities with the smallest distances are screened out from each sign entity; For example, each chronic disease health keyword in step S21 is compared with the entities of the same type in step S22 one by one, and the Euclidean distance is calculated. For each chronic disease health keyword, the three entity words with the smallest Euclidean distance are selected as related entity words, and the following results are obtained: { 'diag':[('diabetes',[D3,D5,D7])], 'symptom':[('fatigue',[S2,S4,S7])], 'sign':[('blood pressure',[G4,G7,G9])] } S25. Extract chronic disease-related knowledge from the chronic disease knowledge graph based on the extracted relevant entity words, and construct knowledge elements according to the set representation format; Specifically, from the chronic disease knowledge graph, relevant knowledge about complications based on the N selected disease entities, relevant knowledge about states based on the N selected symptom entities, and relevant knowledge about diseases based on the N selected sign entities as examination items are extracted; For example, relevant knowledge is extracted from the chronic disease knowledge graph. The knowledge content includes the knowledge related to complications based on the disease list [D3, D5, D7], the knowledge related to symptoms based on [S2, S4, S7], and the knowledge related to examination items based on [G4, G7, G9]. The following knowledge element results are obtained: [(Diag1, complications, D3), (Diag2, complications, D5), (Diag3, complications, D7), (Diag1, symptoms, S2), (Diag1, symptoms, S4), (Diag1, symptoms, S7), (Dia2, related examinations, G4), (Diag3, related examinations, G7), (Diag1, related examinations, G9)] S3. Convert the extracted chronic disease-related knowledge into a natural description language to obtain a chronic disease-related knowledge description; the specific steps of step S3 are as follows: S31. Definition of knowledge conversion form for natural language conversion to construct representation format of knowledge elements; The obtained knowledge elements are converted into natural language descriptions so that they can be input into the Llama model for analysis and reasoning together with the residents' natural language expressions. The specific method is as follows: Each knowledge element is transformed one by one, and the transformation method is as follows: (Entity1,relationship,Entity2)=>”Entity1’s relationship is Entity2” S32. Use the defined knowledge conversion form to convert each knowledge element into a natural description language in turn; S33. Sequentially assemble the natural language descriptions of each knowledge element to obtain a knowledge description related to the chronic disease; The transformation results are assembled one by one, and the assembly results are as follows: "The complication of Diag1 is D3; the complication of Diag2 is D5; the complication of Diag3 is D7; the symptom of Diag1 is S2; the symptom of Diag1 is S4; the symptom of Diag1 is S7; the related examination of Diag2 is G4; the related examination of Diag3 is G7; the related examination of Diag1 is G9" S4. Assemble the chronic disease-related knowledge description and the resident health description and input them into the Llama model for analysis to obtain the chronic disease with the highest risk. The specific steps of step S4 are as follows: S41. Combine the description of chronic disease-related knowledge and the description of residents' health to construct chronic disease analysis prompt words with the purpose of analyzing the chronic diseases with the greatest risk; For example, the chronic disease analysis prompt words are as follows: 'instruction':"""It is known that the complication of Diag1 is D3; the complication of Diag2 is D5; the complication of Diag3 is D7; the symptom of Diag1 is S2; the symptom of Diag1 is S4; the symptom of Diag1 is S7; the related examination of Diag2 is G4; the related examination of Diag3 is G7; the related examination of Diag1 is G9. As a doctor, please analyze the chronic diseases with the highest risk among residents based on their health descriptions and output the names of the chronic diseases.""" S42. Input chronic disease analysis prompt words and residents' health descriptions into the Llama model; { 'instruction':"""It is known that the complication of Diag1 is D3; the complication of Diag2 is D5; the complication of Diag3 is D7; the symptom of Diag1 is S2; the symptom of Diag1 is S4; the symptom of Diag1 is S7; the related examination of Diag2 is G4; the related examination of Diag3 is G7; the related examination of Diag1 is G9. As a doctor, please analyze the chronic diseases with the highest risk among residents based on their health descriptions and output the names of the chronic diseases.""" 'input':"""I was diagnosed with diabetes three years ago. I developed fatigue symptoms a day ago and my blood pressure is 100-160 mmHg.""" } S43. Receive the highest risk chronic diseases returned by the Llama model; The format of the highest risk chronic diseases returned by the Llama model is as follows: {'output':”””Diag1”””} S5. Search the chronic disease knowledge graph for health advice knowledge related to the highest risk chronic disease, and return the health advice knowledge to the user in a preset format. The specific steps of step S5 are as follows: S51. Search the chronic disease knowledge graph based on the highest risk chronic disease to obtain health advice knowledge for the highest risk chronic disease; For example, the health advice knowledge is as follows: (Diag1, health advice, health_advice) S52. Build an output result format, assemble the knowledge about the highest-risk chronic diseases and health recommendations according to the output result format, and return it to the user; The output results are as follows: "Based on your health description, you are at greatest risk for Diag1. Health_advice is recommended. I wish you good health." In an embodiment of the present invention, based on step S11, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner.

[0031] S111. Examples of establishing natural language description examples and extracting chronic disease keywords from natural language description examples; S112. Construct chronic disease extraction prompt words for the purpose of extracting chronic disease names, chronic disease symptoms, and chronic disease signs from the target natural language description; S113. Add examples to the chronic disease extraction prompt words and specify the output format; For example, examples of establishing a natural language description example and extracting chronic disease keywords from the natural language description example are as follows: For example, if the description is "I have a history of chronic hypertension. I have experienced dizziness in the past two days and my blood pressure is 110-140 mmHg", the extracted result is "{'diag':['hypertension'],'symptom':['dizziness'],'sign':['blood pressure']}" To extract chronic disease names, symptoms, and signs from the target natural language description, we constructed a chronic disease extraction prompt word, added examples, and specified the output in JSON format. { 'instruction':"""Please extract the chronic disease-related keywords (diag), symptoms (symptom), and signs (sign) from the following description and output them in JSON format.

[0032] For example, if the description is "I have a history of chronic hypertension. I have experienced dizziness in the past two days and my blood pressure is 110-140 mmHg", the extracted result is "{'diag':['hypertension'],'symptom':['dizziness'],'sign':['blood pressure']}" ””” 'input':"""I was diagnosed with diabetes three years ago. I developed fatigue symptoms a day ago and my blood pressure is 100-160 mmHg.""" }.

[0033] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0034] like Figure 2As shown, the following is an embodiment of the resident health advice recommendation system based on chronic disease knowledge graph and big model provided by the embodiment of the present disclosure. This system and the resident health advice recommendation method based on chronic disease knowledge graph and big model in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the resident health advice recommendation system based on chronic disease knowledge graph and big model, please refer to the embodiment of the resident health advice recommendation method based on chronic disease knowledge graph and big model.

[0035] The system includes: The user interaction module is used to receive the resident health description input by the user, and provide the resident health description in the form of a string to the chronic disease keyword extraction module, and return health advice knowledge to the user; Chronic disease keyword extraction module, used to extract chronic disease health keywords through the Llama model; Chronic disease knowledge graph module, used to store knowledge about complications, symptoms, examinations, and health advice related to chronic diseases; The knowledge query module is used to encode chronic disease health keywords and then align them with relevant entity words in the chronic disease knowledge graph. Based on the alignment results, chronic disease-related knowledge is extracted from the chronic disease knowledge graph, and health advice knowledge for the highest risk chronic diseases is found in the chronic disease knowledge graph. The chronic disease-related knowledge includes complication knowledge, symptom knowledge, and examination knowledge. The high-risk chronic disease recommendation module assembles the chronic disease-related knowledge description and the resident health description and inputs them into the Llama model for analysis to obtain the highest-risk chronic disease; The health advice generation module outputs the health advice knowledge to the user interaction module in a preset format.

[0036] It should be noted that the interface parameter format of the chronic disease keyword extraction module is shown in Table 1: Table 1

[0037] The chronic disease knowledge graph module uses the industry's more mature chronic disease knowledge graph, and the knowledge is stored in a MySQL database. The storage table structure is shown in Table 2 below: Table 2

[0038] The knowledge query module first performs entity alignment and obtains the relevant knowledge graph triple knowledge; then it performs knowledge transformation, converting the triple knowledge into natural language description, and inputs the transformed natural language description into the high-risk chronic disease recommendation module; the knowledge graph acquisition interface is shown in Table 3: Table 3

[0039] The interface format of the high-risk chronic disease recommendation module is shown in Table 4: Table 4

[0040] The number of interfaces of the health advice generation module is shown in Table 5 below: Table 5

[0041] This embodiment realizes the full process automation from user input to health advice output through the interactive collaboration of various modules; the user interaction module can improve the user experience, and the chronic disease keyword extraction module, knowledge query module, high-risk chronic disease recommendation module and health advice generation module cooperate with each other to ensure the operation efficiency of the system.

[0042] The method for recommending resident health advice based on a chronic disease knowledge graph and a large model provided in the embodiments of the present application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of the present invention does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently. In the embodiments of the present invention, electronic devices include but are not limited to laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0043] The electronic device may include a processor, an external memory interface, an internal memory, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, a wireless communication module, an audio module, a speaker, a microphone, a sensor module, a button, a camera, a display, and a SIM card interface, etc.

[0044] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0045] A processor may include one or more processing units, such as a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0046] The processor can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on the instruction opcode and timing signal to complete the control of instruction fetching and execution.

[0047] The processor may also include a memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or is reusing. If the processor needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.

[0048] The above-mentioned electronic device implements the method of recommending resident health advice based on chronic disease knowledge graph and large model of this application, which responds to the user's resident health description, and extracts chronic disease health keywords through the Llama model; encodes the extracted chronic disease health keywords based on the Bert model, and then aligns them with the relevant entity words in the chronic disease knowledge graph, and extracts chronic disease-related knowledge from the chronic disease knowledge graph according to the alignment results; converts the extracted chronic disease-related knowledge into natural description language to obtain chronic disease-related knowledge description; assembles the chronic disease-related knowledge description with the resident health description and inputs it into the Llama model for analysis to obtain the maximum risk chronic disease; searches for health advice knowledge for the maximum risk chronic disease from the chronic disease knowledge graph, and returns the health advice knowledge to the user in a preset format. The technical solution achieves the beneficial effect of extracting key information from residents' natural language descriptions and providing accurate health advice based on the knowledge graph by combining the advantages of the LLaMA model and the Bert model.

[0049] The storage medium provided in this application stores a program product that can implement a method for recommending health advice to residents based on a chronic disease knowledge graph and a large model.

[0050] The method for recommending resident health advice based on the chronic disease knowledge graph and large model includes: responding to the user's resident health description and extracting chronic disease health keywords through the Llama model; encoding the extracted chronic disease health keywords based on the Bert model, and then aligning them with relevant entity words in the chronic disease knowledge graph, and extracting chronic disease-related knowledge from the chronic disease knowledge graph according to the alignment results; converting the extracted chronic disease-related knowledge into a natural description language to obtain a chronic disease-related knowledge description; assembling the chronic disease-related knowledge description with the resident health description and inputting it into the Llama model for analysis to obtain the chronic disease with the greatest risk; searching for health advice knowledge for the chronic disease with the greatest risk from the chronic disease knowledge graph, and returning the health advice knowledge to the user in a preset format.

[0051] In some possible implementations, the method for recommending resident health advice based on chronic disease knowledge graph and large model disclosed herein can be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps described in the above "Exemplary Method" section of this specification according to various exemplary implementations of the present disclosure.

[0052] The storage medium of the present disclosure can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0053] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for recommending health advice to residents based on chronic disease knowledge graph and large model, characterized by: The steps include: S1. Respond to the user's description of residents' health and extract chronic disease health keywords through the Llama model; S2. Encode the extracted chronic disease health keywords based on the Bert model, align them with the relevant entity words in the chronic disease knowledge graph, and extract chronic disease-related knowledge from the chronic disease knowledge graph based on the alignment results; S3. Convert the extracted chronic disease-related knowledge into a natural description language to obtain a chronic disease-related knowledge description; S4. Assemble the chronic disease-related knowledge description and the resident health description and input them into the Llama model for analysis to obtain the chronic disease with the greatest risk; S5. Search for health advice knowledge on the chronic diseases with the highest risk from the chronic disease knowledge graph, and return the health advice knowledge to the user in a preset format.

2. The method for recommending health advice to residents based on chronic disease knowledge graph and large model according to claim 1 is characterized in that: The specific steps of step S1 are as follows: S11. Construct chronic disease extraction prompt words to guide the extraction of chronic disease health keywords from natural language descriptions; the chronic disease health keywords include chronic disease names, chronic disease symptoms, and chronic disease signs; S12. Obtain the resident's health description, assemble the resident's health description with the chronic disease extraction prompt words, and input the result into the Llama model; S13. Receive the chronic disease health keywords returned by the Llama model.

3. The method for recommending residents' health advice based on chronic disease knowledge graph and large model according to claim 2 is characterized in that: The specific steps of step S11 are as follows: S111. Examples of establishing natural language description examples and extracting chronic disease keywords from natural language description examples; S112. Construct chronic disease extraction prompt words for the purpose of extracting chronic disease names, chronic disease symptoms, and chronic disease signs from the target natural language description; S113. Add examples to the prompt words for chronic disease extraction and specify the output format.

4. The method for recommending health advice to residents based on chronic disease knowledge graph and large model according to claim 2 is characterized in that: The specific steps of step S2 are as follows: S21. Use the Bert model to extract chronic disease health keywords and encode them according to the preset encoding length; the chronic disease health keywords include chronic disease names, chronic disease symptoms and chronic disease signs; S22. Extract entities related to each chronic disease health keyword from the chronic disease knowledge graph, and encode them using the Bert model according to a preset encoding length to obtain entity codes; the entities include disease entities, symptom entities, and sign entities; S23. Compare the code of each chronic disease health keyword with the code of the corresponding related entity and calculate the distance; S24. Filter out the top N entities with the smallest distance for each chronic disease health keyword as related entity words; S25. Extract chronic disease-related knowledge from the chronic disease knowledge graph based on the extracted relevant entity words, and construct knowledge elements according to the set representation format.

5. The method for recommending residents' health advice based on chronic disease knowledge graph and large model according to claim 4 is characterized in that: The specific steps of step S3 are as follows: S31. Definition of knowledge conversion form for natural language conversion to construct representation format of knowledge elements; S32. Use the defined knowledge conversion form to convert each knowledge element into a natural description language in turn; S33. Assemble the natural language descriptions of each knowledge element in sequence to obtain a description of chronic disease-related knowledge.

6. The method for recommending health advice to residents based on chronic disease knowledge graph and large model according to claim 5 is characterized in that: The specific steps of step S4 are as follows: S41. Combine the description of chronic disease-related knowledge and the description of residents' health to construct chronic disease analysis prompt words with the purpose of analyzing the chronic diseases with the greatest risk; S42. Input chronic disease analysis prompt words and residents' health descriptions into the Llama model; S43. Receive the highest risk chronic diseases returned by the Llama model.

7. The method for recommending residents' health advice based on chronic disease knowledge graph and large model according to claim 6 is characterized in that: The specific steps of step S5 are as follows: S51. Search the chronic disease knowledge graph based on the highest risk chronic disease to obtain health advice knowledge for the highest risk chronic disease; S52. Construct the output result format, assemble the knowledge of chronic diseases with the highest risk and health recommendations according to the output result format, and return it to the user.

8. A resident health advice recommendation system based on chronic disease knowledge graph and large model, characterized by: include: The user interaction module is used to receive the resident health description input by the user, and provide the resident health description in the form of a string to the chronic disease keyword extraction module, and return health advice knowledge to the user; Chronic disease keyword extraction module, used to extract chronic disease health keywords through the Llama model; Chronic disease knowledge graph module, used to store knowledge about complications, symptoms, examinations, and health advice related to chronic diseases; The knowledge query module is used to encode chronic disease health keywords and then align them with relevant entity words in the chronic disease knowledge graph. Based on the alignment results, chronic disease-related knowledge is extracted from the chronic disease knowledge graph, and health advice knowledge for the highest risk chronic diseases is found in the chronic disease knowledge graph. The chronic disease-related knowledge includes knowledge about complications, symptoms, and examinations; The high-risk chronic disease recommendation module assembles the chronic disease-related knowledge description and the resident health description and inputs them into the Llama model for analysis to obtain the highest-risk chronic disease; The health advice generation module outputs the health advice knowledge to the user interaction module in a preset format.

9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the program, it implements the steps of the method for recommending resident health advice based on a chronic disease knowledge graph and a large model as described in any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for recommending resident health advice based on a chronic disease knowledge graph and a large model are implemented as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Full-cycle path chronic disease management system and method based on artificial intelligence

    CN120748652A