CN111177355B - Man-machine conversation interaction method and device based on search data and electronic equipment - Google Patents

Man-machine conversation interaction method and device based on search data and electronic equipment Download PDF

Info

Publication number
CN111177355B
CN111177355B CN201911403103.1A CN201911403103A CN111177355B CN 111177355 B CN111177355 B CN 111177355B CN 201911403103 A CN201911403103 A CN 201911403103A CN 111177355 B CN111177355 B CN 111177355B
Authority
CN
China
Prior art keywords
query
statement
sentences
preset
dialogue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911403103.1A
Other languages
Chinese (zh)
Other versions
CN111177355A (en
Inventor
徐俊
雷泽阳
牛正雨
吴华
王海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201911403103.1A priority Critical patent/CN111177355B/en
Publication of CN111177355A publication Critical patent/CN111177355A/en
Priority to US16/986,631 priority patent/US20210200813A1/en
Priority to JP2020150476A priority patent/JP7395445B2/en
Application granted granted Critical
Publication of CN111177355B publication Critical patent/CN111177355B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation
    • G06F16/90332Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3347Query execution using vector based model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation
    • G06F16/90324Query formulation using system suggestions
    • G06F16/90328Query formulation using system suggestions using search space presentation or visualization, e.g. category or range presentation and selection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques

Abstract

The application discloses a man-machine conversation interaction method, a man-machine conversation interaction device and electronic equipment based on search data, and relates to the technical field of artificial intelligence, wherein the method comprises the following steps: acquiring a dialogue statement input by a user; acquiring a query statement matched with a conversation statement, and acquiring a plurality of associated query statements corresponding to the query statement based on a preset query word graph; processing the dialogue sentences and the plurality of correlation query sentences through a preset algorithm, and determining target query sentences from the plurality of correlation query sentences; and processing the target query statement according to a preset generated reply model, and generating a reply statement and providing the reply statement for a user. Therefore, the technical problems that the reply content in the man-machine conversation is not rich enough and the conversation effect is not good enough are solved, and the high-quality reply content candidate list is provided through the relevance of the query sentences in the query word graph, so that the content which is richer and reflects the interest of the user is provided.

Description

Man-machine conversation interaction method and device based on search data and electronic equipment
Technical Field
The present application relates to the field of artificial intelligence technology in computer technologies, and in particular, to a method and an apparatus for human-computer interaction based on search data, and an electronic device.
Background
With the continuous development of artificial intelligence technology, meeting the user's needs by interacting with an intelligent device is an interaction mode that is more and more common in the user's life.
In the related technology, the reply content in the man-machine conversation is not rich enough, and the conversation effect is poor.
Disclosure of Invention
The first purpose of the application is to provide a man-machine conversation interaction method based on search data.
A second objective of the present application is to provide a human-computer dialogue interaction device based on search data.
A third object of the present application is to provide an electronic device.
A fourth object of the present application is to propose a non-transitory computer readable storage medium storing computer instructions.
In order to achieve the above object, an embodiment of a first aspect of the present application provides a method for human-computer interaction based on search data, including the following steps:
acquiring a dialogue statement input by a user;
acquiring a query statement matched with the dialogue statement, and acquiring a plurality of associated query statements corresponding to the query statement based on a preset query word graph;
processing the dialogue statement and the plurality of association query statements through a preset algorithm, and determining a target query statement from the plurality of association query statements;
and processing the target query statement according to a preset generated reply model, and generating a reply statement and providing the reply statement for the user.
In order to achieve the above object, a second aspect of the present application provides a human-computer interaction device based on search data, including:
the first acquisition module is used for acquiring a dialogue statement input by a user;
the first acquisition module is used for acquiring a dialogue statement input by a user;
the second acquisition module is used for acquiring the query statement matched with the conversation statement;
a third obtaining module, configured to obtain, based on a preset query word graph, a plurality of associated query sentences corresponding to the query sentences;
the processing module is used for processing the dialogue statement and the plurality of associated query statements through a preset algorithm and determining a target query statement from the plurality of associated query statements;
and the generating module is used for processing the target query statement according to a preset generated reply model, generating a reply statement and providing the reply statement for the user.
To achieve the above object, a third aspect of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the human-computer interaction method based on search data described in the above embodiments.
To achieve the above object, a fourth aspect of the present application provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method for human-computer interaction based on search data described in the above embodiments.
One embodiment in the above application has the following advantages or benefits:
acquiring a dialogue statement input by a user; acquiring a query statement matched with a conversation statement, and acquiring a plurality of associated query statements corresponding to the query statement based on a preset query word graph; processing the dialogue sentences and the plurality of correlation query sentences through a preset algorithm, and determining target query sentences from the plurality of correlation query sentences; and processing the target query statement according to a preset generated reply model, and generating a reply statement and providing the reply statement for a user. Therefore, the technical problems that the reply content in the man-machine conversation is not rich enough and the conversation effect is not good enough are solved, and the high-quality reply content candidate list is provided through the relevance of the query sentences in the query word graph, so that the content which is richer and reflects the interest of the user is provided.
Other effects of the above-described alternative will be described below with reference to specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a flow chart of a method of human-machine dialog interaction based on search data according to a first embodiment of the present application;
FIG. 2 is an exemplary diagram of a query word graph according to a first embodiment of the present application;
FIG. 3 is a flow chart of a method of human-machine dialog interaction based on search data according to a second embodiment of the present application;
FIG. 4 is a schematic structural diagram of a human-computer interaction device based on search data according to a third embodiment of the present application;
FIG. 5 is a schematic structural diagram of a human-computer interaction device based on search data according to a fourth embodiment of the present application;
FIG. 6 is a schematic structural diagram of a human-computer interaction device based on search data according to a fifth embodiment of the present application;
fig. 7 is a block diagram of an electronic device for implementing a man-machine interaction method based on search data according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The method, the device and the electronic equipment for man-machine conversation interaction based on search data in the embodiment of the application are described below with reference to the accompanying drawings.
In order to solve the technical problems that the reply content in the man-machine conversation is not rich enough and the conversation effect is not good enough in the prior art, the scheme obtains the conversation sentences input by the user; acquiring a query statement matched with a conversation statement, and acquiring a plurality of associated query statements corresponding to the query statement based on a preset query word graph; processing the dialogue sentences and the plurality of correlation query sentences through a preset algorithm, and determining target query sentences from the plurality of correlation query sentences; and processing the target query statement according to a preset generated reply model, generating a reply statement and providing the reply statement for a user, and realizing providing a high-quality reply content candidate list through the relevance of the query statement in the query word graph, thereby providing richer contents reflecting the interest of the user.
Specifically, fig. 1 is a flowchart of a human-computer dialogue interaction method based on search data according to a first embodiment of the present application.
As shown in fig. 1, the method includes:
step 101, obtaining a dialog statement input by a user.
Step 102, obtaining a query statement matched with the dialogue statement, and obtaining a plurality of associated query statements corresponding to the query statement based on a preset query word graph.
In practical application, a user can perform dialogue interaction with the intelligent device through characters, voice or other modes, so that the intelligent device can acquire dialogue sentences (namely dialogue chatting sentences) input by the user, for example, "listening and speaking a recent boeing plane has something wrong", "hua is a P30 mobile phone good," i like yoga exercise at ordinary times "and the like, wherein the dialogue sentences can be input according to user personalized characteristics such as user requirements, expression habits and the like.
Further, query sentences matched with the dialogue sentences can be queried in a database, or query sentences matched with the dialogue sentences can be searched in a server, and the like, it should be noted that the query sentences can find corresponding sentence nodes in the preset query word graph, and the dialog sentences and the query sentences are the same, which means that the dialogue sentences can also find corresponding sentence nodes in the preset query word graph.
Therefore, a plurality of associated query sentences corresponding to the query sentence can be obtained based on the preset query word graph, it can be understood that the relationship between the query sentence and the associated query sentence is established based on the internet user search behavior log, so that the relationship is most likely to surround a search intention or semantic topic, then the preset query word graph can be constructed based on the correlation between the plurality of associated query sentences A, B and C corresponding to the query sentence 1, and the preset query word graph can be constructed by directly extracting relevant data from the plurality of search query logs and analyzing the relevant data.
For example, as shown in fig. 2, the dialog sentence "hear that the recent boeing aircraft has done", the matched query sentence is "apology," the query sentence finds the corresponding sentence node "apology" in the preset query word graph, and a plurality of associated query sentences corresponding to the query sentence, such as "apology crash", "polo leory", and "lndonesian 737 crash", etc., can be obtained based on the preset query word graph through the sentence node "apology".
And 103, processing the dialogue sentences and the plurality of association query sentences through a preset algorithm, and determining target query sentences from the plurality of association query sentences.
And 104, processing the target query statement according to a preset generated reply model, and generating a reply statement and providing the reply statement for a user.
Specifically, after obtaining the multiple association query statements, the target query statement may be determined from the multiple association query statements, and the target query statement may be processed according to a preset generation reply model to generate a reply statement for the user.
More specifically, the dialogue statement and the multiple related query statements are processed by a preset algorithm, and there are various ways of determining the target query statement from the multiple related query statements, such as processing by a classification model, reinforcement learning, and the like to obtain the target query statement.
As an example, a context sentence corresponding to a dialog sentence is obtained, the context sentence is encoded to obtain a context sentence vector, a plurality of associated query vectors corresponding to a plurality of associated query sentences are obtained from a preset database, association score values of the dialog sentence and the associated query sentences are calculated for the context sentence vector and the associated query vectors through a similarity calculation model based on reinforcement learning, and a target query sentence is determined from the associated query sentences according to the association score values.
As another example, a search vector corresponding to a dialog statement is obtained, a plurality of associated query vectors corresponding to a plurality of associated query statements are obtained from a preset database, the search vectors and the associated query vectors are sequentially processed through a classification model to obtain a plurality of classification categories corresponding to the dialog statement and each associated query statement, a target category is determined from the classification categories, and the target query statement is determined according to the target category.
It should be noted that, each query statement in the preset query word graph is processed in advance through a preset neural network, such as a graph neural network, a convolutional neural network, and the like, and each query statement vector is generated and stored in a preset database.
Continuing with fig. 2 as an example, after determining a plurality of associated query sentences, such as "wave plane crash", "wave CEO apology", and "wave 737 indonesia crash", the "wave 737 crash", indonesia, is obtained as the target query sentence, and in order to ensure fluency of the dialog, the obtained target query sentence may not be directly provided to the user as a reply sentence, and the user "wave CEO apology" is provided with the generated reply sentence by performing processing of a relevant expression manner through a preset generated reply model because of the wave 737 crash event, indonesia.
In summary, the man-machine conversation interaction method based on the search data of the embodiment of the application obtains the conversation sentences input by the user; acquiring a query statement matched with a conversation statement, and acquiring a plurality of associated query statements corresponding to the query statement based on a preset query word graph; processing the dialogue sentences and the plurality of correlation query sentences through a preset algorithm, and determining target query sentences from the plurality of correlation query sentences; and processing the target query statement according to a preset generated reply model, and generating a reply statement and providing the reply statement for a user. Therefore, the technical problems that the reply content in the man-machine conversation is not rich enough and the conversation effect is not good enough are solved, and the high-quality reply content candidate list is provided through the relevance of the query sentences in the query word graph, so that the content which is richer and reflects the interest of the user is provided.
To implement the above embodiments, fig. 3 is a flowchart of a human-computer dialogue interaction method based on search data according to a second embodiment of the present application.
Step 201, obtaining a plurality of search query logs, obtaining a plurality of query statement samples based on the plurality of search query logs, and obtaining a plurality of associated query statement samples corresponding to each query statement sample.
Step 202, constructing a preset query word graph according to the relevance of the plurality of query statement samples and the plurality of associated query statement samples corresponding to each query statement sample.
And 203, processing each query statement in the preset query word graph through a preset neural network, generating each query statement vector and storing the query statement vector in a preset database.
Specifically, the query word graph can be pre-established based on search data, can be established in real time based on user identification and search query sentences in query time, and can also be directly extracted from search query logs for analysis.
Specifically, a plurality of search query logs are obtained, a plurality of query statement samples and a plurality of associated query statement samples corresponding to the query statement samples are obtained based on the search query logs, and a preset query word graph is constructed according to the association of the query statement samples and the associated query statement samples corresponding to the query statement samples.
For example, the plurality of associated query statement samples corresponding to the query statement sample of "apology with wave sound side president" are "apology with wave sound CEO", "wave sound airplane crash", "wave sound president", and "lninical wave sound 737 crash", and the preset query word graph is constructed based on the plurality of associated query statement samples corresponding to the query statement sample of "apology with wave sound side president" are "apology with wave sound CEO", "wave sound airplane crash", "wave sound president", and "lninical wave sound 737 crash".
It can be understood that the above is only an example, and the query word graph is constructed based on a plurality of query statement samples and the relevance of a plurality of relevant query statement samples corresponding to the query statement samples, so that the query word graph is constructed based on the search data, and the query with the relevance of each query statement in the graph can obtain a very accurate answer, thereby improving the conversation effect.
For the purpose of processing efficiency, each query statement in the preset query word graph may be processed in advance through a preset neural network, such as a graph neural network, a convolutional neural network, or the like, and each query statement vector is generated and stored in a preset database.
Step 204, obtaining a dialogue sentence input by a user, performing word segmentation processing on the dialogue sentence to obtain a plurality of search terms, and calculating the similarity between the plurality of search terms and each query sentence in a preset query word graph.
Step 205, weighting the multiple similarities to obtain similarity score values between the dialogue statements and the query statements, and determining the query statements matched with the dialogue statements from the query statements according to the similarity score values.
Specifically, a user can perform dialogue interaction with the intelligent device through text or voice and the like, so that the intelligent device can acquire dialogue sentences input by the user, for example, "listening and speaking that a recent boeing plane has something happened", "hua is a good choice for a P30 mobile phone", "i like to practice yoga at ordinary times", and the like, wherein the dialogue sentences can be input according to user personalized characteristics such as user requirements, expression habits, and the like.
Further, word segmentation processing is carried out on the spoken sentence to obtain a plurality of search words, the similarity between the plurality of search words and each query sentence in a preset query word graph is calculated, weighting processing is carried out on the plurality of similarities to obtain similarity score values between the conversational sentence and each query sentence, and the query sentence matched with the conversational sentence is determined from each query sentence according to the similarity score values, namely, the higher the similarity score value is, the higher the matching degree between the query sentence and the conversational sentence is, the more accurate the mapping of the conversational sentence to the sentence node in the query word graph is.
And step 206, obtaining a context sentence corresponding to the dialogue sentence, coding the context sentence to obtain a context sentence vector, and obtaining a plurality of associated query vectors corresponding to the associated query sentences from a preset database.
And step 207, calculating association score values of the dialogue statement and the associated query statements by using the similarity calculation model based on reinforcement learning, and determining a target query statement from the associated query statements according to the association score values.
It can be understood that the dialog sentence may not be the first-time input sentence, and therefore, in order to improve the accuracy of the reply, the context sentence corresponding to the dialog sentence may be obtained, the context sentence is encoded to obtain a context sentence vector, a plurality of associated query vectors corresponding to the plurality of associated query sentences are obtained from a preset database, finally, the association score values of the dialog sentence and the plurality of associated query sentences are calculated for the context sentence vector and the plurality of associated query vectors through a reinforcement learning algorithm, and the target query sentence is determined from the plurality of associated query sentences according to the association score values.
It is understood that the higher the association score value is, the stronger the association between the dialog statement and the association query statement is, so that the association query statement corresponding to the highest association score value can be used as the target query statement.
For example, the dialog statement is "what sorry" and the context statement corresponding to the dialog statement needs to be acquired for processing, and the acquired target query statement is "lnini bosonic 737 crash" to meet the user requirement, so as to improve the dialog effect.
And 208, processing the target query statement according to a preset generated reply model, and generating a reply statement for a user.
In order to ensure the fluency of the conversation, the obtained target query statement cannot be directly provided to the user as a reply statement, and the reply statement is required to be generated and provided to the user by processing a relevant expression mode through a preset reply generation model, namely 'because of an air crash event of 737 Boeing in Indonesian'.
To sum up, the man-machine interaction method based on search data according to the embodiment of the present application obtains a plurality of search query logs, obtains a plurality of query sentence samples based on the plurality of search query logs, and a plurality of associated query sentence samples corresponding to each query sentence sample, constructs a preset query word graph according to the plurality of query sentence samples and the association of the plurality of associated query sentence samples corresponding to each query sentence sample, processes each query sentence in the preset query word graph through a preset neural network, generates each query sentence vector to be stored in a preset database, obtains a dialog sentence input by a user, obtains a query sentence matched with the dialog sentence, performs word segmentation processing on the query sentence to obtain a plurality of search terms, calculates the similarity between each query sentence in the plurality of search terms and each query sentence in the preset query word graph, weighting the multiple similarities to obtain similarity score values between the dialogue sentences and the query sentences, determining the query sentences matched with the dialogue sentences from the query sentences according to the similarity score values, obtaining context sentences corresponding to the dialogue sentences, coding the context sentences to obtain context sentence vectors, obtaining a plurality of association query vectors corresponding to the association query sentences from a preset database, calculating the association score values of the dialogue sentences and the association query sentences through a reinforced learning algorithm on the context sentence vectors and the association query vectors, determining target query sentences from the association query sentences according to the association score values, processing the target query sentences according to a preset generated reply model, and generating reply sentences for users. Therefore, the technical problems that the reply content in the man-machine conversation is not rich enough and the conversation effect is not good enough are solved, and the high-quality reply content candidate list is provided through the relevance of the query sentences in the query word graph, so that the content which is richer and reflects the interest of the user is provided.
In order to implement the foregoing embodiments, the present application further provides a human-computer interaction device based on search data, fig. 4 is a schematic structural diagram of a human-computer interaction device based on search data according to a fourth embodiment of the present application, and as shown in fig. 4, the human-computer interaction device based on search data includes: a first acquisition module 401, a second acquisition module 402, a third acquisition module 403, a processing module 404 and a generation module 405, wherein,
a first obtaining module 401, configured to obtain a dialog statement input by a user.
A second obtaining module 402, configured to obtain a query statement matching the dialog statement.
A third obtaining module 403, configured to obtain, based on a preset query word graph, a plurality of associated query sentences corresponding to the query sentences.
A processing module 404, configured to process the dialog statement and the multiple associated query statements through a preset algorithm, and determine a target query statement from the multiple associated query statements.
A generating module 405, configured to process the target query statement according to a preset generated reply model, generate a reply statement, and provide the generated reply statement to the user.
In an embodiment of the present application, as shown in fig. 5, on the basis of fig. 4, the method further includes: a fourth obtaining module 406, a fifth obtaining module 407, and a constructing module 408.
A fourth obtaining module 406, configured to obtain a plurality of search query logs.
A fifth obtaining module 407, configured to obtain, based on the plurality of search query logs, a plurality of query statement samples and a plurality of associated query statement samples corresponding to each query statement sample, respectively.
The constructing module 408 is configured to construct the preset query word graph according to the plurality of query statement samples and the relevance of the plurality of relevant query statement samples corresponding to each query statement sample.
In an embodiment of the present application, the second obtaining module 402 is specifically configured to: performing word segmentation processing on the dialogue sentences to obtain a plurality of search words; calculating the similarity between the plurality of search terms and each query statement in the preset query word graph; weighting the multiple similarity degrees to obtain similarity score values between the dialogue sentences and the query sentences; and determining the query sentences matched with the dialogue sentences from the query sentences according to the similarity score values.
In an embodiment of the present application, as shown in fig. 6, on the basis of fig. 5, the method further includes: a storage module 409.
And the storage module 409 is configured to process each query statement in the preset query word graph through a preset neural network, generate each query statement vector, and store the query statement vector in a preset database.
In an embodiment of the present application, the processing module 404 is specifically configured to: obtaining a context statement corresponding to the dialogue statement, and coding the context statement to obtain a context statement vector; acquiring a plurality of associated query vectors corresponding to the associated query statements from a preset database; calculating association score values of the dialogue statement and the associated query statements through a reinforcement learning algorithm for the context statement vector and the associated query vectors; determining a target query statement from the plurality of associated query statements according to the association score value.
It should be noted that the foregoing explanation of the man-machine conversation interaction method based on search data is also applicable to the man-machine conversation interaction device based on search data according to the embodiment of the present invention, and the implementation principle is similar, and is not described herein again.
In summary, the man-machine conversation interaction device based on the search data of the embodiment of the application obtains the conversation sentences input by the user; acquiring a query statement matched with a conversation statement, and acquiring a plurality of associated query statements corresponding to the query statement based on a preset query word graph; processing the dialogue sentences and the plurality of correlation query sentences through a preset algorithm, and determining target query sentences from the plurality of correlation query sentences; and processing the target query statement according to a preset generated reply model, and generating a reply statement and providing the reply statement for a user. Therefore, the technical problems that the reply content in the man-machine conversation is not rich enough and the conversation effect is not good enough are solved, and the high-quality reply content candidate list is provided through the relevance of the query sentences in the query word graph, so that the content which is richer and reflects the interest of the user is provided.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 7 is a block diagram of an electronic device for a method of human-computer dialogue interaction based on search data according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 7, the electronic apparatus includes: one or more processors 701, a memory 702, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 7, one processor 701 is taken as an example.
The memory 702 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the methods provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the search data-based human-computer dialog interaction method provided herein.
The memory 702, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method for identifying the validity of parking bit data in the embodiment of the present application (for example, the first obtaining module 401, the second obtaining module 402, the third obtaining module 403, the processing module 404, and the generating module 405 shown in fig. 4). The processor 701 executes various functional applications of the server and data processing, i.e., a man-machine interaction method based on search data in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 702.
The memory 702 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 702 may optionally include memory located remotely from the processor 701, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device performing the method of recognizing validity of parking space data may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected by a bus or other means, and fig. 7 illustrates an example of a connection by a bus.
The input device 703 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, or other input devices. The output devices 704 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A man-machine conversation method based on search data is characterized by comprising the following steps:
acquiring a dialogue statement input by a user;
acquiring a query statement matched with the dialogue statement, and acquiring a plurality of associated query statements corresponding to the query statement based on a preset query word graph;
processing the dialogue statement and the plurality of association query statements through a preset algorithm, and determining a target query statement from the plurality of association query statements;
processing the target query statement according to a preset generated reply model, and generating a reply statement to be provided for the user;
before the obtaining of the query statement matched with the dialogue statement, the method further includes:
obtaining a plurality of search query logs;
obtaining a plurality of query statement samples and a plurality of associated query statement samples corresponding to each query statement sample respectively based on the plurality of search query logs;
and constructing the preset query word graph according to the plurality of query statement samples and the relevance of the plurality of associated query statement samples corresponding to each query statement sample.
2. The method of claim 1, wherein the obtaining a query statement that matches the conversational statement comprises:
performing word segmentation processing on the dialogue sentences to obtain a plurality of search words;
calculating the similarity between the plurality of search terms and each query statement in the preset query word graph;
weighting the multiple similarity degrees to obtain similarity score values between the dialogue sentences and the query sentences;
and determining the query sentences matched with the dialogue sentences from the query sentences according to the similarity score values.
3. The method of claim 1, wherein after the constructing the preset query word graph according to the plurality of query statement samples and the relevance of the plurality of associated query statement samples respectively corresponding to each query statement sample, the method further comprises:
and processing each query statement in the preset query word graph through a preset neural network to generate each query statement vector to be stored in a preset database.
4. The method of claim 3, wherein the processing the conversational sentence and the plurality of associative query sentences through a preset algorithm to determine a target query sentence from the plurality of associative query sentences comprises:
obtaining a context statement corresponding to the dialogue statement, and coding the context statement to obtain a context statement vector;
acquiring a plurality of associated query vectors corresponding to the associated query statements from the preset database;
calculating relevance score values of the dialogue statement and the associated query statements through a similarity calculation model based on reinforcement learning on the context statement vector and the associated query vectors;
determining a target query statement from the plurality of associated query statements according to the association score value.
5. A human-computer dialogue interaction apparatus based on search data, comprising:
the first acquisition module is used for acquiring a dialogue statement input by a user;
the second acquisition module is used for acquiring the query statement matched with the conversation statement;
a third obtaining module, configured to obtain, based on a preset query word graph, a plurality of associated query sentences corresponding to the query sentences;
the processing module is used for processing the dialogue statement and the plurality of associated query statements through a preset algorithm and determining a target query statement from the plurality of associated query statements;
the generating module is used for processing the target query statement according to a preset generated reply model, and generating a reply statement to be provided for the user;
wherein, the device still includes:
a fourth obtaining module, configured to obtain a plurality of search query logs;
a fifth obtaining module, configured to obtain, based on the search query logs, a plurality of query statement samples and a plurality of associated query statement samples corresponding to each query statement sample, respectively;
and the construction module is used for constructing the preset query word graph according to the plurality of query statement samples and the relevance of the plurality of associated query statement samples corresponding to each query statement sample.
6. The apparatus of claim 5, wherein the second obtaining module is specifically configured to:
performing word segmentation processing on the dialogue sentences to obtain a plurality of search words;
calculating the similarity between the plurality of search terms and each query statement in the preset query word graph;
weighting the multiple similarity degrees to obtain similarity score values between the dialogue sentences and the query sentences;
and determining the query sentences matched with the dialogue sentences from the query sentences according to the similarity score values.
7. The apparatus of claim 5, further comprising:
and the storage module is used for processing each query statement in the preset query word graph through a preset neural network to generate each query statement vector and store the query statement vector in a preset database.
8. The apparatus of claim 7, wherein the processing module is specifically configured to:
obtaining a context statement corresponding to the dialogue statement, and coding the context statement to obtain a context statement vector;
acquiring a plurality of associated query vectors corresponding to the associated query statements from a preset database;
calculating relevance score values of the dialogue statement and the associated query statements through a similarity calculation model based on reinforcement learning on the context statement vector and the associated query vectors;
determining a target query statement from the plurality of associated query statements according to the association score value.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN201911403103.1A 2019-12-30 2019-12-30 Man-machine conversation interaction method and device based on search data and electronic equipment Active CN111177355B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201911403103.1A CN111177355B (en) 2019-12-30 2019-12-30 Man-machine conversation interaction method and device based on search data and electronic equipment
US16/986,631 US20210200813A1 (en) 2019-12-30 2020-08-06 Human-machine interaction method, electronic device, and storage medium
JP2020150476A JP7395445B2 (en) 2019-12-30 2020-09-08 Methods, devices and electronic devices for human-computer interactive interaction based on search data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911403103.1A CN111177355B (en) 2019-12-30 2019-12-30 Man-machine conversation interaction method and device based on search data and electronic equipment

Publications (2)

Publication Number Publication Date
CN111177355A CN111177355A (en) 2020-05-19
CN111177355B true CN111177355B (en) 2021-05-28

Family

ID=70654188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911403103.1A Active CN111177355B (en) 2019-12-30 2019-12-30 Man-machine conversation interaction method and device based on search data and electronic equipment

Country Status (3)

Country Link
US (1) US20210200813A1 (en)
JP (1) JP7395445B2 (en)
CN (1) CN111177355B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737411A (en) * 2020-05-20 2020-10-02 华为技术有限公司 Response method in man-machine conversation, conversation system and storage medium
CN111708876B (en) * 2020-06-16 2023-07-18 北京百度网讯科技有限公司 Method and device for generating information
CN111767379B (en) * 2020-06-29 2023-06-27 北京百度网讯科技有限公司 Image question-answering method, device, equipment and storage medium
CN111966782B (en) 2020-06-29 2023-12-12 百度在线网络技术(北京)有限公司 Multi-round dialogue retrieval method and device, storage medium and electronic equipment
CN111914565A (en) * 2020-07-15 2020-11-10 海信视像科技股份有限公司 Electronic equipment and user statement processing method
CN112989011B (en) * 2021-04-26 2021-08-24 广州思迈特软件有限公司 Data query method, data query device and electronic equipment
CN113553414B (en) * 2021-06-30 2023-08-25 北京百度网讯科技有限公司 Intelligent dialogue method, intelligent dialogue device, electronic equipment and storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661484A (en) * 2008-08-29 2010-03-03 株式会社理光 Query method and query system
JP5314504B2 (en) * 2009-06-01 2013-10-16 日本電信電話株式会社 SEARCH DEVICE, SEARCH PROGRAM, AND SEARCH METHOD
CN105528349B (en) * 2014-09-29 2019-02-01 华为技术有限公司 The method and apparatus that question sentence parses in knowledge base
US9703860B2 (en) * 2014-10-06 2017-07-11 International Business Machines Corporation Returning related previously answered questions based on question affinity
EP3639158A4 (en) * 2017-06-15 2020-11-18 Microsoft Technology Licensing, LLC Method and apparatus for intelligent automated chatting
US10268779B2 (en) * 2017-08-09 2019-04-23 International Business Machines Corporation Sharing server conversational context between multiple cognitive engines
CN107766483A (en) * 2017-10-13 2018-03-06 华中科技大学 The interactive answering method and system of a kind of knowledge based collection of illustrative plates
US10803059B2 (en) * 2018-01-30 2020-10-13 Verizon Patent And Licensing Inc. Searching using query graphs
CN109284357B (en) * 2018-08-29 2022-07-19 腾讯科技(深圳)有限公司 Man-machine conversation method, device, electronic equipment and computer readable medium
CN111428516B (en) * 2018-11-19 2022-08-19 腾讯科技(深圳)有限公司 Information processing method and device
CN110019844A (en) * 2019-02-20 2019-07-16 众安信息技术服务有限公司 A kind of insurance industry knowledge mapping question answering system construction method and device
KR20200135607A (en) * 2019-05-22 2020-12-03 삼성전자주식회사 Method and apparatus for processing language based on trained network model
EP3819809A1 (en) * 2019-11-08 2021-05-12 PolyAI Limited A dialogue system, a method of obtaining a response from a dialogue system, and a method of training a dialogue system
KR20210061141A (en) * 2019-11-19 2021-05-27 삼성전자주식회사 Method and apparatus for processimg natural languages

Also Published As

Publication number Publication date
CN111177355A (en) 2020-05-19
JP2021111334A (en) 2021-08-02
JP7395445B2 (en) 2023-12-11
US20210200813A1 (en) 2021-07-01

Similar Documents

Publication Publication Date Title
CN111177355B (en) Man-machine conversation interaction method and device based on search data and electronic equipment
KR102532396B1 (en) Data set processing method, device, electronic equipment and storage medium
KR102565673B1 (en) Method and apparatus for generating semantic representation model,and storage medium
CN111078865B (en) Text title generation method and device
CN111241245B (en) Human-computer interaction processing method and device and electronic equipment
CN111241819B (en) Word vector generation method and device and electronic equipment
CN113553414B (en) Intelligent dialogue method, intelligent dialogue device, electronic equipment and storage medium
CN111324727A (en) User intention recognition method, device, equipment and readable storage medium
CN111259671A (en) Semantic description processing method, device and equipment for text entity
CN111079945B (en) End-to-end model training method and device
US20220358292A1 (en) Method and apparatus for recognizing entity, electronic device and storage medium
CN111783468A (en) Text processing method, device, equipment and medium
KR102630243B1 (en) method and device for predicting punctuation
US11556719B2 (en) Dialogue interaction method and apparatus, device, and storage medium
CN112163405A (en) Question generation method and device
US20220005461A1 (en) Method for recognizing a slot, and electronic device
CN111984774A (en) Search method, device, equipment and storage medium
CN114416943A (en) Training method and device for dialogue model, electronic equipment and storage medium
CN114444462B (en) Model training method and man-machine interaction method and device
CN111797216A (en) Retrieval item rewriting method, device, equipment and storage medium
CN111708800A (en) Query method and device and electronic equipment
CN112559715B (en) Attitude identification method, device, equipment and storage medium
CN112232089B (en) Pre-training method, device and storage medium of semantic representation model
CN112270169B (en) Method and device for predicting dialogue roles, electronic equipment and storage medium
CN112650844A (en) Tracking method and device of conversation state, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant