CN113065053A - Knowledge base searching method and device, electronic equipment and storage medium - Google Patents
Knowledge base searching method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113065053A CN113065053A CN202110491050.4A CN202110491050A CN113065053A CN 113065053 A CN113065053 A CN 113065053A CN 202110491050 A CN202110491050 A CN 202110491050A CN 113065053 A CN113065053 A CN 113065053A
- Authority
- CN
- China
- Prior art keywords
- search
- path
- target
- search path
- label
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000012216 screening Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a knowledge base searching method, a knowledge base searching device, electronic equipment and a storage medium, which can determine a target searching path with the minimum searching turn in a knowledge base according to a target label matched with a target problem after receiving the target problem. Therefore, based on the invention, the answers of the questions can be searched in the knowledge base by the search path of the minimum search round, so that the answers can be quickly locked by the agent, and the experience of the customer is improved.
Description
Technical Field
The present invention relates to the field of software technologies, and in particular, to a method and an apparatus for searching a knowledge base, an electronic device, and a storage medium.
Background
The enterprise knowledge base is the key point of bank construction, and corresponding labels are often marked on knowledge according to the characteristics of the knowledge. Because the knowledge quantity is large and the knowledge points of the same label are not few, the seat can only lock the answer step by step according to the priority of the label, and the answer cannot be obtained quickly.
Disclosure of Invention
In view of the above, to solve the above problems, the present invention provides a method, an apparatus, an electronic device and a storage medium for searching a knowledge base, and the technical solution is as follows:
one aspect of the present invention provides a method for searching a knowledge base, including:
receiving a target problem to be processed, and determining a target label matched with the target problem;
determining a target search path with the minimum search round in a knowledge base for the target problem, wherein the target search path consists of a plurality of ordered tags, any two tags are different in type, and the target tag is located at the initial position in the target search path;
and searching the knowledge base in sequence according to the labels in the target search path so as to obtain answers matched with the target questions from the search results.
Preferably, the determining the target label matched with the target question includes:
extracting key words in the target problem;
and identifying the label of the keyword in the knowledge base, and taking the identified label as the target label.
Preferably, the determining that the target problem searches for the target search path with the smallest turn in the knowledge base includes:
calling a path index relation generated aiming at the knowledge base in advance, wherein the path index relation is used for indexing a second search path with the minimum search round corresponding to a first search path, the first search path is composed of a plurality of types with orders, any two types of the first search path are different, the second search path is composed of a plurality of labels with orders, and the type of each label is the same as the type of the same order in the first search path;
determining a matched first target search path according to the type of the target label;
and determining a second search path under the target first search path by using the path index relation so as to acquire the target search path from a determination result.
Preferably, the process of generating the path index relationship includes:
acquiring labels of knowledge in the knowledge base and types of the labels;
generating the first search path according to the type corresponding to the knowledge base;
selecting a label of the knowledge base under the type aiming at each type in the first search path so as to obtain a plurality of candidate second search paths corresponding to the first search path;
for each candidate second search path, calculating the search probability of the candidate second search path from a first label to a second label, wherein the first label and the second label belong to any two continuous labels in the second search path;
calculating the search round of the candidate second search path according to all the search probabilities corresponding to the candidate second search path;
and screening candidate second search paths with the minimum number of search rounds as the second search paths corresponding to the first search paths.
Preferably, the calculating the search round of the candidate second search path according to all the search probabilities corresponding to the candidate second search path includes:
aiming at each search probability corresponding to the candidate second search path, obtaining the turn corresponding to the search probability;
and calculating the search round of the candidate second search path according to each search probability and the corresponding round thereof.
Another aspect of the present invention provides a knowledge base searching apparatus, including:
the label determining module is used for receiving a target problem to be processed and determining a target label matched with the target problem;
a path determining module, configured to determine a target search path with a minimum search round in a knowledge base for the target problem, where the target search path is composed of a plurality of ordered tags, any two tags are of different types, and the target tag is located at a start position in the target search path;
and the answer searching module is used for sequentially searching the knowledge base according to the labels in the target searching path so as to obtain answers matched with the target questions from the searching results.
Preferably, the path determining module is specifically configured to:
calling a path index relation generated aiming at the knowledge base in advance, wherein the path index relation is used for indexing a second search path with the minimum search round corresponding to a first search path, the first search path is composed of a plurality of types with orders, any two types of the first search path are different, the second search path is composed of a plurality of labels with orders, and the type of each label is the same as the type of the same order in the first search path; determining a matched first target search path according to the type of the target label; and determining a second search path under the target first search path by using the path index relation so as to acquire the target search path from a determination result.
Preferably, the process of generating the path index relationship by the path determination module includes:
acquiring labels of knowledge in the knowledge base and types of the labels; generating the first search path according to the type corresponding to the knowledge base; selecting a label of the knowledge base under the type aiming at each type in the first search path so as to obtain a plurality of candidate second search paths corresponding to the first search path; for each candidate second search path, calculating the search probability of the candidate second search path from a first label to a second label, wherein the first label and the second label belong to any two continuous labels in the second search path; calculating the search round of the candidate second search path according to all the search probabilities corresponding to the candidate second search path; and screening candidate second search paths with the minimum number of search rounds as the second search paths corresponding to the first search paths.
Another aspect of the present invention provides an electronic device, including: at least one memory and at least one processor; the memory stores a program, and the processor calls the program stored in the memory, wherein the program is used for realizing any one knowledge base searching method.
In another aspect, the present invention provides a storage medium having stored thereon computer-executable instructions for performing any one of the methods of knowledge base searching.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a knowledge base searching method, a knowledge base searching device, electronic equipment and a storage medium, which can determine a target searching path with the minimum searching turn in a knowledge base according to a target label matched with a target problem after receiving the target problem. Therefore, based on the invention, the answers of the questions can be searched in the knowledge base by the search path of the minimum search round, so that the answers can be quickly locked by the agent, and the experience of the customer is improved.
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, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method of searching a knowledge base according to an embodiment of the present invention;
FIG. 2 is a flow chart of a portion of a method of knowledge base searching provided by an embodiment of the present invention;
FIG. 3 is a flow chart of another part of the knowledge base searching method provided by the embodiment of the invention;
fig. 4 is a schematic structural diagram of a knowledge base searching apparatus according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The embodiment of the invention provides a knowledge base searching method, the flow chart of which is shown in figure 1, and the method comprises the following steps:
s10, receiving the target question to be processed and determining the target label matched with the target question.
In the embodiment of the invention, the problem input by the client, namely the target problem, can be subjected to text processing, including word segmentation, stop word elimination and the like, so as to obtain a corresponding group of words, and then the target label matched with the target problem is formed by the labels matched with the words.
Of course, when the client inputs the target problem, the target problem can be in the form of text or voice, and for the target problem in the non-text form, the target problem can be converted into text first, and then the text processing is performed on the target problem. Taking the target question in the form of speech as an example, it can be converted into corresponding text using speech recognition techniques.
In addition, a dictionary of words and tags may be created in advance for a knowledge base, and tags of different words may be obtained from the dictionary. For example, the label of the word "cash dispenser" is "ATM".
In a specific implementation process, the step S10 "determining a target label matched with the target problem" may adopt the following steps:
extracting key words in the target problem; and identifying the label of the keyword in the knowledge base, and taking the identified label as a target label.
In the embodiment of the invention, because the label characteristics of partial words are not obvious, a keyword dictionary is set, namely, the words with labels are defined as the keywords. Furthermore, after the text processing is performed on the target question, for each obtained vocabulary, whether the vocabulary belongs to the keyword or not is determined by matching the keyword dictionary, and if the vocabulary belongs to the keyword, the label of the vocabulary is obtained.
Thus, the labels of all keywords in the target question constitute the target label of the target question.
And S20, determining a target search path with the minimum round of searching in the knowledge base by the target problem, wherein the target search path is composed of a plurality of ordered labels, any two labels are different in type, and the target label is located at the initial position in the target search path.
In the embodiment of the invention, for a knowledge base, the related tags can be divided into multiple dimensions, that is, each tag has a corresponding type, and at least one tag is provided under a certain type.
Therefore, when setting the search path, the type of the label is used as a dimension, and assuming that the types of the label in the knowledge base include A, B, C, D, the target search path can be composed of at most four nodes, one node is a label, and one node has a unique type. Assuming that the type of the target tag a is a, the target search path may be a (a) → b (b) → c (c) → d (d), i.e. the target search path indicates: firstly searching with the label a in A, then searching with the label B in B, then searching with the label C in C, and then searching with the label D in D.
In addition, for each piece of knowledge in the knowledge base, which consists of a topic and an answer, the topic is pre-labeled with at least one label. Therefore, in the embodiment of the present invention, when a certain tag in the target search path is used for searching, taking the target tag as an example, the target tag is essentially used for searching the knowledge of which the topic has the target tag in the knowledge base, and then performing subsequent search of other tags on the searched knowledge or selecting the answer of the target question from the searched knowledge.
In a specific implementation process, the step S20 "determining the target search path with the minimum round of searching for the target problem in the knowledge base" may adopt the following steps, and a flowchart of the method is shown in fig. 2:
s201, a path index relation generated aiming at a knowledge base in advance is called, the path index relation is used for indexing a second search path with the minimum search round corresponding to a first search path, the first search path is composed of a plurality of types with orders, any two types of the first search path are different, the second search path is composed of a plurality of labels with orders, and the type of each label is the same as the type of the same order in the first search path.
In the embodiment of the present invention, continuing to take the example that the types of labels in the knowledge base include A, B, C, D, the first search path is a link composed of types, for example, a begins with a, which is "a → B → C → D", "a → B → D → C", "a → C → D → B", "a → D → B → C", and "a → D → C → B", and of course, B begins, C begins, and D begins, which are not illustrated here.
It is obvious that a plurality of first search paths may be generated depending on the type of label involved in the knowledge base. For each first search path, since each type has at least one tag, one first search path corresponds to a plurality of second search paths.
Continuing with the example of the first search path "a → B → C → D", assuming that a contains two tags a and B1 and B2 in a and two tags C and D in C, the second search path corresponding to the first search path "a → B → C → D" includes "a (a) → B (B1) → C (C) → D (D)" and "a (a) → B (B2) → C (C) → D (D)". Furthermore, one of the two second search paths can be selected as the second search path for establishing the path index relationship according to the respective search turns of the two second search paths, and the second search path is assumed to be "a (a) → B (B1) → C (C) → D (D)", so that the second search path with the smallest search turn corresponding to the first search path "a → B → C → D" can be quickly identified as "a (a) → B (B1) → C (C) → D (D)", based on the path index relationship.
In the specific implementation process, the generation process of the path index relationship in step S201 includes the following steps, and a flowchart of the method is shown in fig. 3:
and S2011, acquiring the labels of the knowledge in the knowledge base and the types of the labels.
In the embodiment of the invention, the type of the label related to the knowledge base can be identified by counting the labels of the knowledge subjects in the knowledge base.
S2012, generating a first search path according to the type corresponding to the knowledge base.
In the embodiment of the invention, a plurality of first search paths are generated by sequencing the types related to the knowledge base. Continuing with the example that the type of label in the knowledge base includes A, B, C, D, the first search path includes a beginning of a, which are "a → B → C → D", "a → B → D → C", "a → C → B → D", "a → C → D → B", "a → D → B → C" and "a → D → C → B", and of course, the first search path also includes B beginning, C beginning and D beginning, and no example is given here.
S2013, aiming at each type in the first search path, selecting a label of the knowledge base under the type to obtain a plurality of candidate second search paths corresponding to the first search path.
In the embodiment of the present invention, continuing to take the first search path "a → B → C → D" as an example, assuming that a includes two tags B1 and B2 in a and B includes one tag C and D in C includes one tag D, the second search path corresponding to the first search path "a → B → C → D" includes "a (a) → B (B1) → C (C) → D (D)" and "a (a) → B (B2) → C (C) → D (D)", and these two second search paths are candidate second search paths.
S2014, for each candidate second search path, calculating a search probability of the candidate second search path from the first tag to the second tag, where the first tag and the second tag belong to any two consecutive tags in the second search path.
In the embodiment of the present invention, taking the candidate second search path "a (a)) → B (B1) → c (c)) → d (d)" as an example:
1) calculate the search probability for labels a through b 1: searching a knowledge set S1 with a topic having a label a and a quantity of knowledge C (a) from a knowledge base, further searching a knowledge set S2 with a topic having a label b1 and a quantity of knowledge C (ab) from a knowledge set S1, wherein the first round of probability of terminating the conversation is p1 ═ C (ab)/C (a);
2) calculate the search probability for labels b1 through c: searching a knowledge set S3 with a label c in the topic of the search in the knowledge sets S1-S2 (namely the rest of the knowledge set S1 after the removal of S2), wherein the number of the knowledge is C (abc), the probability of terminating the dialog in the second round, namely the search probability at this time is p2 ═ 1-p1 (C (abc)/C (a) -C (ab));
3) by analogy, the search probability p3 of labels c through d is calculated.
S2015, calculating a search round of the candidate second search path according to all search probabilities corresponding to the candidate second search path.
In the embodiment of the invention, for each search probability corresponding to the candidate second search path, the round corresponding to the search probability can be obtained, and then the search round of the candidate second search path is calculated according to each search probability and the round corresponding to the search probability.
Continuing with the example of the second search path candidate "a (a) → B (B1) → c (c)) → d (d))", the corresponding search round is e (t) ═ p1+2 × p2+3 × p 3.
S2015, screening candidate second search paths with the smallest number of search rounds as second search paths corresponding to the first search paths.
In the embodiment of the present invention, the first search path "a → B → C → D" and the candidate second search paths including "a (a) → B (B1) → C (C) → D (D)", and "a (a) → B (B2) → C (C) → D (D)", are continued to be taken as an example. The search turns of "a (a) → B (B1) → c (c) → d (d) and" a (a) → B (B2) → c (c) → d (d) ", are obtained by calculation according to the above steps. And comparing the sizes of the two search turns, and selecting a candidate second search path with the minimum search turn as a second search path required for generating the path index relationship.
S202, determining a matched first search path of the target according to the type of the target label.
In the embodiment of the present invention, it is continued to use the example that the types of the tags in the knowledge base include A, B, C, D. Assuming that the type to which the target tag belongs is a, the target first search path includes "a → B → C → D", "a → B → D → C", "a → C → B → D", "a → C → D → B", "a → D → B → C", and "a → D → C → B". Assuming that the type to which the target tag belongs includes a and B, the target first search path includes "a → B → C → D" and "a → B → D → C".
S203, determining a second search path under the target first search path by using the path index relation, so as to obtain the target search path from the determination result.
In the embodiment of the present invention, the target first search path includes "a → B → C → D" and "a → B → D → C" as an example. Based on the path index relationship generated in advance, "a → B → C → D" can index the second search path (denoted as search path 1) with the smallest search round, and similarly, "a → B → D → C" also has the second search path (denoted as search path 2) with the smallest search round, and further selects one with the smallest search round from the search paths 1 and 2 as the target search path.
And S30, sequentially searching the knowledge base according to the labels in the target search path to obtain answers matched with the target questions from the search results.
In the embodiment of the invention, according to the sequence of each label in the target search path, each label is matched with the associated knowledge in the knowledge base in sequence, namely, the search subject has the knowledge of the label, so that the agent obtains the answer of the target question from the searched knowledge.
According to the knowledge base searching method provided by the embodiment of the invention, after the target problem is received, the target searching path with the minimum searching turn in the knowledge base is determined according to the target label matched with the target problem, and as the target searching path consists of a plurality of ordered labels, the knowledge base is searched in sequence from the target label according to each label, and the answer of the target problem can be quickly obtained from the searching result. Therefore, based on the invention, the answers of the questions can be searched in the knowledge base by the search path of the minimum search round, so that the answers can be quickly locked by the agent, and the experience of the customer is improved.
Based on the knowledge base searching method provided by the above embodiment, an embodiment of the present invention correspondingly provides an apparatus for executing the above knowledge base searching method, where a schematic structural diagram of the apparatus is shown in fig. 4, and the apparatus includes:
the tag determining module 10 is configured to receive a target problem to be processed and determine a target tag matched with the target problem;
a path determining module 20, configured to determine a target search path with a minimum search round in a knowledge base for a target problem, where the target search path is composed of multiple ordered tags, any two tags are of different types, and the target tag is located at an initial position in the target search path;
and the answer searching module 30 is used for sequentially searching the knowledge base according to the labels in the target searching path so as to obtain answers matched with the target questions from the searching results.
Optionally, the process of determining the target tag matched with the target problem by the tag determining module 10 includes:
extracting key words in the target problem; and identifying the label of the keyword in the knowledge base, and taking the identified label as a target label.
Optionally, the path determining module 20 is specifically configured to:
calling a path index relation generated aiming at a knowledge base in advance, wherein the path index relation is used for indexing a second search path with the minimum search round corresponding to the first search path, the first search path is composed of a plurality of types with orders, any two types of the types are different, the second search path is composed of a plurality of labels with orders, and the type of each label is the same as the type of the same order in the first search path; determining a matched first target search path according to the type of the target label; and determining a second search path under the target first search path by using the path index relation so as to acquire the target search path from the determination result.
Optionally, the process of generating the path index relationship by the path determining module 20 includes:
acquiring a knowledge tag in a knowledge base and a type of the tag; generating a first search path according to the type corresponding to the knowledge base; selecting a label of the knowledge base under the type aiming at each type in the first search path so as to obtain a plurality of candidate second search paths corresponding to the first search path; for each candidate second search path, calculating the search probability of the candidate second search path from a first label to a second label, wherein the first label and the second label belong to any two continuous labels in the second search path; calculating the search round of the candidate second search path according to all the search probabilities corresponding to the candidate second search path; and screening the candidate second search path with the minimum number of search rounds as a second search path corresponding to the first search path.
Optionally, the process of calculating, by the path determining module 20, the search round of the candidate second search path according to all the search probabilities corresponding to the candidate second search path includes:
aiming at each search probability corresponding to the candidate second search path, obtaining the turn corresponding to the search probability; and calculating the search round of the candidate second search path according to each search probability and the corresponding round thereof.
The knowledge base searching device provided by the embodiment of the invention can determine the target searching path with the minimum searching turn in the knowledge base according to the target label matched with the target question after receiving the target question, and the target searching path consists of a plurality of ordered labels, so that the knowledge base is searched in sequence from the target label according to each label, and the answer of the target question can be quickly obtained from the searching result. Therefore, based on the invention, the answers of the questions can be searched in the knowledge base by the search path of the minimum search round, so that the answers can be quickly locked by the agent, and the experience of the customer is improved.
Based on the method for searching the knowledge base provided by the embodiment, the embodiment of the invention provides an electronic device, which comprises: at least one memory and at least one processor; the memory stores a program, and the processor calls the program stored in the memory, wherein the program is used for realizing the knowledge base searching method of the embodiment.
Based on the knowledge base searching method provided by the above embodiment, an embodiment of the present invention provides a storage medium, where computer-executable instructions are stored in the storage medium, and the computer-executable instructions are used to execute the knowledge base searching method according to the embodiment.
The above detailed description is provided for a knowledge base searching method, apparatus, electronic device and storage medium, and the specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the descriptions of the above embodiments are only used to help understanding the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include or include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method of knowledge base searching, the method comprising:
receiving a target problem to be processed, and determining a target label matched with the target problem;
determining a target search path with the minimum search round in a knowledge base for the target problem, wherein the target search path consists of a plurality of ordered tags, any two tags are different in type, and the target tag is located at the initial position in the target search path;
and searching the knowledge base in sequence according to the labels in the target search path so as to obtain answers matched with the target questions from the search results.
2. The method of claim 1, wherein the determining the target label matched by the target question comprises:
extracting key words in the target problem;
and identifying the label of the keyword in the knowledge base, and taking the identified label as the target label.
3. The method of claim 1, wherein the determining that the target problem searches for the target search path with the smallest turn in the knowledge base comprises:
calling a path index relation generated aiming at the knowledge base in advance, wherein the path index relation is used for indexing a second search path with the minimum search round corresponding to a first search path, the first search path is composed of a plurality of types with orders, any two types of the first search path are different, the second search path is composed of a plurality of labels with orders, and the type of each label is the same as the type of the same order in the first search path;
determining a matched first target search path according to the type of the target label;
and determining a second search path under the target first search path by using the path index relation so as to acquire the target search path from a determination result.
4. The method according to claim 3, wherein the generation process of the path index relationship comprises:
acquiring labels of knowledge in the knowledge base and types of the labels;
generating the first search path according to the type corresponding to the knowledge base;
selecting a label of the knowledge base under the type aiming at each type in the first search path so as to obtain a plurality of candidate second search paths corresponding to the first search path;
for each candidate second search path, calculating the search probability of the candidate second search path from a first label to a second label, wherein the first label and the second label belong to any two continuous labels in the second search path;
calculating the search round of the candidate second search path according to all the search probabilities corresponding to the candidate second search path;
and screening candidate second search paths with the minimum number of search rounds as the second search paths corresponding to the first search paths.
5. The method according to claim 4, wherein the calculating the search round of the candidate second search path according to the total search probability corresponding to the candidate second search path comprises:
aiming at each search probability corresponding to the candidate second search path, obtaining the turn corresponding to the search probability;
and calculating the search round of the candidate second search path according to each search probability and the corresponding round thereof.
6. A knowledge base search apparatus, the apparatus comprising:
the label determining module is used for receiving a target problem to be processed and determining a target label matched with the target problem;
a path determining module, configured to determine a target search path with a minimum search round in a knowledge base for the target problem, where the target search path is composed of a plurality of ordered tags, any two tags are of different types, and the target tag is located at a start position in the target search path;
and the answer searching module is used for sequentially searching the knowledge base according to the labels in the target searching path so as to obtain answers matched with the target questions from the searching results.
7. The apparatus of claim 6, wherein the path determination module is specifically configured to:
calling a path index relation generated aiming at the knowledge base in advance, wherein the path index relation is used for indexing a second search path with the minimum search round corresponding to a first search path, the first search path is composed of a plurality of types with orders, any two types of the first search path are different, the second search path is composed of a plurality of labels with orders, and the type of each label is the same as the type of the same order in the first search path; determining a matched first target search path according to the type of the target label; and determining a second search path under the target first search path by using the path index relation so as to acquire the target search path from a determination result.
8. The apparatus of claim 7, wherein the process of the path determination module generating the path index relationship comprises:
acquiring labels of knowledge in the knowledge base and types of the labels; generating the first search path according to the type corresponding to the knowledge base; selecting a label of the knowledge base under the type aiming at each type in the first search path so as to obtain a plurality of candidate second search paths corresponding to the first search path; for each candidate second search path, calculating the search probability of the candidate second search path from a first label to a second label, wherein the first label and the second label belong to any two continuous labels in the second search path; calculating the search round of the candidate second search path according to all the search probabilities corresponding to the candidate second search path; and screening candidate second search paths with the minimum number of search rounds as the second search paths corresponding to the first search paths.
9. An electronic device, comprising: at least one memory and at least one processor; the memory stores a program that the processor invokes, the program stored by the memory implementing the knowledge base search method of any one of claims 1-5.
10. A storage medium having stored thereon computer-executable instructions for performing the method of knowledge base searching according to any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110491050.4A CN113065053A (en) | 2021-05-06 | 2021-05-06 | Knowledge base searching method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110491050.4A CN113065053A (en) | 2021-05-06 | 2021-05-06 | Knowledge base searching method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113065053A true CN113065053A (en) | 2021-07-02 |
Family
ID=76568242
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110491050.4A Pending CN113065053A (en) | 2021-05-06 | 2021-05-06 | Knowledge base searching method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113065053A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106709040A (en) * | 2016-12-29 | 2017-05-24 | 北京奇虎科技有限公司 | Application search method and server |
CN110059224A (en) * | 2019-03-11 | 2019-07-26 | 深圳市橙子数字科技有限公司 | Video retrieval method, device, equipment and the storage medium of projector apparatus |
CN112328766A (en) * | 2020-11-10 | 2021-02-05 | 四川长虹电器股份有限公司 | Knowledge graph question-answering method and device based on path search |
CN112632225A (en) * | 2020-12-29 | 2021-04-09 | 天津汇智星源信息技术有限公司 | Semantic searching method and device based on case and event knowledge graph and electronic equipment |
-
2021
- 2021-05-06 CN CN202110491050.4A patent/CN113065053A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106709040A (en) * | 2016-12-29 | 2017-05-24 | 北京奇虎科技有限公司 | Application search method and server |
CN110059224A (en) * | 2019-03-11 | 2019-07-26 | 深圳市橙子数字科技有限公司 | Video retrieval method, device, equipment and the storage medium of projector apparatus |
CN112328766A (en) * | 2020-11-10 | 2021-02-05 | 四川长虹电器股份有限公司 | Knowledge graph question-answering method and device based on path search |
CN112632225A (en) * | 2020-12-29 | 2021-04-09 | 天津汇智星源信息技术有限公司 | Semantic searching method and device based on case and event knowledge graph and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107480143B (en) | Method and system for dialogue topic segmentation based on contextual relevance | |
KR102133825B1 (en) | Voice conversation method and system of enhanced word features | |
US11363146B2 (en) | Unsupervised method and system to automatically train a chatbot using domain conversations | |
CN112035599B (en) | Query method and device based on vertical search, computer equipment and storage medium | |
CN107239450B (en) | Method for processing natural language based on interactive context | |
CN110874401B (en) | Information processing method, model training method, device, terminal and computing equipment | |
CN112149386B (en) | Event extraction method, storage medium and server | |
CN113821605B (en) | Event extraction method | |
CN107305550A (en) | A kind of intelligent answer method and device | |
CN111813916B (en) | Intelligent question-answering method, device, computer equipment and medium | |
CN113656575B (en) | Training data generation method and device, electronic equipment and readable medium | |
CN111259126A (en) | Method, Apparatus, Equipment and Storage Medium for Similarity Calculation Based on Word Features | |
CN111190973A (en) | Method, device, equipment and storage medium for classifying statement forms | |
CN118095296B (en) | Semantic analysis method, system and medium based on knowledge graph | |
CN111125329B (en) | Text information screening method, device and equipment | |
CN113934834A (en) | A method, device, device and storage medium for question matching | |
CN113065053A (en) | Knowledge base searching method and device, electronic equipment and storage medium | |
Keraghel et al. | Data augmentation process to improve deep learning-based NER task in the automotive industry field | |
CN112597292A (en) | Question reply recommendation method and device, computer equipment and storage medium | |
CN111666770A (en) | Semantic matching method and device | |
CN118152537A (en) | Method and device for improving large model speech operation generation quality, storage medium and electronic equipment | |
JP3794597B2 (en) | Topic extraction method and topic extraction program recording medium | |
CN110647537A (en) | Data searching method, device and storage medium | |
CN113987135B (en) | A bank product problem retrieval method and device | |
CN111737425B (en) | Response method, device, server 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 |