Conversation method and device for service robot and service robot conversation system

By analyzing the dialogue information input by the user and selecting appropriate functional models from multiple functional model libraries, the problem of insufficient accuracy of a single large model when smart home devices interact with users is solved, achieving higher interaction accuracy and system Accuracy.

CN118778818APending Publication Date: 2024-10-15QINGDAO HAIER TECH +3
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410912013.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

When existing smart home devices interact with users, they continuously call a single large model, resulting in insufficient accuracy and reducing the accuracy of interaction.

Method used

By analyzing the dialogue information input by the user, the target dialogue demand pattern is determined, and the appropriate functional model is selected from multiple functional model libraries to be called, and the dialogue information for interaction with the user is generated to avoid the invocation of a single large model.

Benefits of technology

It improves the accuracy of interaction with users, improves the accuracy of the system, and can respond to user needs more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118778818A_ABST
    Figure CN118778818A_ABST
Patent Text Reader

Abstract

The invention discloses a dialogue method and device for a service robot and a service robot dialogue system, and relates to the technical field of smart home, and the dialogue method for the service robot comprises the steps: analyzing first dialogue information inputted by a user, and determining a target dialogue demand mode corresponding to the first dialogue information; selecting a target function model corresponding to the target user dialogue demand mode from a model library; wherein the model library comprises a plurality of functional models; and calling the target function model, and generating second dialogue information interacting with the user. According to the method, the target function model can be selected from the model library to be called according to the target dialogue demand mode, so that interaction with the user is performed, the accuracy of interaction with the user is improved, and the cost of calling the model can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and more specifically, to a conversation method and device for a service robot, and a conversation system for a service robot. Background Art

[0002] With the rapid development of smart homes, smart home devices play an increasingly important role in people's daily lives. They can interact, learn and teach with children, help adults control smart home devices, communicate with the elderly and even help them pick up things, etc. How to make smart home devices interact with users accurately is still an unsolved problem.

[0003] In order to solve the demand for smart home devices to interact with users accurately, the related technology discloses a method of using Amazon's Alex to interact with users.

[0004] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related art:

[0005] Although the relevant technology can interact with users, it continuously calls a single large model during use, which is insufficient in precision and reduces the accuracy of interaction with users.

[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0007] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0008] The embodiments of the present application provide a dialogue method and device for a service robot, and a service robot dialogue system to solve the accuracy problem of interacting with users caused by calling a single large model.

[0009] In some embodiments, the conversation method for a service robot includes: analyzing first conversation information input by a user to determine a target conversation demand pattern corresponding to the first conversation information; selecting a target function model corresponding to the target user conversation demand pattern from a model library; wherein the model library includes multiple function models; and calling the target function model to generate a second conversation information for interacting with the user.

[0010] Optionally, the first dialogue information input by the user is obtained in the following manner: obtaining the user's input data; wherein the input data includes multiple types of voice input data, touch screen input data, physical button input data, gesture recognition input data and emotion recognition input data; converting the user's input data through a language processing model to obtain the first dialogue information input by the user.

[0011] Optionally, analyzing the first dialogue information input by the user to determine the target dialogue demand pattern corresponding to the first dialogue information includes: inputting the first dialogue information input by the user, the user's historical dialogue content and the environmental status information into an intention recognition model to obtain the user's dialogue intention; wherein the environmental status information includes device status information, and / or environmental information, and / or user information; and determining the target dialogue demand pattern according to the user's dialogue intention.

[0012] Optionally, analyze the first dialogue information input by the user to determine the target dialogue demand pattern corresponding to the first dialogue information, including: inputting the first dialogue information input by the user into a graph neural network model to obtain the target dialogue demand pattern; wherein the nodes of the graph neural network model indicate users, system responses, and time, and the edges connecting the nodes indicate user behavior factors between the connected nodes, and the attention mechanism is used to strengthen the focus of the graph neural network model on target nodes and target edges.

[0013] Optionally, calling the target function model includes: determining the calling time according to user needs and the current environment; or, determining the calling time according to user needs, the current environment and context information; wherein the context information is obtained by analyzing the time, date and user conversation history content; and calling the target function model at the calling time.

[0014] Optionally, determining the calling time according to user needs, current environment and context information includes: extracting features of user needs, current environment and context information; the extracted features include one or more of noise features, light intensity features, user activity features, time features, user habit features and user preference features; determining the calling time according to the extracted features.

[0015] Optionally, determining the calling timing based on the extracted features includes: obtaining multiple calling timings of the target function model; wherein the multiple calling timings correspond one-to-one to multiple historical features; and when the extracted features match the historical features, determining the calling timing corresponding to the historical features as the calling timing of the target function model.

[0016] Optionally, calling the target function model to generate second dialogue information for interacting with the user includes: obtaining the user's second query information; inputting the second query information into the large language model to obtain query completion information corresponding to the second query information; wherein the input data of the large language model also includes the user's historical context dialogue content and environmental status information; and generating second response information corresponding to the query completion information through the target function model, so that the second query information and the second response information constitute the second dialogue information.

[0017] In some embodiments, the conversation device for a service robot comprises a processor and a memory. The memory stores a computer program, and the processor is configured to execute the conversation method for a service robot through the computer program.

[0018] In some embodiments, the service robot dialogue system includes: a model library, including multiple functional models; the above-mentioned dialogue device for the service robot is connected to the model library to call the functional model from the model library.

[0019] The dialogue method and device for a service robot and the dialogue system for a service robot provided in the embodiments of the present application can achieve the following technical effects:

[0020] The embodiment of the present application determines the target dialogue requirement mode upon receiving the first dialogue information input by the user; selects the target function model from the model library according to the target dialogue requirement mode, and then calls the target function model to generate the second dialogue information for interaction with the user, so as to realize the function of dialogue with the user. Compared with the call of a single function in the related art, the present application sets up a model library, which includes multiple function models. In the process of interaction with the user, the target function model is selected from the model library and called, so as to interact with the user. Therefore, there is no need to call a comprehensive large model, which can improve the accuracy of the system and thus improve the accuracy of interaction with the user.

[0021] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0024] Figure 1 It is a schematic diagram of the hardware environment of a conversation method for a service robot according to an embodiment of the present application.

[0025] Figure 2 is a schematic diagram of a conversation method for a service robot provided in an embodiment of the present application;

[0026] Figure 3 is a schematic diagram of another conversation method for a service robot provided in an embodiment of the present application;

[0027] Figure 4 is a schematic diagram of another conversation method for a service robot provided in an embodiment of the present application;

[0028] Figure 5 is a schematic diagram of another conversation method for a service robot provided in an embodiment of the present application;

[0029] Figure 6 It is a schematic diagram of a dialogue device for a service robot provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first", "second" etc. in the technical solutions recorded in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0032] Unless otherwise stated, the term "plurality" means two or more.

[0033] In the embodiment of the present application, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.

[0034] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0035] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.

[0036] According to one aspect of an embodiment of the present application, a conversation method for a service robot is provided. The method is widely used in smart home, smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the conversation method for a service robot can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0037] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0038] It should be understood that Figure 1 The number of terminal devices and servers in the figure is only for illustration. According to actual needs, there may be any number of terminal devices and servers. For example, one terminal device may correspond to multiple servers.

[0039] Combination Figure 2As shown, the embodiment of the present application provides a conversation method for a service robot, comprising:

[0040] S201, the server analyzes first dialogue information input by a user, and determines a target dialogue demand mode corresponding to the first dialogue information.

[0041] S202, the server selects a target functional model corresponding to the target user's dialogue demand pattern from a model library; wherein the model library includes a plurality of functional models.

[0042] S203: The server calls the target function model to generate second dialogue information for interacting with the user.

[0043] The conversation method for a service robot provided in the embodiment of the present application is adopted, by determining the target conversation demand mode when receiving the first conversation information input by the user; selecting the target function model from the model library according to the target conversation demand mode, and then calling the target function model to generate the second conversation information for interacting with the user, so as to realize the function of talking to the user. Compared with the calling of a single function in the related art, the present application sets up a model library, which includes multiple function models. In the process of interacting with the user, the target function model is selected from the model library and called to interact with the user. Therefore, there is no need to call a comprehensive large model, which can improve the accuracy of the system and thus improve the accuracy of interaction with the user.

[0044] More specifically, the first dialogue information includes voice information, text information, image information, video information, physical control information, emotion information, etc. The second dialogue information includes voice information, text information, image information, video information, operation results, etc. directly output by the target function model or converted from the target function model output, in response to the first dialogue information input by the user.

[0045] More specifically, the model library includes a multi-modal large model library, and the functional model in the model library only needs to process data of one modality, which can reduce the scale of the functional model. For simple tasks, there is no need for a large-scale model, for example, there is no need for a large model of 170B, and a small-scale model can be used, and the scale of the small-scale model can be 1B or 2B.

[0046] It should be noted that in Figure 2 In the illustrated embodiment, the method is run on a terminal device. In other implementations, the method may also be run on a server, which is not described in detail. In other implementations, the method may also be implemented through interaction between a terminal device and a server.

[0047] Optionally, the first dialogue information input by the user is obtained in the following manner: obtaining the user's input data; wherein the input data includes multiple types of voice input data, touch screen input data, physical button input data, gesture recognition input data and emotion recognition input data; converting the user's input data through a language processing model to obtain the first dialogue information input by the user.

[0048] In the disclosed embodiments, voice input is a natural and intuitive way of interaction. Users can send commands or ask questions by speaking, and the service robot responds through speech synthesis technology. Acquiring voice input data requires an efficient speech recognition system to convert speech into text, and a speech synthesis system to convert text into speech.

[0049] When inputting data, including touching the screen, the service robot device needs to have a screen, so the touch screen can become an important interaction method. Users can operate through gestures such as clicking and sliding, and the screen can display information such as text, images or videos.

[0050] When the input data includes physical button input data, the command or operation may be performed through the physical button. The physical button input data can be used as a supplement to the voice input data and the touch screen input data, especially in noisy environments or for specific functions such as emergency stop.

[0051] A service robot may support detecting and recognizing user gestures through a camera, thereby performing touchless interaction and obtaining gesture recognition input data.

[0052] By analyzing the user's voice, facial expressions and behavior, the service robot may also be able to recognize the user's emotions and respond accordingly to the user's emotions to obtain emotion recognition input data.

[0053] Furthermore, the language processing model can convert the user's natural language input into a form that can be understood by the machine by converting the user's input data, so that the service robot can analyze and understand the user's input data.

[0054] Optionally, analyzing the first dialogue information input by the user to determine the target dialogue demand pattern corresponding to the first dialogue information includes: inputting the first dialogue information input by the user, the user's historical dialogue content and the environmental status information into an intention recognition model to obtain the user's dialogue intention; wherein the environmental status information includes device status information, and / or environmental information, and / or user information; and determining the target dialogue demand pattern according to the user's dialogue intention.

[0055] Combination Figure 3As shown, the embodiment of the present application provides another dialogue method for a service robot, comprising:

[0056] S301, the server inputs the first conversation information input by the user, the user's historical conversation content and the environmental status information into the intention recognition model to obtain the user's conversation intention; wherein the environmental status information includes device status information, and / or environmental information, and / or user information.

[0057] S302: The server determines a target conversation demand mode according to the user's conversation intention.

[0058] S303, the server selects a target functional model corresponding to the target user's dialogue demand pattern from a model library; wherein the model library includes a plurality of functional models.

[0059] S304: The server calls the target function model to generate second dialogue information for interacting with the user.

[0060] In this way, the user's historical conversation content provides context for the system, helping the system understand the background of the current conversation and the user's intention. The state information provides additional context for the system, helping the system to more accurately understand the user's intention and needs. By determining the target conversation demand pattern, it helps to provide users with more accurate and useful responses.

[0061] More specifically, device status information includes the device's battery level and network connection status. Environmental information includes the user's location and time. User information includes the user's preferences and historical behaviors.

[0062] More specifically, the general language model is trained with a large amount of text data, can recognize and understand various language patterns and intents, and has high versatility and flexibility. The intent recognition model is trained for specific fields or tasks, so it is more accurate in identifying specific intents. For example, specific intent recognition models can be trained for different modes such as music generation, small talk, and recipe Q&A.

[0063] Optionally, the target dialogue requirement mode includes a music generation mode, and / or a small talk mode, and / or a recipe question and answer mode, and / or a teaching mode, and / or an adult mode.

[0064] Specifically, the music generation mode recommends or generates music for users. The chat mode is for communicating with users. The recipe question and answer mode provides users with corresponding cooking suggestions or answers. The teaching mode provides users with corresponding educational content. The adult mode provides users with more serious or professional discussion scenarios.

[0065] Optionally, determining the target conversation requirement mode according to the user's conversation intention includes: determining the target conversation requirement mode according to the user's intention by using a preset rule. In this way, the target conversation requirement mode can be determined quickly.

[0066] More specifically, the preset rules are set according to business logic and experience. When the user's intention meets a preset rule, a specific operation or task is performed according to the rule. For example, if the user's intention is to create poetry, the target dialogue demand mode is determined to be the text generation mode. For example, if the user's intention is to have daily chat, the target dialogue demand mode is determined to be the chat mode.

[0067] Optionally, determining the target conversation requirement mode according to the user's conversation intention includes: determining the target conversation requirement mode according to the user's intention by using preset keywords. In this way, the target conversation requirement mode can be determined quickly.

[0068] More specifically, the preset keywords are set according to business logic and experience. When the user's intention includes the preset keywords, the corresponding target dialogue demand mode is determined. For example, when the user's intention includes playing or singing a song, the corresponding target dialogue demand mode is the music generation mode. For example, when the user's intention includes asking for health information, the target dialogue demand mode is determined to be the medical consultation mode.

[0069] Optionally, determining the target dialogue requirement pattern according to the user's dialogue intention includes: inputting the user's intention into a pre-trained pattern recognition model for pattern recognition to determine the target dialogue requirement pattern.

[0070] In this way, the user's intention can be understood more accurately, which helps to more accurately determine the target dialogue demand pattern. More specifically, the pre-trained pattern recognition model includes a classification model or a reinforcement learning model. The classification model is a prediction model built based on machine learning theory, which is used to classify and determine the user's intention. The reinforcement learning model is to interact with the environment, use reinforcement learning methods to learn and adjust strategies to learn the best strategy to complete the determination of the target dialogue demand pattern. For example, DQN (Deep Q Learning Network) is used for reinforcement learning.

[0071] Optionally, determining the target conversation requirement pattern according to the user's conversation intention includes: determining the target conversation requirement pattern according to the user's intention through preset rules based on a preset strategy, determining the target conversation requirement pattern according to the user's intention through preset keywords, and inputting the user's intention into a pre-trained pattern recognition model for pattern recognition to determine the target conversation requirement pattern.

[0072] In this way, the target dialogue demand model is determined based on the preset strategy, and the corresponding target function model is called without loading all models, which can improve the utilization of system resources. In addition, by using multiple strategies to determine the target dialogue demand model according to the user's intention, more accurate responses can be made in different scenarios, improving the user experience.

[0073] Optionally, the preset strategy includes a static strategy. In this way, resource utilization can be reduced.

[0074] More specifically, the static strategy is to pre-define the priority order during the system design phase. For example, if the target dialogue requirement mode cannot be determined by the preset rules, the target dialogue requirement mode is determined by the preset keywords. If the target dialogue requirement mode cannot be determined by the preset keywords, the user's intention is input into the pre-trained pattern recognition model for pattern recognition to determine the target dialogue requirement mode.

[0075] Optionally, the preset strategy includes a dynamic strategy. In this way, the target dialogue demand mode can be determined more flexibly, the flexibility of the system is improved, and thus the user experience is improved.

[0076] More specifically, the dynamic strategy is to dynamically determine the target dialogue demand mode according to a preset evaluation index. For example, the evaluation index can be an index for estimating performance, or an index for estimating accuracy, or an index for estimating resource utilization, or an evaluation index for suitability for a specific task type.

[0077] Furthermore, for example, when the evaluation indicator is an indicator for estimating real-time performance, when the pattern recognition model is processing a large number of high-priority tasks, a higher delay may be expected. At this time, the target dialogue demand pattern can be determined by preset keywords.

[0078] Optionally, the preset strategy includes a static strategy and a dynamic strategy. In this way, the target algorithm model can be selected more flexibly, the flexibility of the system is improved, and thus the user experience is improved.

[0079] Furthermore, for example, the system determines the target dialogue demand mode according to the static priority order, and adds dynamic adjustment under preset conditions. The preset conditions include the situation where the system load is too high and the situation where there is too much backlog of specific types of tasks. Optionally, the multiple functional models include a medical consultation model and an adult model.

[0080] Optionally, the multiple functional models include a music generation model and a small talk model.

[0081] Optionally, the multiple functional models include a recipe question and answer model and a teaching model.

[0082] Optionally, the multiple functional models include a music generation model, a teaching model and an adult model.

[0083] Optionally, the multiple functional models include a music generation model, a small talk model, a recipe question and answer model, a teaching model, and an adult model. In this way, the multiple models can meet the multiple needs of users and enhance the user experience.

[0084] More specifically, the teaching model can provide education-related information and guidance. For example, if the user's intention is to learn new vocabulary or concepts, the teaching model can provide corresponding explanations and examples. The music generation model generates or plays corresponding music according to the user's needs. For example, a specific type of music can be played according to the user's request or a specific melody can be created according to the user's requirements. The chat model is to have a dialogue with the user, understand and answer the user's questions, and chat with the user.

[0085] Furthermore, in actual use, the functional model is encapsulated as an application program interface to facilitate calls by other components of the system. And when the system needs to improve or replace a functional model, the new model and the replaced model can have the same application program interface without modifying the code of other components of the system, which increases the scalability of the system and improves the flexibility of the system. The functional models in the model library in this application can be added or deleted according to actual applications, and this application does not limit the type and number of functional models.

[0086] Optionally, analyze the first dialogue information input by the user to determine the target dialogue demand pattern corresponding to the first dialogue information, including: inputting the first dialogue information input by the user into a graph neural network model to obtain the target dialogue demand pattern; wherein the nodes of the graph neural network model indicate users, system responses, and time, and the edges connecting the nodes indicate user behavior factors between the connected nodes, and the attention mechanism is used to strengthen the focus of the graph neural network model on target nodes and target edges.

[0087] Combination Figure 4 As shown, the embodiment of the present application provides another dialogue method for a service robot, comprising:

[0088] S401, the server inputs the first conversation information input by the user into the graph neural network model to obtain the target conversation demand pattern; wherein, the nodes of the graph neural network model indicate the user, system response, and time, the edges connecting the nodes indicate the user behavior factors between the connected nodes, and the attention mechanism is used to strengthen the focus of the graph neural network model on the target nodes and target edges.

[0089] S402, the server selects a target functional model corresponding to the target user's dialogue demand pattern from a model library; wherein the model library includes a plurality of functional models.

[0090] S403: The server calls the target function model to generate second dialogue information for interacting with the user.

[0091] In this way, using a graph neural network to determine the target dialogue demand pattern can improve the accuracy and efficiency of model selection, thereby selecting between models more accurately and quickly. In this embodiment, an interaction graph can be first constructed, and users, system responses, and time can be set as nodes; behaviors (such as motors, voice commands, queries, etc.) can be set as edges; each node and edge has features. Then, the graph neural network is trained using the user's historical dialogue content and environmental state information, so that the graph neural network can learn the user's historical dialogue content and environmental state information, so that the user's needs can be predicted based on the first dialogue information input by the user, and the user's intention can be obtained.

[0092] In practical applications, we first need to design a graph neural network model that can process graph structure data and recognize complex patterns by learning the features of nodes and edges. Variants such as graph convolutional networks or graph attention networks can be used. Secondly, the graph neural network model is trained using historical interaction data. During the training process, the model will learn how to predict user needs based on the user's interaction patterns and contextual information. In the inference phase, the model will receive real-time user interaction data and predict the user's possible next needs. According to the predicted user needs, the corresponding target dialogue demand pattern can be selected. For example, the graph neural network model contains nodes for "elderly", "night", and "turn on the desk lamp", and the edge of the node represents "turn on the desk lamp when the elderly are recognized at night". In this way, when the system recognizes the elderly at night, the corresponding light model can be input to ask the elderly whether to turn on the desk lamp.

[0093] Furthermore, an attention mechanism can be introduced to strengthen the graph neural network's focus on key information. This can improve the graph neural network's understanding of user intent and thus more accurately obtain user intent.

[0094] Specifically, feature information is extracted from the first dialogue information, the user's historical dialogue content and the environment state information, and an interaction sequence is defined to characterize the extracted feature information. The interaction sequence can be a timestamp-marked user command sequence, a system response sequence, or a user behavior sequence (such as clicks, slides, dwell time, etc.). Then, a neural network model that includes an attention mechanism is designed. The neural network model can be a variant of a recurrent neural network, such as a long short-term memory network, or a Transformer architecture. An attention layer is set in the model, and the attention layer can calculate attention weights to indicate the importance of each interaction event relative to the current context. Using the calculated attention weights, the information in the interaction sequence is weighted and summed to generate a context vector, so that the key information of the interaction sequence can be encoded in the context vector.

[0095] Optionally, calling the target function model includes: determining the calling time according to user needs and the current environment; or, determining the calling time according to user needs, the current environment and context information; wherein the context information is obtained by analyzing the time, date and user conversation history content; and calling the target function model at the calling time.

[0096] Combination Figure 5 As shown, the embodiment of the present application provides another dialogue method for a service robot, comprising:

[0097] S501, the server analyzes first dialogue information input by a user, and determines a target dialogue demand mode corresponding to the first dialogue information.

[0098] S502, the server selects a target functional model corresponding to the target user's dialogue demand pattern from a model library; wherein the model library includes a plurality of functional models.

[0099] S503, the server determines the calling time according to the user demand and the current environment; or determines the calling time according to the user demand, the current environment and context information; wherein the context information is obtained by analyzing the time, date and the user conversation history content.

[0100] S504: The server calls the target function model at the calling opportunity to generate second dialogue information for interacting with the user.

[0101] In the disclosed embodiment, it is possible to better interact with the user and improve the accuracy of the interaction with the user. In this way, the calling timing can be determined in complex environments and situations, thereby improving the accuracy of the interaction with the user.

[0102] More specifically, for example, when the user's demand is to relax, the current environment is a bright indoor environment, and the context information indicates that the user is currently in a happy state, the system can give priority to calling the music generation model to play music.

[0103] Optionally, determining the calling time according to user needs, current environment and context information includes: extracting features of user needs, current environment and context information; the extracted features include one or more of noise features, light intensity features, user activity features, time features, user habit features and user preference features; determining the calling time according to the extracted features.

[0104] In the disclosed embodiments, it is possible to determine the calling timing in complex environments and situations, thereby improving the accuracy of interaction with the user.

[0105] More specifically, for example, for natural language input, NLP (Natural Language Processing) technology can be used to perform operations such as word segmentation and part-of-speech tagging to obtain semantic descriptions, thereby determining the timing of the call. For example, for device status signals or environmental sensor data, mathematical statistical methods can be used to extract features such as change trends and anomalies. Furthermore, for example, when the first dialogue information input by the user is to teach me math knowledge between 6 and 9 pm, the home service robot can extract the time features between 6 and 9 pm, so between 6 and 9 pm, the teaching model will be called to interact with the user.

[0106] Optionally, determining the calling timing based on the extracted features includes: obtaining multiple calling timings of the target function model; wherein the multiple calling timings correspond one-to-one to multiple historical features; and when the extracted features match the historical features, determining the calling timing corresponding to the historical features as the calling timing of the target function model.

[0107] In the disclosed embodiment, the target function model has multiple calling opportunities corresponding one to one with the historical features. The multiple calling opportunities and the multiple historical features are stored in the database of the target function model. The extracted features are matched with the historical features. When the extracted features are matched with the historical features successfully, it means that the calling opportunity corresponding to the historical features can be applied to the current situation, and the calling opportunity corresponding to the historical features can be determined as the calling opportunity of the target function model.

[0108] Optionally, calling the target function model to generate second dialogue information for interacting with the user includes: obtaining the user's second query information; inputting the second query information into the large language model to obtain query completion information corresponding to the second query information; wherein the input data of the large language model also includes the user's historical context dialogue content and environmental status information; and generating second response information corresponding to the query completion information through the target function model, so that the second query information and the second response information constitute the second dialogue information.

[0109] In the disclosed embodiment, the large language model can understand the user's intention based on the user's second query information, thereby forming query completion information. The query completion information is input into the target function model, and the second response information corresponding to the query completion information can be generated. In this way, the second dialogue information composed of the second query information and the second response information can realize the function of dialogue with the user.

[0110] By analyzing the second query information through the large language model, query completion information representing the user's needs can be obtained. For example, if the obtained second query information includes keywords such as "music" and "piano", the large language model can output "piano music" as query completion information.

[0111] Optionally, selecting the target functional model corresponding to the target user dialogue demand pattern from the model library includes: determining the functional model corresponding to the target pattern in the model library as the target functional model according to the mapping relationship. In this way, the target functional model can be called to respond to the user's needs, which can improve the accuracy of interaction with the user.

[0112] More specifically, for example, the music generation mode and the music generation model are a set of mapping relationships. When the target mode is the music generation mode, the music generation model is selected from the model library, and the music generation model is determined as the target function model for subsequent calls to respond to user requests.

[0113] In practical applications, in some embodiments, some mapping relationships are shown in Table 1.

[0114] Table 1

[0115] intention model Functional Model What to do if you have a cold Asking for health information mode Medical consultation model Teach me math Teaching Mode Teaching Model I am very happy Interactive Mode Chatting and entertainment model Playing piano music Music Generation Mode Music Generation Model

[0116] Optionally, calling the target function model at the calling time includes: activating the target function model at the calling time; and performing asynchronous operation and / or batch processing when the target function model is activated. This can process multiple tasks at the same time, which helps to improve the efficiency of model operation.

[0117] Optionally, activating the target function model includes: loading the target function model; and running the target function model, so that the target function model can be used to generate a response to the first dialogue information input by the user.

[0118] More specifically, loading the target model may be reading the structure and parameters of the target model from the hard disk into the memory for fast access and execution.

[0119] Optionally, loading the target function model includes preloading the target function model. In this way, by preloading the target function model, the target function model can be loaded into the server for subsequent activation and operation.

[0120] More specifically, when the server starts, the target function model is preloaded, so that when a user request arrives, the server can directly provide services without additional loading or initialization operations. Preloading the target function model can reduce the server's response time and improve performance. Especially when processing a large number of concurrent requests, preloading the target function module can reduce the delay during activation and significantly improve the server's response speed.

[0121] Optionally, loading the target function model includes dynamically loading the target function model. In this way, by dynamically loading the target function model, the target function model can be loaded into the server for subsequent activation and operation.

[0122] More specifically, when the server is running, the target functional module is loaded in real time as needed. Therefore, the server loads the required module when it needs to load, which can respond to different needs more flexibly. Dynamic loading can improve the utilization of server resources and reduce memory and disk usage.

[0123] Optionally, when the resources required to load the target function model are less than the resources of the intelligent dialogue device, the target function model is preloaded; or, when the resources required to load the target function model are greater than or equal to the resources of the intelligent dialogue device, the target function model is dynamically loaded.

[0124] In this way, by judging the resources required for loading the target function model, choosing to preload the target function model or dynamically load the target function model can improve the utilization of server resources and the flexibility of the system.

[0125] More specifically, the resources required to load the target functional model include the size of the target functional model. The size of the target functional model can be obtained by reading the target functional model file. The trained functional model can be saved using a file in a preset format. For example, TensorFlow, an artificial intelligence learning system developed by Google, uses a .pb file format, and the open source Python machine learning library PyTorch uses a .pt or .pth file format. Therefore, the size of the target functional model can be obtained by directly reading the size of the file corresponding to the target functional model.

[0126] More specifically, the intelligent dialogue device resources include system resources, and the size of system resources can be obtained using the interface or command provided by the operating system. For example, in the Linux system, the free, too, and vmstat commands can be used to view the current system resource usage. System resources may include memory resources. When the program is running, the functions or libraries provided by the programming language can be called to dynamically obtain system resources, such as calling the psutil library in Python.

[0127] Optionally, activating the target function model also includes: setting hyperparameters, the hyperparameters including static parameters and / or dynamic parameters; wherein the static parameters include model configuration parameters, and the dynamic parameters include parameters generated according to the dialogue information input by the user.

[0128] Optionally, hyperparameters can be set before loading the target model. This allows the hyperparameters to be pre-configured on the server. Hyperparameters can control the complexity of the model, affect the training process, adjust the model structure, and affect the generalization ability of the model. Reasonable hyperparameter settings based on demand can better adapt to various situations in actual applications and help improve the overall performance of the system.

[0129] More specifically, before training the machine learning model, hyperparameters are set, such as model structure settings, model training settings, regularization settings, training environment configuration, data preprocessing, etc., where the model structure settings include the number of hidden layers in the neural network and the number of neurons in each layer, the model training settings include the learning rate, optimizer selection, batch size, the regularization optimization settings include the weight decay coefficient, and the training environment configuration includes the number of GPUs (Graphics Processing Unit) and distributed training.

[0130] Furthermore, static parameters are set before the target function model is loaded or activated. Dynamic parameters are set before the target function model is run, and the dynamic parameters are dynamically generated according to the dialogue information or context information input by the user, and the dynamic parameters include input data of a specific task.

[0131] Optionally, hyperparameters can be set before running the target model. In this way, hyperparameters can be pre-configured on the server, which helps improve the overall performance of the system.

[0132] Optionally, the target function model includes a primary function model and an alternative function model, and activating the target function model includes: activating the primary function model; and activating the alternative function model in the case where activation of the primary function model fails. In this way, when activation of the primary function model fails, the server activates the alternative function model, which can ensure service continuity and improve system stability and availability.

[0133] More specifically, according to the user's input, one function model is selected as the primary function model, and one or more function models are selected as alternative function models, and the alternative function models can be stored in a list.

[0134] Optionally, situations in which activation of the main selected function model fails include the completion time of running the main selected function model being greater than a first preset value, and / or the error rate of the model output result being greater than a second preset value, and / or a hardware error occurring, and / or a memory overflow or code execution error occurring, and / or a network abnormality.

[0135] More specifically, in actual applications, the first preset value may be 1 hour, 2 hours, or 3 hours, and the second preset value may be 50%, 55%, or 60%. In addition, in actual applications, the monitoring service may monitor the running status of the program, such as regularly checking, receiving signals sent by the model, or capturing anomalies that occur during operation.

[0136] It should be noted that the present application does not limit the specific values ​​of the first preset value and the second preset value. Those skilled in the art can flexibly set the specific values ​​of the first preset value and the second preset value according to different scenarios or requirements in actual applications or according to experience. Optionally, when both the primary function model and the alternative function model fail to be activated, a preset message is output to respond to the dialogue message input by the user. In this way, the impact on the user can be reduced and the user experience can be improved.

[0137] More specifically, for example, in the event that activation of an alternative functional model fails, a general response is output and displayed on the chat interface.

[0138] Optionally, activating the target function model also includes logging for recording log information of the target function model activation process, the log information including one or more of parameter settings, model output, and error information, which is helpful for subsequent problem analysis and troubleshooting.

[0139] More specifically, logging can save log information to a preset path on the local disk and / or a path customized by the application. Logging can also save log information to a database, such as MySQL or MongoDB or InfluxDB. Logging can use open source tools such as Elasticsearch, Logstash and Kibana combination tools, and can also use the log service provided by the cloud platform. Some information can also be sent to a preset mailbox or notification service so that developers can view and process it in time. This application does not limit the specific method of logging.

[0140] Optionally, the method further includes capturing and processing error information during the operation of the functional model. The error information includes data errors and calculation errors. This can improve the completeness of the system.

[0141] More specifically, when error information is captured, it is logged or reported to the monitoring system or monitoring service, and processed according to the error type and severity, including stopping the service, returning the default result, and retrying the operation. In addition, for expected problems, exception capture is used to capture the code segments that may cause exceptions, and the processing method is set according to the needs.

[0142] Furthermore, the model can perform self-repair. For example, in an online operation, the system can continuously track the environment and provide feedback based on reinforcement learning according to environmental changes, such as changes in user interests, and update optimization parameters in real time to optimize system performance. For example, the working status of functions and components can be regularly evaluated, and when the performance of the functional model is lower than the preset performance value, the repair process is triggered for repair.

[0143] Optionally, batch processing is performed, including: when the target function model corresponds to multiple dialogue information, all dialogue information is input into the target function model for batch processing.

[0144] More specifically, multiple conversation messages of the same category can be grouped into a data set, which can then be input into the target function model for simultaneous processing. In actual applications, the data set can be adjusted and optimized based on specific business needs and hardware resources, which can improve the accuracy and efficiency of the system.

[0145] Optionally, performing asynchronous processing includes: performing asynchronous operation when multiple users input dialog information.

[0146] More specifically, if hardware resources permit, a multi-core CPU (Central Processing Unit) or multiple GPUs can be used, and each core or each GPU loads an identical model and processes the corresponding part of the task. If hardware resources are limited, process scheduling can be used to start multiple threads or processes, each of which loads a model and processes a task. For example, when a dialogue message input by a user is received, and the dialogue message requests to play a piece of music, the system will put the request into the queue to be processed and immediately start a new thread or process to process the task. In this way, the main thread can start receiving and scheduling new user requests without waiting for a task to be completed, thereby improving the system's response speed and task processing capabilities.

[0147] Optionally, the dialogue method for the service robot also includes integrating professional knowledge, which enables the system to provide more professional services and improve the accuracy of interaction with users.

[0148] More specifically, in practical applications, it is necessary to collect and organize professional knowledge from various industries, which can be collected in the form of text, images, audio or video. For example, collect disease symptoms, treatment methods and drug information from the medical field, and collect basic subject knowledge, teaching methods and learning strategies from the education field. Then process the collected professional knowledge and model it. The modeled professional knowledge is integrated into the system in the form of an application interface or module. Each piece of professional knowledge is a small model. For example, when a user asks the system medical questions, the system can call the medical knowledge graph to answer them. When a user is performing a family education task, the system can call an optimized teaching method to help the user.

[0149] Optionally, the dialogue method for the service robot further includes adjusting parameters of the function model according to the collected user feedback information, so that the system can interact with the user more flexibly and improve the accuracy of the interaction with the user.

[0150] Combination Figure 6 As shown, an embodiment of the present application provides a dialogue device 60 for a service robot, including a processor (processor) 600 and a memory (memory) 601. Optionally, the electronic device 60 may also include a communication interface (Communication Interface) 602 and a bus 603. Among them, the processor 600, the communication interface 602, and the memory 601 can communicate with each other through the bus 603. The communication interface 602 can be used for information transmission. The processor 600 can call the logic instructions in the memory 601 to execute the dialogue method for the service robot of the above embodiment.

[0151] In practical applications, the dialogue device 60 for the service robot may include a terminal device, or may include a server.

[0152] In addition, the logic instructions in the memory 601 described above can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0153] The memory 601 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present application. The processor 600 executes the function application and data processing by running the program instructions / modules stored in the memory 601, that is, the method for the conversation of the household service robot in the above embodiment is realized.

[0154] The memory 601 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 601 may include a high-speed random access memory and may also include a non-volatile memory.

[0155] The disclosed embodiment provides a service robot dialogue system, including a model library, including multiple functional models; the above-mentioned dialogue device for the service robot is connected to the model library to call the functional model from the model library. The connection relationship described here is not limited to the internal placement of the model library, but also includes the installation connection with other components of the model library, including but not limited to physical connection, electrical connection or signal transmission connection, etc. It can be understood by those skilled in the art that the dialogue device for the service robot can be adapted to a feasible model library body, thereby realizing other feasible embodiments.

[0156] The technical solution of the embodiment of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present application. The aforementioned storage medium can be a non-transient storage medium, such as: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.

[0157] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A conversation method for a service robot, characterized in that: include: Analyze the first dialogue information input by the user, and determine the target dialogue demand mode corresponding to the first dialogue information; Selecting a target functional model corresponding to the target user dialogue demand pattern from a model library; wherein the model library includes a plurality of functional models; The target function model is called to generate second dialogue information for interacting with the user.

2. The dialogue method according to claim 1, characterized in that: The first dialogue information input by the user is obtained as follows: Obtaining user input data; wherein the input data includes multiple types of voice input data, touch screen input data, physical button input data, gesture recognition input data and emotion recognition input data; The user's input data is converted through the language processing model to obtain the first dialogue information input by the user.

3. The dialogue method according to claim 1, characterized in that: Analyzing the first dialogue information input by the user to determine the target dialogue demand mode corresponding to the first dialogue information includes: Inputting the first conversation information input by the user, the user's historical conversation content and the environment state information into the intention recognition model to obtain the user's conversation intention; wherein the environment state information includes device state information, and / or environment information, and / or user information; Determine the target conversation demand model based on the user's conversation intention.

4. The dialogue method according to claim 1, characterized in that: Analyzing the first dialogue information input by the user to determine the target dialogue demand mode corresponding to the first dialogue information includes: The first dialogue information input by the user is input into the graph neural network model to obtain the target dialogue demand pattern; wherein, the nodes of the graph neural network model indicate the user, system response, and time, the edges connecting the nodes indicate the user behavior factors between the connected nodes, and the attention mechanism is used to strengthen the focus of the graph neural network model on the target nodes and target edges.

5. The dialogue method according to claim 1, characterized in that: Call the target functional model, including: Determine the timing of the call based on user needs and the current environment; or determine the timing of the call based on user needs, the current environment and context information; wherein the context information is obtained by analyzing the time, date and user conversation history content; The target functional model is called at the calling time.

6. The dialogue method according to claim 5, characterized in that: Determine when to call based on user needs, current environment, and contextual information, including: Extract features of user needs, current environment and context information; the extracted features include one or more of noise features, light intensity features, user activity features, time features, user habit features and user preference features; Determine the calling timing based on the extracted features.

7. The dialogue method according to claim 6, characterized in that: Determine the calling time based on the extracted features, including: Acquire multiple call opportunities of the target function model; wherein the multiple call opportunities correspond one to one with the multiple historical features; In the case where the extracted features match the historical features, the calling timing corresponding to the historical features is determined as the calling timing of the target function model.

8. The dialogue method according to any one of claims 1 to 7, characterized in that: The target function model is called to generate second dialogue information for interacting with the user, including: Obtaining the user's second inquiry information; Inputting the second query information into the large language model to obtain query completion information corresponding to the second query information; wherein the input data of the large language model also includes the user's historical context conversation content and environment status information; The second response information corresponding to the inquiry completion information is generated through the target function model, so that the second inquiry information and the second response information constitute the second dialogue information.

9. A conversation device for a service robot, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the conversation method for a service robot according to any one of claims 1 to 8 through the computer program.

10. A service robot dialogue system, characterized in that: include: Model library, including multiple functional models; The dialogue device for a service robot as claimed in claim 9 is connected to a model library to call the function model from the model library.

Citation Information

Cited By

  • Intelligent scheduling system and method for home decoration scene, electronic equipment and storage medium

    CN119902496A

  • Classical music cross-modal high-reliability experimental data set construction method for full-scene teaching application

    CN120561840A

  • Intelligent analysis method and device based on large language model, medium and program product

    CN121502375A

  • Intelligent analysis method, device, medium and program product based on large language model

    CN121502375B

  • Household user dialogue method and system based on life cycle design

    CN121706968A