CN116521841B - Method, device, equipment and medium for generating reply information - Google Patents

Method, device, equipment and medium for generating reply information Download PDF

Info

Publication number
CN116521841B
CN116521841B CN202310416928.7A CN202310416928A CN116521841B CN 116521841 B CN116521841 B CN 116521841B CN 202310416928 A CN202310416928 A CN 202310416928A CN 116521841 B CN116521841 B CN 116521841B
Authority
CN
China
Prior art keywords
information
dialogue
reply
search result
language model
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
CN202310416928.7A
Other languages
Chinese (zh)
Other versions
CN116521841A (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 CN202310416928.7A priority Critical patent/CN116521841B/en
Publication of CN116521841A publication Critical patent/CN116521841A/en
Application granted granted Critical
Publication of CN116521841B publication Critical patent/CN116521841B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a method, a device, equipment and a medium for generating reply information, relates to the technical field of artificial intelligence, and particularly relates to the technical field of deep learning, intelligent searching and natural language processing. The implementation scheme is as follows: acquiring first dialogue information input by a user; acquiring demand analysis information based on the first dialogue information; responding to the first information to indicate that data searching is needed, and searching based on the first dialogue information to obtain at least one first search result; and generating first reply information for replying to the first dialogue information by using the first language model based on the first dialogue information and at least one first search result.

Description

Method, device, equipment and medium for generating reply information
Technical Field
The present disclosure relates to the field of artificial intelligence, and more particularly, to the field of deep learning, intelligent searching, and natural language processing, and in particular, to a method, an apparatus, an electronic device, a computer readable storage medium, and a computer program product for generating reply information.
Background
Artificial intelligence is the discipline of studying the process of making a computer mimic certain mental processes and intelligent behaviors (e.g., learning, reasoning, thinking, planning, etc.) of a person, both hardware-level and software-level techniques. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
Human-machine interaction is a way for a human to interact with a machine in natural language. With the continuous development of artificial intelligence technology, machines have been realized to be able to understand information output by humans, understand the intrinsic meaning in the information, and make corresponding feedback. In these operations, accurate understanding of semantics, rapidness of feedback, and giving corresponding comments or suggestions all become factors affecting smooth man-machine interaction.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, the problems mentioned in this section should not be considered as having been recognized in any prior art unless otherwise indicated.
Disclosure of Invention
The present disclosure provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for generating reply information.
According to an aspect of the present disclosure, there is provided a method for generating reply information, including: acquiring first dialogue information input by a user; based on the first dialogue information, acquiring requirement analysis information, wherein the requirement analysis information comprises first information which is used for indicating whether data searching is needed before reply information is generated; responding to the first information to indicate that data searching is needed, and searching based on the first dialogue information to obtain at least one first search result; and generating first reply information for replying to the first dialogue information by using the first language model based on the first dialogue information and at least one first search result.
According to another aspect of the present disclosure, there is provided an apparatus for generating reply information, including: a first acquisition unit configured to acquire first dialogue information input by a user; the second acquisition unit is configured to acquire requirement analysis information based on the first dialogue information, wherein the requirement analysis information comprises first information which is used for indicating whether data searching is needed before reply information is generated; a search unit configured to search for at least one first search result based on the first dialogue information in response to the first information indicating that data search is required; and a generating unit configured to generate first reply information for replying to the first dialogue information using the first language model based on the first dialogue information and at least one first search result.
According to another aspect of the present disclosure, there is provided 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 method for generating reply information described above.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the above-described method for generating reply information.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the above-described method for generating reply information.
According to one or more embodiments of the present disclosure, dialogue information that does not need to perform data search can be filtered, so that computing resources are saved, and computing efficiency is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of a method for generating reply information according to an embodiment of the disclosure;
FIG. 3 illustrates a human-machine interaction interface schematic diagram in accordance with an exemplary embodiment of the present disclosure;
FIG. 4 illustrates a first dialog information schematic diagram in accordance with an exemplary embodiment of the present disclosure;
FIG. 5 illustrates a first dialog information schematic diagram in accordance with an exemplary embodiment of the present disclosure;
FIG. 6 illustrates a human-machine interaction interface schematic diagram in accordance with an exemplary embodiment of the present disclosure;
FIG. 7 shows a block diagram of an apparatus for generating reply information according to an embodiment of the disclosure;
Fig. 8 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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 of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used to distinguish one element from another element. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various illustrated examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses any and all possible combinations of the listed items.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented, in accordance with an embodiment of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In embodiments of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the method for generating reply information.
In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof that are executable by one or more processors. A user operating client devices 101, 102, 103, 104, 105, and/or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be appreciated that a variety of different system configurations are possible, which may differ from system 100. Accordingly, FIG. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
The user may input the first dialog information using the client device 101, 102, 103, 104, 105 and/or 106. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that the present disclosure may support any number of client devices.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and the like. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, linux, or Linux-like operating systems (e.g., GOOGLE Chrome OS); or include various mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, windows Phone, android. Portable handheld devices may include cellular telephones, smart phones, tablet computers, personal Digital Assistants (PDAs), and the like. Wearable devices may include head mounted displays (such as smart glasses) and other devices. The gaming system may include various handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a number of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. For example only, the one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a blockchain network, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture that involves virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain virtual storage devices of the server). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. Server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of client devices 101, 102, 103, 104, 105, and/or 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and/or 106.
In some implementations, the server 120 may be a server of a distributed system or a server that incorporates a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and Virtual special server (VPS PRIVATE SERVER) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of databases 130 may be used to store information such as audio files and video files. Database 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. Database 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve the databases and data from the databases in response to the commands.
In some embodiments, one or more of databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key value stores, object stores, or conventional stores supported by the file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
According to an embodiment of the present disclosure, as shown in fig. 2, there is provided a method for generating reply information, including:
step S201, acquiring first dialogue information input by a user;
Step S202, acquiring requirement analysis information based on first dialogue information, wherein the requirement analysis information comprises first information which is used for indicating whether data searching is needed before reply information is generated;
step S203, responding to the first information to indicate that data searching is needed, and searching based on the first dialogue information to obtain at least one first searching result; and
Step S204, based on the first dialogue information and at least one first search result, generating first reply information for replying to the first dialogue information by using the first language model.
According to the embodiment of the disclosure, after the first dialogue information input by the user is acquired, firstly, the first dialogue information is subjected to requirement analysis, only the first dialogue information needing to be subjected to data search is subjected to data search, and the first reply information is generated through the first language model based on the search result and the dialogue information, so that the dialogue information needing not to be subjected to data search can be filtered, the calculation resources are saved, and the calculation efficiency is improved.
In some embodiments, the first dialog information may be entered by the user in the form of text, speech, or the like. When input in the form of speech, the speech may be converted into text by a speech recognition technique to obtain the first dialog information.
In some embodiments, obtaining the demand analysis information may be based on a trained model, which in some embodiments may be, for example, a classification model or a generative model. The first dialogue information is input into the model to obtain the first information which is output by the model and used for indicating whether data searching is needed before reply information is generated.
When the first information indicates that data searching is needed, data searching can be conducted through one or more searching systems based on the first dialogue information, and at least one first searching result is obtained. Wherein the at least one first search result may be, for example, a top-ranked one or more of the search results searched for by each of the one or more search systems.
In some embodiments, the first dialogue information and at least one first search result may be input into the first language model together, so as to obtain first reply information generated by the first language model and used for replying to the first dialogue information.
Fig. 3 shows a human-machine interaction interface schematic diagram according to an exemplary embodiment of the present disclosure.
As shown in fig. 3, after the user inputs the first dialogue information 301 using the electronic device, the electronic device may generate the first reply information 302 for replying to the first dialogue information based on the above method for generating reply information, and display the first reply information in an interface of the electronic device.
In some embodiments, the first reply information may include summary information of the first dialogue information generated by overwriting the first dialogue information, and reply information (e.g., including knowledge information for solving the first dialogue information) for the first dialogue information generated by fusing content in at least one first search result.
In some embodiments, the first language model is obtained based at least on knowledge resources and dialogue data training of a preset scale.
In some embodiments, the first language model may be a knowledge-enhanced large language model (e.g., ERNIE bot, etc.) for conversations, the first language model being obtained through training of massive knowledge resources and conversational data (e.g., including more than trillion levels of web page data, billions of search data, billions of levels of picture data, billions of voice request data per day, more than 500 billions of text request data, and more than 5500 billions of factual knowledge).
Therefore, the model is applied as the first language model, not only can the chatting dialogue information be directly processed, but also the logic reasoning dialogue information, the common sense dialogue information and the image generation dialogue information can be directly generated, and the generation efficiency can be further improved while higher-quality reply information is generated.
In some embodiments, when the first information indicates that a data search is required, the requirement analysis information further includes at least one query text generated based on the first dialogue information, and searching for at least one first search result based on the first dialogue information in response to the first information indicating that a data search is required includes: responding to the first information to indicate that data searching is needed, and acquiring at least one second searching result corresponding to at least one query text based on each query text in the query text; and obtaining at least one first search result based on at least one second search result corresponding to each query text in the at least one query text.
Therefore, when the first information indicates that data searching is needed during demand analysis, at least one query text rewritten based on the first dialogue information is output at the same time, so that data searching is performed based on each query text, the first dialogue information can be disassembled and simplified, and the accuracy of search result acquisition is improved.
In some embodiments, the demand analysis for the first dialog information may be implemented based on a demand analysis model, which may be a trained generative model. The generative model may perform a demand analysis on the first dialog information to generate different information for the demand of the different dialog information.
In some exemplary embodiments, when the first dialogue information of the user is a boring sentence, a question requiring the generation of a picture, a logical reasoning question, or dialogue information including only a question asking for common sense class information, etc., the generational model may output the first information indicating that the data search is not required. When the first dialogue information of the user is a question for asking professional knowledge, real-time information (e.g., weather forecast, etc.), etc., the generative model may directly output the first information indicating that data search is required and at least one query text generated based on understanding of the first dialogue information.
Therefore, the first dialogue information can be understood and rewritten into at least one query text through the generated model, and the problem that the first dialogue information output by a user cannot be directly used as a search request text of a search system and further cannot be accurately recalled due to excessive complexity or spoken language of the first dialogue information in a dialogue type search scene is avoided.
In some exemplary embodiments, the first dialogue information entered by the user may be, for example, "who would win with the hairline and Qin Qiong dues? After the demand analysis, the generated model can output the first information of the dialogue information which needs to be subjected to data retrieval and the query texts of the wushu and the war of the Guanyu and the wushu and the war of Qin Qiong.
In some embodiments, the above-mentioned generated model for performing demand analysis may be obtained based on training a pre-prepared sample data set, where the sample data set includes a plurality of sample dialogue information and a sample tag of each sample dialogue information, where the sample tag may include a first sample tag and a second sample tag, where the first sample tag is a tag for indicating that the sample dialogue information does not need to be searched for data, and the second sample tag includes a tag for indicating that the sample dialogue information needs to be searched for data and at least one preset query text.
In some embodiments, a data search may be performed based on each query text to obtain at least one second search result recalled for each query text, all of which may constitute at least one first search result.
In some embodiments, generating first reply information for replying to the first dialog information using the first language model based on the first dialog information and the at least one first search result includes: obtaining a score for each of the at least one first search result, the score being used to evaluate at least one of content quality, timeliness, authority, and relevance to the respective query text of the respective first search result; and in response to obtaining at least one third search result meeting a first preset condition from the at least one first search result, inputting the first dialogue information and the at least one third search result into the first language model to obtain first reply information generated by the first language model, wherein the first preset condition indicates that the score is greater than a preset threshold.
In some embodiments, upon recall of each first search result, a score for each first search result by the search system may be obtained simultaneously, which score may be used to evaluate at least one dimension of content quality, timeliness, authority, and relevance to the corresponding query text for that first search result.
And filtering the first search results through the score of each first search result, so as to filter out the first search results with low scores. And in response to the search results meeting the first preset condition after filtering, inputting the search results (namely third search results) and the first dialogue information into the first language model to obtain first reply information.
Therefore, the quality of the search results can be improved by further screening the search results, and the quality of the generated first reply information is further improved.
In some embodiments, inputting the first dialog information and the at least one third search result into the first language model to obtain first reply information generated by the first language model includes: inputting the first dialogue information, at least one third search result and at least one preset instruction into the first language model to obtain first reply information generated by the first language model, wherein the at least one preset instruction is used for guiding the generation process of the first reply information so as to enable the first reply information to be generated into information in a specific form.
In some embodiments, when the first language model is applied to generate the first reply message, one or more preset instructions are input into the first language model at the same time, so that the first language model is guided to conduct the arrangement of the search result and the reply of the first dialogue message through the preset instructions.
In some embodiments, the preset instructions may be, for example, instructions for directing the first reply message generation process to cause the first reply message to be generated in a particular form (e.g., generated as a list, in a tabular form).
Therefore, when the third search result meeting the preset condition is obtained, at least one preset instruction (prompt) can be further introduced in the generation process of the reply information so as to guide the model to generate the reply information more meeting the expectations of the user based on the dialogue information and the search result, thereby improving the generation quality of the reply information and improving the user experience.
In some embodiments, each of the at least one third search result includes a search result identification, and the at least one preset instruction includes a first preset instruction for directing a generation process of the first reply message such that each of the at least one reference message in the first reply message is tagged with the corresponding search result identification, each of the at least one reference message being derived from any of the at least one third search result.
In some embodiments, the at least one preset instruction includes a first preset instruction, which may be used to enable the first language model to mark the reference information referenced to the search result when generating the reply message, and display the reference source (search result identifier) in the generated reply message. For example, each first search result corresponds to a search result identifier (e.g., a search result sequence number), and the first preset instruction may be "please use a reference label to label the search results referenced in the answer, e.g., [1] (single reference source), [1] [2] [3] (multiple reference sources), where the number in brackets is the search result sequence number. "
Fig. 4 shows a first dialogue information schematic according to an exemplary embodiment of the present disclosure.
As shown in fig. 4, the first language model, through understanding the first preset instruction, generates the first reply information generated for the first dialogue information, and marks the reference information 401 in the first reply information through the search result identifier 402.
Therefore, the first preset instruction, the first dialogue information and at least one third search result are input into the first language model, so that the reply information can be more in line with the expectation of the user, the generation quality of the reply information is improved, and the user experience is improved.
In some embodiments, each search result identifier may also be linked to a web page link or a book text of a corresponding third search result, so that when the user clicks the identifier, the user can trace the reference information, and the user can obtain richer information through simple interactive operation, thereby further improving user experience.
In some embodiments, the at least one preset instruction further includes a second preset instruction, where the second preset instruction is configured to guide a generation process of the first reply message, so that the first reply message is displayed in a structured form.
In some embodiments, the at least one preset instruction may include a second preset instruction that may be used to cause the reply message generated by the first language model to be presented in a more structured form (e.g., list, tabular form, etc.). For example, the second preset instructions may be "please organize the answers using a linefeed, list, etc. format to make the answers easy to read and understand. "
Fig. 5 shows a first dialogue information schematic according to an exemplary embodiment of the present disclosure.
As shown in fig. 5, the first language model sorts the search result into one table information 501 while generating the first reply information generated for the first dialogue information through understanding the second preset instruction.
Therefore, the first preset instruction, the first dialogue information and at least one third search result are input into the first language model, so that the reply information can be more in line with the expectations of users, the generation quality of the reply information is improved, the reply information is more convenient to understand and read, and the user experience is improved.
In some embodiments, the at least one preset instruction may further include other preset instructions for assisting the first language model in generating the first reply message. For example, the preset instructions for assisting the first language model in generating the first reply message may include "please avoid generating reply content that is irrelevant to the question, contradictory or semantically repeated as much as possible", "please comprehensively refer to the search result related to the question and reply the question 'first dialogue information'" clearly, smoothly and in detail in combination with own knowledge, and the like. Therefore, by applying the auxiliary preset instruction, the quality of the first reply information can be further improved, and further user experience is improved.
In some embodiments, the plurality of preset instructions may be input into the first language model at the same time, so that the first voice model generates a first reply message with better comprehensive quality based on understanding of each preset instruction, thereby improving user experience.
In some embodiments, in response to the at least one third search result including the special card, the first reply message includes the special card including preset information in a preset format.
Therefore, when the search result contains the special card, the user can directly feed back the special card and the reply information to the user simultaneously while generating the reply information based on the first language model, so that the reply information can be more in line with the expectation of the user, the generation quality of the reply information is improved, and the user experience is improved.
In some embodiments, the special-shaped card may be one of the search results, and the special-shaped card may include preset information arranged in a preset format.
In some embodiments, when the search results include a preset card, the first dialogue information and the search results (including the special card) may be input into the first language model to generate more accurate reply information; meanwhile, the special card can be simultaneously displayed in the reply information while the reply information is displayed, so that the quality of the reply information is further optimized.
In some embodiments, when the search result includes the preset card, only the first dialogue information may be input into the first language model, so as to generate summary information for summarizing the first dialogue information (for example, the first dialogue information of the user is "how to be the weather today", the generated summary information may be "how to be the weather today" as follows), and the special card is directly displayed under the summary information, so that computing resources are further saved, and the accuracy of the reply information is ensured, and meanwhile, the reply efficiency is improved.
In some embodiments, the number of the at least one third search result is a plurality, and inputting the first dialogue information and the at least one third search result into the first language model to obtain the first reply information generated by the first language model includes: aggregating the at least one third search result to obtain at least one set of search results, wherein the search results in each of the at least one set of search results comprise the same topic; and inputting the first dialogue information and each search result in the search result set into a first language model aiming at each search result set in the at least one search result set to obtain second reply information corresponding to the search result set generated by the first language model so as to obtain first reply information based on at least one second reply information corresponding to the at least one search result set.
In some embodiments, when the number of third search results is a plurality, the plurality of third search results may be first aggregated.
In some embodiments, the subject matter (e.g., title information) in each third search result may be extracted and clustered according to semantic similarity between the subject matter, thereby obtaining at least one set of search results.
Therefore, before the reply information is generated, search result aggregation is performed first, search results of the same subject are aggregated together, and corresponding second reply information is generated for each subject respectively, so that first reply information is obtained based on each second reply information, the generation efficiency can be improved, the generation quality of the reply information can be improved, and the user experience can be improved.
In some embodiments, it may be determined that the first dialogue information is dialogue information that requires outputting multiple perspectives (e.g., "which places the a country has play") when the demand analysis is performed on the dialogue information.
In some embodiments, when the model for demand analysis marks the dialogue information as a dialogue information type that needs to output multiple views, more than a certain number of search results may be obtained through data searching, the search results are aggregated to obtain at least one search result set, and the number of search results in each set is counted.
When the first reply information is generated, a specific preset instruction can be matched based on the dialogue information type so as to guide the first language model to carry out information summary of search results of the same theme on the input multiple search results, generate second reply information corresponding to each theme, and mark the outgoing information and the number of the search results for each second reply information. The user can click the provenance information, and information tracing can be performed, so that the user can acquire richer information through simple interactive operation, and user experience is further improved.
In some embodiments, generating first reply information for replying to the first dialog information using the first language model based on the first dialog information and the at least one first search result further comprises: and in response to any third search result meeting the first preset condition not obtained from the at least one first search result, inputting the first dialogue information into the first language model to obtain first reply information generated by the first language model.
Therefore, under the condition that the search results are not ideal (namely, all the first search results do not accord with the first preset condition), the search results are not referred to, and the reply information is directly generated based on the first dialogue information, so that the reply information generation quality is ensured.
In some embodiments, the method for generating reply information further includes: and inputting the first dialogue information into the first language model to obtain third reply information which is generated by the first language model and is used for replying to the first dialogue information in response to the first information indicating that data searching is not required before reply information is generated.
In some embodiments, when the demand analysis model determines that the current first dialogue information does not need to perform data search (for example, when the demand analysis model is a boring sentence, a question requiring to generate a picture, a logical reasoning question, or only includes a question asking for common sense information), the reply information can be directly generated based on the first dialogue information, so that computing resources are saved and computing efficiency is improved.
In some embodiments, the first language model may be a knowledge-enhanced large language model (e.g., ERNIE bot, etc.) for conversations, the first language model being obtained through massive knowledge resource and conversation data training. The model is used as a first language model, not only can be used for directly processing the boring dialogue information, but also can be used for directly generating the reply information of the logical reasoning type, the common sense type and the image generation type, and can further improve the generation efficiency while generating the reply information with higher quality.
In some embodiments, inputting the first dialog information into the first language model to obtain third reply information generated by the first language model for replying to the first dialog information includes: responding to the first dialogue information containing the webpage address, and acquiring page content corresponding to the webpage address; and inputting the first dialogue information and the page content into the first language model to obtain third reply information generated by the first language model, wherein the third reply information comprises fourth reply information for summarizing the page content.
Therefore, when the dialogue information contains the webpage address, the webpage content in the webpage can be further acquired, so that the summary of the webpage address is added in the reply information, the reply information can be more in line with the expectation of the user, the generation quality of the reply information is improved, and the user experience is improved.
In some embodiments, when the demand analysis model determines that the current first session information does not need to perform data searching, it may further detect whether the first session information includes a web page address, for example, uniform Resource Locator (URL) information, web page link, and the like.
When the first dialogue information is detected to contain the webpage address, the webpage content of the webpage corresponding to the webpage address can be firstly obtained, and the first dialogue information and the webpage content are simultaneously input into the first language model so as to output third reply information containing fourth reply information summarizing the webpage content.
In some embodiments, the detection may also be implemented based on the demand analysis model, which analyzes the first session information to obtain the first information of the first session information (without searching data) and its subdivision class (session information including web page address). Then, a specific preset instruction (for example, a preset instruction for instructing the first language model to summarize the webpage content) can be further matched while the webpage content of the webpage corresponding to the webpage address is acquired, and the first dialogue information, the webpage content and the specific preset instruction are input into the first language model together, so that the generation quality of the reply information is further improved, and the user experience is improved.
In some embodiments, the method for generating reply information further includes: responding to at least one round of dialogue performed by a user within a preset period before the first dialogue information is input, and acquiring feedback information of the user for the first dialogue in the at least one round of dialogue, wherein the feedback information is used for indicating satisfaction degree of the user for the reply information generated in the first dialogue; and generating first reply information for replying to the first dialogue information using the first language model based on the first dialogue information and at least one first search result includes: and inputting the first dialogue information, the feedback information and at least one first search result into the first language model to obtain first reply information generated by the first language model.
Therefore, when the reply information is generated, the feedback of the user on the reply information in the history dialogue can be further introduced to guide the generation of the reply information in the round of dialogue, so that the reply information better accords with the user expectation, the generation quality of the reply information is improved, and the user experience is improved.
In some embodiments, when the user has performed at least one round of dialogue before inputting the first dialogue information and the user has evaluated the reply information (feedback information) in one or more rounds of dialogue in the previous at least one round of dialogue, one or more pieces of feedback information may be input into the first language model together with the first dialogue information and the at least one first search result to obtain the first reply information generated by the first language model.
In some embodiments, the first dialogue may be a previous dialogue before the first dialogue information is input, and after the user evaluates the previous dialogue, a specific preset instruction may be matched based on the feedback information (for example, when the feedback information is "unsatisfied", the preset instruction is used for indicating that reply information with a form and/or content similar to that of the previous round of reply information is not to be generated, and when the feedback information is "satisfied", the preset instruction is used for indicating that reply information with a form and/or content similar to that of the previous round of reply information is preferably generated), and the preset instruction is input into the first language model together with the first dialogue information and at least one first search result to obtain the first reply information generated by the first language model.
In some embodiments, when the first session includes multiple rounds of sessions and the user feeds back reply information for each round of sessions, the number of positive information and negative information in the feedback information may be counted, and a specific preset instruction is matched (for example, the preference of the user for the reply information is analyzed based on the feedback information), and the positive information, the negative information, the respective number thereof, and the preset instruction are input into the first language model together with the first session information and at least one first search result, so as to obtain first reply information generated by the first language model. Therefore, the generation quality of the reply information can be further improved, the reply information is more in line with the expectations of users, and the user experience is improved.
In some embodiments, the method for generating reply information further includes: based on the first dialogue information and the first reply information, predicting second information in the first reply information so as to highlight the second information when the first reply information is displayed.
As shown in fig. 4, before the first reply message is displayed, the first dialogue information and the generated first reply message may be input into a trained reading understanding model at the same time, and second information (for example, key information) in the first reply message is marked by the reading understanding model, and when the first reply message is displayed, the second information 403 is highlighted (for example, enlarged display or highlighted display).
Thus, through analysis understanding of the first dialogue information and the first reply information, the second information (such as key information) in the first reply information is obtained through prediction (for example, a trained reading understanding model can be applied), and the key in the reply information is highlighted. Therefore, the reply information can be more in line with the expectations of users, the generation quality of the reply information is improved, the reply information is more convenient to understand and read, and the user experience is improved.
In some embodiments, the method for generating reply information further includes: based on the first dialogue information and the first reply information, at least one recommended problem is predicted to guide the user to make a challenge.
In some embodiments, after the reply message is generated, the session information and the reply message may be further input into a trained generation model, and one or more recommended questions for guiding the user to make a challenge may be generated through analysis.
Fig. 6 shows a human-machine interaction interface schematic diagram according to an exemplary embodiment of the present disclosure.
As shown in fig. 6, while the first reply message 601 is displayed, one or more recommended questions 602 may also be displayed in a preset area (e.g., in or above the dialog information input box) below the first reply message 601.
Therefore, after the reply information is generated, the prediction can be further performed based on the session information and the reply information of the round so as to obtain at least one recommended problem, so that the user can be guided to conduct the inquiry, and the user experience is improved.
In some embodiments, predicting at least one recommendation problem based on the first dialogue information and the first reply information comprises: and responding to at least one round of dialogue which is performed by the user within a preset period before the first dialogue information is input, and predicting to obtain at least one recommended problem based on the first dialogue information, the first reply information and question-answer information in each round of dialogue in at least one round of dialogue, wherein the question-answer information comprises second dialogue information input by the user in the corresponding dialogue and reply information generated aiming at the second dialogue information.
In some embodiments, when the user has performed at least one round of dialogue within a preset period before the first dialogue information is input, one or more rounds of dialogue information before the first dialogue information is input, together with the first dialogue information and the first reply information, may be simultaneously input into the generation model, so that the recommendation problem is more accurate by introducing the question and answer information in the historical multiple rounds of dialogue into the generation process of the recommendation problem.
In some embodiments, as shown in fig. 7, there is provided an apparatus 700 for generating reply information, comprising:
A first acquisition unit 710 configured to acquire first dialogue information input by a user;
A second obtaining unit 720 configured to obtain, based on the first dialogue information, requirement analysis information including first information indicating whether or not data search is required before generating the reply information;
A search unit 730 configured to search for at least one first search result based on the first dialogue information in response to the first information indicating that the data search is required; and
The generating unit 740 is configured to generate first reply information for replying to the first dialogue information using the first language model based on the first dialogue information and at least one first search result.
According to the embodiment of the disclosure, after the first dialogue information input by the user is acquired, firstly, the first dialogue information is subjected to requirement analysis, only the first dialogue information needing to be subjected to data search is subjected to data search, and the first reply information is generated through the first language model based on the search result and the dialogue information, so that the dialogue information needing not to be subjected to data search can be filtered, the calculation resources are saved, and the calculation efficiency is improved.
The operations of the units 710 to 740 of the apparatus 700 for generating reply messages are similar to those of the steps S201 to S204 described above, and are not repeated here.
According to embodiments of the present disclosure, there is also provided an electronic device, a readable storage medium and a computer program product.
Referring to fig. 8, a block diagram of an electronic device 800 that may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the electronic device 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in electronic device 800 are connected to I/O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 may be any type of device capable of inputting information to the electronic device 800, the input unit 806 may receive input numeric or character information and generate key signal inputs related to user settings and/or function control of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and/or a remote control. The output unit 807 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. The storage unit 808 may include, but is not limited to, magnetic disks, optical disks. The communication unit 809 allows the electronic device 800 to exchange information/data with other devices over computer networks, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth devices, 802.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the respective methods and processes described above, such as the method for generating reply information described above. For example, in some embodiments, the above-described method for generating reply-message may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 800 via the ROM 802 and/or the communication unit 809. When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more of the steps of the above-described method for generating reply information may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the above-described method for generating reply information by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the foregoing methods, systems, and apparatus are merely exemplary embodiments or examples, and that the scope of the present invention is not limited by these embodiments or examples but only by the claims following the grant and their equivalents. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the disclosure.

Claims (18)

1. A method for generating reply messages, the method comprising:
Acquiring first dialogue information input by a user;
Based on the first dialogue information, obtaining requirement analysis information includes:
inputting the first dialogue information into a generated model for demand analysis to obtain the demand analysis information output by the generated model, wherein the demand analysis information comprises first information, the first information is used for indicating whether data searching is needed before reply information is generated, and when the first information indicates that data searching is needed, the demand analysis information further comprises at least one query text generated based on the first dialogue information, the at least one query text is obtained by disassembling and simplifying the first dialogue information based on the generated model, and the generated model is obtained based on sample dataset training, the sample dataset comprises a plurality of sample dialogue information and sample labels corresponding to each sample dialogue information, the sample labels comprise first sample labels and second sample labels, the first sample labels are used for indicating that the corresponding sample dialogue information does not need to be searched, and the second sample labels comprise labels used for indicating that the corresponding sample dialogue information needs to be searched and at least one preset query text corresponding to the corresponding sample dialogue information;
Responding to the first information to indicate that data searching is needed, searching based on the first dialogue information to obtain at least one first searching result, wherein the method comprises the following steps:
Responding to the first information to indicate that data searching is needed, and acquiring at least one second searching result corresponding to each query text in the at least one query text based on the query text; and
Acquiring at least one first search result based on at least one second search result corresponding to each query text in the at least one query text; and
Generating first reply information for replying to the first dialogue information by using a first language model based on the first dialogue information and the at least one first search result.
2. The method of claim 1, wherein the generating first reply information for replying to the first dialogue information using a first language model based on the first dialogue information and the at least one first search result comprises:
obtaining a score for each of the at least one first search result, the score being used to evaluate at least one of content quality, timeliness, authority, and relevance to the respective query text of the respective first search result; and
And in response to obtaining at least one third search result meeting a first preset condition from the at least one first search result, inputting the first dialogue information and the at least one third search result into the first language model to obtain the first reply information generated by the first language model, wherein the first preset condition indicates that the score is larger than a preset threshold.
3. The method of claim 2, wherein the inputting the first dialogue information and the at least one third search result into the first language model to obtain the first reply information generated by the first language model comprises:
Inputting the first dialogue information, the at least one third search result and at least one preset instruction into the first language model to obtain the first reply information generated by the first language model, wherein the at least one preset instruction is used for guiding the generation process of the first reply information so as to enable the first reply information to be generated into information in a specific form.
4. A method according to claim 3, wherein each third search result of the at least one third search result comprises a search result identification, and the at least one preset instruction comprises a first preset instruction for directing the generation of the first reply message such that each reference information of the at least one reference information of the first reply message is tagged with the corresponding search result identification, each reference information of the at least one reference information being derived from any third search result of the at least one third search result.
5. The method according to claim 3 or 4, wherein the at least one preset instruction further comprises a second preset instruction, the second preset instruction being used to guide the generation process of the first reply message, so that the first reply message is displayed in a structured form.
6. The method of claim 3 or 4, wherein the first reply message includes a special card including preset information in a preset format in response to the at least one third search result including the special card.
7. The method of any of claims 2 to 4, wherein the number of the at least one third search result is a plurality, the inputting the first dialogue information and the at least one third search result into the first language model to obtain the first reply information generated by the first language model comprises:
Aggregating the at least one third search result to obtain at least one set of search results, wherein the search results in each of the at least one set of search results comprise the same topic; and
Inputting the first dialogue information and each search result in the search result set into the first language model aiming at each search result set in the at least one search result set, and obtaining second reply information corresponding to the search result set generated by the first language model so as to obtain the first reply information based on at least one second reply information corresponding to the at least one search result set.
8. The method of claim 2, wherein the generating first reply information for replying to the first dialogue information using a first language model based on the first dialogue information and the at least one first search result further comprises:
and in response to any third search result meeting the first preset condition not obtained from the at least one first search result, inputting the first dialogue information into a first language model to obtain the first reply information generated by the first language model.
9. The method of claim 1, further comprising:
And inputting the first dialogue information into the first language model to obtain third reply information which is generated by the first language model and is used for replying to the first dialogue information in response to the first information indicating that data searching is not required before reply information is generated.
10. The method of claim 9, the inputting the first dialog information into the first language model to obtain third reply information generated by the first language model to reply to the first dialog information comprising:
Responding to the first dialogue information containing a webpage address, and acquiring page content corresponding to the webpage address; and
And inputting the first dialogue information and the page content into the first language model to obtain the third reply information generated by the first language model, wherein the third reply information comprises fourth reply information for summarizing the page content.
11. The method of any one of claims 1 to 4, further comprising:
Responding to at least one round of dialogue which is performed by the user within a preset time period before the first dialogue information is input, and acquiring feedback information of the user for the first dialogue in the at least one round of dialogue, wherein the feedback information is used for indicating satisfaction degree of the user for the reply information generated in the first dialogue; and
The generating, based on the first dialogue information and the at least one first search result, first reply information for replying to the first dialogue information using a first language model includes:
and inputting the first dialogue information, the feedback information and the at least one first search result into the first language model to obtain the first reply information generated by the first language model.
12. The method of any one of claims 1 to 4, further comprising:
And predicting second information in the first reply information based on the first dialogue information and the first reply information so as to highlight the second information when the first reply information is displayed.
13. The method of any one of claims 1 to 4, further comprising:
and predicting at least one recommended problem based on the first dialogue information and the first reply information so as to guide the user to make an inquiry.
14. The method of claim 13, wherein predicting at least one recommended question based on the first dialogue information and the first reply information comprises:
and responding to at least one round of dialogue which is performed by the user within a preset period before the first dialogue information is input, and predicting to obtain the at least one recommended problem based on the first dialogue information, the first reply information and question-answer information in each round of dialogue in the at least one round of dialogue, wherein the question-answer information comprises second dialogue information input by the user in the corresponding dialogue and reply information generated aiming at the second dialogue information.
15. The method of any of claims 1-4, wherein the first language model is obtained based at least on knowledge resources and dialogue data training of a preset scale.
16. An apparatus for generating reply messages, the apparatus comprising:
a first acquisition unit configured to acquire first dialogue information input by a user;
a second acquisition unit configured to acquire demand analysis information based on the first dialogue information, including:
inputting the first dialogue information into a generated model for demand analysis to obtain the demand analysis information output by the generated model, wherein the demand analysis information comprises first information, the first information is used for indicating whether data searching is needed before reply information is generated, and when the first information indicates that data searching is needed, the demand analysis information further comprises at least one query text generated based on the first dialogue information, the at least one query text is obtained by disassembling and simplifying the first dialogue information based on the generated model, and the generated model is obtained based on sample dataset training, the sample dataset comprises a plurality of sample dialogue information and sample labels corresponding to each sample dialogue information, the sample labels comprise first sample labels and second sample labels, the first sample labels are used for indicating that the corresponding sample dialogue information does not need to be searched, and the second sample labels comprise labels used for indicating that the corresponding sample dialogue information needs to be searched and at least one preset query text corresponding to the corresponding sample dialogue information;
A search unit configured to search for at least one first search result based on the first dialogue information in response to the first information indicating that data search is required, including:
Responding to the first information to indicate that data searching is needed, and acquiring at least one second searching result corresponding to each query text in the at least one query text based on the query text; and
Acquiring at least one first search result based on at least one second search result corresponding to each query text in the at least one query text; and
And a generating unit configured to generate first reply information for replying to the first dialogue information using a first language model based on the first dialogue information and the at least one first search result.
17. An electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein the method comprises the steps of
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-15.
18. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-15.
CN202310416928.7A 2023-04-18 2023-04-18 Method, device, equipment and medium for generating reply information Active CN116521841B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310416928.7A CN116521841B (en) 2023-04-18 2023-04-18 Method, device, equipment and medium for generating reply information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310416928.7A CN116521841B (en) 2023-04-18 2023-04-18 Method, device, equipment and medium for generating reply information

Publications (2)

Publication Number Publication Date
CN116521841A CN116521841A (en) 2023-08-01
CN116521841B true CN116521841B (en) 2024-05-14

Family

ID=87393344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310416928.7A Active CN116521841B (en) 2023-04-18 2023-04-18 Method, device, equipment and medium for generating reply information

Country Status (1)

Country Link
CN (1) CN116521841B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737910B (en) * 2023-08-10 2024-03-29 腾讯科技(深圳)有限公司 Intelligent dialogue processing method, device, equipment and storage medium
CN116821307B (en) * 2023-08-21 2023-11-28 腾讯科技(深圳)有限公司 Content interaction method, device, electronic equipment and storage medium
CN117033030A (en) * 2023-08-25 2023-11-10 玻尔科技成都有限公司 Application program interface scheduling system and method based on large-scale language model

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7519529B1 (en) * 2001-06-29 2009-04-14 Microsoft Corporation System and methods for inferring informational goals and preferred level of detail of results in response to questions posed to an automated information-retrieval or question-answering service
JP2013206177A (en) * 2012-03-28 2013-10-07 Fujitsu Ltd Question/answer search system, question/answer search method and program
WO2017041372A1 (en) * 2015-09-07 2017-03-16 百度在线网络技术(北京)有限公司 Man-machine interaction method and system based on artificial intelligence
CN107992554A (en) * 2017-11-28 2018-05-04 北京百度网讯科技有限公司 The searching method and device of the polymerization result of question and answer information are provided
CN110096516A (en) * 2019-03-25 2019-08-06 北京邮电大学 The dialogue generation method and system of customized database interaction
CN110196927A (en) * 2019-05-09 2019-09-03 大众问问(北京)信息科技有限公司 It is a kind of to take turns interactive method, device and equipment more
CN111368538A (en) * 2020-02-29 2020-07-03 平安科技(深圳)有限公司 Voice interaction method, system, terminal and computer readable storage medium
CN113886543A (en) * 2021-09-29 2022-01-04 北京百度网讯科技有限公司 Method, apparatus, medium, and program product for generating an intent recognition model
CN115455161A (en) * 2022-09-02 2022-12-09 北京百度网讯科技有限公司 Conversation processing method, conversation processing device, electronic equipment and storage medium
CN115481227A (en) * 2022-09-20 2022-12-16 北京百度网讯科技有限公司 Man-machine interaction dialogue method, device and equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339551B (en) * 2007-07-05 2013-01-30 日电(中国)有限公司 Natural language query demand extension equipment and its method
US20180052913A1 (en) * 2016-08-16 2018-02-22 Ebay Inc. Selecting next user prompt types in an intelligent online personal assistant multi-turn dialog
CN112507099B (en) * 2020-12-18 2021-12-24 北京百度网讯科技有限公司 Training method, device, equipment and storage medium of dialogue understanding model

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7519529B1 (en) * 2001-06-29 2009-04-14 Microsoft Corporation System and methods for inferring informational goals and preferred level of detail of results in response to questions posed to an automated information-retrieval or question-answering service
JP2013206177A (en) * 2012-03-28 2013-10-07 Fujitsu Ltd Question/answer search system, question/answer search method and program
WO2017041372A1 (en) * 2015-09-07 2017-03-16 百度在线网络技术(北京)有限公司 Man-machine interaction method and system based on artificial intelligence
CN107992554A (en) * 2017-11-28 2018-05-04 北京百度网讯科技有限公司 The searching method and device of the polymerization result of question and answer information are provided
CN110096516A (en) * 2019-03-25 2019-08-06 北京邮电大学 The dialogue generation method and system of customized database interaction
CN110196927A (en) * 2019-05-09 2019-09-03 大众问问(北京)信息科技有限公司 It is a kind of to take turns interactive method, device and equipment more
CN111368538A (en) * 2020-02-29 2020-07-03 平安科技(深圳)有限公司 Voice interaction method, system, terminal and computer readable storage medium
CN113886543A (en) * 2021-09-29 2022-01-04 北京百度网讯科技有限公司 Method, apparatus, medium, and program product for generating an intent recognition model
CN115455161A (en) * 2022-09-02 2022-12-09 北京百度网讯科技有限公司 Conversation processing method, conversation processing device, electronic equipment and storage medium
CN115481227A (en) * 2022-09-20 2022-12-16 北京百度网讯科技有限公司 Man-machine interaction dialogue method, device and equipment

Also Published As

Publication number Publication date
CN116521841A (en) 2023-08-01

Similar Documents

Publication Publication Date Title
JP7127106B2 (en) Question answering process, language model training method, apparatus, equipment and storage medium
CN116521841B (en) Method, device, equipment and medium for generating reply information
US11258902B2 (en) Partial automation of text chat conversations
CN116501960B (en) Content retrieval method, device, equipment and medium
CN116303962B (en) Dialogue generation method, training method, device and equipment for deep learning model
CN114595686B (en) Knowledge extraction method, and training method and device of knowledge extraction model
US20230283582A1 (en) Topic overlap detection in messaging systems
CN114625855A (en) Method, apparatus, device and medium for generating dialogue information
US20240104154A1 (en) Ranking of recall data
WO2022018676A1 (en) Natural language enrichment using action explanations
CN114443989B (en) Ranking method, training method and device of ranking model, electronic equipment and medium
CN116028605A (en) Logic expression generation method, model training method, device and medium
CN116541536B (en) Knowledge-enhanced content generation system, data generation method, device, and medium
CN115862031B (en) Text processing method, neural network training method, device and equipment
CN115879469B (en) Text data processing method, model training method, device and medium
CN114490986B (en) Computer-implemented data mining method, device, electronic equipment and storage medium
CN114547270B (en) Text processing method, training method, device and equipment for text processing model
CN116361547A (en) Information display method, device, equipment and medium
CN113590782B (en) Training method of reasoning model, reasoning method and device
CN114238745A (en) Method and device for providing search result, electronic equipment and medium
CN116450917B (en) Information searching method and device, electronic equipment and medium
CN116841506B (en) Program code generation method and device, and model training method and device
CN114861658B (en) Address information analysis method and device, equipment and medium
US20230044508A1 (en) Data labeling processing
CN115809364B (en) Object recommendation method and model training method

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