CN112182252A - Intelligent medication question-answering method and device based on medicine knowledge graph - Google Patents

Intelligent medication question-answering method and device based on medicine knowledge graph Download PDF

Info

Publication number
CN112182252A
CN112182252A CN202011241075.0A CN202011241075A CN112182252A CN 112182252 A CN112182252 A CN 112182252A CN 202011241075 A CN202011241075 A CN 202011241075A CN 112182252 A CN112182252 A CN 112182252A
Authority
CN
China
Prior art keywords
medicine
drug
information
entity
query
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.)
Granted
Application number
CN202011241075.0A
Other languages
Chinese (zh)
Other versions
CN112182252B (en
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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN202011241075.0A priority Critical patent/CN112182252B/en
Publication of CN112182252A publication Critical patent/CN112182252A/en
Application granted granted Critical
Publication of CN112182252B publication Critical patent/CN112182252B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/06Creation of reference templates; Training of speech recognition systems, e.g. adaptation to the characteristics of the speaker's voice
    • G10L15/063Training
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue

Abstract

The invention relates to the technical field of artificial intelligence, and provides an intelligent medication question-answering method based on a medicine knowledge graph and related equipment. The intelligent medication question-answering method based on the medicine knowledge graph comprises the following steps: constructing a medicine knowledge graph; acquiring inquiry voice information of a user on medicine knowledge; converting the query voice information into query text information; carrying out medicine entity identification on the inquiry text information to obtain a medicine entity; performing intention identification on the query text information to obtain a query intention; searching answer text information from the medicine knowledge graph according to the medicine entity and the inquiry intention; synthesizing answer voice information according to the answer text information; and storing and playing the answer voice information to answer the inquiry voice information. The intelligent drug administration answering system is used for answering the drug voice questions of the user and improving the efficiency and accuracy of intelligent drug administration answering.

Description

Intelligent medication question-answering method and device based on medicine knowledge graph
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to an intelligent medication question and answer method and device based on a medicine knowledge graph, computer equipment and a computer readable storage medium.
Background
The intelligent drug question-answering service system is a human-computer natural language interaction oriented intelligent question-answering system which can provide drug administration knowledge consultation service and drug administration knowledge reasoning service. The knowledge graph constructs a knowledge structure according to the relation between the knowledge, and related knowledge is automatically searched by the knowledge graph on the basis of keyword search. The intelligent medicine question-answering service system is a form for answering the medicine-taking questions of patients, and after the knowledge graph is added, relevant answers can be searched through the knowledge graph, so that the working efficiency of the intelligent medicine question-answering service system is greatly improved.
The key point of applying the knowledge graph to intelligent medicine question answering is 'semantic calculation', which is specifically three points: firstly, the method comprises the following steps: constructing a knowledge graph: when the knowledge graph is constructed, the meaning of the knowledge text is determined through semantic calculation; secondly, the method comprises the following steps: understanding the medication problem: the precondition of answering the medication question is to understand the medication question and determine the meaning of the question through semantic calculation; thirdly, the method comprises the following steps: solving the medication problem: when the medication problem is solved, optimal matching is carried out through semantic calculation and knowledge in the knowledge map. However, due to the reasons of limited research and development time, few application units and the like, the design of the intelligent drug-using question-answer method based on the knowledge map in the prior art is still not mature, and particularly, the existing drug-using question-answer method based on the knowledge map needs to be operated on a computer, so that drug-using answers can be obtained through complicated operation steps, but the method is inconvenient for the old and other groups who are unskilled in the operation of the computer. Therefore, how to increase the intelligence level of intelligent medication questions and answers becomes a problem to be solved.
Disclosure of Invention
In view of the above, there is a need for an intelligent medication question-answering method, an intelligent medication question-answering device, a computer device and a computer readable storage medium based on a drug knowledge graph, which can answer medication questions of a user through voice input of the user, thereby overcoming the technical obstacle that medication questions can be obtained only through complicated computer operations, and improving the efficiency and accuracy of intelligently answering the medication questions.
The invention provides an intelligent medication question-answering method based on a medicine knowledge graph, which comprises the following steps of:
s1, constructing a medicine knowledge graph;
s2, acquiring inquiry voice information of the user on the medicine knowledge;
s3, converting the inquiry voice information into inquiry text information;
s4, identifying the drug entity of the inquiry text information to obtain the drug entity;
s5, identifying the intention of the query text information to obtain a query intention;
s6, searching answer text information from the medicine knowledge graph according to the medicine entities and the inquiry intention;
s7, synthesizing answer voice information according to the answer text information;
and S8, storing and playing the answer voice information to answer the inquiry voice information with medicine knowledge.
Further, the constructing a knowledge graph of the drug in S1 includes:
s11, knowledge acquisition: acquiring medicine information, chemical component information and medicine type information from a network, and identifying the medicine information, the chemical component information and the medicine type information from a medicine specification, a medical document and/or a medicine book based on character recognition;
s12, constructing a preset database: taking the medicine information as medicine entity nodes, the chemical component information as chemical component entity nodes and the medicine type information as medicine type entity nodes, and storing the medicine type information and the medicine type information into a preset database;
s13, construction of the containing type entity relationship: establishing a class-containing entity relationship between the drug entity node and the chemical component entity node in the preset database;
s14, building the relationship of the entities belonging to the class: and establishing a class entity relationship between the medicine entity node and the medicine type entity node in the preset database.
Further, the converting the query voice message into the query text message in S3 includes:
s31, acquiring a query voice sample of the medicine knowledge, and a query text sample and a voice recognition model corresponding to the query voice sample;
s32, extracting a first acoustic feature sequence of the query voice sample;
s33, training a voice recognition model according to the query text sample corresponding to the query voice sample and the first acoustic feature sequence to obtain a trained voice recognition model;
s34, extracting a second acoustic feature sequence of the inquiry voice information;
and S35, performing voice recognition on the second acoustic feature sequence by using the trained voice recognition model to obtain the inquiry text information.
Further, the speech recognition model in S31 is preferably an acoustic model based on a long-short-term memory network (LSTM), where the LSTM includes a forgetting phase, a selecting and memorizing phase, and an output phase, where in the output phase, it may be determined which information is to be output as the current time step t, and the output is controlled by the output gate zo, and the specific formula is:
Figure BDA0002768379140000031
Figure BDA0002768379140000032
Figure BDA0002768379140000033
Figure BDA0002768379140000034
ct=zf⊙ct-1+zi⊙z;
ht=zo⊙tanh(ct) (ii) a Wherein, W, Wi、Wf、WoIs the parameter to be trained, tanh, σ represent the activation functions of tanh and logistic, respectively,
Figure BDA0002768379140000035
as representing respectively a kronecker product and a hadamard product, xtIs input at time step t, ht-1Is a hidden state of the last time step t-1, htIs a hidden state at the current time step t, ct-1Is the cell state of the last time step, ctIs the cell state at the current time step, z represents a first intermediate value calculated from W on the basis of the hidden state at the previous time step and the input at the current time step, z represents a second intermediate value calculated from W on the basis of the hidden state at the previous time step and the input at the current time stepiIs represented according to WiSelective gating calculated from the hidden state of the previous time step and the input of the current time step, zfIs represented according to WfForgetting gating obtained by calculating hidden state of last time step and input of current time step, zoIs represented according to WoOutput gating calculated from the hidden state of the previous time step and the input of the current time step, ctA second intermediate value, h, representing the selective forgetting of the cell state at the previous time step and the selective memorizing of the first intermediate valuetRepresenting the output value calculated from the output gating for the second intermediate value.
Further, the extracting of the first acoustic feature sequence of the query speech sample in S32 includes:
s321, cutting off a mute part of the head end and the tail end of the query voice sample based on the voice endpoint monitoring technology;
s322, changing the waveform of the cut inquiry voice sample;
s323, extracting acoustic features of the voice sample after waveform change based on a Mel frequency cepstrum coefficient feature extraction method, and outputting a first acoustic feature sequence.
In another possible implementation manner, the step S4 of performing drug entity identification on the query text message specifically includes:
s41, acquiring a drug knowledge statement sample and a drug entity labeling sequence corresponding to the drug knowledge statement sample;
s42, acquiring a semantic feature extraction model based on a bidirectional long-time and short-time memory network and an entity recognition model based on a gated cycle unit and a conditional random field;
s43, performing word segmentation on the medicine knowledge sentence samples to obtain a plurality of medicine word samples;
s44, determining an initial medicine word vector of each medicine word sample based on a preset word vector table, and combining the initial medicine word vectors of a plurality of medicine word samples according to the word sequence to obtain an initial medicine word vector sequence;
s45, performing semantic extraction on the initial drug word vector sequence through the semantic feature extraction model to obtain a drug word vector sequence;
s46, outputting a recognition result sequence by taking the medicine word vector sequence as input through the entity recognition model;
s47, training an entity recognition model and a semantic feature extraction model according to the difference value between the recognition result sequence and the medicine entity labeling sequence based on a back propagation algorithm to obtain a medicine entity recognition model consisting of the trained semantic feature extraction model and the trained entity recognition model;
and S48, carrying out medicine entity identification on the inquiry text information through the medicine entity identification model to obtain the medicine entity.
Further, the step of identifying the intention of the query text message in S5 includes:
s51, acquiring a multi-intention recognition model based on the BERT and the two-way long-short term memory network and a single-intention recognition model based on the BERT, the gated cyclic unit and the convolutional layer;
s52, marking the query text information as one or more query text sub-information through the multi-intention recognition model, wherein each query text sub-information corresponds to a single intention;
and S53, respectively identifying one or more query text sub-messages through the single meaning recognition model to obtain one or more query intentions.
Further, the S6 searching for the answer text information from the medicine knowledge-graph according to the medicine entity and the query intention includes:
s61, inquiring corresponding medicine entity nodes from the medicine knowledge graph through medicine entities;
and S62, searching the attribute of the medicine entity node or the target node with entity relationship with the medicine entity node according to the query intention to obtain answer text information.
The second aspect of the present invention provides a device for the intelligent medication question-answering method based on the medicine knowledge graph, which specifically comprises:
the construction module is used for constructing a medicine knowledge graph;
the acquisition module is used for acquiring inquiry voice information of a user on medicine knowledge;
the conversion module is used for converting the inquiry voice information into inquiry text information;
the entity identification module is used for identifying the drug entities of the inquiry text information to obtain the drug entities;
the intention identification module is used for identifying the intention of the query text information to obtain a query intention;
the searching module is used for searching answer text information from the medicine knowledge graph according to the medicine entity and the inquiry intention;
the synthesis module is used for synthesizing answer voice information according to the answer text information;
and the playing module is used for storing and playing the answer voice information so as to answer the inquiry voice information.
A third aspect of the present invention is to provide a computer device for the intelligent drug-using question-answering method, according to the intelligent drug-using question-answering method based on the knowledge graph of drugs, wherein the computer device comprises a processor and a computer-readable storage medium, and the processor is used for executing computer-readable instructions stored in the computer-readable storage medium, so as to realize the intelligent drug-using question-answering method based on the knowledge graph of drugs.
The invention has the beneficial effects that: constructing a medicine knowledge graph; acquiring inquiry voice information of a user on medicine knowledge; converting the query voice information into query text information; carrying out medicine entity identification on the inquiry text information to obtain a medicine entity; performing intention identification on the query text information to obtain a query intention; searching answer text information from the medicine knowledge graph according to the medicine entity and the inquiry intention; synthesizing answer voice information according to the answer text information; and storing and playing the answer voice information to answer the inquiry voice information. By the method and the equipment, a user can directly input the voice information, namely the invention can obtain the medication answer in a voice playing mode by simply speaking the medication question to be consulted, so that the problem that special groups such as old people cannot operate computers and other equipment through complicated steps to obtain medication knowledge is solved, the problem that the special groups such as the old people cannot see the answers of the on-screen medication knowledge due to poor eyesight is solved, and the efficiency and the accuracy of intelligently answering the medication question are effectively improved.
Drawings
Fig. 1 is a flowchart of an intelligent drug administration question-answering method based on a drug knowledge graph according to an embodiment of the present invention.
Fig. 2 is a flowchart for converting the query voice message into a query text message according to an embodiment of the present invention.
Fig. 3 is a flowchart of performing drug entity identification on the query text message according to an embodiment of the present invention.
Fig. 4 is a flowchart for identifying the intention of the query text message according to the embodiment of the present invention.
Fig. 5 is a flow chart of synthesizing answer speech information from the answer text information according to an embodiment of the present invention.
Fig. 6 is a block diagram of an intelligent question answering device based on a medicine knowledge graph according to an embodiment of the present invention.
Fig. 7 is a schematic diagram of a computer device provided by an embodiment of the invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention, and the described embodiments are merely some, but not all embodiments of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Preferably, the intelligent drug-knowledge-graph-based medication question-answering method is applied to one or more computer devices. The computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
Example 1:
fig. 1 is a flowchart of an intelligent drug-using question-answering method based on a drug knowledge graph according to an embodiment of the present invention, where the intelligent drug-using question-answering method includes:
101, constructing a drug knowledge graph, wherein the construction of the drug knowledge graph comprises the following steps:
acquiring medicine information, chemical component information and medicine type information from a network;
storing the drug information serving as a drug entity node, the chemical component information serving as a chemical component entity node and the drug type information serving as a drug type entity node into a preset database;
establishing a class-containing entity relationship between the drug entity node and the chemical component entity node in the preset database;
and establishing a class entity relationship between the drug entity node and the drug type entity node in the preset database.
Alternatively, the drug information, chemical composition information, and drug type information may also be identified from the drug description and/or the drug book based on word recognition.
Specifically, the method for acquiring the drug information, the chemical component information and the drug type information from the network comprises the following steps:
acquiring/crawling a medicine text from a network;
and performing entity identification on the medicine text to obtain the medicine information, the chemical component information and the medicine type information.
The drug information can be acquired from the network through a preset website. For example, the pre-set web address is "https:// www.med126.com/drug/2008/xxxxx. Where "xxxxx" is a preset range, it can be: 30411 to 32468. For another example, https:// www.med126.com/drug/2008/31438.html is the drug data website of nicardipine hydrochloride sustained release capsules.
The acquired data may be filtered through preset rules to avoid interference of data other than the drug information, the chemical composition information, and the drug type information.
The acquired web page data may include one piece of medicine information, medicine type information corresponding to the medicine information, chemical component information corresponding to the medicine information, and the like. A drug message may include fields for common names, great names, english names, phonetic names, properties, pharmacologic and toxicological properties, etc. The chemical composition information may include fields such as a common name, a chemical name, a CAS number, a structural formula, and a molecular formula.
The acquired data can be stored in a json file mode.
The drug entity node can comprise attributes such as a common name, an English name, characters, indications, usage amount and the like; the chemical component entity nodes may include generic names, chemical names, molecular formulas, molecular weight attributes.
The belonging to class entity relationship indicates that the drug entity node belongs to a drug type entity node; the containing class entity relationship represents that the medicine entity node contains a chemical component entity section.
Drug entity nodes, chemical component entity nodes, drug type entity nodes may be stored by py2Neo to the Neo4J graph database to build a drug knowledge graph. Neo4j is a high performance database that stores structured data on a network rather than in tables. The neo4j database may be operated on using cypher statements to create containment class entity relationships and/or belonging class entity relationships between various entities.
In another embodiment, the drug knowledge-graph may be visualized.
102, acquiring inquiry voice information of the drug knowledge of the user.
Specifically, a microphone of the mobile device may be used to collect an external voice signal, and perform denoising processing on query voice information collected by the microphone.
The user may enter a query voice message for knowledge of medication administration through the microphone of the mobile device.
The mobile device may include a cell phone, tablet, laptop, etc.
103, converting the query voice information into query text information.
Fig. 2 is a flowchart of the intelligent drug administration question-answering method based on the drug knowledge graph, which converts the question voice information into the question text information, and includes:
1031, obtaining inquiry voice samples of medicine knowledge, inquiry text samples corresponding to the inquiry voice samples and voice recognition models;
1032, extracting a first acoustic feature sequence of the query speech sample;
1033, training a voice recognition model according to the query text sample and the first acoustic feature sequence to obtain a trained voice recognition model;
1034, extracting a second acoustic feature sequence of the query voice message;
1035, performing speech recognition on the second acoustic feature sequence by using the trained speech recognition model to obtain the query text information.
Specifically, the extracting a first acoustic feature sequence of the query speech sample includes:
the mute part of the head end and the tail end of the inquiry voice sample can be cut off based on the voice endpoint monitoring technology;
carrying out waveform change on the cut inquiry voice sample;
based on Mel Frequency Cepstrum Coefficient (MFCC) feature extraction method, extracting acoustic features of the voice sample after waveform change, and outputting a first acoustic feature sequence.
The second acoustic feature sequence for extracting the query voice information is the same as the first acoustic feature sequence for extracting the query voice sample, and is not described herein again.
When the voice recognition model is trained, inputting the first acoustic feature sequence into the voice recognition model, and calculating an output text according to initial parameters in the voice recognition model; calculating a difference value between an output text and the query text sample; parameters in a speech recognition model are updated in reverse based on differences between output text and the query text samples so that the speech recognition model can recognize acoustic feature sequences as text based on the updated parameters.
Before extracting the first acoustic feature sequence of the query speech sample, the intelligent drug-using query method based on the drug knowledge-graph further includes:
pre-emphasis, windowing and framing preprocessing are carried out on the query voice sample;
and preprocessing the query text sample by removing punctuation marks and dividing words, and converting the preprocessed query text sample into a text vector sequence based on a word embedding method.
The voice recognition model is preferably an acoustic model based on a long-short-term memory network (LSTM), and the LSTM has two states, namely a cell state and a hidden state, wherein the cell state changes slowly, and the hidden state changes rapidly; in addition, the LSTM includes three phases, namely a forgetting phase, a selective memory phase, and an output phase.
In the forgetting stage of the LSTM, the input data of the previous time step can be selectively forgotten, and z is calculatedfThe value is used as forgetting gating and is subjected to Hadamard product with the cell state of the previous time step, and the information needing to be forgotten in the cell state of the previous time step is controlled.
In the selective memory phase of LSTM, the input data is selectively stored, and the input x can be gated by the gate control signaltAnd selectively memorizing the hidden state of the previous time step.
In the output phase of LSTM, it can be determined which information is to be output as the current time step t, and it can be output by output gating zoControl the output to htAs an output, the specific calculation formula is:
Figure BDA0002768379140000091
Figure BDA0002768379140000092
Figure BDA0002768379140000093
Figure BDA0002768379140000101
ct=zf⊙ct-1+zi⊙z;
ht=zo⊙tanh(ct) (ii) a Wherein, W, Wi、Wf、WoIs the parameter to be trained, tanh, σ are respectively the tanh and logistic activation functions,
Figure BDA0002768379140000102
indicates a kronecker product and a hadamard product, x, respectivelytIs the input of t time steps, ht-1Is a hidden state of the last time step t-1, htIs a hidden state at the current time step t, ct-1Is the cell state of the last time step, ctIs the cell state at the current time step, z represents a first intermediate value calculated from W on the basis of the hidden state at the previous time step and the input at the current time step, z represents a second intermediate value calculated from W on the basis of the hidden state at the previous time step and the input at the current time stepiIs represented according to WiSelective gating calculated from the hidden state of the previous time step and the input of the current time step, zfIs represented according to WfForgetting gating obtained by calculating hidden state of last time step and input of current time step, zoIs represented according to WoOutput gating calculated from the hidden state of the previous time step and the input of the current time step, ctA second intermediate value, h, representing the selective forgetting of the cell state at the previous time step and the selective memorizing of the first intermediate valuetRepresenting the output value calculated from the output gating for the second intermediate value.
The specific method for converting the query voice information into the query text information by the knowledge map can convert the query voice information into the query text information, for example, the obtained query text information is 'what the main components and the usage amount of amoxicillin tablets and furbenicillin sodium for injection are'.
The speech recognition model may also be an acoustic model based on naive bayes, Deep Neural Networks (DNNs) and hidden markov models (hmm).
And 104, identifying the drug entity of the inquiry text information to obtain the drug entity.
Fig. 3 is a flowchart of a method for intelligently using drug knowledge-graph-based drug inquiry and answering according to an embodiment of the present invention, where the method is used for identifying drug entities from inquiry text information, and includes:
1041, acquiring a drug knowledge statement sample and a drug entity tagging sequence corresponding to the drug knowledge statement sample;
1042, obtaining a semantic feature extraction model based on a bidirectional long-and-short time memory network and an entity recognition model based on a gated recurrent unit (GUR) and a conditional random field (CFR);
1043, performing word segmentation on the medicine knowledge statement samples to obtain a plurality of medicine word samples;
1044, determining an initial drug word vector of each drug word sample based on the preset word vector table, and combining the initial drug word vectors of the multiple drug word samples according to the word sequence to obtain an initial drug word vector sequence;
1045, performing semantic extraction on the initial drug word vector sequence through the semantic feature extraction model to obtain a drug word vector sequence;
1046, outputting the recognition result sequence by the entity recognition model with the medicine word vector sequence as input;
1047, training the entity recognition model and the semantic feature extraction model according to the difference value between the recognition result sequence and the drug entity labeling sequence based on a back propagation algorithm to obtain a drug entity recognition model consisting of the trained semantic feature extraction model and the trained entity recognition model;
1048, identifying the drug entity of the inquiry text information through the drug entity identification model to obtain the drug entity.
The drug entity tagging sequence may tag the drug entity in the query text message. For example, the text message is queried as "what injection furbenicillin sodium can treat", and the label sequence is "B-I-I-I-I-E-O-O-O-O-O-O", i.e., the drug entity "furbenicillin sodium for injection" is labeled. The semantic feature extraction model can perform semantic extraction on the initial drug word vector to obtain a drug word vector sequence with hidden semantic relation. The entity recognition model can perform entity recognition on the medicine word vector sequence based on parameters in the entity recognition model, output a recognition result sequence, and optimize, namely train, parameters in the entity recognition model and the semantic feature extraction model through a back propagation algorithm when a difference value exists between the recognition result sequence and the medicine entity labeling sequence.
For example, the inquiry text message (what the main components and the dosage of amoxicillin tablets and furbenicillin sodium for injection are) is subjected to drug entity identification to obtain two drug entities (amoxicillin tablets and furbenicillin sodium for injection). And then, for example, the inquiry text information (what the injection furbenicillin sodium can treat) is subjected to medicine entity identification to obtain a medicine entity (the injection furbenicillin sodium).
In another embodiment, the entity identifying the query text message includes:
performing full matching on the inquiry text information in a preset medicine database by adopting an Aho-Corasick algorithm (AC algorithm);
if the preset drug database has a matching result, determining the matching result as a drug entity;
and if the preset medicine database has no matching result, adopting BERT-LSTM-CRF to perform medicine entity identification on the inquiry text information, wherein the CRF is a conditional random field.
And 105, identifying the purpose of the query text information to obtain a query purpose.
Fig. 4 is a flowchart of an intelligent drug administration question-answering method based on a drug knowledge graph according to an embodiment of the present invention, where the method is used for performing intent recognition on the query text information, and includes:
1051, obtaining a multi-intention recognition model based on BERT and a bidirectional long-short term memory network and a single-intention recognition model based on the BERT, a gating cycle unit and a convolution layer;
1052, marking the query text information as one or more query text sub-information through the multi-intention recognition model, wherein each query text sub-information corresponds to a single intention;
and 1053, respectively identifying one or more query text sub-messages through the single meaning graph identification model to obtain one or more query intentions.
The multiple intention identification model can identify a plurality of intentions (namely the number of intentions and the expression range of each intention) in the query text information through sequence marking, and the single intention identification model can identify the intentions of the marked single intention (such as query indication intention, query usage intention, query medicine type intention, query chemical composition intention and the like).
For example, the query text message (what injection of furbenicillin sodium can treat) is subjected to intention identification to obtain a query intention (query indication intention). As another example, the query text message (what can be treated by furbenicillin sodium for injection.
106, searching for answer text information from the drug knowledge-graph based on the drug entities and the query intent.
Specifically, searching for answer text information from the drug knowledge-graph based on drug entities and query intent, includes:
inquiring corresponding medicine entity nodes from the medicine knowledge graph through medicine entities;
searching answer text information from the attribute of the medicine entity node or a target node having an entity relationship with the medicine entity node according to the query intention.
The target nodes may include chemical component entity nodes having a class entity relationship with a drug entity node, drug type entity nodes having a class entity relationship with a drug entity node, and the like.
For example, answer text information is searched from a drug knowledge graph according to drug entities (amoxicillin tablets, furbenicillin sodium for injection) and query intents (query indication intents, query chemical component intents). The indication intents are inquired in the attributes of the drug entity amoxicillin tablet and the injection furbenicillin sodium, and the chemical component intents are inquired in chemical component entity nodes which have similar entity relations with the drug entity amoxicillin tablet and the injection furbenicillin sodium respectively.
And 107, synthesizing answer voice information according to the answer text information.
Fig. 5 is a flowchart of a method for intelligently using a drug knowledge graph to answer a question and answer based on a drug knowledge graph, which synthesizes answer voice information according to the answer text information, and includes:
1071, obtaining answer speech samples and speech synthesis model based on wavenet network;
1072, extracting a third acoustic feature sequence of said answer speech sample;
1073, training a preset synthesis model by taking the third acoustic feature sequence as input and the answer speech sample as a label to obtain a trained speech synthesis model;
1074, extracting a fourth sequence of acoustic properties of said answer text message;
1075, synthesizing the fourth acoustic feature sequence by the trained speech synthesis model to obtain the answering speech information.
In particular, wavenet is a one-dimensional convolutional neural network used for speech modeling.
Specifically, extracting the third acoustic feature sequence of the answer speech sample includes: segmenting the answer speech sample into a plurality of speech frames; respectively calculating the acoustic characteristics of each voice frame in the plurality of voice frames, wherein the acoustic characteristics can comprise fundamental frequency, energy, Mel frequency cepstrum coefficient and the like; and arranging the acoustic features of the plurality of voice frames according to a time sequence to obtain a third acoustic feature sequence.
Specifically, the answer speech samples may be processed using STRAIGHT, acoustic features may be extracted from the answer speech samples, and a third acoustic feature sequence may be formed. Each of the responsive speech samples may generate a sequence of acoustic features corresponding thereto. The STRAIGHT is an algorithm for analyzing and synthesizing a speech signal. The STRAIGHT is characterized in that the spectrum envelope of the voice and the voice information can be separated, the voice signal can be decomposed into mutually independent spectrum parameters and fundamental frequency parameters, and parameters such as the fundamental frequency, the duration, the speed and the like of the voice signal can be flexibly adjusted.
The answer text information may be parsed by using a preset text parsing model, and a fourth acoustic characteristic sequence corresponding to the answer text information is obtained, where acoustic characteristics in the fourth acoustic characteristic sequence include, but are not limited to, a tone, a rhythm, a syllable, and an inter-sentence interval of a word.
The speech synthesis model can be a neural network model constructed based on a wavenet network. The wavenet network is an autoregressive network based on a Convolutional Neural Network (CNN). The wavenet network can be directly modeled at the speech waveform level. After the speech synthesis model is subjected to iterative training for a certain number of times, if the output result of the speech synthesis model meets the preset requirement, the speech synthesis model meeting the preset requirement of the output result can be determined as the trained speech synthesis model, and the trained speech synthesis model can be used for converting text data into audio data (namely, synthesized speech). The preset requirements can be adjusted according to actual conditions. For example, when the difference between the synthesized speech output by the wavenet network and the answer speech sample is smaller than a specified threshold, it may be determined that the output result of the speech synthesis model satisfies a preset requirement; in other cases, if the training times of the speech synthesis model reach a preset value, it may also be determined that the output result of the acoustic model meets a preset requirement.
In another specific embodiment, synthesizing answer speech information from the answer text information includes:
acquiring a plurality of unit characters and character combination sequences of the answer text information;
determining a plurality of unit voices corresponding to a plurality of unit characters from a preset voice library;
determining a voice combination sequence according to the character combination sequence;
and sequentially synthesizing the answer voice information according to a plurality of unit voices and the voice combination.
For example, the query text message is "what the property of furbenicillin sodium for injection is", the answer text message is "the product is white or white-like powder", and the answer voice message corresponding to "the product is white or white-like powder" is synthesized according to the answer text message.
And 108, storing and playing the answer voice information to answer the inquiry voice information.
As above, the answer voice message corresponding to "this product is white or white-like powder" may be stored and played through the speaker or earphone of the mobile device to answer the query voice message.
The intelligent drug-using question-answering method based on the drug knowledge graph of the first embodiment is realized by constructing the drug knowledge graph; acquiring inquiry voice information of a user on medicine knowledge; converting the query voice information into query text information; carrying out medicine entity identification on the inquiry text information to obtain a medicine entity; performing intention identification on the query text information to obtain a query intention; searching answer text information from the medicine knowledge graph according to the medicine entity and the inquiry intention; synthesizing answer voice information according to the answer text information; and storing and playing the answer voice information to answer the inquiry voice information. Through this embodiment user direct input speech information, the user is simple says that the problem of using medicine that wants the consultation just can obtain the answer of using medicine of voice broadcast form to can not only solve special groups such as old person can not just obtain the obstacle of using medicine knowledge through loaded down with trivial details step operation computer equipment, also can solve special groups such as old person because the poor problem of seeing the problem of using medicine knowledge answer on the screen, effectively improve efficiency and the accuracy of intelligent answer problem of using medicine.
Example 2:
fig. 6 is a block diagram of an intelligent medication question and answer apparatus based on a knowledge graph of a drug according to an embodiment of the present invention. The intelligent medicine-taking question-answering device 20 based on the medicine knowledge graph is applied to computer equipment and used for answering medicine-taking questions of a user in a voice mode, and the efficiency and the accuracy of intelligent medicine-taking answering are improved.
As shown in fig. 6, the intelligent questioning and answering device 20 based on drug knowledge base may include a construction module 201, an acquisition module 202, a conversion module 203, an entity identification module 204, an intention identification module 205, a search module 206, a synthesis module 207, and a playing module 208.
A construction module 201, configured to construct a knowledge graph of a drug;
the acquisition module 202 is used for acquiring inquiry voice information of a user on medicine knowledge;
a conversion module 203, configured to convert the query voice information into query text information;
an entity identification module 204, configured to perform drug entity identification on the query text information to obtain a drug entity;
the intention identification module 205 is used for performing intention identification on the query text information to obtain a query intention;
a search module 206 for searching for answer text information from the drug knowledge-graph based on the drug entities and the query intent;
a synthesis module 207, configured to synthesize answer speech information according to the answer text information;
the playing module 208 is used for storing and playing the answering voice message to answer the inquiry voice message.
The intelligent question-answering apparatus 20 based on the medicine knowledge-map of the second embodiment constructs a medicine knowledge-map; acquiring inquiry voice information of a user on medicine knowledge; converting the query voice information into query text information; carrying out medicine entity identification on the inquiry text information to obtain a medicine entity; performing intention identification on the query text information to obtain a query intention; searching answer text information from the medicine knowledge graph according to the medicine entity and the inquiry intention; synthesizing answer voice information according to the answer text information; and storing and playing the answer voice information to answer the inquiry voice information. The embodiment answers the medication questions of the user in a voice mode, and improves intelligent medication answering efficiency and accuracy.
Example 3:
the present embodiment provides a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions, when executed by a processor, implement the steps in the above-mentioned intelligent question-answering method based on drug knowledge graph, such as the steps 101 and 108 shown in fig. 1:
101, constructing a medicine knowledge graph;
102, acquiring inquiry voice information of a user on medicine knowledge;
103, converting the query voice information into query text information;
104, identifying the drug entity of the inquiry text information to obtain the drug entity;
105, performing intention identification on the query text information to obtain a query intention;
106, searching for answer text information from the drug knowledge-graph according to the drug entities and the query intent;
107, synthesizing answer voice information according to the answer text information;
and 108, storing and playing the answer voice information to answer the inquiry voice information.
Alternatively, the computer readable instructions, when executed by the processor, implement the functions of the modules in the above device embodiments, for example, the module 201 and 208 in fig. 6:
a construction module 201, configured to construct a knowledge graph of a drug;
the acquisition module 202 is used for acquiring inquiry voice information of a user on medicine knowledge;
a conversion module 203, configured to convert the query voice information into query text information;
an entity identification module 204, configured to perform drug entity identification on the query text information to obtain a drug entity;
the intention identification module 205 is used for performing intention identification on the query text information to obtain a query intention;
a search module 206 for searching for answer text information from the drug knowledge-graph based on the drug entities and the query intent;
a synthesis module 207 for synthesizing the answer voice information according to the answer text information;
the playing module 208 is configured to store and play the answer voice message to answer the query voice message.
Example 4:
fig. 7 is a schematic diagram of a computer device according to a third embodiment of the present invention. The computer device 30 includes a memory 301, a processor 302, and computer readable instructions, such as a smart medication question and answer program based on a knowledge graph of drugs, stored in the memory 301 and executable on the processor 302. The processor 302, when executing the computer readable instructions, implements the steps in the above-mentioned intelligent drug administration question-answering method embodiment based on the drug knowledge graph, such as 101-108 shown in fig. 1:
101, constructing a medicine knowledge graph;
102, acquiring inquiry voice information of a user on medicine knowledge;
103, converting the query voice information into query text information;
104, identifying the drug entity of the inquiry text information to obtain the drug entity;
105, performing intention identification on the query text information to obtain a query intention;
106, searching for answer text information from the drug knowledge-graph according to the drug entities and the query intent;
107, synthesizing answer voice information according to the answer text information;
and 108, storing and playing the answer voice information to answer the inquiry voice information.
Alternatively, the computer readable instructions, when executed by the processor, implement the functions of the modules in the above device embodiments, for example, the module 201 and 208 in fig. 6:
a construction module 201, configured to construct a knowledge graph of a drug;
the acquisition module 202 is used for acquiring inquiry voice information of a user on medicine knowledge;
a conversion module 203, configured to convert the query voice information into query text information;
an entity identification module 204, configured to perform drug entity identification on the query text information to obtain a drug entity;
the intention identification module 205 is used for performing intention identification on the query text information to obtain a query intention;
a search module 206 for searching for answer text information from the drug knowledge-graph based on the drug entities and the query intent;
a synthesis module 207 for synthesizing the answer voice information according to the answer text information;
the playing module 208 is configured to store and play the answer voice message to answer the query voice message.
Illustratively, the computer readable instructions may be partitioned into one or more modules that are stored in the memory 301 and executed by the processor 302 to implement the present invention. The one or more modules may be a series of computer-readable instructions capable of performing certain functions and describing the execution of the computer-readable instructions in computer device 30. For example, the computer readable instructions may be divided into a building module 201, an obtaining module 202, a converting module 203, an entity identifying module 204, an intention identifying module 205, a searching module 26, a synthesizing module 207, and a playing module 208 in fig. 6, and specific functions of each module are described in the second embodiment.
It will be understood by those skilled in the art that the schematic diagram 7 is merely an example of the computer device 30, and does not constitute a limitation of the computer device 30, and may include more or less components than those shown, or combine some components, or different components, for example, the computer device 30 may also include input and output devices, network access devices, buses, etc.
The processor 302 may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an FPGA or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor 302 may be any conventional processor or the like, the processor 302 being the control center for the computer device 30 and connecting the various parts of the overall computer device 30 using various interfaces and lines.
The memory 301 may be used to store computer readable instructions and the processor 302 may implement various functions of the computer device 30 by executing or executing computer readable instructions or modules stored in the memory 301 and invoking data stored in the memory 301. The memory 301 mainly includes a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an intention recognition function, etc.), and the like; the storage data area stores data created according to a specific use of the computer device 30. In addition, the memory 301 may include a hard disk, a memory, a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash memory card (FC), at least one magnetic disk storage device, a flash memory device, a read-only memory (ROM), a Random Access Memory (RAM), or other nonvolatile/volatile storage devices.
The modules integrated by the computer device 30 may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the above embodiments may be implemented by hardware that is configured to be instructed by computer readable instructions, which may be stored in a computer readable storage medium, and when the computer readable instructions are executed by a processor, the steps of the method embodiments may be implemented. Where the computer readable instructions comprise computer readable instruction code, the computer readable instruction code may be in source code form, object code form, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying computer readable instruction code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer memory, ROM, RAM, or the like.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described embodiments of the method and apparatus are also merely illustrative, and for example, the division of the modules is only one logical function division, and there may be other division manners in actual implementation.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the intelligent drug knowledge-graph-based questioning and answering method according to various embodiments of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Furthermore, it is to be understood that the word "comprising" does not exclude other modules or steps, and the singular does not exclude the plural. A plurality of modules or means recited in the system claims may also be implemented by one module or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. An intelligent medication question-answering method based on a medicine knowledge graph is characterized by comprising the following steps:
s1, constructing a medicine knowledge graph;
s2, acquiring inquiry voice information of the user on the medicine knowledge;
s3, converting the inquiry voice information into inquiry text information;
s4, identifying the drug entity of the inquiry text information to obtain the drug entity;
s5, identifying the intention of the query text information to obtain a query intention;
s6, searching answer text information from the medicine knowledge graph according to the medicine entities and the inquiry intention;
s7, synthesizing answer voice information according to the answer text information;
and S8, storing and playing the answer voice information to answer the inquiry voice information with medicine knowledge.
2. The intelligent drug knowledge-graph-based questioning and answering method according to claim 1, wherein the constructing of the drug knowledge graph in S1 comprises:
s11, knowledge acquisition: acquiring medicine information, chemical component information and medicine type information from a network, and identifying the medicine information, the chemical component information and the medicine type information from a medicine specification, a medical document and/or a medicine book based on character recognition;
s12, constructing a preset database: taking the medicine information as medicine entity nodes, the chemical component information as chemical component entity nodes and the medicine type information as medicine type entity nodes, and storing the medicine type information and the medicine type information into a preset database;
s13, construction of the containing type entity relationship: establishing a class-containing entity relationship between the drug entity node and the chemical component entity node in the preset database;
s14, building the relationship of the entities belonging to the class: and establishing a class entity relationship between the medicine entity node and the medicine type entity node in the preset database.
3. The drug knowledge-graph-based intelligent medication answering method according to claim 1, wherein the converting the query voice information into query text information in S3 comprises:
s31, acquiring a query voice sample of the medicine knowledge, and a query text sample and a voice recognition model corresponding to the query voice sample;
s32, extracting a first acoustic feature sequence of the query voice sample;
s33, training a voice recognition model according to the query text sample corresponding to the query voice sample and the first acoustic feature sequence to obtain a trained voice recognition model;
s34, extracting a second acoustic feature sequence of the inquiry voice information;
and S35, performing voice recognition on the second acoustic feature sequence by using the trained voice recognition model to obtain the inquiry text information.
4. The intelligent drug-knowledge-graph-based drug questioning and answering method according to claim 3, wherein the speech recognition model in S31 is preferably an acoustic model based on a long-short term memory network, the long-short term memory network comprises a forgetting phase, a selecting phase and an outputting phase, wherein in the outputting phase, the model can be based on an output gating zoDetermining the information output by the current time step t, wherein the specific formula is as follows:
Figure FDA0002768379130000021
Figure FDA0002768379130000022
Figure FDA0002768379130000023
Figure FDA0002768379130000024
ct=zf⊙ct-1+zi⊙z;
ht=zo⊙tanh(ct) (ii) a Wherein, W, Wi、Wf、WoIs the parameter to be trained, tanh, σ are respectively the tanh and logistic activation functions,
Figure FDA0002768379130000025
indicates a kronecker product and a hadamard product, x, respectivelytIs the input of t time steps, ht-1Is a hidden state of the last time step t-1, htIs a hidden state at the current time step t, ct-1Is the cell state of the last time step, ctIs the cell state at the current time step, z represents a first intermediate value calculated from W on the basis of the hidden state at the previous time step and the input at the current time step, z represents a second intermediate value calculated from W on the basis of the hidden state at the previous time step and the input at the current time stepiIs represented according to WiSelective gating calculated from the hidden state of the previous time step and the input of the current time step, zfIs represented according to WfForgetting gating obtained by calculating hidden state of last time step and input of current time step, zoIs represented according to WoOutput gating calculated from the hidden state of the previous time step and the input of the current time step, ctA second intermediate value, h, representing the selective forgetting of the cell state at the previous time step and the selective memorizing of the first intermediate valuetRepresenting the output value calculated from the output gating for the second intermediate value.
5. The drug knowledge-graph-based intelligent medication challenge answering method according to claim 3, wherein the extracting of the first acoustic feature sequence of the challenge voice sample in the S32 comprises:
s321, cutting off a mute part of the head end and the tail end of the query voice sample based on the voice endpoint monitoring technology;
s322, changing the waveform of the cut inquiry voice sample;
s323, extracting acoustic features of the voice sample after waveform change based on a Mel frequency cepstrum coefficient feature extraction method, and outputting a first acoustic feature sequence.
6. The drug knowledge-graph-based intelligent medication challenge answering method of claim 1, wherein the step of performing drug entity identification on the challenge text message in S4 comprises:
s41, acquiring a drug knowledge statement sample and a drug entity labeling sequence corresponding to the drug knowledge statement sample;
s42, acquiring a semantic feature extraction model based on a bidirectional long-time and short-time memory network and an entity recognition model based on a gated cycle unit and a conditional random field;
s43, performing word segmentation on the medicine knowledge sentence samples to obtain a plurality of medicine word samples;
s44, determining an initial medicine word vector of each medicine word sample based on a preset word vector table, and combining the initial medicine word vectors of a plurality of medicine word samples according to the word sequence to obtain an initial medicine word vector sequence;
s45, performing semantic extraction on the initial drug word vector sequence through the semantic feature extraction model to obtain a drug word vector sequence;
s46, outputting a recognition result sequence by taking the medicine word vector sequence as input through the entity recognition model;
s47, training an entity recognition model and a semantic feature extraction model according to the difference value between the recognition result sequence and the medicine entity labeling sequence based on a back propagation algorithm to obtain a medicine entity recognition model consisting of the trained semantic feature extraction model and the trained entity recognition model;
and S48, carrying out medicine entity identification on the inquiry text information through the medicine entity identification model to obtain the medicine entity.
7. The drug knowledge-graph-based intelligent medication challenge answering method according to claim 1, wherein the intention recognition of the challenge text information in S5 comprises:
s51, acquiring a multi-intention recognition model based on the BERT and the two-way long-short term memory network and a single-intention recognition model based on the BERT, the gated cyclic unit and the convolutional layer;
s52, marking the query text information as one or more query text sub-information through the multi-intention recognition model, wherein each query text sub-information corresponds to a single intention;
and S53, respectively identifying one or more query text sub-messages through the single meaning recognition model to obtain one or more query intentions.
8. The drug knowledge-graph-based intelligent drug administration question-answering method according to claim 1, wherein the step of searching answer text information from the drug knowledge-graph according to the drug entities and the question intents in the step S6 comprises:
s61, inquiring corresponding medicine entity nodes from the medicine knowledge graph through medicine entities;
and S62, searching the attribute of the medicine entity node or the target node with entity relationship with the medicine entity node according to the query intention to obtain answer text information.
9. The intelligent drug knowledge-graph-based questioning and answering method according to claims 1 to 8, wherein the equipment of the intelligent drug questioning and answering method comprises:
the construction module is used for constructing a medicine knowledge graph;
the acquisition module is used for acquiring inquiry voice information of a user on medicine knowledge;
the conversion module is used for converting the inquiry voice information into inquiry text information;
the entity identification module is used for identifying the drug entities of the inquiry text information to obtain the drug entities;
the intention identification module is used for identifying the intention of the query text information to obtain a query intention;
the searching module is used for searching answer text information from the medicine knowledge graph according to the medicine entity and the inquiry intention;
the synthesis module is used for synthesizing answer voice information according to the answer text information;
and the playing module is used for storing and playing the answer voice information so as to answer the inquiry voice information.
10. The apparatus for an intelligent medication question and answer method according to claim 9, wherein said apparatus further comprises a computer apparatus, specifically: the computer device includes a processor and a computer readable storage medium, the processor being configured to execute computer readable instructions stored in the computer readable storage medium to implement the intelligent drug knowledge-graph-based questioning and answering method according to any one of claims 1 to 8.
CN202011241075.0A 2020-11-09 2020-11-09 Intelligent medication question-answering method and device based on medicine knowledge graph Active CN112182252B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011241075.0A CN112182252B (en) 2020-11-09 2020-11-09 Intelligent medication question-answering method and device based on medicine knowledge graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011241075.0A CN112182252B (en) 2020-11-09 2020-11-09 Intelligent medication question-answering method and device based on medicine knowledge graph

Publications (2)

Publication Number Publication Date
CN112182252A true CN112182252A (en) 2021-01-05
CN112182252B CN112182252B (en) 2021-08-31

Family

ID=73917712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011241075.0A Active CN112182252B (en) 2020-11-09 2020-11-09 Intelligent medication question-answering method and device based on medicine knowledge graph

Country Status (1)

Country Link
CN (1) CN112182252B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749567A (en) * 2021-03-01 2021-05-04 哈尔滨理工大学 Question-answering system based on reality information environment knowledge graph
CN113709364A (en) * 2021-08-20 2021-11-26 云知声(上海)智能科技有限公司 Object identifying camera equipment and object identifying method
CN113905135A (en) * 2021-10-14 2022-01-07 天津车之家软件有限公司 User intention identification method and device of intelligent outbound robot
CN115062628A (en) * 2022-06-15 2022-09-16 北京信息科技大学 Automatic simulation method for doctor-patient communication conversation based on knowledge graph
WO2022213690A1 (en) * 2021-04-10 2022-10-13 浙江大学 Medication decision support method, apparatus and device based on graphic state machine, and medium
WO2022226880A1 (en) * 2021-04-29 2022-11-03 京东方科技集团股份有限公司 Drug characteristic determination method, apparatus, system and device, and storage medium
CN117438104A (en) * 2023-12-21 2024-01-23 成都市第一人民医院 Intelligent medicine early warning method, electronic equipment and computer storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050143999A1 (en) * 2003-12-25 2005-06-30 Yumi Ichimura Question-answering method, system, and program for answering question input by speech
CN110390021A (en) * 2019-06-13 2019-10-29 平安科技(深圳)有限公司 Drug knowledge mapping construction method, device, computer equipment and storage medium
CN110929016A (en) * 2019-12-10 2020-03-27 北京爱医生智慧医疗科技有限公司 Intelligent question and answer method and device based on knowledge graph
CN111046133A (en) * 2019-10-29 2020-04-21 平安科技(深圳)有限公司 Question-answering method, question-answering equipment, storage medium and device based on atlas knowledge base
CN111125309A (en) * 2019-12-23 2020-05-08 中电云脑(天津)科技有限公司 Natural language processing method and device, computing equipment and storage medium
CN111274373A (en) * 2020-01-16 2020-06-12 山东大学 Electronic medical record question-answering method and system based on knowledge graph
CN111666399A (en) * 2020-06-23 2020-09-15 中国平安人寿保险股份有限公司 Intelligent question and answer method and device based on knowledge graph and computer equipment
CN111767385A (en) * 2020-07-09 2020-10-13 腾讯科技(深圳)有限公司 Intelligent question and answer method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050143999A1 (en) * 2003-12-25 2005-06-30 Yumi Ichimura Question-answering method, system, and program for answering question input by speech
CN110390021A (en) * 2019-06-13 2019-10-29 平安科技(深圳)有限公司 Drug knowledge mapping construction method, device, computer equipment and storage medium
CN111046133A (en) * 2019-10-29 2020-04-21 平安科技(深圳)有限公司 Question-answering method, question-answering equipment, storage medium and device based on atlas knowledge base
CN110929016A (en) * 2019-12-10 2020-03-27 北京爱医生智慧医疗科技有限公司 Intelligent question and answer method and device based on knowledge graph
CN111125309A (en) * 2019-12-23 2020-05-08 中电云脑(天津)科技有限公司 Natural language processing method and device, computing equipment and storage medium
CN111274373A (en) * 2020-01-16 2020-06-12 山东大学 Electronic medical record question-answering method and system based on knowledge graph
CN111666399A (en) * 2020-06-23 2020-09-15 中国平安人寿保险股份有限公司 Intelligent question and answer method and device based on knowledge graph and computer equipment
CN111767385A (en) * 2020-07-09 2020-10-13 腾讯科技(深圳)有限公司 Intelligent question and answer method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
161124: "长短时记忆网络(LSTM)", 《HTTPS://BLOG.CSDN.NET/QQ_41931866/ARTICLE/DETAILS/107375768》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749567A (en) * 2021-03-01 2021-05-04 哈尔滨理工大学 Question-answering system based on reality information environment knowledge graph
WO2022213690A1 (en) * 2021-04-10 2022-10-13 浙江大学 Medication decision support method, apparatus and device based on graphic state machine, and medium
WO2022226880A1 (en) * 2021-04-29 2022-11-03 京东方科技集团股份有限公司 Drug characteristic determination method, apparatus, system and device, and storage medium
CN113709364A (en) * 2021-08-20 2021-11-26 云知声(上海)智能科技有限公司 Object identifying camera equipment and object identifying method
CN113709364B (en) * 2021-08-20 2024-02-09 云知声(上海)智能科技有限公司 Camera identifying equipment and object identifying method
CN113905135A (en) * 2021-10-14 2022-01-07 天津车之家软件有限公司 User intention identification method and device of intelligent outbound robot
CN113905135B (en) * 2021-10-14 2023-10-20 天津车之家软件有限公司 User intention recognition method and device of intelligent outbound robot
CN115062628A (en) * 2022-06-15 2022-09-16 北京信息科技大学 Automatic simulation method for doctor-patient communication conversation based on knowledge graph
CN117438104A (en) * 2023-12-21 2024-01-23 成都市第一人民医院 Intelligent medicine early warning method, electronic equipment and computer storage medium
CN117438104B (en) * 2023-12-21 2024-03-22 成都市第一人民医院 Intelligent medicine early warning method, electronic equipment and computer storage medium

Also Published As

Publication number Publication date
CN112182252B (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN112182252B (en) Intelligent medication question-answering method and device based on medicine knowledge graph
Luo et al. A critical review of state‐of‐the‐art chatbot designs and applications
RU2509350C2 (en) Method for semantic processing of natural language using graphic intermediary language
CN111401066B (en) Artificial intelligence-based word classification model training method, word processing method and device
JP4129987B2 (en) Analysis method, system, and program for opinion expressed from text document
WO2013125286A1 (en) Non-factoid question answering system and computer program
CN114116994A (en) Welcome robot dialogue method
WO2022134779A1 (en) Method, apparatus and device for extracting character action related data, and storage medium
Kristensson et al. A design engineering approach for quantitatively exploring context-aware sentence retrieval for nonspeaking individuals with motor disabilities
KR20170090127A (en) Apparatus for comprehending speech
CN101505328A (en) Network data retrieval method applying speech recognition and system thereof
Dey et al. Emotion extraction from real time chat messenger
CN116796857A (en) LLM model training method, device, equipment and storage medium thereof
CN110246494A (en) Service request method, device and computer equipment based on speech recognition
Mišković et al. Hybrid methodological approach to context-dependent speech recognition
Dominey Emergence of grammatical constructions: evidence from simulation and grounded agent experiments
EP3948855B1 (en) Method of browsing a resource through voice interaction
CN114492382A (en) Character extraction method, text reading method, dialog text generation method, device, equipment and storage medium
Zouaoui et al. Ontological Approach Based on Multi-Agent System for Indexing and Filtering Arabic Docu-ments
Gharat et al. Natural language processing theory applications and difficulties
Sinha et al. Transforming interactions: mouse-based to voice-based interfaces
US8478584B1 (en) Method and system for domain-optimized semantic tagging and task execution using task classification encoding
Telembici et al. Emotion Recognition Audio Database for Service Robots
Dash et al. Corpus and Dialect Study
Wang et al. Advancements and challenges in speech emotion recognition: a comprehensive review

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
GR01 Patent grant
GR01 Patent grant