Question and answer method, device, equipment and computer-readable storage medium

By preprocessing and intent correlation analysis of the question statements entered by the user, target answer statements are directly provided, which solves the problems that users find difficult to find answers in the existing medical question-and-answer system, and improves the accuracy and speed of answers.

CN111694942BActive Publication Date: 2024-11-26YUANYUAN (SHENZHEN) TECH TRANSFER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010475861.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-29
Publication Date
2024-11-26
Estimated Expiration
2040-05-29

AI Technical Summary

Technical Problem

The existing medical question-and-answer system sets and refines questions step by step through directory methods, making it difficult for users to find the answers accurately. Especially for users who do not have professional medical knowledge, the speed and accuracy of finding the answers are low.

Method used

Determine multiple medical attribute information through the question statement entered by the user, perform pre-processing to obtain the question intention to be determined, determine the correlation between these intentions and medical attribute information, thereby determining the target question intention and correlating the relevant answer statements, and directly providing the target Answer sentences to reduce the search process and improve the accuracy and speed of answers.

Benefits of technology

It enables users to quickly and accurately find the answers they need, reduces the search process, and improves the accuracy and user experience of the answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111694942B_ABST
    Figure CN111694942B_ABST
Patent Text Reader

Abstract

The present application relates to the field of speech semantics in artificial intelligence, and in particular to a question-answering method, apparatus, device and computer-readable storage medium, which are applied to electronic devices. The question-answering method includes: determining multiple medical attribute information based on a question statement input by a user; preprocessing the question statement to obtain multiple question intentions to be determined; determining the correlation between the multiple question intentions to be determined and the multiple medical attribute information; determining a target question intention from the multiple question intentions to be determined based on the correlation; and determining a target answer statement for the question statement from multiple answer statements to be determined associated with the target question intention. The use of the embodiments of the present application can increase the speed at which users can accurately find the answers they need. The present application also relates to blockchain technology, and the present application can also be applied to the field of smart medical care, thereby promoting the construction of smart cities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech semantics technology in artificial intelligence, and in particular to a question-answering method, apparatus, device, and computer-readable storage medium. Background Art

[0002] Due to limited medical resources, it is difficult to see a doctor, which is a livelihood issue that needs to be solved in my country. An effective way to solve this problem is to informatize the medical industry. Through the online medical question-and-answer system, users can consult about the medical system without leaving home, without having to go to the hospital or clinic to go through complicated procedures and long waits. However, the existing medical question-and-answer system sets detailed questions step by step in a directory manner, which makes it difficult for users without professional medical knowledge to accurately find the answers they need. Summary of the invention

[0003] The embodiments of the present application provide a question-answering method, apparatus, device, and computer-readable storage medium for increasing the speed at which users can accurately find the answers they need.

[0004] In a first aspect, an embodiment of the present application provides a question-answering method, which is applied to an electronic device, and the method includes:

[0005] Determine a plurality of medical attribute information based on a question statement input by a user, each of the medical attribute information includes a medical entity name and a specific physiological parameter;

[0006] Preprocessing the question sentence to obtain multiple question intentions to be determined;

[0007] Determining the correlation between the plurality of question intentions to be determined and the plurality of medical attribute information;

[0008] determining a target question intention from the plurality of question intentions to be determined based on the correlation;

[0009] A target answer sentence of the question sentence is determined from a plurality of answer sentences to be determined that are associated with the target question intention.

[0010] In a second aspect, an embodiment of the present application provides a question-answering device, characterized in that it is applied to an electronic device, and the device includes:

[0011] A processing unit is used to determine multiple medical attribute information based on a question statement input by a user, each of the medical attribute information includes a medical entity name and a specific physiological parameter; preprocess the question statement to obtain multiple question intentions to be determined; determine the correlation between the multiple question intentions to be determined and the multiple medical attribute information; determine a target question intention from the multiple question intentions to be determined based on the correlation; and determine a target answer statement of the question statement from a plurality of answer statements to be determined associated with the target question intention.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing some or all of the steps described in the method described in the first aspect of the embodiment of the present application.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program is executed by a processor to implement part or all of the steps described in the method described in the first aspect of the embodiment of the present application.

[0014] It can be seen that in the embodiment of the present application, the electronic device determines multiple medical attribute information based on the question statement input by the user; pre-processes the question statement to obtain multiple question intentions to be determined; determines the correlation between the multiple question intentions to be determined and the multiple medical attribute information; determines the target question intention from the multiple question intentions to be determined based on the correlation; determines the target answer statement of the question statement from the multiple answer statements to be determined associated with the target question intention; the user does not need to search for the answer to the question he needs step by step in the medical question and answer system in a directory manner, and directly gives the target answer statement, and the answer to the question he needs can be determined through the target answer statement, while also reducing the process of finding and searching for answers, which not only improves the speed at which users can accurately find the answers they need, but also improves the accuracy of the answers.

[0015] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0018] Figure 2A It is a flowchart of a question-and-answer method provided in an embodiment of the present application;

[0019] Figure 2B This is a network architecture diagram provided by an embodiment of the present application;

[0020] Figure 3 is a flowchart of another question-and-answer method provided in an embodiment of the present application;

[0021] Figure 4 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0022] Figure 5 It is a structural schematic diagram of a question-and-answer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0024] The following are detailed descriptions of each.

[0025] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0026] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0027] Below, some terms in this application are explained to facilitate understanding by those skilled in the art.

[0028] like Figure 1 As shown, Figure 1 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 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 the like. Among them, the memory, the signal processor, the display screen, the speaker, the microphone, the RAM, the camera, and the sensor are connected to the processor, and the transceiver is connected to the signal processor.

[0029] The display screen may be a liquid crystal display (LCD), an organic or inorganic light-emitting diode (OLED), an active matrix organic light-emitting diode panel (AMOLED), etc.

[0030] The camera may be a common 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.

[0031] Among them, 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 the like. Among them, the light sensor, also known as an ambient light sensor, is used to detect the brightness of ambient light. The light sensor may include a photosensitive element and an analog-to-digital converter. Among them, the photosensitive element is used to convert the collected light signal into an electrical signal, and the analog-to-digital converter is used to convert the above electrical signal into a digital signal. Optionally, the light sensor may also include a signal amplifier, which may amplify the electrical signal converted by the photosensitive element and 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.

[0032] Among them, the processor is the control center of the electronic device, which uses various interfaces and lines to connect the various parts of the entire electronic device, and performs various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory, and calling data stored in the memory, thereby monitoring the electronic device as a whole.

[0033] The processor may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor.

[0034] 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 program storage area and a data storage area, wherein the program storage area may store an operating system, a software program required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0035] The following is a detailed description of the embodiments of the present application.

[0036] See also Figure 2A , Figure 2A : is a flowchart of a question-and-answer method provided in an embodiment of the present application, which is applied to an electronic device, and the method includes:

[0037] Step 201: Determine multiple medical attribute information based on the question statement input by the user.

[0038] Among them, the embodiments of the present application can be applied in smart cities, specifically in the field of smart medical care in smart cities. The development of smart medical care is conducive to improving medical services to promote the construction of smart cities, connecting and integrating the city's systems with medical services, and improving the efficiency of the entire city's resources. It is conducive to improving the quality of life of users and increasing the convenience of users' lives.

[0039] The question statement can be input by the user through text, voice, video, etc. Each of the medical attribute information includes a medical entity name and specific physiological parameters. The entity name includes a drug name, a food name, a symptom name, a human organ name, etc. The specific physiological parameters include the patient's blood pressure value, the patient's blood sugar value, the patient's disease course (such as blurred vision for three days), the patient's lesion site (such as left foot swelling), etc.

[0040] For example, a user's question sentence may be "My blood sugar is 13, blood pressure is 150 / 120, and weight is 80. What dose of metformin should I take? Are there any dietary taboos?" The medical entity names in the question sentence include "metformin" and specific physiological parameters "blood sugar 13", "blood pressure 150 / 120", and "weight 80".

[0041] Optionally, in order to enhance the privacy of users, in the specific processing, the above medical attribute information can be stored in the blockchain. The blockchain referred to in the embodiments of the present application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.

[0042] Step 202: pre-process the question sentence to obtain a plurality of question intentions to be determined.

[0043] Furthermore, the electronic device may include a database, which may include multiple preset question intentions. The preset question intentions can be set by the user or by the system default. The above-mentioned preprocessing can be set by the user or by the system default. Specifically, the semantics of the question statement can be obtained by identifying the question statement, and then the preset question intention that includes the semantics of the question statement can be searched from multiple preset question intentions. Finally, the found preset question intentions can be used as multiple question intentions to be determined.

[0044] Step 203: Determine the correlation between the multiple question intentions to be determined and the multiple medical attribute information.

[0045] The relevance can be represented by binary values, such as 1 and 0, where 1 represents relevance and 0 represents irrelevance, or other values ​​other than 1 and 0. The relevance can also be represented by a numerical range, such as 0-1, where 0 represents irrelevance and 1 represents the most relevant.

[0046] Step 204: Determine a target question intention from the multiple question intentions to be determined based on the correlation.

[0047] Among them, the target question intention can be, for example, a question intention to be determined whose correlation with each medical attribute information is greater than or equal to a first preset threshold, or a question intention to be determined whose correlation with at least one medical attribute information is greater than or equal to a second preset threshold. The first preset threshold and the second preset threshold can be set by the user or by the system default. In addition, the first preset threshold may be equal to the second preset threshold or may not be equal. The target question intention can be one or more, and is not limited here.

[0048] Step 205: Determine a target answer sentence of the question sentence from a plurality of answer sentences to be determined that are associated with the target question intention.

[0049] Furthermore, by determining a target answer statement for the question statement from a plurality of answer statements to be determined that are associated with the target question intention, a degree of matching between the question statement and each answer statement to be determined can be determined, and the target answer statement can be determined by the degree of matching between the question statement and each answer statement to be determined.

[0050] It can be seen that in the embodiment of the present application, the electronic device determines multiple medical attribute information based on the question statement input by the user, each medical attribute information includes a medical entity name and a specific physiological parameter; pre-processes the question statement to obtain multiple question intentions to be determined; determines the correlation between the multiple question intentions to be determined and the multiple medical attribute information; determines the target question intention from the multiple question intentions to be determined based on the correlation; determines the target answer statement of the question statement from the multiple answer statements to be determined associated with the target question intention; the user does not need to search for the answer to the question he needs step by step in the medical question and answer system in a directory manner, and directly gives the target answer statement. The answer to the question he needs can be determined through the target answer statement, and the process of searching for the answer is also reduced, which not only improves the speed at which the user can accurately find the answer he needs, but also improves the accuracy of the answer.

[0051] In one implementation of the present application, the determining of multiple medical attribute information based on the question statement input by the user includes:

[0052] Extracting multiple medical attribute keywords from the question sentence input by the user;

[0053] Embed each of the medical attribute keywords into a vector space to obtain multiple medical attribute word vectors;

[0054] Converting the plurality of medical attribute word vectors into one-dimensional column vectors through a first hidden layer to obtain a first column vector;

[0055] The first column vector is transformed into a second column vector through a second hidden layer, and the second column vector includes a plurality of column matrix elements corresponding to and representing a plurality of medical attribute information respectively.

[0056] Among them, multiple medical attribute keywords can be extracted from the question statements input by the user by using a rule engine. The rule engine is a method 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. When the system is running, a separate module is used to drive the parsing rules instead of reading the rules from the code. This increases the portability and maintainability of the rules. At the same time, because it is independent of the code framework, the code runs more efficiently. Without considering efficiency and engineering optimization, the rule engine can be simply understood as rule-based extraction.

[0057] Furthermore, extracting medical attribute information from the question statement by means of a rule engine includes: obtaining the starting coordinates and the ending coordinates of the question statement; determining a search coordinate range based on the starting coordinates and the ending coordinates; and extracting medical attribute information within the search coordinate range by means of a rule engine.

[0058] For example, the rule engine for the patient's blood sugar is defined as follows: (1) keyword "blood sugar" + number; (2) keyword "learn sugar" or "snow sugar" or "blood sugar" etc. + number; (3) keyword "blood sugar" + function word "is" or "for" or "value" etc. + number. Rule (2) targets typos, and rule (3) targets the presence of function words without actual meaning between the keyword and the number.

[0059] It can be seen that in the embodiment of the present application, multiple medical attribute keywords are extracted from the question statement input by the user, and then each medical attribute keyword is vectorized and converted into a column vector through the first hidden layer and the second hidden layer. Representing multiple medical attribute information in the form of a column vector is conducive to the subsequent determination of the correlation between multiple question intentions to be determined and multiple medical attribute information.

[0060] In an implementation of the present application, the question sentence is preprocessed to obtain a plurality of question intentions to be determined, including:

[0061] Performing word segmentation processing on the question sentence to obtain multiple question keywords;

[0062] Embed each of the question keywords into a vector space to obtain multiple question word vectors;

[0063] The plurality of question word vectors are converted into one-dimensional column vectors through a third hidden layer to obtain a third column vector;

[0064] Converting the third column vector into a fourth column vector through a fourth hidden layer;

[0065] Concatenate the second column vector and the fourth column vector to obtain a fifth column vector;

[0066] The fifth column vector is converted into a one-dimensional row vector through the fifth hidden layer to obtain a first row vector, wherein the first row vector includes a plurality of row matrix elements corresponding to and representing a plurality of question intentions to be determined.

[0067] For example, a user's question sentence may be "My blood sugar is 13, blood pressure is 150 / 120, and weight is 80. How much dose of metformin should I use? Are there any dietary taboos?". The question sentence is segmented to obtain multiple question keywords "I", "of", "blood sugar 13", "blood pressure 150 / 120", "weight 80", "metformin", "should", "use", "how much", "dose", "diet", "have", "what", and "taboos".

[0068] Furthermore, the question sentence is segmented to obtain a plurality of question keywords, including: dividing the question sentence based on sentence components of the question sentence to obtain a plurality of first keywords; filtering the first keywords according to the sentence components to obtain a plurality of question keywords.

[0069] The sentence components include at least one of the following: subject, predicate, object, attributive, adverbial, complement, central word, verb. The first keyword is filtered according to the sentence components to delete the first keyword of the target sentence component. For example, the target sentence component can be the subject, "I", "we", etc., and stop words, modal particles, "oh", "ah", etc. can also be deleted.

[0070] It should be noted that 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.

[0071] The specific implementation of vector concatenation may be as follows: the second column vector is (a1, a2) T , the fourth column vector is (b1, b2, b3) T , then the fifth column vector obtained after splicing can be (a1, a2, b1, b2, b3) T .

[0072] It can be seen that in the embodiment of the present application, multiple question keywords are extracted from the question sentence input by the user, and then each question keyword is vectorized and converted into a column vector through the third hidden layer and the fourth hidden layer. Finally, the vectors are concatenated and converted into row vectors. Representing multiple question intentions to be determined in the form of row vectors is conducive to the subsequent determination of the correlation between the multiple question intentions to be determined and multiple medical attribute information.

[0073] In an implementation of the present application, determining the correlation between the multiple question intentions to be determined and the multiple medical attribute information includes:

[0074] Perform a dot multiplication operation on the second column vector and the first row vector to obtain a correlation matrix, wherein the correlation matrix is ​​used to represent the correlation between the multiple question intentions to be determined and the multiple medical attribute information, wherein the values ​​of the matrix elements in the correlation matrix are 1 or 0, and the 1 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 1 is correlated with the medical attribute information corresponding to the matrix element with the value of 1, and the 0 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 0 is not correlated with the medical attribute information corresponding to the matrix element with the value of 1.

[0075] Further, performing a dot multiplication operation on the second column vector and the first row vector to obtain a correlation matrix includes: performing a dot multiplication operation on the second column vector and the first row vector to obtain a first matrix; and converting the first matrix into a correlation matrix by using sigmoid, wherein the sigmoid is used to convert the values ​​of the matrix elements of the first matrix into 0 or 1.

[0076] For example, Figure 2B As shown, Figure 2B This is a network architecture diagram provided by the embodiment of the present application. "Metformin", specific physiological parameters "blood sugar 13", "blood pressure 150 / 120", "weight 80" are embedded into the vector space to obtain multiple medical attribute word vectors; then, Figure 2B The first hidden layer shown in FIG. 1 converts multiple medical attribute word vectors into one-dimensional column vectors to obtain the first column vector; and then through Figure 2B The second hidden layer shown in FIG. 1 transforms the first column vector into the second column vector; at the same time, multiple question keywords "I", "of", "blood sugar 13", "blood pressure 150 / 120", "weight 80", "metformin", "should", "use", "how much", "dose", "diet", "have", "what", "avoid" are embedded into the vector space to obtain multiple question word vectors; through Figure 2B The third hidden layer shown in FIG. 1 converts multiple question word vectors into one-dimensional column vectors to obtain a third column vector; then, Figure 2B The fourth hidden layer shown in FIG. 1 transforms the third column vector into the fourth column vector; concatenates the second column vector with the fourth column vector to obtain the fifth column vector; and performs the following steps as shown in FIG. Figure 2B The fifth hidden layer shown converts the fifth column vector into a one-dimensional row vector to obtain the first row vector; the second column vector is point-multiplied with the first row vector and transformed through a sigmoid layer to obtain a correlation matrix.

[0077] For example, there are two question intentions: "How to use medicine" and "How to eat", and two medical attribute information: "Blood sugar 13" and "Weight 80". If the correlation matrix is This 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 This 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 This means that “how to use medicine” is related to both “blood sugar 13” and “weight 80”, and “how to eat” is related to both “weight 80” and “blood sugar 13”.

[0078] It can be seen that in the embodiment of the present application, the second column vector is dot-multiplied with the first row vector to obtain a correlation matrix, which is obtained after considering multiple medical entity names and specific physiological parameters. The weight ratio of the medical entity names and specific physiological parameters that are strongly correlated with the target answer statement will be larger, and the target answer statement will be more accurate than that determined only by the question statement.

[0079] In an implementation of the present application, the target question intention is related to at least one medical attribute information among the multiple medical attribute information.

[0080] In an implementation of the present application, determining a target question intention from the multiple question intentions to be determined based on the correlation includes:

[0081] Based on the correlation matrix, determining the proportion of the multiple question intentions to be determined that are related to each of the multiple medical attribute information to obtain multiple proportions;

[0082] Selecting at least one to-be-determined question intention corresponding to a proportion greater than a first preset threshold among the multiple proportions as a target to-be-determined question intention, to obtain at least one target to-be-determined question intention;

[0083] Based on the at least one target question intention to be determined, the target question intention is determined.

[0084] Among them, 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 success parameter. In this way, based on the correlation matrix, the proportion of the number of each question intention to be determined and each medical entity name and specific success parameter in the above-mentioned correlation matrix whose value is 1 accounts for all values ​​(including 1 and 0) in the matrix. In this way, multiple proportions related to multiple medical attribute information can be obtained, and at least one question intention to be determined corresponding to a proportion greater than a first preset threshold is selected as the target question intention to be determined. The larger the proportion, the stronger the correlation. Finally, the above-mentioned at least one question intention to be determined can be determined as the above-mentioned target question intention.

[0085] In an implementation of the present application, the target question intention is related to at least one medical attribute information among the multiple medical attribute information.

[0086] In an implementation of the present application, determining a target answer sentence of the question sentence from a plurality of answer sentences to be determined associated with the target question intention includes:

[0087] Extracting knowledge-side features from each of the answer sentences to be determined to obtain a plurality of knowledge-side features;

[0088] Extracting data-side features from multiple medical attribute information associated with the target question intention;

[0089] Determining a matching degree between the data-side feature and each of the knowledge-side features to obtain a plurality of matching degrees;

[0090] Determining a target matching degree among the multiple matching degrees that is greater than or equal to a preset matching degree;

[0091] Determine the target knowledge-side features corresponding to the target matching degree;

[0092] The answer sentence to be determined corresponding to the target knowledge-side feature is used as the target answer sentence of the question sentence.

[0093] For example, the user's question statement may be "My blood sugar is 13, blood pressure is 150 / 120, and weight is 80. How should I lower my blood pressure?". The knowledge-side feature (13, 150, 120, 80) is extracted from it. At this time, it is determined that the user's question intention is to ask what antihypertensive medicine to take. The question intention includes two answer statements: a) Age not exceeding 40 years old, systolic blood pressure not higher than 160, diastolic blood pressure not higher than 120, take glinide. The knowledge-side feature corresponding to the answer statement can be expressed as {glinide: (<=40, <=160, <=120)}; b) Age over 40 years old, systolic blood pressure not lower than 150, diastolic blood pressure not lower than 105, take metformin. The knowledge-side feature corresponding to the answer statement can be expressed as {metformin: (>40,>=150,>=105)}. Then, the second matching degree between (13, 150, 120, 80) and (<=40, <=160, <=120) and the matching degree between (13, 150, 120, 80) and (>40, >=150, >=105) are determined respectively, and the one with the larger matching degree is taken as the target matching degree. Then, b) age over 40 years old, systolic blood pressure not less than 150, diastolic blood pressure not less than 105, taking metformin. Then the knowledge-side feature corresponding to the answer sentence can be expressed as {metformin: (>40, >=150, >=105)} as the target answer sentence.

[0094] With the Figure 2A For details on the embodiments shown in the drawings, please refer to Figure 3 , Figure 3 : is a flowchart of a question-and-answer method provided in an embodiment of the present application, which is applied to an electronic device, and the method includes:

[0095] Step 301: extract multiple medical attribute keywords from the question sentence input by the user.

[0096] Step 302: embed each of the medical attribute keywords into a vector space to obtain a plurality of medical attribute word vectors.

[0097] Step 303: Convert the multiple medical attribute word vectors into one-dimensional column vectors through the first hidden layer to obtain a first column vector.

[0098] Step 304: The first column vector is converted into a second column vector through a second hidden layer, wherein the second column vector includes a plurality of column matrix elements corresponding to a plurality of medical attribute information, each of which includes a medical entity name and a specific physiological parameter.

[0099] Step 305: Perform word segmentation processing on the question sentence to obtain multiple question keywords.

[0100] Step 306: embed each of the question keywords into a vector space to obtain multiple question word vectors.

[0101] Step 307: Convert the multiple question word vectors into one-dimensional column vectors through a third hidden layer to obtain a third column vector.

[0102] Step 308: Convert the third column vector into a fourth column vector through a fourth hidden layer.

[0103] Step 309: concatenate the second column vector and the fourth column vector to obtain a fifth column vector.

[0104] Step 310: The fifth column vector is converted into a one-dimensional row vector through a fifth hidden layer to obtain a first row vector, wherein the first row vector includes a plurality of row matrix elements corresponding to and representing a plurality of question intentions to be determined.

[0105] Step 311: Perform a dot multiplication operation on the second column vector and the first row vector to obtain a correlation matrix, wherein the correlation matrix is ​​used to represent the correlation between the multiple question intentions to be determined and the multiple medical attribute information, wherein the values ​​of the matrix elements in the correlation matrix are 1 or 0, and the 1 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 1 is correlated with the medical attribute information corresponding to the matrix element with the value of 1, and the 0 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 0 is not correlated with the medical attribute information corresponding to the matrix element with the value of 1.

[0106] Step 312: Determine a target question intention from the multiple question intentions to be determined based on the correlation, where the target question intention is related to at least one medical attribute information among the multiple medical attribute information.

[0107] Step 313: extracting knowledge-side features from each of the answer sentences to be determined, and obtaining a plurality of knowledge-side features.

[0108] Step 314: extracting data-side features from multiple medical attribute information associated with the target question intention.

[0109] Step 315: Determine the matching degree between the data-side feature and each of the knowledge-side features to obtain multiple matching degrees.

[0110] Step 316: Determine a target matching degree among the multiple matching degrees that is greater than or equal to a preset matching degree.

[0111] Step 317: Determine the target knowledge-side features corresponding to the target matching degree.

[0112] Step 318: Use the answer sentence to be determined corresponding to the target knowledge-side feature as the target answer sentence of the question sentence.

[0113] It should be noted that steps 301 to 304 may be performed synchronously with steps 305 to 308 or may be performed asynchronously. The specific implementation process of this embodiment can refer to the specific implementation process described in the above method embodiment, which will not be described here.

[0114] With the above Figure 2A and Figure 3 For details on the embodiments shown in the drawings, please refer to Figure 4 , Figure 4 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. As shown in the figure, the electronic device includes a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the following steps:

[0115] Determine a plurality of medical attribute information based on a question statement input by a user, each of the medical attribute information includes a medical entity name and a specific physiological parameter;

[0116] Preprocessing the question sentence to obtain multiple question intentions to be determined;

[0117] Determining the correlation between the plurality of question intentions to be determined and the plurality of medical attribute information;

[0118] determining a target question intention from the plurality of question intentions to be determined based on the correlation;

[0119] A target answer sentence of the question sentence is determined from a plurality of answer sentences to be determined that are associated with the target question intention.

[0120] In one implementation of the present application, in determining multiple medical attribute information based on a question statement input by a user, the above program includes instructions for executing the following steps:

[0121] Extracting multiple medical attribute keywords from the question sentence input by the user;

[0122] Embed each of the medical attribute keywords into a vector space to obtain multiple medical attribute word vectors;

[0123] Converting the plurality of medical attribute word vectors into one-dimensional column vectors through a first hidden layer to obtain a first column vector;

[0124] The first column vector is transformed into a second column vector through a second hidden layer, and the second column vector includes a plurality of column matrix elements corresponding to and representing a plurality of medical attribute information respectively.

[0125] In one implementation of the present application, in terms of preprocessing the question statement to obtain multiple question intentions to be determined, the above program includes instructions specifically for executing the following steps:

[0126] Performing word segmentation processing on the question sentence to obtain multiple question keywords;

[0127] Embed each of the question keywords into a vector space to obtain multiple question word vectors;

[0128] The plurality of question word vectors are converted into one-dimensional column vectors through a third hidden layer to obtain a third column vector;

[0129] Converting the third column vector into a fourth column vector through a fourth hidden layer;

[0130] Concatenate the second column vector and the fourth column vector to obtain a fifth column vector;

[0131] The fifth column vector is converted into a one-dimensional row vector through the fifth hidden layer to obtain a first row vector, wherein the first row vector includes a plurality of row matrix elements corresponding to and representing a plurality of question intentions to be determined.

[0132] In one implementation of the present application, in terms of determining the correlation between the plurality of question intentions to be determined and the plurality of medical attribute information, the program includes instructions for specifically executing the following steps:

[0133] Perform a dot multiplication operation on the second column vector and the first row vector to obtain a correlation matrix, wherein the correlation matrix is ​​used to represent the correlation between the multiple question intentions to be determined and the multiple medical attribute information, wherein the values ​​of the matrix elements in the correlation matrix are 1 or 0, and the 1 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 1 is correlated with the medical attribute information corresponding to the matrix element with the value of 1, and the 0 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 0 is not correlated with the medical attribute information corresponding to the matrix element with the value of 1.

[0134] In an implementation of the present application, in determining the target question intention from the multiple question intentions to be determined based on the correlation, the program includes instructions specifically for executing the following steps:

[0135] Based on the correlation matrix, determining the proportion of the multiple question intentions to be determined that are related to each of the multiple medical attribute information to obtain multiple proportions;

[0136] Selecting at least one to-be-determined question intention corresponding to a proportion greater than a first preset threshold among the multiple proportions as a target to-be-determined question intention, to obtain at least one target to-be-determined question intention;

[0137] Based on the at least one target question intention to be determined, the target question intention is determined.

[0138] In an implementation of the present application, the target question intention is related to at least one medical attribute information among the multiple medical attribute information.

[0139] In one implementation of the present application, in determining a target answer sentence of the question sentence from a plurality of answer sentences to be determined associated with the target question intention, the program includes instructions specifically for executing the following steps:

[0140] Extracting knowledge-side features from each of the answer sentences to be determined to obtain a plurality of knowledge-side features;

[0141] Extracting data-side features from multiple medical attribute information associated with the target question intention;

[0142] Determining a matching degree between the data-side feature and each of the knowledge-side features to obtain a plurality of matching degrees;

[0143] Determining a target matching degree among the multiple matching degrees that is greater than or equal to a preset matching degree;

[0144] Determine the target knowledge-side features corresponding to the target matching degree;

[0145] The answer sentence to be determined corresponding to the target knowledge-side feature is used as the target answer sentence of the question sentence.

[0146] It should be noted that the specific implementation process of this embodiment can refer to the specific implementation process described in the above method embodiment, which will not be described here.

[0147] The above embodiments mainly introduce the scheme of the embodiments of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0148] The embodiment of the present application can divide the electronic device into functional units according to the method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0149] The following is an embodiment of the device of the present application, which is used to execute the method implemented by the method embodiment of the present application. Figure 5 , Figure 5 : is a structural schematic diagram of a question-and-answer device provided in an embodiment of the present application, which is applied to an electronic device, and the device includes:

[0150] Processing unit 501 is used to determine multiple medical attribute information based on a question statement input by a user, each of the medical attribute information includes a medical entity name and a specific physiological parameter; preprocess the question statement to obtain multiple question intentions to be determined; determine the correlation between the multiple question intentions to be determined and the multiple medical attribute information; determine a target question intention from the multiple question intentions to be determined based on the correlation; and determine a target answer statement of the question statement from multiple answer statements to be determined associated with the target question intention.

[0151] In one implementation of the present application, in terms of determining multiple medical attribute information based on a question statement input by a user, the processing unit 501 is specifically used to extract multiple medical attribute keywords from the question statement input by the user; embed each of the medical attribute keywords into a vector space to obtain multiple medical attribute word vectors; convert the multiple medical attribute word vectors into one-dimensional column vectors through a first hidden layer to obtain a first column vector; convert 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 represent multiple medical attribute information.

[0152] In one implementation of the present application, in terms of preprocessing the question statement to obtain multiple question intentions to be determined, the processing unit 501 is specifically used to perform word segmentation processing on the question statement to obtain multiple question keywords; embed each of the question keywords into a 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; convert the third column vector into a fourth column vector through a fourth hidden layer; concatenate the second column vector with the fourth column vector to obtain a fifth column vector; convert the fifth column vector into a one-dimensional row vector through a fifth hidden layer to obtain a first row vector, and the first row vector includes multiple row matrix elements that respectively correspond to multiple question intentions to be determined.

[0153] In one implementation of the present application, in terms of determining the correlation between the multiple question intentions to be determined and the multiple medical attribute information, the processing unit 501 is specifically used to perform a dot product operation on the second column vector and the first row vector to obtain a correlation matrix, and the correlation matrix is ​​used to represent the correlation between the multiple question intentions to be determined and the multiple medical attribute information, wherein the values ​​of the matrix elements in the correlation matrix are 1 or 0, and the 1 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 1 is correlated with the medical attribute information corresponding to the matrix element with the value of 1, and the 0 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 0 is not correlated with the medical attribute information corresponding to the matrix element with the value of 1.

[0154] In one implementation of the present application, in terms of determining the target question intention from the multiple question intentions to be determined based on the correlation, the processing unit 501 is specifically used to determine, based on the correlation matrix, the proportion of the multiple question intentions to be determined that is related to each of the multiple medical attribute information, to obtain multiple proportions; select at least one question intention to be determined corresponding to a proportion greater than a first preset threshold among the multiple proportions as the target question intention to be determined, to obtain at least one target question intention to be determined; and determine the target question intention based on the at least one target question intention to be determined.

[0155] In an implementation of the present application, the target question intention is related to at least one medical attribute information among the multiple medical attribute information.

[0156] In one implementation of the present application, in terms of determining a target answer statement of the question statement from multiple answer statements to be determined associated with the target question intention, the processing unit 501 is specifically used to extract knowledge-side features from each of the answer statements to be determined to obtain multiple knowledge-side features; extract data-side features from multiple medical attribute information associated with the target question intention; determine the matching degree between the data-side features and each of the knowledge-side features to obtain multiple matching degrees; determine a target matching degree that is greater than or equal to a preset matching degree among the multiple matching degrees; determine the target knowledge-side feature corresponding to the target matching degree; and use the answer statement to be determined corresponding to the target knowledge-side feature as the target answer statement of the question statement.

[0157] The question-answering device may further include a communication unit 502 and a storage unit 503, wherein the storage unit 503 is used to store program codes 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, and the storage unit 503 may be a memory.

[0158] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0159] An embodiment of the present application also provides a chip, wherein the chip includes a processor for calling and running a computer program from a memory, so that a device equipped with the chip executes some or all of the steps described for the electronic device in the above method embodiment.

[0160] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiments, and the above computer includes an electronic device.

[0161] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0162] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0164] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0165] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0166] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0167] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0168] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0169] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A question-answering method, characterized in that: Applied to electronic equipment, the method comprises: Determining multiple medical attribute information based on a question statement input by a user; Preprocessing the question sentence to obtain multiple question intentions to be determined; Determining the correlation between the plurality of question intentions to be determined and the plurality of medical attribute information; determining a target question intention from the plurality of question intentions to be determined based on the correlation; Determining a target answer sentence of the question sentence from a plurality of answer sentences to be determined that are associated with the target question intention; Wherein, the preprocessing of the question sentence to obtain multiple question intentions to be determined includes: performing word segmentation processing on the question sentence to obtain multiple question keywords; embedding each of the question keywords into a vector space to obtain multiple question word vectors; converting the multiple question word vectors into one-dimensional column vectors through a third hidden layer to obtain a third column vector; converting the third column vector into a fourth column vector through a fourth hidden layer; concatenating the second column vector with the fourth column vector to obtain a fifth column vector; converting the fifth column vector into a one-dimensional row vector through a fifth hidden layer to obtain a first row vector, wherein the first row vector includes multiple row matrix elements corresponding to multiple question intentions to be determined, wherein the second column vector is obtained by converting the first column vector, and the first column vector is obtained according to multiple medical attribute keywords; The determining of the correlation between the multiple question intentions to be determined and the multiple medical attribute information includes: performing a dot product operation on the second column vector and the first row vector to obtain a correlation matrix, wherein the correlation matrix is ​​used to represent the correlation between the multiple question intentions to be determined and the multiple medical attribute information, wherein the values ​​of the matrix elements in the correlation matrix are 1 or 0, and the 1 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 1 is correlated with the medical attribute information corresponding to the matrix element with the value of 1, and the 0 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 0 is not correlated with the medical attribute information corresponding to the matrix element with the value of 1; The method of determining a target question intention from the multiple question intentions to be determined based on the correlation includes: determining, based on the correlation matrix, a proportion of the multiple question intentions to be determined that is related to each of the multiple medical attribute information, to obtain multiple proportions; selecting at least one question intention to be determined corresponding to a proportion greater than a first preset threshold among the multiple proportions as a target question intention to be determined, to obtain at least one target question intention to be determined; and determining the target question intention based on the at least one target question intention to be determined.

2. The method according to claim 1, characterized in that The determining of multiple medical attribute information based on the question statement input by the user includes: Extracting multiple medical attribute keywords from the question sentence input by the user; Embed each of the medical attribute keywords into a vector space to obtain multiple medical attribute word vectors; Converting the plurality of medical attribute word vectors into one-dimensional column vectors through a first hidden layer to obtain a first column vector; The first column vector is transformed into a second column vector through a second hidden layer, and the second column vector includes a plurality of column matrix elements corresponding to and representing a plurality of medical attribute information respectively.

3. The method according to claim 1 or 2, characterized in that: The step of determining a target answer sentence for the question sentence from a plurality of answer sentences to be determined that are associated with the target question intention comprises: Extracting knowledge-side features from each of the answer sentences to be determined to obtain a plurality of knowledge-side features; Extracting data-side features from multiple medical attribute information associated with the target question intention; Determining a matching degree between the data-side feature and each of the knowledge-side features to obtain a plurality of matching degrees; Determining a target matching degree among the multiple matching degrees that is greater than or equal to a preset matching degree; Determine the target knowledge-side features 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.

4. A question-answering device, characterized in that: Applied to electronic equipment, the device comprises: A processing unit, configured to determine a plurality of medical attribute information based on a question statement input by a user, each of the medical attribute information including a medical entity name and a specific physiological parameter; preprocess the question statement to obtain a plurality of question intentions to be determined; determine the correlation between the plurality of question intentions to be determined and the plurality of medical attribute information; determine a target question intention from the plurality of question intentions to be determined based on the correlation; determine a target answer statement for the question statement from a plurality of answer statements to be determined associated with the target question intention; Wherein, the preprocessing of the question sentence to obtain multiple question intentions to be determined includes: performing word segmentation processing on the question sentence to obtain multiple question keywords; embedding each of the question keywords into a vector space to obtain multiple question word vectors; converting the multiple question word vectors into one-dimensional column vectors through a third hidden layer to obtain a third column vector; converting the third column vector into a fourth column vector through a fourth hidden layer; concatenating the second column vector with the fourth column vector to obtain a fifth column vector; converting the fifth column vector into a one-dimensional row vector through a fifth hidden layer to obtain a first row vector, wherein the first row vector includes multiple row matrix elements corresponding to multiple question intentions to be determined, wherein the second column vector is obtained by converting the first column vector, and the first column vector is obtained according to multiple medical attribute keywords; The determining of the correlation between the multiple question intentions to be determined and the multiple medical attribute information includes: performing a dot product operation on the second column vector and the first row vector to obtain a correlation matrix, wherein the correlation matrix is ​​used to represent the correlation between the multiple question intentions to be determined and the multiple medical attribute information, wherein the values ​​of the matrix elements in the correlation matrix are 1 or 0, and the 1 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 1 is correlated with the medical attribute information corresponding to the matrix element with the value of 1, and the 0 is used to represent that the question intention to be determined corresponding to the matrix element with the value of 0 is not correlated with the medical attribute information corresponding to the matrix element with the value of 1; The method of determining a target question intention from the multiple question intentions to be determined based on the correlation includes: determining, based on the correlation matrix, a proportion of the multiple question intentions to be determined that is related to each of the multiple medical attribute information, to obtain multiple proportions; selecting at least one question intention to be determined corresponding to a proportion greater than a first preset threshold among the multiple proportions as a target question intention to be determined, to obtain at least one target question intention to be determined; and determining the target question intention based on the at least one target question intention to be determined.

5. The device according to claim 4, characterized in that In terms of determining multiple medical attribute information based on the question statement input by the user, the processing unit is specifically used to extract multiple medical attribute keywords from the question statement input by the user; embed each of the medical attribute keywords into a vector space to obtain multiple medical attribute word vectors; convert the multiple medical attribute word vectors into one-dimensional column vectors through a first hidden layer to obtain a first column vector; convert the first column vector into a second column vector through a second hidden layer, and the second column vector includes multiple column matrix elements that respectively represent multiple medical attribute information.

6. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 3.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 3.