WO2019199456A1 - Chatbot with a stance taking - Google Patents

Chatbot with a stance taking Download PDF

Info

Publication number
WO2019199456A1
WO2019199456A1 PCT/US2019/024187 US2019024187W WO2019199456A1 WO 2019199456 A1 WO2019199456 A1 WO 2019199456A1 US 2019024187 W US2019024187 W US 2019024187W WO 2019199456 A1 WO2019199456 A1 WO 2019199456A1
Authority
WO
WIPO (PCT)
Prior art keywords
candidate
chatbot
reply
replies
target
Prior art date
Application number
PCT/US2019/024187
Other languages
French (fr)
Inventor
Pingping LIN
Ruihua Song
Min Zeng
Yue Liu
Original Assignee
Microsoft Technology Licensing, Llc
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 Microsoft Technology Licensing, Llc filed Critical Microsoft Technology Licensing, Llc
Publication of WO2019199456A1 publication Critical patent/WO2019199456A1/en

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
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/55Rule-based translation
    • G06F40/56Natural language generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/008Artificial life, i.e. computing arrangements simulating life based on physical entities controlled by simulated intelligence so as to replicate intelligent life forms, e.g. based on robots replicating pets or humans in their appearance or behaviour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Definitions

  • a chatbot is an application program or a computer system configured to simulate conversations or chats between human beings.
  • chatbots have been widely used in various application programs or intelligent devices to provide a flexible mode of communication between human beings and machine.
  • chatbots mainly focus on content for performing reply to users’ talking, how to help the users to solve problems and so on. As the chatbots are used more deeply, users would like to see chatbots more like human beings, so that the users may experience various characteristics.
  • the present disclosure discloses a chatbot with a stance taking.
  • Opinions may be extracted from candidate replies during a processing of conversation, and the extracted opinions may be compared with the stance taken by the chatbot so as to perform selection on the candidate replies and remove the candidate replies which have conflicts with the stance taken by the chatbot.
  • FIG. 1 is an exemplary block diagram showing a scenario where a conversation processing device is used according to an embodiment of the present invention
  • FIG. 2 is an exemplary block diagram showing a scenario where a conversation processing device is used according to an embodiment of the present invention
  • FIG. 3 is an exemplary block diagram showing a scenario where a conversation processing device is used according to an embodiment of the present invention
  • FIG. 4 is a schematic block diagram showing a structure of a conversation processing device according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram showing a structure of a position relationship map according to an embodiment of the present invention.
  • FIG. 6 is a schematic block diagram showing a structure of a conversation processing device according to an embodiment of the present invention.
  • FIG. 7 is a schematic flowchart showing a conversation processing method according to an embodiment of the present invention.
  • FIG. 8 is a schematic flowchart showing a conversation processing method according to an embodiment of the present invention.
  • Fig. 9 is a structural block diagram of an electronic apparatus according to an embodiment of the present invention.
  • the term "technique”, as cited herein, for instance, may refer to system(s), method(s), computer-readable instructions, module(s), algorithms, hardware logic (e.g., Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs)), and/or other technique(s) as permitted by the context above and throughout the document.
  • FPGAs Field-programmable Gate Arrays
  • ASICs Application-specific Integrated Circuits
  • ASSPs Application-specific Standard Products
  • SOCs System-on-a-chip systems
  • CPLDs Complex Programmable Logic Devices
  • chatbots With the development of artificial intelligence, more and more chatbots are developed to be more like human beings. It is expected that the chatbots may exhibit more human being’s characteristics during communication with users. Among human being’s characteristics, stance is important core characteristics, and constitutes the core of spirit of a person and is the soul of the person.
  • the stance may refer to a view on world, the view on value and the view on life, and may be exhibited in people's opinions on likes and dislikes of things, and their attitudes on a proposition.
  • the stance of people may be their positions on things or propositions.
  • the stance of people may be an abstract concept which needs to be embodied in conversations.
  • the stance of people may be embodied in conversations in the following three aspects.
  • Consistency in a relatively long time of period, the position on something or an opinion may be stable without cases of contradiction.
  • Inferential property the position based on stance may show characteristics and thoughts on deep level of someone, and may expand from something or some opinion to another thing or another opinion related thereto, or expand to some type of things or opinions.
  • the above three aspects are used as targets to technically realize the stance taken by a chatbot.
  • the above three aspects may be realized by the following technical means:
  • Fig. 1 is an exemplary block diagram 100 showing a scenario where a conversation processing device is used according to an embodiment of the present invention
  • the conversation processing device 101 shown in Fig. 1 may be provided in a server 102, which may be connected with a user terminal 103 via a communication network 104.
  • a background processing system for chatbots may be run in the server 102, and an APP (or a web client) with functions of chatbot may be run in the user terminal 103.
  • Such APP may be in communication connection with the background processing system for chatbot in the server 102 via the communication network 104.
  • the APP in the user terminal 103 performs conversation with a user 105 via a chatting interface, and sends conversation information to the background processing system for chatbot in real time.
  • the background processing system for chatbot may recognize an intention of the user according to the conversation information of the user, generate corresponding replies, and then send the corresponding replies to the APP in the user terminal 103 so as to display the corresponding replies or play the corresponding replies in voice to the user as output.
  • the conversation processing device 101 in the embodiment of the present invention may be embedded in the background processing system for chatbot in the server 102 as a part of the background processing system, or the functions of the background processing system may be integrated into the conversation processing device 101 in the embodiment of the present invention so as to implement complete processing on a conversation with a user.
  • the conversation processing device 101 may be implemented as the server 102.
  • the user terminal 103 may be an intelligent mobile phone, a laptop computer, personal digital assistant (PDA), a personal media player device, a wireless network player device, a personal headset device, an IoT (internet of things) intelligent device, dedicate device or combined device containing any of functions described above.
  • the user terminal 103 may be a computing apparatus such as a desktop computer, a tablet, a tablet, and a dedicated server.
  • the above server 102 may be implemented in one or more computer systems (distributed server), or implemented as a server based on cloud technology or provided in a server based on cloud technology.
  • a user 203 may perform conversation with the chatbot via a human-computer interaction interface provided by the electronic apparatus 202.
  • the conversation processing device 201 may be implemented as or provided in a small portable (or mobile) electronic apparatus 202.
  • the small portable (or mobile) electronic apparatus 202 may be e.g., a smart cell phone, a personal digital assistant (PDA), a personal media player device, a wireless network player device, personal headset device, an IoT (internet of things) intelligent device, a dedicate device or combined device containing any of functions described above.
  • PDA personal digital assistant
  • IoT internet of things
  • a user 303 may have conversation with the chatbot via a human-computer interaction interface provided by a computing apparatus 302.
  • the conversation processing device 301 may be implemented as a computing apparatus 302 such as a desktop computer, a laptop, and a dedicated server, or provided therein.
  • the conversation processing device may include a candidate reply generating module 401, an opinion extracting module 402, a position inferring module 403 and a reply selecting module 404.
  • the corpus database 405 and/or the position relationship map 406 may be used as a part of the conversation processing device and stored in a local storage medium of the conversation processing device, or in a server or database connected with the conversation processing device.
  • the candidate reply generating module 401 may be configured to generate a plurality of candidate replies 408 according to a user query 407. During generating the candidate replies, the candidate reply generating module 401 may retrieve a plurality of candidate replies 408 from the corpus database 405 matched with the user query
  • the opinion extracting module 402 may be configured to extract an opinion from various candidate replies to generate an opinion corresponding to the candidate replies respectively.
  • the extracted opinion may include a target related to the candidate reply, and the target may be used in the processing of the position inferring module 403.
  • An opinion may be directly extracted from candidate replies if the candidate replies contain a complete semantic structure.
  • the user query and the candidate reply may be combined together so as to extract the opinion if a complete semantic structure is missed in the candidate reply.
  • the user query may be "Do you like eating apples", and one of the candidate replies may be "I don't like eating apples”.
  • This candidate reply may be a candidate relay whose semantic structure is complete enough to have a complete subject-verb-object structure so that a clear opinion may be extracted.
  • the candidate reply is "I like eating apples, too”
  • this candidate reply may be a candidate reply whose semantic structure is not complete without an object. If it is difficult to determine the opinion of the candidate reply, it may be necessary to combine the user query with the candidate reply to extract the opinion.
  • the above-mentioned opinion may be in a form of multi-factor group, including: opinion holder, target to which an opinion aims, and sentiment on a target by an opinion holder.
  • the opinion holder may generally be a chatbot, and the opinion holder may be the chatbot currently participating in the conversation with respect to one of the current candidate replies during an online processing.
  • the above-mentioned target may be the target involved in the candidate reply, and may be a specific thing or a proposition.
  • the candidate reply is "I like eating apples very much", in which the "apples” may be the target.
  • the candidate reply is "I think movie star A is more beautiful than movie star B".
  • the target in this candidate reply is a proposition of "which one of movie star A and movie star B is more beautiful".
  • the target may be further specified as a target entity and a target aspect.
  • the target entity and the target aspect may be understood as specific content of the target.
  • the target itself may only have the target entity, such as apple, and the target may be the target entity together with the target aspect, such as the price (target aspect) of apple (target entity) and the taste of apple.
  • the above-mentioned sentiment may include positive, negative and neutral types of sentiment.
  • the opinion may include information on timespan of the opinion, which may be used to set a valid timespan of the opinion.
  • the processing of extracting opinions may adopt one of the following methods or a combination thereof:
  • the opinions expressed by the candidate replies may be extracted based on the recognition on grammar structures and part of speech a word belongs to by preset rules.
  • Opinions may be extracted based on a Bi-LSTM (bidirectional LSTM (Long Short- Term Memory), i.e. a long short-term memory network) model and a CRF (conditional random field) model.
  • Bi-LSTM bidirectional LSTM (Long Short- Term Memory), i.e. a long short-term memory network) model and a CRF (conditional random field) model.
  • Another way can use a CNN (Convolutional Neural Network) model to extract opinion s.
  • Opinion may be also extracted based on a Pointer Network model so as to generate opinions corresponding to various candidate replies.
  • the candidate replies may come from the corpus database 405, and thus part or all of corpus data in corpus database 405 may be subjected to offline opinion calibrating in advance, so that the opinions of the generated candidate replies may be extracted by directly reading opinion labels in the corpus data during the online conversation processing.
  • the offline processing of opinion calibration may be conducted after the opinions of the corpus data is extracted by above-mentioned opinion extracting methods.
  • the processing of opinion calibration may adopt the combination of online processing and offline processing, and the opinions extracted through the online processing may be directly used for opinion calibration on corresponding corpus data in the corpus database 405.
  • the position inferring module 403 may be configured to infer a position that a chatbot should hold on a target involved in the candidate reply according to a position relationship map.
  • the user query 407 may be input into the position inferring module 403 for the inferring on position.
  • the position inferring module 403 may directly obtain the target on which the position is taken from the user query 407.
  • the user query 407 may directly obtain the targets involved in the candidate replies from the opinion extracting module 402, rather than obtaining the same from the user query 407.
  • the position relationship map 406 may record position relationships between one or more chatbots (various characters or various character settings), between a plurality of targets, and between a plurality of chatbots and a plurality of targets.
  • a position relationship map may be generated for each chatbot, and the position relationships of all chatbots may be integrated into one position relationship map.
  • fig. 5 is a schematic diagram 500 showing a structure of a position relationship map according to an embodiment of the present invention
  • the position relationship map shown in Fig. 5 may be particularly related to the form of data storage and may be stored in nodes of the position relationship map in a form of multi-factors, and the contents may be as shown in the following table.
  • chatbots BOT A and BOT B
  • BOT C one thing (apple), and one proposition ("who is more beautiful between movie stars X and Y") are involved.
  • Only the chatbots BOT A, BOT B and BOT C may act as holders (holders of positions), and all the chatbots, things and propositions may act as targets.
  • the relationships between the chatbots may be bidirectional, while the relationships between the chatbots and things or propositions may be unidirectional. Position relationships may show the overall character setting of various chatbots.
  • a position that a chatbot should hold on a target involved in the candidate reply may be inferred based on the position relationship map. More particularly, the following three situations may be involved:
  • BOT B and BOT A are in a daughter-father relationship (and the sentiment is like)
  • BOT A and BOT C are in a friend relationship (and the sentiment is like)
  • an indirect position relationship is established between BOT B and BOT C through BOT A, even though there is no direct position relationship between BOT B and BOT C.
  • BOT B likes BOT B’s father BOT A, and thus it may be inferred that BOT B may also like the friend BOT C whom her father likes.
  • BOT B dislikes her father BOT A then it may be inferred that BOT B may also dislike the friend BOTC whom her father likes.
  • the chatbot currently processing the conversation is BOT A and the target involved in the candidate reply is bananas. It is recorded in the position relationship diagram in Fig. 5 that BOT A likes eating apples, but it is not recorded whether or not BOT A likes eating bananas.
  • inferring or opinions may be performed according to the knowledge database or knowledge models or rules other than the position relationship map. For example, the similarity between apples and bananas may be determined by some similarity models, and if the similarity is high, it is considered that one who likes eating apples may like eating bananas generally.
  • the similarity may be determined by using some knowledge databases, such as accessing the knowledge bases to obtain the taste similarity between apples and bananas, or be determined with statistics on tastes of people for fruits (94% of the people who like eating apples may like eating bananas).
  • the opinion of BOT A may be inferred via preset rules. For example, it may be set that one likes eating most kinds of fruits if he/she likes eating some kind of fruit.
  • the reply selecting module 404 may be configured to perform selection on the candidate replies, delete the candidate replies with opinions conflicting with positions, and use the remaining candidate replies as replies to be output 409.
  • the opinion of a candidate reply and the position of the current chatbot on a target in the reply are obtained, comparison may be made to determine whether or not there is conflict between the opinion of the candidate reply and the position of the chatbot. If there is conflict, the candidate reply may be deleted so as to maintain the consistency of character settings of the chatbot.
  • the selected reply may be either a reply showing the position of the chatbot or a neutral reply with a weak position or without any position.
  • the generated candidate replies may include “I like eating apples, too”, “I don't like eating apples", and “It's just okay”. If the chatbot currently processing the conversation is BOT A, it may be seen from the determined position relationship of BOT A on apples that BOT A likes eating apples, so the candidate reply of "I don't like eating apples” in the candidate replies may be removed, and the positive position candidate reply of "I like eating apples, too” and the neutral candidate reply of "If s just okay” are remained.
  • the remaining candidate replies are replies to be output which are in line with the character settings of the current chatbot, or at least do not conflict with the character settings of the current chatbot.
  • the candidate replies conflicting with the character settings of the current chatbot in the generated candidate replies may be removed to fully ensure the consistency and stability of the stance of the chatbot, so that a user may have feelings on the stance of the chatbot during the communication with the chatbot.
  • the remaining candidate replies are all replies to be output, which do not conflict with the stance of the chatbot.
  • Some further controlling processing for reply outputting replies may be conducted on these replies to be output to determine a final reply as output.
  • the candidate reply on the top may be selected as output according to the ranks of scores of the matching between the candidate replies and the user query.
  • a probability controlling model for replies with position may be further introduced, and either the neutral replies or the position replies may be selected as output according to a preset probability of the replies with position.
  • a mechanism of selecting a timing suitable for the user query to actively output the replies with position may be further used in the embodiment of the present invention. More particularly, as shown in Fig. 6, which is a schematic block diagram 600 showing a structure of a conversation processing device according to an embodiment of the present invention, the structure of the conversation processing device as shown in Fig. 6 is same as the structure as shown in Fig. 4, except that a user query determining module 601 and an output controlling module 602 are further included.
  • the user query determining module 601 may be configured to determine whether or not the user query is a query with position, and send a determining result to the output controlling module 602.
  • the output controlling module 602 may be configured to perform the following output controlling according to the determining result, so as to output a final reply 603 :
  • the above-mentioned query with position may include the following types of queries.
  • a user shows his own opinion, such as“I like eating apples very much”.
  • the chatbot may actively show the preference on apples, so as to show the position of the chatbot.
  • the chatbot may prefer the replies with position to show the stance of the chatbot.
  • the chatbot may choose the replies with position or the replies without position by controlling probability. How far the stance of the chatbot is shown may be controlled with the probability. If it is required to show more of the stance of the chatbot, the probability of outputting replies with position may be increased or the types for determining the query with position may be expanded (a larger range of user’s queries are set as queries with position). On the contrary, if it is required to show less of the stance of the chatbot so that the chatbot may look like a normal person, the probability for outputting the replies with position may be decreased or the types for determining the query with position may be narrowed.
  • Fig. 7 is a schematic flowchart 700 showing a conversation processing method according to an embodiment of the present invention, the method may include the following steps.
  • S701 generating a plurality of candidate replies according to a user query.
  • a plurality of candidate replies matching the user query may be extracted based on a preset reply generating model and a corpus database.
  • the processing of step S701 may be performed by a candidate reply generating module 401 of the conversation processing device described above.
  • S702 extracting an opinion from each candidate reply to generate opinions corresponding to various candidate replies.
  • the opinion may include a target involved in the candidate reply.
  • the opinion may be directly extracted from the candidate reply, if the candidate reply contains an intact semantic structure, and the extraction for opinion may be performed after the user query and the candidate reply are combined together, if the candidate reply does not have an intact semantic structure.
  • the processing of extracting opinions may adopt one of the following ways or a combination thereof:
  • the opinions expressed by the candidate replies may be extracted based on the recognition on grammar structures and parts of speech according to preset rules.
  • Opinions may be extracted based on a Bi-LSTM (bidirectional LSTM (Long Short- Term Memory), i.e. a long short-term memory network) model and a CRF (conditional random field) model.
  • Bi-LSTM bidirectional LSTM (Long Short- Term Memory), i.e. a long short-term memory network) model and a CRF (conditional random field) model.
  • Another way can use a CNN (Convolutional Neural Network) model to extract opinions.
  • Opinion may be also extracted based on a Pointer Network model so as to generate opinions corresponding to various candidate replies.
  • step S702 may be performed by an opinion extracting module 402 of the conversation processing device described above.
  • S703 inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map.
  • the target involved in the candidate reply has been extracted in the processing of step S702 and may be directly used in step S703.
  • the position relationship map may record the position relationships between one or more chatbots (different roles or different character settings), between a plurality of targets, and between a plurality of chatbots and a plurality of targets.
  • a position relationship map may be created individually for each chatbot, and the position relationships of all chatbots may be integrated into one position relationship map.
  • a position that a chatbot should hold on a target involved in the candidate reply may be inferred based on the position relationship map. More particularly, the following three situations may be involved:
  • the opinion of a candidate reply and the position of the current chatbot on a target in the reply are obtained, comparison may be made to determine whether or not there is conflict between the opinion of the candidate reply and the position of the chatbot. If there is conflict, the candidate reply may be deleted so as to maintain the consistency of character settings of the chatbot.
  • the selected reply may be either a reply showing the position of the chatbot or a neutral reply with a weak position or without any position.
  • step S703 may be performed by a position inferring module 403 of the conversation processing device described above.
  • S704 performing selection on the candidate replies, deleting the candidate replies with opinions conflicting with positions, and using the remaining candidate replies as replies to be output.
  • the processing in step S704 may use the opinions extracted in step S702 and the positions extracted in step S703.
  • step S704 when the opinion of a candidate reply and the position of the current chatbot on a target in the reply are obtained, comparison may be made to determine whether or not there is conflict between the opinion of the candidate reply and the position of the chatbot. If there is conflict, the candidate reply may be deleted so as to maintain the consistency of character settings of the chatbot.
  • the selected reply may be either a reply showing the position of the chatbot or a neutral reply with a weak position or without any position.
  • step S704 may be performed by a reply selecting module 404 of the conversation processing device described above.
  • the candidate replies conflicting with the character settings of the current chatbot in the generated candidate replies may be removed to fully ensure the consistency and stability of the stance of the chatbot, so that a user may have feelings on the stance of the chatbot during the communication with the chatbot.
  • Fig. 8 is a schematic flowchart 800 showing a conversation processing method according to an embodiment of the present invention, the method may include the following steps.
  • S801 generating a plurality of candidate replies according to a user query
  • S802 extracting an opinion from each candidate reply to generate opinions corresponding to various candidate replies
  • S803 inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map
  • S804 performing selection on the candidate replies, and deleting the candidate replies with opinions conflicting with positions.
  • steps S801 to S804 described above are consistent with those of steps S701 to S704 shown in Fig. 7;
  • S805 determining whether or not the user query is a query with position, and turning to step of S806, if the user query is a query with position, and turning to step of S807, if the user query is a query without position. More particularly, the processing in step of S805 may be performed by a user query determining module 601 provided in the conversation processing device described above;
  • S806 selecting a reply with position as output from the remaining candidate replies after deleting the candidate replies with opinions conflicting with the sentiment
  • S807 outputting a reply with position or a reply without position according to a preset probability controlling rule for the position replies.
  • the above-mentioned query with position may include the following types of queries.
  • the chatbot may prefer the replies with position to show the stance of the chatbot.
  • the chatbot may choose the replies with position or the replies without position by controlling probability. How far the stance of the chatbot is shown may be controlled with the probability. If it is required to show more of the stance of the chatbot, the probability of outputting replies with position may be increased or the types for determining the query with position may be expanded (a larger range of user’s queries are set as queries with position). On the contrary, if it is required to show less of the stance of the chatbot so that the chatbot may look like a normal person, the probability for outputting the replies with position may be decreased or the types for determining the query with position may be narrowed.
  • steps S806 and S807 may be performed by an output controlling module 602 of the conversation processing device described above.
  • the above-mentioned conversation processing method may be implemented based on the above-mentioned conversation processing device, or may be independently implemented as a method, or may be implemented by other software or hardware under the inventive idea of the embodiment of the present invention.
  • one or more components or modules and one or more steps as shown in Fig. 1 to Fig. 8 may be implemented by software, hardware, or in combination of software and hardware.
  • the above component or module and one or more steps may be implemented in system on chip (SoC).
  • Soc may include: integrated circuit chip, including one or more of processing unit (such as center processing unit (CPU), micro controller, micro processing unit, digital signal processing unit (DSP) or the like), memory, one or more communication interface, and/or other circuit for performing its function and alternative embedded firmware.
  • processing unit such as center processing unit (CPU), micro controller, micro processing unit, digital signal processing unit (DSP) or the like
  • memory such as center processing unit (CPU), micro controller, micro processing unit, digital signal processing unit (DSP) or the like
  • DSP digital signal processing unit
  • the electronic apparatus 900 may include a memory 901 and a processor 902.
  • the memory 901 may be configured to store programs. In addition to the above programs, the memory 901 may be configured to store other data to support operations on the electronic apparatus 900.
  • the examples of these data may include instructions of any applications or methods operated on the electronic apparatus 900, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 901 may be implemented by any kind of volatile or nonvolatile storage device or their combinations, such as static random access memory (SRAM), electronically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk memory, or optical disk.
  • SRAM static random access memory
  • EEPROM electronically erasable programmable read-only memory
  • EPROM erasable programmable read-only memory
  • PROM programmable read-only memory
  • ROM read-only memory
  • the memory 901 may be coupled to the processor 902 and contain instructions stored thereon.
  • the instructions may cause the electronic apparatus 900 to perform operations upon being executed by the processor 902, the operations may include:
  • the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply may include:
  • Each node in the position relationship map may include the following information: holder, target, relationship between the holder and the target, and sentiment on a target by a holder.
  • the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply may include:
  • the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map may include the processing for the following three situations:
  • the operations performed by the electronic apparatus may further include:
  • the electronic apparatus 900 may further include: a communication unit 903, a power supply unit 904, an audio unit 905, a display unit 906, chipset 907, and other units. Only part of units are exemplarily shown in Fig. 9 and it is obvious to one skilled in the art that the electronic apparatus 900 only includes the units shown in Fig. 9.
  • the communication unit 903 may be configured to facilitate wireless or wired communication between the electronic apparatus 900 and other apparatuses.
  • the electronic apparatus may be connected to wireless network based on communication standard, such as Wi-Fi, 2G, 3G, or their combination.
  • the communication unit 903 may receive radio signal or radio related information from external radio management system via radio channel.
  • the communication unit 903 may further include near field communication (NFC) module for facilitating short-range communication.
  • NFC near field communication
  • the NFC module may be implemented with radio frequency identification (RFID) technology, Infrared data association (IrDA) technology, ultra wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA Infrared data association
  • UWB ultra wideband
  • Bluetooth Bluetooth
  • the power supply unit 904 may be configured to supply power to various units of the electronic device.
  • the power supply unit 904 may include a power supply management system, one or more power supplies, and other units related to power generation, management, and allocation.
  • the audio unit 905 may be configured to output and/or input audio signals.
  • the audio unit 905 may include a microphone (MIC).
  • the MIC When the electronic apparatus in an operation mode, such as calling mode, recording mode, and voice recognition mode, the MIC may be configured to receive external audio signals.
  • the received audio signals may be further stored in the memory 901 or sent via the communication unit 903.
  • the audio unit 905 may further include a speaker configured to output audio signals.
  • the display unit 906 may include a screen, which may include liquid crystal display (LCD) and touch panel (TP). If the screen includes a touch panel, the screen may be implemented as touch screen so as to receive input signal from users.
  • the touch panel may include a plurality of touch sensors to sense touching, sliding, and gestures on the touch panel. The touch sensor may not only sense edges of touching or sliding actions, but also sense period and pressure related to the touching or sliding operations.
  • the above memory 901, processor 902, communication unit 903, power supply unit 904, audio unit 905 and display unit 906 may be connected with the chipset 907.
  • the chipset 907 may provide interface between the processor 902 and other units of the electronic apparatus 900. Furthermore, the chipset 907 may provide interface for each unit of the electronic apparatus 900 to access the memory 1301 and communication interface for accessing among units.
  • a method including:
  • the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply includes:
  • each node in the position relationship map includes the following information: holder, target, relationship between the holder and the target, and sentiment on a target by a holder.
  • [00145] extracting opinions according to grammar rules for candidate replies , and/or extracting opinions based on a neural network model, so as to generate the opinion corresponding to each of the candidate replies.
  • a user query showing an opinion from a user on the target, and/or a user query proposing a question related to the position held by the chatbot on the target.
  • a device including:
  • a candidate reply generating module configured to generate a plurality of candidate replies according to a user query
  • an opinion extracting module configured to extract an opinion from each candidate reply to generate an opinion corresponding to each candidate reply
  • a position inferring module configured to infer a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map
  • a reply selecting module configured to perform selection on the candidate replies, and delete the candidate replies with opinions conflicting with positions.
  • each node in the position relationship map includes the following information: holder, target, relationship between the holder and the target, and sentiment on a target by a holder.
  • N The device according to paragraph K, wherein the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply includes:
  • [00168] extracting opinions according to grammar rules for candidate replies , and/or extracting opinions based on a neural network model, so as to generate the opinion corresponding to each of the candidate replies.
  • the user query determining module is configured to determine whether or not the user query is a query with position, and sending a determination result to the output controlling module;
  • the output controlling module is configured to perform the following output control according to the determination result:
  • An electronic apparatus including:
  • a memory coupled to the processing unit and containing instructions stored thereon, the instructions cause the electronic apparatus to perform operations upon being executed by the processing unit, the operations comprise:
  • the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply includes:
  • each node in the position relationship map includes the following information: holder, target, relationship between the holder and the target, and sentiment on a target by a holder.
  • a user query showing an opinion from a user on the target, and/or a user query proposing a question related to the position held by the chatbot on the target.
  • the implementer may opt for a mainly hardware and/or firmware vehicle; if flexibility is paramount, the implementer may opt for a mainly software implementation; or, yet again alternatively, the implementer may opt for some combination of hardware, software, and/or firmware.
  • Examples of a signal bearing medium include, but are not limited to, the following: a recordable type medium such as a floppy disk, a hard disk drive, a Compact Disc (CD), a Digital Versatile Disk (DVD), a digital tape, a computer memory, etc.; and a transmission type medium such as a digital and/or an analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communications link, a wireless communication link, etc.).
  • a typical data processing system generally includes one or more of a system unit housing, a video display device, a memory such as volatile and non volatile memory, processors such as microprocessors and digital signal processors, computational entities such as operating systems, drivers, graphical user interfaces, and applications programs, one or more interaction devices, such as a touch pad or screen, and/or control systems including feedback loops and control motors (e.g., feedback for sensing position and/or velocity; control motors for moving and/or adjusting components and/or quantities).
  • a typical data processing system may be implemented utilizing any suitable commercially available components, such as those typically found in data computing/communication and/or network computing/communication systems.
  • any two components so associated can also be viewed as being “operably connected”, or “operably coupled”, to each other to achieve the desired functionality, and any two components capable of being so associated can also be viewed as being “operably couplable”, to each other to achieve the desired functionality.
  • operably couplable include but are not limited to physically mateable and/or physically interacting components and/or wirelessly interactable and/or wirelessly interacting components and/or logically interacting and/or logically interactable components.
  • references in the specification to“an implementation”,“one implementation”, “some implementations”, or“other implementations” may mean that a particular feature, structure, or characteristic described in connection with one or more implementations may be included in at least some implementations, but not necessarily in all implementations.
  • the various appearances of “an implementation”, “one implementation”, or “some implementations” in the preceding description are not necessarily all referring to the same implementations.
  • the above program may be stored in a computer readable storing medium. Such program may perform the steps of the above embodiments upon being executed.
  • the above storing medium may include: ROM, RAM, magnetic disk, or optic disk or other medium capable of storing program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Robotics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure discloses a chatbot with a stance taking. Opinions may be extracted from candidate replies during a processing of conversation, and the extracted opinions may be compared with the stance taken by the chatbot so as to perform selection on the candidate replies and remove the candidate replies which have conflicts with the stance taken by the chatbot. With such technical solutions, the stance taken by the chatbot may be exhibited.

Description

CHATBOT WITH A STANCE TAKING
BACKGROUND
[001] A chatbot is an application program or a computer system configured to simulate conversations or chats between human beings. With the development of language processing technology, chatbots have been widely used in various application programs or intelligent devices to provide a flexible mode of communication between human beings and machine.
[002] The current chatbots mainly focus on content for performing reply to users’ talking, how to help the users to solve problems and so on. As the chatbots are used more deeply, users would like to see chatbots more like human beings, so that the users may experience various characteristics.
BRIEF SUMMARY
[003] The embodiments of the present disclosure are provided to give a brief introduction to some concepts, which would be further explained in the following description. This Summary is not intended to identify essential technical features or important features of the subject as claimed nor to limit the scope of the subject as claimed.
[004] The present disclosure discloses a chatbot with a stance taking. Opinions may be extracted from candidate replies during a processing of conversation, and the extracted opinions may be compared with the stance taken by the chatbot so as to perform selection on the candidate replies and remove the candidate replies which have conflicts with the stance taken by the chatbot.
[005] The above description is merely a brief introduction of the technical solutions of the present disclosure, so that the technical means of the present disclosure may be clearly understood, and implemented according to the description of the specification, and the above and other technical objects, features and advantages of the present disclosure may be more obvious based on the embodiments of the present disclosure as follows.
BRIEF DESCRIPTION OF THE DRAWINGS
[006] Fig. 1 is an exemplary block diagram showing a scenario where a conversation processing device is used according to an embodiment of the present invention;
[007] Fig. 2 is an exemplary block diagram showing a scenario where a conversation processing device is used according to an embodiment of the present invention;
[008] Fig. 3 is an exemplary block diagram showing a scenario where a conversation processing device is used according to an embodiment of the present invention;
[009] Fig. 4 is a schematic block diagram showing a structure of a conversation processing device according to an embodiment of the present invention;
[0010] Fig. 5 is a schematic diagram showing a structure of a position relationship map according to an embodiment of the present invention;
[0011] Fig. 6 is a schematic block diagram showing a structure of a conversation processing device according to an embodiment of the present invention;
[0012] Fig. 7 is a schematic flowchart showing a conversation processing method according to an embodiment of the present invention;
[0013] Fig. 8 is a schematic flowchart showing a conversation processing method according to an embodiment of the present invention; and
[0014] Fig. 9 is a structural block diagram of an electronic apparatus according to an embodiment of the present invention.
DETAILED DESCRIPTION
[0015] In the following, description will be given in detail on the exemplary embodiments of the present disclosure, in connection with the accompanying drawing. Although drawings show the exemplary embodiments of the present disclosure, it should be appreciated that the present disclosure may be implemented in various ways without being limited by the embodiments set forth herein. On the contrary, these embodiments are provided for thorough understanding of the present disclosure, and completely conveying the scope of the present disclosure to the skills in the art.
[0016] The following description sets forth various examples along with specific details to provide a thorough understanding of claimed subject matter. It will be understood by those skilled in the art, however, the claimed subject matter may be practiced without some or more of the specific details disclosed herein. Further, in some circumstances, well-known methods, procedures, systems, components and/or circuits have not been described in detail in order to avoid unnecessarily obscuring claimed subject matter.
[0017] In the following detailed description, reference is made to the accompanying drawings, which form a part hereof. In the drawings, similar symbols typically identify similar components, unless context dictates otherwise. The illustrative embodiments described in the detailed description, drawings, and claims are not meant to be limiting. Other embodiments may be utilized, and other changes may be made, without departing from the spirit or scope of the subject matter presented here. It will be readily understood that the aspects of the present disclosure, as generally described herein, and illustrated in the figures, can be arranged, substituted, combined, and designed in a wide variety of different configurations, all of which are explicitly contemplated and make part of this disclosure.
[0018] The term "technique", as cited herein, for instance, may refer to system(s), method(s), computer-readable instructions, module(s), algorithms, hardware logic (e.g., Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs)), and/or other technique(s) as permitted by the context above and throughout the document.
[0019] With the development of artificial intelligence, more and more chatbots are developed to be more like human beings. It is expected that the chatbots may exhibit more human being’s characteristics during communication with users. Among human being’s characteristics, stance is important core characteristics, and constitutes the core of spirit of a person and is the soul of the person.
[0020] Generally speaking, the stance may refer to a view on world, the view on value and the view on life, and may be exhibited in people's opinions on likes and dislikes of things, and their attitudes on a proposition. In other word, the stance of people may be their positions on things or propositions. The stance of people may be an abstract concept which needs to be embodied in conversations. The stance of people may be embodied in conversations in the following three aspects.
[0021] 1) Consistency: in a relatively long time of period, the position on something or an opinion may be stable without cases of contradiction.
[0022] 2) Inferential property: the position based on stance may show characteristics and thoughts on deep level of someone, and may expand from something or some opinion to another thing or another opinion related thereto, or expand to some type of things or opinions.
[0023] 3) Initiative: when talking about something or an opinion, the talker may initiatively show his/her stance.
[0024] In the embodiment of the present invention, the above three aspects are used as targets to technically realize the stance taken by a chatbot. In another word, the above three aspects may be realized by the following technical means:
[0025] 1) Implementation of the consistency: performing selection on candidate replies according to a position relationship map of the chatbot before a reply is output, to exclude the replies contradicting with the stance of the character, so as to avoid conflicts and maintain the consistency of the stance of the character.
[0026] 2) Implementation of the inferential property: constructing a position relationship map with respect to people, things or propositions from the chatbot, and inferring the positions on similar or related people, things or propositions based on the position relationship map.
[0027] 3) Implementation of the initiative: fully expressing replies with obvious stance of a character during a conversation between a chatbot and a user. In technical implementation, the initiative may be shown by controlling the probability for outputting replies with opinions.
Examples
[0028] As shown in Fig. 1, which is an exemplary block diagram 100 showing a scenario where a conversation processing device is used according to an embodiment of the present invention, the conversation processing device 101 shown in Fig. 1 may be provided in a server 102, which may be connected with a user terminal 103 via a communication network 104. A background processing system for chatbots may be run in the server 102, and an APP (or a web client) with functions of chatbot may be run in the user terminal 103. Such APP may be in communication connection with the background processing system for chatbot in the server 102 via the communication network 104. The APP in the user terminal 103 performs conversation with a user 105 via a chatting interface, and sends conversation information to the background processing system for chatbot in real time. The background processing system for chatbot may recognize an intention of the user according to the conversation information of the user, generate corresponding replies, and then send the corresponding replies to the APP in the user terminal 103 so as to display the corresponding replies or play the corresponding replies in voice to the user as output. The conversation processing device 101 in the embodiment of the present invention may be embedded in the background processing system for chatbot in the server 102 as a part of the background processing system, or the functions of the background processing system may be integrated into the conversation processing device 101 in the embodiment of the present invention so as to implement complete processing on a conversation with a user. In addition, the conversation processing device 101 may be implemented as the server 102.
[0029] More particularly, the user terminal 103 may be an intelligent mobile phone, a laptop computer, personal digital assistant (PDA), a personal media player device, a wireless network player device, a personal headset device, an IoT (internet of things) intelligent device, dedicate device or combined device containing any of functions described above. The user terminal 103 may be a computing apparatus such as a desktop computer, a tablet, a tablet, and a dedicated server. The above server 102 may be implemented in one or more computer systems (distributed server), or implemented as a server based on cloud technology or provided in a server based on cloud technology.
[0030] As shown in Fig. 2, which is an exemplary block diagram 200 showing a scenario where a conversation processing device is used according to an embodiment of the present invention, a user 203 may perform conversation with the chatbot via a human-computer interaction interface provided by the electronic apparatus 202. In some embodiments, the conversation processing device 201 may be implemented as or provided in a small portable (or mobile) electronic apparatus 202. The small portable (or mobile) electronic apparatus 202 may be e.g., a smart cell phone, a personal digital assistant (PDA), a personal media player device, a wireless network player device, personal headset device, an IoT (internet of things) intelligent device, a dedicate device or combined device containing any of functions described above.
[0031] As shown in Fig. 3, which is an exemplary block diagram 300 showing a scenario where a conversation processing device is used according to an embodiment of the present invention, a user 303 may have conversation with the chatbot via a human-computer interaction interface provided by a computing apparatus 302. In some embodiments, the conversation processing device 301 may be implemented as a computing apparatus 302 such as a desktop computer, a laptop, and a dedicated server, or provided therein.
[0032] As shown in Fig. 4, which is a schematic block diagram 400 showing a structure of a conversation processing device according to an embodiment of the present invention, the conversation processing device may include a candidate reply generating module 401, an opinion extracting module 402, a position inferring module 403 and a reply selecting module 404. During conversation processing, a corpus database 405 and a position relationship map
406 for generating candidate replies may be further involved. The corpus database 405 and/or the position relationship map 406 may be used as a part of the conversation processing device and stored in a local storage medium of the conversation processing device, or in a server or database connected with the conversation processing device.
[0033] More particularly, the candidate reply generating module 401 may be configured to generate a plurality of candidate replies 408 according to a user query 407. During generating the candidate replies, the candidate reply generating module 401 may retrieve a plurality of candidate replies 408 from the corpus database 405 matched with the user query
407 based on a preset reply generating model.
[0034] The opinion extracting module 402 may be configured to extract an opinion from various candidate replies to generate an opinion corresponding to the candidate replies respectively. The extracted opinion may include a target related to the candidate reply, and the target may be used in the processing of the position inferring module 403.
[0035] An opinion may be directly extracted from candidate replies if the candidate replies contain a complete semantic structure. The user query and the candidate reply may be combined together so as to extract the opinion if a complete semantic structure is missed in the candidate reply. For example, the user query may be "Do you like eating apples", and one of the candidate replies may be "I don't like eating apples". This candidate reply may be a candidate relay whose semantic structure is complete enough to have a complete subject-verb-object structure so that a clear opinion may be extracted. However, if the candidate reply is "I like eating apples, too", this candidate reply may be a candidate reply whose semantic structure is not complete without an object. If it is difficult to determine the opinion of the candidate reply, it may be necessary to combine the user query with the candidate reply to extract the opinion.
[0036] The above-mentioned opinion may be in a form of multi-factor group, including: opinion holder, target to which an opinion aims, and sentiment on a target by an opinion holder. The opinion holder may generally be a chatbot, and the opinion holder may be the chatbot currently participating in the conversation with respect to one of the current candidate replies during an online processing. The above-mentioned target may be the target involved in the candidate reply, and may be a specific thing or a proposition. For example, the candidate reply is "I like eating apples very much", in which the "apples" may be the target. As another example, the candidate reply is "I think movie star A is more beautiful than movie star B". In such example, the target in this candidate reply is a proposition of "which one of movie star A and movie star B is more beautiful". The target may be further specified as a target entity and a target aspect. The target entity and the target aspect may be understood as specific content of the target. The target itself may only have the target entity, such as apple, and the target may be the target entity together with the target aspect, such as the price (target aspect) of apple (target entity) and the taste of apple. The above-mentioned sentiment may include positive, negative and neutral types of sentiment. In addition, the opinion may include information on timespan of the opinion, which may be used to set a valid timespan of the opinion.
[0037] The processing of extracting opinions may adopt one of the following methods or a combination thereof:
[0038] 1) extracting opinions according to grammar rules for candidate replies. With this method, the opinions expressed by the candidate replies may be extracted based on the recognition on grammar structures and part of speech a word belongs to by preset rules.
[0039] 2) extracting opinions based on a neural network model.
[0040] Opinions may be extracted based on a Bi-LSTM (bidirectional LSTM (Long Short- Term Memory), i.e. a long short-term memory network) model and a CRF (conditional random field) model. Another way can use a CNN (Convolutional Neural Network) model to extract opinion s. Opinion may be also extracted based on a Pointer Network model so as to generate opinions corresponding to various candidate replies.
[0041] In addition, the candidate replies may come from the corpus database 405, and thus part or all of corpus data in corpus database 405 may be subjected to offline opinion calibrating in advance, so that the opinions of the generated candidate replies may be extracted by directly reading opinion labels in the corpus data during the online conversation processing. The offline processing of opinion calibration may be conducted after the opinions of the corpus data is extracted by above-mentioned opinion extracting methods. The processing of opinion calibration may adopt the combination of online processing and offline processing, and the opinions extracted through the online processing may be directly used for opinion calibration on corresponding corpus data in the corpus database 405.
[0042] The position inferring module 403 may be configured to infer a position that a chatbot should hold on a target involved in the candidate reply according to a position relationship map. The user query 407 may be input into the position inferring module 403 for the inferring on position. For example, the position inferring module 403 may directly obtain the target on which the position is taken from the user query 407. When some candidate replies lack intact semantic structures, it may be necessary to perform analyzing in conjunction with the user query 407. The user query 407 may directly obtain the targets involved in the candidate replies from the opinion extracting module 402, rather than obtaining the same from the user query 407.
[0043] The position relationship map 406 may record position relationships between one or more chatbots (various characters or various character settings), between a plurality of targets, and between a plurality of chatbots and a plurality of targets. In some embodiments, a position relationship map may be generated for each chatbot, and the position relationships of all chatbots may be integrated into one position relationship map.
[0044] As shown in fig. 5, which is a schematic diagram 500 showing a structure of a position relationship map according to an embodiment of the present invention, the position relationship map shown in Fig. 5 may be particularly related to the form of data storage and may be stored in nodes of the position relationship map in a form of multi-factors, and the contents may be as shown in the following table.
Table 1
Figure imgf000011_0001
[0045] In view of Fig. 5 and table 1, two chatbots (BOT A and BOT B), BOT C, one thing (apple), and one proposition ("who is more beautiful between movie stars X and Y") are involved. Only the chatbots BOT A, BOT B and BOT C may act as holders (holders of positions), and all the chatbots, things and propositions may act as targets. The relationships between the chatbots may be bidirectional, while the relationships between the chatbots and things or propositions may be unidirectional. Position relationships may show the overall character setting of various chatbots.
[0046] A position that a chatbot should hold on a target involved in the candidate reply may be inferred based on the position relationship map. More particularly, the following three situations may be involved:
[0047] 1) The position which the chatbot should hold is inferred according to a direct relationship between the chatbot and the target recorded in the position relationship map.
[0048] As shown in Fig. 5, if the candidate reply is "I like eating apples very much", in which apple is the target, and if the current chatbot is BOT A, it may be seen from the position relationship map that the position relationship between BOT A and apple is that BOT A likes eating apples. Such inferring on the position relationship is based on the relationship between the chatbot and the target directly recorded in the position relationship map.
[0049] 2) The position which the chatbot should hold is inferred according to an indirect relationship between the chatbot and the target recorded in the position relationship diagram.
[0050] As shown in Fig. 5, if the chatbot currently processing the conversation is BOT B and the target involved in the candidate reply is BOT C, there is no direct position relationship between BOT B and BOT C according to the position relationship map. However, BOT B and BOT A are in a daughter-father relationship (and the sentiment is like), BOT A and BOT C are in a friend relationship (and the sentiment is like), and an indirect position relationship is established between BOT B and BOT C through BOT A, even though there is no direct position relationship between BOT B and BOT C. BOT B likes BOT B’s father BOT A, and thus it may be inferred that BOT B may also like the friend BOT C whom her father likes. On the contrary, if BOT B dislikes her father BOT A, then it may be inferred that BOT B may also dislike the friend BOTC whom her father likes.
[0051] 3) The position which the chatbot should hold on the user query and/or the target contained in the candidate reply according to the target recorded in the position relationship map and in combination with a knowledge database and/or a knowledge model and/or rules other than the position relationship map.
[0052] As shown in Fig. 5, if the chatbot currently processing the conversation is BOT A and the target involved in the candidate reply is bananas. It is recorded in the position relationship diagram in Fig. 5 that BOT A likes eating apples, but it is not recorded whether or not BOT A likes eating bananas. In view of this situation, inferring or opinions may be performed according to the knowledge database or knowledge models or rules other than the position relationship map. For example, the similarity between apples and bananas may be determined by some similarity models, and if the similarity is high, it is considered that one who likes eating apples may like eating bananas generally. The similarity may be determined by using some knowledge databases, such as accessing the knowledge bases to obtain the taste similarity between apples and bananas, or be determined with statistics on tastes of people for fruits (94% of the people who like eating apples may like eating bananas). As another example, the opinion of BOT A may be inferred via preset rules. For example, it may be set that one likes eating most kinds of fruits if he/she likes eating some kind of fruit.
[0053] The reply selecting module 404 may be configured to perform selection on the candidate replies, delete the candidate replies with opinions conflicting with positions, and use the remaining candidate replies as replies to be output 409.
[0054] When the opinion of a candidate reply and the position of the current chatbot on a target in the reply are obtained, comparison may be made to determine whether or not there is conflict between the opinion of the candidate reply and the position of the chatbot. If there is conflict, the candidate reply may be deleted so as to maintain the consistency of character settings of the chatbot. The selected reply may be either a reply showing the position of the chatbot or a neutral reply with a weak position or without any position.
[0055] For example, in a case that a user query is "Do you like eating apples", the generated candidate replies may include "I like eating apples, too", "I don't like eating apples", and "It's just okay". If the chatbot currently processing the conversation is BOT A, it may be seen from the determined position relationship of BOT A on apples that BOT A likes eating apples, so the candidate reply of "I don't like eating apples" in the candidate replies may be removed, and the positive position candidate reply of "I like eating apples, too" and the neutral candidate reply of "If s just okay" are remained.
[0056] After selection performed by the reply selecting module 404, the remaining candidate replies are replies to be output which are in line with the character settings of the current chatbot, or at least do not conflict with the character settings of the current chatbot.
[0057] With the conversation processing device shown in Fig. 4, the candidate replies conflicting with the character settings of the current chatbot in the generated candidate replies may be removed to fully ensure the consistency and stability of the stance of the chatbot, so that a user may have feelings on the stance of the chatbot during the communication with the chatbot.
[0058] After selection performed by the above-mentioned reply selecting module 404, the remaining candidate replies are all replies to be output, which do not conflict with the stance of the chatbot. Some further controlling processing for reply outputting replies may be conducted on these replies to be output to determine a final reply as output. For example, the candidate reply on the top may be selected as output according to the ranks of scores of the matching between the candidate replies and the user query. In addition, a probability controlling model for replies with position may be further introduced, and either the neutral replies or the position replies may be selected as output according to a preset probability of the replies with position.
[0059] Furthermore, in order to fully implement the stance of the chatbot, a mechanism of selecting a timing suitable for the user query to actively output the replies with position may be further used in the embodiment of the present invention. More particularly, as shown in Fig. 6, which is a schematic block diagram 600 showing a structure of a conversation processing device according to an embodiment of the present invention, the structure of the conversation processing device as shown in Fig. 6 is same as the structure as shown in Fig. 4, except that a user query determining module 601 and an output controlling module 602 are further included.
[0060] The user query determining module 601 may be configured to determine whether or not the user query is a query with position, and send a determining result to the output controlling module 602.
[0061] The output controlling module 602 may be configured to perform the following output controlling according to the determining result, so as to output a final reply 603 :
[0062] selecting a reply with position as output from the candidate replies left upon deleting the candidate replies with opinions conflicting with the sentiment, if the user query is the query with position; and
[0063] outputting a query without position or outputting a reply with position or a reply without position according to a preset probability controlling rule with respect to the replies with position, if the user query is the query without position.
[0064] The above-mentioned query with position may include the following types of queries.
[0065] 1) A user shows his own opinion, such as“I like eating apples very much”. In view of this situation, the chatbot may actively show the preference on apples, so as to show the position of the chatbot.
[0066] 2) The user expresses a query with question indirectly involving the position of the robot, for example,“do you want to eat apples”. Regular answers for such user query may be "I want to eat apples" or "I don't want to eat apples", or the like. However, in the embodiment of the present invention, in order to fully show the position of the chatbot, a reply with position, such as "Great, I like eating apples very much", may be selected for such query from the user.
[0067] 3) The user directly expresses the query with position, such as,“do you like eating apples”. In view of this situation, the chatbot may directly provide a reply showing its position.
[0068] The above three types of queries only exemplify the types of queries with position, and in actual conversation processing, other user query types can also be set as position queries as required.
[0069] When a chatbot receives a query with position, the chatbot may prefer the replies with position to show the stance of the chatbot. When a chatbot receives a query without position, the chatbot may choose the replies with position or the replies without position by controlling probability. How far the stance of the chatbot is shown may be controlled with the probability. If it is required to show more of the stance of the chatbot, the probability of outputting replies with position may be increased or the types for determining the query with position may be expanded (a larger range of user’s queries are set as queries with position). On the contrary, if it is required to show less of the stance of the chatbot so that the chatbot may look like a normal person, the probability for outputting the replies with position may be decreased or the types for determining the query with position may be narrowed.
[0070] It should be noted that in the drawings of the above-mentioned conversation processing device, the directions of arrows are only used for illustration so as to highlight a direction of the flow of a part of information or data or directions of transferring controlling instructions. There are no limitations by the above drawings on the direction of the flow of other information or data or directions of transferring controlling instructions required in the implementation of technical solutions.
[0071] The conversation processing device of the embodiment of the present invention has been described above, and the functions implemented by the conversation processing device may be realized as the conversation processing method described below.
[0072] As shown in Fig. 7, which is a schematic flowchart 700 showing a conversation processing method according to an embodiment of the present invention, the method may include the following steps.
[0073] S701 : generating a plurality of candidate replies according to a user query. In the processing of this step, a plurality of candidate replies matching the user query may be extracted based on a preset reply generating model and a corpus database. The processing of step S701 may be performed by a candidate reply generating module 401 of the conversation processing device described above.
[0074] S702: extracting an opinion from each candidate reply to generate opinions corresponding to various candidate replies. The opinion may include a target involved in the candidate reply. In the processing of this step, the opinion may be directly extracted from the candidate reply, if the candidate reply contains an intact semantic structure, and the extraction for opinion may be performed after the user query and the candidate reply are combined together, if the candidate reply does not have an intact semantic structure.
[0075] The processing of extracting opinions may adopt one of the following ways or a combination thereof:
[0076] 1) extracting the opinions according to grammar rules of candidate replies. In this way, the opinions expressed by the candidate replies may be extracted based on the recognition on grammar structures and parts of speech according to preset rules.
[0077] 2) extracting the opinions based on a neural network model.
[0078] Opinions may be extracted based on a Bi-LSTM (bidirectional LSTM (Long Short- Term Memory), i.e. a long short-term memory network) model and a CRF (conditional random field) model. Another way can use a CNN (Convolutional Neural Network) model to extract opinions. Opinion may be also extracted based on a Pointer Network model so as to generate opinions corresponding to various candidate replies.
[0079] The processing of step S702 may be performed by an opinion extracting module 402 of the conversation processing device described above.
[0080] S703: inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map. The target involved in the candidate reply has been extracted in the processing of step S702 and may be directly used in step S703. The position relationship map may record the position relationships between one or more chatbots (different roles or different character settings), between a plurality of targets, and between a plurality of chatbots and a plurality of targets. In some embodiments, a position relationship map may be created individually for each chatbot, and the position relationships of all chatbots may be integrated into one position relationship map.
[0081] A position that a chatbot should hold on a target involved in the candidate reply may be inferred based on the position relationship map. More particularly, the following three situations may be involved:
[0082] 1) The position which the chatbot should hold is inferred according to a direct relationship between the chatbot and the target recorded in the position relationship map.
[0083] 2) The position which the chatbot should hold is inferred according to an indirect relationship between the chatbot and the target recorded in the position relationship diagram.
[0084] 3) The position which the chatbot should hold on the user query and/or the target contained in the candidate reply is inferred according to the target recorded in the position relationship map and in combination with a knowledge database and/or a knowledge model and/or rules other than the position relationship map.
[0085] When the opinion of a candidate reply and the position of the current chatbot on a target in the reply are obtained, comparison may be made to determine whether or not there is conflict between the opinion of the candidate reply and the position of the chatbot. If there is conflict, the candidate reply may be deleted so as to maintain the consistency of character settings of the chatbot. The selected reply may be either a reply showing the position of the chatbot or a neutral reply with a weak position or without any position.
[0086] The processing of step S703 may be performed by a position inferring module 403 of the conversation processing device described above.
[0087] S704: performing selection on the candidate replies, deleting the candidate replies with opinions conflicting with positions, and using the remaining candidate replies as replies to be output. The processing in step S704 may use the opinions extracted in step S702 and the positions extracted in step S703.
[0088] In step S704, when the opinion of a candidate reply and the position of the current chatbot on a target in the reply are obtained, comparison may be made to determine whether or not there is conflict between the opinion of the candidate reply and the position of the chatbot. If there is conflict, the candidate reply may be deleted so as to maintain the consistency of character settings of the chatbot. The selected reply may be either a reply showing the position of the chatbot or a neutral reply with a weak position or without any position.
[0089] The processing of step S704 may be performed by a reply selecting module 404 of the conversation processing device described above. With the processing of the conversation processing method described above, the candidate replies conflicting with the character settings of the current chatbot in the generated candidate replies may be removed to fully ensure the consistency and stability of the stance of the chatbot, so that a user may have feelings on the stance of the chatbot during the communication with the chatbot.
[0090] As shown in Fig. 8, which is a schematic flowchart 800 showing a conversation processing method according to an embodiment of the present invention, the method may include the following steps.
[0091] S801 : generating a plurality of candidate replies according to a user query;
[0092] S802: extracting an opinion from each candidate reply to generate opinions corresponding to various candidate replies;
[0093] S803: inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map;
[0094] S804: performing selection on the candidate replies, and deleting the candidate replies with opinions conflicting with positions.
[0095] More particularly, the processing of steps S801 to S804 described above are consistent with those of steps S701 to S704 shown in Fig. 7;
[0096] S805: determining whether or not the user query is a query with position, and turning to step of S806, if the user query is a query with position, and turning to step of S807, if the user query is a query without position. More particularly, the processing in step of S805 may be performed by a user query determining module 601 provided in the conversation processing device described above;
[0097] S806: selecting a reply with position as output from the remaining candidate replies after deleting the candidate replies with opinions conflicting with the sentiment; and
[0098] S807: outputting a reply with position or a reply without position according to a preset probability controlling rule for the position replies.
[0099] The above-mentioned query with position may include the following types of queries.
[00100] 1) A user expresses his own opinion, such as“I like eating apples very much”. In view of this situation, the chatbot may actively show the preference on apples, so as to show the position of the chatbot.
[00101] 2) The user expresses a query with question indirectly involving the position of the robot, for example,“do you want to eat apples”. Regular answers for such user query may be "I want to eat apples" or "I don't want to eat apples", or the like. However, in the embodiment of the present invention, in order to fully show the position of the chatbot, a reply with position, such as "Great, I like eating apples very much", may be selected for such query from the user.
[00102] 3) The user expresses the query with position directly, such as,“do you like eating apples”. In view of this situation, the chatbot may directly provide a reply showing its position.
[00103] The above three types of queries only exemplify the types of queries with position, and in actual conversation processing, other user query types can also be set as position queries as required.
[00104] When a chatbot receives a query with position, the chatbot may prefer the replies with position to show the stance of the chatbot. When a chatbot receives a query without position, the chatbot may choose the replies with position or the replies without position by controlling probability. How far the stance of the chatbot is shown may be controlled with the probability. If it is required to show more of the stance of the chatbot, the probability of outputting replies with position may be increased or the types for determining the query with position may be expanded (a larger range of user’s queries are set as queries with position). On the contrary, if it is required to show less of the stance of the chatbot so that the chatbot may look like a normal person, the probability for outputting the replies with position may be decreased or the types for determining the query with position may be narrowed.
[00105] The processing of steps S806 and S807 may be performed by an output controlling module 602 of the conversation processing device described above.
[00106] It should be noted that the above-mentioned conversation processing method may be implemented based on the above-mentioned conversation processing device, or may be independently implemented as a method, or may be implemented by other software or hardware under the inventive idea of the embodiment of the present invention.
[00107] Description has been made on the processes of the answer-in-song processing methods according to the embodiments of the invention in the above, and the technical details and corresponding technical effects thereof are described in detail in the preceding introduction on the processing devices, and repeated description may be omitted to avoid redundancy.
Embodiments
[00108] In some examples, one or more components or modules and one or more steps as shown in Fig. 1 to Fig. 8 may be implemented by software, hardware, or in combination of software and hardware. For example, the above component or module and one or more steps may be implemented in system on chip (SoC). Soc may include: integrated circuit chip, including one or more of processing unit (such as center processing unit (CPU), micro controller, micro processing unit, digital signal processing unit (DSP) or the like), memory, one or more communication interface, and/or other circuit for performing its function and alternative embedded firmware.
[00109] As shown in Fig. 9, which is a structural block diagram of an electronic apparatus according to an embodiment of the present invention. The electronic apparatus 900 may include a memory 901 and a processor 902.
[00110] The memory 901 may be configured to store programs. In addition to the above programs, the memory 901 may be configured to store other data to support operations on the electronic apparatus 900. The examples of these data may include instructions of any applications or methods operated on the electronic apparatus 900, contact data, phone book data, messages, pictures, videos, and the like.
[00111] The memory 901 may be implemented by any kind of volatile or nonvolatile storage device or their combinations, such as static random access memory (SRAM), electronically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk memory, or optical disk.
[00112] The memory 901 may be coupled to the processor 902 and contain instructions stored thereon. The instructions may cause the electronic apparatus 900 to perform operations upon being executed by the processor 902, the operations may include:
[00113] generating a plurality of candidate replies according to a user query;
[00114] extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply;
[00115] inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map;
[00116] performing selection on the candidate replies, and deleting the candidate replies with opinions conflicting with positions.
[00117] More particularly, the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply may include:
[00118] directly extracting the opinion from the candidate reply, if the candidate reply contains an intact semantic structure, and performing the extraction for opinion after the user query and the candidate reply are combined together, if the candidate reply does not have an intact semantic structure.
[00119] Each node in the position relationship map may include the following information: holder, target, relationship between the holder and the target, and sentiment on a target by a holder.
[00120] More particularly, the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply may include:
[00121] extracting opinions according to grammar rules for candidate replies , and/or extracting opinions based on a neural network model, so as to generate the opinion corresponding to each of the candidate replies.
[00122] More particularly, the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map may include the processing for the following three situations:
[00123] inferring the position which the chatbot should hold according to a direct relationship between the chatbot and the target recorded in the position relationship map.
[00124] inferring the position which the chatbot should hold according to an indirect relationship between the chatbot and the target recorded in the position relationship diagram.
[00125] inferring the position which the chatbot should hold on the user query and/or the target contained in the candidate reply according to the target recorded in the position relationship map and in combination with a knowledge database and/or a knowledge model and/or rules other than the position relationship map.
[00126] The operations performed by the electronic apparatus may further include:
[00127] determining whether or not the user query is a query with position, selecting a reply with position as output from the remaining candidate replies after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query with position, and outputting a reply with position or a reply without position according to a preset probability controlling rule for the position replies, if the user query is a query without position.
[00128] Detailed description has been made on the above operations in the above embodiments of method and device. The description on the above operations may be applied to electronic apparatus 900. That is to say, the specific operations mentioned in the above embodiments may be recorded in memory 901 in program and be performed by processor 902.
[00129] Furthermore, as shown in Fig. 9, the electronic apparatus 900 may further include: a communication unit 903, a power supply unit 904, an audio unit 905, a display unit 906, chipset 907, and other units. Only part of units are exemplarily shown in Fig. 9 and it is obvious to one skilled in the art that the electronic apparatus 900 only includes the units shown in Fig. 9.
[00130] The communication unit 903 may be configured to facilitate wireless or wired communication between the electronic apparatus 900 and other apparatuses. The electronic apparatus may be connected to wireless network based on communication standard, such as Wi-Fi, 2G, 3G, or their combination. In an exemplary example, the communication unit 903 may receive radio signal or radio related information from external radio management system via radio channel. In an exemplary example, the communication unit 903 may further include near field communication (NFC) module for facilitating short-range communication. For example, the NFC module may be implemented with radio frequency identification (RFID) technology, Infrared data association (IrDA) technology, ultra wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[00131] The power supply unit 904 may be configured to supply power to various units of the electronic device. The power supply unit 904 may include a power supply management system, one or more power supplies, and other units related to power generation, management, and allocation.
[00132] The audio unit 905 may be configured to output and/or input audio signals. For example, the audio unit 905 may include a microphone (MIC). When the electronic apparatus in an operation mode, such as calling mode, recording mode, and voice recognition mode, the MIC may be configured to receive external audio signals. The received audio signals may be further stored in the memory 901 or sent via the communication unit 903. In some examples, the audio unit 905 may further include a speaker configured to output audio signals.
[00133] The display unit 906 may include a screen, which may include liquid crystal display (LCD) and touch panel (TP). If the screen includes a touch panel, the screen may be implemented as touch screen so as to receive input signal from users. The touch panel may include a plurality of touch sensors to sense touching, sliding, and gestures on the touch panel. The touch sensor may not only sense edges of touching or sliding actions, but also sense period and pressure related to the touching or sliding operations.
[00134] The above memory 901, processor 902, communication unit 903, power supply unit 904, audio unit 905 and display unit 906 may be connected with the chipset 907. The chipset 907 may provide interface between the processor 902 and other units of the electronic apparatus 900. Furthermore, the chipset 907 may provide interface for each unit of the electronic apparatus 900 to access the memory 1301 and communication interface for accessing among units.
Example Clauses
[00135] A, A method, including:
[00136] generating a plurality of candidate replies according to a user query;
[00137] extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply;
[00138] inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map; and
[00139] performing selection on the candidate replies, and deleting the candidate replies with opinions conflicting with positions.
[00140] B, The method according to paragraph A, wherein
[00141] the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply includes:
[00142] directly extracting the opinion from the candidate reply, if the candidate reply contains an intact semantic structure, and performing the extraction for opinion after the user query and the candidate reply are combined together, if the candidate reply does not have an intact semantic structure.
[00143] C, The method according to paragraph A, wherein each node in the position relationship map includes the following information: holder, target, relationship between the holder and the target, and sentiment on a target by a holder.
[00144] D, The method according to paragraph A, wherein the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply includes:
[00145] extracting opinions according to grammar rules for candidate replies , and/or extracting opinions based on a neural network model, so as to generate the opinion corresponding to each of the candidate replies.
[00146] E, The method according to paragraph A, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map includes:
[00147] inferring the position which the chatbot should hold according to a direct relationship between the chatbot and the target recorded in the position relationship map.
[00148] F, The method according to paragraph A, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map includes:
[00149] inferring the position which the chatbot should hold according to an indirect relationship between the chatbot and the target recorded in the position relationship diagram.
[00150] G, The method according to paragraph A, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map includes:
[00151] inferring the position which the chatbot should hold on the user query and/or the target contained in the candidate reply according to the target recorded in the position relationship map and in combination with a knowledge database and/or a knowledge model and/or rules other than the position relationship map.
[00152] H, The method according to paragraph A, further including:
[00153] determining whether or not the user query is a query with position, and
[00154] selecting a reply with position as output from the candidate replies left after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query with position.
[00155] I, The method according to paragraph H, further including:
[00156] outputting a reply with position or a reply without position according to a preset probability controlling rule for the position replies, among the candidate replies left after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query without position.
[00157] J, The method according to paragraph H, wherein the query with position includes:
[00158] a user query showing an opinion from a user on the target, and/or a user query proposing a question related to the position held by the chatbot on the target.
[00159] K, A device, including:
[00160] a candidate reply generating module configured to generate a plurality of candidate replies according to a user query;
[00161] an opinion extracting module configured to extract an opinion from each candidate reply to generate an opinion corresponding to each candidate reply;
[00162] a position inferring module configured to infer a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map; and
[00163] a reply selecting module configured to perform selection on the candidate replies, and delete the candidate replies with opinions conflicting with positions.
[00164] L, The device according to paragraph K, wherein the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply includes:
[00165] directly extracting the opinion from the candidate reply, if the candidate reply contains an intact semantic structure, and performing the extraction for opinion after the user query and the candidate reply are combined together, if the candidate reply does not have an intact semantic structure.
[00166] M, The device according to paragraph K, wherein each node in the position relationship map includes the following information: holder, target, relationship between the holder and the target, and sentiment on a target by a holder.
[00167] N, The device according to paragraph K, wherein the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply includes:
[00168] extracting opinions according to grammar rules for candidate replies , and/or extracting opinions based on a neural network model, so as to generate the opinion corresponding to each of the candidate replies.
[00169] O, The device according to paragraph K, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map includes:
[00170] inferring the position which the chatbot should hold according to a direct relationship between the chatbot and the target recorded in the position relationship map.
[00171] P, The device according to paragraph K, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map comprises:
[00172] inferring the position which the chatbot should hold according to an indirect relationship between the chatbot and the target recorded in the position relationship diagram.
[00173] Q, The device according to paragraph K, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map comprises:
[00174] inferring the position which the chatbot should hold on the user query and/or the target contained in the candidate reply according to the target recorded in the position relationship map and in combination with a knowledge database and/or a knowledge model and/or rules other than the position relationship map.
[00175] R, The device according to paragraph K, further comprising: a user query determining module and an output controlling module, wherein
[00176] the user query determining module is configured to determine whether or not the user query is a query with position, and sending a determination result to the output controlling module; and
[00177] the output controlling module is configured to perform the following output control according to the determination result:
[00178] selecting a reply with position as output from the candidate replies left after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query with position.
[00179] S, The device according to paragraph R, wherein the output control further comprises:
[00180] outputting a reply with position or a reply without position according to a preset probability controlling rule for the position replies, among the candidate replies left after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query without position.
[00181] T, The device according to paragraph r, wherein the query with position includes:
[00182] a user query showing an opinion from a user on the target, and/or a user query proposing a question related to the position held by the chatbot on the target.
[00183] U, An electronic apparatus, including:
[00184] a processing unit; and
[00185] a memory, coupled to the processing unit and containing instructions stored thereon, the instructions cause the electronic apparatus to perform operations upon being executed by the processing unit, the operations comprise:
[00186] generating a plurality of candidate replies according to a user query;
[00187] extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply;
[00188] inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map; and
[00189] performing selection on the candidate replies, and deleting the candidate replies with opinions conflicting with positions.
[00190] V, The electronic apparatus according to paragraph U, wherein
[00191] the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply includes:
[00192] directly extracting the opinion from the candidate reply, if the candidate reply contains an intact semantic structure, and performing the extraction for opinion after the user query and the candidate reply are combined together, if the candidate reply does not have an intact semantic structure.
[00193] W, The electronic apparatus according to paragraph U, wherein each node in the position relationship map includes the following information: holder, target, relationship between the holder and the target, and sentiment on a target by a holder.
[00194] X, The electronic apparatus according to paragraph U, wherein the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply includes:
[00195] extracting opinions according to grammar rules for candidate replies , and/or extracting opinions based on a neural network model, so as to generate the opinion corresponding to each of the candidate replies.
[00196] Y, The electronic apparatus according to paragraph U, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map includes:
[00197] inferring the position which the chatbot should hold according to a direct relationship between the chatbot and the target recorded in the position relationship map.
[00198] Z, The electronic apparatus according to paragraph U, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map includes:
[00199] inferring the position which the chatbot should hold according to an indirect relationship between the chatbot and the target recorded in the position relationship diagram.
[00200] Al, The electronic apparatus according to paragraph U, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map includes:
[00201] inferring the position which the chatbot should hold on the user query and/or the target contained in the candidate reply according to the target recorded in the position relationship map and in combination with a knowledge database and/or a knowledge model and/or rules other than the position relationship map.
[00202] Bl, The electronic apparatus according to paragraph U, wherein the operations further include:
[00203] determining whether or not the user query is a query with position, and
[00204] selecting a reply with position as output from the candidate replies left after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query with position.
[00205] Cl, The electronic apparatus according to paragraph B l, wherein the operations further includes:
[00206] outputting a reply with position or a reply without position according to a preset probability controlling rule for the position replies, among the candidate replies left after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query without position.
[00207] Dl, The electronic apparatus according to paragraph B l, wherein the query with position includes:
[00208] a user query showing an opinion from a user on the target, and/or a user query proposing a question related to the position held by the chatbot on the target.
Conclusion
[00209] There is little distinction left between hardware and software implementations of aspects of systems; the use of hardware or software is generally (but not always, in that in certain contexts the choice between hardware and software can become significant) a design choice representing cost versus efficiency tradeoffs. There are various vehicles by which processes and/or systems and/or other technologies described herein can be effected (e.g., hardware, software, and/or firmware), and that the preferred vehicle will vary with the context in which the processes and/or systems and/or other technologies are deployed. For example, if an implementer determines that speed and accuracy are paramount, the implementer may opt for a mainly hardware and/or firmware vehicle; if flexibility is paramount, the implementer may opt for a mainly software implementation; or, yet again alternatively, the implementer may opt for some combination of hardware, software, and/or firmware.
[00210] The foregoing detailed description has set forth various embodiments of the devices and/or processes via the use of block diagrams, flowcharts, and/or examples. Insofar as such block diagrams, flowcharts, and/or examples contain one or more functions and/or operations, it will be understood by those within the art that each function and/or operation within such block diagrams, flowcharts, or examples can be implemented, individually and/or collectively, by a wide range of hardware, software, firmware, or virtually any combination thereof. In one embodiment, several portions of the subject matter described herein may be implemented via Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), digital signal processors (DSPs), or other integrated formats. However, those skilled in the art will recognize that some aspects of the embodiments disclosed herein, in whole or in part, can be equivalently implemented in integrated circuits, as one or more computer programs running on one or more computers (e.g., as one or more programs running on one or more computer systems), as one or more programs running on one or more processors (e.g., as one or more programs running on one or more microprocessors), as firmware, or as virtually any combination thereof, and that designing the circuitry and/or writing the code for the software and or firmware would be well within the skill of one of skill in the art in light of this disclosure. In addition, those skilled in the art will appreciate that the mechanisms of the subject matter described herein are capable of being distributed as a program product in a variety of forms, and that an illustrative embodiment of the subject matter described herein applies regardless of the particular type of signal bearing medium used to actually carry out the distribution. Examples of a signal bearing medium include, but are not limited to, the following: a recordable type medium such as a floppy disk, a hard disk drive, a Compact Disc (CD), a Digital Versatile Disk (DVD), a digital tape, a computer memory, etc.; and a transmission type medium such as a digital and/or an analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communications link, a wireless communication link, etc.).
[00211] Those skilled in the art will recognize that it is common within the art to describe devices and/or processes in the fashion set forth herein, and thereafter use engineering practices to integrate such described devices and/or processes into data processing systems. That is, at least a portion of the devices and/or processes described herein can be integrated into a data processing system via a reasonable amount of experimentation. Those having skill in the art will recognize that a typical data processing system generally includes one or more of a system unit housing, a video display device, a memory such as volatile and non volatile memory, processors such as microprocessors and digital signal processors, computational entities such as operating systems, drivers, graphical user interfaces, and applications programs, one or more interaction devices, such as a touch pad or screen, and/or control systems including feedback loops and control motors (e.g., feedback for sensing position and/or velocity; control motors for moving and/or adjusting components and/or quantities). A typical data processing system may be implemented utilizing any suitable commercially available components, such as those typically found in data computing/communication and/or network computing/communication systems.
[00212] The herein described subject matter sometimes illustrates different components contained within, or connected with, different other components. It is to be understood that such depicted architectures are merely exemplary, and that in fact many other architectures can be implemented which achieve the same functionality. In a conceptual sense, any arrangement of components to achieve the same functionality is effectively "associated" such that the desired functionality is achieved. Hence, any two components herein combined to achieve a particular functionality can be seen as "associated with" each other such that the desired functionality is achieved, irrespective of architectures or intermedial components. Likewise, any two components so associated can also be viewed as being "operably connected", or "operably coupled", to each other to achieve the desired functionality, and any two components capable of being so associated can also be viewed as being "operably couplable", to each other to achieve the desired functionality. Specific examples of operably couplable include but are not limited to physically mateable and/or physically interacting components and/or wirelessly interactable and/or wirelessly interacting components and/or logically interacting and/or logically interactable components.
[00213] With respect to the use of substantially any plural and/or singular terms herein, those having skill in the art can translate from the plural to the singular and/or from the singular to the plural as is appropriate to the context and/or application. The various singular/plural permutations may be expressly set forth herein for sake of clarity.
[00214] It will be understood by those within the art that, in general, terms used herein, and especially in the appended claims (e.g., bodies of the appended claims) are generally intended as "open" terms (e.g., the term "including" should be interpreted as "including but not limited to," the term "having" should be interpreted as "having at least," the term "includes" should be interpreted as "includes but is not limited to," etc.). It will be further understood by those within the art that if a specific number of an introduced claim recitation is intended, such an intent will be explicitly recited in the claim, and in the absence of such recitation no such intent is present. For example, as an aid to understanding, the following appended claims may contain usage of the introductory phrases "at least one" and "one or more" to introduce claim recitations. However, the use of such phrases should not be construed to imply that the introduction of a claim recitation by the indefinite articles "a" or "an" limits any particular claim containing such introduced claim recitation to disclosures containing only one such recitation, even when the same claim includes the introductory phrases "one or more" or "at least one" and indefinite articles such as "a" or "an" (e.g., "a" and/or "an" should typically be interpreted to mean "at least one" or "one or more"); the same holds true for the use of definite articles used to introduce claim recitations. In addition, even if a specific number of an introduced claim recitation is explicitly recited, those skilled in the art will recognize that such recitation should typically be interpreted to mean at least the recited number (e.g., the bare recitation of "two recitations," without other modifiers, typically means at least two recitations, or two or more recitations). Furthermore, in those instances where a convention analogous to "at least one of A, B, and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, and C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.). In those instances where a convention analogous to "at least one of A, B, or C, etc. " is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, or C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.). It will be further understood by those within the art that virtually any disjunctive word and/or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase "A or B" will be understood to include the possibilities of "A" or "B" or "A and B."
[00215] Reference in the specification to“an implementation”,“one implementation”, “some implementations”, or“other implementations” may mean that a particular feature, structure, or characteristic described in connection with one or more implementations may be included in at least some implementations, but not necessarily in all implementations. The various appearances of “an implementation”, “one implementation”, or “some implementations” in the preceding description are not necessarily all referring to the same implementations.
[00216] While certain exemplary techniques have been described and shown herein using various methods and systems, it should be understood by those skilled in the art that various other modifications may be made, and equivalents may be substituted, without departing from claimed subject matter. Additionally, many modifications may be made to adapt a particular situation to the teachings of claimed subject matter without departing from the central concept described herein. Therefore, it is intended that claimed subject matter not be limited to the particular examples disclosed, but that such claimed subject matter also may include all implementations falling within the scope of the appended claims, and equivalents thereof.
[00217] Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described. Rather, the specific features and acts are disclosed as illustrative forms of implementing the claims.
[00218] Conditional language such as, among others, "can," "could," "might" or "may," unless specifically stated otherwise, are otherwise understood within the context as used in general to present that certain examples include, while other examples do not include, certain features, elements and/or steps. Thus, such conditional language is not generally intended to imply that features, elements and/or steps are in any way required for one or more examples or that one or more examples necessarily include logic for deciding, with or without user input or prompting, whether these features, elements and/or steps are included or are to be performed in any particular example.
[00219] Conjunctive language such as the phrase "at least one of X, Y or Z," unless specifically stated otherwise, is to be understood to present that an item, term, etc. can be either X, Y, or Z, or a combination thereof.
[00220] Any routine descriptions, elements or blocks in the flow diagrams described herein and/or depicted in the attached figures should be understood as potentially representing modules, segments, or portions of code that include one or more executable instructions for implementing specific logical functions or elements in the routine. Alternate examples are included within the scope of the examples described herein in which elements or functions can be deleted, or executed out of order from that shown or discussed, including substantially synchronously or in reverse order, depending on the functionality involved as would be understood by those skilled in the art.
[00221] It should be emphasized that many variations and modifications can be made to the above-described examples, the elements of which are to be understood as being among other acceptable examples. All such modifications and variations are intended to be included herein within the scope of this disclosure and protected by the following claims
[00222] It would be obvious to one skilled in the art that, all or part of steps for implementing the above embodiments may be accomplished by hardware related to programs or instructions. The above program may be stored in a computer readable storing medium. Such program may perform the steps of the above embodiments upon being executed. The above storing medium may include: ROM, RAM, magnetic disk, or optic disk or other medium capable of storing program codes.
[00223] It should be noted that the foregoing embodiments are merely used to illustrate the technical solution of the present disclosure, and not to limit the present disclosure. Although the present disclosure has been described in detail with reference to the foregoing embodiments, one skilled in the art would understand that the technical solutions recited in the foregoing embodiments may be modified or all or a part of the technical features may be replaced equally. These modifications and replacements are not intended to make corresponding technical solution depart from the scope of the technical solution of embodiments of the present disclosure.

Claims

1. A device, comprising:
a candidate reply generating module configured to generate a plurality of candidate replies according to a user query;
an opinion extracting module configured to extract an opinion from each candidate reply to generate an opinion corresponding to each candidate reply;
a position inferring module configured to infer a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map; and
a reply selecting module configured to perform selection on the candidate replies, and delete the candidate replies with opinions conflicting with the position.
2. The device according to claim 1, wherein each node in the position relationship map comprises the following information: holder, target, relationship between the holder and the target, and sentiment on a target by a holder.
3. The device according to claim 1, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map comprises:
inferring the position which the chatbot should hold according to a direct relationship between the chatbot and the target recorded in the position relationship map.
4. The device according to claim 1, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map comprises:
inferring the position which the chatbot should hold according to an indirect relationship between the chatbot and the target recorded in the position relationship diagram.
5. The device according to claim 1, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map comprises:
inferring the position which the chatbot should hold on the user query and/or the target contained in the candidate reply according to the target recorded in the position relationship map and in combination with a knowledge database and/or a knowledge model and/or rules other than the position relationship map.
6. The device according to claim 1, further comprising: a user query determining module and an output controlling module, wherein
the user query determining module is configured to determine whether or not the user query is a query with position, and sending a determination result to the output controlling module; and
the output controlling module is configured to perform the following output control according to the determination result:
selecting a reply with position as output from the candidate replies left after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query with position.
7. The device according to claim 6, wherein the output control further comprises: outputting a reply with position or a reply without position according to a preset probability controlling rule for the position replies, among the candidate replies left after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query without position.
8. A method, comprising:
generating a plurality of candidate replies according to a user query;
extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply;
inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map; and
performing selection on the candidate replies, and deleting the candidate replies with opinions conflicting with positions.
9. The method according to claim 8, wherein
the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply comprises:
directly extracting the opinion from the candidate reply, if the candidate reply contains an intact semantic structure, and performing the extraction for opinion after the user query and the candidate reply are combined together, if the candidate reply does not have an intact semantic structure.
10. The method according to claim 8, wherein the extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply comprises: extracting opinions according to grammar rules for candidate replies , and/or extracting opinions based on a neural network model, so as to generate the opinion corresponding to each of the candidate replies.
11. The method according to claim 8, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map comprises:
inferring the position which the chatbot should hold according to a direct relationship between the chatbot and the target recorded in the position relationship map.
12. The method according to claim 8, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map comprises:
inferring the position which the chatbot should hold according to an indirect relationship between the chatbot and the target recorded in the position relationship diagram.
13. The method according to claim 8, wherein the inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map comprises:
inferring the position which the chatbot should hold on the user query and/or the target contained in the candidate reply according to the target recorded in the position relationship map and in combination with a knowledge database and/or a knowledge model and/or rules other than the position relationship map.
14. The method according to claim 8, further comprising:
determining whether or not the user query is a query with position, and
selecting a reply with position as output from the candidate replies left after deleting the candidate replies with opinions conflicting with the sentiment, if the user query is a query with position.
15. An electronic apparatus, comprising:
a processing unit; and a memory, coupled to the processing unit and containing instructions stored thereon, the instructions cause the electronic apparatus to perform operations upon being executed by the processing unit, the operations comprise:
generating a plurality of candidate replies according to a user query;
extracting an opinion from each candidate reply to generate an opinion corresponding to each candidate reply;
inferring a position which a chatbot should hold on a target involved in the candidate reply according to a position relationship map; and
performing selection on the candidate replies, and deleting the candidate replies with opinions conflicting with positions.
PCT/US2019/024187 2018-04-08 2019-03-27 Chatbot with a stance taking WO2019199456A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810307292.1A CN110362661A (en) 2018-04-08 2018-04-08 The chat robots technology for seeing position with three
CN201810307292.1 2018-04-08

Publications (1)

Publication Number Publication Date
WO2019199456A1 true WO2019199456A1 (en) 2019-10-17

Family

ID=66290527

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2019/024187 WO2019199456A1 (en) 2018-04-08 2019-03-27 Chatbot with a stance taking

Country Status (2)

Country Link
CN (1) CN110362661A (en)
WO (1) WO2019199456A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837548B (en) * 2019-11-05 2022-11-11 泰康保险集团股份有限公司 Answer matching method and device, electronic equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9461876B2 (en) * 2012-08-29 2016-10-04 Loci System and method for fuzzy concept mapping, voting ontology crowd sourcing, and technology prediction
CN104598445B (en) * 2013-11-01 2019-05-10 腾讯科技(深圳)有限公司 Automatically request-answering system and method
KR101785420B1 (en) * 2015-04-30 2017-11-06 주식회사 카카오 Method for providing chatting service using cleint bot and apparatus for performing the method
CN105068661B (en) * 2015-09-07 2018-09-07 百度在线网络技术(北京)有限公司 Man-machine interaction method based on artificial intelligence and system
JP6842825B2 (en) * 2015-09-25 2021-03-17 株式会社ユニバーサルエンターテインメント Information provision system, information provision method, and program
JP6992957B2 (en) * 2015-10-21 2022-01-13 国立大学法人大阪大学 Agent dialogue system
US11516153B2 (en) * 2016-01-25 2022-11-29 Expensify, Inc. Computer system providing a chat engine
CN106202417A (en) * 2016-07-12 2016-12-07 北京光年无限科技有限公司 A kind of man-machine interaction method for intelligent robot and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
117.40.29.113 ET AL: "Chatbot", WIKIPEDIA, 28 March 2018 (2018-03-28), pages 1 - 9, XP055591985, Retrieved from the Internet <URL:https://en.wikipedia.org/w/index.php?title=Chatbot&oldid=832834854> [retrieved on 20190527] *
IULIAN V SERBAN ET AL: "A Deep Reinforcement Learning Chatbot (Short Version)", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 20 January 2018 (2018-01-20), XP080853426 *

Also Published As

Publication number Publication date
CN110362661A (en) 2019-10-22

Similar Documents

Publication Publication Date Title
US11809829B2 (en) Virtual assistant for generating personalized responses within a communication session
US11062270B2 (en) Generating enriched action items
US10366168B2 (en) Systems and methods for a multiple topic chat bot
US11227126B2 (en) Associating characters to story topics derived from social media content
US10250532B2 (en) Systems and methods for a personality consistent chat bot
US20220318519A1 (en) Characterized chatbot with personality
US11366634B2 (en) Memory retention system
CN109582869B (en) Data processing method and device and data processing device
EP3822814A2 (en) Human-machine interaction method and apparatus based on neural network
US20190155954A1 (en) Cognitive Chat Conversation Discovery
WO2019212729A1 (en) Generating response based on user&#39;s profile and reasoning on contexts
US20220068296A1 (en) Autocreation of conversational image representation
WO2019199456A1 (en) Chatbot with a stance taking
CN110895558A (en) Dialog reply method and related device
CN112748828B (en) Information processing method, device, terminal equipment and medium
US20210158188A1 (en) Recommending news in conversation
Patel et al. My Buddy App: Communications between Smart Devices through Voice Assist
US20210097502A1 (en) Automatically determining and presenting personalized action items from an event
Wang et al. Greeting, Function, and Music: How Users Chat with Voice Assistants

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19719987

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19719987

Country of ref document: EP

Kind code of ref document: A1