Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It will be understood that the terms "first," "second," and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another element. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of this disclosure.
Fig. 1 is an application environment diagram of a man-machine interaction method according to an embodiment of the present application, as shown in fig. 1, in the application environment, the application environment includes a client 110 and a server 120.
The server 120 may be an independent physical server, or may be a server cluster formed by a plurality of physical servers, or may be a cloud server that provides basic cloud computing services such as a cloud server, a cloud database, cloud storage, and CDN.
The client 110 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The client 110 and the server 120 may be connected through a network, and the present application is not limited herein.
As shown in fig. 2, in one embodiment, a man-machine interaction method is provided, and this embodiment is mainly illustrated by applying the method to the server 120 in fig. 1. A man-machine interaction method can comprise the following steps:
step S202, determining the current intention information of the client according to the man-machine interaction information.
In the embodiment of the application, human-computer interaction (HCI) refers to an information exchange process between a person and a computer for completing a determination task in a certain interaction mode by using a certain dialogue language between the person and the computer. The man-machine interaction information may be in a form that can be identified by a computer, such as voice, text, and pictures, but is not limited thereto. For convenience of description, the embodiment of the application is illustrated in the form of text of man-machine interaction information.
In the embodiment of the present application, the intention information refers to information capable of expressing the purpose or the requirement of the client, the current intention information of the client refers to intention information in the process of the client interacting with the server 120, for example, after the server 120 receives the interaction information "i want to order" sent by the client, natural language semantic understanding can be performed on the interaction information, and then the current intention information of the client in the current interaction information of the client is identified, for example, the current intention information of the client in the current interaction information "i want to order" is "order". Where natural language processing (NLP, natural Language Processing) is a technique that uses natural language to communicate with a computer.
According to the embodiment of the application, the current human-computer interaction information is subjected to natural language understanding, and the intention information is judged to be contained in the current human-computer interaction information, so that the current intention information of the client can be determined from the current human-computer interaction information. The current man-machine interaction information comprises intention information, namely the current man-machine interaction information only comprises intention information, such as 'I want to order air ticket'; the current man-machine interaction information can also contain intention information and entity information, such as 'i want to order an air ticket to Beijing'. The server 120 may directly understand the current man-machine interaction information in natural language and then determine the current intention information of the client.
Step S204, judging whether the current man-machine interaction information contains all entity information matched with the current intention information of the client according to a preset business relation model; the relation model comprises corresponding relation information of intention information and entity information.
In the embodiment of the application, the preset business relation model is a preset set containing the corresponding relation between the intention and the entity, such as a knowledge graph, which is an important component of the artificial intelligence technology and is a knowledge base with semantic processing and information interconnection and intercommunication capabilities. The correspondence information between the intention information and the entity information may be represented in the form of a relationship chain as shown in fig. 9, but the form of expression of the relationship chain is not limited to that shown in fig. 9. Entity information is the content of thing information which is objectively existed and used for providing response when completing intention, and can be people, things, abstract concepts or relations, such as time, place and name; for example, it is intended to "query weather", its corresponding entity is "place, time", and its corresponding entity is "departure place, destination, time, flight information, etc. for" ticket booking ".
In the embodiment of the application, a preset business relation model is taken as a transaction type knowledge graph for illustration, and the steps for constructing the transaction type knowledge graph are approximately as follows: firstly, analyzing business knowledge content in the vertical field, and extracting and constructing an intention model according to the application of the business in a real scene; such as inquiring weather, booking air tickets; extracting corresponding entity information according to the application of the business in the real scene according to the constructed intention model, wherein the entities are object information contents which are objectively existed in the reaction and are needed to be provided when the intention purpose is completed, and can be people, matters, things, abstract concepts or relations, such as time, place and name; secondly, according to the situation that the business objectively exists in a real scene, each entity is associated with a corresponding intention to be configured into a relation chain corresponding to the intention and the entity, as shown in fig. 9; the entity corresponding to the intention of inquiring weather is the place and time, and the entity corresponding to the intention of booking air tickets is the departure place, the destination, the time, the flight information and the like; after the problem intention asked by the client can be identified through the corresponding relation chain of the collocation intention and the entity, the entity conditions required for completing the problem are known, namely the real problem intention of the client can be completed only after the information collection of the entity conditions is completed. And finally, importing the corresponding relation chain information of the intention and the entity into the knowledge graph to form a transactional knowledge graph in a triplet shape.
In the embodiment of the application, the current man-machine interaction information refers to the information of the current man-machine interaction process in progress, for example, the man-machine interaction information 'I want to order' sent by a client is received, and other man-machine interaction information sent by the client is not received within a certain time, and the 'I want to order' is the current man-machine interaction information; for another example, the human-computer interaction information "i want to order air ticket" sent by the client is received, and the human-computer interaction information "Beijing to Shanghai", "i want to order air ticket" and "Beijing to Shanghai" sent by the client are all the current human-computer interaction information within a certain time.
In the embodiment of the present application, the determining whether the current man-machine interaction information contains all entity information matched with the current intention information of the client according to the preset business relation model includes:
s402, assigning entity information corresponding to the client current intention information in the client current intention information and the current man-machine interaction information into the corresponding relation information.
S404, judging whether all entity information corresponding to the current intention information of the client in the corresponding relation information is assigned.
If yes, S406, determining that all entity information matched with the current intention information of the client is contained in the current man-machine interaction information.
If not, S408, determining the entity information which is not assigned and corresponds to the current intention information of the client in the corresponding relation as the missing entity information.
For example, when the current man-machine interaction information is "ticket i want to order Beijing", the server 120 recognizes that the current intention information of the client is "ticket order" by understanding natural language, and the entity information corresponding to the current intention information of the client is purposefully "Beijing", and the entity information corresponding to the ticket order also includes "departure place, time, flight information, etc., the current man-machine interaction information" ticket i want to order Beijing "does not include all the entity information matched with the current intention information of the client, wherein the entity information of" departure place, time, flight information, etc "is missing entity information.
Step S206, if not, acquiring the missing entity information through a preset mode.
In the embodiment of the application, the preset mode can be a mode of asking questions directly to clients or a mode obtained from other man-machine interaction information, wherein the other man-machine interaction information can be the above man-machine interaction information or related man-machine interaction information; the above man-machine interaction information refers to interaction information of a previous man-machine interaction process, and intention information in the previous man-machine interaction process is the same as current intention information of a client, for example, the above man-machine interaction information is "i want to order an air ticket to Beijing in tomorrow", the current man-machine interaction information is "i want to order an air ticket to go to the sea", and the above man-machine interaction information and the current man-machine interaction information have common intention information "order air ticket".
In the embodiment of the application, after the current intention information of the client and all entity information corresponding to the current intention information of the client are determined, corresponding actions can be taken according to the intention information to acquire feedback information corresponding to the current intention of the client, and the feedback information is sent to the client to complete the current man-machine interaction process.
According to the man-machine interaction method provided by the embodiment of the application, whether the current man-machine interaction information contains all entity information matched with the current intention information of the client is judged, and then the missing entity information is acquired, so that inaccurate answers to the problem which cannot be clearly described at one time can be avoided, the man-machine interaction efficiency and the man-machine interaction effect are effectively improved, and a better experience effect is provided for the client.
In one embodiment, as shown in fig. 3, when the current man-machine interaction information includes only entity information, step S202 may specifically include the following steps:
step S302, judging whether the above man-machine interaction information exists, wherein the above man-machine interaction information is the interaction information of the upper man-machine interaction process;
and step S304, if yes, determining the current intention information of the client from the man-machine interaction information.
In the embodiment of the present application, the server 120 may determine whether the above man-machine interaction information exists by storing and memorizing the history man-machine interaction information and then searching the stored and memorized information. The previous-round human-computer interaction process refers to a previous-round human-computer interaction process adjacent to the current human-computer interaction process. The time interval between the time of the human-computer interaction process and the time of the current human-computer interaction process is not limited, and preferably, the smaller the time interval is, the better the human-computer interaction accuracy is. For example, the current man-machine interaction information is "beijing" which only includes entity information "beijing", and if the server 120 determines that the above interaction information "i want to query for the Shanghai weather" exists, it may determine that the client's current intention information is "query weather".
According to the man-machine interaction method provided by the embodiment of the application, through storing and memorizing the historical man-machine interaction information and referring to the intention information from the above man-machine interaction information, the accuracy of determining the current intention information of the client can be improved, and the influence on the man-machine interaction efficiency or the influence on the experience emotion of the client caused by the fact that the current intention of the client cannot be determined in time is avoided.
In one embodiment, as shown in fig. 5, when the preset mode is a mode of asking questions directly to the client, step S206 may specifically include the following steps:
step S502, guiding information is sent to a client, and the missing entity information is obtained from the information input by the client; the guidance information is used for prompting the client to provide the missing entity information.
In the embodiment of the application, the prompt problem of each entity condition is set in the configuration relation chain of the constructed object type knowledge graph, which can be used for asking the entity condition missing by the user and providing the missing entity information by the user when the extraction of the entity condition information in the relation chain corresponding to the intention of the problem is not completed after the real intention is obtained by the client problem is understood. For example, when receiving the interactive information "i want to order an air ticket to Beijing" sent by the client 110, determining entity information lacking in the current man-machine interactive information through step S204, then sending a question to the client according to the prompt questions of setting each entity condition in the configuration relation chain in the preset relation model, for example, "please ask for where the departure place is", "please ask for departure time", the embodiment of the application does not limit the content of specific guiding information, and guiding information may be asking for missing entity information one by one, or may be asking for missing entity information multiple times at the same time, for example, "please ask for departure place and departure time", the embodiment of the application does not limit. In addition, with respect to entity information related to a place, for example, "departure place", entity information corresponding to the "departure place" may also be acquired by locating a location where a client is currently located.
According to the human-computer interaction method provided by the embodiment of the application, the prompt problem of each entity condition is set in the preset relation model, so that after judging the entity information lacking in the current human-computer interaction information, the server 120 can send the guide information to the client 110 according to the prompt problem so as to guide the lacking entity information provided by the client, thereby being capable of quickly and accurately judging the current intention of the client, avoiding inaccurate feedback of the current human-computer interaction information which does not contain all the entity information corresponding to the current intention information of the client, avoiding the need of giving all the entity information corresponding to the current intention information of the client in the current human-computer interaction information at one time, effectively improving the human-computer interaction efficiency and the human-computer interaction effect, and providing better experience effect for the client.
In one embodiment, as shown in fig. 6, when the preset mode is a mode obtained from the above interaction information, step S206 may specifically include the following steps:
step S602, judging whether the above man-machine interaction information exists, wherein the above man-machine interaction information is the interaction information of the upper man-machine interaction process;
step S604, if the intention information in the above man-machine interaction information is the same as the intention information in the current man-machine interaction information, acquiring the missing entity information through the above man-machine interaction information.
In the embodiment of the present application, the server 120 may determine whether the above man-machine interaction information exists by storing and memorizing the history man-machine interaction information and then searching the stored and memorized information. The previous-round human-computer interaction process refers to a previous-round human-computer interaction process adjacent to the current human-computer interaction process. The time interval between the time of the human-computer interaction process and the time of the current human-computer interaction process is not limited, and preferably, the smaller the time interval is, the better the human-computer interaction accuracy is. For example, if the current man-machine interaction information is "that is open to the sky", and if the server 120 determines that the above interaction information "i want to query for the weather in the ocean" exists, it may be determined in step S304 that the current intention information of the client is also "query for the weather" from the above man-machine interaction information, the intention information in the current man-machine interaction information is the same as the intention information in the above man-machine interaction information, the current man-machine interaction information includes that the entity information corresponding to the current intention information of the client is time-open to the sky ", and the missing entity information is a place, the server 120 obtains the missing entity information from the above man-machine interaction information: the place- "Shanghai".
According to the man-machine interaction method provided by the embodiment of the application, the missing entity information is obtained from the man-machine interaction information, so that the influence on the accuracy of feedback information corresponding to the current intention information of the client due to the fact that the entity information corresponding to the current intention information of the client is incomplete can be avoided, and the man-machine interaction effect is improved; meanwhile, the server 120 can rapidly acquire all entity information corresponding to the current intention information of the client, so that the efficiency of man-machine interaction is improved.
In one embodiment, as shown in fig. 7, when the preset pattern is a pattern obtained from the related interaction information, step S206 may specifically include the following steps:
step S702, judging whether related man-machine interaction information exists, wherein the related man-machine interaction information is interaction information in the process of the man-machine interaction of the previous round;
step S704, if yes, and the intention information in the related man-machine interaction information is associated with the intention information in the current man-machine interaction information in the preset business relationship model, acquiring the missing entity information through the related man-machine interaction information.
In the embodiment of the application, the related man-machine interaction information can be the interaction information of the previous man-machine interaction process or the interaction information of the previous man-machine interaction process, and the embodiment of the application is not limited.
In the embodiment of the present application, the preset relationship model is provided with corresponding association information between the disagreeable graphs, where the corresponding association information between the disagreeable graphs may be represented in the form of a relationship chain, as shown in fig. 10. Rules that disagree with the association between graph information embodiments of the present application are not limited, and preferably, for example, the intent information "query weather" and the intent information "order ticket" may be associated by the entity information "place" and the entity information "time". For example, when receiving the current man-machine interaction information "i want to order an air ticket in open world" sent by the client, if it is determined that the relevant man-machine interaction information "how weather in Beijing in open world" exists, "the server 120 may obtain entity information corresponding to the current intention information" order an air ticket "of the client from the relevant man-machine interaction information" how weather in Beijing in open world: the place- "Beijing". In addition, the "Beijing" can be further determined to correspond to the "departure place" or the "destination" of the entity information by locating the place information of the current position of the client, so that the accuracy of the man-machine interaction information is further improved.
In the embodiment of the present application, the server 120 may also send feedback information corresponding to other intention information associated by the location to the client 110, for example, other intention information associated by the location "beijing" may also include "beijing tourist attraction", "beijing distinctive snack" and the like.
According to the man-machine interaction method provided by the embodiment of the application, through setting the corresponding association information between the disagreement graphs in the relationship model, the missing entity information can be obtained from the related man-machine interaction information, meanwhile, the feedback information corresponding to the associated intention can be sent to the client according to the corresponding association information between the disagreement graphs, so that the man-machine interaction efficiency is improved, and more convenient use experience is brought to the client.
In another embodiment of the present application, the preset pattern may be a combination of two or more of asking the customer directly, retrieving from related man-machine interaction information, and/or retrieving from the above man-machine interaction information. The embodiment of the application does not limit the combination type, the combination sequence of the preset modes and the execution sequence of different preset modes in the combination. For example, when related man-machine interaction information and/or the above man-machine interaction information exist, and all missing entity information corresponding to the current intention information of the client cannot be obtained from the related man-machine interaction information and/or the above man-machine interaction information, the missing entity information can be obtained through a mode of asking questions to the client, and the man-machine interaction efficiency is effectively improved.
In another embodiment of the present application, there is provided a human-computer interaction system including: the client and the server are connected to each other,
the client is used for receiving interactive information input by a client, sending the interactive information to the server and receiving feedback information sent by the server;
the server is configured to receive the interaction information sent by a client, perform the steps of the man-machine interaction method according to any one of claims 1 to 7, and send the feedback information to the client.
In the embodiment of the present application, the client 110 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The information input by the client can also be language, text and pictures, etc., and the embodiment of the application is not limited.
In the embodiment of the present application, the client 110 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The information input by the client can also be language, text and pictures, etc., and the embodiment of the application is not limited.
In the embodiment of the present application, the server 120 may be an independent physical server, or may be a server cluster formed by a plurality of physical servers, or may be a cloud server that provides basic cloud computing services such as a cloud server, a cloud database, a cloud storage, a CDN, and the like. The client 110 and the server 120 may be connected through a network, and the specific connection manner of the client 110 and the server is not limited in the embodiment of the present application.
In the embodiment of the application, the feedback information refers to information corresponding to the current intention information of the client, for example, the current intention information of the client is "query weather", and the corresponding feedback information is specific weather conditions, for example, "weather fine, 20-24 degrees of temperature, and the like.
In an embodiment of the present application, as shown in fig. 8, a man-machine interaction device may be integrated in the server 120, where the man-machine interaction device includes:
a first obtaining module 510, configured to determine current intention information of the client according to the man-machine interaction information;
the judging module 520 is configured to judge whether the current man-machine interaction information contains all entity information that matches the current intention information of the client according to a preset business relationship model; the relation model comprises corresponding relation information of intention information and entity information;
a second obtaining module 530, configured to obtain the missing entity information through a preset mode.
In the man-machine interaction device of the embodiment of the present application, the functions of the first acquisition module 510, the judgment module 520, and the second acquisition module 530 are implemented in one-to-one correspondence with the step S202, the step S204, and the step S206 in the man-machine interaction method; for a specific explanation of the man-machine interaction device and related detailed and optimized contents, refer to the specific embodiment of the man-machine interaction method, and are not repeated herein.
FIG. 11 illustrates an internal block diagram of a computer device in one embodiment. The computer device may be specifically the server 120 of fig. 1. As shown in fig. 11, the computer device includes a processor, a memory, a network interface, an input device, and a display screen connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program that, when executed by a processor, causes the processor to implement a human-machine interaction method. The internal memory may also store a computer program which, when executed by the processor, causes the processor to perform a human-machine interaction method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 11 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, the human-computer interaction device provided by the present application may be implemented as a computer program, which can be run on a computer device as illustrated in FIG. 11. The memory of the computer device may store various program modules constituting the man-machine interaction device, such as the first obtaining module 510, the judging module 520, and the second obtaining module 530 shown in fig. 8. The computer program comprising program modules causes a processor to carry out the steps of the human-computer interaction method according to the embodiments of the application described in the present specification.
For example, the computer apparatus shown in fig. 11 may execute step S202 through the first acquisition module 510 in the man-machine interaction device shown in fig. 8. The server 120 may execute step S204 through the determination module 520. The second acquisition module of the server 120 performs step S206.
In one embodiment, a server 120 is provided, the server 120 comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
step S202, determining the current intention information of the client according to the man-machine interaction information;
step S204, judging whether the current man-machine interaction information contains all entity information matched with the current intention information of the client according to a preset business relation model; the relation model comprises corresponding relation information of intention information and entity information;
step S206, if not, acquiring the missing entity information through a preset mode.
In one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, which when executed by a processor causes the processor to perform the steps of:
step S202, determining the current intention information of the client according to the man-machine interaction information;
step S204, judging whether the current man-machine interaction information contains all entity information matched with the current intention information of the client according to a preset business relation model; the relation model comprises corresponding relation information of intention information and entity information;
step S206, if not, acquiring the missing entity information through a preset mode.
It should be understood that, although the steps in the flowcharts of the embodiments of the present application are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in various embodiments may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the application.