CN109800291B - Question answering method and device, electronic equipment and storage medium - Google Patents
Question answering method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109800291B CN109800291B CN201811518823.8A CN201811518823A CN109800291B CN 109800291 B CN109800291 B CN 109800291B CN 201811518823 A CN201811518823 A CN 201811518823A CN 109800291 B CN109800291 B CN 109800291B
- Authority
- CN
- China
- Prior art keywords
- entity
- target
- elements
- answer
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000012545 processing Methods 0.000 claims abstract description 42
- 238000012216 screening Methods 0.000 claims abstract description 38
- 230000004044 response Effects 0.000 claims abstract description 25
- 230000003993 interaction Effects 0.000 claims abstract description 8
- 238000004590 computer program Methods 0.000 claims description 2
- 230000006399 behavior Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- OJRHUICOVVSGSY-RXMQYKEDSA-N (2s)-2-chloro-3-methylbutan-1-ol Chemical compound CC(C)[C@H](Cl)CO OJRHUICOVVSGSY-RXMQYKEDSA-N 0.000 description 1
- 208000035150 Hypercholesterolemia Diseases 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 229960001770 atorvastatin calcium Drugs 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 235000009508 confectionery Nutrition 0.000 description 1
- 208000029078 coronary artery disease Diseases 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The disclosure relates to a question answering method and device based on data processing, electronic equipment and a storage medium, relates to the technical field of big data, and can be applied to an application scene of determining a question answer by combining interaction behaviors of a user in a question answering system of a knowledge graph. The problem response method based on data processing comprises the steps of determining a first entity of a target problem and a matching condition corresponding to the first entity in the target problem; screening a second entity matched with the first entity from the knowledge graph; determining one or more elements corresponding to the second entity in the knowledge graph; screening target elements meeting the matching condition with the second entity from one or more elements corresponding to the second entity; an answer to the target question is determined based on the target element. The present disclosure may determine answers to target questions in combination with user interaction in a knowledge-graph based question-answering system.
Description
Technical Field
The present disclosure relates to the field of big data technologies, and in particular, to a problem response method based on data processing, a problem response device based on data processing, an electronic device, and a storage medium.
Background
In the question-answering system of the knowledge graph, entity link is a primary module, namely, the subject entity in the question sentence of the user is identified and linked with the knowledge graph, and in order to determine the entity in the target problem, entity disambiguation is needed, namely, a technology specially used for solving the ambiguity problem generated by the entity with the same name is needed. The main method for entity disambiguation at present relies on character string similarity, is aided with manually extracted features and rules to give out a plurality of possible entities at one time, and combines the semantics of questions to make certain disambiguation.
However, in the knowledge graph, there may be multiple entities with the same name, and it will be difficult to determine which specific entity the user wants to query by just semantic understanding in the question, so additional information is needed to disambiguate the entities to determine the answer to the target question.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure aims to provide a data processing-based question response method, a data processing-based question response device, an electronic device and a computer-readable storage medium, so as to overcome the problem that a specific entity aimed in a question cannot be identified and determine a target question answer at least to a certain extent.
According to a first aspect of the present disclosure, there is provided a problem response method based on data processing, including: determining a first entity of the target problem and a matching condition corresponding to the first entity in the target problem; screening a second entity matched with the first entity from the knowledge graph; determining one or more elements corresponding to the second entity in the knowledge graph; screening target elements meeting the matching condition with the second entity from one or more elements corresponding to the second entity; an answer to the target question is determined based on the target element.
Optionally, screening the second entity matched with the first entity from the knowledge-graph includes: obtaining synonyms of a first entity; and determining an entity matched with the first entity or the synonym of the first entity in the knowledge graph as a second entity.
Optionally, determining the answer to the target question based on the target element includes: determining the number of target elements; if the number of the target elements is one, the target elements are answers to the target questions; if the number of the target elements is a plurality of, grouping the target elements according to the corresponding relation between the target elements and the second entity, and determining the answer of the target question based on the number of the elements in each target element group.
Optionally, determining the answer to the target question based on the number of target elements in each target element group includes: taking the elements in the group with the largest number of the determined target elements as answers to the target questions; or receiving the selection operation of the user on the first elements, the number of which exceeds the first preset number, in the element groups, and taking the first elements selected by the user as answers to the target questions.
Optionally, determining the answer to the target question based on the number of elements in each target element group further includes: determining the elements in the groups, the number of which exceeds a second preset number, in each element group as candidate elements; obtaining candidate matching conditions of each candidate element and the second entity; determining a first matching condition among the candidate matching conditions; and receiving a selection operation of the first candidate element by the user, and determining an answer to the question based on the first candidate element selected by the user.
Optionally, determining the answer to the question based on the first candidate element selected by the user includes: if there is only one first candidate element selected by the user, the first candidate element selected by the user is determined as an answer to the question.
Optionally, determining the answer to the question based on the first candidate element selected by the user further comprises: if the first candidate elements selected by the user are multiple, determining a second matching condition in the candidate matching conditions; and receiving a selection operation of the second candidate element by the user, and determining an answer to the question based on the second candidate element selected by the user.
According to a second aspect of the present disclosure, there is provided a problem response device based on data processing, comprising: the target problem determining module is used for determining a first entity of the target problem and a matching condition corresponding to the first entity in the target problem; the entity screening module is used for screening a second entity matched with the first entity from the knowledge graph; the element determining module is used for determining one or more elements corresponding to the second entity in the knowledge graph; the target element screening module is used for screening target elements meeting the matching condition with the second entity from one or more elements corresponding to the second entity; and the answer determining module is used for determining the answer of the target question based on the target element.
Optionally, the entity screening module includes an entity screening unit, configured to obtain synonyms of the first entity; and determining an entity matched with the first entity or the synonym of the first entity in the knowledge graph as a second entity.
Optionally, the answer determining module includes an answer determining sub-module for determining the number of target elements; if the number of the target elements is one, the target elements are answers to the target questions; if the number of the target elements is a plurality of, grouping the target elements according to the corresponding relation between the target elements and the second entity, and determining the answer of the target question based on the number of the elements in each target element group.
Optionally, the answer determining sub-module includes a first answer determining unit, configured to use the element in the group with the largest number of the determined target elements as an answer to the target question; or receiving the selection operation of the user on the first elements, the number of which exceeds the first preset number, in the element groups, and taking the first elements selected by the user as answers to the target questions.
Optionally, the answer determining sub-module further includes a second answer determining unit, configured to determine, as the candidate elements, elements in groups of elements whose number exceeds a second preset number; obtaining candidate matching conditions of each candidate element and the second entity; determining a first matching condition among the candidate matching conditions; and receiving a selection operation of the first candidate element by the user, and determining an answer to the question based on the first candidate element selected by the user.
Optionally, the second answer determining unit includes an answer determining sub-unit for determining the first candidate element selected by the user as an answer to the question if there is only one of the first candidate elements selected by the user.
Optionally, the second answer determining unit further includes an interaction determining answer subunit, configured to determine a second matching condition among the candidate matching conditions if the first candidate elements selected by the user are plural; and receiving a selection operation of the second candidate element by the user, and determining an answer to the question based on the second candidate element selected by the user.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory having stored thereon computer readable instructions which when executed by the processor implement the data processing based problem answer method according to any one of the above.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the data processing-based problem response method according to any one of the above.
The problem response method based on data processing in the exemplary embodiment of the present disclosure includes first determining a first entity of a target problem and a matching condition corresponding to the first entity in the target problem, and screening a second entity matching with the first entity from a knowledge graph; secondly, determining one or more elements corresponding to the second entity in the knowledge graph; and thirdly, screening out target elements meeting the matching condition with the second entity from one or more elements corresponding to the second entity, and determining an answer to the target question based on the target elements. According to the problem response method based on data processing, all entities with the same names as the entities in the target problem in the knowledge graph can be screened out based on the knowledge graph, and the answers of the target problem are determined after the target elements are determined based on the entities.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 schematically illustrates a flow chart of a data processing based problem answer method according to an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates an example diagram of a knowledge graph of a data processing based problem answer method, in accordance with some example embodiments of the present disclosure;
fig. 3 schematically illustrates a knowledge graph example diagram of a data processing-based problem response method according to another exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates a block diagram of a data processing based problem answer device according to some example embodiments of the present disclosure;
Fig. 5 schematically illustrates a block diagram of an entity screening module according to some example embodiments of the present disclosure;
FIG. 6 schematically illustrates a block diagram of an answer determination module according to some example embodiments of the disclosure;
fig. 7 schematically illustrates a block diagram of an answer determination sub-module according to a first exemplary embodiment of the disclosure;
fig. 8 schematically illustrates a block diagram of an answer determination sub-module according to a second exemplary embodiment of the disclosure;
fig. 9 schematically shows a block diagram of a second answer determination unit according to a first exemplary embodiment of the disclosure;
fig. 10 schematically shows a block diagram of a second answer determination unit according to a second exemplary embodiment of the disclosure;
FIG. 11 schematically illustrates a block diagram of an electronic device according to an exemplary embodiment of the present disclosure; and
fig. 12 schematically illustrates a schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the disclosed aspects may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, or in one or more software-hardened modules, or in different networks and/or processor devices and/or microcontroller devices.
In a knowledge graph, there may be a plurality of entities having the same name as the entities in the user's question, so in a question-answering system of the knowledge graph, it is difficult to determine which specific entity the user wants to ask only through semantic understanding in the question, and at this time, additional information is required for entity disambiguation to determine the answer of the target question.
Based on this, in the present exemplary embodiment, a data processing-based problem response method is provided first, where the data processing-based problem response method of the present disclosure may be implemented by using a server, and the method of the present disclosure may also be implemented by using a terminal device, where the terminal device may be, for example, a mobile phone, a computer, a PDA, or other various electronic devices. Referring to fig. 1, the data processing-based problem response method may include the steps of:
s110, determining a first entity of the target problem and a matching condition corresponding to the first entity in the target problem.
In some exemplary embodiments of the present disclosure, the target question may be a question input by a user, the first entity of the target question may be an entity included in the target question, and the matching condition corresponding to the first entity in the target question may be a correspondence of the first entity with other entities or some attribute of the first entity. For example, the target question may be "what is the indication of liprituximab? The first entity of the target problem is "liprital", and the matching condition corresponding to the first entity may be "indication".
S120, screening a second entity matched with the first entity from the knowledge graph.
In some exemplary embodiments of the present disclosure, the knowledge graph records the entities and the relationships between the entities contained therein in the form of triples, where the knowledge graph may record the relationship between two entities in a manner of (entity 1, relationship, entity 2), or may record a certain attribute of the entity in a manner of (entity, attribute value). The second entity that matches the first entity may be the same entity as the first entity name, and these entities may have different meanings. For example, what may be a target question as "Li Na occupation? "the first entity of the target problem is" Li Na ", there may be a plurality of" Li Na "in the knowledge graph, but the meaning of each" Li Na "may not be the same, for example, the entity" Li Na "may be a tennis player Li Na, a student Li Na, or a staff member Li Na.
According to some exemplary embodiments of the present disclosure, synonyms for a first entity are obtained; and determining an entity matched with the first entity or the synonym of the first entity in the knowledge graph as a second entity. What is the target question "indication of liprituximab? The first entity is "liprital", and after the first entity is determined, the second entity in the knowledge-graph may be an entity with the same name as and similar to the first entity. For example, the first entity is "liprital", then the second entity may be "liprital", "atorvastatin calcium tablet", etc., referring to fig. 2, the second entity may be entity 210, entity 220, entity 230. And screening second entities matched with the first entity from the knowledge graph, and performing next operation based on the second entities so as to facilitate the determination of the subsequent target question answers.
S130, determining one or more elements corresponding to the second entity in the knowledge graph.
In some exemplary embodiments of the present disclosure, the one or more elements corresponding to the second entity may be all elements having a connection relationship with the second entity in the knowledge-graph, and the elements may be other entities having a certain relationship with the second entity or some attribute values belonging to the second entity. Referring to fig. 2, after determining that the second entity is entity 210, entity 220, entity 230, one or more elements corresponding to the second entity may be elements 240-290.
S140, screening out target elements meeting the matching condition with the second entity from one or more elements corresponding to the second entity.
In some exemplary embodiments of the present disclosure, the matching condition, that is, the condition included in the target problem, and the element satisfying the matching condition with the second entity are target elements, and the target elements may be the entity or the attribute value of a certain entity. For example, referring to fig. 2, the condition in the target question is "indication", then the target element may be element 240; if the target question is "specification of liprital? The target element may be element 250, element 260, element 270 in fig. 2.
S150, determining an answer to the target question based on the target element.
In some exemplary embodiments of the present disclosure, the answer to the target question is the final result. Since there may be one or more target elements determined, it is necessary to determine an answer to the target question according to the specific number of target elements.
According to some exemplary embodiments of the present disclosure, the number of target elements may be determined first, and if the number of target elements is one, the target elements are answers to the target questions. Referring to fig. 2, for example, if the target problem is "what is the indication of liprituximab? If the determined target element is element 240, the number of target elements is one, and the target element is determined as the answer to the target question, that is, the answer to the target question is "hypercholesterolemia, coronary heart disease".
If the number of the target elements is a plurality of, grouping the target elements according to the corresponding relation between the target elements and the second entity, and determining the answer of the target question based on the number of the elements in each target element group. For example, the user input target question is "what are women's shoes with a price of 300-400 yuan? Referring to fig. 3, the first entity is a woman's shoe, the second entity in the knowledge graph may represent various different woman's shoes, the number of the target elements is plural, and the target elements may be classified based on the correspondence between the target elements and the second entity. For example, each "women's shoes" entity may contain various different attributes such as price, style, type, fit-through season, etc., so that each second entity may be grouped according to its attributes and an answer to the target question may be determined based on the number of target elements of each group after grouping.
According to another exemplary embodiment of the present disclosure, the elements in the group having the largest number of the determined target elements are used as the answers to the target questions. Referring to fig. 3, there are a plurality of second entities in the knowledge graph, namely "women's shoes" entities, and these entities may be classified based on brands of these "women's shoes" entities, and after the "women's shoes" entities are classified into the 1 st group, the 2 nd group, the 3 rd group, the … th group, and the nth group according to brands, the number of elements in each group is counted, if the number of elements contained in the 2 nd group is the largest, the 2 nd group is taken as an answer to the target question, and displayed to the user.
It should be noted that the terms "first", "second" or "1 st", "2 nd", etc. are used in this disclosure merely to distinguish different entities or different groupings of elements in the knowledge-graph, and should not impose any limitation on this disclosure.
In addition, the selection operation of the user on the first elements, the number of which exceeds the first preset number, in the element groups can be received, and the first elements selected by the user are used as answers to the target questions. The first preset number may be a specific value preset and configured as a basis for screening the target element. Screening out elements with the number of elements exceeding a first preset number in each element group to be used as first elements for display to a user, for example, the first preset number can be set to be 100, and after target elements with the price of 300-400 yuan in brands 1-n are determined, elements with the number of target elements exceeding 100 in the n groups are screened out to be used as first elements for display to the user; if the user selects "shoe 121" from the displayed women's shoes, the "shoe 121" is the answer to the target question.
According to yet another exemplary embodiment of the present disclosure, elements in groups of elements exceeding a second preset number in number are determined as candidate elements. The second preset number may be a specific value that is preset, and may also be used as a basis for screening the target element, where for the entity in the same problem, the specific value of the second preset number is different from the specific value of the first preset number. If the second preset number is 50, screening out elements with the preset number exceeding 50 in the knowledge graph, and taking the elements as candidate elements.
Obtaining candidate matching conditions of each candidate element and the second entity; determining a first matching condition among the candidate matching conditions; and receiving a selection operation of the first candidate element by the user, and determining an answer to the question based on the first candidate element selected by the user. The candidate matching condition of each candidate element and the second entity may be a relationship between the candidate element and the second entity or a certain attribute of the second entity, referring to fig. 3, the matching condition may be an attribute of the entity, and may include, but is not limited to, "price", "style", "type", "season", and the like; the first matching condition causes the first candidate elements of the second entity with which the candidate elements are associated to be not identical, i.e. the style of women's shoes may include, but is not limited to, "sports," leisure, "" sweet, "etc., and when the style" is used as the first matching condition, the first candidate elements are not identical because the type of each "women's shoes" entity is not identical. After the first candidate element is determined, some selectable options can be provided for the user and displayed for the user, and if the user selects the women's shoes with the high-upper attribute based on the displayed first candidate element, the women's shoes with the price of 300-400 yuan and the high-upper attribute are used as the options for determining the answer of the target question.
In some exemplary embodiments of the present disclosure, if there is only one of the first candidate elements selected by the user, the first candidate element selected by the user is determined as an answer to the question. For example, if the user selects the attribute of "high" and there is only one corresponding "women's shoes" entity under the attribute, the entity selected by the user is taken as the answer to the target question.
In another exemplary embodiment of the present disclosure, if there are a plurality of first candidate elements selected by the user, determining a second matching condition among the candidate matching conditions; and receiving a selection operation of the second candidate element by the user, and determining an answer to the question based on the second candidate element selected by the user. The second matching condition may be an attribute of the entity or a relationship between the entity and another entity, the second matching condition should be different from the first matching condition. For example, if the user selects the attribute of "high" and there are a plurality of corresponding "women's shoes" under the attribute, the second matching condition may be continuously determined as a basis for screening the elements, for example, "season" may be selected as the second matching condition, where the second candidate elements of the second entity associated with each first candidate element are not identical. Since the prices of the respective "women's shoes" entities are not exactly the same, a "season" may be selected as the second matching condition, and the second candidate element may be determined therefrom.
And if the number of the determined second candidate elements is one, the candidate elements are taken as answers to the target questions, and if the number of the second candidate elements is a plurality of the second candidate elements, the selection operation of the user on the second candidate elements is received, and the second candidate elements selected by the user are taken as answers to the target questions. After the second candidate element is determined by taking the season as the second matching condition, if only one second candidate element exists, the element is taken as an answer to the target question. If there are a plurality of second candidate elements, the plurality of candidate elements can be displayed to the user for the user to select, and the element selected by the user is used as the answer of the target question.
In summary, in the problem response method based on data processing, first, a first entity of a target problem and a matching condition corresponding to the first entity in the target problem are determined; secondly, screening a second entity matched with the first entity from the knowledge graph, and determining one or more elements corresponding to the second entity in the knowledge graph; and thirdly, screening out target elements meeting the matching condition with the second entity from one or more elements corresponding to the second entity, and determining an answer to the target question based on the target elements. On the one hand, through the problem response method based on data processing, the entity matched with the entity in the target problem in the knowledge graph can be screened out, and the answer of the target problem can be determined by combining the selection of the user or other interactive operation modes; on the other hand, through the data processing-based question response method, all entities meeting the matching condition can be used as candidates of target question answers so as to ensure the comprehensiveness of the answers.
In addition, in an exemplary embodiment of the present disclosure, a problem response device based on data processing is also provided. Referring to fig. 4, the data processing based question answering apparatus 400 may include a target question determination module 410, an entity screening module 420, an element determination module 430, a target element screening module 440, and an answer determination module 450.
Specifically, the objective problem determining module 410 may be configured to determine a first entity of the objective problem and a matching condition corresponding to the first entity in the objective problem; the entity screening module 420 may be configured to screen a second entity matching the first entity from the knowledge-graph; the element determination module 430 may be configured to determine one or more elements in the knowledge-graph that correspond to the second entity; the target element screening module 440 may be configured to screen one or more elements corresponding to the second entity for target elements that satisfy the matching condition with the second entity; the answer determination module 450 may be used to determine an answer to a target question based on a target element.
The problem response device 400 based on data processing can meet the interaction operation of the entity and the user in the target problem, achieve entity disambiguation, screen out the element which is most in line with the semantic meaning of the target problem from the knowledge graph as the answer of the target problem, and is an effective problem response device based on data processing.
According to some example embodiments of the present disclosure, referring to fig. 5, entity screening module 420 may include entity screening unit 510.
Specifically, the entity filtering unit 510 may be configured to obtain synonyms of the first entity; and determining an entity matched with the first entity or the synonym of the first entity in the knowledge graph as a second entity.
The entity screening unit 510 may screen out entities identical or similar to the entities in the target problem based on the knowledge-graph.
According to another exemplary embodiment of the present disclosure, referring to fig. 6, the answer determination module 450 includes an answer determination sub-module 610.
Specifically, the answer determination submodule 610 may be used to determine the number of target elements; if the number of the target elements is one, the target elements are answers to the target questions; if the number of the target elements is a plurality of, grouping the target elements according to the corresponding relation between the target elements and the second entity, and determining the answer of the target question based on the number of the elements in each target element group.
The answer determination sub-module 610 may determine how to screen answers to the target questions based on different numbers of target elements.
According to some exemplary embodiments of the present disclosure, referring to fig. 7, the answer determination sub-module 610 may include a first answer determination unit 710.
Specifically, the first answer determining unit 710 may be configured to use, as an answer to the target question, elements in the group having the largest number of determined target elements; or receiving the selection operation of the user on the first elements, the number of which exceeds the first preset number, in the element groups, and taking the first elements selected by the user as answers to the target questions.
The first answer determining unit 710 may select, in the case where the number of target elements is plural, an element having the largest number of elements in the group as an answer to the target question, or screen out elements satisfying a preset number, and determine an answer to the target question in combination with a user operation.
According to another exemplary embodiment of the present disclosure, referring to fig. 8, the answer determination sub-module 810 may further include a second answer determination unit 820 in addition to the first answer determination unit 710, compared to the answer determination sub-module 610.
Specifically, the second answer determining unit 820 may be configured to determine, as the candidate element, the element in the group whose number exceeds the second preset number in each element group; obtaining candidate matching conditions of each candidate element and the second entity; determining a first matching condition among the candidate matching conditions; and receiving a selection operation of the first candidate element by the user, and determining an answer to the question based on the first candidate element selected by the user.
The second answer determination unit 820 may determine an answer to the target question based on the user operation after screening the candidate elements.
According to some exemplary embodiments of the present disclosure, referring to fig. 9, the second answer determination unit 820 may include an answer determination sub-unit 910.
Specifically, the answer determination subunit 910 may be configured to determine the first candidate element selected by the user as an answer to the question if there is only one first candidate element selected by the user.
According to some exemplary embodiments of the present disclosure, referring to fig. 10, the second answer determining unit 1010 may further include an interaction determining answer subunit 1020 in addition to the answer determining subunit 910, compared to the second answer determining unit 820.
Specifically, the interaction determination answer subunit 1020 may be configured to determine, if there are a plurality of first candidate elements selected by the user, a second matching condition among the candidate matching conditions; and receiving a selection operation of the second candidate element by the user, and determining an answer to the question based on the second candidate element selected by the user.
The interaction determination answer subunit 1020 may determine an answer to the target question based on the candidate elements in conjunction with a user selection operation.
The specific details of each virtual data processing-based problem response device module in the foregoing description have been described in detail in the corresponding data processing-based problem response method, and therefore will not be described herein.
It should be noted that although in the above detailed description several modules or units of a data processing based problem answer device are mentioned, this division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1100 according to such an embodiment of the invention is described below with reference to fig. 11. The electronic device 1100 shown in fig. 11 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 11, the electronic device 1100 is embodied in the form of a general purpose computing device. Components of electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one memory unit 1120, a bus 1130 connecting the different system components (including the memory unit 1120 and the processing unit 1110), and a display unit 1140.
Wherein the storage unit stores program code that is executable by the processing unit 1110 such that the processing unit 1110 performs steps according to various exemplary embodiments of the present invention described in the above-described "exemplary methods" section of the present specification.
The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a Random Access Memory (RAM) 1121 and/or a cache memory 1122, and may further include a Read Only Memory (ROM) 1123.
Storage unit 1120 may also include a program/utility 1124 having a set (at least one) of program modules 1125, such program modules 1125 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus 1130 may be a local bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a bus using any of a variety of bus architectures.
The electronic device 1100 may also communicate with one or more external devices 1170 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1100, and/or any device (e.g., router, modem, etc.) that enables the electronic device 1100 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1150. Also, electronic device 1100 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1160. As shown, network adapter 1160 communicates with other modules of electronic device 1100 via bus 1130. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 1100, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
Referring to fig. 12, a program product 1200 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (7)
1. A data processing-based problem response method, comprising:
Determining a first entity of a target problem and a matching condition corresponding to the first entity in the target problem;
screening a second entity matched with the first entity from the knowledge graph;
determining one or more elements corresponding to the second entity in the knowledge graph;
screening target elements meeting the matching condition with the second entity from one or more elements corresponding to the second entity;
determining an answer to the target question based on the target element, comprising:
determining the number of the target elements;
if the number of the target elements is a plurality of, grouping the target elements according to the corresponding relation between the target elements and the second entity, and determining the answer of the target question based on the number of the elements in each target element group, wherein the elements in the group with the largest number of the determined target elements are used as the answer of the target question; or, receiving the selection operation of the user on the first elements, the number of which exceeds the first preset number, in each element group, and taking the first elements selected by the user as answers to the target questions;
the method comprises the following steps:
determining the elements in the groups, the number of which exceeds a second preset number, in each element group as candidate elements;
Obtaining candidate matching conditions of each candidate element and the second entity;
determining a first matching condition among the candidate matching conditions; wherein the first matching condition makes first candidate elements of the second entity associated with each candidate element not identical;
receiving a selection operation of a user on the first candidate elements, and determining an answer to the question based on the first candidate elements selected by the user, wherein if a plurality of first candidate elements are selected by the user, a second matching condition is determined in the candidate matching conditions; the second matching condition makes the second candidate elements of the second entity associated with each first candidate element not identical; and receiving a selection operation of the second candidate element by a user, and determining an answer to the question based on the second candidate element selected by the user.
2. The data processing-based question answering method according to claim 1, wherein screening out a second entity matching the first entity from a knowledge-graph comprises:
obtaining synonyms of the first entity;
and determining an entity matched with the first entity or the synonym of the first entity in the knowledge graph as a second entity.
3. The data processing-based question answering method according to claim 1, wherein determining an answer to the target question based on the target element further comprises:
if the number of target elements is one, the target element is an answer to the target question.
4. The data processing-based question answering method according to claim 1, wherein determining an answer to the question based on a first candidate element selected by a user comprises:
if there is only one first candidate element selected by the user, determining the first candidate element selected by the user as an answer to the question.
5. A data processing-based problem response device, comprising:
the target problem determining module is used for determining a first entity of a target problem and a matching condition corresponding to the first entity in the target problem;
the entity screening module is used for screening a second entity matched with the first entity from the knowledge graph;
the element determining module is used for determining one or more elements corresponding to the second entity in the knowledge graph;
a target element screening module, configured to screen out target elements that satisfy the matching condition with the second entity from one or more elements corresponding to the second entity;
The answer determining module comprises an answer determining sub-module for determining the number of the target elements, wherein the answer determining sub-module is used for determining the answer of the target questions based on the target elements; if the number of the target elements is a plurality of, grouping the target elements according to the corresponding relation between the target elements and the second entity, and determining the answer of the target problem based on the number of the elements in each target element group, wherein the answer determination submodule comprises a first answer determination unit, and is used for taking the elements in the group with the largest determined number of the target elements as the answer of the target problem; or, receiving the selection operation of the user on the first elements, the number of which exceeds the first preset number, in each element group, and taking the first elements selected by the user as answers to the target questions;
the answer determination sub-module may further comprise,
a second answer determining unit configured to determine, as candidate elements, elements in groups whose number exceeds a second preset number among the element groups; obtaining candidate matching conditions of each candidate element and the second entity; determining a first matching condition among the candidate matching conditions; wherein the first matching condition makes first candidate elements of the second entity associated with each candidate element not identical; receiving a selection operation of the first candidate element by a user, determining an answer to the question based on the first candidate element selected by the user,
An interaction determination answer subunit, configured to determine a second matching condition among the candidate matching conditions if the first candidate elements selected by the user are plural; the second matching condition makes the second candidate elements of the second entity associated with each first candidate element not identical; and receiving a selection operation of the second candidate element by a user, and determining an answer to the question based on the second candidate element selected by the user.
6. An electronic device, comprising:
a processor; and
a memory having stored thereon computer readable instructions which when executed by the processor implement the data processing based problem answer method according to any one of claims 1 to 4.
7. A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the data processing-based problem response method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811518823.8A CN109800291B (en) | 2018-12-12 | 2018-12-12 | Question answering method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811518823.8A CN109800291B (en) | 2018-12-12 | 2018-12-12 | Question answering method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109800291A CN109800291A (en) | 2019-05-24 |
CN109800291B true CN109800291B (en) | 2024-03-15 |
Family
ID=66556686
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811518823.8A Active CN109800291B (en) | 2018-12-12 | 2018-12-12 | Question answering method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109800291B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110909159B (en) * | 2019-09-29 | 2022-09-16 | 珠海格力电器股份有限公司 | User intention identification method, device, terminal and storage medium |
CN110991183B (en) * | 2019-12-06 | 2023-07-04 | 北京百度网讯科技有限公司 | Predicate determination method, predicate determination device, predicate determination equipment and predicate determination storage medium |
CN111147375A (en) * | 2019-12-31 | 2020-05-12 | 秒针信息技术有限公司 | Network operation method, device, computer equipment and medium |
CN111552880B (en) * | 2020-04-30 | 2023-06-30 | 杭州网易再顾科技有限公司 | Knowledge graph-based data processing method and device, medium and electronic equipment |
CN111930913A (en) * | 2020-08-14 | 2020-11-13 | 上海茂声智能科技有限公司 | Knowledge graph-based question and answer method, system, device, equipment and medium |
CN111930916B (en) * | 2020-09-18 | 2021-02-05 | 北京百度网讯科技有限公司 | Dialog generation method and device, electronic equipment and storage medium |
US20220322284A1 (en) * | 2021-03-31 | 2022-10-06 | Qualcomm Incorporated | Ue grouping scheme for enhanced paging reception |
CN114327731B (en) * | 2021-12-31 | 2023-11-14 | 北京字跳网络技术有限公司 | Information display method, device, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104598556A (en) * | 2015-01-04 | 2015-05-06 | 百度在线网络技术(北京)有限公司 | Search method and search device |
CN106919655A (en) * | 2017-01-24 | 2017-07-04 | 网易(杭州)网络有限公司 | A kind of answer provides method and apparatus |
CN108804521A (en) * | 2018-04-27 | 2018-11-13 | 南京柯基数据科技有限公司 | A kind of answering method and agricultural encyclopaedia question answering system of knowledge based collection of illustrative plates |
CN108932323A (en) * | 2018-06-29 | 2018-12-04 | 北京百度网讯科技有限公司 | Determination method, apparatus, server and the storage medium of entity answer |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10176228B2 (en) * | 2014-12-10 | 2019-01-08 | International Business Machines Corporation | Identification and evaluation of lexical answer type conditions in a question to generate correct answers |
US10586156B2 (en) * | 2015-06-25 | 2020-03-10 | International Business Machines Corporation | Knowledge canvassing using a knowledge graph and a question and answer system |
-
2018
- 2018-12-12 CN CN201811518823.8A patent/CN109800291B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104598556A (en) * | 2015-01-04 | 2015-05-06 | 百度在线网络技术(北京)有限公司 | Search method and search device |
CN106919655A (en) * | 2017-01-24 | 2017-07-04 | 网易(杭州)网络有限公司 | A kind of answer provides method and apparatus |
CN108804521A (en) * | 2018-04-27 | 2018-11-13 | 南京柯基数据科技有限公司 | A kind of answering method and agricultural encyclopaedia question answering system of knowledge based collection of illustrative plates |
CN108932323A (en) * | 2018-06-29 | 2018-12-04 | 北京百度网讯科技有限公司 | Determination method, apparatus, server and the storage medium of entity answer |
Also Published As
Publication number | Publication date |
---|---|
CN109800291A (en) | 2019-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109800291B (en) | Question answering method and device, electronic equipment and storage medium | |
CN109766497B (en) | Ranking list generation method and device, storage medium and electronic equipment | |
CN110837550A (en) | Knowledge graph-based question and answer method and device, electronic equipment and storage medium | |
US20190065624A1 (en) | Method and device for obtaining answer, and computer device | |
CN110083688A (en) | Search result recalls method, apparatus, server and storage medium | |
CN108170794B (en) | Information recommendation method and device, storage medium and electronic equipment | |
CN111898643A (en) | Semantic matching method and device | |
JP2020017272A (en) | Method, apparatus, server, and storage medium for picture retrieval | |
CN110837586B (en) | Question-answer matching method, system, server and storage medium | |
CN107908641A (en) | A kind of method and system for obtaining picture labeled data | |
CN109343926A (en) | Application program image target display methods, device, terminal and storage medium | |
CN109241452B (en) | Information recommendation method and device, storage medium and electronic equipment | |
US20220129491A1 (en) | Method for supporting agent and computing device thereof | |
CN107133263A (en) | POI recommends method, device, equipment and computer-readable recording medium | |
CN110287338B (en) | Industry hotspot determination method, device, equipment and medium | |
JP2024507902A (en) | Information retrieval methods, devices, electronic devices and storage media | |
CN111259126A (en) | Similarity calculation method, device and equipment based on word characteristics and storage medium | |
US20210271637A1 (en) | Creating descriptors for business analytics applications | |
KR102640679B1 (en) | Consulting information processing method and device | |
CN107239209B (en) | Photographing search method, device, terminal and storage medium | |
CN112231444A (en) | Processing method and device for corpus data combining RPA and AI and electronic equipment | |
CN111881381A (en) | Display method, device, equipment and storage medium | |
CN107908724B (en) | Data model matching method, device, equipment and storage medium | |
CN110362688A (en) | Examination question mask method, device, equipment and computer readable storage medium | |
US10061819B2 (en) | Unsupervised boosting of unique search results in a metasearch environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |