WO2021114629A1 - 问答方法、装置、设备及计算机可读存储介质 - Google Patents

问答方法、装置、设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2021114629A1
WO2021114629A1 PCT/CN2020/099320 CN2020099320W WO2021114629A1 WO 2021114629 A1 WO2021114629 A1 WO 2021114629A1 CN 2020099320 W CN2020099320 W CN 2020099320W WO 2021114629 A1 WO2021114629 A1 WO 2021114629A1
Authority
WO
WIPO (PCT)
Prior art keywords
question
determined
target
attribute information
medical attribute
Prior art date
Application number
PCT/CN2020/099320
Other languages
English (en)
French (fr)
Inventor
朱昭苇
孙行智
胡岗
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021114629A1 publication Critical patent/WO2021114629A1/zh

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/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Definitions

  • This application relates to the technical field of speech semantics in artificial intelligence, and in particular to a question and answer method, device, equipment, and computer-readable storage medium.
  • the inventor realizes that the existing medical question answering system sets detailed questions step by step through a directory method, and it is difficult for users without professional medical knowledge to accurately find the answers they need.
  • the embodiments of the present application provide a question and answer method, device, device, and computer-readable storage medium, which are used to improve the speed of users accurately finding the answers they need.
  • an embodiment of the present application provides a question and answer method, which is applied to an electronic device, and the method includes:
  • each of the medical attribute information includes the name of the medical entity and specific physiological parameters
  • the target answer sentence of the question sentence is determined from the plurality of answer sentences to be determined that are associated with the target question intention.
  • an embodiment of the present application provides a question and answer device, which is applied to an electronic device, and the device includes:
  • the processing unit is configured to determine a plurality of medical attribute information based on the question sentences input by the user, each of the medical attribute information includes the name of the medical entity and specific physiological parameters; the question sentences are preprocessed to obtain a plurality of to-be-determined Questioning intention; determining the correlation between the plurality of questioning intentions to be determined and the plurality of medical attribute information; determining a target questioning intention from the plurality of questioning intentions to be determined based on the correlation; from the target Among the multiple to-be-determined answer sentences associated with the question intention, the target answer sentence of the question sentence is determined.
  • embodiments of the present application provide an electronic device that includes a processor, a memory, a communication interface, and one or more programs.
  • the one or more programs are stored in the memory and are The configuration is executed by the processor, and the program includes instructions for executing part or all of the steps described in the method described in the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium is used to store a computer program, and the above-mentioned computer program is executed by a processor to realize Part or all of the steps described in the method described in one aspect.
  • the electronic device determines multiple medical attribute information based on the question sentence input by the user; preprocesses the question sentence to obtain multiple question intentions to be determined; determines multiple question intentions to be determined Correlation with multiple medical attribute information; determine the target question intention from multiple question intentions to be determined based on the correlation; determine the target answer sentence of the question sentence from the multiple answer sentences to be determined related to the target question intention;
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 2A is a schematic flowchart of a question and answer method provided by an embodiment of the present application.
  • Figure 2B is a network architecture diagram provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another question and answer method provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of a question answering device provided by an embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic equipment includes a processor, a memory, a signal processor, a transceiver, a display screen, a speaker, a microphone, a random access memory (RAM), a camera, a sensor, and so on.
  • the memory, signal processor, display screen, speaker, microphone, RAM, camera, sensor are connected with the processor, and the transceiver is connected with the signal processor.
  • the display screen can be a liquid crystal display (Liquid Crystal Display, LCD), an organic or inorganic light-emitting diode (Organic Light-Emitting Diode, OLED), and an active matrix organic light-emitting diode (Active Matrix/Organic Light Emitting Diode, AMOLED). )Wait.
  • LCD Liquid Crystal Display
  • OLED Organic Light-Emitting Diode
  • AMOLED Active Matrix/Organic Light Emitting Diode
  • the camera may be a normal camera or an infrared camera, which is not limited here.
  • the camera may be a front camera or a rear camera, which is not limited here.
  • the sensor includes at least one of the following: a light sensor, a gyroscope, an infrared proximity sensor, a fingerprint sensor, a pressure sensor, and so on.
  • the light sensor also called the ambient light sensor, is used to detect the brightness of the ambient light.
  • the light sensor may include a photosensitive element and an analog-to-digital converter.
  • the photosensitive element is used to convert the collected optical signal into an electric signal
  • the analog-to-digital converter is used to convert the above-mentioned electric signal into a digital signal.
  • the light sensor may further include a signal amplifier, and the signal amplifier may amplify the electrical signal converted by the photosensitive element and then output it to the analog-to-digital converter.
  • the above-mentioned photosensitive element may include at least one of a photodiode, a phototransistor, a photoresistor, and a silicon photocell.
  • the processor is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device. By running or executing software programs and/or modules stored in the memory, and calling data stored in the memory, Perform various functions of the electronic device and process data to monitor the electronic device as a whole.
  • the processor can be integrated with an application processor and a modem processor.
  • the application processor mainly processes an operating system, a user interface, and an application program
  • the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor.
  • the memory is used to store software programs and/or modules, and the processor executes various functional applications and data processing of the electronic device by running the software programs and/or modules stored in the memory.
  • the memory may mainly include a storage program area and a storage data area, where the storage program area can store an operating system, at least one software program required by a function, etc.; the storage data area can store data created according to the use of electronic equipment, etc.
  • the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • FIG. 2A is a schematic flowchart of a question and answer method provided by an embodiment of the present application, which is applied to an electronic device, and the method includes:
  • Step 201 Determine multiple medical attribute information based on the question sentence input by the user.
  • the embodiments of the present application can be applied to smart cities, and specifically may involve the field of smart medical care in smart cities.
  • the development of smart medical care is conducive to improving medical services, promoting the construction of smart cities, and integrating urban systems and medical services. Connection and integration will help improve the efficiency of the entire city's resources, improve the quality of life of users, and increase the convenience of users' lives.
  • each of the above-mentioned medical attribute information includes the name of a medical entity and specific physiological parameters
  • the entity name includes the name of a medicine, a name of a food, a name of a symptom, a name of various human organs, and so on.
  • Specific physiological parameters include the patient's blood pressure value, the patient's blood sugar value, the patient's course of time (such as blurred vision for three days), the patient's lesion site (such as left foot edema) and so on.
  • the user’s question sentence could be "My blood sugar 13, blood pressure 150/120, weight 80, what dose should I use for metformin? What are the dietary restrictions?"
  • the medical entity name in the question sentence includes “metformin” , Specific physiological parameters “blood sugar 13”, “blood pressure 150/120”, “weight 80”.
  • the above-mentioned medical attribute information can be stored in a blockchain.
  • the blockchain referred to in the embodiments of this application refers to distributed data storage, peer-to-peer transmission, and consensus mechanism. , Encryption algorithm and other new application modes of computer technology.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • Step 202 Preprocessing the question sentence to obtain multiple question intentions to be determined.
  • the electronic device may include a database, and the database may include a plurality of preset questioning intentions.
  • the preset questioning intentions can be set by the user or the system defaults.
  • the above preprocessing can be set by the user or the system defaults. Specifically, By identifying the question sentence, the semantics of the question sentence can be obtained, and then the preset question intentions including the semantics of the question sentence can be searched from multiple preset question intentions. Finally, the found preset question intentions can be regarded as multiple to be determined Question intention.
  • Step 203 Determine the correlation between the multiple question intentions to be determined and the multiple medical attribute information.
  • the relevance can be expressed by binary values, for example, 1 and 0, 1 means relevant, 0 means not relevant, and other numerical values other than 1 and 0 can also be used. Relevance can also be represented by a range of values, for example, 0 to 1, where 0 means not relevant, and 1 means most relevant.
  • Step 204 Determine a target question intention from the plurality of question intentions to be determined based on the correlation.
  • the target questioning intention can be, for example, a questioning intention to be determined whose correlation with each medical attribute information is greater than or equal to the first preset threshold, or it can be the correlation with at least one medical attribute information greater than or equal to the second.
  • Preset threshold The question intention to be determined, the first preset threshold and the second preset threshold can be set by the user or the system defaults. In addition, the first preset threshold may be equal to or not equal to the second preset threshold ;
  • the target question intention can be one or more, which is not limited here.
  • Step 205 Determine the target answer sentence of the question sentence from the plurality of answer sentences to be determined that are associated with the target question intention.
  • determining the target answer sentence of the question sentence from the plurality of answer sentences to be determined that are associated with the target question intention can be to determine the degree of matching between the question sentence and each answer sentence to be determined, through the The matching degree between the question sentence and each answer sentence to be determined determines the target answer sentence.
  • the electronic device determines multiple medical attribute information based on the question sentence input by the user, and each medical attribute information includes the name of the medical entity and specific physiological parameters; the question sentence is preprocessed to obtain multiple medical attribute information.
  • a questioning intention to be determined determining the correlation between multiple questioning intentions to be determined and multiple medical attribute information; determining the target questioning intention from the multiple questioning intentions to be determined based on the correlation; multiple related questioning intentions from the target Among the answer sentences to be determined, determine the target answer sentence of the question sentence; users do not need to search the answer to the question they need in the medical question and answer system level by level through the directory method, and directly give the target answer sentence, which can be determined by the target answer sentence Answers to the questions you need, while reducing the process of searching for answers, not only improves the speed of users accurately finding the answers they need, but also improves the accuracy of the answers.
  • the determining a plurality of medical attribute information based on the question sentence input by the user includes:
  • the first column vector is converted into a second column vector through a second hidden layer, and the multiple column matrix elements included in the second column vector respectively correspond to representing multiple pieces of medical attribute information.
  • the multiple medical attribute keywords extracted from the question sentence input by the user can be extracted from the question sentence input by the user in the manner of a rule engine.
  • the rule engine is a way to separate the entity extraction logic from the code (Drools is commonly used).
  • the rule engine uses a predefined language to write the rules in a standard form, and the system uses a separate module to drive the parsing rules when the system is running, instead of reading the rules from the code. This increases the portability and maintainability of the rules, and at the same time makes the code run more efficiently because it is independent of the code framework. Regardless of efficiency and engineering optimization, the rule engine can be simply understood as rule-based extraction.
  • extracting medical attribute information from the question sentence by means of a rule engine includes: obtaining the starting coordinates and ending coordinates of the question sentence; determining the search coordinate range based on the starting coordinates and the ending coordinates; and using the rule engine The method extracts medical attribute information within the search coordinate range.
  • rule engine for patient blood sugar is defined as follows: (1) keyword “blood sugar” + number; (2) keyword “learning sugar” or “snow sugar” or “blood sugar” + numbers; (3) keyword “Glucose” + function word “is” or “ ⁇ ” or “value” + numbers.
  • rule (2) is for typos
  • rule (3) is for cases where there is no actual meaning between keywords and numbers.
  • each medical attribute keyword is vectorized and transformed into the first hidden layer and the second hidden layer.
  • Column vector which expresses multiple medical attribute information in the form of a column vector is helpful for subsequent determination of the correlation between multiple to-be-determined question intentions and multiple medical attribute information.
  • the preprocessing of the question sentence to obtain multiple question intentions to be determined includes:
  • the fifth column vector is converted into a one-dimensional row vector through the fifth hidden layer to obtain the first row vector.
  • the multiple row matrix elements included in the first row vector respectively correspond to multiple question intentions to be determined.
  • the user’s question sentence could be "My blood sugar 13, blood pressure 150/120, weight 80, what dosage of metformin should I use? What are the dietary restrictions?", the question sentence is segmented, and multiple questions are obtained. Keywords “me”, “of”, “blood sugar 13”, “blood pressure 150/120”, “weight 80”, “metformin”, “should”, “used”, “how much”, “dose”, “diet” , “Yes”, “What", “Don't”.
  • performing word segmentation processing on the question sentence to obtain a plurality of question keywords includes: dividing the question sentence based on the sentence constituents of the question sentence to obtain a plurality of first keywords; The constituent components filter the first keyword to obtain multiple question keywords.
  • the sentence constituents include at least one of the following: subject, predicate, object, attributive, adverbial, complement, head, and verb.
  • Filtering the first keyword according to the sentence component is to delete the first keyword of the target sentence component.
  • the target sentence component can be the subject, "I”, “we”, etc., or delete such as Stop words, modal particles, "oh", "ah”, etc.
  • the specific structures of the first hidden layer and the third hidden layer may be the same, and the specific structures of the second hidden layer and the fourth hidden layer may be the same.
  • the specific implementation of vector splicing can be, for example, as follows: the second column vector is (a 1 , a 2 ) T , the fourth column vector is (b 1 , b 2 , b 3 ) T , then the fifth column vector obtained after splicing
  • the column vector can be (a 1 , a 2 , b 1 , b 2 , b 3 ) T.
  • each question keyword is vectorized and transformed into a column vector through the third hidden layer and the fourth hidden layer. Finally, the vector is spliced and row vector transformed.
  • the form of row vector expressing multiple to-be-determined question intentions is beneficial to the subsequent determination of the correlation between multiple to-be-determined question intentions and multiple medical attribute information.
  • the determining the relevance of the plurality of question intentions to be determined and the plurality of medical attribute information includes:
  • the correlation matrix is used to indicate the relationship between the plurality of question intentions to be determined and the plurality of medical attribute information Correlation, wherein the value of the matrix element in the correlation matrix is 1 or 0, and the 1 is used to indicate the question intention to be determined corresponding to the matrix element with the value of 1 and the value of The medical attribute information corresponding to the matrix element of 1 is related, and the 0 is used to indicate that the questioning intention to be determined corresponding to the matrix element with the value of 0 is not related to the medical attribute information corresponding to the matrix element with the value of 1 .
  • performing a dot product operation on the second column vector and the first row vector to obtain a correlation matrix includes: performing a dot product operation on the second column vector and the first row vector to obtain the first row vector A matrix; the first matrix is converted into a correlation matrix through sigmoid.
  • the sigmoid is used to convert the value of the matrix element of the first matrix into 0 or 1.
  • FIG. 2B is a network architecture diagram provided by an embodiment of the present application.
  • the question intention has two "how to use medicine” and “how to eat”, and the medical attribute information has two "blood sugar 13" and "weight 80". If the correlation matrix is It means that “how to use medicine” is related to “weight 80”, and “how to eat” is related to “blood sugar 13”; if the correlation matrix is It means that "how to use medicine” is related to "blood sugar 13", and “how to eat” is related to “weight 80”; if the correlation matrix is It means that "how to use medicine” is related to both “blood sugar 13” and “body weight 80", and “how to eat” is related to both "body weight 80" and “blood sugar 13".
  • the second column vector and the first row vector are subjected to a dot product operation to obtain a correlation matrix, which takes into account the names of multiple medical entities and specific physiological parameters. Afterwards, the medical entity name and specific physiological parameter weights that are strongly related to the target answer sentence will account for a larger proportion, and the accuracy of the target answer sentence determined only by the question sentence will be higher.
  • the target question intention is related to at least one medical attribute information of the plurality of medical attribute information.
  • determining a target question intention from the plurality of question intentions to be determined based on the correlation includes:
  • the target questioning intention is determined.
  • the above-mentioned medical attribute information may include: medical entity name and specific physiological parameters; the above-mentioned correlation matrix represents the correlation between each question intention to be determined and each medical entity name and specific victory parameters.
  • the correlation matrix Based on the correlation matrix, determine the proportion of each of the multiple to-be-determined questioning intentions, the name of each medical entity, and the specific victory parameter in the above-mentioned correlation matrix.
  • the intention is the questioning intention of the target to be determined. The larger the proportion, the stronger the correlation.
  • the at least one questioning intention to be determined can be determined as the target questioning intention.
  • the target question intention is related to at least one medical attribute information of the plurality of medical attribute information.
  • the determination of the target answer sentence of the question sentence from the plurality of answer sentences to be determined associated with the target question intention includes:
  • the answer sentence to be determined corresponding to the target knowledge side feature is used as the target answer sentence of the question sentence.
  • the user's question sentence may be "My blood sugar is 13, my blood pressure is 150/120, and my weight is 80, how should I lower my blood pressure?".
  • the knowledge-side features 13, 150, 120, 80) are extracted from it.
  • the question intention includes two answer sentences: a) age not more than 40 years old, shrink If the blood pressure is not higher than 160, and the diastolic blood pressure is not higher than 120, take Glinide.
  • FIG. 3 is a schematic flowchart of a question and answer method provided by an embodiment of the present application, which is applied to an electronic device, and the method includes:
  • Step 301 Extract multiple medical attribute keywords from the question sentences input by the user.
  • Step 302 Embed each of the medical attribute keywords into a vector space to obtain multiple medical attribute word vectors.
  • Step 303 Transform the multiple medical attribute word vectors into a one-dimensional column vector through the first hidden layer to obtain a first column vector.
  • Step 304 Transform the first column vector into a second column vector through a second hidden layer, and the multiple column matrix elements included in the second column vector respectively correspond to multiple pieces of medical attribute information, and each of the medical attributes
  • the information includes the name of the medical entity and specific physiological parameters.
  • Step 305 Perform word segmentation processing on the question sentence to obtain multiple question keywords.
  • Step 306 Embed each of the question keywords into the vector space to obtain multiple question word vectors.
  • Step 307 Transform the multiple question word vectors into a one-dimensional column vector through a third hidden layer to obtain a third column vector.
  • Step 308 Transform the third column vector into a fourth column vector through the fourth hidden layer.
  • Step 309 concatenate the second column vector and the fourth column vector to obtain a fifth column vector.
  • Step 310 Transform the fifth column vector into a one-dimensional row vector through a fifth hidden layer to obtain a first row vector.
  • the multiple row matrix elements included in the first row vector respectively correspond to a plurality of questions to be determined. intention.
  • Step 311 Perform a dot product operation on the second column vector and the first row vector to obtain a correlation matrix.
  • the correlation matrix is used to represent the plurality of question intentions to be determined and the plurality of medical treatments.
  • the correlation of attribute information wherein the matrix element in the correlation matrix has a value of 1 or 0, and the 1 is used to indicate the to-be-determined questioning intention and value corresponding to the matrix element with the value of 1. It is related to the medical attribute information corresponding to the matrix element of 1, and the 0 is used to indicate the to-be-determined questioning intention corresponding to the matrix element of 0 and the medical attribute corresponding to the matrix element of 1 The information is not relevant.
  • Step 312 Determine a target questioning intention from the plurality of questioning intentions to be determined based on the correlation, and the target questioning intention is related to at least one medical attribute information of the plurality of medical attribute information.
  • Step 313 Extract knowledge-side features from each of the answer sentences to be determined to obtain multiple knowledge-side features.
  • Step 314 Extract data-side features from the multiple medical attribute information associated with the target questioning intention.
  • Step 315 Determine the degree of matching between the data-side feature and each of the knowledge-side features to obtain multiple matching degrees.
  • Step 316 Determine the target matching degree that is greater than or equal to the preset matching degree among the multiple matching degrees.
  • Step 317 Determine the target knowledge side feature corresponding to the target matching degree.
  • Step 318 Use the to-be-determined answer sentence corresponding to the target knowledge side feature as the target answer sentence of the question sentence.
  • step 301 to step 304 can be performed synchronously with step 305 to step 308, or can be performed asynchronously.
  • step 301 to step 304 can be performed synchronously with step 305 to step 308, or can be performed asynchronously.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device includes a memory and a communication interface. And one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor, and the programs include instructions for executing the following steps:
  • each of the medical attribute information includes the name of the medical entity and specific physiological parameters
  • the target answer sentence of the question sentence is determined from the plurality of answer sentences to be determined that are associated with the target question intention.
  • the above-mentioned program includes instructions specifically for executing the following steps:
  • the first column vector is converted into a second column vector through a second hidden layer, and the multiple column matrix elements included in the second column vector respectively correspond to representing multiple pieces of medical attribute information.
  • the above program includes instructions specifically for executing the following steps:
  • the fifth column vector is transformed into a one-dimensional row vector through the fifth hidden layer to obtain a first row vector.
  • the multiple row matrix elements included in the first row vector respectively correspond to multiple question intentions to be determined.
  • the above-mentioned program includes instructions specifically for executing the following steps:
  • the correlation matrix is used to indicate the relationship between the plurality of question intentions to be determined and the plurality of medical attribute information Correlation, wherein the value of the matrix element in the correlation matrix is 1 or 0, and the 1 is used to indicate the question intention to be determined corresponding to the matrix element with the value of 1 and the value of The medical attribute information corresponding to the matrix element of 1 is related, and the 0 is used to indicate that the questioning intention to be determined corresponding to the matrix element with the value of 0 is not related to the medical attribute information corresponding to the matrix element with the value of 1 .
  • the above-mentioned program includes instructions specifically for executing the following steps:
  • the target questioning intention is determined.
  • the target question intention is related to at least one medical attribute information of the plurality of medical attribute information.
  • the above program includes instructions specifically for executing the following steps:
  • the answer sentence to be determined corresponding to the target knowledge side feature is used as the target answer sentence of the question sentence.
  • an electronic device includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiment of the present application may divide the electronic device into functional units according to the method example.
  • each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
  • the integrated unit may be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 5 is a schematic structural diagram of a question and answer device provided by an embodiment of the present application, which is applied to electronic equipment, and the device includes:
  • the processing unit 501 is configured to determine a plurality of medical attribute information based on a question sentence input by a user, each of the medical attribute information includes the name of a medical entity and a specific physiological parameter; preprocess the question sentence to obtain a plurality of questions to be determined Determining the correlation between the multiple to-be-determined questioning intentions and the multiple medical attribute information; determining the target questioning intention from the multiple to-be-determined questioning intentions based on the correlation; from the Among the multiple to-be-determined answer sentences associated with the target question intention, the target answer sentence of the question sentence is determined.
  • the processing unit 501 is specifically configured to extract multiple medical attribute keywords from the question sentence input by the user; Each of the medical attribute keywords is embedded in the vector space to obtain multiple medical attribute word vectors; the multiple medical attribute word vectors are converted into one-dimensional column vectors through the first hidden layer to obtain the first column vector; The second hidden layer converts the first column vector into a second column vector, and a plurality of column matrix elements included in the second column vector respectively correspond to a plurality of medical attribute information.
  • the processing unit 501 is specifically configured to perform word segmentation processing on the question sentence to obtain multiple Question keywords; embed each of the question keywords into the vector space to obtain multiple question word vectors; convert the multiple question word vectors into a one-dimensional column vector through a third hidden layer to obtain a third column vector; The third column vector is converted into a fourth column vector through the fourth hidden layer; the second column vector is spliced with the fourth column vector to obtain the fifth column vector; the fifth column vector is obtained through the fifth hidden layer The fifth column vector is transformed into a one-dimensional row vector to obtain a first row vector.
  • the multiple row matrix elements included in the first row vector respectively correspond to a plurality of question intentions to be determined.
  • the processing unit 501 in determining the correlation between the plurality of question intentions to be determined and the plurality of medical attribute information, is specifically configured to compare the second column vector with The first row vector is subjected to a dot multiplication operation to obtain a correlation matrix, and the correlation matrix is used to represent the correlation between the plurality of question intentions to be determined and the plurality of medical attribute information, wherein the correlation
  • the value of the matrix element in the sex matrix is 1 or 0, and the 1 is used to indicate the to-be-determined questioning intention corresponding to the matrix element with the value of 1 and the medical attribute corresponding to the matrix element with the value of 1 Information is related, and the 0 is used to indicate that the questioning intention to be determined corresponding to the matrix element with the value of 0 is not related to the medical attribute information corresponding to the matrix element with the value of 1.
  • the processing unit 501 is specifically configured to be based on the correlation matrix, Determine the proportion of the plurality of to-be-determined questioning intentions related to each medical attribute information of the plurality of medical attribute information to obtain a plurality of proportions; select among the plurality of proportions to be greater than a first preset threshold At least one questioning intention to be determined corresponding to the proportion of is the questioning intention of the target to be determined, and at least one questioning intention of the target to be determined is obtained; the target questioning intention is determined based on the questioning intention of the at least one target to be determined.
  • the target question intention is related to at least one medical attribute information of the plurality of medical attribute information.
  • the processing unit 501 in determining the target answer sentence of the question sentence among the plurality of answer sentences to be determined associated with the target question intention, is specifically configured to download each Extracting knowledge-side features from the answer sentence to be determined to obtain multiple knowledge-side features; extracting data-side features from multiple medical attribute information associated with the target question intent; determining the data-side features and each The matching degree of the knowledge-side features obtains multiple matching degrees; determining the target matching degree greater than or equal to the preset matching degree among the multiple matching degrees; determining the target knowledge-side feature corresponding to the target matching degree; The answer sentence to be determined corresponding to the target knowledge side feature is used as the target answer sentence of the question sentence.
  • the question answering apparatus may further include a communication unit 502 and a storage unit 503, and the storage unit 503 is used to store the program code and data of the electronic device.
  • the processing unit 501 may be a processor
  • the communication unit 502 may be a touch screen or a transceiver
  • the storage unit 503 may be a memory.
  • the embodiment of the present application also provides a chip, wherein the chip includes a processor, which is used to call and run a computer program from the memory, so that the device installed with the chip executes the method described in the electronic device in the above method embodiment. Part or all of the steps.
  • the embodiments of the present application also provide a computer-readable storage medium, wherein the computer-readable storage medium may be non-volatile or volatile, the computer-readable storage medium stores a computer program, and
  • the computer program includes program instructions, and when the program instructions are executed by the processor, they are used to implement the following steps:
  • the program instructions when executed by the processor, they are also used to implement the following steps: extract multiple medical attribute keywords from the question sentences input by the user; Words are embedded in the vector space to obtain multiple medical attribute word vectors; the multiple medical attribute word vectors are converted into one-dimensional column vectors through the first hidden layer to obtain the first column vector; the second hidden layer is used to convert the first column vector One column vector is transformed into a second column vector, and the multiple column matrix elements included in the second column vector respectively correspond to representing multiple pieces of medical attribute information.
  • the program instructions when executed by the processor, they are also used to implement the following steps: perform word segmentation processing on the question sentence to obtain a plurality of question keywords; Embed into the vector space to obtain multiple question word vectors; convert the multiple question word vectors into one-dimensional column vectors through a third hidden layer to obtain a third column vector; use a fourth hidden layer to convert the third column vector Into a fourth column vector; splicing the second column vector with the fourth column vector to obtain a fifth column vector; transforming the fifth column vector into a one-dimensional row vector through a fifth hidden layer to obtain A first row vector, and multiple row matrix elements included in the first row vector respectively correspond to a plurality of question intentions to be determined.
  • the program instructions when executed by the processor, they are also used to implement the following steps: perform a dot multiplication operation on the second column vector and the first row vector to obtain a correlation matrix,
  • the correlation matrix is used to indicate the correlation between the plurality of question intentions to be determined and the plurality of medical attribute information, wherein the value of the matrix element in the correlation matrix is 1 or 0, and the 1 is used to indicate that the questioning intention to be determined corresponding to the matrix element with the value of 1 is related to the medical attribute information corresponding to the matrix element with the value of 1, and the 0 is used to indicate that the value of 0 is
  • the question intention to be determined corresponding to the matrix element is not related to the medical attribute information corresponding to the matrix element with the value of 1.
  • the program instructions when executed by the processor, they are also used to implement the following steps: based on the correlation matrix, determine that the multiple to-be-determined questioning intentions are related to the multiple medical treatments.
  • the proportions related to each medical attribute information in the attribute information are obtained, and a plurality of proportions are obtained; and at least one questioning intention to be determined corresponding to a proportion of the plurality of proportions greater than the first preset threshold is selected as the target to be determined
  • the questioning intention is to obtain the questioning intention of at least one target to be determined; based on the questioning intention of the at least one target to be determined, the target questioning intention is determined.
  • the program instructions when executed by the processor, they are also used to implement the following steps: extract knowledge-side features from each of the answer sentences to be determined to obtain multiple knowledge-side features; From the multiple medical attribute information associated with the target questioning intention, extract the data-side feature; determine the degree of matching between the data-side feature and each of the knowledge-side features to obtain multiple matching degrees; determine the multiple matches A target matching degree greater than or equal to a preset matching degree in the degree; determining the target knowledge-side feature corresponding to the target matching degree; using the to-be-determined answer sentence corresponding to the target knowledge-side feature as the target answer sentence of the question sentence .
  • the embodiments of the present application also provide a computer program product.
  • the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program.
  • the above-mentioned computer program is operable to cause a computer to execute any of the methods described in the above-mentioned method embodiments. Part or all of the steps of the method.
  • the computer program product may be a software installation package, and the above-mentioned computer includes electronic equipment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

一种问答方法、装置、设备及计算机可读存储介质,涉及人工智能中的语音语义领域,应用于电子设备,该问答方法包括:基于用户输入的提问语句确定多个医疗属性信息(201);对所述提问语句进行预处理,得到多个待确定的提问意图(202);确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性(203);基于所述相关性从所述多个待确定的提问意图中确定目标提问意图(204);从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句(205)。该方法可提高用户准确找到自己所需答案的速度。该方法还涉及区块链技术,同时该方法还可应用于智慧医疗领域中,从而推动智慧城市的建设。

Description

问答方法、装置、设备及计算机可读存储介质
本申请要求于2020年05月29日提交中国专利局、申请号为2020104758610,发明名称为“问答方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能中的语音语义技术领域,尤其涉及一种问答方法、装置、设备及计算机可读存储介质。
背景技术
由于医疗资源有限,看病难一直是我国亟待解决的民生问题,解决该问题的一个行之有效的方法是将医疗行业信息化。通过网上的医疗问答系统,用户可以足不出户地进行医疗系统方面的咨询,而不必去医院或者是诊所经历复杂的手续和漫长的等待。
然而,发明人意识到现有的医疗问答系统是通过目录方式逐级设置细化问题,对于没有专业医疗知识的用户难以准确地找到自己需要的答案。
发明内容
本申请实施例提供一种问答方法、装置、设备及计算机可读存储介质,用于提高用户准确找到自己所需答案的速度。
第一方面,本申请实施例提供一种问答方法,应用于电子设备,所述方法包括:
基于用户输入的提问语句确定多个医疗属性信息,每个所述医疗属性信息包括医疗实体名称以及特异性生理参数;
对所述提问语句进行预处理,得到多个待确定的提问意图;
确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性;
基于所述相关性从所述多个待确定的提问意图中确定目标提问意图;
从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
第二方面,本申请实施例提供一种问答装置,其中,应用于电子设备,所述装置包括:
处理单元,用于基于用户输入的提问语句确定多个医疗属性信息,每个所述医疗属性信息包括医疗实体名称以及特异性生理参数;对所述提问语句进行预处理,得到多个待确定的提问意图;确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性;基于所述相关性从所述多个待确定的提问意图中确定目标提问意图;从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
第三方面,本申请实施例提供一种电子设备,该电子设备包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如本申请实施例第一方面所述的方法中所描述的部分或全部步骤的指令。
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质用于存储计算机程序,其中,上述计算机程序被处理器执行,以实现如本申请实施 例第一方面所述的方法中所描述的部分或全部步骤。
可以看出,在本申请实施例中,电子设备基于用户输入的提问语句确定多个医疗属性信息;对提问语句进行预处理,得到多个待确定的提问意图;确定多个待确定的提问意图与多个医疗属性信息的相关性;基于相关性从多个待确定的提问意图中确定目标提问意图;从目标提问意图关联的多个待确定的回答语句中,确定提问语句的目标回答语句;不需要用户在医疗问答系统中通过目录方式逐级查找自己所需问题的答案,直接给出目标回答语句,通过目标回答语句就可确定自己所需问题的答案,同时还减少了查找搜索答案的流程,不仅提高了用户准确找到自己所需答案的速度,而且还提高了答案的准确性。
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种电子设备的结构示意图;
图2A是本申请实施例提供的一种问答方法的流程示意图;
图2B是本申请实施例提供的一种网络架构图;
图3是本申请实施例提供的另一种问答方法的流程示意图;
图4是本申请实施例提供的一种电子设备的结构示意图;
图5是本申请实施例提供的一种问答装置的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
以下,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。
如图1所示,图1是本申请实施例提供的一种电子设备的结构示意图。该电子设备包括处理器、存储器、信号处理器、收发器、显示屏、扬声器、麦克风、随机存取存储器(Random Access Memory,RAM)、摄像头和传感器等等。其中,存储器、信号处理器、显示屏、扬声器、麦克风、RAM、摄像头、传感器与处理器连接,收发器与信号处理器连接。
其中,显示屏可以是液晶显示器(Liquid Crystal Display,LCD)、有机或无机发光二极管(Organic Light-Emitting Diode,OLED)、有源矩阵有机发光二极体面板(Active Matrix/Organic Light Emitting Diode,AMOLED)等。
其中,该摄像头可以是普通摄像头、也可以是红外摄像,在此不作限定。该摄像头可以是前置摄像头或后置摄像头,在此不作限定。
其中,传感器包括以下至少一种:光感传感器、陀螺仪、红外接近传感器、指纹传感器、压力传感器等等。其中,光感传感器,也称为环境光传感器,用于检测环境光亮度。光线传感器可以包括光敏元件和模数转换器。其中,光敏元件用于将采集的光信号转换为电信号,模数转换器用于将上述电信号转换为数字信号。可选的,光线传感器还可以包括信号放大器,信号放大器可以将光敏元件转换的电信号进行放大后输出至模数转换器。上述光敏元件可以包括光电二极管、光电三极管、光敏电阻、硅光电池中的至少一种。
其中,处理器是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器内的软体程序和/或模块,以及调用存储在存储器内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。
其中,处理器可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器中。
其中,存储器用于存储软体程序和/或模块,处理器通过运行存储在存储器的软件程序和/或模块,从而执行电子设备的各种功能应用以及数据处理。存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的软体程序等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
下面对本申请实施例进行详细介绍。
请参阅图2A,图2A是本申请实施例提供的一种问答方法的流程示意图,应用于电子设备,所述方法包括:
步骤201:基于用户输入的提问语句确定多个医疗属性信息。
其中,本申请实施例可应用于智慧城市中,具体可涉及智慧城市中的智慧医疗领域中,智慧医疗的发展有利于改善医疗服务,以推动智慧城市的建设,将城市的系统与医疗服务进行打通以及集成,有利于提高整个城市资源的效率,有利于改善用户生活质量,以增加用户的生活便利性。
其中,上述提问语句可以是用户通过文字、语音、视频等方式输入的。上述每个所述 医疗属性信息包括医疗实体名称以及特异性生理参数,实体名称包括药品名称、食物名称、症状名称、人体各器官名称等等。特异性生理参数包括患者血压值、患者血糖值、患者病程时间(如视力模糊三天)、患者病灶部位(如左脚浮肿)等等。
举例说明,例如用户的提问语句例如可以为“我的血糖13,血压150/120,体重80,二甲双胍应该用多大剂量?饮食有什么忌口?”,该提问语句中的医疗实体名称包括“二甲双胍”,特异性生理参数“血糖13”、“血压150/120”、“体重80”。
可选地,为了增强用户的隐私性,在具体处理中,可将上述医疗属性信息存储于区块链中,本申请实施例中所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
步骤202:对所述提问语句进行预处理,得到多个待确定的提问意图。
进一步地,电子设备中可包括数据库,该数据库中可包括多个预设提问意图,该预设提问意图可由用户自行设置或者系统默认,上述预处理可为用户自行设置或者系统默认,具体地,可通过识别提问语句,得到提问语句的语义,然后从多个预设提问意图中查找包括提问语句的语义的预设提问意图,最后,可将查找到的预设提问意图作为多个待确定的提问意图。
步骤203:确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性。
其中,关联性可以用二元数值表示,例如1和0,1表示相关,0表示不相关,还可以用除1和0之外的其他数值表示。关联性还可以用一个数值范围表示,例如0~1,0表示不相关,1表示最相关。
步骤204:基于所述相关性从所述多个待确定的提问意图中确定目标提问意图。
其中,目标提问意图例如可以为与每个医疗属性信息的相关性均大于或等于第一预设阈值的待确定的提问意图,也可以为与至少一个医疗属性信息的相关性大于或等于第二预设阈值待确定的提问意图,第一预设阈值以及第二预设阈值可为用户自行设置或者系统默认,另外,该第一预设阈值可以与第二预设阈值相等,也可以不相等;目标提问意图可以是一个,也可以是多个,在此不做限定。
步骤205:从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
进一步地,从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句,可以为确定该提问语句与每个待确定的回答语句的匹配度,通过该提问语句与每个待确定的回答语句的匹配度确定目标回答语句。
可以看出,在本申请实施例中,电子设备基于用户输入的提问语句确定多个医疗属性信息,每个医疗属性信息包括医疗实体名称以及特异性生理参数;对提问语句进行预处理,得到多个待确定的提问意图;确定多个待确定的提问意图与多个医疗属性信息的相关性; 基于相关性从多个待确定的提问意图中确定目标提问意图;从目标提问意图关联的多个待确定的回答语句中,确定提问语句的目标回答语句;不需要用户在医疗问答系统中通过目录方式逐级查找自己所需问题的答案,直接给出目标回答语句,通过目标回答语句就可确定自己所需问题的答案,同时还减少了查找搜索答案的流程,不仅提高了用户准确找到自己所需答案的速度,而且还提高了答案的准确性。
在本申请的一实现方式中,所述基于用户输入的提问语句确定多个医疗属性信息,包括:
从用户输入的提问语句中提取得到多个医疗属性关键词;
将每个所述医疗属性关键词嵌入到向量空间,得到多个医疗属性词向量;
通过第一隐层将所述多个医疗属性词向量转化为一维列向量,得到第一列向量;
通过第二隐层将所述第一列向量转化为第二列向量,所述第二列向量包括的多个列矩阵元分别对应表示多个医疗属性信息。
其中,从用户输入的提问语句中提取得到多个医疗属性关键词可以采用规则引擎方式从用户输入的提问语句中提取。规则引擎是将实体抽取逻辑从代码中剥离出来的一种方法(常用的是Drools)。规则引擎使用预定义的语言将规则写成标准形式,系统运行时采用单独模块驱动解析规则,而不是从代码中读取规则。这增加了规则的可移植性、可维护性,同时由于独立于代码框架,使得代码运行的效率更高。不考虑效率及工程方面的优化,规则引擎可以简单的理解为基于规则的抽取。
进一步地,通过规则引擎方式从所述提问语句中提取医疗属性信息,包括:获取提问语句的起始坐标和结束坐标;基于所述起始坐标和所述结束坐标确定搜寻坐标范围;通过规则引擎方式在所述搜寻坐标范围内提取医疗属性信息。
例如,针对患者血糖的规则引擎定义如下:(1)关键字“血糖”+数字;(2)关键字“学糖”或“雪糖”或“血唐”等+数字;(3)关键字“血糖”+虚词“是”或“为”或“值”等+数字。其中规则(2)针对错别字情况,规则(3)针对在关键词和数字之间包含无实际意义虚词的情况。
可以看出,在本申请实施例中,从用户输入的提问语句中提取得到多个医疗属性关键词,然后将每个医疗属性关键词向量化以及通过第一隐层和第二隐层转化为列向量,列向量的形式表示多个医疗属性信息有利于后续确定多个待确定的提问意图与多个医疗属性信息的相关性。
在本申请的一实现方式中,所述对所述提问语句进行预处理,得到多个待确定的提问意图,包括:
对所述提问语句进行分词处理,得到多个提问关键词;
将每个所述提问关键词嵌入到向量空间,得到多个提问词向量;
通过第三隐层将所述多个提问词向量转化为一维列向量,得到第三列向量;
通过第四隐层将所述第三列向量转化为第四列向量;
将所述第二列向量与所述第四列向量进行拼接,得到第五列向量;
通过第五隐层将所述第五列向量转化为一维行向量,得到第一行向量,所述第一行向 量包括的多个行矩阵元分别对应表示多个待确定的提问意图。
举例说明,例如用户的提问语句例如可以为“我的血糖13,血压150/120,体重80,二甲双胍应该用多大剂量?饮食有什么忌口?”,对该提问语句进行分词处理,得到多个提问关键词“我”、“的”、“血糖13”、“血压150/120”、“体重80”、“二甲双胍”、“应该”、“用”、“多大”、“剂量”、“饮食”、“有”、“什么”、“忌口”。
进一步地,对所述提问语句进行分词处理,得到多个提问关键词,包括:基于所述提问语句的语句构成成分对所述提问语句进行划分,得到多个第一关键词;根据所述语句构成成分对所述第一关键词进行过滤,得到多个提问关键词。
其中,语句构成成分包括以下至少一种:主语、谓语、宾语、定语、状语、补足语、中心语、动语。根据所述语句构成成分对所述第一关键词进行过滤则为删除目标语句构成成分的第一关键词,例如目标语句构成成分可以为主语,“我”、“我们”等,还可以删除如停用词、语气助词,“哦”、“啊”等。
需要说明的是第一隐层和第三隐层的具体构成可以相同,第二隐层和第四隐层的具体构成可以相同。
其中,向量拼接具体实现的方式例如可以如下:第二列向量为(a 1、a 2) T,第四列向量为(b 1、b 2、b 3) T,则拼接后得到的第五列向量可以为(a 1、a 2、b 1、b 2、b 3) T
可以看出,在本申请实施例中,从用户输入的提问语句中提取得到多个提问关键词,然后将每个提问关键词向量化以及通过第三隐层和第四隐层转化为列向量,最后对向量进行拼接和行向量转化,行向量的形式表示多个待确定的提问意图有利于后续确定多个待确定的提问意图与多个医疗属性信息的相关性。
在本申请的一实现方式中,所述确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性,包括:
将所述第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,所述相关性矩阵用于表示所述多个待确定的提问意图与所述多个医疗属性信息的相关性,其中,所述相关性矩阵中的矩阵元的取值为1或0,所述1用于表示取值为所述1的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息相关,所述0用于表示取值为所述0的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息不相关。
进一步地,将所述第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,包括:将所述第二列向量与所述第一行向量进行点乘运算,得到第一矩阵;通过sigmoid将所述第一矩阵转化为相关性矩阵。其中,所述sigmoid用于将所述第一矩阵的矩阵元的值转化为0或1。
举例说明,如图2B所示,图2B是本申请实施例提供的一种网络架构图。将“二甲双胍”,特异性生理参数“血糖13”、“血压150/120”、“体重80”嵌入到向量空间,得到多个医疗属性词向量;然后通过如图2B所示的第一隐层将多个医疗属性词向量转化为一维列向量,得到第一列向量;再通过如图2B所示的第二隐层将第一列向量转化为第二列向量;同时, 将多个提问关键词“我”、“的”、“血糖13”、“血压150/120”、“体重80”、“二甲双胍”、“应该”、“用”、“多大”、“剂量”、“饮食”、“有”、“什么”、“忌口”嵌入到向量空间,得到多个提问词向量;通过如图2B所示的第三隐层将多个提问词向量转化为一维列向量,得到第三列向量;然后通过如图2B所示的第四隐层将第三列向量转化为第四列向量;将第二列向量与第四列向量进行拼接,得到第五列向量;通过如图2B所示的第五隐层将第五列向量转化为一维行向量,得到第一行向量;将第二列向量与第一行向量进行点乘运算和通过sigmoid层转化,得到相关性矩阵。
举例说明,提问意图有两个“如何用药”和“如何饮食”,医疗属性信息有两个“血糖13”和“体重80”,如果相关性矩阵为
Figure PCTCN2020099320-appb-000001
则表示“如何用药”与“体重80”相关,“如何饮食”与“血糖13”相关;如果相关性矩阵为
Figure PCTCN2020099320-appb-000002
则表示“如何用药”与“血糖13”相关,“如何饮食”与“体重80”相关;如果相关性矩阵为
Figure PCTCN2020099320-appb-000003
则表示“如何用药”与“血糖13”和“体重80”均相关,“如何饮食”与“体重80”和“血糖13”均相关。
可以看出,在本申请实施例中,将第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,该相关性矩阵是考虑了多个医疗实体名称和特异性生理参数后得到的,与目标回答语句强相关的医疗实体名称和特异性生理参数权重占比将会更大,比只通过提问语句确定的目标回答语句准确度更高。
在本申请的一实现方式中,所述目标提问意图与所述多个医疗属性信息中的至少一个医疗属性信息相关。
在本申请的一实现方式中,基于所述相关性从所述多个待确定的提问意图中确定目标提问意图,包括:
基于所述相关性矩阵,确定所述多个待确定的提问意图中与所述多个医疗属性信息中每一医疗属性信息相关的占比,得到多个占比;
选取所述多个占比中大于第一预设阈值的占比对应的至少一个待确定的提问意图为目标待确定的提问意图,得到至少一个目标待确定的提问意图;
基于所述至少一个目标待确定的提问意图,确定所述目标提问意图。
其中,上述医疗属性信息可包括:医疗实体名称和特异性生理参数;上述相关性矩阵表示每一待确定的提问意图与每一医疗实体名称以及特异性胜利参数之间的相关性,如此,可基于该相关性矩阵,确定多个待确定的提问意图中每一待确定的提问意图与每一医疗实体名称以及特异性胜利参数在上述相关性矩阵中取值体现为1的个数占比矩阵中所有取值(包括1和0)的占比,如此,可得到与多个医疗属性信息相关的多个占比,并选取大于第一预设阈值的占比对应的至少一个待确定的提问意图为目标待确定的提问意图,占比越大,则表示相关性越强,最后,可将上述至少一个待确定的提问意图确定为上述目标提问意图。
在本申请的一实现方式中,所述目标提问意图与所述多个医疗属性信息中的至少一个医疗属性信息相关。
在本申请的一实现方式中,所述从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句,包括:
从每个所述待确定的回答语句中提取知识侧特征,得到多个知识侧特征;
从所述目标提问意图关联的多个医疗属性信息中,提取得到数据侧特征;
确定所述数据侧特征与每个所述知识侧特征的匹配度,得到多个匹配度;
确定所述多个匹配度中大于或等于预设匹配度的目标匹配度;
确定所述目标匹配度对应的目标知识侧特征;
将所述目标知识侧特征对应的待确定的回答语句作为所述提问语句的目标回答语句。
举例说明,例如用户的提问语句例如可以为“我的血糖13,血压150/120,体重80,应该如何降压?”。从中提取得到知识侧特征(13,150,120,80),此时判定用户的提问意图为询问服用何种降压药,该提问意图包括两条回答语句:a)年龄不超过40岁,收缩压不高于160,舒张压不高于120,服用格列奈。则该回答语句对应的知识侧特征可以表示为{格列奈:(<=40,<=160,<=120)};b)年龄超过40岁,收缩压不低于150,舒张压不低于105,服用二甲双胍。则该回答语句对应的知识侧特征可以表示为{二甲双胍:(>40,>=150,>=105)}。然后分别确定(13,150,120,80)与(<=40,<=160,<=120)的第二匹配度,(13,150,120,80)与(>40,>=150,>=105)的匹配度,将匹配度大的为目标匹配度,则将b)年龄超过40岁,收缩压不低于150,舒张压不低于105,服用二甲双胍。则该回答语句对应的知识侧特征可以表示为{二甲双胍:(>40,>=150,>=105)}为目标回答语句。
与所述图2A所示的实施例一致的,请参阅图3,图3是本申请实施例提供的一种问答方法的流程示意图,应用于电子设备,所述方法包括:
步骤301:从用户输入的提问语句中提取得到多个医疗属性关键词。
步骤302:将每个所述医疗属性关键词嵌入到向量空间,得到多个医疗属性词向量。
步骤303:通过第一隐层将所述多个医疗属性词向量转化为一维列向量,得到第一列向量。
步骤304:通过第二隐层将所述第一列向量转化为第二列向量,所述第二列向量包括的多个列矩阵元分别对应表示多个医疗属性信息,每个所述医疗属性信息包括医疗实体名称以及特异性生理参数。
步骤305:对所述提问语句进行分词处理,得到多个提问关键词。
步骤306:将每个所述提问关键词嵌入到向量空间,得到多个提问词向量。
步骤307:通过第三隐层将所述多个提问词向量转化为一维列向量,得到第三列向量。
步骤308:通过第四隐层将所述第三列向量转化为第四列向量。
步骤309:将所述第二列向量与所述第四列向量进行拼接,得到第五列向量。
步骤310:通过第五隐层将所述第五列向量转化为一维行向量,得到第一行向量,所述第一行向量包括的多个行矩阵元分别对应表示多个待确定的提问意图。
步骤311:将所述第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,所述相关性矩阵用于表示所述多个待确定的提问意图与所述多个医疗属性信息的相关性,其中,所述相关性矩阵中的矩阵元的取值为1或0,所述1用于表示取值为所述1的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息相关,所述0用于表示取值为所述0的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息不相关。
步骤312:基于所述相关性从所述多个待确定的提问意图中确定目标提问意图,所述目标提问意图与所述多个医疗属性信息中的至少一个医疗属性信息相关。
步骤313:从每个所述待确定的回答语句中提取知识侧特征,得到多个知识侧特征。
步骤314:从所述目标提问意图关联的多个医疗属性信息中,提取得到数据侧特征。
步骤315:确定所述数据侧特征与每个所述知识侧特征的匹配度,得到多个匹配度。
步骤316:确定所述多个匹配度中大于或等于预设匹配度的目标匹配度。
步骤317:确定所述目标匹配度对应的目标知识侧特征。
步骤318:将所述目标知识侧特征对应的待确定的回答语句作为所述提问语句的目标回答语句。
需要说明的是步骤301-步骤304可以和步骤305-步骤308同步进行,也可以不同步进行,本实施例的具体实现过程可参见上述方法实施例所述的具体实现过程,在此不再叙述。
与上述图2A和图3所示的实施例一致的,请参阅图4,图4是本申请实施例提供的一种电子设备的结构示意图,如图所示,该电子设备包括存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行以下步骤的指令:
基于用户输入的提问语句确定多个医疗属性信息,每个所述医疗属性信息包括医疗实体名称以及特异性生理参数;
对所述提问语句进行预处理,得到多个待确定的提问意图;
确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性;
基于所述相关性从所述多个待确定的提问意图中确定目标提问意图;
从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
在本申请的一实现方式中,在基于用户输入的提问语句确定多个医疗属性信息方面,上述程序包括具体用于执行以下步骤的指令:
从用户输入的提问语句中提取得到多个医疗属性关键词;
将每个所述医疗属性关键词嵌入到向量空间,得到多个医疗属性词向量;
通过第一隐层将所述多个医疗属性词向量转化为一维列向量,得到第一列向量;
通过第二隐层将所述第一列向量转化为第二列向量,所述第二列向量包括的多个列矩阵元分别对应表示多个医疗属性信息。
在本申请的一实现方式中,在对所述提问语句进行预处理,得到多个待确定的提问意 图方面,上述程序包括具体用于执行以下步骤的指令:
对所述提问语句进行分词处理,得到多个提问关键词;
将每个所述提问关键词嵌入到向量空间,得到多个提问词向量;
通过第三隐层将所述多个提问词向量转化为一维列向量,得到第三列向量;
通过第四隐层将所述第三列向量转化为第四列向量;
将所述第二列向量与所述第四列向量进行拼接,得到第五列向量;
通过第五隐层将所述第五列向量转化为一维行向量,得到第一行向量,所述第一行向量包括的多个行矩阵元分别对应表示多个待确定的提问意图。
在本申请的一实现方式中,在确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性方面,上述程序包括具体用于执行以下步骤的指令:
将所述第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,所述相关性矩阵用于表示所述多个待确定的提问意图与所述多个医疗属性信息的相关性,其中,所述相关性矩阵中的矩阵元的取值为1或0,所述1用于表示取值为所述1的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息相关,所述0用于表示取值为所述0的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息不相关。
在本申请的一实现方式中,在所述基于所述相关性从所述多个待确定的提问意图中确定目标提问意图方面,上述程序包括具体用于执行以下步骤的指令:
基于所述相关性矩阵,确定所述多个待确定的提问意图中与所述多个医疗属性信息中每一医疗属性信息相关的占比,得到多个占比;
选取所述多个占比中大于第一预设阈值的占比对应的至少一个待确定的提问意图为目标待确定的提问意图,得到至少一个目标待确定的提问意图;
基于所述至少一个目标待确定的提问意图,确定所述目标提问意图。
在本申请的一实现方式中,所述目标提问意图与所述多个医疗属性信息中的至少一个医疗属性信息相关。
在本申请的一实现方式中,在从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句方面,上述程序包括具体用于执行以下步骤的指令:
从每个所述待确定的回答语句中提取知识侧特征,得到多个知识侧特征;
从所述目标提问意图关联的多个医疗属性信息中,提取得到数据侧特征;
确定所述数据侧特征与每个所述知识侧特征的匹配度,得到多个匹配度;
确定所述多个匹配度中大于或等于预设匹配度的目标匹配度;
确定所述目标匹配度对应的目标知识侧特征;
将所述目标知识侧特征对应的待确定的回答语句作为所述提问语句的目标回答语句。
上述实施例主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元 及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据所述方法示例对电子设备进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。所述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
下面为本申请装置实施例,本申请装置实施例用于执行本申请方法实施例所实现的方法。请参阅图5,图5是本申请实施例提供的一种问答装置的结构示意图,应用于电子设备,所述装置包括:
处理单元501,用于基于用户输入的提问语句确定多个医疗属性信息,每个所述医疗属性信息包括医疗实体名称以及特异性生理参数;对所述提问语句进行预处理,得到多个待确定的提问意图;确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性;基于所述相关性从所述多个待确定的提问意图中确定目标提问意图;从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
在本申请的一实现方式中,在基于用户输入的提问语句确定多个医疗属性信息方面,所述处理单元501,具体用于从用户输入的提问语句中提取得到多个医疗属性关键词;将每个所述医疗属性关键词嵌入到向量空间,得到多个医疗属性词向量;通过第一隐层将所述多个医疗属性词向量转化为一维列向量,得到第一列向量;通过第二隐层将所述第一列向量转化为第二列向量,所述第二列向量包括的多个列矩阵元分别对应表示多个医疗属性信息。
在本申请的一实现方式中,在对所述提问语句进行预处理,得到多个待确定的提问意图方面,所述处理单元501,具体用于对所述提问语句进行分词处理,得到多个提问关键词;将每个所述提问关键词嵌入到向量空间,得到多个提问词向量;通过第三隐层将所述多个提问词向量转化为一维列向量,得到第三列向量;通过第四隐层将所述第三列向量转化为第四列向量;将所述第二列向量与所述第四列向量进行拼接,得到第五列向量;通过第五隐层将所述第五列向量转化为一维行向量,得到第一行向量,所述第一行向量包括的多个行矩阵元分别对应表示多个待确定的提问意图。
在本申请的一实现方式中,在确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性方面,所述处理单元501,具体用于将所述第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,所述相关性矩阵用于表示所述多个待确定的提问意图与所述多个医疗属性信息的相关性,其中,所述相关性矩阵中的矩阵元的取值为1或0,所述1用于表示取值为所述1的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息相关,所述0用于表示取值为所述0的矩阵元对应的待确定的提问意图与取 值为所述1的矩阵元对应的医疗属性信息不相关。
在本申请的一实现方式中,在所述基于所述相关性从所述多个待确定的提问意图中确定目标提问意图方面,所述处理单元501,具体用于基于所述相关性矩阵,确定所述多个待确定的提问意图中与所述多个医疗属性信息中每一医疗属性信息相关的占比,得到多个占比;选取所述多个占比中大于第一预设阈值的占比对应的至少一个待确定的提问意图为目标待确定的提问意图,得到至少一个目标待确定的提问意图;基于所述至少一个目标待确定的提问意图,确定所述目标提问意图。
在本申请的一实现方式中,所述目标提问意图与所述多个医疗属性信息中的至少一个医疗属性信息相关。
在本申请的一实现方式中,在从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句方面,所述处理单元501,具体用于从每个所述待确定的回答语句中提取知识侧特征,得到多个知识侧特征;从所述目标提问意图关联的多个医疗属性信息中,提取得到数据侧特征;确定所述数据侧特征与每个所述知识侧特征的匹配度,得到多个匹配度;确定所述多个匹配度中大于或等于预设匹配度的目标匹配度;确定所述目标匹配度对应的目标知识侧特征;将所述目标知识侧特征对应的待确定的回答语句作为所述提问语句的目标回答语句。
其中,所述问答装置还可以包括通信单元502和存储单元503,所述存储单元503用于存储电子设备的程序代码和数据。所述处理单元501可以是处理器,所述通信单元502可以是触控显示屏或者收发器,存储单元503可以是存储器。
可以理解的是,由于方法实施例与装置实施例为相同技术构思的不同呈现形式,因此,本申请中方法实施例部分的内容应同步适配于装置实施例部分,此处不再赘述。
本申请实施例还提供了一种芯片,其中,该芯片包括处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如上述方法实施例中电子设备所描述的部分或全部步骤。
本申请实施例还提供一种计算机可读存储介质,其中,所述计算机可读存储介质可以是非易失性,也可以是易失性,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:
基于用户输入的提问语句确定多个医疗属性信息;对所述提问语句进行预处理,得到多个待确定的提问意图;确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性;基于所述相关性从所述多个待确定的提问意图中确定目标提问意图;从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
在本申请的一实现方式中,所述程序指令被处理器执行时,还用于实现以下步骤:从用户输入的提问语句中提取得到多个医疗属性关键词;将每个所述医疗属性关键词嵌入到向量空间,得到多个医疗属性词向量;通过第一隐层将所述多个医疗属性词向量转化为一维列向量,得到第一列向量;通过第二隐层将所述第一列向量转化为第二列向量,所述第二列向量包括的多个列矩阵元分别对应表示多个医疗属性信息。
在本申请的一实现方式中,所述程序指令被处理器执行时,还用于实现以下步骤:对所述提问语句进行分词处理,得到多个提问关键词;将每个所述提问关键词嵌入到向量空间,得到多个提问词向量;通过第三隐层将所述多个提问词向量转化为一维列向量,得到第三列向量;通过第四隐层将所述第三列向量转化为第四列向量;将所述第二列向量与所述第四列向量进行拼接,得到第五列向量;通过第五隐层将所述第五列向量转化为一维行向量,得到第一行向量,所述第一行向量包括的多个行矩阵元分别对应表示多个待确定的提问意图。
在本申请的一实现方式中,所述程序指令被处理器执行时,还用于实现以下步骤:将所述第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,所述相关性矩阵用于表示所述多个待确定的提问意图与所述多个医疗属性信息的相关性,其中,所述相关性矩阵中的矩阵元的取值为1或0,所述1用于表示取值为所述1的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息相关,所述0用于表示取值为所述0的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息不相关。
在本申请的一实现方式中,所述程序指令被处理器执行时,还用于实现以下步骤:基于所述相关性矩阵,确定所述多个待确定的提问意图中与所述多个医疗属性信息中每一医疗属性信息相关的占比,得到多个占比;选取所述多个占比中大于第一预设阈值的占比对应的至少一个待确定的提问意图为目标待确定的提问意图,得到至少一个目标待确定的提问意图;基于所述至少一个目标待确定的提问意图,确定所述目标提问意图。
在本申请的一实现方式中,所述程序指令被处理器执行时,还用于实现以下步骤:从每个所述待确定的回答语句中提取知识侧特征,得到多个知识侧特征;从所述目标提问意图关联的多个医疗属性信息中,提取得到数据侧特征;确定所述数据侧特征与每个所述知识侧特征的匹配度,得到多个匹配度;确定所述多个匹配度中大于或等于预设匹配度的目标匹配度;确定所述目标匹配度对应的目标知识侧特征;将所述目标知识侧特征对应的待确定的回答语句作为所述提问语句的目标回答语句。
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括电子设备。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改 变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种问答方法,其中,应用于电子设备,所述方法包括:
    基于用户输入的提问语句确定多个医疗属性信息;
    对所述提问语句进行预处理,得到多个待确定的提问意图;
    确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性;
    基于所述相关性从所述多个待确定的提问意图中确定目标提问意图;
    从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
  2. 根据权利要求1所述的方法,其中,所述基于用户输入的提问语句确定多个医疗属性信息,包括:
    从用户输入的提问语句中提取得到多个医疗属性关键词;
    将每个所述医疗属性关键词嵌入到向量空间,得到多个医疗属性词向量;
    通过第一隐层将所述多个医疗属性词向量转化为一维列向量,得到第一列向量;
    通过第二隐层将所述第一列向量转化为第二列向量,所述第二列向量包括的多个列矩阵元分别对应表示多个医疗属性信息。
  3. 根据权利要求2所述的方法,其中,所述对所述提问语句进行预处理,得到多个待确定的提问意图,包括:
    对所述提问语句进行分词处理,得到多个提问关键词;
    将每个所述提问关键词嵌入到向量空间,得到多个提问词向量;
    通过第三隐层将所述多个提问词向量转化为一维列向量,得到第三列向量;
    通过第四隐层将所述第三列向量转化为第四列向量;
    将所述第二列向量与所述第四列向量进行拼接,得到第五列向量;
    通过第五隐层将所述第五列向量转化为一维行向量,得到第一行向量,所述第一行向量包括的多个行矩阵元分别对应表示多个待确定的提问意图。
  4. 根据权利要求3所述的方法,其中,所述确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性,包括:
    将所述第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,所述相关性矩阵用于表示所述多个待确定的提问意图与所述多个医疗属性信息的相关性,其中,所述相关性矩阵中的矩阵元的取值为1或0,所述1用于表示取值为所述1的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息相关,所述0用于表示取值为所述0的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息不相关。
  5. 根据权利要求4所述的方法,其中,所述基于所述相关性从所述多个待确定的提问意图中确定目标提问意图,包括:
    基于所述相关性矩阵,确定所述多个待确定的提问意图中与所述多个医疗属性信息中每一医疗属性信息相关的占比,得到多个占比;
    选取所述多个占比中大于第一预设阈值的占比对应的至少一个待确定的提问意图为目标待确定的提问意图,得到至少一个目标待确定的提问意图;
    基于所述至少一个目标待确定的提问意图,确定所述目标提问意图。
  6. 根据权利要求1-4任一项所述的方法,其中,所述从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句,包括:
    从每个所述待确定的回答语句中提取知识侧特征,得到多个知识侧特征;
    从所述目标提问意图关联的多个医疗属性信息中,提取得到数据侧特征;
    确定所述数据侧特征与每个所述知识侧特征的匹配度,得到多个匹配度;
    确定所述多个匹配度中大于或等于预设匹配度的目标匹配度;
    确定所述目标匹配度对应的目标知识侧特征;
    将所述目标知识侧特征对应的待确定的回答语句作为所述提问语句的目标回答语句。
  7. 一种问答装置,其中,应用于电子设备,所述装置包括:
    处理单元,用于基于用户输入的提问语句确定多个医疗属性信息,每个所述医疗属性信息包括医疗实体名称以及特异性生理参数;对所述提问语句进行预处理,得到多个待确定的提问意图;确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性;基于所述相关性从所述多个待确定的提问意图中确定目标提问意图;从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
  8. 根据权利要求7所述的装置,其中,所述基于用户输入的提问语句确定多个医疗属性信息方面,所述处理单元,具体用于从用户输入的提问语句中提取得到多个医疗属性关键词;将每个所述医疗属性关键词嵌入到向量空间,得到多个医疗属性词向量;通过第一隐层将所述多个医疗属性词向量转化为一维列向量,得到第一列向量;通过第二隐层将所述第一列向量转化为第二列向量,所述第二列向量包括的多个列矩阵元分别对应表示多个医疗属性信息。
  9. 一种电子设备,其中,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:基于用户输入的提问语句确定多个医疗属性信息;对所述提问语句进行预处理,得到多个待确定的提问意图;确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性;基于所述相关性从所述多个待确定的提问意图中确定目标提问意图;从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
  10. 根据权利要求9所述的电子设备,其中,所述处理器用于:从用户输入的提问语句中提取得到多个医疗属性关键词;将每个所述医疗属性关键词嵌入到向量空间,得到多个医疗属性词向量;通过第一隐层将所述多个医疗属性词向量转化为一维列向量,得到第一列向量;通过第二隐层将所述第一列向量转化为第二列向量,所述第二列向量包括的多个列矩阵元分别对应表示多个医疗属性信息。
  11. 根据权利要求10所述的电子设备,其中,所述处理器用于:对所述提问语句进行分词处理,得到多个提问关键词;将每个所述提问关键词嵌入到向量空间,得到多个提问词向量;通过第三隐层将所述多个提问词向量转化为一维列向量,得到第三列向量;通过第四隐层将所述第三列向量转化为第四列向量;将所述第二列向量与所述第四列向量进行拼接,得到第五列向量;通过第五隐层将所述第五列向量转化为一维行向量,得到第一行向量,所述第一行向量包括的多个行矩阵元分别对应表示多个待确定的提问意图。
  12. 根据权利要求11所述的电子设备,其中,所述处理器用于:将所述第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,所述相关性矩阵用于表示所述多个待确定的提问意图与所述多个医疗属性信息的相关性,其中,所述相关性矩阵中的矩阵元的取值为1或0,所述1用于表示取值为所述1的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息相关,所述0用于表示取值为所述0的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息不相关。
  13. 根据权利要求12所述的电子设备,其中,所述处理器用于:基于所述相关性矩阵,确定所述多个待确定的提问意图中与所述多个医疗属性信息中每一医疗属性信息相关的占比,得到多个占比;选取所述多个占比中大于第一预设阈值的占比对应的至少一个待确定的提问意图为目标待确定的提问意图,得到至少一个目标待确定的提问意图;基于所述至少一个目标待确定的提问意图,确定所述目标提问意图。
  14. 根据权利要求9-12任一项所述的电子设备,其中,所述处理器用于:从每个所述待确定的回答语句中提取知识侧特征,得到多个知识侧特征;从所述目标提问意图关联的多个医疗属性信息中,提取得到数据侧特征;确定所述数据侧特征与每个所述知识侧特征的匹配度,得到多个匹配度;确定所述多个匹配度中大于或等于预设匹配度的目标匹配度;确定所述目标匹配度对应的目标知识侧特征;将所述目标知识侧特征对应的待确定的回答语句作为所述提问语句的目标回答语句。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:
    基于用户输入的提问语句确定多个医疗属性信息;对所述提问语句进行预处理,得到多个待确定的提问意图;确定所述多个待确定的提问意图与所述多个医疗属性信息的相关性;基于所述相关性从所述多个待确定的提问意图中确定目标提问意图;从所述目标提问意图关联的多个待确定的回答语句中,确定所述提问语句的目标回答语句。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:从用户输入的提问语句中提取得到多个医疗属性关键词;将每个所述医疗属性关键词嵌入到向量空间,得到多个医疗属性词向量;通过第一隐层将所述多个医疗属性词向量转化为一维列向量,得到第一列向量;通过第二隐层将所述第一列向量转化为第二列向量,所述第二列向量包括的多个列矩阵元分别对应表示多个医疗属性信息。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行 时,还用于实现以下步骤:对所述提问语句进行分词处理,得到多个提问关键词;将每个所述提问关键词嵌入到向量空间,得到多个提问词向量;通过第三隐层将所述多个提问词向量转化为一维列向量,得到第三列向量;通过第四隐层将所述第三列向量转化为第四列向量;将所述第二列向量与所述第四列向量进行拼接,得到第五列向量;通过第五隐层将所述第五列向量转化为一维行向量,得到第一行向量,所述第一行向量包括的多个行矩阵元分别对应表示多个待确定的提问意图。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:将所述第二列向量与所述第一行向量进行点乘运算,得到相关性矩阵,所述相关性矩阵用于表示所述多个待确定的提问意图与所述多个医疗属性信息的相关性,其中,所述相关性矩阵中的矩阵元的取值为1或0,所述1用于表示取值为所述1的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息相关,所述0用于表示取值为所述0的矩阵元对应的待确定的提问意图与取值为所述1的矩阵元对应的医疗属性信息不相关。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:基于所述相关性矩阵,确定所述多个待确定的提问意图中与所述多个医疗属性信息中每一医疗属性信息相关的占比,得到多个占比;选取所述多个占比中大于第一预设阈值的占比对应的至少一个待确定的提问意图为目标待确定的提问意图,得到至少一个目标待确定的提问意图;基于所述至少一个目标待确定的提问意图,确定所述目标提问意图。
  20. 根据权利要求15-18任一项所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:从每个所述待确定的回答语句中提取知识侧特征,得到多个知识侧特征;从所述目标提问意图关联的多个医疗属性信息中,提取得到数据侧特征;确定所述数据侧特征与每个所述知识侧特征的匹配度,得到多个匹配度;确定所述多个匹配度中大于或等于预设匹配度的目标匹配度;确定所述目标匹配度对应的目标知识侧特征;将所述目标知识侧特征对应的待确定的回答语句作为所述提问语句的目标回答语句。
PCT/CN2020/099320 2020-05-29 2020-06-30 问答方法、装置、设备及计算机可读存储介质 WO2021114629A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010475861.0A CN111694942A (zh) 2020-05-29 2020-05-29 问答方法、装置、设备及计算机可读存储介质
CN202010475861.0 2020-05-29

Publications (1)

Publication Number Publication Date
WO2021114629A1 true WO2021114629A1 (zh) 2021-06-17

Family

ID=72478869

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099320 WO2021114629A1 (zh) 2020-05-29 2020-06-30 问答方法、装置、设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN111694942A (zh)
WO (1) WO2021114629A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090204596A1 (en) * 2008-02-08 2009-08-13 Xerox Corporation Semantic compatibility checking for automatic correction and discovery of named entities
CN110176315A (zh) * 2019-06-05 2019-08-27 京东方科技集团股份有限公司 医疗问答方法及系统、电子设备、计算机可读介质
CN110532360A (zh) * 2019-07-19 2019-12-03 平安科技(深圳)有限公司 医疗领域知识图谱问答处理方法、装置、设备及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160109302A (ko) * 2015-03-10 2016-09-21 삼성전자주식회사 지식기반 서비스 시스템, 지식기반 서비스 서버, 지식기반 서비스제공방법 및 컴퓨터 판독가능 기록매체
CN110364251B (zh) * 2019-06-14 2022-08-16 南京理工大学 一种基于机器阅读理解的智能交互导诊咨询系统
CN111008267B (zh) * 2019-10-29 2024-07-12 平安科技(深圳)有限公司 智能对话方法及相关设备
CN111159367B (zh) * 2019-12-11 2023-09-05 中国平安财产保险股份有限公司 一种信息处理方法及相关设备
CN111177325B (zh) * 2020-04-10 2020-07-31 支付宝(杭州)信息技术有限公司 一种自动生成答案的方法和系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090204596A1 (en) * 2008-02-08 2009-08-13 Xerox Corporation Semantic compatibility checking for automatic correction and discovery of named entities
CN110176315A (zh) * 2019-06-05 2019-08-27 京东方科技集团股份有限公司 医疗问答方法及系统、电子设备、计算机可读介质
CN110532360A (zh) * 2019-07-19 2019-12-03 平安科技(深圳)有限公司 医疗领域知识图谱问答处理方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN111694942A (zh) 2020-09-22

Similar Documents

Publication Publication Date Title
WO2022007823A1 (zh) 一种文本数据处理方法及装置
WO2017185887A1 (en) Apparatus and method for analyzing natural language medical text and generating medical knowledge graph representing natural language medical text
US8285734B2 (en) Comparison of documents based on similarity measures
CN110532360A (zh) 医疗领域知识图谱问答处理方法、装置、设备及存储介质
WO2023029506A1 (zh) 病情分析方法、装置、电子设备及存储介质
US9760829B2 (en) Dynamic interfacing in a deep question answering system
US20160196334A1 (en) Corpus Augmentation System
US11288279B2 (en) Cognitive computer assisted attribute acquisition through iterative disclosure
JP2020170516A5 (zh)
CN111341456B (zh) 糖尿病足知识图谱生成方法、装置及可读存储介质
CN110476169B (zh) 在会话中提供情感关怀
US20240289641A1 (en) Systems and Methods for Processing Data Using Interference and Analytics Engines
WO2022001724A1 (zh) 一种数据处理方法及装置
CN115169364B (zh) 智能问答方法、装置、设备以及存储介质
US20150006537A1 (en) Aggregating Question Threads
US20170116250A1 (en) System and Method for Identifying Answer Key Problems in a Natural Language Question and Answering System
US20150169539A1 (en) Adjusting Time Dependent Terminology in a Question and Answer System
CN112037904A (zh) 在线诊疗数据处理方法、装置、计算机设备和存储介质
CN114765075A (zh) 药品推荐方法、装置及系统、电子设备及存储介质
WO2020053172A1 (en) Invoking chatbot in online communication session
CN118013021A (zh) 基于大语言模型的医药解答方法、装置、设备及介质
CN117373602A (zh) 病历生成方法和装置
CN116861875A (zh) 基于人工智能的文本处理方法、装置、设备及存储介质
CN116340778A (zh) 基于多模态的医疗大模型构建方法及其相关设备
CN113657086B (zh) 词语处理方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20898018

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20898018

Country of ref document: EP

Kind code of ref document: A1