Method and apparatus for outputting information

By receiving and processing user input information, determining keywords and retrieving the most similar reply statements, the problem of insufficient reply accuracy of intelligent interactive robots is solved, and higher reply accuracy is achieved.

CN110263142BActive Publication Date: 2025-09-26BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910566145.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-27
Publication Date
2025-09-26
Estimated Expiration
2039-06-27

AI Technical Summary

Technical Problem

Existing intelligent interactive robots lack accuracy when responding to user input information and are unable to meet user needs.

Method used

By receiving user input information, processing and determining keywords, searching the knowledge base, calculating the similarity between the reply statement and the input information, and outputting the target reply statement with the highest similarity.

Benefits of technology

The accuracy of responses has been improved to better meet user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110263142B_ABST
    Figure CN110263142B_ABST
Patent Text Reader

Abstract

The present application discloses a method and apparatus for outputting information, relating to the field of cloud computing. A specific implementation of the method includes: receiving input information sent by a first user; processing the input information to determine keywords corresponding to the input information; searching at least one knowledge base based on the keywords to obtain at least one reply statement; determining a similarity between the at least one reply statement and the input information; determining a target reply statement from the at least one reply statement based on the obtained at least one similarity; and outputting the target reply statement. This implementation can improve the accuracy of replies and better meet user needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and more particularly to a method and apparatus for outputting information. Background Art

[0002] With the development of human-computer interaction technology, language-based human-computer interaction has also been widely used. For example, intelligent interactive robots, such as online customer service robots and mobile assistants, can provide services to users. Typically, after a user enters information in a chat window, the intelligent interactive robot automatically responds with relevant statements based on the user's input and according to certain logic. Summary of the Invention

[0003] The embodiments of the present application provide a method and apparatus for outputting information.

[0004] In a first aspect, an embodiment of the present application provides a method for outputting information, comprising: receiving input information sent by a first user; processing the input information to determine keywords corresponding to the input information; searching at least one knowledge base based on the keywords to obtain at least one reply statement; determining the similarity between the at least one reply statement and the input information; determining a target reply statement from the at least one reply statement based on the obtained at least one similarity; and outputting the target reply statement.

[0005] In some embodiments, the above-mentioned input information includes input text; and the above-mentioned processing of the above-mentioned input information to determine the keywords corresponding to the above-mentioned input information includes: performing word segmentation processing on the above-mentioned input text to obtain at least one word; performing at least one of the following processing on the above-mentioned at least one word: determining synonyms of the above-mentioned at least one word, removing stop words in the above-mentioned at least one word, and extracting core words in the above-mentioned at least one word; and determining the above-mentioned keywords based on the words obtained after processing.

[0006] In some embodiments, the determining of synonyms of the at least one word includes: determining the synonyms of the at least one word according to the at least one word and a synonym correspondence relationship associated with the at least one knowledge base.

[0007] In some embodiments, the at least one knowledge base mentioned above includes a first knowledge base; and the above-mentioned searching at least one knowledge base according to the above-mentioned keywords to obtain at least one reply statement includes: searching the above-mentioned first knowledge base according to the above-mentioned keywords to obtain at least one first reply statement; performing intent recognition on the above-mentioned input information to obtain an intent recognition result; determining whether the at least one first reply statement includes at least one second reply statement that matches the above-mentioned intent recognition result; in response to the determination of including, using the at least one second reply statement as at least one reply statement.

[0008] In some embodiments, the above-mentioned retrieval of at least one knowledge base based on the above-mentioned keywords to obtain at least one reply statement includes: in response to determining that it is not included, outputting the above-mentioned intention recognition result; receiving modification information of the second user for the above-mentioned intention recognition result, and determining the updated intention based on the above-mentioned modification information; based on the above-mentioned updated intention, determining at least one second reply statement that matches the above-mentioned intention recognition result from the above-mentioned at least one first reply statement.

[0009] In the second aspect, an embodiment of the present application provides a device for outputting information, including: an input information receiving unit, configured to receive input information sent by a first user; a keyword determination unit, configured to process the above-mentioned input information and determine the keywords corresponding to the above-mentioned input information; a reply statement determination unit, configured to search at least one knowledge base based on the above-mentioned keywords to obtain at least one reply statement; a similarity determination unit, configured to determine the similarity between the above-mentioned at least one reply statement and the above-mentioned input information; a target reply statement determination unit, configured to determine a target reply statement from the above-mentioned at least one reply statement based on the at least one similarity obtained; and a target reply statement output unit, configured to output the above-mentioned target reply statement.

[0010] In some embodiments, the above-mentioned input information includes input text; and the above-mentioned keyword determination unit is further configured to: perform word segmentation processing on the above-mentioned input text to obtain at least one word; perform at least one of the following processing on the above-mentioned at least one word: determine synonyms of the above-mentioned at least one word, remove stop words in the above-mentioned at least one word, and extract core words in the above-mentioned at least one word; determine the above-mentioned keywords based on the words obtained after processing.

[0011] In some embodiments, the keyword determination unit is further configured to determine a synonym of the at least one word based on the at least one word and a synonym correspondence list associated with the at least one knowledge base.

[0012] In some embodiments, the at least one knowledge base includes a first knowledge base; and the reply statement determination unit is further configured to: search the first knowledge base according to the keywords to obtain at least one first reply statement; perform intent recognition on the input information to obtain an intent recognition result; determine whether the at least one first reply statement includes at least one second reply statement that matches the intent recognition result; and in response to determining that it includes, use the at least one second reply statement as at least one reply statement.

[0013] In some embodiments, the above-mentioned reply statement determination unit is further configured to: in response to determining that it is not included, output the above-mentioned intention recognition result; receive modification information from the second user for the above-mentioned intention recognition result, and determine the updated intention based on the above-mentioned modification information; based on the above-mentioned updated intention, determine at least one second reply statement that matches the above-mentioned intention recognition result from the above-mentioned at least one first reply statement.

[0014] In a third aspect, an embodiment of the present application provides a server comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any embodiment of the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the first aspect.

[0016] The method and device for outputting information provided by the above-mentioned embodiments of the present application can first receive the input text sent by the first user. Then, the input text can be processed to determine the keywords corresponding to the input text. And at least one knowledge base is searched based on the keywords to obtain at least one reply statement. Then, the similarity between the at least one reply statement and the input text is determined. Then, based on at least one similarity, the target reply statement is determined from the at least one reply statement. Finally, the target reply statement is output. The method of this embodiment can improve the accuracy of the reply and better meet user needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0018] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;

[0019] Figure 2 is a flowchart of an embodiment of a method for outputting information according to the present application;

[0020] Figure 3 is a schematic diagram of an application scenario of the method for outputting information according to the present application;

[0021] Figure 4 is a flowchart of another embodiment of a method for outputting information according to the present application;

[0022] Figure 5is a structural diagram of an embodiment of a device for outputting information according to the present application;

[0023] Figure 6 It is a structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present application. DETAILED DESCRIPTION

[0024] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.

[0025] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0026] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the method for outputting information or the apparatus for outputting information of the present application can be applied.

[0027] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0028] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as intelligent question-and-answer applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0029] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens and supporting information input, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3) players, MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, laptop computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0030] The server 105 may be a server that provides various services, such as a backend server that supports input texts sent by the terminal devices 101, 102, and 103. The backend server may analyze and process the received input texts and other data, and feed back the processing results (e.g., target reply sentences) to the terminal devices 101, 102, and 103.

[0031] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitations are given here.

[0032] It should be noted that the method for outputting information provided in the embodiment of the present application is generally executed by the server 105. Accordingly, the device for outputting information is generally provided in the server 105.

[0033] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0034] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for outputting information according to the present application. The method for outputting information in this embodiment includes the following steps:

[0035] Step 201: Receive input text sent by a first user.

[0036] In this embodiment, the execution subject of the method for outputting information (eg Figure 1 The server 105 shown in the figure can receive the input text sent by the first user via a wired connection or a wireless connection. The first user can be any user who wants to receive a reply statement. The input information can be any information entered by the user through the terminal. The input information can be in various forms, such as voice, text, video, etc.

[0037] It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0038] Step 202: Process the input information to determine the keywords corresponding to the input information.

[0039] After receiving the input information, the execution entity may process the input information to determine the keywords corresponding to the input information. When the input information is voice, the processing may include voice recognition. When the input information is video, the processing may include voice recognition, expression recognition, etc. When the input information is text, the processing may include word segmentation, word segmentation, etc. Through the above processing, the execution entity can obtain the text corresponding to the input information, and then determine the keywords corresponding to the input information. For example, the execution entity can use the obtained text as a keyword, or segment the text to obtain a keyword.

[0040] In some optional implementations of this embodiment, the input information may include input text. Then the above step 202 may specifically include: Figure 2 The following steps are not shown in the figure: performing word segmentation processing on the input text to obtain at least one word; performing at least one of the following processing on the at least one word: determining synonyms of the at least one word, removing stop words in the at least one word, and extracting core words in the at least one word; and determining keywords based on the words obtained after processing.

[0041] In this implementation, the execution subject can first perform word segmentation on the input text, so that at least one word can be obtained. Then, the execution subject can determine the synonyms of each word, remove the stop words in each word, or extract the core words in each word. Here, stop words refer to empty words and non-retrieval words in computer retrieval. In the field of information retrieval, in order to save storage space and improve search efficiency, search engines will automatically ignore certain words or phrases when indexing pages or processing search requests. These words or phrases are called stop words. The execution subject can utilize various core word extraction algorithms (for example, wordRank algorithm) to extract the core words in each word. The execution subject can use each word obtained after processing as a keyword.

[0042] In some optional implementations of this embodiment, the execution subject can determine the synonyms of each word by Figure 2 The following steps (not shown) are implemented: determining a synonym of at least one word according to at least one word and a synonym correspondence list associated with at least one knowledge base.

[0043] In this implementation, each knowledge base can be associated with a synonym correspondence list. It is understandable that different knowledge bases are set up in different application scenarios. Therefore, the synonyms in different application scenarios may also be different. For example, in a banking application scenario, the terms "credit card" and "debit card" are synonyms. Therefore, in this implementation, the synonym correspondence list is associated with the knowledge base, which can improve the accuracy of retrieval.

[0044] Step 203: Search at least one knowledge base based on the keyword to obtain at least one reply statement.

[0045] After obtaining the keywords corresponding to the input information, the execution subject can use the above keywords to search at least one knowledge base. In this embodiment, the knowledge base is a structured, easy-to-operate, easy-to-use, and comprehensively organized knowledge cluster in knowledge engineering. It is a collection of interconnected knowledge pieces that are stored, organized, managed, and used in computer memory using a certain (or several) knowledge representation methods to solve problems in a certain (or certain) field. These knowledge pieces include theoretical knowledge related to the field, real-time data, and heuristic knowledge obtained from expert experience (such as relevant definitions, theorems and operating rules in a certain field, as well as common sense knowledge, etc.). By searching each knowledge base, the execution subject can obtain at least one reply statement.

[0046] Step 204: Determine the similarity between at least one reply statement and the input information.

[0047] After retrieving at least one reply statement, the execution entity can calculate the similarity between each reply statement and the input information. The execution entity can use various methods to calculate the similarity between the reply statement and the input information. For example, the execution entity can first determine the vectors of the reply statement and the input information. Then, the execution entity can calculate the distance between the two vectors and use the obtained distance as the similarity between the two.

[0048] Step 205: Determine a target reply statement from at least one reply statement based on the obtained at least one similarity.

[0049] After obtaining the similarities between each reply statement and the input information, the execution entity may determine a target reply statement from the reply statements based on the similarities. Specifically, the execution entity may sort the reply statements based on the similarities and select the reply statement that ranks first, i.e., the one with the greatest similarity, as the target reply statement.

[0050] Step 206: output the target reply statement.

[0051] After determining the target reply statement, the execution entity may output the target reply statement for the first user to view.

[0052] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the method for outputting information according to this embodiment. Figure 3 In an application scenario, a user enters the message "How do I rent a car?" on the intelligent customer service page via terminal device 301. After receiving this input, server 302 processes it and obtains the keyword "car rental." Then, based on this keyword, it searches three knowledge bases: a multi-round task-based dialogue knowledge base, a question-and-answer knowledge base, and a casual chat knowledge base. Each knowledge base matches multiple response statements. The execution entity calculates the similarity between each of these response statements and the input information and outputs the response with the highest similarity, "Please enter your car rental location?", as the target response statement to the user.

[0053] The method for outputting information provided by the above-mentioned embodiment of the present application can first receive the input text sent by the first user. Then, the input text can be processed to determine the keywords corresponding to the input text. And at least one knowledge base is searched based on the keywords to obtain at least one reply statement. Then, the similarity between the at least one reply statement and the input text is determined. Then, based on at least one similarity, the target reply statement is determined from the at least one reply statement. Finally, the target reply statement is output. The method of this embodiment can improve the accuracy of the reply and better meet user needs.

[0054] Continue to see Figure 4, which shows a process 400 of another embodiment of the method for outputting information according to the present application. In this embodiment, the at least one knowledge base may include a first knowledge base. The first knowledge base may be a multi-round task-based dialogue knowledge base. Figure 4 As shown, in this embodiment, at least one reply statement can be determined by the following steps:

[0055] Step 401: Search the first knowledge base based on the keyword to obtain at least one first reply statement.

[0056] In this embodiment, the execution subject may first search the first knowledge base according to the keyword to obtain at least one first reply statement. It is understandable that the first reply statement is a reply statement in the first knowledge base that matches the keyword.

[0057] Step 402: perform intent recognition on the input information to obtain an intent recognition result.

[0058] The execution subject can also perform intent recognition on the input information. Specifically, the execution subject can perform intent recognition on the input information by matching the word list. The above-mentioned word list can be a correspondence table that is pre-formulated by technicians based on statistics of a large number of keywords and intent categories, and stores the correspondence between multiple keywords and intent categories. In this way, the execution subject can match the obtained keywords with multiple keywords in the correspondence table in sequence, and obtain the intent category corresponding to the keyword in the correspondence table that is most similar to the obtained keyword based on the matching results. And use the intent category as the intent recognition result. Alternatively, the execution subject can import the above-mentioned input information into a pre-established intent recognition model to obtain the intent category corresponding to the input information. Among them, the above-mentioned intent recognition model can be used to characterize the correspondence between input information and intent categories. The above-mentioned intent recognition model can be obtained based on a machine learning method. Specifically, the above-mentioned intent classification model can be obtained by training a model for classification such as a Naive Bayesian Model (NBM) or a Support Vector Machine (SVM).

[0059] Step 403: Determine whether the at least one first reply statement includes at least one second reply statement that matches the intention recognition result.

[0060] After determining the intention recognition result of the input information, the execution subject can determine whether each first reply statement includes at least one second reply statement that matches the intention recognition result. Here, the execution subject can determine whether the intention recognition result matches the second reply statement in a variety of ways. For example, the execution subject can determine whether the intention recognition result matches the second reply statement by calculating the distance between the vector of the intention recognition result and the vector of the second reply statement. Alternatively, the execution subject can generate a third reply statement based on the intention recognition result, and then calculate the similarity between the third reply statement and the second reply statement to determine whether the intention recognition result matches the second reply statement.

[0061] Step 404 , in response to the determination including, taking at least one second reply statement as at least one reply statement.

[0062] If the execution entity determines that at least one first reply statement includes at least one second reply statement that matches the intention recognition result, the execution entity may use the at least one second reply statement as at least one reply statement for subsequent similarity calculation.

[0063] Step 405: In response to determining that it is not included, output the intention recognition result.

[0064] If the execution entity determines that at least one first reply statement does not include at least one second reply statement that matches the intent recognition result, there may be an intent recognition error. The execution entity may output the intent recognition result for viewing by a second user. Here, the second user may be the same as the first user or different from the first user.

[0065] Step 406: Receive modification information from the second user regarding the intention recognition result, and determine the updated intention based on the modification information.

[0066] After outputting the intent recognition result, the execution subject may receive modification information from the second user regarding the intent recognition result. If the execution subject receives the modification information, it indicates that the intent recognition result obtained in step 402 is incorrect. The execution subject may determine the updated intent based on the modification information.

[0067] Step 407: Determine at least one second reply statement that matches the intention recognition result from the at least one first reply statement based on the updated intention.

[0068] The execution subject may determine at least one second reply statement that matches the intention recognition result from the at least one first reply statement based on the updated intention, and use the determined second reply statement as the reply statement for subsequent similarity calculation.

[0069] The method for outputting information provided in the above-mentioned embodiments of the present application can perform intent recognition on user input information and, if the intent recognition is incorrect, receive user correction information for the incorrect intent recognition result for re-retrieval. This eliminates the need to retrain the model used for intent recognition, saving training time.

[0070] Further references Figure 5 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for outputting information. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0071] like Figure 5 As shown, the device 500 for outputting information in this embodiment includes: an input information receiving unit 501, a keyword determination unit 502, a reply sentence determination unit 503, a similarity determination unit 504, a target reply sentence determination unit 505 and a target reply sentence output unit 506.

[0072] The input information receiving unit 501 is configured to receive input information sent by a first user.

[0073] The keyword determination unit 502 is configured to process the input information and determine keywords corresponding to the input information.

[0074] The reply sentence determining unit 503 is configured to search at least one knowledge base according to keywords to obtain at least one reply sentence.

[0075] The similarity determination unit 504 is configured to determine the similarity between at least one reply statement and the input information.

[0076] The target reply sentence determining unit 505 is configured to determine a target reply sentence from at least one reply sentence based on at least one similarity obtained.

[0077] The target reply sentence output unit 506 is configured to output the target reply sentence.

[0078] In some optional implementations of this embodiment, the input information includes input text. The keyword determination unit 502 may be further configured to: perform word segmentation processing on the input text to obtain at least one word; perform at least one of the following processing on the at least one word: determine synonyms of the at least one word, remove stop words from the at least one word, and extract core words from the at least one word; and determine keywords based on the words obtained after the processing.

[0079] In some optional implementations of this embodiment, the input information includes input text. The keyword determination unit 502 may be further configured to: determine a synonym of at least one word according to at least one word and a synonym correspondence list associated with at least one knowledge base.

[0080] In some optional implementations of this embodiment, the at least one knowledge base includes a first knowledge base. The reply statement determination unit 503 may be further configured to: search the first knowledge base based on keywords to obtain at least one first reply statement; perform intent recognition on the input information to obtain an intent recognition result; determine whether the at least one first reply statement includes at least one second reply statement that matches the intent recognition result; and in response to determining that the at least one second reply statement is included, use the at least one second reply statement as the at least one reply statement.

[0081] In some optional implementations of this embodiment, the reply statement determination unit 503 can be further configured to: in response to determining that it is not included, output the intention recognition result; receive modification information from the second user regarding the intention recognition result, and determine the updated intention based on the modification information; and based on the updated intention, determine at least one second reply statement that matches the intention recognition result from at least one first reply statement.

[0082] It should be understood that the units 501 to 506 described in the apparatus 500 for outputting information are respectively the same as those in the reference Figure 2 Therefore, the operations and features described above for the method for outputting information are also applicable to the device 500 and the units included therein, and will not be repeated here.

[0083] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of the server in (600). Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0084] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0085] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as needed.

[0086] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium described in the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wire, optical cable, RF (radio frequency), etc., or any suitable combination thereof.

[0087] The computer-readable medium may be included in the electronic device, or may exist independently and not be incorporated into the electronic device. The computer-readable medium carries one or more programs. When executed by the electronic device, the electronic device: receives input information sent by a first user; processes the input information and determines keywords corresponding to the input information; searches at least one knowledge base based on the keywords to obtain at least one reply statement; determines the similarity between the at least one reply statement and the input information; determines a target reply statement from the at least one reply statement based on the obtained at least one similarity; and outputs the target reply statement.

[0088] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0090] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including an input information receiving unit, a keyword determination unit, a reply statement determination unit, a similarity determination unit, a target reply statement determination unit, and a target reply statement output unit. Among them, the names of these units do not constitute a limitation on the units themselves under certain circumstances. For example, the input information receiving unit may also be described as a "unit for receiving input information sent by the first user."

[0091] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features and the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) are replaced with each other to form a technical solution.

Claims

1. A method for outputting information, comprising: receiving input information sent by the first user; Processing the input information to determine keywords corresponding to the input information; According to the keyword, multiple knowledge bases are searched to obtain at least one reply statement, including: for each of the knowledge bases, according to the keyword, the knowledge base is searched to obtain at least one first reply statement; the input information is subjected to intent recognition to obtain an intent recognition result; determining whether the at least one first reply statement includes at least one second reply statement that matches the intent recognition result; in response to the determination that it includes, using the at least one second reply statement as at least one reply statement; wherein the knowledge base includes: a multi-round task-based dialogue knowledge base, a question-and-answer knowledge base, and a small talk knowledge base; determining a similarity between the at least one reply statement and the input information; determining a target reply sentence from the at least one reply sentence based on the obtained at least one similarity; Output the target response sentence.

2. The method according to claim 1, wherein The input information includes input text; as well as The processing of the input information to determine the keyword corresponding to the input information includes: Performing word segmentation on the input text to obtain at least one word; Performing at least one of the following processing on the at least one word: determining synonyms of the at least one word, removing stop words from the at least one word, and extracting core words from the at least one word; The keywords are determined based on the words obtained after processing.

3. The method according to claim 2, wherein: Determining a synonym for the at least one word includes: A synonym of the at least one word is determined according to the at least one word and a synonym correspondence associated with the at least one knowledge base.

4. The method according to claim 1, wherein Search the knowledge base according to the keyword to obtain at least one reply statement, including: In response to determining that it is not included, outputting the intention recognition result; receiving modification information of the second user with respect to the intention recognition result, and determining an updated intention according to the modification information; According to the updated intention, at least one second reply statement that matches the intention recognition result is determined from the at least one first reply statement.

5. A device for outputting information, comprising: an input information receiving unit, configured to receive input information sent by a first user; a keyword determination unit, configured to process the input information and determine keywords corresponding to the input information; The reply statement determination unit is configured to search multiple knowledge bases according to the keyword to obtain at least one reply statement, including: for each of the knowledge bases, searching the knowledge base according to the keyword to obtain at least one first reply statement; performing intent recognition on the input information to obtain an intent recognition result; determining whether the at least one first reply statement includes at least one second reply statement that matches the intent recognition result; and in response to determining that it includes, using the at least one second reply statement as at least one reply statement; wherein the knowledge base includes: a multi-round task-based dialogue knowledge base, a question-and-answer knowledge base, and a small talk knowledge base; a similarity determination unit configured to determine a similarity between the at least one reply sentence and the input information; a target reply sentence determining unit, configured to determine a target reply sentence from the at least one reply sentence based on the obtained at least one similarity; The target reply sentence output unit is configured to output the target reply sentence.

6. The device according to claim 5, wherein The input information includes input text; and The keyword determination unit is further configured to: Performing word segmentation on the input text to obtain at least one word; Performing at least one of the following processing on the at least one word: determining synonyms of the at least one word, removing stop words from the at least one word, and extracting core words from the at least one word; The keywords are determined based on the words obtained after processing.

7. The device according to claim 6, wherein The keyword determination unit is further configured to: A synonym of the at least one word is determined according to the at least one word and a synonym correspondence list associated with the at least one knowledge base.

8. The device according to claim 5, wherein Search the knowledge base according to the keyword to obtain at least one reply statement, including: In response to determining that it is not included, outputting the intention recognition result; receiving modification information of the second user with respect to the intention recognition result, and determining an updated intention according to the modification information; According to the updated intention, at least one second reply statement that matches the intention recognition result is determined from the at least one first reply statement.

9. A server comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

10. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Data processing method and device used for knowledge quizzes, server and medium

    CN108897867A