CN111125379B - Knowledge base expansion method and device, electronic equipment and storage medium - Google Patents

Knowledge base expansion method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111125379B
CN111125379B CN201911368840.2A CN201911368840A CN111125379B CN 111125379 B CN111125379 B CN 111125379B CN 201911368840 A CN201911368840 A CN 201911368840A CN 111125379 B CN111125379 B CN 111125379B
Authority
CN
China
Prior art keywords
sentence pattern
accumulated
seed
similarity
sentence
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
Application number
CN201911368840.2A
Other languages
Chinese (zh)
Other versions
CN111125379A (en
Inventor
夏有君
李莉
戴瑾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
iFlytek Co Ltd
Original Assignee
iFlytek Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by iFlytek Co Ltd filed Critical iFlytek Co Ltd
Priority to CN201911368840.2A priority Critical patent/CN111125379B/en
Publication of CN111125379A publication Critical patent/CN111125379A/en
Application granted granted Critical
Publication of CN111125379B publication Critical patent/CN111125379B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Animal Behavior & Ethology (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a knowledge base expansion method, a knowledge base expansion device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a seed sentence pattern corresponding to any knowledge point in a knowledge base and a plurality of accumulated sentence patterns in the corresponding field of the knowledge base; and expanding any knowledge point based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and/or the path of the seed sentence pattern and each accumulated sentence pattern in the service knowledge graph of the corresponding field. The method, the device, the electronic equipment and the storage medium provided by the embodiment of the invention automatically expand the knowledge base based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and/or the path in the service knowledge map of the corresponding field, effectively save the labor cost and the time cost, can unbind the sentence patterns with different intentions, avoid the ambiguity between standard questions, and improve the expansion quality and the expansion effect.

Description

Knowledge base expansion method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of human-computer interaction, in particular to a knowledge base expansion method, a knowledge base expansion device, electronic equipment and a storage medium.
Background
With the rapid development of artificial intelligence technology and the wide application of man-machine interaction systems, intelligent customer service is in force. The intelligent customer service can answer the user questions based on the knowledge base and provide all-weather service for the user.
Currently, the construction of the knowledge base is usually completed manually, and workers are required to sort and summarize knowledge points and corresponding standard questions in related fields, and expand each standard question on the basis of the sorting and summarization. The method consumes a great deal of manpower and time and is excessively dependent on the professional ability of workers, so that the quality of the obtained knowledge base is uneven.
Disclosure of Invention
The embodiment of the invention provides a knowledge base expansion method, a knowledge base expansion device, electronic equipment and a storage medium, which are used for solving the problem that a large amount of labor and time are consumed in the conventional knowledge base expansion method.
In a first aspect, an embodiment of the present invention provides a method for expanding a knowledge base, including:
determining a seed sentence pattern corresponding to any knowledge point in a knowledge base and a plurality of accumulated sentence patterns in the corresponding field of the knowledge base;
and expanding any knowledge point based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and/or the path of the seed sentence pattern and each accumulated sentence pattern in the service knowledge graph of the corresponding field.
Preferably, the expanding any knowledge point based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and the path of the seed sentence pattern and each accumulated sentence pattern in the service knowledge graph of the corresponding field specifically includes:
selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the seed sentence patterns and the semantic information of each accumulated sentence pattern;
and expanding any knowledge point based on the paths of the seed sentence patterns and each candidate sentence pattern in the service knowledge graph of the corresponding field and the service class information of the seed sentence patterns and each candidate sentence pattern.
Preferably, the selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the semantic information of the seed sentence pattern and each accumulated sentence pattern specifically includes:
determining the semantic feature vector similarity of the seed sentence pattern and any accumulated sentence pattern based on the semantic feature vectors in the semantic information of the seed sentence pattern and any accumulated sentence pattern;
and/or determining the semantic key information similarity of the seed sentence pattern and any accumulated sentence pattern based on the semantic key information in the semantic information of the seed sentence pattern and the any accumulated sentence pattern;
and selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the semantic feature vector similarity and/or the semantic key information similarity of the seed sentence pattern and each accumulated sentence pattern.
Preferably, the determining semantic key information similarity between the seed sentence pattern and any one of the accumulated sentence patterns based on semantic key information in the semantic information of the seed sentence pattern and the any one of the accumulated sentence patterns specifically includes:
determining the similarity of the operation type information of the seed sentence pattern and any accumulated sentence pattern based on the operation type information in the semantic key information of the seed sentence pattern and the any accumulated sentence pattern;
determining the similarity of the business class information of the seed sentence pattern and any accumulated sentence pattern based on the business class information in the semantic key information of the seed sentence pattern and any accumulated sentence pattern;
and determining semantic key information similarity of the seed sentence pattern and any accumulated sentence pattern based on operation type information similarity and service type information similarity of the seed sentence pattern and any accumulated sentence pattern.
Preferably, the selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the semantic feature vector similarity and the semantic key information similarity of the seed sentence pattern and each accumulated sentence pattern specifically includes:
and if the similarity of the semantic feature vector of the seed sentence pattern and any accumulated sentence pattern is within a preset vector similarity interval and the similarity of the semantic key information of the seed sentence pattern and any accumulated sentence pattern is greater than or equal to a preset information similarity threshold, taking any accumulated sentence pattern as the candidate sentence pattern.
Preferably, the expanding any knowledge point based on the path of the seed sentence pattern and each candidate sentence pattern in the service knowledge graph of the corresponding field and the service class information of the seed sentence pattern and each candidate sentence pattern specifically includes:
determining the path similarity between the seed sentence pattern and the path of any candidate sentence pattern in the service knowledge graph of the corresponding field;
if the path similarity is greater than a preset path similarity threshold value and the operation type information in the seed sentence pattern is the same as that in any candidate sentence pattern, replacing the service type information in any candidate sentence pattern with the service type information in the seed sentence pattern;
and adding the replaced any candidate sentence pattern to the any knowledge point.
Preferably, the determining the path similarity between the seed sentence pattern and the path of any candidate sentence pattern in the service knowledge graph of the corresponding domain specifically includes:
determining a path of the seed sentence pattern in the business knowledge graph of the corresponding field based on the business knowledge graph of the corresponding field and the semantic key information of the seed sentence pattern;
determining a path of any candidate sentence pattern in the business knowledge graph of the corresponding field based on the business knowledge graph of the corresponding field and the semantic key information of any candidate sentence pattern;
and determining the path similarity based on the paths of the seed sentence patterns and any candidate sentence pattern in the service knowledge graph of the corresponding field.
In a second aspect, an embodiment of the present invention provides a knowledge base expansion apparatus, including:
a sentence pattern determining unit for determining seed sentence patterns corresponding to any knowledge point in the knowledge base and a plurality of accumulated sentence patterns in the corresponding field of the knowledge base;
and the sentence pattern expansion unit is used for expanding any knowledge point based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and/or the path of the seed sentence pattern and each accumulated sentence pattern in the service knowledge map of the corresponding field.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a communication interface, a memory, and a bus, where the processor and the communication interface complete mutual communication through the bus, and the processor may invoke a logic command in the memory to execute the steps of the method as provided in the first aspect.
In a fourth aspect, embodiments of the present invention provide a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method as provided in the first aspect.
The knowledge base expansion method, the knowledge base expansion device, the electronic equipment and the storage medium provided by the embodiment of the invention automatically expand the knowledge base based on the semantic information of the seed sentence patterns and each accumulated sentence pattern and/or the path in the business knowledge graph of the corresponding field, thereby effectively saving the labor cost and the time cost, being capable of unbinding the sentence patterns with different intentions, avoiding the ambiguity between standard questions and improving the expansion quality and the expansion effect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for expanding a knowledge base according to an embodiment of the present invention;
FIG. 2 is a flow chart of a knowledge point expansion method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for determining candidate sentence patterns based on semantic information according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for expanding knowledge points based on a service knowledge graph path according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a business knowledge graph path provided by an embodiment of the invention;
FIG. 6 is a flow chart illustrating a method for expanding a knowledge base according to another embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a knowledge base expansion apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
With the development of natural language understanding and large-scale knowledge processing technology, intelligent customer service technology oriented to various industries is developed. The services corresponding to different manufacturers in different industries are different, so knowledge bases required by intelligent customer service applied to different manufacturers in different industries also need to be constructed respectively. And the construction and expansion of the knowledge base are very time-consuming and labor-consuming.
At present, in each field of intelligent customer service, a large amount of corpus resources are accumulated, and the expansion of a knowledge base can be realized in a resource reuse mode. The conventional resource multiplexing is usually realized by a multiplexing method based on a knowledge base template or a mapping multiplexing method based on knowledge points. The multiplexing method based on the knowledge base template has the advantages that the template maintenance cost is high, data with different intentions have high winding types, for example, templates such as 'introduction XXX' and 'how to handle XXX' are extremely large in sentence pattern corresponding to the templates, but ambiguity between standard questions is easy to occur in the actual use process due to different keywords XXX. The mapping multiplexing method based on the knowledge points has the advantages that most knowledge points are different due to the difference of service ranges of different manufacturers, the expansion is carried out only by the mapping relation of the knowledge points, the reusable knowledge points are few, and the expansion effect is not ideal.
To this end, an embodiment of the present invention provides a method for expanding a knowledge base, and fig. 1 is a schematic flow chart of the method for expanding a knowledge base, as shown in fig. 1, the method includes:
step 110, determining the corresponding seed sentence pattern in any knowledge point in the knowledge base and a plurality of accumulated sentence patterns in the corresponding field of the knowledge base.
Here, the knowledge base is a knowledge base to be expanded, the knowledge base includes a plurality of knowledge points, and each knowledge point corresponds to one standard question and a plurality of expansion questions. When any knowledge point in the knowledge base is expanded, any sentence pattern in the standard question and the expanded question corresponding to the knowledge point can be used as a seed sentence pattern.
In the domain corresponding to the knowledge base to be expanded, a large amount of linguistic data resources are accumulated, wherein the accumulated sentence pattern is a question sentence pattern accumulated in advance in the corresponding domain. The accumulated sentence may be obtained in the process of human-to-human conversation or human-to-machine conversation in the corresponding field, the accumulated sentence may be extracted from the conversation text, or may be extracted after transcription of the voice conversation is performed through voice recognition, which is not specifically limited in the embodiment of the present invention.
And step 120, expanding the knowledge points based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and/or the path of the seed sentence pattern and each accumulated sentence pattern in the service knowledge graph of the corresponding field.
Specifically, the semantic information of the sub-sentence pattern or any accumulated sentence pattern is used to reflect the semantics of the sentence pattern, and may be represented as a word vector of each participle in the text of the sub-sentence pattern or any accumulated sentence pattern, or a context vector of each participle in the text, or a key information entity in the text, or a word vector of a key information entity in the text, and the like.
Based on the semantic information of the seed sentence pattern and any accumulated sentence pattern, the semantic similarity between the seed sentence pattern and the accumulated sentence pattern can be measured, and the higher the semantic similarity is, the higher the probability that the accumulated sentence pattern and the seed sentence pattern correspond to the same knowledge point is, and the better the effect of using the accumulated sentence pattern for expanding the knowledge points corresponding to the seed sentence pattern is.
The business knowledge graph of the corresponding field is established in advance based on a large amount of corpus resources accumulated in the field corresponding to the knowledge base, and the business knowledge graph comprises key information entities related to the corresponding field and relations among the key information entities, and is embodied as nodes in the business knowledge graph and edges among the nodes. The path of the seed sentence pattern or any accumulated sentence pattern in the service knowledge graph of the corresponding field is used for reflecting the key information entity and the relation of the sentence pattern in the service knowledge graph.
Based on the path of the seed sentence pattern and any accumulated sentence pattern in the service knowledge graph of the corresponding field, the similarity of the seed sentence pattern and the path of the accumulated sentence pattern can be measured, the higher the similarity of the path is, the higher the similarity between the key information entities and the relationship of the seed sentence pattern and the accumulated sentence pattern is, the higher the probability that the accumulated sentence pattern and the seed sentence pattern correspond to the same knowledge point is, and the better the effect of the accumulated sentence pattern for expanding the knowledge points corresponding to the seed sentence pattern is.
By applying the semantic information of the seed sentence pattern and each accumulated sentence pattern and/or the path of the seed sentence pattern and each accumulated sentence pattern in the business knowledge map of the corresponding field, the accumulated sentence pattern which can be used for realizing the expansion of the corresponding knowledge point can be screened out from all the accumulated sentence patterns, and then the expansion of the knowledge point is realized. The above operation is executed for each knowledge point needing to be expanded in the knowledge base, so that the accumulated sentence patterns in the corresponding field of the knowledge base can be reused, and the automatic expansion of the knowledge base is realized.
The method provided by the embodiment of the invention automatically expands the knowledge base based on the seed sentence pattern, the semantic information of each accumulated sentence pattern and/or the path in the service knowledge map of the corresponding field, effectively saves the labor cost and the time cost, can unbind the sentence patterns with different intentions, avoids the ambiguity between standard questions, and improves the expansion quality and the expansion effect.
Based on any of the above embodiments, fig. 2 is a schematic flow chart of the knowledge point expansion method provided by the embodiment of the present invention, and as shown in fig. 2, step 120 specifically includes:
in step 121, a plurality of candidate sentence patterns are selected from the plurality of accumulated sentence patterns based on the seed sentence pattern and the semantic information of each accumulated sentence pattern.
Specifically, for any accumulated sentence pattern, whether the accumulated sentence pattern is applied to the expansion of the subsequent knowledge points as a candidate sentence pattern can be judged by comparing the semantic information of the seed sentence pattern and the semantic information of the accumulated sentence pattern. Here, the condition for determining whether to use the accumulated sentence pattern as the candidate sentence pattern may be whether the semantic similarity between the accumulated sentence pattern and the seed sentence pattern is greater than a preset minimum semantic similarity, or whether the semantic similarity between the accumulated sentence pattern and the seed sentence pattern is a preset number of maximum semantic similarities between all the accumulated sentence patterns and the seed sentence patterns, and the like, which is not specifically limited in the embodiment of the present invention.
And step 122, expanding the knowledge points based on the paths of the seed sentence patterns and each candidate sentence pattern in the service knowledge graph of the corresponding field, and the service class information of the seed sentence patterns and each candidate sentence pattern.
Specifically, after the accumulated sentence patterns are screened through the semantic information to obtain a plurality of candidate sentence patterns, the knowledge point expansion can be performed based on the paths of the seed sentence patterns and each candidate sentence pattern in the service knowledge graph of the corresponding field, and the service class information of the seed sentence patterns and each candidate sentence pattern. For example, if the similarity of the paths of the sub-sentence pattern and any candidate sentence pattern in the service knowledge graph of the corresponding field is greater than the preset minimum path similarity, and the service class information of the sub-sentence pattern and the candidate sentence pattern is the same, the candidate sentence pattern may be directly used as the expansion question of the knowledge point, if the similarity of the paths of the sub-sentence pattern and any candidate sentence pattern in the service knowledge graph of the corresponding field is greater than the preset minimum path similarity, and the service class information of the sub-sentence pattern and the candidate sentence pattern is different, the service class information of the candidate sentence pattern may be replaced by the service class information of the sub-sentence pattern, and the replaced candidate sentence pattern may be used as the expansion question of the knowledge point.
The method provided by the embodiment of the invention can further expand the knowledge base through the path in the service knowledge map of the corresponding field and the service class information on the basis of screening the accumulated sentence pattern based on the semantic information, thereby effectively improving the expansion quality of the knowledge base.
Based on any of the foregoing embodiments, fig. 3 is a schematic flowchart of a method for determining candidate sentence patterns based on semantic information according to an embodiment of the present invention, as shown in fig. 3, step 121 specifically includes:
step 1211, determining a semantic feature vector similarity between the seed sentence pattern and any accumulated sentence pattern based on the semantic feature vectors in the semantic information of the seed sentence pattern and the accumulated sentence pattern.
And/or, in step 1212, determining semantic key information similarity between the seed sentence pattern and the accumulated sentence pattern based on the semantic key information in the semantic information of the seed sentence pattern and the accumulated sentence pattern.
In particular, the semantic information comprises semantic feature vectors and/or semantic key information. The semantic feature vector may be a word vector of each participle in the sentence pattern text, or a context vector of each participle in the text, and the semantic feature vector may be obtained based on a model with a semantic metric function, such as LSTM and Bert.
The semantic feature vector similarity of the seed sentence pattern and any accumulated sentence pattern is the similarity of the semantic feature vectors of the seed sentence pattern and any accumulated sentence pattern, and the semantic feature vector similarity can be calculated by cosine similarity, euclidean distance and other methods.
Furthermore, the semantic key information is used to represent key information entities contained in the sentence pattern text, where the semantic key information may be operation type information or service type information, and the semantic key information may include entities extracted from the sentence pattern text and information categories described by the entities. The semantic key information can be obtained based on a model with an entity extraction function, such as BERT-ATT, BERT-CRF and the like.
The semantic key information similarity of the seed sentence pattern and any accumulated sentence pattern is the similarity of the semantic key information of the seed sentence pattern and any accumulated sentence pattern, and the semantic key information similarity can be expressed as the proportion of the same key information entities in the semantic key information of the seed sentence pattern and the accumulated sentence pattern.
Step 1213, selecting several candidate sentence patterns from the several accumulated sentence patterns based on the similarity of semantic feature vectors and/or the similarity of semantic key information between the seed sentence pattern and each accumulated sentence pattern.
Specifically, when only step 1211 is executed and step 1212 is not executed, the candidate sentence pattern may be selected based on the similarity between the seed sentence pattern and the semantic feature vector of each accumulated sentence pattern; when only step 1212 is executed without executing step 1211, the candidate sentence pattern may be selected based on the similarity between the seed sentence pattern and the semantic key information of each accumulated sentence pattern; in both steps 1211 and 1212, candidate sentence patterns may be selected based on the similarity of the semantic feature vectors and the similarity of the semantic key information of the seed sentence pattern and each of the accumulated sentence patterns.
The method provided by the embodiment of the invention selects the candidate sentence patterns based on the similarity of the semantic feature vectors and/or the similarity of the semantic key information, and improves the multiplexing quality of the sentence patterns by semantic screening at different angles, thereby ensuring the expansion quality of a subsequent knowledge base.
Based on any of the above embodiments, in step 1211, the calculation of the semantic feature vector similarity may be implemented by:
suppose that the seed sentence pattern is q 1 Any cumulative sentence pattern is q 2 Seed sentence pattern q 1 And cumulative sentence pattern q 2 Respectively is a semantic feature vector of
Figure BDA0002339146040000091
Wherein
Figure BDA0002339146040000092
Representing a vector
Figure BDA0002339146040000093
Is a first dimension of (a), n is a vector
Figure BDA0002339146040000094
Of (c) is calculated.
Setting semantic feature vector similarity as a vector
Figure BDA0002339146040000095
Dot product and vector of
Figure BDA0002339146040000096
The quotient of the two modulo results from the following equation:
Figure BDA0002339146040000097
in the formula (Sq) 1 ,q 2 ) For the similarity of the semantic feature vectors,
Figure BDA0002339146040000099
is composed of
Figure BDA00023391460400000910
The dot product of (a) is,
Figure BDA00023391460400000911
is composed of
Figure BDA00023391460400000912
The die of (a) is used,
Figure BDA00023391460400000913
is composed of
Figure BDA00023391460400000914
Die (2).
Based on any of the above embodiments, step 1212 specifically includes: determining the similarity of the operation type information of the seed sentence pattern and the accumulated sentence pattern based on the operation type information in the semantic key information of the seed sentence pattern and any accumulated sentence pattern; determining the similarity of the business class information of the seed sentence pattern and the accumulated sentence pattern based on the business class information in the semantic key information of the seed sentence pattern and the accumulated sentence pattern; and determining semantic key information similarity of the seed sentence pattern and the accumulated sentence pattern based on the operation class information similarity and the service class information similarity of the seed sentence pattern and the accumulated sentence pattern.
Specifically, the semantic key information includes operation class information and service class information, where the operation class information is an entity of an operation type included in the sentence text, the service class information is an entity of a service type included in the sentence text, for example, in the semantic key information corresponding to "help me see my credit card bill", the operation class information includes "query", and the service class information includes "credit card" and "bill".
For different types of entities in two sentence patterns, respective similarity needs to be calculated: calculating the similarity of the operation type information of the seed sentence pattern and the operation type information of the accumulated sentence pattern to obtain the similarity of the operation type information; and calculating the similarity of the business class information of the seed sentence pattern and the business class information of the accumulated sentence pattern to obtain the similarity of the business class information. And then, integrating the operation class information similarity and the service class information similarity to determine the semantic key information similarity. For example, the lower similarity between the operation information similarity and the service information similarity may be used as the semantic key information similarity, or the semantic key information similarity may be obtained by performing weighted summation on the operation information similarity and the service information similarity according to a preset weight.
The method provided by the embodiment of the invention obtains more accurate semantic key information similarity by respectively calculating the operation type information similarity and the service type information similarity so as to improve the accuracy of accumulated sentence pattern screening.
Based on any of the above embodiments, in step 1212, the calculation of the semantic key information similarity may be implemented by the following method:
suppose that the seed sentence pattern is q 1 Any cumulative sentence pattern is q 2 Seed sentence pattern q 1 And cumulative sentence pattern q 2 Respectively K of semantic key information 1 ={K 11 ,K 12 And K 2 ={K 21 ,K 22 In which K is 11 And K 12 Are respectively seed sentence pattern q 1 Operation class information and service class information of, K 21 And K 22 Respectively, is an accumulated sentence pattern q 2 Operation class information and service class information.
Based on seed sentence pattern q 1 And accumulated sentence pattern q 2 Operation class information K of 11 And K 21 And obtaining the similarity M of the operation information 1 As shown in the following formula:
Figure BDA0002339146040000101
wherein, cover (K) 11 ,K 21 ) Representing a seed sentence pattern q 1 And accumulated sentence pattern q 2 The number of entities, count (K), overlapped in the operation type information of (2) 11 ,K 21 ) Representing a seed sentence pattern q 1 And accumulated sentence pattern q 2 The total number of entities of the operation class information.
Based on seed sentence pattern q 1 And accumulated sentence pattern q 2 Service class information K of 12 And K 22 Obtaining the similarity M of the service class information 2 As shown in the following formula:
Figure BDA0002339146040000102
in the formula, over (K) 12 ,K 22 ) Representing a seed sentence pattern q 1 And accumulated sentence pattern q 2 The number of entities, count (K), coinciding with each other in the service class information of (1) 12 ,K 22 ) Representing a seed sentence pattern q 1 And cumulative sentence pattern q 2 The total number of entities of the medium service class information.
Obtaining operation class information similarity M 1 Similarity M with service class information 2 Then, similarity M can be carried out on operation class information 1 Similarity M with service class information 2 Carrying out weighted summation to obtain semantic key information similarity M (q) 1 ,q 2 ) As shown in the following formula:
M(q 1 ,q 2 )=w*M 1 +(1-w)*M 2
wherein w is M 1 Corresponding weight, (1-w) is M 2 The corresponding weight.
Based on any of the above embodiments, step 1213 specifically includes: if the semantic feature vector similarity of the seed sentence pattern and any accumulated sentence pattern is within the preset vector similarity interval and the semantic key information similarity of the seed sentence pattern and the accumulated sentence pattern is greater than or equal to the preset information similarity threshold, the accumulated sentence pattern is used as a candidate sentence pattern.
Specifically, the preset vector similarity interval is a threshold interval set for the semantic feature vector similarity, if the semantic feature vector similarity is greater than the upper limit of the preset vector similarity interval, the seed sentence pattern is too similar to the accumulated sentence pattern, the accumulated sentence pattern is applied to the expansion of the knowledge point, the improvement effect on the quality of the knowledge base is not good, if the semantic feature vector similarity is less than the lower limit of the preset vector similarity interval, the semantics of the seed sentence pattern and the accumulated sentence pattern are basically irrelevant, the accumulated sentence pattern obviously does not correspond to the service range of the knowledge point, and only when the semantic feature vector similarity is within the preset vector similarity interval, that is, the semantic feature vector similarity is less than or equal to the upper limit of the preset vector similarity interval and is greater than or equal to the lower limit of the preset vector similarity interval, the accumulated sentence pattern can not only correspond to the service range of the knowledge point, but also can bring a better improvement effect on the quality of the knowledge base.
The preset information similarity threshold is a threshold set aiming at the semantic key information similarity, if the semantic key information similarity is larger than or equal to the preset information similarity threshold, the accumulated sentence pattern is similar to the semantics of the seed sentence pattern, otherwise, the accumulated sentence pattern is determined to be basically irrelevant to the semantics of the seed sentence pattern.
And combining the semantic feature vector similarity with the semantic key information similarity, and determining the accumulated sentence pattern as a candidate sentence pattern when the semantic feature vector similarity is within a preset vector similarity interval and the semantic key information similarity is greater than or equal to a preset information similarity threshold.
It should be noted that the preset vector similarity interval and the preset information similarity threshold in the embodiment of the present invention may be adjusted according to the number of candidate sentences that need to be acquired, for example, after completing one expansion of the knowledge base, there still exists a part of knowledge points that are not correspondingly expanded, the preset vector similarity interval corresponding to the part of knowledge points may be expanded, and the preset information similarity threshold corresponding to the part of knowledge points may be reduced, so as to increase the number of candidate sentences corresponding to the part of knowledge points.
The method provided by the embodiment of the invention can effectively ensure the correlation between the candidate sentence patterns and the seed sentence patterns which are subsequently used for expanding the knowledge base and the diversity of the expression modes of the candidate sentence patterns by screening the accumulative sentence patterns through the similarity of the semantic feature vectors and the similarity of the semantic key information, thereby improving the expansion quality of the knowledge base.
Generally, the sentence accumulation is performed in units of fields. Multiple vendors are generally included in a single domain, and there are differences between specific services of different vendors, which results in some sentences having the same intent in nature, but there are differences in terms of specific service nouns. If such patterns are applied directly to the expansion of the knowledge base, they may result in invalid patterns in the knowledge base. Based on any of the above embodiments, fig. 4 is a schematic flow chart of a service knowledge graph path-based knowledge point expansion method provided by the embodiment of the present invention, as shown in fig. 4, step 122 specifically includes:
step 1221, determining path similarity between the seed sentence pattern and the path of any candidate sentence pattern in the business knowledge graph of the corresponding domain.
Specifically, the path similarity is used to measure the similarity between the path of the sentence in the service knowledge graph in the corresponding domain and the path of any candidate sentence in the service knowledge graph in the same domain, and the higher the path similarity is, the higher the similarity between the key information entities and the relationship between the sentence in the seed and the accumulated sentence is, and the higher the probability that the accumulated sentence and the sentence in the seed correspond to the same knowledge point is.
Step 1222, if the path similarity is greater than the preset path similarity threshold and the seed sentence pattern is the same as the operation type information in the candidate sentence pattern, replacing the service type information in the candidate sentence pattern with the service type information in the seed sentence pattern.
Here, the preset path similarity threshold is a threshold preset for the path similarity, and if the path similarity is greater than the preset path similarity threshold, it is determined that the similarity between the two paths is high. Under the condition, if the operation type information in the seed sentence pattern is the same as the operation type information in the candidate sentence pattern and the seed sentence pattern is different from the service type information in the candidate sentence pattern, the service type information in the candidate sentence pattern can be directly replaced by the service type information in the seed sentence pattern, so that the problem of invalid multiplexing caused by directly adding the candidate sentence pattern of which the service type information does not belong to the service range corresponding to the current knowledge base to the knowledge base is avoided.
In step 1223, the candidate sentence pattern after replacement is added to the knowledge point.
Specifically, after the service information is replaced, the candidate sentence pattern is added to the knowledge point corresponding to the seed sentence pattern, and the multiplexing of the candidate sentence pattern can be completed, so as to expand the knowledge base.
The method provided by the embodiment of the invention ensures that the service class information of the candidate sentence patterns added to the knowledge base belongs to the service range corresponding to the current knowledge base through the service class information replacement, thereby avoiding the problem of invalid multiplexing and increasing the richness of the knowledge base.
Based on any of the above embodiments, step 1221 specifically includes: determining the path of the seed sentence pattern in the business knowledge graph of the corresponding field based on the business knowledge graph of the corresponding field and the semantic key information of the seed sentence pattern; determining the path of the candidate sentence pattern in the business knowledge graph of the corresponding field based on the business knowledge graph of the corresponding field and the semantic key information of any candidate sentence pattern; and determining the path similarity based on the seed sentence pattern and the path of the candidate sentence pattern in the service knowledge graph of the corresponding field.
Specifically, the semantic key information of the seed sentence pattern and the semantic key information of the candidate sentence pattern can be obtained by performing entity recognition on the sentence pattern text. On the basis of the known service knowledge graph of the corresponding field, each key information entity in the semantic key information can be correspondingly matched with each node in the service knowledge graph, and then the path of the sentence pattern in the service knowledge graph is obtained.
For example, a seed sentence pattern q 1 To "I want to look up my credit card's consumption record", candidate sentence pattern q 2 To help me see the bill of me's bank card, q 1 Semantic key information K 1 = query, credit card, bill, q 2 Semantic key information K 2 The statement can be obtained by combining the service knowledge map of the corresponding field with the condition that { inquiry, bank card and bill }, and the statement can be obtainedFormula q 1 And candidate sentence pattern q 2 Respectively, paths in the service knowledge graph. FIG. 5 is a schematic diagram of a service knowledge graph path according to an embodiment of the present invention, and in FIG. 5, a dotted line corresponds to q 1 The dotted line corresponds to q 2 The path of (2). Referring to FIG. 5, q is 1 And q is 2 Only the specific traffic (q) is distinguished by the path of (c) 1 Corresponding credit card, q 2 Corresponding to a bank card), q 1 And q is 2 The true intent of (a) is in principle to query the bill.
At q is 1 And q is 2 Is greater than a preset path similarity threshold, and q 1 And q is 2 Q may be equal to each other 2 In the sentence pattern, the 'bank card' is replaced by 'credit card', and the replaced candidate sentence pattern q 2 I.e. to help me see the bill of my credit card. Therefore, sentence output after corresponding words are replaced in the selected sentences is achieved, and the phenomenon that the judgment is inaccurate due to manual later confirmation is greatly reduced. The finally selected sentences replace the keywords A with the keywords B determined by input; for example, replace "help me see the bill of me bank card" with "help me see the bill of me credit card". Therefore, the problem of invalid multiplexing caused by directly adding candidate sentences of which the service type information does not belong to the service range corresponding to the current knowledge base to the knowledge base is avoided.
Based on any of the above embodiments, fig. 6 is a schematic flowchart of a knowledge base expansion method according to another embodiment of the present invention, as shown in fig. 6, the method includes:
step 610, determining a seed sentence pattern and an accumulated sentence pattern:
aiming at any knowledge base, determining knowledge points needing to be expanded in the knowledge base, taking any sentence pattern in a standard question and an extension question of the knowledge points as a seed sentence pattern, and taking a question sentence pattern accumulated in advance in the field corresponding to the knowledge base as an accumulated sentence pattern.
Step 620, calculation and measurement of semantic feature vectors:
based on semantic metric models such as LSTM and Bert, semantic feature vectors of the seed sentence pattern and any accumulated sentence pattern are determined, and the similarity between the seed sentence pattern and any accumulated sentence pattern is calculated to serve as the similarity of the semantic feature vectors.
If the similarity of the semantic feature vector of the sub sentence pattern and any accumulated sentence pattern is within the preset vector similarity interval, the accumulated sentence pattern is reserved, otherwise, the accumulated sentence pattern is deleted.
Step 630, calculation and measurement of semantic key information:
and determining semantic key information of the seed sentence pattern and any accumulated sentence pattern based on entity extraction models such as BERT-ATT, BERT-CRF and the like, and calculating the similarity between the seed sentence pattern and any accumulated sentence pattern to be used as the semantic key information similarity.
If the semantic key information similarity between the sub sentence pattern and any accumulated sentence pattern is greater than or equal to the preset information similarity threshold, the accumulated sentence pattern is used as a candidate sentence pattern, otherwise, the accumulated sentence pattern is deleted.
Through two rounds of screening in the steps 620 and 630, semantic relevance and expression mode diversity of the candidate sentence patterns are effectively guaranteed.
Step 640, replacing the service class information based on the path:
and respectively establishing paths of the seed sentence pattern and the candidate sentence pattern in the business knowledge graph of the corresponding field based on the business knowledge graph of the corresponding field and the semantic key information of the seed sentence pattern and any candidate sentence pattern.
And then, calculating the path similarity of the two paths, and if the path similarity is greater than a preset path similarity threshold value and the operation type information in the seed sentence pattern is the same as that in the candidate sentence pattern, replacing the service type information in the candidate sentence pattern with the service type information in the seed sentence pattern, thereby avoiding the problem of invalid multiplexing caused by directly adding the candidate sentence pattern of which the service type information does not belong to the service range corresponding to the current knowledge base to the knowledge base.
Step 650, knowledge point expansion:
and adding the candidate sentence pattern which completes the service class information replacement to the knowledge point, thereby completing the multiplexing of the candidate sentence pattern and realizing the expansion of the knowledge base.
Based on any of the above embodiments, fig. 7 is a schematic structural diagram of a knowledge base expansion apparatus according to an embodiment of the present invention, as shown in fig. 7, the apparatus includes a sentence pattern determination unit 710 and a sentence pattern expansion unit 720;
the sentence pattern determining unit 710 is configured to determine a seed sentence pattern corresponding to any knowledge point in a knowledge base, and a plurality of accumulated sentence patterns in a field corresponding to the knowledge base;
the sentence pattern expansion unit 720 is configured to expand the any knowledge point based on the semantic information of the seed sentence pattern and each accumulated sentence pattern, and/or the path of the seed sentence pattern and each accumulated sentence pattern in the service knowledge graph of the corresponding field.
The device provided by the embodiment of the invention automatically expands the knowledge base based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and/or the path in the business knowledge map of the corresponding field, thereby effectively saving the labor cost and the time cost, being capable of unbinding the sentence patterns with different intentions, avoiding the ambiguity between standard questions and improving the expansion quality and the expansion effect.
Based on any of the above embodiments, the sentence expansion unit 720 includes:
the semantic screening unit is used for selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the seed sentence patterns and the semantic information of each accumulated sentence pattern;
and the path expansion unit is used for expanding any knowledge point based on the paths of the seed sentence patterns and each candidate sentence pattern in the service knowledge graph of the corresponding field and the service class information of the seed sentence patterns and each candidate sentence pattern.
Based on any embodiment above, the semantic filtering unit includes:
the vector similarity determining subunit is used for determining the similarity of the semantic feature vectors of the seed sentence pattern and any accumulated sentence pattern based on the semantic feature vectors in the semantic information of the seed sentence pattern and the any accumulated sentence pattern;
and/or, an information similarity determining subunit, configured to determine, based on semantic key information in the semantic information of the seed sentence pattern and the any accumulated sentence pattern, a semantic key information similarity between the seed sentence pattern and the any accumulated sentence pattern;
and the screening subunit is used for selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the similarity of the semantic feature vectors and/or the similarity of the semantic key information of the seed sentence patterns and each accumulated sentence pattern.
Based on any of the above embodiments, the information similarity determining subunit includes:
the operation class similarity module is used for determining the operation class information similarity of the seed sentence pattern and any accumulated sentence pattern based on the operation class information in the semantic key information of the seed sentence pattern and the any accumulated sentence pattern;
the business class similarity module is used for determining the business class information similarity of the seed sentence pattern and any accumulated sentence pattern based on the business class information in the semantic key information of the seed sentence pattern and any accumulated sentence pattern;
and the semantic similarity module is used for determining the semantic key information similarity of the seed sentence pattern and any accumulated sentence pattern based on the operation class information similarity and the service class information similarity of the seed sentence pattern and any accumulated sentence pattern.
Based on any of the above embodiments, the screening subunit is specifically configured to:
and if the similarity of the semantic feature vector of the seed sentence pattern and any accumulated sentence pattern is within a preset vector similarity interval and the similarity of the semantic key information of the seed sentence pattern and any accumulated sentence pattern is greater than or equal to a preset information similarity threshold, taking any accumulated sentence pattern as the candidate sentence pattern.
Based on any one of the above embodiments, the path expansion unit includes:
a path similarity determining subunit, configured to determine a path similarity between the seed sentence pattern and a path of any candidate sentence pattern in the service knowledge graph in the corresponding field;
a replacing subunit, configured to replace, if the path similarity is greater than a preset path similarity threshold and the seed sentence pattern is the same as the operation type information in any candidate sentence pattern, the service type information in any candidate sentence pattern with the service type information in the seed sentence pattern;
and the expansion subunit is used for adding the any candidate sentence pattern after replacement to the any knowledge point.
Based on any of the embodiments described above, the path similarity determining subunit is specifically configured to:
determining a path of the seed sentence pattern in the business knowledge graph of the corresponding field based on the business knowledge graph of the corresponding field and the semantic key information of the seed sentence pattern;
determining a path of any candidate sentence pattern in the service knowledge graph of the corresponding field based on the service knowledge graph of the corresponding field and the semantic key information of any candidate sentence pattern;
and determining the path similarity based on the paths of the seed sentence patterns and any candidate sentence pattern in the service knowledge graph of the corresponding field.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 8, the electronic device may include: a processor (processor) 810, a communication Interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication Interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logical commands in the memory 830 to perform the following method: determining a seed sentence pattern corresponding to any knowledge point in a knowledge base and a plurality of accumulated sentence patterns in the corresponding field of the knowledge base; and expanding any knowledge point based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and/or the path of the seed sentence pattern and each accumulated sentence pattern in the service knowledge graph of the corresponding field.
In addition, the logic commands in the memory 830 can be implemented in the form of software functional units and stored in a computer readable storage medium when the logic commands are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of commands for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
Embodiments of the present invention further provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the method provided in the foregoing embodiments when executed by a processor, and the method includes: determining a seed sentence pattern corresponding to any knowledge point in a knowledge base and a plurality of accumulated sentence patterns in the corresponding field of the knowledge base; and expanding any knowledge point based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and/or the path of the seed sentence pattern and each accumulated sentence pattern in the service knowledge graph of the corresponding field.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on the understanding, the above technical solutions substantially or otherwise contributing to the prior art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several commands for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of expanding a knowledge base, comprising:
determining a seed sentence pattern corresponding to any knowledge point in a knowledge base and a plurality of accumulated sentence patterns in the corresponding field of the knowledge base;
and screening the accumulated sentence patterns for realizing the expansion of the corresponding knowledge points from all the accumulated sentence patterns based on the semantic information of the seed sentence pattern and each accumulated sentence pattern and the similarity between the seed sentence pattern and the path of each accumulated sentence pattern in the service knowledge graph of the corresponding field, and expanding any knowledge point, wherein the path reflects the key information entity and the relation of the sentence pattern in the service knowledge graph.
2. The method for expanding a knowledge base according to claim 1, wherein the expanding any knowledge point based on the semantic information of the sentence pattern and each of the accumulated sentence patterns and the path of the sentence pattern and each of the accumulated sentence patterns in the business knowledge graph of the corresponding domain specifically comprises:
selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the seed sentence patterns and the semantic information of each accumulated sentence pattern;
and expanding any knowledge point based on the paths of the seed sentence patterns and each candidate sentence pattern in the service knowledge graph of the corresponding field and the service class information of the seed sentence patterns and each candidate sentence pattern.
3. The method for expanding a knowledge base according to claim 2, wherein the selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the seed sentence pattern and the semantic information of each accumulated sentence pattern comprises:
determining the similarity of the semantic feature vectors of the seed sentence pattern and any accumulated sentence pattern based on the semantic feature vectors in the semantic information of the seed sentence pattern and the any accumulated sentence pattern;
and/or determining the similarity of the semantic key information of the seed sentence pattern and any accumulated sentence pattern based on the semantic key information in the semantic information of the seed sentence pattern and any accumulated sentence pattern, wherein the semantic key information is used for representing key information entities contained in the sentence pattern text;
and selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the semantic feature vector similarity and/or the semantic key information similarity of the seed sentence pattern and each accumulated sentence pattern.
4. The method for expanding a knowledge base according to claim 3, wherein the determining the semantic key information similarity between the seed sentence pattern and the any accumulated sentence pattern based on the semantic key information in the semantic information between the seed sentence pattern and the any accumulated sentence pattern specifically includes:
determining the similarity of the operation type information of the seed sentence pattern and any accumulated sentence pattern based on the operation type information in the semantic key information of the seed sentence pattern and the any accumulated sentence pattern, wherein the operation type information is an entity of an operation type contained in a sentence pattern text;
determining the similarity of the business class information of the seed sentence pattern and any accumulated sentence pattern based on the business class information in the semantic key information of the seed sentence pattern and the any accumulated sentence pattern;
and determining the semantic key information similarity of the seed sentence pattern and any accumulated sentence pattern based on the operation type information similarity and the service type information similarity of the seed sentence pattern and any accumulated sentence pattern.
5. The method for expanding a knowledge base according to claim 3, wherein the selecting a plurality of candidate sentence patterns from the plurality of accumulated sentence patterns based on the similarity of the semantic feature vector and the similarity of the semantic key information of the seed sentence pattern and each accumulated sentence pattern comprises:
and if the similarity of the semantic feature vector of the seed sentence pattern and any accumulated sentence pattern is within a preset vector similarity interval and the similarity of the semantic key information of the seed sentence pattern and any accumulated sentence pattern is greater than or equal to a preset information similarity threshold, taking any accumulated sentence pattern as the candidate sentence pattern.
6. The method of claim 2, wherein the expanding any knowledge point based on the path of the seed sentence pattern and each candidate sentence pattern in the service knowledge graph of the corresponding domain and the service class information of the seed sentence pattern and each candidate sentence pattern comprises:
determining the path similarity between the paths of the seed sentence pattern and any candidate sentence pattern in the service knowledge graph of the corresponding field;
if the path similarity is greater than a preset path similarity threshold value and the operation type information in the seed sentence pattern is the same as the operation type information in any candidate sentence pattern, replacing the service type information in any candidate sentence pattern with the service type information in the seed sentence pattern, wherein the operation type information is an entity of an operation type contained in a sentence pattern text;
and adding the any candidate sentence pattern after replacement to the any knowledge point.
7. The method for expanding a knowledge base according to claim 6, wherein the determining the path similarity between the seed sentence pattern and the path of any candidate sentence pattern in the business knowledge graph of the corresponding domain specifically comprises:
determining a path of the seed sentence pattern in the business knowledge graph of the corresponding field based on the business knowledge graph of the corresponding field and the semantic key information of the seed sentence pattern;
determining a path of any candidate sentence pattern in the service knowledge graph of the corresponding field based on the service knowledge graph of the corresponding field and the semantic key information of any candidate sentence pattern;
and determining the path similarity based on the paths of the seed sentence patterns and any candidate sentence pattern in the service knowledge graph of the corresponding field.
8. A knowledge base expansion apparatus, comprising:
a sentence pattern determining unit for determining seed sentence patterns corresponding to any knowledge point in the knowledge base and a plurality of accumulated sentence patterns in the corresponding field of the knowledge base;
and the sentence pattern expansion unit is used for screening the accumulated sentence patterns for realizing the expansion of the corresponding knowledge points from all the accumulated sentence patterns based on the semantic information of the seed sentence patterns and each accumulated sentence pattern and the similarity between the paths of the seed sentence patterns and each accumulated sentence pattern in the service knowledge graph of the corresponding field, and expanding any knowledge point, wherein the paths reflect the key information entities and the relations of the sentence patterns in the service knowledge graph.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the knowledge base expansion method according to any one of claims 1 to 7 are implemented by the processor when executing the program.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the knowledge base expansion method according to any one of claims 1 to 7.
CN201911368840.2A 2019-12-26 2019-12-26 Knowledge base expansion method and device, electronic equipment and storage medium Active CN111125379B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911368840.2A CN111125379B (en) 2019-12-26 2019-12-26 Knowledge base expansion method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911368840.2A CN111125379B (en) 2019-12-26 2019-12-26 Knowledge base expansion method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111125379A CN111125379A (en) 2020-05-08
CN111125379B true CN111125379B (en) 2022-12-06

Family

ID=70503369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911368840.2A Active CN111125379B (en) 2019-12-26 2019-12-26 Knowledge base expansion method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111125379B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113158688B (en) * 2021-05-11 2023-12-01 科大讯飞股份有限公司 Domain knowledge base construction method, device, equipment and storage medium
CN117743519A (en) * 2022-09-13 2024-03-22 北京沃东天骏信息技术有限公司 Question-answering knowledge base optimizing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295807A (en) * 2016-08-23 2017-01-04 上海智臻智能网络科技股份有限公司 A kind of method and device of information processing
CN109284363A (en) * 2018-12-03 2019-01-29 北京羽扇智信息科技有限公司 A kind of answering method, device, electronic equipment and storage medium
WO2019024162A1 (en) * 2017-08-04 2019-02-07 平安科技(深圳)有限公司 Intention obtaining method, electronic device, and computer-readable storage medium
CN109800879A (en) * 2018-12-21 2019-05-24 科大讯飞股份有限公司 Construction of knowledge base method and apparatus
CN110309509A (en) * 2019-06-28 2019-10-08 神思电子技术股份有限公司 A kind of semantic knowledge base construction method
CN110413755A (en) * 2019-07-25 2019-11-05 腾讯科技(深圳)有限公司 A kind of extending method, device and server, the storage medium in question and answer library

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10229195B2 (en) * 2017-06-22 2019-03-12 International Business Machines Corporation Relation extraction using co-training with distant supervision

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295807A (en) * 2016-08-23 2017-01-04 上海智臻智能网络科技股份有限公司 A kind of method and device of information processing
CN108764480A (en) * 2016-08-23 2018-11-06 上海智臻智能网络科技股份有限公司 A kind of system of information processing
WO2019024162A1 (en) * 2017-08-04 2019-02-07 平安科技(深圳)有限公司 Intention obtaining method, electronic device, and computer-readable storage medium
CN109284363A (en) * 2018-12-03 2019-01-29 北京羽扇智信息科技有限公司 A kind of answering method, device, electronic equipment and storage medium
CN109800879A (en) * 2018-12-21 2019-05-24 科大讯飞股份有限公司 Construction of knowledge base method and apparatus
CN110309509A (en) * 2019-06-28 2019-10-08 神思电子技术股份有限公司 A kind of semantic knowledge base construction method
CN110413755A (en) * 2019-07-25 2019-11-05 腾讯科技(深圳)有限公司 A kind of extending method, device and server, the storage medium in question and answer library

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于知识图谱的联合作战态势知识表示方法;王保魁等;《系统仿真学报》;20191130;第31卷(第11期);第2228-2237页 *

Also Published As

Publication number Publication date
CN111125379A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN106776544B (en) Character relation recognition method and device and word segmentation method
TWI729472B (en) Method, device and server for determining feature words
CN106776936B (en) Intelligent interaction method and system
CN109948710B (en) Micro-service identification method based on API similarity
CN109241528A (en) A kind of measurement of penalty prediction of result method, apparatus, equipment and storage medium
WO2021031825A1 (en) Network fraud identification method and device, computer device, and storage medium
CN111708869B (en) Processing method and device for man-machine conversation
CN109241525B (en) Keyword extraction method, device and system
CN111008272A (en) Knowledge graph-based question and answer method and device, computer equipment and storage medium
CN110222330B (en) Semantic recognition method and device, storage medium and computer equipment
CN108959474B (en) Entity relation extraction method
CN111160041B (en) Semantic understanding method and device, electronic equipment and storage medium
CN111125379B (en) Knowledge base expansion method and device, electronic equipment and storage medium
CN110517698B (en) Method, device and equipment for determining voiceprint model and storage medium
CN110619050A (en) Intention recognition method and equipment
CN111339248A (en) Data attribute filling method, device, equipment and computer readable storage medium
CN111274822A (en) Semantic matching method, device, equipment and storage medium
CN115062621A (en) Label extraction method and device, electronic equipment and storage medium
CN114328878A (en) Information reply method, device and medium
CN110929509B (en) Domain event trigger word clustering method based on louvain community discovery algorithm
CN111581347A (en) Sentence similarity matching method and device
CN116738956A (en) Prompt template generation method and device, computer equipment and storage medium
CN110647537A (en) Data searching method, device and storage medium
CN110442863B (en) Short text semantic similarity calculation method, system and medium thereof
CN111125374B (en) Knowledge base construction method and device, electronic equipment and storage medium

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