Request processing method and device, equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2026-03-10
AI Technical Summary
Conversational applications are difficult to provide accurate personalized music recommendations because they cannot obtain sufficient user historical behavior data.
By obtaining input messages received in a user's session with a virtual object, and combining local and global context information, input messages and context information are provided to the target model to generate a response to the input message.
Improves the accuracy of response to input messages and enhances the user's interactive experience, especially when processing music-related requests.
Smart Images

Figure CN121646771A_ABST
Abstract
Description
Method, device, equipment and storage medium for processing requests Technical Field
[0001] Exemplary implementations of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for processing requests. Background Art
[0002] With the rapid development of Internet technology, various applications have become important tools in people's daily lives. Different applications often have different functions, and users can use specific applications with specific functions to achieve specific services.
[0003] Conversational applications, as highly interactive applications, are gaining popularity among users. Through conversational applications, users can interact with virtual objects to obtain various services, such as music-related services.
[0004] Summary of the Invention
[0005] In a first aspect of the present disclosure, a method for processing a request is provided. The method includes: obtaining an input message received during a conversation between a user and a virtual object, where the virtual object is associated with a target service; providing the input message and context information to a target model, where the context information includes local context information indicating at least one historical message in the conversation and global context information indicating at least one user interaction with the target service; and generating a response to the input message using the target model. This method improves the accuracy of the response to the input message.
[0006] In a second aspect of the present disclosure, a device for processing a request is provided. The device includes: an input message acquisition module configured to acquire an input message received during a conversation between a user and a virtual object, where the virtual object is associated with a target service; an information provision module configured to provide the input message and context information to a target model, where the context information includes local context information and global context information, where the local context information indicates at least one historical message in the conversation, and the global context information indicates at least one user interaction operation with the target service; and a response generation module configured to generate a response to the input message using the target model.
[0007] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to the first aspect of the present disclosure.
[0008] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the method according to the first aspect of the present disclosure.
[0009] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method according to the first aspect of the present disclosure is implemented.
[0010] It should be understood that the content described in this summary section is not intended to limit the key features or important features of the implementation of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent hereinafter with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0012] FIG1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;
[0013] FIG2 is a schematic diagram showing a process of processing a request according to some embodiments of the present disclosure;
[0014] 3A and 3B illustrate example interaction interfaces according to some embodiments of the present disclosure;
[0015] 4A and 4B illustrate example interaction interfaces according to some embodiments of the present disclosure;
[0016] 5A and 5B illustrate example interaction interfaces according to some embodiments of the present disclosure;
[0017] FIG6 is a schematic diagram showing a process of processing a request according to some embodiments of the present disclosure;
[0018] FIG7 shows a schematic structural block diagram of an apparatus for processing a request according to some embodiments of the present disclosure; and
[0019] FIG8 illustrates a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0020] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0021] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, 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 "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below.
[0022] Herein, unless explicitly stated otherwise, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0023] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0024] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0025] For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium and other software or hardware that performs the operation of the technical solution of the present disclosure based on the prompt message.
[0026] As an optional but non-limiting implementation, in response to receiving a user's active request, a prompt message may be sent to the user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0027] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0028] As used herein, the term "model" can learn the association between corresponding inputs and outputs from training data, so that after training is completed, corresponding outputs can be generated for given inputs. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units. A neural network model is an example of a model based on deep learning. In this article, "model" may also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably in this article.
[0029] A "neural network" is a machine learning network based on deep learning. A neural network is capable of processing inputs and providing corresponding outputs. It typically includes an input layer, an output layer, and one or more hidden layers between the input and output layers. Neural networks used in deep learning applications typically include many hidden layers, thereby increasing the depth of the network. The layers of a neural network are connected in sequence so that the output of the previous layer is provided as input to the next layer, where the input layer receives the input of the neural network and the output of the output layer serves as the final output of the neural network. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each of which processes the input from the previous layer.
[0030] Generally speaking, machine learning can be roughly divided into three stages, namely the training stage, the testing stage, and the application stage (also called the inference stage). In the training stage, a given model can be trained using a large amount of training data, and the parameter values are continuously updated iteratively until the model can obtain consistent inferences that meet the expected goals from the training data. Through training, the model can be considered to be able to learn the association between input and output (also called 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, thereby determining 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 through training to determine the corresponding model output.
[0031] In the context of this article, a virtual object can be a virtual processing entity created based on configuration information, which can be implemented based on a machine learning model. In some scenarios, a virtual object can also be referred to as a virtual entity, examples of which can include a robot program (bot), an intelligent body (agent), etc.
[0032] As briefly discussed above, with the rapid development of Internet technology, a variety of applications have become important tools in people's daily lives. Different applications often have different functions, and users can use specific applications with specific functions to achieve specific services.
[0033] Conversational applications, as highly interactive applications, are gaining popularity among users. Through these applications, users can interact with virtual objects to access various services, such as music-related services. In traditional music applications, music recommendations are primarily based on the user's historical behavior within the application. However, due to a lack of sufficient historical data, conversational applications are unable to accurately recommend music that meets the user's personalized needs.
[0034] According to an embodiment of the present disclosure, a method, apparatus, device, and storage medium for request processing are provided. The method includes: obtaining an input message received during a conversation between a user and a virtual object, where the virtual object is associated with a target service; providing the input message and context information to a target model, where the context information includes local context information and global context information, where the local context information indicates at least one historical message in the conversation, and the global context information indicates at least one user interaction operation with the target service; and generating a response to the input message using the target model.
[0035] In this way, embodiments of the present disclosure may consider contextual information associated with a user and a target service (eg, music interaction operations) to improve the accuracy of processing music-related requests, thereby enhancing the user's interactive experience.
[0036] In some example embodiments herein, a music service is used as an example of a target service to describe the example processes of the present disclosure. It should be understood that, in fact, the solutions of the present disclosure can be applied to any appropriate service other than a music service, and the music service should not be understood as any limitation to the various embodiments of the present disclosure.
[0037] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.
[0038] Sample Environment
[0039] FIG1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. In this example environment 100, an application 120 is installed on a terminal device 110. A user 140 can interact with the application 120 via the terminal device 110 and / or its attached devices. The application 120 can be any suitable application that supports interaction with virtual objects.
[0040] In the environment 100 of FIG1 , if the application 120 is active, the terminal device 110 may present an interface 150 of the application 120. The interface 150 may include various interfaces that the application 120 may provide, such as a conversation interface with a virtual object.
[0041] In some embodiments, the terminal device 110 communicates with the electronic device 130 to enable the provision of services (e.g., music services) to the application 120. The terminal device 110 can be any type of mobile terminal, fixed terminal, or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia 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 e-book device, a gaming 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 support any type of interface for the user (such as a "wearable" circuit, etc.). The electronic device 130 can be various types of computing systems / servers that can provide computing capabilities, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.
[0042] In some embodiments, terminal device 110 and electronic device 130 may collaborate to provide specific services to user 140. In some exemplary embodiments of the present disclosure, the exemplary processes are described with electronic device 130 as the execution subject. It should be understood that in other embodiments, the exemplary processes described may be implemented collaboratively by terminal device 110 and electronic device 130. For the sake of brevity, identical or similar content will not be repeated.
[0043] It should be understood that the structure and function of the various elements in the environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of the present disclosure.
[0044] Sample interactive interface
[0045] Just for a better understanding of the various embodiments of the present disclosure, reference is made to Figures 2-5B in the following example embodiments, where Figure 2 shows a schematic diagram of a process 200 for processing a request according to some embodiments of the present disclosure, and Figures 3A-5B show example interactive interfaces 300A to 500B according to some embodiments of the present disclosure.
[0046] It should be understood that the interactive interfaces shown in Figures 3A to 5B are merely examples, and various designs are possible. For example, the various graphical elements and / or controls in the interactive interface can have different arrangements and different visual representations, one or more elements and / or controls can be omitted or replaced, and one or more other elements and / or controls can also be present. In addition, any appropriate content can be included in the user interface. The scope of the present disclosure is not limited in this respect.
[0047] Furthermore, the user can switch and jump between interactive interfaces by activating controls / entries in each interactive interface or performing predetermined operations in the interactive interface. It should be understood that the logic of switching and jumping between interactive interfaces can be set arbitrarily. For example, in an example embodiment, the user jumps from the first interactive interface to the second interactive interface by activating a control. In other embodiments, the user can jump from the first interactive interface to the third interactive interface by activating another control. The present disclosure is not limited in this respect. It should also be understood that although multiple interactive interfaces are described in a specific embodiment, any interactive interface described in the present disclosure can be independently implemented as a separate embodiment.
[0048] In various example embodiments of the present disclosure, the example interaction interfaces 300A to 500B may be implemented at the terminal device 110 , and may be any page of the application 120 .
[0049] In embodiments of the present disclosure, application 120 may be a conversational application. Specifically, a consumer user may interact with a virtual object in a conversational manner. In some scenarios, a virtual object may also be referred to as a digital assistant, a virtual avatar, or the like. In the following embodiments, a music assistant will be used as an example of a virtual object.
[0050] In operation, as shown in FIG2 , electronic device 130 obtains an input message 210 received during a conversation between user 140 and a virtual object, where the virtual object is associated with a target service. Electronic device 130 provides input message 210 and context information 220 to a target model. According to some embodiments of the present disclosure, the context information includes local context information 230 and global context information 240, where local context information 230 indicates at least one historical message in the conversation and global context information 240 indicates at least one user interaction operation 260 with the target service. Next, electronic device 130 generates a response 270 to input message 210 using the target model.
[0051] In some embodiments, the target service may include a music service.
[0052] According to various embodiments of the present disclosure, the electronic device 130 can fully utilize the context information 220 indicating historical messages (e.g., local context information 230) and music interaction operations 260 (e.g., global context information 230) to generate a response 270 to the input message 210. Because the local context information 230 can promptly reflect the recent needs of the user 140, the recommended behavior of the electronic device 130 can be quickly adjusted if the needs of the user 140 change. In addition, because the global context information 240 can better reflect the personalized needs of the user 140, a response that is more in line with the user's true intentions can be generated.
[0053] 3A and 3B . In the specific embodiment of FIG. 3A and 3B , the virtual object is a music assistant. User 140 enters a message 310 in a conversation with the music assistant. In response to the input message 310, the music assistant returns a response 320.
[0054] In some embodiments, the response to the input message includes a reply message provided in a conversation window of the conversation, and the reply message includes text content and at least one piece of music recommendation content. Referring to the example interaction interface 300A shown in FIG3A , a response 320 is presented in a conversation with the music assistant, and further, the response 320 includes text content 330 and at least one piece of music recommendation content 340.
[0055] In some embodiments, in response to a triggering operation on at least one piece of music recommendation content 340, a music playback component provided in the session can be used to provide a playback service for the at least one piece of music recommendation content. Referring to the example interaction interface 300A shown in FIG3A , if user 140 triggers at least one piece of music recommendation content 340, terminal device 110 can present the example interaction interface 300B shown in FIG3B . In example interaction interface 300B, the at least one piece of music recommendation content can be played by the music playback component provided in the session.
[0056] In some embodiments, the target model may extract core information of the conversation between the user 140 and the virtual object, optionally summarize and organize the conversation and / or core content, and write it into the memory module.
[0057] In some embodiments, the local context information is determined based on a set of historical messages in the most recent predetermined round of conversations between the user and the virtual object.
[0058] In some embodiments, local context information includes instantaneous context information and short-term context information. During operation, the target model retrieves the conversations from the user's recent N conversations that are most semantically similar to the current input message. The retrieved conversations, along with user 140's personalized description information and / or user 140's current music-related service information, are input into the target model for response generation.
[0059] In some embodiments, in each conversation, the global context may input the user's personalized information and / or the user's current music-related service information into the target model in an offline manner for generating a response.
[0060] In some embodiments, the electronic device 130 may obtain local context information and global context information from the memory module, and update the local context information 230 and / or global context information 240 in the memory module based on the input message 210 and the response 270 .
[0061] By dynamically maintaining the context information 220 , personalized context information can be generated to further improve the accuracy of recommendations.
[0062] Next, at least one music interactive operation will be further described. In some embodiments, at least one music interactive operation includes an interactive operation of the user on a music player component provided in the session.
[0063] In some embodiments, the at least one music interaction operation may include an interaction operation of the user in a music application associated with the music service.
[0064] As an example embodiment, a music application may be a music application accessible to the current music service. The music application may be part of the current music service or independent of the current music service, for example, a third-party platform. Examples of interactive operations include, but are not limited to, play count, play duration, favorites, likes, comments, and shares.
[0065] Alternatively or additionally, in some embodiments, at least one music interactive operation may include an interactive operation of the user 140 regarding the music playback component provided in the session, including but not limited to the number of plays, playback duration, collection, likes, comments, sharing, etc.
[0066] It should be understood that the local context information and global context information mentioned above are obtained and used with the knowledge and permission of the relevant users.
[0067] Next, an example of the interactive operation of the user 140 on the music playback component provided in the session will be described in conjunction with the example interactive interfaces 400A and 400B shown in Figures 4A to 5B. In the example interactive interface 400A, the user 140 enters the message "What music do I have in my collection?" to initiate an interactive operation, and the music assistant can present the music collected by the user 140 in the music playback component. In response to the user 140 triggering the view control 410 in the example interactive interface, the terminal device 110 presents the example interactive interface 400B shown in Figure 4B. Whether in the example interactive interface 400A or in the example interactive interface 400B, the user 140 can trigger playback-related operations of the collection music, such as play, pause, next song, etc. The interactive actions of the user 140 in the example interactive interfaces 400A and 400B can be used as interactive operations.
[0068] See 5A and 5B. In the example interaction interface 500A, the user 140 inputs the message "What albums have I collected?" to initiate an interactive operation, and the music assistant can present the albums collected by the user 140 in the music playback component. In response to the user 140 triggering the view control 510 in the example interaction interface, the terminal device 110 presents the example interaction interface 500B shown in Figure 5B. Whether in the example interaction interface 500A or in the example interaction interface 500B, the user 140 can trigger playback-related operations of the collection album. The interactive actions of the user 140 in the example interaction interfaces 500A and 500B can be used as interactive operations.
[0069] In some embodiments, the target model includes a language model. Next, an example process of the electronic device 130 generating a response to an input message using the target model will be further described.
[0070] In some embodiments, in response to the target model determining that the input message corresponds to a music recommendation intent, the electronic device 130 calls a music recommendation service based on at least one parameter to generate a response to the input message, wherein the at least one parameter is determined based on the input message.
[0071] In some embodiments, the electronic device 130 provides at least a portion of the global context information to the music recommendation service to generate a response to the input message.
[0072] Based on the above example process, embodiments of the present disclosure may consider contextual information associated with a user and a music service to improve the accuracy of processing music-related requests, thereby enhancing the user's interactive experience.
[0073] Example Process
[0074] FIG6 shows a flow chart of an interaction method 600 according to some embodiments of the present disclosure. The method 600 may be implemented at the electronic device 130. The process 800 is described below with reference to FIG1.
[0075] At block 610 , the electronic device 130 obtains an input message received in a conversation between a user and a virtual object, the virtual object being associated with a target service.
[0076] In box 620, the electronic device 130 provides the input message and context information to the target model, where the context information includes local context information and global context information. The local context information indicates at least one historical message in the conversation, and the global context information indicates at least one interactive operation of the user with the target service.
[0077] At block 630 , the electronic device 130 generates a response to the input message using the target model.
[0078] In some embodiments, the target service includes a music service, and the at least one music interaction operation includes: a user interaction operation with a music playback component provided in the session, and / or a user interaction operation in a music application associated with the music service.
[0079] In some embodiments, the local context information is determined based on a set of historical messages in a recent predetermined turn of conversation between the user and the virtual object.
[0080] In some embodiments, in response to the target model determining that the input message corresponds to a music recommendation intent, the electronic device 130 calls a music recommendation service based on at least one parameter to generate a response to the input message, wherein the at least one parameter is determined based on the input message.
[0081] In some embodiments, the electronic device 130 provides at least a portion of the global context information to the music recommendation service to generate a response to the input message.
[0082] In some embodiments, the electronic device 130 obtains local context information and global context information from the memory module; and updates the local context information and / or global context information in the memory module based on the input message and the response.
[0083] In some embodiments, the response to the input message includes a reply message provided in a conversation window of the conversation, the reply message including text content and at least one music recommendation content.
[0084] In some embodiments, the target model comprises a language model.
[0085] Example devices and equipment
[0086] 7 shows a schematic structural block diagram of a story creation apparatus 700 according to some embodiments of the present disclosure. Apparatus 700 may be implemented as or included in electronic device 130. Each module / component in apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.
[0087] According to various embodiments of the present disclosure, the device 700 includes: an input message acquisition module 710, configured to acquire input messages received in a conversation between a user and a virtual object, where the virtual object is associated with a target service; an information provision module 720, configured to provide input messages and context information to a target model, where the context information includes local context information and global context information, where the local context information indicates at least one historical message in the conversation, and the global context information indicates at least one interactive operation of the user with the target service; and a response generation module 730, configured to generate a response to the input message using the target model.
[0088] In some embodiments, the target service includes a music service, and the at least one music interaction operation includes: a user interaction operation with a music playback component provided in the session, and / or a user interaction operation in a music application associated with the music service.
[0089] In some embodiments, the local context information is determined based on a set of historical messages in a recent predetermined turn of conversation between the user and the virtual object.
[0090] In some embodiments, the response generation module 730 is further configured to: in response to the target model determining that the input message corresponds to a music recommendation intention, call a music recommendation service based on at least one parameter to generate a response to the input message, wherein the at least one parameter is determined based on the input message.
[0091] In some embodiments, the apparatus 700 further includes a global context information providing module configured to provide at least a portion of the global context information to the music recommendation service to generate a response to the input message.
[0092] In some embodiments, the apparatus 700 further includes a context information updating module configured to: obtain local context information and global context information from the memory module; and update the local context information and / or global context information in the memory module based on input messages and responses.
[0093] In some embodiments, the response to the input message includes a reply message provided in a conversation window of the conversation, the reply message including text content and at least one music recommendation content.
[0094] In some embodiments, the target model comprises a language model.
[0095] FIG8 shows a block diagram of an electronic device 800 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 800 shown in FIG8 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. The electronic device 800 shown in FIG8 may be used to implement the terminal device 110 of FIG1 .
[0096] As shown in FIG8 , electronic device 800 is a general-purpose electronic device. Components of electronic device 800 may include, but are not limited to, one or more processors or processing units 810, memory 820, storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. Processing unit 810 may be a real or virtual processor and is capable of performing various processes according to programs stored in memory 820. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to enhance the parallel processing capabilities of electronic device 800.
[0097] The electronic device 800 typically includes a plurality of computer storage media. Such media can be any accessible media that can be obtained by the electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 820 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 830 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and / or data (e.g., training data for training) and can be accessed within the electronic device 800.
[0098] The electronic device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG8 , a disk drive for reading from or writing to a removable, non-volatile disk (e.g., a “floppy disk”) and an optical drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. The memory 820 may include a computer program product 825 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.
[0099] The communication unit 840 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 800 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the electronic device 800 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0100] The input device 850 may be one or more input devices, such as a mouse, keyboard, or trackball. The output device 860 may be one or more output devices, such as a display, a speaker, or a printer. The electronic device 800 may also communicate with one or more external devices (not shown) via the communication unit 840 as needed, such as a storage device, a display device, or the like, with one or more devices that allow a user to interact with the electronic device 800, or with any device that allows the electronic device 800 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0101] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0102] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0103] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0104] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0105] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0106] While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, not exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for processing a request, comprising: Retrieving an input message received in a session between a user and a virtual object, the virtual object being associated with a target service; Providing the input message and context information to a target model, the context information comprising local context information and global context information, the local context information indicating at least one historical message in the session, and the global context information indicating at least one interactive operation of the user with the target service; as well as A response to the input message is generated using the target model.
2. The method according to claim 1, wherein the target service comprises a music service, and the at least one music interaction operation comprises: The user's interactive operation on the music playback component provided in the session; and / or The user's interactive operation in a music application associated with the music service. 3 . The method according to claim 1 , wherein the local context information is determined based on a set of historical messages in a recent preset round of conversation between the user and the virtual object.
4. The method according to claim 1, wherein generating a response to the input message using the target model comprises: In response to the target model determining that the input message corresponds to a music recommendation intent, a music recommendation service is invoked based on at least one parameter to generate the response to the input message, the at least one parameter being determined based on the input message.
5. The method according to claim 4, further comprising: At least a portion of the global context information is provided to the music recommendation service to generate the response to the input message.
6. The method according to claim 1, further comprising: Acquire the local context information and the global context information from a memory module; as well as Based on the input message and the response, the local context information and / or the global context information in the memory module is updated.
7. The method according to claim 1, wherein the response to the input message comprises a reply message provided in a conversation window of the conversation, the reply message comprising text content and at least one music recommendation content. The method of claim 1 , wherein the target model comprises a language model.
9. An apparatus for processing a request, comprising: an input message acquisition module configured to acquire an input message received in a conversation between a user and a virtual object, the virtual object being associated with a target service; an information providing module, configured to provide the input message and context information to the target model, the context information comprising local context information and global context information, the local context information indicating at least one historical message in the session, and the global context information indicating at least one interactive operation of the user with the target service; as well as The response generation module is configured to generate a response to the input message using the target model.
10. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 8 when executed by the at least one processing unit.
11. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 8.
12. 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 8.