Question relationship graph construction method for question answering system, question answering method and device
By constructing a problem relationship map, calculating the correlation measurement and positional relationship between problem entities, the problem of dependence on question-answer templates, data volume and semantic correlation of question-and-answer systems is solved, and efficient and flexible question-and-answer processing is achieved.
Patent Information
- Application Number
- CN202210173491.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-02-24
AI Technical Summary
The existing Q&A system has a strong dependence on Q&A templates, Q&A data volume and semantic correlation, resulting in difficulty and high maintenance costs.
By constructing a problem relationship map, obtaining problem entities and their properties, calculating correlation measurements between problem entities, and determining positional relationships in the preset coordinate space, thereby building a problem relationship map and reducing dependence on question-answer templates, data volume and semantic associations.
It realizes that it does not rely on a large number of Q&A templates and data in Q&A processing, reduces system maintenance and development costs, and improves the flexibility and efficiency of Q&A system.
Smart Images

Figure CN114676213B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a question relationship graph construction method, a question-answering method and a device for a question-answering system. Background Art
[0002] Question Answering System (QA) is an advanced form of information retrieval system, which can answer questions raised by users in natural language accurately and concisely.
[0003] At present, there are three types of question-answering processing methods for question-answering systems: The first type is a question-answering system that strongly relies on question-answering templates, which answers questions raised by users by building question-answering templates with logical structures. This type of question-answering system strongly relies on question-answering templates, requires the configuration of a large number of question-answering templates, and the maintenance of question-answering templates in the later stage is relatively difficult. The second type is a question-answering system that relies on deep models, which answers questions raised by users by building deep learning models. This type of question-answering system often requires a large amount of question-answering data support, and the development and use of complex deep learning models has high hardware and development costs, making it difficult to implement. The third type is a question-answering system based on knowledge graphs, which models questions and knowledge graphs through question-answering templates and learns the mapping relationship from natural language to knowledge graph substructures. However, this type also relies on question-answering templates, and learning the mapping relationship from natural language to knowledge graph substructures requires relying on semantic associations, which are difficult to establish.
[0004] It can be seen that the existing question-answering system has the defects of strong dependence on question-answering templates, the amount of question-answering data, and semantic association. Summary of the invention
[0005] In view of this, the present invention proposes a question relationship graph construction method, a question and answer method and a device for a question and answer system, the main purpose of which is to reduce the dependence of the question and answer system on question and answer templates, question and answer data volume, and semantic association.
[0006] In order to achieve the above object, the present invention mainly provides the following technical solutions:
[0007] In a first aspect, the present invention provides a method for constructing a question relationship graph for a question-answering system, the method comprising:
[0008] Acquire multiple problem entities and attributes of each of the problem entities;
[0009] Determine the correlation measure between each of the problem entities according to the attributes of each of the problem entities;
[0010] Determine the positional relationship between each of the problem entities in a preset coordinate space according to the correlation measurement between each of the problem entities;
[0011] A problem relationship map is constructed based on the positional relationship between the problem entities.
[0012] In a second aspect, the present invention provides a question-answering method for a question-answering system, which is applied to the question-answering system, wherein question entities in the question-answering system exist in the form of a question relationship graph, each of the question entities has at least one associated target entity, and the positional relationship between each of the question entities in the question relationship graph is established based on a correlation measurement between each of the question entities, and the method comprises:
[0013] Selecting a first question entity related to the target question from each question entity of the question-answering system, wherein the first question entity has the highest similarity to the target question;
[0014] Based on the positional relationship between the question entities in the question relationship spectrum, selecting a second question entity related to the first question entity, wherein the distance between the second question entity and the first question entity is less than a distance threshold;
[0015] An answer to the target question is generated based on at least one target entity related to the first question entity and at least one target entity related to the second question.
[0016] In a third aspect, the present invention provides a device for constructing a question relationship graph for a question-answering system, the device comprising:
[0017] An acquisition unit, used for acquiring a plurality of question entities and respective attributes of the question entities;
[0018] A first determining unit, configured to determine a correlation measure between two problem entities according to the attributes of each of the problem entities;
[0019] A second determining unit, configured to determine the positional relationship between each of the problem entities in a preset coordinate space according to a correlation measure between each of the problem entities;
[0020] A construction unit is used to construct a problem relationship map based on the positional relationship between the problem entities.
[0021] In a fourth aspect, the present invention provides a question-answering device for a question-answering system, which is applied to the question-answering system, wherein question entities in the question-answering system exist in the form of a question relationship graph, each of the question entities has at least one associated target entity, and the positional relationship between each of the question entities in the question relationship graph is established based on a correlation measurement between each of the question entities, and the device comprises:
[0022] A first selection unit, configured to select a first question entity related to a target question from each question entity of the question-answering system, wherein the first question entity has the highest similarity to the target question;
[0023] A second selection unit is used to select a second question entity related to the first question entity based on the positional relationship between the question entities in the question relationship spectrum, wherein the distance between the second question entity and the first question entity is less than a distance threshold;
[0024] A generating unit is used to generate an answer to the target question based on at least one target entity related to the first question entity and at least one target entity related to the second question.
[0025] In a fifth aspect, the present invention provides a computer-readable storage medium, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the question relationship graph construction method for the question and answer system described in the first aspect, and / or execute the question and answer method for the question and answer system described in the second aspect.
[0026] In a sixth aspect, the present invention provides an electronic device, the electronic device comprising:
[0027] Memory, used to store programs;
[0028] A processor, coupled to the memory, is used to run the program to execute the question relationship graph construction method for the question-answering system described in the first aspect, and / or to execute the question-answering method for the question-answering system described in the second aspect.
[0029] By means of the above technical scheme, the question relationship graph construction method, question answering method and device for the question answering system provided by the present invention, when there is a need to construct a question relationship graph, first obtain multiple question entities and the attributes of each question entity. Then, according to the attributes of each question entity, determine the correlation measurement between the question entities, and according to the correlation measurement between the question entities, determine the positional relationship between the question entities in the preset coordinate space. Finally, construct the question relationship graph based on the positional relationship between the question entities. It can be seen that the positional relationship between the question entities in the question relationship graph in the scheme provided by the present invention is established based on the correlation measurement between the question entities, so the question relationship graph can reflect the correlation between the question entities. Therefore, when question and answer processing is performed based on the question relationship graph, the answer that satisfies the user's question can be inferred based on the positional relationship between the question entities, and the entire question and answer process does not need to rely strongly on the question and answer template, the amount of question and answer data, and the semantic association. Therefore, the embodiment of the present invention can reduce the dependence of the question and answer system on the question and answer template, the amount of question and answer data, and the semantic association.
[0030] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 A flowchart of a method for constructing a question relationship graph for a question-answering system provided by an embodiment of the present invention is shown;
[0033] Figure 2 A schematic diagram of a problem relationship graph construction process provided by an embodiment of the present invention is shown;
[0034] Figure 3 A flowchart of a question-answering method for a question-answering system provided by an embodiment of the present invention is shown;
[0035] Figure 4 A schematic diagram of the structure of a question relationship graph construction device for a question-answering system provided by an embodiment of the present invention is shown;
[0036] Figure 5 A schematic diagram showing the structure of a device for constructing a question relationship graph for a question-answering system provided by another embodiment of the present invention;
[0037] Figure 6 A schematic diagram of the structure of a question-answering device for a question-answering system provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0038] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0039] Question Answering System (QA) is an advanced form of information retrieval system, which can answer questions raised by users in natural language accurately and concisely.
[0040] At present, there are three types of question-answering processing methods for question-answering systems: The first type is a question-answering system that strongly relies on question-answering templates, which answers questions raised by users by building question-answering templates with logical structures. This type of question-answering system strongly relies on question-answering templates, requires the configuration of a large number of question-answering templates, and the maintenance of question-answering templates in the later stage is relatively difficult. The second type is a question-answering system that relies on deep models, which answers questions raised by users by building deep learning models. This type of question-answering system often requires a large amount of question-answering data support, and the development and use of complex deep learning models has high hardware and development costs, making it difficult to implement. The third type is a question-answering system based on knowledge graphs, which models questions and knowledge graphs through question-answering templates and learns the mapping relationship from natural language to knowledge graph substructures. However, this type also relies on question-answering templates, and learning the mapping relationship from natural language to knowledge graph substructures requires relying on semantic associations, which are difficult to establish.
[0041] It can be seen that the existing question-answering system is strongly dependent on question-answering templates, question-answering data volume, and semantic associations. In order to overcome the above defects, the embodiment of the present invention provides a question relationship graph construction method, question-answering method and device for the question-answering system, so that the question-answering system is no longer strongly dependent on question-answering templates, question-answering data volume and semantic associations. When there are questions provided by users, the answers can be extracted through the positional relationship between question entities in the question relationship graph to answer the questions.
[0042] The question relationship graph construction method, question and answer method and device for the question and answer system provided in the embodiments of the present invention can be applied in the construction process of the question and answer system in any knowledge field. The question relationship graph construction method, question and answer method and device for the question and answer system provided in the embodiments of the present invention are specifically described below.
[0043] like Figure 1 As shown, an embodiment of the present invention provides a method for constructing a question relationship graph for a question-answering system, and the method mainly includes:
[0044] 101. Obtain multiple question entities and the attributes of each question entity.
[0045] Question entities are the basis for building a question relationship graph. In order to improve the accuracy of the question and answer results output by the question-answering system, the obtained question entities are all derived from the knowledge domain corresponding to the question-answering system. The sources of question entities include the following: first, question entities are extracted from the specified knowledge documents of the question-answering system; second, question entities are extracted from the question data raised by users received by the question-answering system; third, question entities are extracted from the question accumulation documents of user questions accumulated by manual customer service. In actual applications, one or more of the above methods can be selected to obtain question entities based on specific business needs.
[0046] In order to facilitate the assessment of the relevance between question entities, it is necessary to obtain the attributes of the question entity while obtaining the question entity. Each question entity has its own attributes, which are specific descriptions of the question entity. The attributes of the question entity may include at least one of the following: central word, theme, event label, keyword, high-frequency word, URL, time, content.
[0047] 102. According to the attributes of each problem entity, determine the correlation measure between each problem entity.
[0048] Attributes are specific descriptions of problem entities. The attributes of problem entities can be used as the basis for establishing problem entity associations. Therefore, the correlation measures between each problem entity are determined based on the attributes of each problem entity, so that the associations between each problem entity are determined based on the correlation measures between each problem entity.
[0049] The following describes how to determine the correlation measure between two problem entities based on the attributes of each problem entity. The process of determining the correlation measure between two problem entities is basically the same, so for any two problem entities, the correlation measure can be determined through the following steps 1 to 2:
[0050] Step 1: Determine at least one association value between the two question entities based on the attributes of the two question entities.
[0051] The specific attributes of the two problem entities can reflect the degree of attribute association, mutual exclusion and semantic association between the two problem entities. Therefore, the association value between the two problem entities can be determined based on the attributes of the two problem entities. At least one of the following can be flexibly selected according to specific business needs: attribute association value, mutual exclusion association value, and semantic association value. Among them, the attribute association value reflects the degree of attribute association between the two problem entities, the mutual exclusion association value reflects the degree of mutual exclusion between the two problem entities, and the semantic association degree reflects the degree of semantic association between the two problem entities.
[0052] The following describes the methods for determining the attribute association value, mutually exclusive association value, and semantic association value between two problem entities:
[0053] First, determine the attribute association value between the two problem entities.
[0054] The attribute association value indicates the degree of intersection between two problem entities. When determining the attribute association value between two problem entities, first determine the total number of all attributes possessed by the two problem entities and the total number of identical attributes possessed by the two problem entities, and then determine the ratio of the total number of identical attributes to the total number of all attributes as the attribute association value between the two problem entities.
[0055] For example, the attributes of question entity 1 include attribute 1, attribute 2, and attribute 3. The attributes of question entity 2 include attribute 1, attribute 2, attribute 4, attribute 5, and attribute 6. It can be seen that the total number of all attributes possessed by the two question entities, question entity 1 and question entity 2, is 8. The same attributes possessed include attribute 1 and attribute 2, and the total number of the same attributes possessed is 2. Therefore, the attribute correlation value between the two question entities, question entity 1 and question entity 2, is 2 / 8, which is 0.25.
[0056] Second, determine the mutually exclusive association value between the two problem entities.
[0057] The mutually exclusive association value indicates the degree of mutual exclusion between two problem entities. When determining the mutually exclusive association value between two problem entities, the degree of mutual exclusion between the attributes of the two problem entities is first obtained. Then, based on the obtained degree of mutual exclusion, the mutually exclusive association value between the two problem entities is determined.
[0058] For any two attributes, the degree of mutual exclusivity between the two is a priori knowledge. When the degree of mutual exclusivity between the two attributes needs to be obtained, it can be directly extracted from the priori knowledge storage point. When obtaining the degree of mutual exclusivity between the attributes of two problem entities, in order to comprehensively evaluate the degree of mutual exclusivity between the two, it is necessary to obtain the degree of mutual exclusivity between each attribute of one problem entity and each attribute of another problem entity.
[0059] After obtaining the mutual exclusion degree between the attributes of the two question entities, the mutual exclusion association value between the two question entities can be determined according to the obtained mutual exclusion degree. The specific process of determining the mutual exclusion association value is: the sum of the obtained mutual exclusion degrees is determined as the mutual exclusion association value between the two question entities.
[0060] Exemplarily, the attributes of problem entity 1 include attribute 1, attribute 2, and attribute 3. The attributes of problem entity 2 include attribute 1 and attribute 4. When obtaining the degree of mutual exclusion, the degree of mutual exclusion that needs to be obtained includes: the degree of mutual exclusion between attribute 1 and attribute 1, the degree of mutual exclusion between attribute 1 and attribute 4, the degree of mutual exclusion between attribute 2 and attribute 1, the degree of mutual exclusion between attribute 2 and attribute 4, the degree of mutual exclusion between attribute 3 and attribute 1, and the degree of mutual exclusion between attribute 3 and attribute 4. The sum of the above-obtained 6 degrees of mutual exclusion is determined as the mutual exclusion association value between problem entity 1 and problem entity 2.
[0061] Third, determine the semantic association value between the two problem entities.
[0062] The semantic association value indicates the semantic similarity between two question entities. When determining the semantic association value between two question entities, firstly, the semantic vectors corresponding to the two question entities are obtained through the semantic training model, and then the semantic association value between the two question entities is determined based on the obtained semantic vectors.
[0063] The semantic training model can represent the problem entity as a model of semantic vectors, and its specific type is not specifically limited in this embodiment. Exemplarily, the semantic training model is a LaBSE model (Language-agnostic BERT SentenceEmbedding). After obtaining the semantic vectors corresponding to the two problem entities through the semantic training model, the product of the two semantic vectors obtained is determined as the semantic association value between the two problem entities.
[0064] It should be noted that in order to reduce the computational cost, before determining the correlation measure between the problem entities, the semantic vectors corresponding to the two problem entities can be obtained through the semantic training model, and all the semantic vectors can be organized into a similarity matrix, wherein all elements in the similarity matrix are the semantic association values between the problem entities. The process of organizing all the semantic vectors into similarities is: organizing all the semantic vectors into a first matrix and organizing all the semantic vectors into a second matrix, wherein all the semantic vectors in the first matrix form a row, and all the semantic vectors in the second matrix form a column.
[0065] The product of the first matrix and the second matrix is the similarity matrix.
[0066] Step 2: determining a correlation measure between two problem entities based on the at least one association value.
[0067] The type of correlation value used to determine the correlation measure between two problem entities can be selected from attribute correlation values, mutually exclusive correlation values, and semantic correlation values based on business needs. In order to more comprehensively evaluate the correlation between two problem entities, attribute correlation values, mutually exclusive correlation values, and semantic correlation values can be used to jointly determine the correlation measure between the two problem entities.
[0068] The following is a specific description of the process of determining the correlation measure between two problem entities based on the attribute correlation value, the mutually exclusive correlation value, and the semantic correlation value. The process includes: firstly, determining the perception between the two problem entities based on the perception strength between the attributes of the two problem entities, then correcting the semantic correlation value based on the attribute correlation value, and respectively correcting the attribute correlation value and the mutually exclusive correlation value based on the perception. Finally, determining the correlation measure between the two problem entities based on the corrected attribute correlation value, the mutually exclusive correlation value, and the semantic correlation value.
[0069] The same attributes of the two problem entities determine the correlation between the two. Therefore, when determining the perceived strength between the attributes of the two problem entities, only the perceived strength of the same attributes of the two problem entities is determined. For example, the attributes of problem entity 1 include attribute 1, attribute 2, and attribute 3. The attributes of problem entity 2 include attribute 1 and attribute 4. When determining the perceived strength, only the perceived strength of attribute 1 is determined. It should be noted that for any attribute, its perceived strength is prior knowledge. When its perceived strength needs to be obtained, it can be directly extracted from the prior knowledge storage point.
[0070] After the perceptual strength between the attributes of the two problem entities, the perceptual degree between the two problem entities can be determined by the following formula:
[0071] M ij =g(∑I(X n ))
[0072] Among them, M ij is the perception between problem entity i and problem entity j; g is a bounded single increasing function; I(X n ) is the perceptual intensity between the nth target attribute of problem entity i and problem entity j, where the target attribute is the same attribute of problem entity i and problem entity j.
[0073] g is a bounded single increasing function, and the calculation formula of perception can be simply changed based on the specific form of the bounded single increasing function. For example, g is a concave curve function, then
[0074]
[0075] Among them, X best is the maximum perceptual intensity among the acquired perceptual intensities.
[0076] Since the attribute association value and the mutually exclusive association value cannot fully describe the correlation between the two problem entities to a certain extent, after determining the perception, the attribute association value and the mutually exclusive association value can be corrected based on the perception. The correction method is: correct the attribute association value by multiplying the perception with the attribute association value, and correct the mutually exclusive association value by multiplying the perception with the mutually exclusive association value.
[0077] The attribute association value indicates the degree of intersection between two problem entities, and the semantic association value indicates the degree of semantic similarity between two problem entities. In some cases, the semantic association between two problem entities is large, but the attribute association is small. Neither the semantic association value nor the attribute association value can correctly indicate the correlation between the two problem entities. Therefore, it is necessary to correct the semantic association value based on the attribute association value. The correction method is to correct the semantic association value by multiplying the attribute association value by the semantic association value.
[0078] After the correction process is performed, the correlation measure between the two problem entities can be determined based on the corrected attribute association value, mutually exclusive association value, and semantic association value. The correlation measure between the two problem entities can be determined by the following formula:
[0079]
[0080] in, is the correlation measure between question entity i and question entity j; M ij is the perception between question entity i and question entity j; R ij is the attribute association value between question entity i and question entity j; F ij is the mutually exclusive association value between question entity i and question entity j; is the semantic association value between question entity i and question entity j; K 1 is the first constant; K 2 is the second constant.
[0081] Both the semantic association value and the attribute association value indicate the degree of association between the two problem entities. Therefore, the K associated with the two in the formula is 1 M ij R ij and K 2 φ ij R ij The mutual exclusion correlation value indicates the degree of mutual exclusion between the two problem entities, so the F related to it in the formula ij M ij Needs to be subtracted.
[0082] The above formula K 1 and K 2Both are a priori constants, and their purpose is to control the correlation measurement between two problem entities within a certain range, so as to determine the positional relationship between each problem entity in the preset coordinate space. In other words, the specific values of the first constant and the second constant can be set based on the coordinate range involved in the preset coordinate space.
[0083] 103. Determine the positional relationship between each of the problem entities in a preset coordinate space based on the correlation measurement between each of the problem entities.
[0084] After determining the correlation measure between each problem entity, it is necessary to determine the positional relationship between each problem entity in the preset coordinate space. The specific process of determining the positional relationship between each problem entity in the preset coordinate space based on the correlation measure between each problem entity is described below. The process includes the following steps 1 to 2:
[0085] Step 1: determine a grid point corresponding to a problem entity among the multiple problem entities in a preset coordinate space.
[0086] The preset coordinate space is a coordinate space for the positional relationship between the self-organized problem entities. Its specific type and size can be selected based on business needs, and this example does not make specific restrictions. Exemplarily, the preset coordinate space is a two-dimensional coordinate space, and the coordinate range of the x-axis is 0-100. Similarly, the coordinate range of the y-axis is 0-100.
[0087] In order to facilitate the determination of the position of each problem entity in the preset coordinate space, the preset coordinate space is divided into a plurality of grid points. It should be noted that in order to ensure the accuracy of the positional relationship between each problem entity, the grid points are evenly divided, that is, the specifics between each grid point are the same, and one grid point corresponds to one coordinate point in the preset coordinate space.
[0088] After selecting the preset coordinate space, it is necessary to select a problem entity from each problem entity as the first problem entity to determine the grid point. The selected problem entity is any problem entity among the problem entities, which can be randomly selected from the problem entities, and the grid point corresponding to it in the preset coordinate space can be any grid point in the preset coordinate space, but in order to facilitate the use of the preset coordinate space, the grid point at the center position in the preset coordinate space can be set as its corresponding grid point in the preset coordinate space.
[0089] Step 2: execute the remaining questions in the multiple question entities as the current question entity in turn: determine the grid point corresponding to the current question entity in the preset coordinate space based on the correlation measurement between the current question entity and the question entity with the determined grid point.
[0090] After determining the grid point corresponding to the first problem entity in the preset coordinate space, it is necessary to take the remaining problem entities as current problem entities in turn to determine their corresponding grid points in the preset coordinate space.
[0091] The specific process of determining the grid point corresponding to the current problem entity in the preset coordinate space based on the correlation measurement between the current problem entity and the problem entity of the determined grid point is described below. The process includes:
[0092] First, for each problem entity with a determined grid point, the following is performed: determine the circle corresponding to the problem entity with the determined grid point, wherein the circle is centered at the grid point of the problem entity with the determined grid point and has a radius that is a correlation measure between the current problem entity and the problem entity with the determined grid point.
[0093] For any current problem entity, there is a correlation measurement between it and the problem entity with determined grid points in the preset coordinate space, so the grid points of the current problem entity can be determined based on these correlation measurements.
[0094] When a current problem entity has a grid point to be determined, the problem entity with the determined grid point in the preset coordinate space is determined, and based on the correlation measurement between the current problem entity and the problem entity with the determined grid point, the circle corresponding to each problem entity with the determined grid point is determined. For any problem entity with a determined grid point, the corresponding circle is centered on the grid point of the problem entity with the determined grid point, and the correlation measurement between the current problem entity and the problem entity with the determined grid point is used as the radius.
[0095] For example, Figure 2 , problem entity 3 is the current problem entity. When the grid point of problem entity 3 is to be determined, the problem entities with determined grid points in the preset coordinate space are determined to be "problem entity 1 and problem entity 2". Based on the correlation measurement between the current problem entity "problem entity 3" and the problem entity "problem entity 1" with determined grid points Determine the circle A corresponding to the problem entity "Problem Entity 1" with the determined grid points. The radius of circle A is The center of the circle is grid point A1 of "Question Entity 1". Based on the correlation measurement between the current question entity "Question Entity 3" and the question entity "Question Entity 2" at the determined grid point Determine the circle B corresponding to the problem entity "Problem Entity 2" with the determined grid points. The radius of circle B is The center of the circle is grid point B1 of "problem entity B".
[0096] Secondly, a target area is determined, wherein the target area is an intersection area between circles corresponding to problem entities of each determined grid point, and the number of circles involved in the target area is the largest among all intersection areas of the preset coordinate space.
[0097] After determining the circles of the problem entities of each determined grid point, it is necessary to determine the target area, which is the intersection area between the circles corresponding to the problem entities of each determined grid point, and the number of circles involved in the target area is the largest among all the intersection areas in the preset coordinate space. The target area is the area where the current problem entity has the highest correlation with the problem entities of the determined grid points, so the grid points corresponding to the current problem entity can be determined based on the grid points of the target area.
[0098] For example, Figure 2 , based on the correlation measure between the current problem entity "Problem Entity 3" and the problem entity "Problem Entity 1" at the determined grid point Determine the circle A corresponding to the problem entity "Problem Entity 1" of the determined grid point. Based on the correlation measurement between the current problem entity "Problem Entity 3" and the problem entity "Problem Entity 2" of the determined grid point Determine the circle B corresponding to the problem entity "Problem Entity 2" with the determined grid points. The intersection area of the two circles is F, and there is no other intersection area in the preset coordinate space, so F is selected as the target area.
[0099] It should be noted that if the current problem entity is the second problem entity for which a grid point is determined, since there is only a circle corresponding to the first problem entity in the preset coordinate space and no other circles exist, any point on the circle corresponding to the first problem entity can be determined as the grid point corresponding to the current problem entity.
[0100] Finally, a grid point in the target area is determined as the grid point corresponding to the current problem entity.
[0101] The target area is the area where the current problem entity has the highest correlation with the problem entity of the determined grid points, so the grid points corresponding to the current problem entity can be determined based on the grid points of the target area. For example, any grid point in the target area or the grid point at the center is determined as the grid point corresponding to the current problem entity.
[0102] For example, Figure 2 , select the grid point C1 in the F region as the grid point of problem entity 3.
[0103] Step three: Based on the grid points corresponding to each problem entity, determine the positional relationship between each problem entity.
[0104] After determining the grid points corresponding to each problem entity, the coordinate points of each problem entity in the preset coordinate space can be determined based on the grid points. Based on the coordinate points of each problem entity, the distance between each problem entity is determined. The determined distance is the positional relationship between the problem entities.
[0105] 104. Construct a problem relationship map based on the positional relationship between each problem entity.
[0106] After obtaining the positional relationship between each problem entity, a problem relationship map can be constructed based on the positional relationship between each problem entity. The construction process uses the distance between the problem entities to represent the correlation between the problem entities.
[0107] For example, question entity 1, question entity 2 and question entity 3. The distance between question entity 1 and question entity 2 is 2, the distance between question entity 1 and question entity 3 is 5, and the distance between question entity 2 and question entity 3 is 6. The constructed question relationship graph can be expressed as:
[0108] [Question Entity 1, Question Entity 2, 2], [Question Entity 1, Question Entity 3, 5]
[0109] [Question Entity 2, Question Entity 3, 6]
[0110] After constructing the question relationship graph, a question-answering system can be constructed based on the question relationship graph. When constructing the question-answering system, determine at least one target entity corresponding to each question entity in the question relationship graph, and then establish an association relationship between at least one target entity and its corresponding question entity. The type of the at least one target entity is determined based on the knowledge field corresponding to the question-answering system. Exemplarily, the at least one target entity includes at least one of the following: resources, products, departments, and people. In addition, it should be noted that an association relationship may also exist between at least one target entity associated with the question entity.
[0111] The question relationship graph quantifies the degree of correlation between each question entity. When a user asks a question to the question-answering system, the first question entity that is most relevant to the user's question is selected from the question entities in the question-answering system, and the second question entity related to the first question entity is selected based on the positional relationship between the question entities in the question relationship graph. Finally, the answer to the target question is generated based on the target entity related to the first question entity and the target entity related to the second question. It can be seen that this method of relying on the question relationship graph does not need to rely on a large number of question-answering templates when performing question-answering processing. It only needs to be based on the association relationship between question entities to infer the answer that meets the user's question.
[0112] The method for constructing a question relationship map for a question-answering system provided by an embodiment of the present invention, when there is a need to construct a question relationship map, first obtains multiple question entities and the attributes of each question entity. Then, according to the attributes of each question entity, the correlation measurement between the question entities is determined, and according to the correlation measurement between the question entities, the positional relationship between each of the question entities in the preset coordinate space is determined. Finally, the question relationship map is constructed based on the positional relationship between each question entity. It can be seen that the positional relationship between the question entities in the question relationship map in the solution provided by the embodiment of the present invention is established based on the correlation measurement between the question entities, so the question relationship map can reflect the correlation between each question entity. Therefore, when question-answering processing is performed based on the question relationship map, the answer that satisfies the user's question can be inferred based on the positional relationship between the question entities, and the entire question-answering process does not need to rely strongly on the question-answering template, the amount of question-answering data, and the semantic association. Therefore, the embodiment of the present invention can reduce the dependence of the question-answering system on the question-answering template, the amount of question-answering data, and the semantic association.
[0113] like Figure 3 As shown, an embodiment of the present invention provides a question-answering method for a question-answering system, the method is applied to the question-answering system, wherein question entities in the question-answering system exist in the form of a question relationship graph, each question entity has at least one associated target entity, and the positional relationship between each question entity in the question relationship graph is established based on a correlation measurement between two question entities, and the method includes:
[0114] 301. Select a first question entity related to the target question from each question entity of the question-answering system, wherein the first question entity has the highest similarity to the target question.
[0115] The target question is the question that the user asks the question-answering system. The question-answering system needs to determine the answer to the target question and respond. After determining the target question, the question entity with the highest similarity to the target question in the question relationship graph can be determined as the first question entity related to the target question.
[0116] The process of determining the first question entity may include the following two methods: first, determining the question and answer template corresponding to the target question, and determining the question entity involved in the question and answer module as the first question entity. Second, determining the similarity between each question entity and the target question, and determining the question entity with the highest similarity as the first question entity related to the target question.
[0117] 302. Based on the positional relationship between each question entity in the question relationship spectrum, select a second question entity related to the first question entity, wherein the distance between the second question entity and the first question entity is less than a distance threshold.
[0118] The question entities in the question-answering system exist in the form of a question relationship graph, and the positional relationship between each question entity in the question relationship graph is established based on the correlation measurement between each question entity. The positional relationship between each question entity in the question relationship graph determines the correlation between each question entity. Therefore, when any question entity is determined to be related to the target question, other question entities related to the target question can be inferred based on the position of the question entity in the question relationship graph.
[0119] Before determining the first question entity, determine the distance between the first question entity and other question entities, and select the question entity whose distance is less than the distance threshold as the second question entity. If the distance is less than the distance threshold, it means that it has a high correlation with the first question entity and can be used together with the first question entity as a question entity to determine the answer to the target question.
[0120] It should be noted that, in this embodiment, after determining the first question entity related to the target question, other question entities related to the target question can be inferred based on the positional relationship between the question entities in the question relationship graph. Therefore, when performing question-answering processing, there is no need to rely on a large number of question-answering templates. Only based on the association relationship between question entities, the answer that satisfies the user's question can be inferred, thereby reducing the question-answering system's dependence on question-answering templates.
[0121] 303. Generate an answer to the target question based on at least one target entity related to the first question entity and at least one target entity related to the second question.
[0122] Each question entity in the question relationship graph is associated with at least one target entity. The type of the at least one target entity is determined based on the knowledge domain corresponding to the question-answering system. Exemplarily, the at least one target entity includes at least one of the following: resources, products, departments, and people. In addition, it should be noted that there may also be an association relationship between the at least one target entity associated with the question entity.
[0123] After determining the first question entity and the second question entity, an answer to the target question can be generated based on at least one target entity related to the first question entity and at least one target entity related to the second question. Since the answer to the target question is obtained based on multiple associated question entities, the accuracy of searching for the answer to the question can be improved.
[0124] In the question-and-answer method for the question-and-answer system provided by the embodiment of the present invention, the positional relationship between the question entities in the question relationship graph is established based on the correlation measurement between the question entities, so the question relationship graph can reflect the correlation between the question entities. Therefore, when performing question-and-answer processing based on the question relationship graph, the answer that satisfies the user's question can be inferred based on the positional relationship between the question entities, and the entire question-and-answer process does not need to rely strongly on the question-and-answer template, the amount of question-and-answer data, and the semantic association. Therefore, the embodiment of the present invention can reduce the dependence of the question-and-answer system on the question-and-answer template, the amount of question-and-answer data, and the semantic association.
[0125] Further, according to the above method embodiment, another embodiment of the present invention also provides a question relationship graph construction device for a question-answering system, such as Figure 4 As shown, the device comprises:
[0126] An acquisition unit 41 is used to acquire a plurality of question entities and attributes of each of the question entities;
[0127] A first determining unit 42, configured to determine a correlation measure between two problem entities according to the attributes of each of the problem entities;
[0128] A second determining unit 43 is used to determine the positional relationship between each of the problem entities in a preset coordinate space according to the correlation measurement between each of the problem entities;
[0129] The construction unit 44 is used to construct a problem relationship map based on the position relationship between the problem entities.
[0130] The apparatus for constructing a question relationship graph for a question-answering system provided by an embodiment of the present invention, when there is a need to construct a question relationship graph, first obtains a plurality of question entities and the attributes of each question entity. Then, according to the attributes of each question entity, the correlation measure between each question entity is determined, and according to the correlation measure between each question entity, the positional relationship between each question entity in a preset coordinate space is determined. Finally, a question relationship graph is constructed based on the positional relationship between each question entity. It can be seen that the positional relationship between the question entities in the question relationship graph in the solution provided by an embodiment of the present invention is established based on the correlation measure between the question entities, so the question relationship graph can reflect the correlation between each question entity. Therefore, when question-answering processing is performed based on the question relationship graph, the answer that satisfies the user's question can be inferred based on the positional relationship between the question entities, and the entire question-answering process does not need to rely strongly on the question-answering template, the amount of question-answering data, and the semantic association. Therefore, the embodiment of the present invention can reduce the dependence of the question-answering system on the question-answering template, the amount of question-answering data, and the semantic association.
[0131] Optional, such as Figure 5 As shown, the second determining unit 43 includes:
[0132] A setting module 431 is used to determine a grid point corresponding to a problem entity among the multiple problem entities in the preset coordinate space, wherein the preset coordinate space is divided into multiple grid points;
[0133] The first determination module 432 is used to sequentially execute the remaining problem entities of the multiple problem entities as the current problem entity: based on the correlation measurement between the current problem entity and the problem entity with the determined grid point in the preset coordinate space, determine the grid point corresponding to the current problem entity in the preset coordinate space;
[0134] The second determination module 433 is used to determine the positional relationship between the problem entities based on the grid points corresponding to the problem entities.
[0135] Optional, such as Figure 5 As shown, the first determination module 432 includes:
[0136] The first determination submodule 4321 is configured to perform, for each problem entity at a determined grid point: determining a circle corresponding to the problem entity at the determined grid point, wherein the circle is centered at the grid point of the problem entity at the determined grid point and has a correlation measure between the current problem entity and the problem entity at the determined grid point as a radius;
[0137] The second determination submodule 4322 is used to determine a target area, wherein the target area is an intersection area between circles corresponding to the problem entities of the determined grid points, and the number of circles involved in the target area is the largest among all the intersection areas of the preset coordinate space;
[0138] The third determination submodule 4323 is used to determine a grid point in the target area as the grid point corresponding to the current problem entity.
[0139] Optional, such as Figure 5 As shown, the first determination unit 42 is specifically used to perform, for any two problem entities: based on the attributes of each of the two problem entities, determine at least one association value between the two problem entities; based on the at least one association value, determine a correlation measure between the two problem entities, wherein the at least one association value is at least one of the following: an attribute association value, a mutually exclusive association value, and a semantic association value.
[0140] Optional, such as Figure 5 As shown, the first determining unit 42 includes:
[0141] The third determination module 421 is used to determine the total number of all attributes possessed by the two problem entities and the total number of identical attributes possessed by the two problem entities; and determine the ratio of the total number of identical attributes to the total number of all attributes as the attribute association value between the two problem entities.
[0142] Optional, such as Figure 5 As shown, the first determining unit 42 includes:
[0143] The fourth determination module 422 is used to obtain the mutual exclusion degree between the attributes of the two problem entities; and determine the mutual exclusion association value between the two problem entities based on the obtained mutual exclusion degree.
[0144] Optional, such as Figure 5 As shown, the first determining unit 42 includes:
[0145] The fifth determination module 423 is used to obtain the semantic vectors corresponding to the two question entities respectively through the semantic training model; and determine the semantic association value between the two question entities based on the obtained semantic vectors.
[0146] Optional, such as Figure 5 As shown, the fifth determination module 423 includes:
[0147] A fourth determination submodule 4231 is used to determine the perception degree between the two problem entities based on the perception strength between the attributes of the two problem entities;
[0148] A fifth determining submodule 4232, configured to correct the semantic association value based on the attribute association value and respectively correct the attribute association value and the mutually exclusive association value based on the perception;
[0149] The sixth determination submodule 4233 is used to determine the correlation measure between the two problem entities based on the corrected attribute association value, the mutual exclusion association value, and the semantic association value.
[0150] Optional, such as Figure 5 As shown, the sixth determination submodule 4233 is specifically used to determine the correlation measure between the two problem entities through the following formula:
[0151]
[0152] in, is the correlation measure between question entity i and question entity j; M ij is the perception between question entity i and question entity j; R ij is the attribute association value between question entity i and question entity j; F ij is the mutually exclusive association value between question entity i and question entity j; is the semantic association value between question entity i and question entity j; K 1 is the first constant; K 2 is the second constant.
[0153] Optional, such as Figure 5 As shown, the fourth determination submodule 4231 is specifically used to determine the perception between the two problem entities through the following formula:
[0154] M ij =g(∑I(X n ))
[0155] Among them, M ij is the perception between problem entity i and problem entity j; g is a bounded single increasing function; I(X n ) is the perceptual intensity between the nth target attribute of problem entity i and problem entity j, where the target attribute is the same attribute of problem entity i and problem entity j.
[0156] In the question relationship graph construction device for the question-answering system provided in the embodiment of the present invention, the detailed description of the method used in the operation process of each functional module can be found in Figure 1-Figure 2 The corresponding method of the method embodiment is explained in detail and will not be repeated here.
[0157] Further, according to the above method embodiment, another embodiment of the present invention also provides a question-answering device for a question-answering system, which is applied to a question-answering system, wherein the question entities in the question-answering system exist in the form of a question relationship graph, each of the question entities has at least one associated target entity, and the positional relationship between each of the question entities in the question relationship graph is established based on a correlation measure between each of the question entities, such as Figure 6 As shown, the device comprises:
[0158] A first selection unit 51 is used to select a first question entity related to a target question from each question entity of the question-answering system, wherein the first question entity has the highest similarity to the target question;
[0159] A second selection unit 52 is used to select a second question entity related to the first question entity based on the position relationship between each of the question entities in the question relationship spectrum, wherein the distance between the second question entity and the first question entity is less than a distance threshold;
[0160] A generating unit 53 is configured to generate an answer to the target question based on at least one target entity related to the first question entity and at least one target entity related to the second question.
[0161] In the question-and-answer device for the question-and-answer system provided by the embodiment of the present invention, the positional relationship between question entities in the question relationship graph is established based on the correlation measurement between question entities, so the question relationship graph can reflect the correlation between each question entity. Therefore, when performing question-and-answer processing based on the question relationship graph, the answer that satisfies the user's question can be inferred based on the positional relationship between question entities, and the entire question-and-answer process does not need to rely strongly on question-and-answer templates, question-and-answer data volume, and semantic associations. Therefore, the embodiment of the present invention can reduce the dependence of the question-and-answer system on question-and-answer templates, question-and-answer data volume, and semantic associations.
[0162] In the question-answering device for the question-answering system provided in the embodiment of the present invention, the detailed description of the method used in the operation process of each functional module can be found in Figure 3 The corresponding method of the method embodiment is explained in detail and will not be repeated here.
[0163] Further, according to the above embodiment, another embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute Figure 1 The method for constructing a question relationship graph for a question answering system, and / or executing Figure 3 The question-answering method for the question-answering system.
[0164] Further, according to the above embodiment, another embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0165] Memory, used to store programs;
[0166] A processor, coupled to the memory, configured to run the program to perform Figure 1 The method for constructing a question relationship graph for a question answering system, and / or executing Figure 3 The question-answering method for the question-answering system.
[0167] 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.
[0168] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.
[0169] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0170] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0171] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0172] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0173] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the operating method, device, and framework of the deep neural network model according to an embodiment of the present invention. The present invention may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0174] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" between elements does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of appropriately programmed computers. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
Claims
1. A method for constructing a question relationship graph for a question-answering system. It is characterized in that The method comprises: Acquire multiple problem entities and attributes of each of the problem entities, wherein the attributes are specific descriptions of the problem entities; Determine, according to the attributes of each of the problem entities, a correlation measure between two problem entities, wherein the correlation measure between two problem entities refers to that any two problem entities among the multiple problem entities have a corresponding correlation measure; Determine the positional relationship between each of the problem entities in a preset coordinate space according to the correlation measurement between each of the problem entities; Constructing a problem relationship map based on the positional relationship between each of the problem entities; Determining the positional relationship between each of the problem entities in a preset coordinate space according to the correlation measurement between each of the problem entities includes: Determine a grid point corresponding to a problem entity among the multiple problem entities in the preset coordinate space, wherein the preset coordinate space is divided into multiple grid points; Sequentially executing the remaining problem entities of the multiple problem entities as current problem entities: determining the grid point corresponding to the current problem entity in the preset coordinate space based on a correlation measurement between the current problem entity and the problem entity with the determined grid point; Based on the grid points corresponding to the problem entities, the positional relationship between the problem entities is determined.
2. The method according to claim 1, It is characterized in that Determining the grid point corresponding to the current problem entity in the preset coordinate space based on a correlation measure between the current problem entity and the problem entity at the determined grid point includes: For each problem entity at a determined grid point, the following steps are performed: determining a circle corresponding to the problem entity at the determined grid point, wherein the circle is centered at the grid point of the problem entity at the determined grid point and has a correlation measure between the current problem entity and the problem entity at the determined grid point as a radius; Determine a target area, wherein the target area is an intersection area between circles corresponding to the problem entities of the determined grid points, and the number of circles involved in the target area is the largest among all the intersection areas of the preset coordinate space; A grid point in the target area is determined as a grid point corresponding to the current problem entity.
3. The method according to claim 1, It is characterized in that Determine the correlation measure between each of the problem entities according to the attributes of each of the problem entities, including: For any two problem entities, the following is performed: based on the attributes of each of the two problem entities, at least one association value between the two problem entities is determined; based on the at least one association value, a correlation measure between the two problem entities is determined, wherein the at least one association value is at least one of the following: an attribute association value, a mutually exclusive association value, and a semantic association value.
4. The method according to claim 3, It is characterized in that Determining the attribute association value between the two problem entities includes: Determine the total number of all attributes possessed by the two problem entities and the total number of the same attributes possessed by the two problem entities; The ratio of the total number of the same attributes to the total number of all the attributes is determined as the attribute association value between the two problem entities.
5. The method according to claim 3, It is characterized in that Determining a mutually exclusive association value between the two problem entities includes: Obtaining the degree of mutual exclusivity between the attributes of the two problem entities; Based on the obtained mutual exclusion degree, a mutual exclusion association value between the two problem entities is determined.
6. The method according to claim 3, It is characterized in that Determining a semantic association value between the two problem entities includes: Obtaining semantic vectors corresponding to the two problem entities respectively through a semantic training model; A semantic association value between the two question entities is determined based on the acquired semantic vector.
7. The method according to claim 3, It is characterized in that Determining the correlation measure between the two problem entities based on the attribute association value, the mutually exclusive association value, and the semantic association value includes: Determining a degree of perception between the two problem entities based on a perceived strength between the attributes of the two problem entities; Correcting the semantic association value based on the attribute association value and respectively correcting the attribute association value and the mutually exclusive association value based on the perception; Based on the corrected attribute association value, the mutually exclusive association value, and the semantic association value, a correlation measure between the two problem entities is determined.
8. The method according to claim 7, It is characterized in that Determining the correlation measure between the two problem entities based on the corrected attribute association value, the mutually exclusive association value, and the semantic association value, including: The correlation measure between the two problem entities is determined by the following formula: in, is the correlation measure between question entity i and question entity j; M ij is the perception between question entity i and question entity j; R ij is the attribute association value between question entity i and question entity j; F ij is the mutually exclusive association value between question entity i and question entity j; is the semantic association value between question entity i and question entity j; K 1 is the first constant; K 2 is the second constant.
9. The method according to claim 7, It is characterized in that Determining the perception degree between the two problem entities based on the perception strength between the attributes of the two problem entities includes: The perception between the two problem entities is determined by the following formula: M ij =g(∑I(X n )) Among them, M ij is the perception between problem entity i and problem entity j; g is a bounded single increasing function; I(X n ) is the perceived intensity of the nth target attribute possessed by problem entity i and problem entity j, wherein the target attribute is the same attribute possessed by problem entity i and problem entity j.
10. A question answering method for a question answering system, It is characterized in that Applied to a question-answering system, wherein the question entities in the question-answering system exist in the form of a question relationship graph, each of the question entities has at least one associated target entity, and the positional relationship between the question entities in the question relationship graph is established based on the correlation measurement between the question entities; the correlation measurement between the question entities means that any two question entities in the question entities have corresponding correlation measurements, and the correlation measurement between the two question entities is obtained based on the attributes of the two question entities, and the attributes are specific descriptions of the question entities; the positional relationship between the question entities in the question relationship graph is established based on the correlation measurement between the question entities, including: determining a grid point corresponding to one of the question entities in a preset coordinate space, wherein the preset coordinate space is divided into multiple grid points; sequentially executing the remaining question entities in the question entities as current question entities: determining the grid point corresponding to the current question entity in the preset coordinate space based on the correlation measurement between the current question entity and the question entity at the determined grid point; determining the positional relationship between the question entities based on the grid points corresponding to the question entities; the method includes: Selecting a first question entity related to the target question from each question entity of the question-answering system, wherein the first question entity has the highest similarity to the target question; Based on the positional relationship between the question entities in the question relationship spectrum, selecting a second question entity related to the first question entity, wherein the distance between the second question entity and the first question entity is less than a distance threshold; An answer to the target question is generated based on at least one target entity related to the first question entity and at least one target entity related to the second question.
11. A device for constructing a question relationship graph for a question-answering system, It is characterized in that The device comprises: An acquisition unit, used to acquire multiple question entities and attributes of each of the question entities, wherein the attributes are specific descriptions of the question entities; A first determining unit is used to determine the correlation measurement between two problem entities according to the attributes of each of the problem entities, wherein the correlation measurement between two problem entities refers to that any two problem entities among the multiple problem entities have corresponding correlation measurement; A second determination unit is used to determine the positional relationship between each of the problem entities in the preset coordinate space according to the correlation measurement between each of the problem entities; determining the positional relationship between each of the problem entities in the preset coordinate space according to the correlation measurement between each of the problem entities, including: determining a grid point corresponding to one of the multiple problem entities in the preset coordinate space, wherein the preset coordinate space is divided into multiple grid points; sequentially executing the remaining problem entities of the multiple problem entities as current problem entities: determining the grid point corresponding to the current problem entity in the preset coordinate space based on the correlation measurement between the current problem entity and the problem entities at the determined grid points; determining the positional relationship between each of the problem entities based on the grid points corresponding to each of the problem entities; A construction unit is used to construct a problem relationship map based on the positional relationship between the problem entities.
12. A question-answering device for a question-answering system, It is characterized in that Applied to a question-answering system, wherein the question entities in the question-answering system exist in the form of a question relationship graph, each of the question entities has at least one associated target entity, and the positional relationship between the question entities in the question relationship graph is established based on the correlation measurement between the question entities; the correlation measurement between the question entities means that any two question entities in the question entities have corresponding correlation measurements, and the correlation measurement between the two question entities is obtained based on the attributes of the two question entities, and the attributes are specific descriptions of the question entities; the positional relationship between the question entities in the question relationship graph is established based on the correlation measurement between the question entities, including: determining a grid point corresponding to one of the question entities in a preset coordinate space, wherein the preset coordinate space is divided into multiple grid points; sequentially executing the remaining question entities in the question entities as current question entities: determining the grid point corresponding to the current question entity in the preset coordinate space based on the correlation measurement between the current question entity and the question entity with the determined grid point; determining the positional relationship between the question entities based on the grid points corresponding to the question entities; the device includes: A first selection unit, configured to select a first question entity related to a target question from each question entity of the question-answering system, wherein the first question entity has the highest similarity to the target question; A second selection unit is used to select a second question entity related to the first question entity based on the positional relationship between the question entities in the question relationship spectrum, wherein the distance between the second question entity and the first question entity is less than a distance threshold; A generating unit is used to generate an answer to the target question based on at least one target entity related to the first question entity and at least one target entity related to the second question.
13. A computer-readable storage medium, It is characterized in that The storage medium includes a stored program, wherein, when the program is running, the device where the storage medium is located is controlled to execute the question relationship graph construction method for the question and answer system described in any one of claims 1 to 9, and / or execute the question and answer method for the question and answer system described in claim 10.
14. An electronic device, It is characterized in that The electronic device comprises: Memory, used to store programs; A processor, coupled to the memory, is used to run the program to execute the question relationship graph construction method for the question-answering system described in any one of claims 1 to 9, and / or to execute the question-answering method for the question-answering system described in claim 10.
Citation Information
Patent Citations
Knowledge graph establishing method and system for search field oriented to enterprise data
CN108920608A
Knowledge graph construction method and device, terminal and storage medium
CN112199516A