CN117059229A - Diabetes catering scheme generation method, device, electronic equipment and storage medium - Google Patents

Diabetes catering scheme generation method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117059229A
CN117059229A CN202311298360.XA CN202311298360A CN117059229A CN 117059229 A CN117059229 A CN 117059229A CN 202311298360 A CN202311298360 A CN 202311298360A CN 117059229 A CN117059229 A CN 117059229A
Authority
CN
China
Prior art keywords
diabetes
text data
information
user
scheme
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311298360.XA
Other languages
Chinese (zh)
Inventor
李宇欣
韩敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Health Hope (beijing) Technology Co ltd
Original Assignee
Health Hope (beijing) Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Health Hope (beijing) Technology Co ltd filed Critical Health Hope (beijing) Technology Co ltd
Priority to CN202311298360.XA priority Critical patent/CN117059229A/en
Publication of CN117059229A publication Critical patent/CN117059229A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/60ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to nutrition control, e.g. diets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Epidemiology (AREA)
  • Public Health (AREA)
  • Primary Health Care (AREA)
  • Nutrition Science (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Medical Informatics (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The embodiment of the disclosure provides a method, a device, electronic equipment and a storage medium for generating a diabetes catering scheme, wherein the method comprises the following steps: acquiring first text data; according to the first text data, obtaining a first Cypher query sentence through training a completed dialogue model; inquiring the constructed knowledge graph based on the first Cypher inquiry statement; and generating a diabetes catering scheme for the user according to the query result and a daily diabetes energy intake calculation formula. Compared with the mode of adopting an informatization system and a knowledge graph, the method has the advantages that a user can directly input information in a dialogue mode (for example, popular language can be adopted), and a recommended catering scheme can be generated; the accuracy is higher than the way of using named entity recognition and knowledge graph.

Description

Diabetes catering scheme generation method, device, electronic equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the field of AI intelligence, in particular to a method, a device, electronic equipment and a storage medium for generating a diabetes catering scheme.
Background
At present, two main methods exist for generating a diabetes meal allocation scheme. The method is realized by adopting an informatization system and a knowledge graph, the method requires a user to input information step by step, the user friendliness is not high, and the characteristics of the data structure such as nodes, relations and attributes of the knowledge graph are not utilized, so that the method is different from the traditional database. The other is realized by adopting named entity recognition and knowledge graph, the mode can only be recommended by a mode of text similarity through a single element (such as health risk, diet preference and the like), the accuracy is low, and repeated confirmation of a user is required in the process, so that the method is too complicated.
Disclosure of Invention
The embodiment of the present disclosure provides a method, an apparatus, an electronic device, and a storage medium for generating a diabetes catering scheme.
In a first aspect of the present disclosure, there is provided a method of generating a diabetes meal recipe comprising:
acquiring first text data, wherein the first text data is used for describing basic information of a user, disorder information of the user and diet preference information of the user;
according to the first text data, a first Cypher query statement is obtained through training a completed dialogue model, and the dialogue model is used for representing the mapping relation between the first Cypher query statement and the first text data;
inquiring the constructed knowledge graph based on the first Cypher inquiry statement;
and generating a diabetes matching scheme for the user according to the query result and a daily diabetes energy intake calculation formula, wherein the diabetes matching scheme comprises a breakfast matching scheme, a lunch matching scheme and a dinner matching scheme.
In one possible implementation, the method further includes:
acquiring second text data, wherein the second text data is used for describing basic information of a diabetes patient, symptom information of the diabetes patient, diet preference information of the diabetes patient and a second Cypher query statement corresponding to the second text data;
and training a pre-trained language model by using the second text data and the second Cypher query sentence to obtain the dialogue model.
In one possible implementation, the method further includes:
and updating the dialogue model by using the first text data and the first Cypher query statement.
In one possible implementation, the method further includes:
acquiring food material information, basic information of a diabetic patient, a diabetes symptom and daily intake of food containing sugar for the symptom, wherein the food material information comprises food material names and content of rich elements of the food material;
the knowledge graph is constructed based on the food material information, the basic information of the diabetic patient, the diabetic condition, and the daily intake of the sugar-containing food of the condition.
In one possible implementation, the method further includes:
and updating the knowledge graph by using the first text data and the query result.
In a second aspect of the present disclosure, there is provided a diabetes meal recipe generation device comprising:
the first acquisition module is used for acquiring first text data, wherein the first text data is used for describing basic information of a user, symptom information of the user and diet preference information of the user;
the dialogue module is used for obtaining a first Cypher query statement through training a completed dialogue model according to the text data, and the dialogue model is used for representing the mapping relation between the first Cypher query statement and the first text data;
the query module is used for querying the constructed knowledge graph based on the first Cypher query statement;
and the generation module is used for generating a diabetes catering scheme for the user according to the query result and the daily diabetes energy intake calculation formula, wherein the diabetes catering scheme comprises a breakfast catering scheme, a lunch catering scheme and a dinner catering scheme.
In one possible implementation, the method further includes:
the second acquisition module is used for acquiring second text data, wherein the second text data is used for describing basic information of a diabetic patient, symptom information of the diabetic patient and diet preference information of the diabetic patient, and a second Cypher query statement corresponding to the second text data;
and the training module is used for training a pre-trained language model by using the second text data and the second Cypher query sentence to obtain the dialogue model.
In one possible implementation, the method further includes:
and the first updating module is used for updating the dialogue model by using the first text data and the first Cypher query statement.
In one possible implementation, the method further includes:
the third acquisition module is used for acquiring food material information, basic information of a diabetic patient, a diabetes symptom and daily intake of food containing sugar for the symptom, wherein the food material information comprises food material names and content of rich elements of the food materials;
the construction module is used for constructing the knowledge graph based on the food material information, the basic information of the diabetes patient, the diabetes pathology and the daily intake of sugar-containing food of the diabetes pathology.
In one possible implementation, the method further includes:
and the second updating module is used for updating the knowledge graph by using the first text data and the query result.
In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: a memory and a processor, the memory having stored thereon a computer program, the processor implementing the diabetes recipe generation method according to any one of the first aspects when executing the program.
In a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a diabetes meal recipe generation method according to any one of the first aspects of the present disclosure.
According to the method, the device, the electronic equipment and the storage medium for generating the diabetes catering scheme, based on the first text data used for describing the basic information of the user, the symptom information of the user and the diet preference information of the user, a first Cypher query statement can be obtained through training of a completed dialogue model, a completed knowledge graph is queried through the first Cypher query statement, and finally the diabetes catering scheme is generated according to a query result and a daily energy intake calculation formula of diabetes. Compared with the mode of adopting an informatization system and a knowledge graph, the user can directly input information in a dialogue mode (for example, popular language can be adopted), and a recommended catering scheme can be generated; the accuracy is higher than the way of using named entity recognition and knowledge graph.
It should be understood that what is described in this summary is not intended to limit the critical or essential features of the embodiments of the disclosure nor to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, wherein like or similar reference numerals denote like or similar elements, in which:
FIG. 1 illustrates a flow chart of a method of generating a diabetes meal allocation scheme in accordance with an embodiment of the present disclosure;
FIG. 2 shows a block diagram of a diabetes meal recipe generation device according to an embodiment of the present disclosure;
fig. 3 shows a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure.
To facilitate an understanding of the embodiments of the present disclosure, a system architecture to which the embodiments of the present disclosure relate is first described. It should be noted that, the system architecture and the service scenario described in the embodiments of the present disclosure are for more clearly describing the technical solution of the embodiments of the present disclosure, and do not constitute a limitation on the technical solution provided by the embodiments of the present disclosure, and as a person of ordinary skill in the art can know that, with evolution of the network architecture and occurrence of a new service scenario, the technical solution provided by the embodiments of the present disclosure is equally applicable to similar technical problems.
For the embodiments of the present disclosure, the system for implementing the diabetes meal recipe generation method may include a user terminal and a server, or only include a server.
When the system includes a user terminal and a server, the user terminal may provide a voice acquisition and analysis function or a text entry function, for example, a user may input voice data to the user terminal, the user terminal may convert the voice data into text data, or the user may directly input text data to the user terminal. The server may provide functionality to provide a meal plan to a user based on text data sent by the user terminal, e.g., to provide a diabetic meal plan to the user. When the system includes only a server, the user may input text data directly to the server, which provides a meal plan to the user in response to the text data, e.g., a diabetic meal plan to the user.
The user terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted smart terminal, and the like. The server may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, and the like, or may be a local server. For the embodiments of the present disclosure, the user terminal and the server may be directly or indirectly connected through a wired or wireless communication manner, which is not limited herein.
Implementation details of the technical solutions of the embodiments of the present disclosure are set forth in detail below.
Fig. 1 shows a flowchart of a method of generating a diabetes meal recipe according to an embodiment of the present disclosure. In some embodiments, the diabetes meal recipe generation method may be performed by a server. Referring to fig. 1, the method comprises the steps of:
step 101, acquiring first text data.
The first text data is used for describing basic information of a user, symptom information of the user and diet preference information of the user. It should be noted that, in the embodiment of the present disclosure, the format of the first text data is not limited, for example, a user may use a daily chat mode and habit (for example, "i am a worker, height 170cm, weight 150 jin, man, 40 years old, type 2 diabetes when 30 years old, seafood allergy, no leek, and help me recommend a set of recipes"), so that the convenience of use of the user may be improved.
Specifically, when the server acquires the first text data, the following may exist:
(1) The user inputs voice data to the user terminal, and the user terminal converts the voice data input by the user into text data and sends the text data to the server.
(2) The user directly inputs text data to the user terminal, and the user terminal transmits the text data input by the user to the server.
(3) The user directly inputs text data to the server.
The connection method between the server and the user terminal and the method for the server to receive the receiving instruction input by the user may be any method described in the related art, and the embodiments of the present disclosure are not limited thereto. It should be noted that, when the user inputs voice data to the user terminal, the user terminal may use any mode described in the related art when converting the voice data into text data, and the embodiment of the present disclosure is not limited thereto.
For the embodiments of the present disclosure, the user terminal needs to perform encoding processing on text data before transmitting the text data. Accordingly, after receiving the text data, the server may decode the text data in a corresponding decoding manner. In the embodiment of the present disclosure, the text data may be encoded and decoded in any manner in the related art, which is not limited in the embodiment of the present disclosure.
Step 102, obtaining a first Cypher query sentence through training a completed dialogue model according to the first text data.
The structure of the first Cypher query statement may be expressed as:
"response": match (a: patient), (b: height), (c: weight), (d: a ' meal spectrum ' (e: staple food), (f: milk), (g: livestock meat eggs), (h: home dishes), (i: fruit) where a.name= "" and b.value=and c.value=and not h.name containers (') return a, b, c, d, e, f, g, h, i).
For example, the first text data entered by the user is: "I are a worker, height 170cm, weight 150 jin, men, this year 40 years old, get type 2 diabetes in 30 years old, eat seafood allergy, do not eat the leek, help I to recommend a set of recipe", after inputting the first text data into the dialogue model that training is completed, can get the first Cypher query statement as follows:
"response": match (a: patient), (b: height), (c: weight), (d: a 'meal spectrum' (e: staple food), (f: milk), (g: livestock meat eggs), (h: family vegetables), (i: fruit) where a.name= "diabetes patient" and b.value=170 and c.value= 120 and not h.name contains ('leek') return a, b, c, d, e, f, g, h, i).
For the disclosed embodiments, a dialog model is used to characterize the mapping relationship of the first Cypher query statement and the first text data. The trained dialog model may be trained using a pre-trained language model. For example, a pre-trained GLM large language model is used to train to arrive at a dialog model. Specific training methods will be described below and will not be described in detail here.
And step 103, inquiring the constructed knowledge graph based on the first Cypher inquiry statement.
The method for constructing the knowledge graph will be described hereinafter, and will not be described again here.
Step 104, generating a diabetes meal recipe for the user according to the query result and the daily energy intake calculation formula of diabetes, wherein the diabetes meal recipe can comprise a breakfast meal recipe, a lunch meal recipe and a dinner meal recipe.
For the embodiment of the disclosure, the food nutrition ingredients of the diabetics have strict requirements, in particular, the content of carbohydrate in the food cannot be too high, but the food of the diabetics is ensured to provide necessary calories, so the food can be calculated according to the following daily energy intake calculation formula of the diabetics:
[ annual standard ] weight: weight= [ height (cm) -105] (kg);
[ child (14) following children) standard body weight: weight= [ age×2+7] (kg);
body type: (actual body weight-weight)/weight=f;
wherein F is less than or equal to 10 percent, and the body is emaciated; f is more than 10 percent and less than or equal to 15 percent, and the body shape is normal; f is more than 15% and less than or equal to 20%, and the body type is fat; 20% > F, body type obesity;
heat required by adults: bed rest: q (kJ) =weight×20× 4.184; light physical labor: q (kJ) =weight×25× 4.184; medium physical labor: q (kJ) =weight×30× 4.184; weight labor: q (kJ) =weight×40× 4.184;
heat required by children: q (kJ) = (age×100+1000) × 4.184;
and (3) heat distribution: breakfast: q is multiplied by 0.2; chinese meal: q is multiplied by 0.4; dinner: q is multiplied by 0.4;
nutrient distribution: protein: fat: carbohydrate = 25:25:50;
nutritional requirements: protein: (q×25%)/4 (g); fat: (q×25%)/9 (g); carbohydrates: (Q.times.50%). Times.4 (g).
And obtaining a diabetes catering scheme by combining the query result obtained based on the query knowledge graph with the daily energy intake calculation formula of diabetes.
By way of example, suppose that the patient's energy needs for three meals a day are as follows:
breakfast: 1800×20% = 360 kcal;
lunch: 1800×40% = 720 kcal;
dinner: 1800×40% = 720 kcal.
Then, the nutrient intake for the three meals is as follows:
(1) Breakfast:
protein: (360×25%) ++4=22.5 (g);
fat: (360×25%) ++9=10 (g);
carbohydrates: (360×50%) ++4=45 (g);
(2) Lunch:
protein: (720×25%) ++4=45 (g);
fat: (720×25%) ++9=20 (g);
carbohydrates: (720×50%) ++4=90 (g);
(3) Dinner:
protein: (720×25%) ++4=45 (g);
fat: (720×25%) ++9=20 (g);
carbohydrates: (720×50%) ≡4=90 (g).
Based on the food in the query result and the nutrient content contained in the food, breakfast, lunch and dinner schemes can be generated.
In the method for generating the diabetes catering scheme provided by the embodiment of the disclosure, based on the first text data for describing the basic information of the user, the symptom information of the user and the diet preference information of the user, a first Cypher query sentence can be obtained through training a completed dialogue model, a completed knowledge graph is queried through the first Cypher query sentence, and finally the diabetes catering scheme is generated according to the query result and a daily diabetes energy intake calculation formula. Compared with the mode of adopting an informatization system and a knowledge graph, the user can directly input information in a dialogue mode (for example, popular language can be adopted), and a recommended catering scheme can be generated; the accuracy is higher than the way of using named entity recognition and knowledge graph.
Implementation details of training of the dialogue model and construction of the knowledge graph of the embodiment of the present disclosure are explained in detail below.
When training the dialogue model, first, the second text data and the second Cypher query statement corresponding to the second text data need to be acquired, and then the second text data and the second Cypher query statement corresponding to the second text data are utilized to train the pre-trained language model, so that the dialogue model is obtained. Wherein the second text data is used for describing basic information of the diabetic, disorder information of the diabetic and diet preference information of the diabetic.
It should be noted that, the second text data may be obtained by using the first text, or may be downloaded from the internet by using an existing data set.
In one implementation, the pre-trained language model may be a pre-trained GLM big language model, in which a transducer encoder is used to combine the two pre-trained models of autoregressive and self-encoding, and to better apply to context-based text generation tasks.
And using a transducer encoder to input second text data, using a second Cypher query sentence corresponding to the second text data as output, and performing fine tuning training through a LoRA mode to obtain the dialogue model.
However, as certain parameters in the recipe for diabetics are continually updated or modified, the already trained model may not be able to adapt to new requirements. Therefore, the first text data and the second text data, the corresponding first Cypher query sentence and the second Cypher query sentence are used as training samples together, and the trained dialogue model is trained again, so that the dialogue model is updated. Of course, the first text data and the corresponding first cytoer query sentence can be independently adopted to train the trained dialogue model, so as to realize the updating of the dialogue model.
When the knowledge graph is constructed, food material information, basic information of a diabetic patient, a diabetes condition and daily intake of food containing the condition are required to be acquired first. The food material information comprises food material names and content of rich elements of the food material. Then, a knowledge graph is constructed based on the food material information, the basic information of the diabetic patient, the diabetes condition and the daily intake of the sugar-containing food of the diabetes condition.
Specifically, first, various food materials (for example, cereal food materials, vegetable food materials, fruit food materials, milk food materials, etc.) may be separately entered into the map, and the entered information may include names of the food materials, contents of various elements enriched in the food materials per 100 g, etc.; secondly, entering into a map various diabetic conditions and daily recipe requirements (e.g. daily intake of sugar-containing foods) for the conditions; finally, the information of different kinds of personnel (such as factors affecting diet, such as gender, age, height, weight, etc.) is recorded into the map to form the knowledge map.
Similar to the dialogue model, the knowledge-graph that has been trained may not be able to accommodate new requirements due to the constant updating or modification of certain parameters in the recipe for diabetics. Thus, the knowledge-graph may be updated with the first text data and the query result. Of course, the knowledge graph may be updated by downloading related data from the internet. It should be noted that, the manner of updating the knowledge graph may be the same as the manner of constructing the knowledge graph, that is, new data may be input into the graph, or the data already input into the graph may be modified.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present disclosure is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present disclosure. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
The foregoing is a description of embodiments of the method, and the following further describes embodiments of the present disclosure through examples of apparatus.
Fig. 2 shows a block diagram of a diabetes meal recipe generation device according to an embodiment of the present disclosure. In some embodiments, the diabetes meal recipe generation means may be included in or implemented as the server described above. Referring to fig. 2, the apparatus includes a first acquisition module 201, a dialogue module 202, a query module 203, and a generation module 204. Wherein:
the first obtaining module 201 is configured to obtain first text data, where the first text data is used to describe basic information of a user, condition information of the user, and diet preference information of the user.
And the dialogue module 202 is configured to obtain a first Cypher query sentence according to the text data through training a completed dialogue model, where the dialogue model is used to characterize a mapping relationship between the first Cypher query sentence and the first text data.
And a query module 203, configured to query the constructed knowledge graph based on the first Cypher query statement.
The generating module 204 is configured to generate a diabetes matching scheme for the user according to the query result and the daily diabetes energy intake calculation formula, where the diabetes matching scheme includes a breakfast matching scheme, a lunch matching scheme, and a dinner matching scheme.
In some embodiments, the diabetes meal recipe generation device further comprises a second acquisition module and a training module. The second acquisition module is used for acquiring second text data, wherein the second text data is used for describing basic information of a diabetic patient, symptom information of the diabetic patient and diet preference information of the diabetic patient, and a second Cypher query statement corresponding to the second text data; the training module is used for training a pre-trained language model by using the second text data and the second Cypher query sentence to obtain the dialogue model.
In some embodiments, the diabetes meal recipe generation device further comprises a first update module for updating the dialog model using the first text data and the first cytoer query statement.
In some embodiments, the diabetes meal recipe generation device further comprises a third acquisition module and a construction module. The third acquisition module is used for acquiring food material information, basic information of a diabetic patient, diabetes symptoms and daily intake of food containing sugar for the symptoms, wherein the food material information comprises food material names and content of rich elements of the food materials; the construction module is used for constructing the knowledge graph based on the food material information, the basic information of the diabetes patient, the diabetes pathology and the daily intake of sugar-containing food of the diabetes pathology.
In some embodiments, the diabetes meal allocation scheme generating device further comprises a second updating module for updating the knowledge graph using the first text data and the query result.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the described modules may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
The embodiment of the disclosure further provides an electronic device, as shown in fig. 3, where the electronic device 300 shown in fig. 3 includes: a processor 301 and a memory 303. Wherein the processor 301 is coupled to the memory 303, such as via a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that, in practical applications, the transceiver 304 is not limited to one, and the structure of the electronic device 300 is not limited to the embodiments of the present disclosure.
The processor 301 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. Processor 301 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 302 may include a path to transfer information between the components. Bus 302 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect Standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. Bus 302 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 3, but not only one bus or one type of bus.
The Memory 303 may be, but is not limited to, a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory ), a CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 303 is used to store application code for executing the disclosed aspects and is controlled for execution by the processor 301. The processor 301 is configured to execute the application code stored in the memory 303 to implement what is shown in the foregoing method embodiments.
Among them, electronic devices include, but are not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
The disclosed embodiments provide a computer readable storage medium having a computer program stored thereon, which when run on a computer, causes the computer to perform the corresponding method embodiments described above.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present disclosure, and it should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principles of the present disclosure, and these improvements and modifications should also be considered as the protection scope of the present disclosure.

Claims (10)

1. A method of generating a diabetic meal schedule, comprising:
acquiring first text data, wherein the first text data is used for describing basic information of a user, disorder information of the user and diet preference information of the user;
according to the first text data, a first Cypher query statement is obtained through training a completed dialogue model, and the dialogue model is used for representing the mapping relation between the first Cypher query statement and the first text data;
inquiring the constructed knowledge graph based on the first Cypher inquiry statement;
and generating a diabetes matching scheme for the user according to the query result and a daily diabetes energy intake calculation formula, wherein the diabetes matching scheme comprises a breakfast matching scheme, a lunch matching scheme and a dinner matching scheme.
2. The method as recited in claim 1, further comprising:
acquiring second text data, wherein the second text data is used for describing basic information of a diabetes patient, symptom information of the diabetes patient, diet preference information of the diabetes patient and a second Cypher query statement corresponding to the second text data;
and training a pre-trained language model by using the second text data and the second Cypher query sentence to obtain the dialogue model.
3. The method as recited in claim 2, further comprising:
and updating the dialogue model by using the first text data and the first Cypher query statement.
4. The method as recited in claim 1, further comprising:
acquiring food material information, basic information of a diabetic patient, a diabetes symptom and daily intake of food containing sugar for the symptom, wherein the food material information comprises food material names and content of rich elements of the food material;
the knowledge graph is constructed based on the food material information, the basic information of the diabetic patient, the diabetic condition, and the daily intake of the sugar-containing food of the condition.
5. The method as recited in claim 4, further comprising:
and updating the knowledge graph by using the first text data and the query result.
6. A diabetes meal recipe generation device, comprising:
the first acquisition module is used for acquiring first text data, wherein the first text data is used for describing basic information of a user, symptom information of the user and diet preference information of the user;
the dialogue module is used for obtaining a first Cypher query statement through training a completed dialogue model according to the text data, and the dialogue model is used for representing the mapping relation between the first Cypher query statement and the first text data;
the query module is used for querying the constructed knowledge graph based on the first Cypher query statement;
and the generation module is used for generating a diabetes catering scheme for the user according to the query result and the daily diabetes energy intake calculation formula, wherein the diabetes catering scheme comprises a breakfast catering scheme, a lunch catering scheme and a dinner catering scheme.
7. The apparatus as recited in claim 6, further comprising:
the second acquisition module is used for acquiring second text data, wherein the second text data is used for describing basic information of a diabetic patient, symptom information of the diabetic patient and diet preference information of the diabetic patient, and a second Cypher query statement corresponding to the second text data;
and the training module is used for training a pre-trained language model by using the second text data and the second Cypher query sentence to obtain the dialogue model.
8. The apparatus as recited in claim 6, further comprising:
the third acquisition module is used for acquiring food material information, basic information of a diabetic patient, a diabetes symptom and daily intake of food containing sugar for the symptom, wherein the food material information comprises food material names and content of rich elements of the food materials;
the construction module is used for constructing the knowledge graph based on the food material information, the basic information of the diabetes patient, the diabetes pathology and the daily intake of sugar-containing food of the diabetes pathology.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, characterized in that the processor, when executing the computer program, implements the diabetes meal plan generation method according to any one of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the diabetes recipe generation method according to any one of claims 1 to 5.
CN202311298360.XA 2023-10-09 2023-10-09 Diabetes catering scheme generation method, device, electronic equipment and storage medium Pending CN117059229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311298360.XA CN117059229A (en) 2023-10-09 2023-10-09 Diabetes catering scheme generation method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311298360.XA CN117059229A (en) 2023-10-09 2023-10-09 Diabetes catering scheme generation method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117059229A true CN117059229A (en) 2023-11-14

Family

ID=88653889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311298360.XA Pending CN117059229A (en) 2023-10-09 2023-10-09 Diabetes catering scheme generation method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117059229A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117371973A (en) * 2023-12-06 2024-01-09 武汉科技大学 Knowledge-graph-retrieval-based enhanced language model graduation service system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109033135A (en) * 2018-06-06 2018-12-18 北京大学 A kind of natural language querying method and system of software-oriented project knowledge map
CN109243580A (en) * 2018-11-01 2019-01-18 广州仁生健康科技有限公司 A kind of hypoglycemic intelligent nutrition catering system and dietary management method
CN111177411A (en) * 2019-12-27 2020-05-19 赣州市智能产业创新研究院 Knowledge graph construction method based on NLP
CN112528008A (en) * 2020-12-07 2021-03-19 北京健康有益科技有限公司 Diabetic catering method and device based on knowledge graph
CN113505243A (en) * 2021-07-29 2021-10-15 深圳万海思数字医疗有限公司 Intelligent question-answering method and device based on medical knowledge graph
CN116127013A (en) * 2022-12-13 2023-05-16 中国网络空间研究院 Personal sensitive information knowledge graph query method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109033135A (en) * 2018-06-06 2018-12-18 北京大学 A kind of natural language querying method and system of software-oriented project knowledge map
CN109243580A (en) * 2018-11-01 2019-01-18 广州仁生健康科技有限公司 A kind of hypoglycemic intelligent nutrition catering system and dietary management method
CN111177411A (en) * 2019-12-27 2020-05-19 赣州市智能产业创新研究院 Knowledge graph construction method based on NLP
CN112528008A (en) * 2020-12-07 2021-03-19 北京健康有益科技有限公司 Diabetic catering method and device based on knowledge graph
CN113505243A (en) * 2021-07-29 2021-10-15 深圳万海思数字医疗有限公司 Intelligent question-answering method and device based on medical knowledge graph
CN116127013A (en) * 2022-12-13 2023-05-16 中国网络空间研究院 Personal sensitive information knowledge graph query method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117371973A (en) * 2023-12-06 2024-01-09 武汉科技大学 Knowledge-graph-retrieval-based enhanced language model graduation service system

Similar Documents

Publication Publication Date Title
Haussmann et al. FoodKG: a semantics-driven knowledge graph for food recommendation
EP3963598A1 (en) Method and system for optimized foods using biomarker data and fitting models
US20200097814A1 (en) Method and system for enabling interactive dialogue session between user and virtual medical assistant
WO2021017306A1 (en) Personalized search method, system, and device employing user portrait, and storage medium
CN117059229A (en) Diabetes catering scheme generation method, device, electronic equipment and storage medium
CN111883230B (en) Diet data generation method and device, storage medium and electronic device
US20220399098A1 (en) Diet recommendation method, device, storage medium and electronic device
Sundaravadivel et al. Smart-log: An automated, predictive nutrition monitoring system for infants through the IoT
CN110569349A (en) Big data-based method, system, equipment and storage medium for pushing articles for education
CN114491072A (en) Traditional Chinese medicine data processing system, method, storage medium and terminal
US9934282B2 (en) Cooking recipe information provision device, cooking recipe information provision method, program, and information recording medium
Elsweiler et al. Food recommender systems
CN110706783A (en) Recipe recommendation method and device, computing equipment and computer storage medium
CN115809755B (en) Carbon emission accounting method, equipment and storage medium based on semantic recognition
CN116805002A (en) Question answering method, question answering device, equipment and storage medium
Potter et al. Healthicization and lay knowledge about eating practices in two African American communities
Gaur A class of k-sample distribution-free tests for location against ordered alternatives
Hsu et al. A health management application with QR-Code input and rule inference
CN114388102A (en) Diet recommendation method and device and electronic equipment
CN113611393A (en) Food recommendation, device, equipment and storage medium based on artificial intelligence
Iradukunda et al. Healthy Diet Perceptions of Pregnant Women from Sub-Saharan Africa Residing in the US
CN115917528A (en) Question inquiry device, method, equipment and storage medium
Hopp et al. Rejoinder: How methodological decisions impact the validity of moral content analyses
Hsu et al. Personal health management on a smartphone platform
KR102567850B1 (en) Apparatus and method of providing personal customized referral information based on medical examination data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination