Request processing method and apparatus, device, storage medium, and program product
By filtering and selecting target plugins and using machine learning models to process user requests, the problem of high computational costs in existing technologies is solved, thereby improving the efficiency and accuracy of request processing for digital assistants.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2026-03-26
AI Technical Summary
Existing technologies have high computational costs, low efficiency and accuracy when identifying target plugins from multiple plugins, which affects the request processing efficiency of digital assistants.
By screening multiple candidate plugins, the first machine learning model is used to determine the target plugin based on the plugin's description information and user requests, and the target plugin is invoked to process the user requests, thereby reducing computational overhead and improving the efficiency and accuracy of plugin selection.
By filtering and selecting target plugins, computational overhead is reduced, the efficiency and accuracy of the digital assistant in processing user requests are improved, and the ability to flexibly enable and disable plugins is enhanced.
Smart Images

Figure CN2025116503_26032026_PF_FP_ABST
Abstract
Description
Method, device, equipment, storage medium and program product for request processing
[0001] The present application claims priority to the Chinese patent application No. 202411320799.2, filed on September 20, 2024, entitled “Method, device, equipment, storage medium and program product for request processing”, the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The example embodiments of the present disclosure generally relate to the field of computer, and in particular, to a method, device, electronic equipment, computer readable storage medium and computer program product for request processing. BACKGROUND
[0003] With the development of information technology, various client devices can provide people with various services in work and life, etc. For example, an application providing services can be deployed in the client device. The client device or the application can provide a digital assistant type function to the user to assist the user in using the client device or the application. How to improve the functional diversity of the digital assistant is a technical problem to be explored at present. SUMMARY
[0004] In a first aspect of the present disclosure, a method for request processing is provided. The method comprises: in response to obtaining a user request of a target user for a digital assistant, determining a first group of plugins from a plurality of candidate plugins for the digital assistant based on state information of the plurality of candidate plugins, the first group of plugins being in an enabled state for the user request; determining at least one target plugin from the first group of plugins based on at least the description information of each plugin in the first group of plugins and the user request by using a first machine learning model, the description information of each plugin indicating the function of the corresponding plugin; and determining a reply of the digital assistant to the user request by at least partially processing the user request by invoking the at least one target plugin.
[0005] In a second aspect of the present disclosure, a device for request processing is provided. The device comprises: a first plugin determination module configured to determine a first group of plugins from a plurality of candidate plugins for a digital assistant based on state information of the plurality of candidate plugins in response to obtaining a user request of a target user for the digital assistant, the first group of plugins being in an enabled state for the user request; a target plugin determination module configured to determine at least one target plugin from the first group of plugins based on at least the description information of each plugin in the first group of plugins and the user request by using a first machine learning model, the description information of each plugin indicating the function of the corresponding plugin; and a reply determination module configured to determine a reply of the digital assistant to the user request by at least partially processing the user request by invoking the at least one target plugin.
[0006] In a third aspect of the disclosure, an electronic device is provided. The device includes at least one processor; and at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor. The instructions, when executed by the at least one processor, cause the electronic device to perform the method of the first aspect.
[0007] In a fourth aspect of the disclosure, a computer-readable storage medium is provided. The computer-readable storage medium has stored thereon computer-executable instructions that, when executed by a processor, implement the method of the first aspect.
[0008] In a fifth aspect of the disclosure, a computer program product is provided. The computer program product includes computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to the first aspect of the disclosure.
[0009] It should be understood that the contents described in this section are not intended to limit the key features or important features of the embodiments of the disclosure, nor are they used to limit the scope of the disclosure. Other features of the disclosure will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS
[0010] The above and other features, advantages, and aspects of embodiments of the disclosure will become more apparent by describing in detail some embodiments thereof with reference to the annexed drawings in which:
[0011] FIG. 1 shows a schematic diagram of an example environment in which embodiments of the disclosure can be implemented;
[0012] FIG. 2 shows a flow diagram of a signaling flow for request processing according to some embodiments of the disclosure;
[0013] FIG. 3 shows an example of a correspondence between a terminal device, a user, and an application;
[0014] FIG. 4 shows a flow diagram of a signaling flow for creating and updating a plug-in according to some embodiments of the disclosure;
[0015] FIG. 5 shows a flow diagram of a method for request processing according to some embodiments of the disclosure;
[0016] FIG. 6 shows an example structural block diagram of an apparatus for request processing according to some embodiments of the disclosure; and
[0017] FIG. 7 shows a block diagram of an electronic device that can implement one or more embodiments of the disclosure. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be implemented in various forms and should not be interpreted as being limited to the embodiments set forth herein, but rather, these embodiments are provided so as to more completely and thoroughly understand the present disclosure. It is understood that the drawings and embodiments of the present disclosure are only for illustrative purposes and do not limit the scope of protection of the present disclosure.
[0019] In the description of embodiments of the present disclosure, the term "comprising" and its conjugations should be understood as open-ended, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "an embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit or implicit definitions can also be included below.
[0020] In this document, unless explicitly stated, performing a step "in response to A" does not mean that the step is performed immediately after A, but can include one or more intermediate steps.
[0021] It can be understood that the data involved in the technical solutions of the present disclosure (including but not limited to the data itself, the obtaining, use, storage or deletion of the data) should comply with the requirements of relevant laws and regulations and relevant provisions.
[0022] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the scope of use, the use scenario, etc. should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.
[0023] For example, in response to receiving the active request of the user, a prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the personal information of the user, so that the user can voluntarily choose whether to provide the personal information to the software or hardware such as electronic device, application program, server or storage medium, etc. performing the operation of the technical solutions of the present disclosure according to the prompt information.
[0024] As an optional but non-limiting implementation manner, in response to receiving the active request of the user, the manner of sending the prompt information to the user may, for example, be a pop-up window manner, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry selection controls for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0025] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation manner of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation manner of the present disclosure.
[0026] As used herein, the term “model” can learn the relationship between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes input and provides a corresponding output by using multiple layers of processing units. Neural network model is one example of a model based on deep learning. In this document, “model” can also be referred to as “machine learning model”, “learning model”, “machine learning network” or “learning network”, which are used interchangeably herein.
[0027] “Neural network” is a machine learning network based on deep learning. Neural network is capable of processing input and providing a corresponding output, which generally includes an input layer and an output layer and one or more hidden layers between the input layer and the output layer. Neural networks used in deep learning applications generally include many hidden layers, thereby increasing the depth of the network. The layers of the neural network are connected in sequence, so that the output of the previous layer is provided as the input of the next layer, where the input layer receives the input of the neural network, and the output of the output layer is the final output of the neural network. Each layer of the neural network includes one or more nodes (also known as processing nodes or neurons), each of which processes the input from the previous layer.
[0028] Generally, machine learning can include three stages, namely training stage, testing stage and application stage (also known as inference stage). In the training stage, a given model can be trained using a large amount of training data, constantly iterating and updating the parameter values until the model can obtain consistent inference from the training data that meets the expected target. Through training, the model can be considered to be able to learn the relationship between input and output (also known as input to output mapping) from the training data. The parameter values of the trained model are determined. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, so as to determine the performance of the model. The testing stage can sometimes be integrated into the training stage. In the application or inference stage, the trained model can be used to process the actual model input based on the parameter values obtained by training to determine the corresponding model output.
[0029] FIG. 1 shows a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. The example environment 100 can involve at least one terminal device 110 (e.g., terminal device 110-1 and terminal device 110-2), each of which has an application installed therein (e.g., application 112-1 installed in terminal device 110-1, and application 112-2 installed in terminal device 110-2). For ease of description, one or more terminal devices can be collectively referred to as terminal devices 110, and one or more applications can be collectively referred to as applications 112. It can be appreciated that although FIG. 1 shows only two terminal devices 110, in practice, any number of terminal devices can be involved.
[0030] In some embodiments, the applications 112 can be downloaded and installed in the terminal devices 110. In some embodiments, the applications 112 can also be accessed by other means, such as by webpages, etc. The users 150 can interact with the applications 112 via the terminal devices 110 and / or attached devices of the terminal devices 110. For example, user 150-1 can interact with application 112-1 via terminal device 110-1, and user 150-2 can interact with application 112-2 via terminal device 110-2. Similarly, for ease of description, one or more users can be collectively referred to as users 150.
[0031] In embodiments of the present disclosure, the applications 112 can be any suitable application with task processing functions, which can include but are not limited to one or more of the following: a chat application component (also referred to as an instant messaging application component), a browser application component, a planning type application component, a document application component, an audio / video conferencing application component, a mail application component, a task application component, a calendar application component, an objective and key result (OKR) application component, etc. It can be appreciated that although FIG. 1 shows only a single application 112 in each terminal device 110, in practice, multiple applications 112 can be installed on each terminal device 110.
[0032] In some embodiments, the applications 112 can include a multi-functional collaboration platform, such as an office collaboration platform (also referred to as an office suite), which can provide integration of multiple types of business components to facilitate people to perform office activities, communication activities, etc. In the multi-functional collaboration platform, people can start different business components as needed to complete corresponding information processing, sharing, communication, etc.
[0033] In the environment 100, in response to the application 112 being launched, the terminal device 110 can present an interface 160 of the application 112. The interface 160 may, for example, include an interaction interface of the user 150 with the application 112. In some embodiments, an interaction window of the user 150 with a digital assistant can be presented in the interface 160 (e.g., the application 112 is the digital assistant itself or integrates the function of the digital assistant). In the interaction window, the user 150 can be able to have a conversation with the digital assistant by inputting natural language, pictures, audio files, video files, web page files, etc. to instruct the digital assistant to assist in completing various tasks.
[0034] The digital assistant is a smart assistant of the user and has the capability of intelligent conversation and information processing. The digital assistant can be considered as a separate application 112 or can be integrated in the application 112. In embodiments of the present disclosure, the digital assistant is used for interaction with the user 150 to assist the user 150 in using the terminal device or the application. In some embodiments, multiple interaction modes of the user 150 with the digital assistant can be provided and can be flexibly switched between the multiple interaction modes. In the case that a certain interaction mode is triggered, a corresponding interaction area is presented to facilitate the interaction of the user 150 with the digital assistant. The user 150 interacts with the digital assistant in different ways in different interaction modes, which can flexibly adapt to the interaction requirements in different application scenarios.
[0035] The interaction window of the digital assistant with the user 150 can include a conversation window, such as a conversation window in an instant messaging application or an instant messaging module of a specific application. In the conversation window, the interaction between the digital assistant and the user 150 can be presented in the form of conversation messages. Alternatively or additionally, the interaction window of the digital assistant with the user 150 can also include other types of windows, such as a window in a floating window mode, in which the user 150 can trigger the digital assistant to perform corresponding operations by inputting instructions, selecting shortcut instructions, etc.
[0036] In some embodiments, the digital assistant can support the interaction mode of the conversation window, also referred to as the conversation mode. In the interaction mode, a conversation window of the user 150 with the digital assistant is presented, in which the user 150 and the digital assistant interact through conversation messages. In the conversation mode, the digital assistant can perform tasks according to the conversation messages in the conversation window. In the interaction window, the user 150 inputs an interaction message, and the digital assistant provides a reply message in response to the user input. By selecting the digital assistant, a conversation window with the digital assistant can be opened. The conversation window can include interface elements for information interaction, such as an input box, a message list, a message bubble, etc.
[0037] Digital assistants are provided to assist users 150 in various task processing needs in different applications, scenarios. Digital assistants usually have intelligent conversation and task processing capabilities. In the process of interaction with a digital assistant, a user 150 inputs user inputs (e.g., text, voice, image, video, or other modalities of conversation content), and the digital assistant provides a corresponding reply in response to the user inputs. Usually, the digital assistant can support the user 150 to input questions in a natural language manner, and perform tasks and provide replies based on the understanding of the natural language inputs and logical reasoning capabilities.
[0038] In some embodiments, the digital assistant supports the use of plugins. In the creation phase of the digital assistant, the user who creates the digital assistant can associate one or more plugins with the digital assistant. In the application phase of the digital assistant, a user request for the digital assistant can be processed by invoking a specific plugin among the one or more associated plugins. Such plugins include, but are not limited to, one or more of the following: a search plugin, a contact plugin, a message plugin, a document plugin, a table plugin, a mail plugin, a calendar plugin, a schedule plugin, a task plugin, and the like.
[0039] Each plugin can provide one or more functions of an application. Usually, a plugin can be understood as a collection of functions, and a "tool" in a plugin can be understood as a unit function or an atomic function in the plugin. With multiple tools, a plugin can ultimately be used to process a type of task desired by a user. For example, a plugin for processing documents can include: a document creation tool for creating a new document; a search tool for performing a search in a document; a formula generation tool for generating and inserting a formula in a document; and the like.
[0040] In embodiments of the present disclosure, the plugin service 140 provides a creation, publication, saving, and application environment for the plugins 141 for the user 150. The user who creates and publishes the plugin can be the same user as the user who applies the plugin, or can be a different user. For example, the user 150-1 as a plugin creator can create one or more plugins. The user 150-2 as a plugin applier can apply one or more plugins associated with a digital assistant. The plugin service 140 can be deployed with, for example, a database, and the created plugins 141 are saved through the database. For example, the plugin service 140 can save multiple plugins 141, such as plugin 141-1, plugin 141-2, …, and plugin 141-N. It should be noted that the plugin service 140 can be deployed at the server device 120, or can be deployed at other devices. In embodiments of the present disclosure, for the convenience of description, the plugin service 140 is taken as an example deployed at the server device 120 for example description.
[0041] The terminal device 110 can be deployed with a client application or platform of the plugin creation platform and / or the plugin application platform, which can support the interaction of the user 150 with the plugin creation platform and / or the plugin application platform. In some embodiments, the plugin creation platform and / or the plugin application platform can be deployed at the server device 120, which can provide support for the client program deployed at the terminal device 110.
[0042] In some embodiments, the plugin creation platform can interact with the plugin service 140 to implement the creation of the plugin 141. The plugin creation platform can provide a set of tools required for the creation of the plugin 141. The plugin creation platform can support the visual development of the plugin 141. The plugin creation platform can support any appropriate platform of user development interface. In some embodiments, the plugin application platform can interact with the plugin service 140 to implement the invocation of the plugin 141. After the creation of the plugin 141, the user 150 can input a session message in the session window of the digital assistant, and the digital assistant can request the plugin service 140 to assist in invoking the plugin 141 based on the plugin definition of the plugin 141, and obtain feedback information by using the plugin 141, determine a reply message based on the feedback information, and present the reply message to the user in the session window.
[0043] In some embodiments, a communication connection is established between the terminal device 110 and the server device 120. The communication connection can be established in a wired manner or a wireless manner. The communication connection can include, but is not limited to, a Bluetooth connection, a mobile network connection, a Universal Serial Bus (USB) connection, a Wireless Fidelity (WiFi) connection, and the like, and embodiments of the present disclosure are not limited in this regard. In embodiments of the present disclosure, the terminal device 110 and the server device 120 can implement signaling interaction through the communication connection therebetween to implement the provision of services of the application 112 and / or the digital assistant.
[0044] As shown in FIG. 1, the server device 120 can invoke the machine learning model 130. It can be understood that the machine learning model 130 can include one or more machine learning models, that is, the server device 120 can invoke one or more machine learning models, which can be collectively referred to as the machine learning model 130. It should be noted that if the machine learning model 130 includes multiple machine learning models, the multiple machine learning models can have different purposes and functions, which are not limited by the present disclosure.
[0045] The machine learning model 130 can be deployed at the server device 120, or at other devices. The machine learning model 130 can be based on any suitable model structure, including but not limited to a Transformer model, a convolutional neural network (CNN), a recurrent neural network (RNN), a deep neural network (DNN), and the like. In some embodiments, the machine learning model 130 can be based on a language model (LM). A language model can be capable of question-answering ability by learning from a large corpus. The machine learning model 130 can also be based on other suitable models.
[0046] The terminal device 110 can be any type of mobile terminal, fixed terminal, or portable terminal including a mobile handset, a tablet computer, a laptop computer, a notebook computer, a netbook computer, a smartbook, a tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a game device, or any combination thereof, including accessories and peripherals of these devices, or any combination thereof. In some embodiments, the terminal device 110 can also be capable of supporting any type of interface to a user (such as “wearable” circuitry, etc.).
[0047] The server device 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms, etc. basic cloud computing services. The server device 120 may, for example, include a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, etc.
[0048] It should be understood that the structure and function of the various elements in the environment 100 are described for the purpose of example only, without implying any limitation on the scope of the present disclosure.
[0049] As mentioned previously, with the development of information technology, various client devices can provide various services to people in work and life, etc. For example, an application providing a service can be deployed in a client device. The client device or the application can provide a digital assistant type function to assist a user in using the client device or the application.
[0050] In order to improve the functional diversity of the digital assistant, some developers configure the digital assistant to support the use of plugins, each of which can provide one or more functions. The digital assistant can invoke a corresponding plugin to provide a service to a user according to the user’s needs.
[0051] In the related art, it is usually necessary to determine a target plug-in to be invoked from a plurality of plug-ins by means of a machine learning model. If the number of plug-ins included in the plurality of plug-ins is large, the larger the computational cost required for the machine learning model to determine the target plug-in, the worse the efficiency. This affects the efficiency and accuracy of invoking the plug-in.
[0052] Therefore, according to an embodiment of the present disclosure, an improved scheme for request processing is provided. According to the scheme of the embodiment of the present disclosure, in response to obtaining a user request of a target user for a digital assistant, a first group of plug-ins is determined from a plurality of candidate plug-ins for the digital assistant based on state information of the plurality of candidate plug-ins, the first group of plug-ins being in an enabled state for the user request. At least one target plug-in is determined from the first group of plug-ins based on at least description information of each plug-in in the first group of plug-ins and the user request by means of a first machine learning model, the description information of each plug-in indicating a function of the corresponding plug-in. A reply of the digital assistant to the user request is determined by invoking the at least one target plug-in to at least partially process the user request.
[0053] In this way, at least one round of screening can be performed on the plurality of candidate plug-ins before the target plug-in is determined, and the target plug-in is determined from the group of plug-ins obtained by screening. By determining the target plug-in for processing the user request from a small number of plug-ins obtained by screening, the computational overhead required for selecting the target plug-in in request processing can be reduced, and the efficiency and accuracy of determining the plug-in can be improved. In addition, in some embodiments, flexible enabling and disabling of plug-ins available to the digital assistant can also be provided. Under this premise, when processing the user request for the digital assistant, the plug-ins in the enabled state can be screened, and the plug-ins available for processing the current user request can be further screened therefrom.
[0054] Some example embodiments of the present disclosure will be described below with continuous reference to the accompanying drawings.
[0055] FIG. 2 shows a flowchart of a signaling flow 200 for request processing according to some embodiments of the present disclosure. For ease of discussion, the signaling flow 200 will be described with reference to the environment 100 of FIG. 1.
[0056] The signaling flow 200 involves the terminal device 110 and the server device 120, and the server device 120 includes the dialog service 201, the machine learning model 202, the plug-in service 140, and the machine learning model 203. The machine learning model 202 and the machine learning model 203 can be machine learning models included in the machine learning model 130. The machine learning model 202 and the machine learning model 203 can be configured to perform different tasks. In some embodiments, the machine learning model 202 can be based on a language model (LM). In some embodiments, the machine learning model 202 can be referred to as a first machine learning model, and the machine learning model 203 can be referred to as a second machine learning model.
[0057] In some embodiments, the model size of the machine learning model 203 can be smaller than the model size of the machine learning model 202. The model size of each machine learning model is associated with the parameter scale, model structure complexity, etc. of the machine learning model. Generally, the larger the parameter scale or the more complex the structure of a machine learning model, the larger the model size of the machine learning model. The larger the model size of a machine learning model, the larger the resource overhead required by the machine learning model, including but not limited to computing resources, memory resources, etc.
[0058] It can be understood that although the signaling flow 200 in FIG. 2 only involves two machine learning models, the machine learning model 202 and the machine learning model 203, more machine learning models can actually be involved in each operation of the signaling flow, which is not limited by the present disclosure, and the present disclosure is only described by way of example involving two machine learning models.
[0059] In some embodiments, the terminal device 110 can present an interaction interface (e.g., the interface 160) between the target user (e.g., the user 150) and the digital assistant (e.g., the digital assistant). The interaction interface can include, for example, an input control such as an input box. The terminal device 110 can receive (211) a user input inputted by the target user through the input box via the interaction interface in the interaction between the target user and the digital assistant. If the interaction interface includes a conversation window, the user input can be presented in the interaction interface in the form of a conversation message from the target user.
[0060] The user input can be any appropriate type of input including but not limited to text type, image / video type, voice type, etc., which is not limited by the present disclosure. The terminal device can determine the user request of the target user based on the received user input, for example. In some embodiments, if the user input is a non-text type (e.g., voice type) input, the terminal device 110 can convert the user input into a text type and determine the user request based on the converted user input.
[0061] In some embodiments, the user request can further include identification information. The terminal device 110 can add the identification information in the user input of the target user to obtain the user request of the target user. The user request can be initiated via the target terminal device (e.g., the terminal device 110), and specifically, can be initiated via a target application in the target terminal device. The identification information in the user request can include one or more of a device identification (denoted as device id, which can be a device model, a device name, a device ID, etc.) of the target terminal device corresponding to the user request, a user identification (denoted as user id, which can be a username of the target user, an ID of the target user, etc.) of the target user, an application identification (denoted as app id, which can be an application name, an application ID, an application type, etc.) of the target application corresponding to the user request, etc. It can be understood that the device identification of different terminal devices is different, the user identification of different users is different, and the application identification of different applications is different.
[0062] It should be noted that the relationship between the terminal device, the user, and the application can be one-to-many. For example, each terminal device can correspond to multiple users (i.e., multiple users can use the same terminal device), and each terminal device can install multiple applications associated with the digital assistant. Each user can correspond to multiple terminal devices (i.e., the same user can use multiple terminal devices), and each user can correspond to multiple applications (i.e., the same user can interact with multiple applications, respectively). Each application can correspond to multiple users (i.e., multiple users can interact with the same application), and the same application can be installed on multiple terminal devices. Each user can log in to the application / log in to the terminal device using the account corresponding to the user to interact with the application / use the terminal device.
[0063] Referring to FIG. 3, FIG. 3 shows an example 300 of the correspondence between a terminal device, a user, and an application. The example 300 involves 3 terminal devices 110 (i.e., terminal device 110-1, terminal device 110-2, and terminal device 110-3), 4 users 150 (i.e., user 150-1, user 150-2, user 150-3, and user 150-4), and 6 applications 112 (i.e., application 112-1, application 112-2, application 112-3, application 112-4, application 112-5, and application 112-6), which can each be associated with a digital assistant. As an example, if user 150-1 interacts with the digital assistant via application 112-4 installed on terminal device 110-2, the user request of user 150-1 corresponds to application 112-4 and terminal device 110-2. In this case, the user request determined by terminal device 110-2 can include the device identifier of terminal device 110-2 itself, the application identifier of application 112-4, and the user identifier of user 150-1.
[0064] After receiving the user request, the terminal device 110 can send 212 the user request to the server device 120. As an example, the terminal device 110 can send the user request to the server device 120, e.g., through a communication connection between the terminal device 110 and the server device 120. In some embodiments, the conversation service 201 in the server device 120 can receive the user request. The conversation service 201 can determine whether to obtain a plug-in for the user request. The conversation service 201 can determine whether to obtain a plug-in in any suitable manner, which is not limited in the present disclosure.
[0065] For example, the server device 120 can store a service table. If the user request indicates a service provided by the digital assistant is included in the service table, the conversation service 201 can determine that no plug-in needs to be obtained, and the digital assistant can directly provide the service corresponding to the user request. If the user request indicates a service provided by the digital assistant is other than the services included in the service table, the conversation service 201 can determine that a plug-in needs to be obtained to provide the service by means of the plug-in.
[0066] The conversation service 201 can extract a plug-in obtaining request from the user request or generate a plug-in obtaining request based on the user request in response to determining to obtain a plug-in, which is not limited in the present disclosure. The plug-in obtaining request can indicate obtaining a plug-in for the user request. The plug-in obtaining request can include at least the identification information extracted from the user request, for example.
[0067] The dialog service 201 can send (213) the plugin obtaining request to the plugin service 140. The plugin service 140 can perform (214) plugin screening on the plurality of candidate plugins based on the state information of the plurality of candidate plugins for the digital assistant to determine one or more plugins that are in an enabled state for the user request from the plurality of candidate plugins. The plurality of candidate plugins here can be, for example, all the plugins that have been created and associated to the digital assistant, and the plurality of candidate plugins can be created and published by one or more users, which can or can not include the target user.
[0068] In some embodiments, for each candidate plugin, the state information can indicate an enabled state or a disabled state of the respective candidate plugin. The enabled state or the disabled state can be configured by a plugin maintainer (e.g., a developer of the plugin) of the candidate plugin. The enabled state or the disabled state can be for all users. For example, if the developer of the candidate plugin A configures the candidate plugin A to be in a disabled state, the candidate plugin A is disabled for all devices, all users, and all applications.
[0069] Alternatively or additionally, in some embodiments, for each candidate plugin, the state information can further indicate one or more of an enabled state or a disabled state of the respective candidate plugin for one or more terminal devices, an enabled state or a disabled state for one or more users, and an enabled state or a disabled state for one or more applications associated with the digital assistant. The enabled state and the disabled state of each candidate plugin for the terminal devices, the users, and the applications can be configured by the user, or configured by a plugin maintainer, a device maintainer (e.g., a manufacturer of the device), or an application maintainer (e.g., a developer of the application). For example, for the user A, the user A can disable the candidate plugin A, in which case the candidate plugin A can be in a disabled state for user requests initiated by the user A.
[0070] It can be understood that if the state information of the candidate plugin B indicates that the candidate plugin B is in a disabled state for the terminal device A, the candidate plugin B is in a disabled state for user requests initiated via the terminal device A, regardless of who initiates the user requests or which application initiates the user requests. In this case, the candidate plugin B can be in an enabled state for user requests initiated by other terminal devices than the terminal device A.
[0071] If the state information of the candidate plugin C indicates that the candidate plugin C is in a disabled state for the user A, the candidate plugin C is in a disabled state for user requests initiated by the user A, regardless of which terminal device initiates the user requests or which application initiates the user requests. In this case, the candidate plugin C can be in an enabled state for user requests initiated by other users than the user A.
[0072] If the state information of the candidate plugin D indicates that the candidate plugin D is in the disabled state for the application A, the candidate plugin D is in the disabled state for all user requests initiated via the application A, regardless of who initiates the user request or which terminal device initiates the user request. In this case, the candidate plugin D can be in the enabled state for user requests initiated for other applications than the application A, for example.
[0073] In some embodiments, the plugin service 140 can determine, based on the state information of the plurality of candidate plugins for the digital assistant, at least one candidate plugin in the enabled state from the plurality of candidate plugins. That is, the at least one plugin includes a plugin configured by the corresponding plugin maintainer to be in the enabled state. Further, the plugin service 140 can determine, based on the state information and the identification information of the plurality of candidate plugins, one or more plugins in the enabled state for the target user, and / or, the target application, and / or, the target terminal device from the at least one candidate plugin.
[0074] As an example, the state information of each candidate plugin can include one or more device identifications (device_id), and / or, one or more user identifications (user_id), and / or, one or more application identifications (app_id) for identifying that the candidate plugin is in the disabled state (or in the enabled state in an alternative example) for the identified one or more terminal devices, and / or, one or more users, and / or, one or more applications. For example, if the state information of the candidate plugin E includes the identification information of the terminal device A, it can be determined that the candidate plugin E is in the disabled state for the terminal device A, and thus is in the disabled state for all user requests initiated by the terminal device A. Similar judgment can be made based on the identification information for user requests in the user dimension or the application dimension. In this case, the plugin service 140 can determine whether the identification information of the at least one candidate plugin includes the identification information of the target user by comparing the identification information of the at least one candidate plugin and the identification information carried in the user request.
[0075] A user request for a digital assistant can be associated to a certain application in the application dimension, to a certain user in the user dimension, and to a certain device in the device dimension. Assuming that the state information of a certain candidate plugin includes a device identification, and / or, a user identification, and / or, a device identification in the disabled state, if it is detected that the state information of the candidate plugin includes at least part of the identification information in the user request (for example, includes at least one of the device identification of the target terminal device corresponding to the user request, the user identification of the target user, and the application identification of the target application), the plugin service 140 can determine that the candidate plugin is in the disabled state for the user request.
[0076] Conversely, if the state information of the candidate plugin does not include the identification information carried in the user request, the plugin service 140 can determine that the candidate plugin is in the enabled state for the user request. For example, if the device identification carried in the user request indicates that the user request comes from the terminal device A, the plugin service 140 can determine that the candidate plugin E is disabled for the user request.
[0077] Alternatively, assuming that the state information of a certain candidate plugin includes the device identification in the enabled state, and / or the user identification, and / or the device identification, if the state information of the candidate plugin includes at least part of the identification information in the user request, the plugin service 140 can determine that the candidate plugin is in the enabled state for the user request. The plugin service 140 can determine one or more plugins in the enabled state for the user request in a similar manner.
[0078] It should be noted that only one example of determining one or more plugins in the enabled state for the user request based on the state information and the identification information of multiple candidate plugins is shown here, and the plugin service 140 can perform plugin screening in any appropriate manner, and the disclosure does not limit the specific manner.
[0079] The plugin service 140 can return (215) the screened plugins to the dialog service 201 (i.e., send the determined one or more plugins to the dialog service 201). In some embodiments, the dialog service 201 can directly determine the one or more plugins returned by the dialog service as the first set of plugins. Alternatively or additionally, in some embodiments, if the one or more plugins include multiple plugins, the dialog service 201 can also compare the number of the multiple plugins with a threshold number, and determine (216) whether the multiple plugins need to be screened again by means of a trained machine learning model (such as the machine learning model 203) to determine the first set of plugins from the multiple plugins based on the comparison result.
[0080] The threshold number here can be determined in advance by a user (such as the target user) or determined by the server device 120 itself, and can be any appropriate number. Specifically, if the number of the multiple plugins in the enabled state for the user request does not exceed the threshold number, the dialog service 201 can determine that the multiple plugins do not need to be screened again by means of the machine learning model 203. The dialog service 201 can directly determine the multiple plugins as the first set of plugins. If the number of the multiple plugins in the enabled state for the user request exceeds the threshold number, the dialog service 201 can determine that the multiple plugins need to be screened again by means of the machine learning model 203 to determine the first set of plugins from the multiple plugins.
[0081] As to the specific manner of the secondary screening, in some embodiments, the dialog service 201 can determine, based on the respective description information of the plurality of plugins in the enabled state and the user request, a model input for the machine learning model 203. The description information of each plugin can at least indicate the function of the plugin. The dialog service 201 can utilize (217) the machine learning model 203 to perform secondary screening on the plurality of plugins to determine a first group of plugins from the plurality of plugins by providing the model input to the machine learning model 203. The machine learning model 203 can generate a corresponding model output based on the received model input, and the model output can indicate the first group of plugins. The machine learning model 203 can return (218) the model output to the dialog service 201, i.e., return the first group of plugins to the dialog service 201.
[0082] The dialog service 201 can utilize the trained machine learning model to determine at least one target plugin from the first group of plugins based at least on the description information of each plugin in the first group of plugins and the user input. Here, the machine learning model used to determine the target plugin can be the same model as the machine learning model used to perform secondary screening on the plurality of plugins to determine the first group of plugins (i.e., the machine learning model 203), or can be a different model. For example, the machine learning model used to determine the target plugin can be the machine learning model 203, or can be the machine learning model 202. Here, only an example description is given by taking the utilization of the machine learning model 202 to determine the target plugin as an example.
[0083] The dialog service 201 can determine, based on the respective description information of the first group of plugins and the user request, a model input for the machine learning model 202, which is used to indicate obtaining the target plugin from the first group of plugins, and this model input can also be referred to as a target plugin request. The dialog service 201 can utilize the machine learning model 202 to determine at least one target plugin from the first group of plugins by providing (219) the model input to the machine learning model 202. The machine learning model 202 can generate a corresponding model output based on the received model input, and the model output can indicate the at least one target plugin. The machine learning model 202 can return (220) the model output to the dialog service 201, i.e., return the at least one target plugin to the dialog service 201.
[0084] The dialog service 201 can further process the user request at least in part by invoking the at least one target plugin to determine a reply of the digital assistant to the user request. Specifically, the dialog service 201 can send (221) a request for invoking the at least one target plugin to the plugin service 140. In some embodiments, if the at least one target plugin includes a plurality of target plugins, and the plurality of target plugins have a certain invocation order, the request for invoking the at least one target plugin can further include the invocation order. For example, if the plurality of target plugins include a plugin for playing music and a plugin for dynamically displaying lyrics, the invocation order can indicate that the plugin for playing music is invoked first and the plugin for dynamically displaying lyrics is invoked second.
[0085] The plugin service 140 can invoke the at least one target plugin to process the user request based on the request for invoking. It can be appreciated that if the user request indicates a plurality of operations, there can be operations that do not need to invoke a plugin, in which case the at least one target plugin can be used to process only the operations that need to be implemented with the help of a plugin. Thus, the at least one target plugin can be used to process only part of the operations indicated by the user request. That is, the plugin service 140 can invoke the at least one target plugin to process the user request at least in part based on the request for invoking. The plugin service 140 can obtain the invocation result of the at least one target plugin and return (222) the invocation result of the at least one target plugin to the dialog service 201.
[0086] The dialog service 201 can determine the reply of the digital assistant to the user request based on the invocation result of the at least one target plugin. In some embodiments, if the user request can be processed completely by invoking the at least one target plugin, the dialog service 201 can determine the reply of the digital assistant to the user request directly based on the invocation result of the at least one target plugin. Alternatively or additionally, in some embodiments, if the user request can be processed only partially by invoking the at least one target plugin, the dialog service 201 can determine the reply of the digital assistant to the user request based at least on the invocation result of the at least one target plugin. For example, if the user request indicates a plurality of operations, the dialog service 201 can determine the reply of the digital assistant to the user request based on the result of processing part of the operations by the at least one target plugin (i.e., the invocation result of the at least one target plugin) and the processing result of another part of the operations that do not need a plugin.
[0087] As to the specific manner of determining the reply, in some embodiments, the dialog service 201 can determine the reply by means of the trained language model (e.g., the machine learning model 202). Specifically, the dialog service 201 can determine a model input for the machine learning model 202 based on at least the invocation result of the at least one target plugin and the user request. In some embodiments, the dialog service 201 can also determine the model input based on the context information of the target user. The context information of the target user can include one or more of environmental information of the target user, historical interaction information of the target user with the digital assistant, device information / application information of the target terminal device / target application corresponding to the user request, and the like.
[0088] The model input is used to indicate the determination of the reply to the user request, and the model input can also be referred to as a reply generation request. The dialog service 201 can utilize the machine learning model 202 to generate the reply to the user request by providing (223) the model input to the machine learning model 202. The machine learning model 202 can generate a corresponding model output based on the received model input, and the model output can indicate the reply to the user request. The machine learning model 202 can return (224) the model output to the dialog service 201, that is, return the reply to the user request to the dialog service 201.
[0089] The dialog service 201 can send (225) the reply to the user request to the terminal device 110 based on the communication connection between the server device 120 and the terminal device 110. The terminal device 110 can provide (226) the reply to the user request to the target user in response to receiving the reply. It can be understood that the reply can be any appropriate form of reply, including but not limited to text type, audio type, video type, image type, document type, and the like. The terminal device 110 may, for example, also provide the reply to the target user via an interaction interface of the target user with the digital assistant, and the reply can be presented in the interaction interface in the form of a conversation message from the digital assistant.
[0090] In this way, the plurality of candidate plugins can be screened for at least one round before the target plugin is determined, and the target plugin is determined from the first set of plugins obtained by screening. The target plugin for processing the user request can be determined from the small number of plugins obtained by screening, which can reduce the computational cost required to determine the target plugin and improve the accuracy and efficiency of determining the target plugin.
[0091] The above describes example embodiments of screening a plurality of candidate plugins, determining a target plugin from a first set of plugins resulting from the screening, and processing a user request by invoking the target plugin to determine a reply. In the above examples, it is assumed that the plugins available to the digital assistant can be created and the enabled or disabled state can be flexibly configured by the plugin maintainer or individual users of the digital assistant. The following describes an example of creation and update of a plugin in connection with FIG. 4. FIG. 4 illustrates a flowchart of a signaling flow 400 of creating and updating a plugin, according to some embodiments of the present disclosure. The signaling flow 400 involves the terminal device 110, the server device 120, and a database 401. The database 401 can be used to store the plugins that have been created (e.g., to store the plurality of candidate plugins in the above). The database 401 can be deployed at the plugin service 140.
[0092] The terminal device 110 can present, for example, a plugin creation page for creating a plugin, and receive (411) a plugin creation request of a plugin maintainer (e.g., a developer of the plugin) of the plugin via the plugin creation page. The plugin creation page can be any suitable page, including but not limited to a programming page, a page of interaction of a user with the digital assistant, and the like. The plugin creation request can indicate at least one of a name, a function, state information, and the like of the plugin to be created. The terminal device 110 can send (412) the plugin creation request to the server device 120. The server device 120 or the plugin service 140 in the server device 120 can create (413) the corresponding plugin based on the received plugin creation request, and store the plugin information corresponding to the created plugin into the database 401.
[0093] The database 401 can return (414) a result indicating that the plugin is successfully stored and the plugin creation is successful to the server device 120. It can be understood that the result can also indicate that the plugin creation fails or the plugin storage fails. The server device 120 can return (415) a result indicating that the plugin creation succeeds / fails to the terminal device 110 in response to receiving the result. The terminal device 110 can provide prompt information indicating that the plugin creation succeeds / fails to the plugin maintainer in response to receiving the result. The terminal device 110 can provide the prompt information by playing audio, playing video, presenting text, presenting image, vibrating, and the like, which are not limited by the present disclosure.
[0094] In some embodiments, the terminal device 110 can further receive (421) a state update request from the plugin maintainer or from the target user for one or more of the created candidate plugins (i.e., the state update request can be for only part of the candidate plugins). It can be appreciated that the terminal device receiving the state update request from the plugin maintainer and the terminal device receiving the state update request from the target user can be different terminal devices, and the disclosure is merely exemplarily described by taking both as the terminal device 110. The terminal device 110 can provide, for example, a configuration page for the created plugins and receive the state update request for the plugins via the configuration page. Similarly, the configuration page can also be any suitable page. The state update request can indicate which state information of which plugin(s) is to be updated and how to update. As an example, the state update request from the plugin maintainer can indicate to switch the state information of the candidate plugin A from the enabled state to the disabled state. Similarly, the state update request from the target user can indicate to switch the state information of the candidate plugin B for the target user from the disabled state to the enabled state.
[0095] The terminal device 110 can send (422) the state update request to the server device 120. The server device 120 or the plugin service 140 in the server device 120 can determine one or more candidate plugins to be updated and determine how to update the one or more candidate plugins based on the received state update request. The server device 120 or the plugin service 140 can update (423) the state information of the one or more candidate plugins in the database 401 based on the determination results.
[0096] It needs to be noted that although only 1 database 401 is shown in FIG. 4, in fact, there can be multiple databases, and the multiple databases all store the created candidate plugins. As an example, for the target user, two data tables, for example, a first data table and a second data table, can be included. The first data table and the second data table can both be used to store the candidate plugins. In some embodiments, for the same candidate plugin, the state information corresponding to the candidate plugin stored in the first data table can be for all users, and can only be adjusted based on the state update request from the plugin maintainer. The state information corresponding to the candidate plugin stored in the second data table can be for a specific user (e.g., the target user), and can only be adjusted based on the state update request from the target user.
[0097] Referring to Table 1 and Table 2, Table 1 shows an example of a certain candidate plugin in the first data table, and Table 2 shows an example of a certain candidate plugin in the second data table:
[0098] Table 1
[0099] Table 2
[0100] As shown in Table 1, the first data table can store state information (i.e., status) of the candidate plugins, which indicates that the corresponding candidate plugin is in an enabled state or a disabled state. The state information is for all users, which can be adjusted only based on a state update request from the plugin maintainer.
[0101] As shown in Table 2, in the second data table, if the data table of the candidate plugin stores one or more of the user ID, the application ID, and the device ID, it can be determined that the state information of the candidate plugin indicates that the corresponding candidate plugin is in an enabled state or a disabled state for the target user, and / or for the target application, and / or for the target terminal device. The state information can be adjusted based on a state update request from the target user.
[0102] After the state information of one or more candidate plugins in the database 401 is updated, the server device 120 can return (424) a result indicating that the state information update is successful or fails to the terminal device 110. The server device 120 can return (435) a result indicating that the state information update is successful or fails to the terminal device 110 in response to receiving the result. The terminal device 110 can provide prompt information indicating that the state information update is successful or fails to the plugin maintainer / target user in response to receiving the result. The terminal device 110 can also provide prompt information in any appropriate manner, such as playing audio, playing video, presenting text, presenting images, vibration, etc., which is not limited in the present disclosure.
[0103] Thus, the plugin maintainer / target user can update the state information of the plugin by himself / herself, which can improve the flexibility and efficiency of state information update.
[0104] In summary, according to embodiments of the present disclosure, a plurality of candidate plugins can be screened for at least one round before determining the target plugin, and the target plugin can be determined from the first group of plugins obtained by screening. The target plugin for processing the user request can be determined from a small number of plugins obtained by screening, which can reduce the computational cost required to determine the target plugin and improve the accuracy and efficiency of determining the target plugin.
[0105] FIG. 5 shows a flowchart of a method 500 for request processing according to some embodiments of the present disclosure. The method 500 can be implemented at the server device 120. It will be described with reference to the environment 100 of FIG. 1.
[0106] At block 510, in response to obtaining the user request of the target user for the digital assistant, the server device 120 determines, based on the state information of the plurality of candidate plugins for the digital assistant, a first group of plugins from the plurality of candidate plugins, the first group of plugins being in an enabled state for the user request.
[0107] At block 520, the server device 120 determines, based on the description information of each plugin in the first group of plugins and the user request, at least one target plugin from the first group of plugins using the first machine learning model, the description information of each plugin indicating a function of the corresponding plugin.
[0108] At block 530, the server device 120 determines a reply of the digital assistant to the user request by invoking the at least one target plugin to at least partially process the user request.
[0109] In some embodiments, the state information of each candidate plugin in the plurality of candidate plugins indicates at least one of: an enabled state or a disabled state, an enabled state or a disabled state for one or more terminal devices, an enabled state or a disabled state for one or more users, an enabled state or a disabled state for one or more applications, the digital assistant being associated to the one or more applications.
[0110] In some embodiments, determining the first group of plugins from the plurality of candidate plugins comprises: determining, based on the state information of the plurality of candidate plugins, at least one candidate plugin in an enabled state from the plurality of candidate plugins; extracting identification information from the user request, the identification information comprising at least one of: a device identifier of a target terminal device corresponding to the user request, a user identifier of the target user, an application identifier of a target application corresponding to the user request; and determining, based on the state information of the plurality of candidate plugins and the identification information, the first group of plugins in an enabled state for the target user, and / or, for the target application, and / or, for the target terminal device, from the at least one candidate plugin.
[0111] In some embodiments, the method 500 further comprises: in response to receiving a state update request of one or more candidate plugins in the plurality of candidate plugins, updating the state information of the one or more candidate plugins, wherein the state update request is received from a plugin maintainer of the one or more candidate plugins to indicate updating the one or more candidate plugins to be in an enabled state or a disabled state, or wherein the state update request is received from the target user to indicate updating the one or more candidate plugins to be in an enabled state or a disabled state for the target terminal device, and / or, for the target application associated with the digital assistant, and / or, for the target user.
[0112] In some embodiments, determining the first set of plugins from the plurality of candidate plugins comprises: determining, based on the state information of the plurality of candidate plugins, a plurality of plugins in an enabled state from the plurality of candidate plugins for the user request; and in response to a number of the plurality of plugins in the enabled state exceeding a threshold number, determining the first set of plugins from the plurality of plugins in the enabled state using a second machine learning model.
[0113] In some embodiments, determining the first set of plugins from the plurality of plugins in the enabled state comprises: determining the first set of plugins from the plurality of plugins in the enabled state using the second machine learning model based on the respective description information of the plurality of plugins in the enabled state and the user request.
[0114] In some embodiments, a model size of the second machine learning model is smaller than a model size of the first machine learning model.
[0115] In some embodiments, determining the first set of plugins from the plurality of candidate plugins comprises: in response to the number of the plurality of plugins in the enabled state not exceeding the threshold number, determining the plurality of plugins as the first set of plugins.
[0116] In some embodiments, determining the reply of the digital assistant to the user request by invoking the at least one target plugin comprises: obtaining an invocation result of the at least one target plugin by invoking the at least one target plugin to at least partially process the user request; and determining the reply of the digital assistant to the user request based at least on the invocation result and the user request.
[0117] Embodiments of the present disclosure also provide a corresponding apparatus for implementing the above method or process. FIG. 6 shows an example structural block diagram of an apparatus 600 for request processing according to some embodiments of the present disclosure. The apparatus 600 can be implemented as or included in the server device 120. Various modules / components in the apparatus 600 can be implemented by hardware, software, firmware, or any combination thereof.
[0118] As shown in FIG. 6, the apparatus 600 includes a first plugin determining module 610 configured to, in response to obtaining a user request of a target user for a digital assistant, determine a first set of plugins from a plurality of candidate plugins for the digital assistant based on state information of the plurality of candidate plugins, the first set of plugins being in an enabled state for the user request. The apparatus 600 also includes a target plugin determining module 620 configured to determine at least one target plugin from the first set of plugins using a first machine learning model based at least on description information of each plugin in the first set of plugins and the user request, the description information of each plugin indicating a function of the corresponding plugin. The apparatus 600 further includes a reply determining module 630 configured to determine a reply of the digital assistant to the user request by invoking the at least one target plugin to at least partially process the user request.
[0119] In some embodiments, the state information of each candidate plugin in the plurality of candidate plugins indicates at least one of: an enabled state or a disabled state, an enabled state or a disabled state for one or more terminal devices, an enabled state or a disabled state for one or more users, an enabled state or a disabled state for one or more applications, the digital assistant is associated to one or more applications.
[0120] In some embodiments, the first plugin determining module 610 is further configured to: determine, based on the state information of the plurality of candidate plugins, at least one candidate plugin in the enabled state from the plurality of candidate plugins; extract, from the user request, identification information, the identification information including at least one of: a device identification of a target terminal device corresponding to the user request, a user identification of a target user, an application identification of a target application corresponding to the user request; and determine, based on the state information of the plurality of candidate plugins and the identification information, a first group of plugins in the enabled state for the target user, and / or, for the target application, and / or, for the target terminal device, from the at least one candidate plugin.
[0121] In some embodiments, the apparatus 600 further comprises: an information updating module configured to, in response to receiving a state update request of one or more candidate plugins in the plurality of candidate plugins, update the state information of the one or more candidate plugins, wherein the state update request is received from a plugin maintainer of the one or more candidate plugins to indicate updating the one or more candidate plugins to be in the enabled state or the disabled state, or wherein the state update request is received from the target user to indicate updating the one or more candidate plugins to be in the enabled state or the disabled state for the target terminal device, and / or, for the target application associated with the digital assistant, and / or, for the target user.
[0122] In some embodiments, the first plugin determining module 610 is further configured to: determine, based on the state information of the plurality of candidate plugins, a plurality of plugins in the enabled state for the user request from the plurality of candidate plugins; and in response to a number of the plurality of plugins in the enabled state exceeding a threshold number, determine, using a second machine learning model, the first group of plugins from the plurality of plugins in the enabled state.
[0123] In some embodiments, the first plugin determining module 610 is further configured to: determine, using the second machine learning model, the first group of plugins from the plurality of plugins in the enabled state based on the respective description information of the plurality of plugins in the enabled state and the user request.
[0124] In some embodiments, a model size of the second machine learning model is smaller than a model size of the first machine learning model.
[0125] In some embodiments, the first plug-in determining module 610 is further configured to determine the plurality of plug-ins as the first group of plug-ins in response to a number of the plurality of plug-ins in the enabled state not exceeding a threshold number.
[0126] In some embodiments, the reply determining module 630 is further configured to obtain a calling result of the at least one target plug-in by calling the at least one target plug-in to at least partially process the user request, and determine the reply of the digital assistant to the user request based at least on the calling result and the user request.
[0127] The units and / or modules included in the apparatus 600 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, e.g., machine-executable instructions stored on a storage medium. In addition or as an alternative, some or all of the units and / or modules in the apparatus 600 can be implemented at least partially by one or more hardware logic components. As an example and not by way of limitation, example types of hardware logic components that can be used include Field-Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application-Specific Standard Products (ASSPs), System-on-a-Chip (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0128] It should be understood that one or more steps in the above methods can be performed by an appropriate electronic device or combination of electronic devices. Such an electronic device or combination of electronic devices may, for example, include the server device 120 in FIG. 1.
[0129] FIG. 7 shows a block diagram of an electronic device 700 in which one or more embodiments of the disclosure can be implemented. It should be understood that the electronic device 700 illustrated in FIG. 7 is merely an example and should not be construed as limiting the functionality and scope of the embodiments described herein. The electronic device 700 illustrated in FIG. 7 can be used to implement the server device 120 or the terminal device 110 of FIG. 1, or the apparatus 600 of FIG. 6.
[0130] As shown in FIG. 7, the electronic device 700 is in the form of a general electronic device. Components of the electronic device 700 can include, but are not limited to, one or more processing units or processors 710, a memory 720, a storage device 730, one or more communication units 740, one or more input devices 750, and one or more output devices 760. The processor 710 can be a real or virtual processor and is capable of performing various processing according to programs stored in the memory 720. In a multi-processor system, multiple processors perform computer-executable instructions in parallel to improve the parallel processing capability of the electronic device 700.
[0131] The electronic device 700 typically includes a plurality of computer storage media. Such media can be removable computer-readable storage media 720 and / or non-removable computer-readable storage media (media that do not include a moving mechanical disposition). FIG. 7 illustrates both removable storage 730 and non-removable storage 720 coupled with the bus 710 for storage of information and / or computer program products, e.g., code modules or segments containing instructions necessary for operation of the application. It is understood that the computer program products can be distributed over the Internet, e.g., by way of cloud storage. It is further understood that removable storage 730 and non-removable storage 720 are examples of computer-readable storage media for storage of information such as computer program products.
[0132] The electronic device 700 can further include additional removable / non-removable, volatile / non-volatile computer storage media. Although not shown, a disk drive can be provided for reading from or writing to a removable, non-removable, volatile, or non-volatile computer media. In these instances, each can be connected to the bus 710 by one or more data media interfaces. The memory 720 can include a computer program product 725 that has one or more program modules configured to carry out the various methods or actions of the various embodiments of the present disclosure.
[0133] The communication unit 740 enables communications with other electronic devices over a communication medium. Additionally, the functionality of the components of the electronic device 700 can be implemented in a single computing cluster or a plurality of computer machines that are capable of communicating with one another over a communication connection. As such, the electronic device 700 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another networked node.
[0134] The input device(s) 750 can be one or more input device(s) such as a mouse, a keyboard, a trackball, etc. The output device(s) 760 can be one or more output device(s) such as a display, a speaker, a printer, etc. The electronic device 700 can also include an interface 770 for connecting the electronic device 700 to other electronic devices such as storage devices, display devices, etc. The interface 770 can include, for example, an antenna, a USB connection, a parallel connection, or the like. As will be appreciated by persons skilled in the art, the interface 770 (and / or the communication unit 740) can also be configured to allow connection to a network such as a wired or wireless network, a personal area network, a local area network, a wide area network, or the like. Such networking environments will be familiar to persons skilled in the art.
[0135] According to example implementations of the present disclosure, a computer-readable storage medium is provided having computer-executable instructions stored thereon, where the computer-executable instructions are executed by a processor to implement the method described above. According to example implementations of the present disclosure, a computer program product is also provided that is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, where the computer-executable instructions are executed by a processor to implement the method described above.
[0136] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0137] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0138] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0139] The computer program product of the present disclosure can have a signal including said computer program. This signal can be electronic, electromagnetic, optical, or any other suitable type of signal. Such a signal can be provided through a communication connection, such as electrical wiring, optical fiber, wireless interface, etc. Examples of computer program products include computer program implemented on a personal computer, server, or other networked device. A non-transitory computer readable medium, such as a floppy disk, CD-ROM, DVD-ROM, Blu-ray Disc, hard disk, or memory stick, can also be used to implement the present disclosure. The computer program product of the present disclosure can also be provided as a service to download and use the computer program over a network, such as the Internet.
[0140] The implementations of the disclosure have been described above with the intent to be illustrative rather than limiting. Although the implementations of the disclosure have been described with regard to one or more implementations, numerous modifications and changes can be made to the implementations of the disclosure by those skilled in the art without departing from the scope and spirit of the implementations. For example, the implementations of the disclosure can be used in a variety of different applications and environments and are not limited to the specific examples described above. It is therefore intended that the disclosure not be limited to the described implementations, but that the full scope of the implementations should be determined by reference to the appended claims.
Claims
1.A method for request processing, comprising: in response to obtaining a user request of a target user for a digital assistant, determining a first group of plugins from a plurality of candidate plugins for the digital assistant based on state information of the plurality of candidate plugins, the first group of plugins being in an enabled state for the user request; determining at least one target plugin from the first group of plugins based on at least description information of each plugin in the first group of plugins and the user request using a first machine learning model, the description information of each plugin indicating a function of the corresponding plugin; and processing the user request at least in part by invoking the at least one target plugin to determine a reply of the digital assistant to the user request. 2.The method of claim 1, wherein the state information of each candidate plugin in the plurality of candidate plugins indicates at least one of: an enabled state or a disabled state, an enabled state or a disabled state for one or more terminal devices, an enabled state or a disabled state for one or more users, an enabled state or a disabled state for one or more applications, the digital assistant being associated to the one or more applications. 3.The method of claim 2, wherein determining the first group of plugins from the plurality of candidate plugins comprises: determining at least one candidate plugin in an enabled state from the plurality of candidate plugins based on the state information of the plurality of candidate plugins; extracting identification information from the user request, the identification information comprising at least one of: a device identification of a target terminal device corresponding to the user request, a user identification of the target user, an application identification of a target application corresponding to the user request; and determining the first group of plugins in an enabled state for the target user, and / or, for the target application, and / or, for the target terminal device from the at least one candidate plugin based on the state information of the plurality of candidate plugins and the identification information. 4.The method of claim 1, further comprising: in response to receiving a state update request of one or more candidate plugins in the plurality of candidate plugins, updating the state information of the one or more candidate plugins, wherein the state update request is received from a plugin maintainer of the one or more candidate plugins to indicate updating the one or more candidate plugins to be in an enabled state or a disabled state, or wherein the state update request is received from the target user to indicate updating the one or more candidate plugins to be in an enabled state or a disabled state for a target terminal device, and / or, for a target application associated with the digital assistant, and / or, for the target user. 5.The method of claim 1, wherein determining the first group of plugins from the plurality of candidate plugins comprises: determining a plurality of plugins in an enabled state for the user request from the plurality of candidate plugins based on state information of the plurality of candidate plugins; and and In response to a number of the plurality of plugins in the enabled state exceeding a threshold number, determining, with a second machine learning model, the first set of plugins from the plurality of plugins in the enabled state. 6.The method of claim 5, wherein determining the first set of plugins from the plurality of plugins in the enabled state comprises: determining, with the second machine learning model, the first set of plugins from the plurality of plugins in the enabled state based on the respective description information of the plurality of plugins in the enabled state and the user request. 7.The method of claim 5, wherein a model size of the second machine learning model is smaller than a model size of the first machine learning model. 8.The method of claim 5, wherein determining the first set of plugins from the plurality of candidate plugins comprises: in response to the number of the plurality of plugins in the enabled state not exceeding the threshold number, determining the plurality of plugins as the first set of plugins. 9.The method of claim 1, wherein determining the reply of the digital assistant to the user request by invoking the at least one target plugin comprises: obtaining an invocation result of the at least one target plugin by invoking the at least one target plugin to at least partially process the user request; and determining the reply of the digital assistant to the user request based at least on the invocation result and the user request. 10.An apparatus for request processing, comprising: a first plugin determining module configured to, in response to obtaining a user request of a target user to a digital assistant, determine a first set of plugins from a plurality of candidate plugins of the digital assistant based on state information of the plurality of candidate plugins, the first set of plugins being in an enabled state for the user request; a target plugin determining module configured to determine at least one target plugin from the first set of plugins based at least on description information of each plugin in the first set of plugins and the user request, the description information of each plugin indicating a function of the corresponding plugin, by using a first machine learning model; and a reply determining module configured to determine a reply of the digital assistant to the user request by invoking the at least one target plugin to at least partially process the user request. 11.An electronic device, comprising: at least one processor; and at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions, when executed by the at least one processor, causing the electronic device to perform the method according to any one of claims 1 to 9. 12.A computer-readable storage medium having computer-executable instructions stored thereon, the computer-executable instructions being executable by a processor to implement the method according to any one of claims 1 to 9. 13.A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Service control method and capability opening platform
CN105827567A
Multi-algorithm scheduling method and device, equipment and storage medium
CN116431308A
Human-computer interaction method and device, electronic equipment and storage medium
CN117332068A
Large model interaction processing method and system, terminal, equipment and medium
CN117520497A
Model training method and device, plug-in prediction method and device, equipment, medium and product
CN117668560A