A novel consulting method, device and electronic equipment

By constructing a dietary therapy and health knowledge graph and using graph databases and deep learning technology, the accuracy of dietary therapy and health information is solved, and accurate dietary therapy and health advice is provided to ensure the safety and reliability of information.

CN112650857BActive Publication Date: 2024-11-01SHANGHAI ZHUOFAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011578614.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-28
Publication Date
2024-11-01
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

When people undergo diet therapy and health, it is difficult to obtain accurate and reliable information, which may lead to serious consequences.

Method used

By obtaining information and data from the target field, entity extraction and relationship extraction are carried out, knowledge graphs are constructed, and technologies such as graph databases, knowledge extraction algorithms, similarity algorithms, and two-way long and short-term memory networks are used to identify entities and intentions of consulting problems, and obtain Corresponding answer.

Benefits of technology

It provides accurate, safe and reliable dietary therapy and health information and scientific basis as a reference guide for people's dietary therapy and health.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112650857B_ABST
    Figure CN112650857B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and in particular to a novel consulting method, device and electronic device, including: obtaining a target domain information base by acquiring relevant information and data in a target domain; performing entity extraction and relationship extraction on the target domain information base, constructing a target domain knowledge graph, and storing the target domain knowledge graph in a graph database; obtaining consulting questions, and preprocessing the consulting questions; identifying the entities of the consulting questions and the intentions of the consulting questions, and obtaining triples of the target domain knowledge graph; obtaining answers corresponding to the consulting questions according to the triples of the target domain knowledge graph and consulting answer templates. The present invention, as a reference guide for people's diet therapy and health preservation, accurately provides safe and reliable diet therapy and health preservation methods and relevant information such as the scientific basis contained therein.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a novel consulting method, device and electronic equipment. Background Art

[0002] In recent years, people are paying more and more attention to how to take care of their bodies in daily life. The concept of "medicine is three-point poison, take less medicine when you are not sick" is becoming more and more popular. The benefits of scientific diet therapy for physical and mental health are obvious. Nowadays, most people get relevant information based on what others say or on the Internet, but there are great problems with the accuracy and practicality of this information. If the information on the Internet or others is misused for diet therapy, serious consequences may occur. How to obtain accurate and reliable information related to diet therapy is the main problem. Therefore, a new consulting method, device and electronic device for providing people with accurate information about diet therapy are proposed. Summary of the invention

[0003] The present invention provides a novel consultation method, device and electronic device, which are used as a reference guide for people's diet therapy and health preservation, and provide people with fast and agile diet therapy and health preservation methods and related suggestions.

[0004] The embodiment of this specification provides a new consultation method, including:

[0005] By acquiring relevant information and data in the target field, an information database of the target field is obtained;

[0006] Perform entity extraction and relationship extraction on the target domain information base, construct a target domain knowledge graph, and store the target domain knowledge graph in a graph database;

[0007] Obtain consulting questions and pre-process the consulting questions;

[0008] Identify the entity of the consulting question and the intention of the consulting question, and obtain triples of the target domain knowledge graph;

[0009] According to the triples of the target domain knowledge graph and the consultation answer template, an answer corresponding to the consultation question is obtained.

[0010] Preferably, the entity extraction and relationship extraction of the target domain information database includes:

[0011] A knowledge extraction algorithm is used to extract entities in the target domain information database and relationships in the target domain information database.

[0012] Preferably, the construction of the target domain knowledge graph includes:

[0013] A similarity algorithm is used to perform knowledge fusion on entities that reach a preset similarity threshold;

[0014] A similarity algorithm is used to perform knowledge fusion on the relationships that reach the preset similarity threshold;

[0015] The target domain knowledge graph is constructed based on the fused entities and the fused relationships.

[0016] Preferably, the pre-processing of the consulting question includes:

[0017] Detecting stop words and / or punctuation marks present in the consulting question;

[0018] The stop words and / or the punctuation marks are deleted to obtain the entity of the consulting question and the intent of the consulting question.

[0019] Preferably, the identifying the entity of the consulting question and the intention of the consulting question includes:

[0020] Define entity dictionary;

[0021] Combining a bidirectional long short-term memory network and a conditional random field algorithm, and performing entity recognition on the consulting question according to the entity dictionary, to obtain a candidate entity set;

[0022] The intention of the consulting question is identified through the bidirectional long short-term memory network to obtain a set of attributes to be selected.

[0023] Preferably, the step of obtaining the triple of the target domain knowledge graph includes:

[0024] The candidate entity set is queried in the graph database using a graph query language to obtain candidate triples;

[0025] Using the similarity algorithm to link the set of attributes to be selected to specific attributes of the attribute annotation library;

[0026] The candidate triples are filtered and screened by the specific attributes to obtain the triples of the knowledge graph.

[0027] Preferably, it also includes:

[0028] Get consultation logs;

[0029] Performing a heat analysis on the keywords of the consulting questions in the consulting log;

[0030] Using a collaborative filtering algorithm to provide a recommended question entry for the keyword that has reached a preset popularity, the recommended question entry includes a recommended question entry corresponding to the consulting question;

[0031] The recommended question entry is used to provide answers corresponding to the consulting questions.

[0032] Preferably, obtaining the consultation log includes:

[0033] Collecting a plurality of the consulting questions and caching the plurality of the consulting questions;

[0034] The cached plurality of consulting questions are written into a storage space in a preset manner to obtain the consulting log.

[0035] The embodiment of this specification also provides a new consulting device, which is characterized by comprising:

[0036] The information acquisition module obtains the target domain information base by acquiring relevant information and data of the target domain;

[0037] A graph construction module, which extracts entities and relationships from the target domain information base, constructs a target domain knowledge graph, and stores the target domain knowledge graph in a graph database;

[0038] A question processing module, which obtains consulting questions and pre-processes the consulting questions;

[0039] A question identification module identifies the entity of the consulting question and the intention of the consulting question, and obtains a triple of the target domain knowledge graph;

[0040] The answer query module obtains the answer corresponding to the consulting question according to the triples of the target domain knowledge graph and the consulting answer template.

[0041] Preferably, the entity extraction and relationship extraction of the target domain information database includes:

[0042] A knowledge extraction algorithm is used to extract entities in the target domain information database and relationships in the target domain information database.

[0043] Preferably, the construction of the target domain knowledge graph includes:

[0044] A similarity algorithm is used to perform knowledge fusion on entities that reach a preset similarity threshold;

[0045] A similarity algorithm is used to perform knowledge fusion on the relationships that reach the preset similarity threshold;

[0046] The target domain knowledge graph is constructed based on the fused entities and the fused relationships.

[0047] Preferably, the pre-processing of the consulting question includes:

[0048] Detecting stop words and / or punctuation marks present in the consulting question;

[0049] The stop words and / or the punctuation marks are deleted to obtain the entity of the consulting question and the intent of the consulting question.

[0050] Preferably, the identifying the entity of the consulting question and the intention of the consulting question includes:

[0051] Define entity dictionary;

[0052] Combining a bidirectional long short-term memory network and a conditional random field algorithm, and performing entity recognition on the consulting question according to the entity dictionary, to obtain a candidate entity set;

[0053] The intention of the consulting question is identified through the bidirectional long short-term memory network to obtain a set of attributes to be selected.

[0054] Preferably, the step of obtaining the triple of the target domain knowledge graph includes:

[0055] The candidate entity set is queried in the graph database using a graph query language to obtain candidate triples;

[0056] Using the similarity algorithm to link the set of attributes to be selected to specific attributes of the attribute annotation library;

[0057] The candidate triples are filtered and screened by the specific attributes to obtain the triples of the knowledge graph.

[0058] Preferably, it also includes:

[0059] Get consultation logs;

[0060] Performing a heat analysis on the keywords of the consulting questions in the consulting log;

[0061] Using a collaborative filtering algorithm to provide a recommended question entry for the keyword that has reached a preset popularity, the recommended question entry includes a recommended question entry corresponding to the consulting question;

[0062] The recommended question entry is used to provide answers corresponding to the consulting questions.

[0063] Preferably, obtaining the consultation log includes:

[0064] Collecting a plurality of the consulting questions and caching the plurality of the consulting questions;

[0065] The cached plurality of consulting questions are written into a storage space in a preset manner to obtain the consulting log.

[0066] An electronic device, wherein the electronic device comprises:

[0067] A processor and a memory storing computer executable instructions, wherein when the executable instructions are executed, the processor executes any of the methods described above.

[0068] A computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the one or more programs implement any of the methods described above.

[0069] Its beneficial effects are:

[0070] As a reference guide for people's diet therapy and health preservation, the present invention accurately provides safe and reliable diet therapy and health preservation methods as well as the scientific basis contained therein and other related information. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0072] Figure 1 A schematic diagram of the principle of a new consulting method provided in the embodiments of this specification;

[0073] Figure 2 A schematic diagram of the structure of a novel consulting device provided in the embodiments of this specification;

[0074] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification;

[0075] Figure 4 A schematic diagram of a computer-readable medium provided for an embodiment of this specification. DETAILED DESCRIPTION

[0076] Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. However, exemplary embodiments can be implemented in a variety of forms, and should not be construed as limiting the present invention to the embodiments set forth herein. On the contrary, providing these exemplary embodiments enables the present invention to be more comprehensive and complete, and is more convenient for fully conveying the inventive concept to those skilled in the art. The same reference numerals in the figures represent the same or similar elements, components or parts, and thus their repeated description will be omitted.

[0077] Under the premise of being consistent with the technical concept of the present invention, the features, structures, characteristics or other details described in a specific embodiment do not exclude that they can be combined in one or more other embodiments in a suitable manner.

[0078] In the description of specific embodiments, the features, structures, characteristics or other details described in the present invention are intended to enable those skilled in the art to fully understand the embodiments. However, it does not exclude that those skilled in the art can practice the technical solutions of the present invention without one or more of the specific features, structures, characteristics or other details.

[0079] The figures shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be performed in the order described. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0080] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0081] The term "and / or" or "and / or" includes all combinations of any one or more of the associated listed items.

[0082] Reference Figure 1 A schematic diagram of a novel consultation method provided in the embodiments of this specification includes:

[0083] S101: Obtaining a target domain information database by acquiring relevant information and data of the target domain;

[0084] In a preferred embodiment of the present invention, relevant information about diet therapy and health preservation is obtained from relevant websites in the target field, and the obtained relevant information is used as a target field information database to provide health practitioners with a source of answers for consultation. Among them, the target field includes the field of diet therapy and health preservation.

[0085] S102: extracting entities and relationships from the target domain information base, constructing a target domain knowledge graph, and storing the target domain knowledge graph in a graph database;

[0086] In a preferred embodiment of the present invention, entity extraction is performed on the target domain information database, that is, named entities such as health-preserving medicinal materials, medicinal material names, etc. are extracted from the target domain information database, and then these entities are classified, thereby completing the entity extraction of the target domain information database; by extracting the semantic relationship between two or more entities from the target domain information database, the relationship extraction of the target domain information database is completed, wherein the relationship extraction adopts at least one of a template-based method, supervised learning, semi-supervised learning, and unsupervised learning to extract the semantic relationship between entities. At the same time, a similarity algorithm is used to perform knowledge fusion on entities that reach a preset similarity threshold, and a similarity algorithm is used to perform knowledge fusion on relationships that reach a preset similarity threshold; thereby constructing a target domain knowledge graph based on the fused entities and the fused relationships, wherein the target domain knowledge graph includes a diet therapy health knowledge graph.

[0087] S103: Obtain consulting questions and pre-process the consulting questions;

[0088] In a preferred embodiment of the present invention, the health practitioner initiates consulting questions through the platform, so that the platform can obtain consulting questions about diet therapy and health care; before performing entity recognition and title image recognition on the consulting questions, the obtained consulting questions need to be preprocessed, wherein the preprocessing of the consulting questions includes detecting stop words and / or punctuation marks present in the consulting questions, and then deleting the detected stop words and / or punctuation marks to obtain the entity of the consulting question and the intention of the consulting question, thereby completing the preprocessing of the consulting questions.

[0089] S104: Identify the entity of the consulting question and the intention of the consulting question, and obtain triples of the target domain knowledge graph;

[0090] In a preferred embodiment of the present invention, an entity dictionary is first defined, and then, a bidirectional long short-term memory network and a conditional random field algorithm are combined, and entity recognition is performed on the preprocessed consulting questions according to the entity dictionary to obtain a set of entities to be selected; finally, intent recognition is performed on the preprocessed consulting questions through a bidirectional long short-term memory network to obtain a set of attributes to be selected, thereby completing entity recognition of the consulting questions and intent recognition of the consulting questions.

[0091] Furthermore, according to the target domain knowledge graph and query template, and in combination with the Cypher language, the graph database is queried to obtain the candidate triples; further, a similarity algorithm is used to link the candidate attribute set to the specific attributes of the attribute annotation library; the candidate triples are filtered and screened by the specific attributes to obtain the final knowledge graph triples, wherein the graph database includes a neo4j database.

[0092] S105: Obtain an answer corresponding to the consulting question based on the triples of the target domain knowledge graph and the consulting answer template.

[0093] In a preferred embodiment of the present invention, based on the consulting question, combined with the triples of the target domain knowledge graph and the consulting answer template, the answer corresponding to the consulting question is obtained to provide accurate information for the health practitioner.

[0094] Furthermore, the entity extraction and relationship extraction of the target domain information database includes:

[0095] A knowledge extraction algorithm is used to extract entities in the target domain information database and relationships in the target domain information database.

[0096] In a preferred embodiment of the present invention, entity extraction is performed on the target domain information database, that is, a knowledge extraction algorithm is used to extract named entities in the target domain information database, such as health-preserving medicinal materials, medicinal material names, etc., and then these entities are classified, thereby completing the entity extraction of the target domain information database; a knowledge extraction algorithm is used to extract the semantic relationship between two or more entities from the target domain information database to complete the relationship extraction of the target domain information database.

[0097] Furthermore, constructing the target domain knowledge graph includes:

[0098] A similarity algorithm is used to perform knowledge fusion on entities that reach a preset similarity threshold;

[0099] A similarity algorithm is used to perform knowledge fusion on the relationships that reach the preset similarity threshold;

[0100] The target domain knowledge graph is constructed based on the fused entities and the fused relationships.

[0101] In a preferred embodiment of the present invention, a similarity algorithm is used to perform knowledge fusion on entities that reach a preset similarity threshold, and a similarity algorithm is used to perform knowledge fusion on relationships that reach a preset similarity threshold; thereby constructing a target domain knowledge graph based on the fused entities and the fused relationships, wherein the target domain knowledge graph includes a diet therapy and health knowledge graph.

[0102] Furthermore, the pre-processing of the consultation question includes:

[0103] Detecting stop words and / or punctuation marks present in the consulting question;

[0104] The stop words and / or the punctuation marks are deleted to obtain the entity of the consulting question and the intent of the consulting question.

[0105] In a preferred embodiment of the present invention, preprocessing of consulting questions includes detecting stop words and / or punctuation marks present in the consulting questions, and then deleting the detected stop words and / or punctuation marks to obtain the entity of the consulting questions and the intent of the consulting questions, thereby completing the preprocessing of the consulting questions.

[0106] Furthermore, the identifying of the entity of the consulting question and the intention of the consulting question includes:

[0107] Define entity dictionary;

[0108] Combining a bidirectional long short-term memory network and a conditional random field algorithm, and performing entity recognition on the consulting question according to the entity dictionary, to obtain a candidate entity set;

[0109] The intention of the consulting question is identified through the bidirectional long short-term memory network to obtain a set of attributes to be selected.

[0110] In a preferred embodiment of the present invention, an entity dictionary is first defined, and then, a bidirectional long short-term memory network and a conditional random field algorithm are combined, and entity recognition is performed on the preprocessed consulting questions according to the entity dictionary to obtain a set of entities to be selected; finally, intent recognition is performed on the preprocessed consulting questions through a bidirectional long short-term memory network to obtain a set of attributes to be selected, thereby completing entity recognition of the consulting questions and intent recognition of the consulting questions.

[0111] Furthermore, the step of obtaining the triple of the target domain knowledge graph includes:

[0112] The candidate entity set is queried in the graph database using a graph query language to obtain candidate triples;

[0113] Using the similarity algorithm to link the set of attributes to be selected to specific attributes of the attribute annotation library;

[0114] The candidate triples are filtered and screened by the specific attributes to obtain the triples of the knowledge graph.

[0115] In a preferred embodiment of the present invention, based on the target domain knowledge graph and query template, and in combination with the Cypher language, a graph database is queried to obtain candidate triples; a similarity algorithm is used to link the candidate attribute set to specific attributes of the attribute annotation library; then the candidate triples are filtered and screened by the specific attributes to obtain the final knowledge graph triples, wherein the graph database includes a neo4j database.

[0116] Furthermore, it also includes:

[0117] Get consultation logs;

[0118] Performing a heat analysis on the keywords of the consulting questions in the consulting log;

[0119] Using a collaborative filtering algorithm to provide a recommended question entry for the keyword that has reached a preset popularity, the recommended question entry includes a recommended question entry corresponding to the consulting question;

[0120] The recommended question entry is used to provide answers corresponding to the consulting questions.

[0121] In a preferred embodiment of the present invention, the platform records the consulting questions raised by visitors during their visits, then caches the consulting questions, writes the cached multiple consulting questions into a storage space in a preset manner, and obtains a consulting log, wherein the preset manner includes but is not limited to an asynchronous IO manner; after obtaining the consulting log, a heat analysis is performed on the keywords of the consulting questions in the consulting log, and a collaborative filtering algorithm is used to provide a recommended question entry for the keywords that have reached a preset heat, wherein the recommended question entry includes a recommended question entry corresponding to the consulting question, and the recommended question entry is used to provide an answer corresponding to the consulting question

[0122] Further, obtaining the consultation log includes:

[0123] Collecting a plurality of the consulting questions and caching the plurality of the consulting questions;

[0124] The cached plurality of consulting questions are written into a storage space in a preset manner to obtain the consulting log.

[0125] In a preferred embodiment of the present invention, the consultation log data is read from a running write thread, and the read consultation log data is written into a memory, thereby generating a consultation log file. Optionally, the write thread writes the consultation log data into the memory in an asynchronous IO manner. After the write thread sends a write command to the memory, the memory automatically receives the consultation log data according to the command, and then notifies the write thread after the consultation log data is written. The write thread does not need to wait for the consultation log data to be completely written into the memory and can return and continue to read the consultation log data, thereby improving the writing rate of the consultation log data.

[0126] As a reference guide for people's diet therapy and health preservation, the present invention accurately provides safe and reliable diet therapy and health preservation methods as well as the scientific basis contained therein and other related information.

[0127] Figure 2 A schematic diagram of a novel consulting device provided in an embodiment of this specification includes:

[0128] Information acquisition module 201, obtains the target domain information base by acquiring relevant information and data of the target domain;

[0129] In a preferred embodiment of the present invention, relevant information about diet therapy and health preservation is obtained from relevant websites in the target field, and the obtained relevant information is used as a target field information database to provide health practitioners with a source of answers for consultation. Among them, the target field includes the field of diet therapy and health preservation.

[0130] A graph construction module 202 performs entity extraction and relationship extraction on the target domain information base, constructs a target domain knowledge graph, and stores the target domain knowledge graph in a graph database;

[0131] In a preferred embodiment of the present invention, entity extraction is performed on the target domain information database, that is, named entities such as health-preserving medicinal materials, medicinal material names, etc. are extracted from the target domain information database, and then these entities are classified, thereby completing the entity extraction of the target domain information database; by extracting the semantic relationship between two or more entities from the target domain information database, the relationship extraction of the target domain information database is completed, wherein the relationship extraction adopts at least one of a template-based method, supervised learning, semi-supervised learning, and unsupervised learning to extract the semantic relationship between entities. At the same time, a similarity algorithm is used to perform knowledge fusion on entities that reach a preset similarity threshold, and a similarity algorithm is used to perform knowledge fusion on relationships that reach a preset similarity threshold; thereby constructing a target domain knowledge graph based on the fused entities and the fused relationships, wherein the target domain knowledge graph includes a diet therapy health knowledge graph.

[0132] The question processing module 203 obtains the consulting question and pre-processes the consulting question;

[0133] In a preferred embodiment of the present invention, the health practitioner initiates consulting questions through the platform, so that the platform can obtain consulting questions about diet therapy and health care; before performing entity recognition and title image recognition on the consulting questions, the obtained consulting questions need to be preprocessed, wherein the preprocessing of the consulting questions includes detecting stop words and / or punctuation marks present in the consulting questions, and then deleting the detected stop words and / or punctuation marks to obtain the entity of the consulting question and the intention of the consulting question, thereby completing the preprocessing of the consulting questions.

[0134] The question identification module 204 identifies the entity of the consulting question and the intention of the consulting question, and obtains the triple of the target domain knowledge graph;

[0135] In a preferred embodiment of the present invention, an entity dictionary is first defined, and then, a bidirectional long short-term memory network and a conditional random field algorithm are combined, and entity recognition is performed on the preprocessed consulting questions according to the entity dictionary to obtain a set of entities to be selected; finally, intent recognition is performed on the preprocessed consulting questions through a bidirectional long short-term memory network to obtain a set of attributes to be selected, thereby completing entity recognition of the consulting questions and intent recognition of the consulting questions.

[0136] Furthermore, according to the target domain knowledge graph and query template, and in combination with the Cypher language, the graph database is queried to obtain the candidate triples; further, a similarity algorithm is used to link the candidate attribute set to the specific attributes of the attribute annotation library; the candidate triples are filtered and screened by the specific attributes to obtain the final knowledge graph triples, wherein the graph database includes a neo4j database.

[0137] The answer query module 205 obtains the answer corresponding to the consulting question according to the triples of the target domain knowledge graph and the consulting answer template.

[0138] In a preferred embodiment of the present invention, based on the consulting question, combined with the triples of the target domain knowledge graph and the consulting answer template, the answer corresponding to the consulting question is obtained to provide accurate information for the health practitioner.

[0139] Furthermore, the entity extraction and relationship extraction of the target domain information database includes:

[0140] A knowledge extraction algorithm is used to extract entities in the target domain information database and relationships in the target domain information database.

[0141] Furthermore, constructing the target domain knowledge graph includes:

[0142] A similarity algorithm is used to perform knowledge fusion on entities that reach a preset similarity threshold;

[0143] A similarity algorithm is used to perform knowledge fusion on the relationships that reach the preset similarity threshold;

[0144] The target domain knowledge graph is constructed based on the fused entities and the fused relationships.

[0145] Furthermore, the pre-processing of the consultation question includes:

[0146] Detecting stop words and / or punctuation marks present in the consulting question;

[0147] The stop words and / or the punctuation marks are deleted to obtain the entity of the consulting question and the intent of the consulting question.

[0148] Furthermore, the identifying of the entity of the consulting question and the intention of the consulting question includes:

[0149] Define entity dictionary;

[0150] Combining a bidirectional long short-term memory network and a conditional random field algorithm, and performing entity recognition on the consulting question according to the entity dictionary, to obtain a candidate entity set;

[0151] The intention of the consulting question is identified through the bidirectional long short-term memory network to obtain a set of attributes to be selected.

[0152] Furthermore, the step of obtaining the triple of the target domain knowledge graph includes:

[0153] The candidate entity set is queried in the graph database using a graph query language to obtain candidate triples;

[0154] Using the similarity algorithm to link the set of attributes to be selected to specific attributes of the attribute annotation library;

[0155] The candidate triples are filtered and screened by the specific attributes to obtain the triples of the knowledge graph.

[0156] Furthermore, it also includes:

[0157] Get consultation logs;

[0158] Performing a heat analysis on the keywords of the consulting questions in the consulting log;

[0159] Using a collaborative filtering algorithm to provide a recommended question entry for the keyword that has reached a preset popularity, the recommended question entry includes a recommended question entry corresponding to the consulting question;

[0160] The recommended question entry is used to provide answers corresponding to the consulting questions.

[0161] Further, obtaining the consultation log includes:

[0162] Collecting a plurality of the consulting questions and caching the plurality of the consulting questions;

[0163] The cached plurality of consulting questions are written into a storage space in a preset manner to obtain the consulting log.

[0164] As a reference guide for people's diet therapy and health preservation, the present invention accurately provides safe and reliable diet therapy and health preservation methods as well as the scientific basis contained therein and other related information.

[0165] Based on the same inventive concept, an embodiment of this specification also provides an electronic device.

[0166] The following describes an electronic device embodiment of the present invention, which can be regarded as a specific physical implementation of the method and device embodiments of the present invention. The details described in the electronic device embodiment of the present invention should be regarded as a supplement to the above method or device embodiments; details not disclosed in the electronic device embodiment of the present invention can be implemented with reference to the above method or device embodiments.

[0167] Reference Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Figure 3 The electronic device 300 according to the embodiment of the present invention is described. Figure 3 The electronic device 300 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0168] like Figure 3 As shown, the electronic device 300 is in the form of a general computing device. The components of the electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one storage unit 320, a bus 330 connecting different device components (including the storage unit 320 and the processing unit 310), a display unit 340, etc.

[0169] The storage unit stores program codes, which can be executed by the processing unit 310, so that the processing unit 310 performs the steps according to various exemplary embodiments of the present invention described in the above processing method section of this specification. For example, the processing unit 310 can perform the following steps: Figure 1 Steps shown.

[0170] The storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 3201 and / or a cache memory unit 3202 , and may further include a read-only memory unit (ROM) 3203 .

[0171] The storage unit 320 may also include a program / utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including but not limited to: operating means, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0172] Bus 330 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0173] The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 300, and / or any device that enables the electronic device 300 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 350. Furthermore, the electronic device 300 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 360. The network adapter 360 may communicate with other modules of the electronic device 300 through the bus 330. It should be understood that although Figure 3 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, and data backup storage devices.

[0174] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the exemplary embodiments described in the present invention can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation method of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.) or on a network, including a number of instructions to enable a computing device (which can be a personal computer, server, or network device, etc.) to execute the above method according to the present invention. When the computer program is executed by a data processing device, the computer-readable medium can implement the above method of the present invention, that is: Figure 1 The method shown.

[0175] Reference Figure 4 A schematic diagram of a computer-readable medium provided for an embodiment of this specification.

[0176] accomplish Figure 1The computer program of the method shown can be stored on one or more computer readable media. The computer 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, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, device or component, or any combination of the above. 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 of the above.

[0177] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution device, device, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0178] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0179] In summary, the present invention can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that general data processing devices such as microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0180] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the present invention is not inherently related to any specific computer, virtual device or electronic device, and various general devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0181] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0182] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A new consulting method, characterized in that: include: By acquiring relevant information and data in the field of diet therapy and health preservation, an information database in the field of diet therapy and health preservation is obtained; A knowledge extraction algorithm is used to extract named entities from the diet therapy and health care field information database, and the named entities are classified to complete the entity extraction of the diet therapy and health care field information database. A knowledge extraction algorithm is used to extract semantic relationships between two or more entities from the diet therapy and health care field information database, and complete the relationship extraction of the target field information database. A similarity algorithm is used to perform knowledge fusion on entities that reach a preset similarity threshold, and a similarity algorithm is used to perform knowledge fusion on relationships that reach a preset similarity threshold. A diet therapy and health care knowledge graph is constructed based on the fused entities and the fused relationships, and the diet therapy and health care knowledge graph is stored in a graph database; Obtain consulting questions and pre-process the consulting questions; Identify the entity of the consulting question and the intention of the consulting question, and query the graph database to obtain the candidate triples based on the diet therapy knowledge graph and query template in combination with Cypher language, and use the similarity algorithm to link the candidate attribute set to the specific attribute of the attribute annotation library; filter and select the candidate triples through the specific attributes to obtain the final triples of the diet therapy knowledge graph; Obtaining an answer corresponding to the consultation question according to the triples of the diet therapy and health care knowledge graph and the consultation answer template; Collecting a plurality of the consulting questions and caching the plurality of the consulting questions; Writing the cached plurality of consulting questions into a storage space in a preset manner to obtain a consulting log; Performing a heat analysis on the keywords of the consulting questions in the consulting log; A collaborative filtering algorithm is used to provide a recommended question entry corresponding to the consulting question for the keyword that has reached a preset popularity, and the recommended question entry is used to provide an answer corresponding to the consulting question.

2. A new consulting method as claimed in claim 1, characterized in that: The pre-processing of the consulting question includes: Detecting stop words and / or punctuation marks present in the consulting question; The stop words and / or the punctuation marks are deleted to obtain the entity of the consulting question and the intent of the consulting question.

3. A new consulting method as claimed in claim 1, characterized in that: The identifying of the entity of the consulting question and the intention of the consulting question includes: Define entity dictionary; Combining a bidirectional long short-term memory network and a conditional random field algorithm, and performing entity recognition on the consulting question according to the entity dictionary, to obtain a candidate entity set; The intention of the consulting question is identified through the bidirectional long short-term memory network to obtain a set of attributes to be selected.

4. A new consulting device, characterized in that: include: The information acquisition module obtains the relevant information and data in the field of diet therapy and health preservation to obtain the information database in the field of diet therapy and health preservation; A graph construction module, which uses a knowledge extraction algorithm to extract named entities from the diet therapy and health care field information database, classifies the named entities, and completes the entity extraction of the diet therapy and health care field information database. The knowledge extraction algorithm is used to extract the semantic relationship between two or more entities from the diet therapy and health care field information database, and completes the relationship extraction of the target field information database. The similarity algorithm is used to perform knowledge fusion on the entities that reach a preset similarity threshold, and the similarity algorithm is used to perform knowledge fusion on the relationships that reach a preset similarity threshold. A knowledge graph in the diet therapy and health care field is constructed based on the fused entities and the fused relationships, and the diet therapy and health care field knowledge graph is stored in a graph database; A question processing module, which obtains consulting questions and pre-processes the consulting questions; The question identification module identifies the entity and intention of the consulting question, and obtains the candidate triples in the graph database based on the diet therapy knowledge graph and query template in combination with the Cypher language, and uses the similarity algorithm to link the candidate attribute set to the specific attributes of the attribute annotation library; the candidate triples are filtered and screened by the specific attributes to obtain the final triples of the diet therapy knowledge graph; An answer query module obtains an answer corresponding to the consultation question according to the triples of the diet therapy knowledge graph and the consultation answer template; and, collecting a plurality of the consulting questions and caching the plurality of the consulting questions; Writing the cached multiple consulting questions into a storage space in a preset manner to obtain a consulting log; performing a heat analysis on the keywords of the consulting questions in the consulting log; Using collaborative filtering algorithm to provide recommended question entry corresponding to the consulting question for the keyword that has reached a preset popularity; The recommended question entry is used to provide answers corresponding to the consulting questions.

5. A novel consulting device as claimed in claim 4, characterized in that: The pre-processing of the consulting question includes: Detecting stop words and / or punctuation marks present in the consulting question; The stop words and / or the punctuation marks are deleted to obtain the entity of the consulting question and the intent of the consulting question.

6. A novel consulting device as claimed in claim 4, characterized in that: The identifying of the entity of the consulting question and the intention of the consulting question includes: Define entity dictionary; Combining a bidirectional long short-term memory network and a conditional random field algorithm, and performing entity recognition on the consulting question according to the entity dictionary, to obtain a candidate entity set; The intention of the consulting question is identified through the bidirectional long short-term memory network to obtain a set of attributes to be selected.

7. An electronic device, wherein: The electronic device includes: A processor and a memory storing computer executable instructions, which when executed cause the processor to perform the method according to any one of claims 1 to 3.

8. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method of any one of claims 1 to 3 is implemented.