CN106991112B - Information query method and device - Google Patents

Information query method and device Download PDF

Info

Publication number
CN106991112B
CN106991112B CN201610978817.5A CN201610978817A CN106991112B CN 106991112 B CN106991112 B CN 106991112B CN 201610978817 A CN201610978817 A CN 201610978817A CN 106991112 B CN106991112 B CN 106991112B
Authority
CN
China
Prior art keywords
information
question
answer
node
matched
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
CN201610978817.5A
Other languages
Chinese (zh)
Other versions
CN106991112A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201610978817.5A priority Critical patent/CN106991112B/en
Publication of CN106991112A publication Critical patent/CN106991112A/en
Application granted granted Critical
Publication of CN106991112B publication Critical patent/CN106991112B/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/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • 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/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/322Trees

Abstract

The application provides an information query method and device, wherein the method comprises the following steps: receiving an answer set which is sent by a user and provided according to the question set; matching in a preset information tree according to the answer set and the question set; when the leaf node is matched in the information tree, acquiring a question-answer pair and an information template represented by the leaf node; and writing the answers in the answer set and the matched answers represented by the leaf nodes into the matched fields to be filled of the information template, thereby generating a query result. By applying the embodiment of the application, the content of the query result is reduced, and the occupation of more storage space is avoided; compared with the prior art, the query result obtained by the dynamic assembly mode is simpler and has the personalized answer provided by the user, so that the readability is better, and the user experience is improved.

Description

Information query method and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to an information query method and apparatus.
Background
With the continuous development of internet technology, the number of users using the internet is increasing, and the users query the required information through the internet becomes more and more frequent.
In some specific scenarios, such as self-service of a website, a robot answering a question, etc., a user may send a user question to obtain a query result without resorting to manual customer service. Therefore, the workload of manual customer service can be greatly reduced.
In the prior art, different influence factors exist in the problem that different users need to inquire, and the results corresponding to different influence factors are different; therefore, the results corresponding to different influencing factors are usually listed one by one, and a static text (i.e., query result) is generated for the user to view. For example, the user inquires the account arrival time of the transfer, and due to the existence of many different influencing factors, such as transfer banks (different banks have different processing efficiency and cause different account arrival time), transfer initiation time (different transfer in service time and transfer in non-service time and cause different account arrival time), and the like; the following table answers to a static text are shown according to different influencing factors:
TABLE 1
Figure BDA0001147240280000011
As only 3 banks are listed in table 1 above, and banks existing in reality far exceed this number, if the service time of each bank is different, even some banks may have special account transfer time limitation, the whole static document becomes more and more complicated, for example, the content of "account transfer within 2 hours in service" is repeated in a large amount, which causes a problem of occupying a large storage space when storing the static document.
Moreover, answer information needed by the user is usually only a small part of the static file, and for the small part, the user needs to find out a small part of the needed content from the large segment of the content, so that the readability of the user is poor, and the experience is low.
Disclosure of Invention
The information query method and device provided by the application aim to solve the problems that in the prior art, due to the fact that query results are long, a large amount of storage space is occupied, the readability of a user is poor, and the user experience is low.
According to the information query method provided by the embodiment of the application, the method comprises the following steps:
receiving an answer set which is sent by a user and provided according to the question set; wherein the answer set consists of answers to at least one question;
matching in a preset information tree according to the answer set and the question set; wherein, the questions in the question set correspond to the answers in the answer set one by one, and the information tree is: the system comprises a node set which is composed of at least one node and has a tree-shaped hierarchical relationship, wherein a non-leaf node represents judgment information, the judgment information is a question, the non-leaf node is respectively associated with different child nodes thereof through different condition information, each condition information is an answer, the leaf node represents a question-answer pair and an information template, and the information template is provided with a field to be filled;
when the leaf node is matched in the information tree, acquiring a question-answer pair and an information template represented by the leaf node;
and writing the answers in the answer set and the matched answers represented by the leaf nodes into the matched fields to be filled of the information template, thereby generating a query result.
Optionally, matching is performed in a preset information tree according to the answer set and the question set, and specifically includes:
a1: determining a root node in the information tree as a current node;
a2: acquiring condition information associated with the current node and different child nodes of the current node under the condition that the judgment information represented by the current node is successfully matched with any problem in the problem set;
a3: under the condition that the answer corresponding to the successfully matched question is successfully matched with any condition information, acquiring a child node associated with the successfully matched condition information;
a4: determining the child node as the current node, and repeatedly executing A2 until the current node is a leaf node.
Optionally, writing the answer in the answer information set and the answer in the matched leaf node into the field to be filled of the matched information template, specifically including:
under the condition that the question in the question set is the same as the field to be filled in the matched information template, giving the answer corresponding to the question in the answer set to the field to be filled in;
and in the case that the question in the matched question-answer pair is the same as the field to be filled in the matched information template, giving the field to be filled with the answer in the matched question-answer pair.
Optionally, the method further includes:
and returning the query result to the user.
According to an embodiment of the present application, an information query apparatus is provided, the apparatus includes:
the receiving unit is used for receiving an answer set which is sent by a user and provided according to the question set; wherein the answer set consists of answers to at least one question;
the matching unit is used for matching in a preset information tree according to the answer set and the question set; wherein, the questions in the question set correspond to the answers in the answer set one by one, and the information tree is: the system comprises a node set which is composed of at least one node and has a tree-shaped hierarchical relationship, wherein a non-leaf node represents judgment information, the judgment information is a question, the non-leaf node is respectively associated with different child nodes thereof through different condition information, each condition information is an answer, the leaf node represents a question-answer pair and an information template, and the information template is provided with a field to be filled;
the acquisition unit is used for acquiring a question-answer pair and an information template represented by a leaf node when the leaf node is matched in the information tree;
and the generating unit writes the answers in the answer set and the answers represented by the matched leaf nodes into the fields to be filled of the matched information template so as to generate a query result.
Optionally, the matching unit specifically includes:
a determining subunit, configured to determine a root node in the information tree as a current node;
the first obtaining subunit is used for obtaining the condition information associated with the current node and different child nodes of the current node under the condition that the judgment information represented by the current node is successfully matched with any problem in the problem set;
the second obtaining subunit is used for obtaining the child node associated with the successfully matched condition information under the condition that the answer corresponding to the successfully matched question is successfully matched with any one of the condition information;
and the circulation control subunit determines the child node as a current node, and when the current node is a non-leaf node, the first acquisition subunit is repeatedly executed until the current node is a leaf node.
Optionally, the generating unit specifically includes:
the first writing subunit, under the condition that the question in the question set is the same as the field to be filled in the matched information template, endowing the answer corresponding to the question in the answer set to the field to be filled in;
the second writing subunit, under the condition that the question in the matched question-answer pair is the same as the field to be filled in the matched information template, endowing the matched answer in the question-answer pair to the field to be filled in;
and generating a subunit, and determining the information template after assignment as a query result.
Optionally, the apparatus further comprises:
and the return unit returns the query result to the user.
In the embodiment of the application, the data structure of the tree is used, the contents which are repeatedly used in the original static text are stored in the leaf nodes of the information tree in the form of the information template, and the answers are stored in the same leaf node in the form of the 'question-answer' pair. Therefore, the content repeatedly stored in the original query result only needs to be stored once, so that the occupation of more storage space is avoided; compared with the prior art, the query result obtained by the dynamic assembly mode is simple, and personalized answers are provided for the user, so that the readability is better, and the user experience is improved.
Drawings
Fig. 1 is a flowchart of an information query method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a user providing an answer to a question provided by the present application;
FIG. 3 is a schematic diagram of a tree structure provided herein;
FIG. 4 is a schematic diagram of the structure of an information tree provided herein;
FIG. 5 is a schematic diagram of an information template provided herein;
FIG. 6 is a schematic diagram of query results provided herein;
FIG. 7 is a schematic diagram of another query result provided herein;
fig. 8 is a hardware configuration diagram of a device in which an information query apparatus provided in the present application is located;
fig. 9 is a block diagram of an information query device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, a flowchart of an information query method provided in an embodiment of the present application is described in the embodiment from a server side, and the method may specifically include the following steps:
step 110: and receiving an answer set provided according to the question set and sent by the user.
In this embodiment, the answer set is composed of answers to at least one question.
For example, the following steps are carried out:
example 1, as shown in the schematic diagram of fig. 2, in which the user provides answers according to questions, the whole process is from (a) to (h), through multiple information interactions between the user and the application platform, and after (h), the answer set is sent to the server, and the answer set is formed by combining answers corresponding to each question, so that the server can receive the answer set.
(a) In the method, a user enters an autonomous service window, the user firstly inputs a content to be inquired, namely ' manual urgent transfer time ', and an application platform replies ' asking for a question whether you are account for now? "the user enters" not to check out "in the information input box and clicks the send button;
(b) in the application platform, the application platform receives and caches "not account for", and then replies "ask what type of transfer you use? "the user enters" bank "in the information input box and clicks the send button;
(c) in the application platform, the application platform receives and caches "bank", and then replies "ask for which bank specifically? "the user enters" Binresner Bank "in the information input box and clicks the send button;
(d) in (1), the application platform receives and caches "recruiter bank" and then replies "ask for what time do you transfer? ", the user enters" 2016-07-2514:24:30 "in the information entry box and clicks the send button;
(e) in this case, the application platform receives and caches "2016-07-2514: 24: 30" and then replies with "does the request then be time for the bank to service? ", the user enters" service time "in the information input box and clicks the send button;
(f) in the application platform, the application platform receives and caches the service time, and then replies with a reply of "how much do you ask for a transfer amount? ", the user enters" 3000 "in the information input box and clicks the send button;
(g) in (1), the application platform receives and caches "3000", and then replies "is the bank expected account time? ", the user enters" 2016-07-2516:24:30 "in the information entry box and clicks the send button;
(h) in the method, the application platform receives and caches '2016-07-2516: 24: 30', and then replies 'whether the query can be manually urgent or not for you, please wait for a little time';
and then, combining the cached answers by the application platform to generate an answer set.
The answer set in this example 1 may be 2016-07-2514:24:30, recruiter bank, outstanding, bank, time of service, 3000,2016-07-2516: 24: 30;
it is worth mentioning that the answers in the answer set correspond to the questions in the corresponding question set one to one.
Generally, since the content of the question is long, a corresponding field name is used instead of the question. For example, the problem set in this example 1 may be { TRANSFER _ TIME, TRANSFER _ BANK, TRANSFER _ STATE, TRANSFER _ TPYE, TRANSFER _ TIME _ TPYE, TRANSFER _ AMOUNT, TRANSFER _ PREDICT _ TIME }
Wherein, TRANSFER _ TIME represents that the TRANSFER TIME is the question, 2016-07-2514:24:30 is the answer of the question (TRANSFER TIME);
TRANSFER _ BANK indicates that the BANK noun is the question, and the advertiser BANK acts as the answer of the question (BANK noun);
the TRANSFER _ STATE indicates that the account-arriving situation is a question, and the account-not-arriving situation is an answer to the question (the account-arriving situation);
TRANSFER _ TPYE indicates that the TRANSFER type is a question, and the bank is the answer to the question (TRANSFER type);
TRANSFER _ TIME _ TPYE indicates whether a question is served at a service TIME, which is an answer to the question (TRANSFER TIME);
TRANSFER _ AMOUNT indicates that the TRANSFER AMOUNT is a question, 3000 is an answer to the question (TRANSFER AMOUNT);
TRANSFER _ PREDICT _ TIME indicates that the estimated tie-out TIME is the question, and 2016-07-2516:24:30 is the answer to the question (estimated tie-out TIME).
It is worth mentioning that in practical applications, the set sent by the user may also be composed in the form of "question-answer" pairs. In particular, it may be a combination of key-value pairs, i.e. the question corresponds to a key and the answer corresponds to a value.
Step 120: and matching in a preset information tree according to the answer set and the question set.
In this embodiment, after receiving the answer set sent by the user, the server may perform matching in a preset information tree in combination with the question set. As mentioned above, the questions in the question set and the answers in the answer set correspond to each other one to one.
The information tree is a tree-shaped data structure, and the data structure is a way for storing and organizing data in a computer.
The tree structure shown in fig. 3 is referred to as a tree because the structure looks like an inverted tree with the root up and the leaves down. The tree has the following characteristics:
nodes of different adjacent layers are associated through condition information, for example, a line associated with a node 1 and a node 2 in fig. 3 is a piece of condition information;
a child node has only one parent node, such as node 8 in fig. 3 has only one parent node 3;
nodes without parents are called root nodes, and the root nodes in a tree structure are only 1, such as the node 1 in fig. 3;
nodes without children are called leaf nodes, such as nodes 5, 6, 7, 8, …, or 14 in FIG. 3;
nodes with children nodes are called non-leaf nodes, such as nodes 1, 2, 3, or 4 in FIG. 3;
in this embodiment, the information tree may be pre-configured in the server,
specifically, the information tree is:
the system comprises a node set which is formed by at least one node and has a tree-shaped hierarchical relationship, wherein a non-leaf node represents judgment information, the judgment information is a question, the non-leaf node is respectively associated with different child nodes thereof through different condition information, each condition information is an answer, the leaf node represents a question-answer pair and an information template, and the information template is provided with a field to be filled.
In this embodiment, the step 120 may specifically include the following steps:
a1: determining a root node in the information tree as a current node;
a2: acquiring condition information associated with the current node and different child nodes of the current node under the condition that the judgment information represented by the current node is successfully matched with any problem in the problem set;
a3: under the condition that the answer corresponding to the successfully matched question is successfully matched with any condition information, acquiring a child node associated with the successfully matched condition information;
a4: determining the child node as the current node, and repeatedly executing A2 until the current node is a leaf node.
For example, the following steps are carried out:
example 2, continue with the answer set of 2016-07-2514:24:30, recruiter bank, outstanding, bank, time of service, 3000,2016-07-2516: 24:30 as shown in example 1 in step 110;
the problem set is { TRANSFER _ TIME, TRANSFER _ BANK, TRANSFER _ STATE, TRANSFER _ TPYE, TRANSFER _ TIME _ TPYE, TRANSFER _ AMOUNT, TRANSFER _ PREDICT _ TIME };
the steps A1-A3 are performed as follows according to the above mentioned answer set and question set matching in the information tree shown in FIG. 4:
executing A1, and determining the root node in the information tree, namely the node 1, as the current node;
executing a2, since the judgment information "TRANSFER _ STATE" in the node 1 is the same as "TRANSFER _ STATE" in the problem set, the condition information, i.e., "account already" and "account not yet", in the node 1 can be obtained;
executing a3, since the answer corresponding to the question "TRANSFER _ STATE" in the answer set is "not yet billed", which is the same as the condition information "not yet billed" in the node 1, further acquiring a child node associated with the condition information "not yet billed", that is, the node 3;
execution a4 determines node 3 to be the current node, since node 3 is a non-leaf node,
therefore, a2 is repeatedly executed, and since the judgment information "TRANSFER _ TPYE" in the node 3 is the same as "TRANSFER _ TPYE" in the problem set, the condition information of the node 3, that is, "balance of the payment instrument" and "bank" can be obtained;
executing a3, since the question "TRANSFER _ TPYE" corresponds to the answer "bank" in the answer set, and is the same as the condition information "bank" under the node 3, further acquiring a child node associated with the condition information "bank", that is, the node 5;
execution a4 determines node 5 to be the current node, since node 5 is a non-leaf node,
therefore, a2 is repeatedly executed, and since the judgment information "TRANSFER _ TIME" in the node 5 is the same as "TRANSFER _ TIME" in the problem set, the condition information of the node 5, i.e., "service TIME" and "non-service TIME", can be obtained;
executing a3, since the question "TRANSFER _ TIME _ TPYE" corresponds to the answer "service TIME" in the answer set, and is the same as the condition information "service TIME" under the node 5, further acquiring a child node associated with the condition information "service TIME", that is, the node 6;
execution a4 determines node 6 to be the current node, and since node 6 is a leaf node, the following step 130 may be performed.
Step 130: and when the leaf node is matched in the information tree, acquiring a question-answer pair represented by the leaf node and an information template.
In this embodiment, following the example in the previous step, it is assumed that the "question-answer" pair represented by the node 6 is "CAN _ ACCELERATE: fail", the "CAN _ ACCELERATE" represents a manual emergency, i.e., a question, and "fail" is an answer to the question "CAN _ ACCELERATE". The information template of the node 6 is shown in fig. 5.
In other specific embodiments, the information template of the node 6 may be an information template identifier, and the server queries the corresponding information template according to the information template identifier.
Step 140: and writing the answers of the answer set and the answers represented by the matched leaf nodes into the fields to be filled of the matched information template, thereby generating a query result.
In this embodiment, as shown in fig. 5, there are several fields to be filled in the information template, such as "TRANSFER _ BANK".
After acquiring the question-answer pairs and the information templates represented by the leaf nodes, the server also needs to fill the contents of the fields to be filled with answers from the answer sets and the question-answer pairs. And after all the fields to be filled are filled, a finally generated query result can be obtained. In this way, through a dynamic assembly mode, personalized answers provided by a plurality of users are provided in the query result, so that the query result of each user is different and personalized.
Specifically, the writing of the answer in the answer information set and the answer in the matched leaf node into the field to be filled in of the matched information template in the step 140 may specifically include:
under the condition that the question in the question set is the same as the field to be filled in the matched information template, giving the answer corresponding to the question in the answer set to the field to be filled in;
and in the case that the question in the matched question-answer pair is the same as the field to be filled in the matched information template, giving the field to be filled with the answer in the matched question-answer pair.
For example, the following steps are carried out:
example 3, the question set, answer set shown in example 2 in step 120, and the information template in node 6 and the "question-answer" pair "CAN _ ACCELERATE: not" of node 6 shown in fig. 5 are continued.
Since the field to be filled in the information template "TRANSFER _ TIME" is the same as the "TRANSFER _ TIME" in the question set, the question "TRANSFER _ TIME" may be assigned to the field to be filled in the information template "TRANSFER _ TIME" corresponding to the answer "2016-07-2514: 24: 30" in the answer set;
since the field to be filled in "TRANSFER _ BANK" in the information template is the same as "TRANSFER _ BANK" in the question set, the question "TRANSFER _ BANK" may be assigned to the field to be filled in "TRANSFER _ BANK" of the information template corresponding to the answer "recruiter BANK" in the answer set;
since the field to be filled in the information template "TRANSFER _ AMOUNT" is the same as the "TRANSFER _ AMOUNT" in the question set, the answer "3000" corresponding to the question "TRANSFER _ AMOUNT" in the answer set is given to the field to be filled in the information template "TRANSFER _ AMOUNT";
because the field to be filled in the information template "TRANSFER _ STATE" is the same as the field "TRANSFER _ STATE" in the question set, the question "TRANSFER _ STATE" is corresponding to the answer "not found" in the answer set and is given to the field to be filled in "TRANSFER _ STATE" of the information template;
since the field to be filled in the information template "TRANSFER _ PREDICT _ TIME" is the same as the "TRANSFER _ PREDICT _ TIME" in the question set, the question "TRANSFER _ PREDICT _ TIME" is corresponding to the answer "2016-07-2516: 24: 30" in the answer set, and is given to the field to be filled in the information template "TRANSFER _ PREDICT _ TIME";
since the field to be filled in the message template "CAN _ ACCELERATE" is the same as the "question-answer" centering question "CAN _ ACCELERATE", the answer "CAN not" corresponding to the question "CAN _ ACCELERATE" is given to the field to be filled in the message template "CAN _ ACCELERATE";
thus, the generated query result can be as shown in fig. 6, namely that "hello, you roll out to 3000 yuan of a tenderer bank in 2016-07-2514:24:30, the target is not paid out, the expected payment time 2016-07-2516:24:30 is not enough for manual emergency, and you are waiting for patience. "wherein, the bold text is the written answer.
In this embodiment, after the generating the query result, the method may further include:
and returning the query result to the user.
In the embodiment of the application, the data structure of the tree is used, the contents which are repeatedly used in the original static text are stored in the leaf nodes of the information tree in the form of the information template, and the answers are stored in the same leaf node in the form of node information. Therefore, the content repeatedly stored in the original query result only needs to be stored once, so that the occupation of more storage space is avoided; compared with the prior art, the query result obtained by the dynamic assembly mode is simple, and personalized answers are provided for the user, so that the readability is better, and the user experience is improved.
In practical applications, the information represented by the leaf node is not necessarily a fixed "question-answer" pair, for example, in the case of a user querying the account balance, the information represented by the leaf node finally matched may not be a fixed value, and the account balance is generally required to be queried in the corresponding system.
Therefore, under the condition that the information represented by the leaf nodes is query information, the query is carried out through the query information; the queried information is determined as the answer in the "question-answer" pair. For example, specific data is queried from a SQL query statement to a corresponding system, and the queried data is finally used as an answer in a "question-answer" pair.
In a specific embodiment of the present application, in the step 130, if a plurality of leaf nodes are matched, two information templates may also be used simultaneously, and the two generated query results are used after being spliced.
For example, fig. 7 is a schematic diagram of another query result, which is formed by splicing.
Corresponding to the embodiment of the information query method, the application also provides an embodiment of an information query device.
The embodiments of the information inquiry device can be respectively applied to the information inquiry equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the device where the software implementation is located as a logical means. From a hardware aspect, as shown in fig. 8, the hardware structure diagram of the device where the information query apparatus is located in the present application is shown, except for the processor, the network interface, the memory, and the nonvolatile memory shown in fig. 8, the device where the apparatus is located in the embodiment may also include other hardware according to the actual function of the information query, which is not described again.
Referring to fig. 9, a block diagram of an information query apparatus according to an embodiment of the present application is provided, where the embodiment is described from a server side, and the apparatus includes: a receiving unit 210, an input unit 220, a matching unit 230, and a generating unit 240.
The receiving unit 210 receives an answer set provided according to a question set and sent by a user; wherein the answer set consists of answers to at least one question;
a matching unit 220, which matches in a preset information tree according to the answer set and the question set; wherein, the questions in the question set correspond to the answers in the answer set one by one, and the information tree is: the system comprises a node set which is composed of at least one node and has a tree-shaped hierarchical relationship, wherein a non-leaf node represents judgment information, the judgment information is a question, the non-leaf node is respectively associated with different child nodes thereof through different condition information, each condition information is an answer, the leaf node represents a question-answer pair and an information template, and the information template is provided with a field to be filled;
an obtaining unit 230, configured to obtain a "question-answer" pair and an information template represented by a leaf node when the leaf node is matched in the information tree;
the generating unit 240 writes the answers in the answer set and the answers represented by the matched leaf nodes into the fields to be filled in of the matched information template, so as to generate a query result.
In an alternative implementation:
the matching unit 220 specifically includes:
a determining subunit, configured to determine a root node in the information tree as a current node;
the first obtaining subunit is used for obtaining the condition information associated with the current node and different child nodes of the current node under the condition that the judgment information represented by the current node is successfully matched with any problem in the problem set;
the second obtaining subunit is used for obtaining the child node associated with the successfully matched condition information under the condition that the answer corresponding to the successfully matched question is successfully matched with any one of the condition information;
and the circulation control subunit determines the child node as a current node, and when the current node is a non-leaf node, the first acquisition subunit is repeatedly executed until the current node is a leaf node.
In an alternative implementation:
the generating unit specifically includes:
the first writing subunit, under the condition that the question in the question set is the same as the field to be filled in the matched information template, endowing the answer corresponding to the question in the answer set to the field to be filled in;
the second writing subunit, under the condition that the question in the matched question-answer pair is the same as the field to be filled in the matched information template, endowing the matched answer in the question-answer pair to the field to be filled in;
and generating a subunit, and determining the information template after assignment as a query result.
In an alternative implementation:
the device further comprises:
and the return unit returns the query result to the user.
By the embodiment, the data structure of the tree is used, the contents which are repeatedly used in the original static text are stored in the leaf nodes of the information tree in the form of the information template, and the answers are stored in the same leaf node in the form of node information. Therefore, the content repeatedly stored in the original query result only needs to be stored once, so that the occupation of more storage space is avoided; compared with the prior art, the query result obtained by the dynamic assembly mode is simple, and personalized answers are provided for the user, so that the readability is better, and the user experience is improved.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. 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 place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (8)

1. An information query method, the method comprising:
receiving an answer set which is sent by a user and provided according to the question set; wherein the answer set consists of answers to at least one question;
matching in a preset information tree according to the answer set and the question set; wherein, the questions in the question set correspond to the answers in the answer set one by one, and the information tree is: the system comprises a node set which is composed of at least one node and has a tree-shaped hierarchical relationship, wherein a non-leaf node represents judgment information, the judgment information is a question, the non-leaf node is respectively associated with different child nodes thereof through different condition information, each condition information is an answer, the leaf node represents a question-answer pair and an information template, and the information template is provided with a field to be filled;
when the leaf nodes are matched in the information tree, if a plurality of leaf nodes are matched, acquiring all 'question-answer' pairs corresponding to all nodes on a path from a root node of the information tree represented by the plurality of leaf nodes to each leaf node of the plurality of leaf nodes and information templates respectively corresponding to all 'question-answer' pairs on each leaf node;
and writing the answers in the answer set and the answers represented by the matched leaf nodes into the fields to be filled of the matched information template, so as to generate a plurality of query results respectively corresponding to the matched leaf nodes, and splicing the query results to obtain spliced query results.
2. The method according to claim 1, wherein matching in a preset information tree is performed according to the answer set and the question set, and specifically comprises:
a1: determining a root node in the information tree as a current node;
a2: acquiring condition information associated with the current node and different child nodes of the current node under the condition that the judgment information represented by the current node is successfully matched with any problem in the problem set;
a3: under the condition that the answer corresponding to the successfully matched question is successfully matched with any condition information, acquiring a child node associated with the successfully matched condition information;
a4: determining the child node as the current node, and repeatedly executing A2 until the current node is a leaf node.
3. The method according to claim 1, wherein writing the answers in the answer information set and the matched answers in the leaf node into the field to be filled in of the matched information template specifically comprises:
under the condition that the question in the question set is the same as the field to be filled in the matched information template, giving the answer corresponding to the question in the answer set to the field to be filled in;
and in the case that the question in the matched question-answer pair is the same as the field to be filled in the matched information template, giving the field to be filled with the answer in the matched question-answer pair.
4. The method of claim 1, further comprising:
and returning the query result to the user.
5. An information query apparatus, comprising:
the receiving unit is used for receiving an answer set which is sent by a user and provided according to the question set; wherein the answer set consists of answers to at least one question;
the matching unit is used for matching in a preset information tree according to the answer set and the question set; wherein, the questions in the question set correspond to the answers in the answer set one by one, and the information tree is: the system comprises a node set which is composed of at least one node and has a tree-shaped hierarchical relationship, wherein a non-leaf node represents judgment information, the judgment information is a question, the non-leaf node is respectively associated with different child nodes thereof through different condition information, each condition information is an answer, the leaf node represents a question-answer pair and an information template, and the information template is provided with a field to be filled;
an obtaining unit, configured to, when a leaf node is matched in the information tree, if a plurality of leaf nodes are matched, obtain all "question-answer" pairs corresponding to all nodes on a path from a root node of the information tree represented by the leaf node to each of the plurality of leaf nodes, and information templates corresponding to all "question-answer" pairs on each of the leaf nodes, respectively;
and the generating unit writes the answers in the answer set and the answers represented by the matched leaf nodes into the fields to be filled of the matched information template, so as to generate a plurality of query results respectively corresponding to the matched leaf nodes, and splices the query results to obtain spliced query results.
6. The apparatus according to claim 5, wherein the matching unit specifically includes:
a determining subunit, configured to determine a root node in the information tree as a current node;
the first obtaining subunit is used for obtaining the condition information associated with the current node and different child nodes of the current node under the condition that the judgment information represented by the current node is successfully matched with any problem in the problem set;
the second obtaining subunit is used for obtaining the child node associated with the successfully matched condition information under the condition that the answer corresponding to the successfully matched question is successfully matched with any one of the condition information;
and the circulation control subunit determines the child node as a current node, and when the current node is a non-leaf node, the first acquisition subunit is repeatedly executed until the current node is a leaf node.
7. The apparatus according to claim 5, wherein the generating unit specifically includes:
the first writing subunit, under the condition that the question in the question set is the same as the field to be filled in the matched information template, endowing the answer corresponding to the question in the answer set to the field to be filled in;
the second writing subunit, under the condition that the question in the matched question-answer pair is the same as the field to be filled in the matched information template, endowing the matched answer in the question-answer pair to the field to be filled in;
and generating a subunit, and determining the information template after assignment as a query result.
8. The apparatus of claim 5, further comprising:
and the return unit returns the query result to the user.
CN201610978817.5A 2016-11-07 2016-11-07 Information query method and device Active CN106991112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610978817.5A CN106991112B (en) 2016-11-07 2016-11-07 Information query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610978817.5A CN106991112B (en) 2016-11-07 2016-11-07 Information query method and device

Publications (2)

Publication Number Publication Date
CN106991112A CN106991112A (en) 2017-07-28
CN106991112B true CN106991112B (en) 2021-05-25

Family

ID=59413737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610978817.5A Active CN106991112B (en) 2016-11-07 2016-11-07 Information query method and device

Country Status (1)

Country Link
CN (1) CN106991112B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992459A (en) * 2017-10-12 2018-05-04 如是科技(大连)有限公司 Resume generation method and device
CN108509424B (en) * 2018-04-09 2021-08-10 平安科技(深圳)有限公司 System information processing method, apparatus, computer device and storage medium
CN108763523B (en) * 2018-05-31 2023-04-18 康键信息技术(深圳)有限公司 Automatic session realization method, server and storage medium
CN109710747B (en) * 2019-01-16 2021-04-06 北京猎户星空科技有限公司 Information processing method and device and electronic equipment
CN110659302A (en) * 2019-09-30 2020-01-07 出门问问信息科技有限公司 Question-answer-to-heat updating method, device, system and storage medium
CN111858845A (en) * 2019-12-30 2020-10-30 北京嘀嘀无限科技发展有限公司 Configuration method and device of interactive response item, electronic equipment and storage medium
CN112035623B (en) * 2020-09-11 2023-08-04 杭州海康威视数字技术股份有限公司 Intelligent question-answering method and device, electronic equipment and storage medium
CN115509996A (en) * 2022-11-10 2022-12-23 北京搜狐新动力信息技术有限公司 Tree structure node retrieval method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011133551A3 (en) * 2010-04-21 2012-02-02 Global Market Insite, Inc. Reducing the dissimilarity between a first multivariate data set and a second multivariate data set
CN103593412A (en) * 2013-10-24 2014-02-19 北京京东尚科信息技术有限公司 Tree-structure-based question answering system and method
CN105095272A (en) * 2014-05-12 2015-11-25 阿里巴巴集团控股有限公司 Question and answer processing method, device and system based on image recognition
CN105912846A (en) * 2016-04-07 2016-08-31 南京小网科技有限责任公司 Intelligent medical aid decision making system on basis of cloud computing technique and medical knowledge base technique

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101137166B (en) * 2007-01-04 2010-12-08 中兴通讯股份有限公司 On-site maintenance system of wireless network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011133551A3 (en) * 2010-04-21 2012-02-02 Global Market Insite, Inc. Reducing the dissimilarity between a first multivariate data set and a second multivariate data set
CN103593412A (en) * 2013-10-24 2014-02-19 北京京东尚科信息技术有限公司 Tree-structure-based question answering system and method
CN105095272A (en) * 2014-05-12 2015-11-25 阿里巴巴集团控股有限公司 Question and answer processing method, device and system based on image recognition
CN105912846A (en) * 2016-04-07 2016-08-31 南京小网科技有限责任公司 Intelligent medical aid decision making system on basis of cloud computing technique and medical knowledge base technique

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向课程教学的中文问答系统研究;陈志峰 朱巧明;《第三届全国信息检索与内容安全学术会议论文集》;20080724;全文 *

Also Published As

Publication number Publication date
CN106991112A (en) 2017-07-28

Similar Documents

Publication Publication Date Title
CN106991112B (en) Information query method and device
US9299041B2 (en) Obtaining data from unstructured data for a structured data collection
CN108282527B (en) Generate the distributed system and method for Service Instance
US10198477B2 (en) System for automatic classification and routing
CN105808437B (en) Automatic test method and system based on test case data sheet
US11256733B2 (en) User support with integrated conversational user interfaces and social question answering
US10915823B2 (en) System for automatic classification and routing
US11663255B2 (en) Automatic collaboration between distinct responsive devices
US10375005B2 (en) Dynamic hashtag ordering based on projected interest
CN109831540A (en) Distributed storage method, device, electronic equipment and storage medium
US20230095180A1 (en) Question answering information completion using machine reading comprehension-based process
US11461317B2 (en) Method, apparatus, system, device, and storage medium for answering knowledge questions
CN105279168A (en) Data query method supporting natural language, open platform, and user terminal
US9514407B1 (en) Question generation in knowledge-based authentication from activity logs
US9965812B2 (en) Generating a supplemental description of an entity
CN111523030B (en) Newspaper disc information recommendation method and device and computer readable storage medium
CN113408254A (en) Page form information filling method, device, equipment and readable medium
CN110209780A (en) A kind of question template generation method, device, server and storage medium
CN110515929B (en) Book display method, computing device and storage medium
US11227224B2 (en) Information and data collaboration among multiple artificial intelligence (AI) systems
US20230177277A1 (en) Contextual dialogue framework over dynamic tables
US11810022B2 (en) Contact center call volume prediction
CN110096508B (en) Service configuration method and device, service data acquisition method and electronic equipment
US10949470B2 (en) Topic clustering to generate formulations
CN106682221B (en) Question-answer interaction response method and device and question-answer system

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant