CN112417110A - Information processing method and device - Google Patents

Information processing method and device Download PDF

Info

Publication number
CN112417110A
CN112417110A CN202011163550.7A CN202011163550A CN112417110A CN 112417110 A CN112417110 A CN 112417110A CN 202011163550 A CN202011163550 A CN 202011163550A CN 112417110 A CN112417110 A CN 112417110A
Authority
CN
China
Prior art keywords
information
slot
slot information
response
statement
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
Application number
CN202011163550.7A
Other languages
Chinese (zh)
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202011163550.7A priority Critical patent/CN112417110A/en
Publication of CN112417110A publication Critical patent/CN112417110A/en
Pending legal-status Critical Current

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
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Abstract

The invention discloses an information processing method and device. The method is applied to a dialog system and comprises the following steps: firstly, receiving a statement input by a user, and analyzing to obtain the intention of the statement; then, acquiring a target slot to be filled by the given answer sentence according to the intention of the sentence; then, extracting information corresponding to the target slot from the received statement to obtain known slot information; and then, judging whether the known slot information corresponds to a determined response message or not according to the predetermined slot information hierarchy relationship and the corresponding relationship between the slot information of each level and the response message, and if so, generating a second statement for responding to the first statement according to the response message without inquiring unknown slot information in the target slot. Therefore, when the known slot information corresponds to a determined response message, the subsequent slot information filling process is not needed, and the unnecessary calculation process is avoided, so that the interaction between the man-machine is greatly simplified, and the response sentence can be given more quickly.

Description

Information processing method and device
Technical Field
The present invention relates to the field of computer information processing, and in particular, to an information processing method and apparatus.
Background
In the dialogue system, after the intention is recognized according to the input of the user, the dialogue is further advanced step by step according to the intention and a preset flow corresponding to the intention, and finally, an answer for solving the problem of the user is found. In this process, the user needs to input and operate the relevant information according to the preset flow, wherein each input and operation of the user is actually in the process of selecting a policy branch until an answer is obtained.
In the existing solution, the flow is the same for the same purpose every time, and the process is performed from beginning to end according to the decision tree. However, sometimes the user has given some specific information during input, or when a certain policy branch is reached, all subsequent branches correspond to the same answer, and it is tedious or too rigid to perform interaction step by step according to the decision tree.
Therefore, how to flexibly simplify the steps in the preset flow according to the user input and obtain the corresponding answer through as few interactions as possible is a technical problem to be solved by the current dialog system.
Disclosure of Invention
In view of the above problems, embodiments of the present invention provide a method, an apparatus, and a storage medium.
According to a first aspect of the embodiments of the present invention, an information processing method is applied to a dialog system, and the method includes: acquiring a first statement; determining an intent of the first sentence; determining a target slot to be filled by acquiring response information according to the intention; acquiring known slot information in the target slot from the first statement; and judging whether the known slot information corresponds to a determined response message or not according to the predetermined slot information hierarchical relationship and the corresponding relationship between the slot information of each level and the response message, and if so, generating a second statement for responding to the first statement according to the response message without inquiring unknown slot information in the target slot.
According to an embodiment of the present invention, the method further includes: judging whether the known slot information corresponds to a certain response message or not according to a predetermined slot information hierarchy relationship and a corresponding relationship between the slot information of each level and the response message, if not, further judging whether the known slot information corresponds to a limited number of certain response messages or not, if so, generating a second statement for responding to the first statement according to the limited number of certain response messages without inquiring unknown slot information in the target slot, if not, further determining the slot to be filled, and generating a third statement for inquiring the corresponding slot information according to the slot to be filled.
According to an embodiment of the present invention, acquiring known slot information in a target slot from a first statement includes: acquiring a machine learning model which corresponds to a target slot and is used for identifying slot information; and acquiring known slot information in the target slot from the first statement according to the machine learning model.
According to an embodiment of the present invention, acquiring known slot information in a target slot from a first statement includes: acquiring a relevant rule corresponding to the target slot and used for identifying slot information; and acquiring the known slot information in the target slot from the first statement according to the relevant rule.
According to an embodiment of the present invention, before determining whether the known slot information corresponds to a certain response information according to a predetermined slot information hierarchy and a correspondence between slot information of each level and response information, the method further includes: acquiring a hierarchical relationship between known slot information in a target slot and unknown slot information in the target slot according to a pre-established first database, wherein the hierarchical relationship is stored in a tree-shaped storage structure, and slot information stored by leaf nodes in the tree-shaped storage structure is final-stage slot information; acquiring response information corresponding to the information of the last-stage slot according to a pre-established second database; and determining the corresponding relation between the information of each level of slot and the response information according to the hierarchical relation and the response information corresponding to the information of the last level of slot.
According to an embodiment of the present invention, before obtaining the hierarchical relationship between the known slot information in the target slot and the unknown slot information in the target slot according to the pre-established first database, the method further includes: and creating and maintaining a first database according to all the slot information corresponding to the target slot and the hierarchical relationship among all the slot information.
According to an embodiment of the present invention, before obtaining the response information corresponding to the last-stage slot information according to the second database established in advance, the method further includes: and creating and maintaining a second database according to the final-stage slot information and the response information corresponding to the final-stage slot information.
According to an embodiment of the present invention, after determining the corresponding relationship between each level of slot information and the response information according to the hierarchical relationship and the response information corresponding to the last level of slot information, the method further includes: and after the first database or the second database is changed, correspondingly changing the hierarchical relationship of the slot information and the corresponding relationship between the slot information of each level and the response information.
According to an embodiment of the present invention, determining whether known slot information corresponds to a certain response information according to a predetermined slot information hierarchy relationship and a correspondence relationship between slot information of each level and response information includes: acquiring all response information corresponding to the known slot information according to a predetermined slot information hierarchical relationship and the corresponding relationship between the slot information of each level and the response information to obtain a response information set; and judging whether all the response messages in the information collection are the same or not, and if so, the known slot information corresponds to a determined response message.
According to a second aspect of the embodiments of the present invention, an information processing apparatus applied to a dialogue system, the apparatus includes: the first statement acquisition module is used for acquiring a first statement; an intent determination module to determine an intent of a first sentence; the slot determining module is used for determining a target slot to be filled by acquiring the response information according to the intention; the slot information acquisition module is used for acquiring known slot information in the target slot from the first statement; and the second statement generation module is used for judging whether the known slot information corresponds to a determined response message or not according to the predetermined slot information hierarchical relationship and the corresponding relationship between the slot information of each level and the response message, and if so, generating a second statement for responding to the first statement according to the response message without inquiring unknown slot information in the target slot.
According to an embodiment of the present invention, the second sentence generation module is further configured to determine whether the known slot information corresponds to a certain response information according to a predetermined slot information hierarchy and a corresponding relationship between each level of slot information and response information, if not, further determine whether the known slot information corresponds to a limited number of certain response information, if so, generate a second sentence for responding to the first sentence according to the limited number of certain response information without inquiring unknown slot information in the target slot, and if not, further determine a slot to be filled, and generate a third sentence for inquiring corresponding slot information according to the slot to be filled.
According to an embodiment of the present invention, a slot information acquiring module includes: the machine learning model acquisition submodule is used for establishing a machine learning model for identifying the slot information according to the target slot; and the slot information acquisition submodule is used for acquiring the known slot information in the target slot from the first statement according to the machine learning model.
According to an embodiment of the present invention, a slot information acquiring module includes: the rule obtaining submodule is used for obtaining relevant rules corresponding to the target slot and used for identifying the slot information; and acquiring the known slot information in the target slot from the first statement according to the relevant rule.
According to an embodiment of the present invention, the apparatus further includes: the hierarchical relation acquisition module is used for acquiring the hierarchical relation between the known slot information in the target slot and the unknown slot information in the target slot according to a pre-established first database, wherein the hierarchical relation is stored in a tree-shaped storage structure, and the slot information stored by leaf nodes in the tree-shaped storage structure is final-stage slot information; the response information acquisition module is used for acquiring response information corresponding to the information of the last-stage slot according to a pre-established second database; and the corresponding relation acquisition module is used for determining the corresponding relation between the information of each level of groove and the response information according to the hierarchical relation and the response information corresponding to the information of the last level of groove.
According to an embodiment of the present invention, the apparatus further includes: and the first database maintenance module is used for creating and maintaining a first database according to all the slot information corresponding to the target slot and the hierarchical relationship among all the slot information.
According to an embodiment of the present invention, the apparatus further includes: and the second database maintenance module is used for creating and maintaining a second database according to the final-stage slot information and the response information corresponding to the final-stage slot information.
According to an embodiment of the present invention, the apparatus further includes: and the data synchronization module is used for correspondingly changing the hierarchical relationship of the slot information and the corresponding relationship between the slot information of each level and the response information after the first database or the second database is changed.
According to an embodiment of the present invention, the second sentence generation module includes: the response information set acquisition submodule is used for acquiring all response information corresponding to the known slot information according to a predetermined slot information hierarchical relationship and the corresponding relationship between the slot information of each level and the response information to obtain a response information set; the response information comparison submodule is used for judging whether all response information in the information set is the same or not, and if the response information in the information set is the same, the known slot information corresponds to a determined response information.
The embodiment of the invention provides an information processing method and device, wherein the method comprises the following steps: firstly, receiving a statement input by a user, and analyzing to obtain the intention of the statement; then, acquiring a target slot to be filled by the given answer sentence according to the intention of the sentence; then, extracting information corresponding to the target slot from the received statement to obtain known slot information; and then, judging whether the known slot information corresponds to a determined response message or not according to the predetermined slot information hierarchy relationship and the corresponding relationship between the slot information of each level and the response message, and if so, generating a second statement for responding to the first statement according to the response message without inquiring unknown slot information in the target slot. Therefore, when the known slot information corresponds to a determined response message, the subsequent slot information filling process is not needed, and the unnecessary calculation process is avoided, so that the interaction between the man-machine is greatly simplified, and the response sentence can be given more quickly.
It is to be understood that the teachings of the present invention need not achieve all of the above-described benefits, but rather that specific embodiments may achieve specific technical results, and that other embodiments of the present invention may achieve benefits not mentioned above.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a schematic flow chart of an implementation of an information processing method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating intent analysis, hierarchical relationship of slot information, and corresponding relationship between slot information and response information of different levels according to an embodiment of the present invention
FIG. 3 is a flowchart illustrating a specific implementation of an application information processing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a structure of an information processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent 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 the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
Fig. 1 shows a flow of implementing an information processing method according to an embodiment of the present invention. Referring to fig. 1, the method is applied to a dialog system, and includes: operation 110, obtain a first statement; an operation 120 of determining an intent of the first sentence; an operation 130 of determining a target slot to be filled with according to the intention acquisition response information; operation 140, obtaining known slot information in the target slot from the first statement; in operation 150, it is determined whether the known slot information corresponds to a certain response message according to the predetermined slot information hierarchy and the corresponding relationship between the slot information of each level and the response message, and if so, a second sentence for responding to the first sentence is generated according to the response message without inquiring the unknown slot information in the target slot.
The information processing method of the embodiment of the invention is mainly applied to a dialogue system, and is particularly suitable for the dialogue system which needs to acquire all required information through a slot filling process and finally gives a response statement.
In operation 110, the first sentence mainly refers to a sentence inputted by the user in the man-machine conversation, and the sentence may be a question sentence for obtaining a certain information, for example, "how large my computer screen is"; it may also be a statement sentence to initiate a certain session, e.g., "I want to buy a new computer"; or an operation instruction instructing the robot to perform an operation, for example, "help me open a configuration option", or the like.
In operation 120, it is intended to refer to a representation of data that can be recognized by a computer that may represent the true meaning or purpose of a statement, and that may employ any suitable data structure. For example, the intent of "how big my computer screen" may be represented by the string "screen size".
Generally, a dialog system executes different processing branches according to different intentions, and the processing branch corresponding to each intention gradually acquires various information required for reaching the intention in steps.
Fig. 2 is a schematic diagram illustrating intention analysis, a hierarchical relationship of slot information, and a corresponding relationship between slot information of each level and response information in an application according to an embodiment of the present invention. As shown in fig. 2, each intention (e.g., intention 201, intention 202) corresponds to a different processing branch, and the slot information (e.g., slot information 2011, slot information 20111, slot information 201112, etc.) to be obtained on the processing branches and the corresponding answer sentence (e.g., answer a, answer B, answer C, etc.) finally form a tree structure. The process of obtaining the answer sentence is usually a process of determining the value of each level of slot information node one by one from the intention node and entering the corresponding next level branch until the leaf node obtains the answer.
For example, if the intent identified from received statement 20 is intent 201, then first determine a level of slot information, say slot information 2011; next, secondary slot information is determined, assuming slot information 20111; then determines the tertiary slot information, say slot information 201112; at this time, the corresponding answer sentence is obtained as "answer B".
In operation 130, the target slot to be filled by the response information is obtained, i.e. the slot information to be obtained in the process of obtaining the final response statement. Assuming that what is received is "how large my computer screen", the intention that the statement is intended to express is "screen size" obtained through semantic analysis, and according to a preset processing program, if the screen size of a certain computer is intended to be obtained, first-level slot information "product series", second-level slot information "product model", and third-level slot information "device number" need to be obtained, wherein "product series", "product model", and "device number" are target slots to be obtained by obtaining response information corresponding to the intention "screen size".
In operation 140, the step of obtaining the known slot information in the target slot mainly includes extracting the slot information corresponding to the target slot from the first statement, where the target slot from which the corresponding information is extracted is the known slot, and the extracted corresponding information is the known slot information in the target slot. If the received statement is that the my computer is the computer with the product series listed as the slot information 2011 and how large the my computer screen is, the slot information corresponding to the target slot "product series" is extracted as the slot information 2011, wherein the slot information 2011 is the known slot information in the target slot.
In operation 150, the hierarchical relationship of the slot information mainly refers to a tree-like data structure for describing the hierarchical relationship of inclusion, dependency, cause and effect among the slot information. As shown in fig. 2, the next level of the primary slot information 2012 is provided with a secondary slot information, i.e., slot information 20121; the next level of the secondary slot information 20121 is provided with two tertiary slot information: slot information 201211 and slot information 201212. The next-level slot information may be a next-level classification, a possible value, a different result generated under different conditions, and the like of the current-level slot information.
The response information mainly refers to a final answer or conclusion to be obtained to the intention, for example, the response information corresponding to the intention "screen size" is a specific value of the screen size, for example, "55 inches".
The correspondence between the slot information of each level and the response information mainly refers to the correspondence between the slot information of each level and the response information pointed finally, that is, the response information that may be determined by each slot information of each level of slot information.
As shown in the corresponding relationship between each level of slot information and response information in fig. 2, the response information corresponding to the slot information 2011 includes an answer a, an answer B, and an answer C; answer information corresponding to the slot information 2012 includes an answer D; the answer information corresponding to the slot information 20111 includes an answer a and an answer B; the response information corresponding to the slot information 201111 has answer a.
When the known slot information corresponds to a certain response information, such as the slot information 2012 and the slot information 201111 shown in fig. 2, the second sentence which responds to the first sentence can be given based on the certain response information without inquiring other slot information. For example, when the known slot information is slot information 2012, then the answer sentence containing answer information "answer D" can be given directly without reproducing the inquiry sentence to acquire the secondary slot information (e.g., slot information 20121) and the tertiary slot information (e.g., slot information 201211, slot information 201212).
Therefore, when the known slot information corresponds to a determined response message, the subsequent slot information filling process is not needed, and the unnecessary calculation process is avoided, so that the interaction between the man-machine is greatly simplified, and the response sentence can be given more quickly.
According to an embodiment of the present invention, the method further includes: judging whether the known slot information corresponds to a certain response message or not according to a predetermined slot information hierarchy relationship and a corresponding relationship between the slot information of each level and the response message, if not, further judging whether the known slot information corresponds to a limited number of certain response messages or not, if so, generating a second statement for responding to the first statement according to the limited number of certain response messages without inquiring unknown slot information in the target slot, if not, further determining the slot to be filled, and generating a third statement for inquiring the corresponding slot information according to the slot to be filled.
Sometimes, although the known slot information does not correspond to one specific response message, it may correspond to only a limited number of specific response messages, and in this case, the interaction process with the user may also be reduced by giving response sentences through these limited number of specific response messages.
In the present embodiment, when it is determined that the known slot information does not correspond to one specific response message, it is further determined whether the known slot information corresponds to a limited number of specific response messages, and if so, the second sentence is generated directly from the limited number of specific response messages.
For example, in the correspondence relationship between each level of slot information and response information shown in fig. 2, the response information corresponding to the first level of slot information 2011 includes answer a, answer B, and answer C. If it is determined that the corresponding answer information is limited, a third sentence containing all answers may be generated to list all the three answer information, for example, "if your product model is the slot information 20111 and the device number is the slot information 201111, the screen size is answer a; if the model of your product is the slot information 20111 and the device number is the slot information 201112, the screen size is answer B; if your product model is slot information 20112 and the device number is slot information 201121, the screen size is answer C. "thus, the second sentence for responding to the first sentence can be generated without inquiring the second-level slot information or the third-level slot information again, thereby greatly simplifying the interaction process with the user.
According to an embodiment of the present invention, acquiring known slot information in a target slot from a first statement includes: acquiring a machine learning model which corresponds to a target slot and is used for identifying slot information; and acquiring known slot information in the target slot from the first statement according to the machine learning model.
When obtaining known slot information in a target slot, information corresponding to the target slot can be found through semantic comparison. Therefore, in the present embodiment, the known slot information in the target slot is obtained more accurately and quickly from the received first sentence through training of a large amount of corpora mainly by using the machine learning model corresponding to the target slot.
According to an embodiment of the present invention, acquiring known slot information in a target slot from a first statement includes: acquiring a relevant rule corresponding to the target slot and used for identifying slot information; and acquiring the known slot information in the target slot from the first statement according to the relevant rule.
In some scenarios in practical applications, such as task-driven scenarios like ordering a meal or buying an airline ticket, the received sentence pattern is relatively fixed and does not change much. In this case, the slot information may be identified by previously defining a relevant rule, for example, a regular expression, corresponding to the target slot; then, the information corresponding to the target slot is obtained by using the rules, for example, the information corresponding to the target slot is determined by performing character string matching through a regular expression.
According to an embodiment of the present invention, before determining whether the known slot information corresponds to a certain response information according to a predetermined slot information hierarchy and a correspondence between slot information of each level and response information, the method further includes: acquiring a hierarchical relationship between known slot information in a target slot and unknown slot information in the target slot according to a pre-established first database, wherein the hierarchical relationship is stored in a tree-shaped storage structure, and slot information stored by leaf nodes in the tree-shaped storage structure is final-stage slot information; acquiring response information corresponding to the information of the last-stage slot according to a pre-established second database; and determining the corresponding relation between the information of each level of slot and the response information according to the hierarchical relation and the response information corresponding to the information of the last level of slot.
It should be noted that the database mentioned herein does not only refer to a database of a certain brand of knight, but also refers to a data storage medium in a broad sense. The first database is mainly used for storing information which can determine the hierarchical relationship between the slot information, such as commodity classification information, product model list, business processing logic and the like. In general, the response information is often associated with the last-level slot information, and the second database is a database for storing the correspondence between the last-level slot information and the response information, such as a device configuration information table or the like.
In the present embodiment, the hierarchical relationship between the known slot information in the target slot and the unknown slot information in the target slot is acquired from the first database established in advance, and the response information corresponding to the last-stage slot information is acquired from the second database established in advance, so that the hierarchical relationship between the slot information and the correspondence between the slot information of each stage and the response information can be determined, and it is determined whether or not the known slot information corresponds to one determined response information.
According to an embodiment of the present invention, before obtaining the hierarchical relationship between the known slot information in the target slot and the unknown slot information in the target slot according to the pre-established first database, the method further includes: and creating and maintaining a first database according to all the slot information corresponding to the target slot and the hierarchical relationship among all the slot information.
In the embodiment, the creation and maintenance of the first database are beneficial to conveniently and synchronously modifying the stratum level relationship among the slot information according to the change of the information such as product information, commodity classification information or business logic.
According to an embodiment of the present invention, before obtaining the response information corresponding to the last-stage slot information according to the second database established in advance, the method further includes: and creating and maintaining a second database according to the final-stage slot information and the response information corresponding to the final-stage slot information.
In this embodiment, the creation and maintenance of the second database facilitates the synchronous modification of the last-stage slot information and the response information corresponding to the last-stage slot information according to the change of the information such as the device information configuration table.
According to an embodiment of the present invention, after determining the corresponding relationship between each level of slot information and the response information according to the hierarchical relationship and the response information corresponding to the last level of slot information, the method further includes: and after the first database or the second database is changed, correspondingly changing the hierarchical relationship of the slot information and the corresponding relationship between the slot information of each level and the response information.
When determining whether the known slot information corresponds to a certain response information according to the predetermined slot information hierarchy relationship and the corresponding relationship between the slot information of each level and the response information according to an embodiment of the present invention, the determining includes: acquiring all response information corresponding to the known slot information according to a predetermined slot information hierarchical relationship and the corresponding relationship between the slot information of each level and the response information to obtain a response information set; and judging whether all the response messages in the information collection are the same or not, and if so, the known slot information corresponds to a determined response message.
Assuming that the known slot information is "slot information 2012", in the slot information hierarchy and the corresponding relationship between the slot information of each level and the response information as shown in fig. 2, the set of all the response information corresponding to the slot information 2012 is { "answer D", "answer D" }, at this time, it can be determined that the known slot information corresponds to a certain response information.
Fig. 3 shows a specific implementation flow of an application information processing method according to an embodiment of the present invention, including:
step 3010, receiving a sentence input by a user;
step 3020, identifying a user intention;
step 3030, analyzing the slot information required for reaching the user intention;
step 3040, obtaining the required slot information from the sentence input by the user according to the slot information required to reach the user's intention;
3050, judging whether the slot information corresponds to the determined response information according to the predetermined slot information hierarchical relationship and the corresponding relationship between the slot information of each level and the response information, if so, continuing step 3060, and if not, continuing step 3070;
step 3060, generating a response sentence containing the answer;
step 3070, a reply statement is generated that asks for more slot information.
It should be noted that the above is only an application example of the information processing method according to the embodiment of the present invention, and is not limiting to application scenarios and embodiments of the embodiment of the present invention. The implementer can adopt any applicable implementation mode according to implementation conditions, and can be applied to any applicable application scene.
Further, an embodiment of the present invention further provides an information processing apparatus, which is applied to a dialog system, and as shown in fig. 4, the apparatus 40 includes: a first sentence obtaining module 401, configured to obtain a first sentence; an intent determination module 402 for determining an intent of a first statement; a slot determining module 403, configured to determine a target slot to be filled with according to the intention acquisition response information; a slot information obtaining module 404, configured to obtain known slot information in the target slot from the first statement; a second sentence generating module 405, configured to determine whether the known slot information corresponds to a certain response information according to a predetermined slot information hierarchy and a corresponding relationship between each level of slot information and the response information, and if so, generate a second sentence for responding to the first sentence according to the response information without inquiring unknown slot information in the target slot.
According to an embodiment of the present invention, the second sentence generation module 405 is further configured to determine whether the known slot information corresponds to a certain response information according to a predetermined slot information hierarchy and a corresponding relationship between each level of slot information and response information, if not, further determine whether the known slot information corresponds to a limited number of certain response information, if so, generate a second sentence for responding to the first sentence according to the limited number of certain response information without inquiring unknown slot information in the target slot, and if not, further determine a slot to be filled, and generate a third sentence for inquiring corresponding slot information according to the slot to be filled.
According to an embodiment of the present invention, the slot information obtaining module 404 includes: the machine learning model acquisition submodule is used for establishing a machine learning model for identifying the slot information according to the target slot; and the slot information acquisition submodule is used for acquiring the known slot information in the target slot from the first statement according to the machine learning model.
According to an embodiment of the present invention, the slot information obtaining module 404 includes: the rule obtaining submodule is used for obtaining relevant rules corresponding to the target slot and used for identifying the slot information; and acquiring the known slot information in the target slot from the first statement according to the relevant rule.
According to an embodiment of the present invention, the apparatus 40 further includes: the hierarchical relation acquisition module is used for acquiring the hierarchical relation between the known slot information in the target slot and the unknown slot information in the target slot according to a pre-established first database, wherein the hierarchical relation is stored in a tree-shaped storage structure, and the slot information stored by leaf nodes in the tree-shaped storage structure is final-stage slot information; the response information acquisition module is used for acquiring response information corresponding to the information of the last-stage slot according to a pre-established second database; and the corresponding relation acquisition module is used for determining the corresponding relation between the information of each level of groove and the response information according to the hierarchical relation and the response information corresponding to the information of the last level of groove.
According to an embodiment of the present invention, the apparatus 40 further includes: and the first database maintenance module is used for creating and maintaining a first database according to all the slot information corresponding to the target slot and the hierarchical relationship among all the slot information.
According to an embodiment of the present invention, the apparatus 40 further includes: and the second database maintenance module is used for creating and maintaining a second database according to the final-stage slot information and the response information corresponding to the final-stage slot information.
According to an embodiment of the present invention, the apparatus 40 further includes: and the data synchronization module is used for correspondingly changing the hierarchical relationship of the slot information and the corresponding relationship between the slot information of each level and the response information after the first database or the second database is changed.
According to an embodiment of the present invention, the second sentence generation module 405 includes: the response information set acquisition submodule is used for acquiring all response information corresponding to the known slot information according to a predetermined slot information hierarchical relationship and the corresponding relationship between the slot information of each level and the response information to obtain a response information set; the response information comparison submodule is used for judging whether all response information in the information set is the same or not, and if the response information in the information set is the same, the known slot information corresponds to a determined response information.
Here, it should be noted that: the above description of the embodiments of the information processing apparatus is similar to the description of the embodiments of the method, and has similar beneficial effects to the embodiments of the method, and therefore, the detailed description is omitted. For technical details that have not been disclosed yet in the description of the embodiments of the information processing apparatus of the present invention, please refer to the description of the foregoing method embodiments of the present invention for understanding, and therefore, for brevity, will not be described again.
It should be noted that, in this document, 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 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 like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of a unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another device, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
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; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage medium, a Read Only Memory (ROM), a magnetic disk, and an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage medium, a ROM, a magnetic disk, an optical disk, or the like, which can store the program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An information processing method applied to a dialogue system, the method comprising:
acquiring a first statement;
determining an intent of the first sentence;
determining a target slot to be filled by acquiring response information according to the intention;
acquiring known slot information in the target slot from the first statement;
and judging whether the known slot information corresponds to a determined response message or not according to a predetermined slot information hierarchical relationship and a corresponding relationship between each level of slot information and the response message, if so, generating a second statement for responding to the first statement according to the response message without inquiring unknown slot information in the target slot.
2. The method of claim 1, further comprising:
judging whether the known slot information corresponds to a certain response message or not according to a predetermined slot information hierarchical relationship and a corresponding relationship between each level of slot information and response messages, if not, further judging whether the known slot information corresponds to a limited number of certain response messages or not, if so, generating a second statement for responding to a first statement according to the limited number of certain response messages without inquiring unknown slot information in the target slot, if not, further determining a slot to be filled, and generating a third statement for inquiring corresponding slot information according to the slot to be filled.
3. The method of claim 1, the obtaining known slot information in the target slot from the first statement, comprising:
acquiring a machine learning model which corresponds to the target slot and is used for identifying slot information;
and acquiring known slot information in the target slot from the first statement according to the machine learning model.
4. The method of claim 1, the obtaining known slot information in the target slot from the first statement, comprising:
acquiring a relevant rule corresponding to the target slot and used for identifying slot information;
and acquiring the known slot information in the target slot from the first statement according to the relevant rule.
5. The method according to claim 1, before determining whether the known slot information corresponds to a certain response information according to a predetermined slot information hierarchy and a correspondence between slot information of each level and response information, the method further comprises:
acquiring a hierarchical relationship between known slot information in the target slot and unknown slot information in the target slot according to a pre-established first database, wherein the hierarchical relationship is stored in a tree-shaped storage structure, and slot information stored by leaf nodes in the tree-shaped storage structure is final-stage slot information;
acquiring response information corresponding to the final-stage slot information according to a pre-established second database;
and determining the corresponding relation between the information of each level of slot and the response information according to the hierarchical relation and the response information corresponding to the information of the last level of slot.
6. The method of claim 5, prior to said obtaining a hierarchical relationship between known slot information in the target slot and unknown slot information in the target slot from a pre-established first database, the method further comprising:
and creating and maintaining the first database according to all the slot information corresponding to the target slot and the hierarchical relationship among all the slot information.
7. The method of claim 5, prior to said obtaining response information corresponding to said final slot information from a pre-established second database, further comprising:
and creating and maintaining the second database according to the final-stage slot information and the response information corresponding to the final-stage slot information.
8. The method of claim 5, after said determining a correspondence of each level of slot information to response information based on said hierarchical relationship and response information corresponding to said last level of slot information, further comprising:
and after the first database or the second database is changed, correspondingly changing the hierarchical relationship of the slot information and the corresponding relationship between the slot information of each level and the response information.
9. The method according to claim 1, wherein the determining whether the known slot information corresponds to a certain response information according to a predetermined slot information hierarchy relationship and a correspondence relationship between slot information of each level and response information comprises:
acquiring all response information corresponding to the known slot information according to a predetermined slot information hierarchical relationship and a corresponding relationship between the slot information of each level and the response information to obtain a response information set;
and judging whether all the response messages in the corresponding message set are the same, if so, the known slot message corresponds to a determined response message.
10. An information processing apparatus applied to a dialogue system, the apparatus comprising:
the first statement acquisition module is used for acquiring a first statement;
an intent determination module to determine an intent of the first sentence;
a slot determining module for determining a target slot to be filled with the response information acquired according to the intention;
a slot information obtaining module, configured to obtain known slot information in the target slot from the first statement;
and the second statement generation module is used for judging whether the known slot information corresponds to a determined response message or not according to a predetermined slot information hierarchical relationship and the corresponding relationship between each level of slot information and the response message, and if so, generating a second statement for responding to the first statement according to the response message without inquiring unknown slot information in the target slot.
CN202011163550.7A 2020-10-27 2020-10-27 Information processing method and device Pending CN112417110A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011163550.7A CN112417110A (en) 2020-10-27 2020-10-27 Information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011163550.7A CN112417110A (en) 2020-10-27 2020-10-27 Information processing method and device

Publications (1)

Publication Number Publication Date
CN112417110A true CN112417110A (en) 2021-02-26

Family

ID=74841936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011163550.7A Pending CN112417110A (en) 2020-10-27 2020-10-27 Information processing method and device

Country Status (1)

Country Link
CN (1) CN112417110A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018149326A1 (en) * 2017-02-16 2018-08-23 阿里巴巴集团控股有限公司 Natural language question answering method and apparatus, and server
CN108536818A (en) * 2018-04-08 2018-09-14 中国联合网络通信集团有限公司 The generation method and device of question and answer sentence
CN109101624A (en) * 2018-08-13 2018-12-28 腾讯科技(深圳)有限公司 Dialog process method, apparatus, electronic equipment and storage medium
CN109726387A (en) * 2017-10-31 2019-05-07 科沃斯商用机器人有限公司 Man-machine interaction method and system
CN110019725A (en) * 2017-12-22 2019-07-16 科沃斯商用机器人有限公司 Man-machine interaction method, system and its electronic equipment
CN110704641A (en) * 2019-10-11 2020-01-17 零犀(北京)科技有限公司 Ten-thousand-level intention classification method and device, storage medium and electronic equipment
CN111078844A (en) * 2018-10-18 2020-04-28 上海交通大学 Task-based dialog system and method for software crowdsourcing
CN111241260A (en) * 2020-01-08 2020-06-05 平安科技(深圳)有限公司 Data processing method, device and equipment based on human-computer interaction and storage medium
CN111460124A (en) * 2020-04-21 2020-07-28 文思海辉智科科技有限公司 Intelligent interaction method and device and robot
CN111798279A (en) * 2020-07-17 2020-10-20 苏州思必驰信息科技有限公司 Dialog-based user portrait generation method and apparatus

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018149326A1 (en) * 2017-02-16 2018-08-23 阿里巴巴集团控股有限公司 Natural language question answering method and apparatus, and server
CN109726387A (en) * 2017-10-31 2019-05-07 科沃斯商用机器人有限公司 Man-machine interaction method and system
CN110019725A (en) * 2017-12-22 2019-07-16 科沃斯商用机器人有限公司 Man-machine interaction method, system and its electronic equipment
CN108536818A (en) * 2018-04-08 2018-09-14 中国联合网络通信集团有限公司 The generation method and device of question and answer sentence
CN109101624A (en) * 2018-08-13 2018-12-28 腾讯科技(深圳)有限公司 Dialog process method, apparatus, electronic equipment and storage medium
CN111078844A (en) * 2018-10-18 2020-04-28 上海交通大学 Task-based dialog system and method for software crowdsourcing
CN110704641A (en) * 2019-10-11 2020-01-17 零犀(北京)科技有限公司 Ten-thousand-level intention classification method and device, storage medium and electronic equipment
CN111241260A (en) * 2020-01-08 2020-06-05 平安科技(深圳)有限公司 Data processing method, device and equipment based on human-computer interaction and storage medium
CN111460124A (en) * 2020-04-21 2020-07-28 文思海辉智科科技有限公司 Intelligent interaction method and device and robot
CN111798279A (en) * 2020-07-17 2020-10-20 苏州思必驰信息科技有限公司 Dialog-based user portrait generation method and apparatus

Similar Documents

Publication Publication Date Title
JP6719082B2 (en) Decision tree generation device, decision tree generation method, decision tree generation program, and question system
CN106776544B (en) Character relation recognition method and device and word segmentation method
JP2019159309A (en) Method and apparatus for determining speech interaction satisfaction
JP7008096B2 (en) Sentence recommendation method and equipment based on association interests
CN111831911A (en) Query information processing method and device, storage medium and electronic device
CN110515896B (en) Model resource management method, model file manufacturing method, device and system
CN113986241B (en) Configuration method and device of business rules based on knowledge graph
US10902188B2 (en) Cognitive clipboard
KR20210106372A (en) New category tag mining method and device, electronic device and computer-readable medium
CN108446398A (en) A kind of generation method and device of database
CN111143551A (en) Text preprocessing method, classification method, device and equipment
CN112328489A (en) Test case generation method and device, terminal equipment and storage medium
CN114945979A (en) Development of voice and other interactive applications
CN111652658A (en) Portrait fusion method, apparatus, electronic device and computer readable storage medium
JP2022088540A (en) Method for generating user interest image, device, electronic apparatus and storage medium
CN113934834A (en) Question matching method, device, equipment and storage medium
CN113157888A (en) Multi-knowledge-source-supporting query response method and device and electronic equipment
CN117217315A (en) Method and device for generating high-quality question-answer data by using large language model
CN112100355A (en) Intelligent interaction method, device and equipment
CN112417110A (en) Information processing method and device
KR20210099661A (en) Method and apparatus for generating annotated natural language phrases
CN116127013A (en) Personal sensitive information knowledge graph query method and device
US8090750B2 (en) Prompting of an end user with commands
CN110928995B (en) Interactive information processing method, device, equipment and storage medium
CN112905765A (en) Information processing method and device

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