Message processing method and device, equipment and storage medium
By transforming and processing multi-channel interaction messages in the bot with a consistent data structure, the problem of inconsistent information presentation and interaction strategies is solved, resulting in a better user interaction experience and scalability of interaction methods.
Patent Information
- Application Number
- CN202411133039.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-18
- Publication Date
- 2024-11-26
AI Technical Summary
Existing robot bots suffer from inconsistencies in information presentation and interaction strategies in multi-channel interactions, especially in complex interaction scenarios where they struggle to handle multimodal messages and multi-turn dialogues.
By acquiring user conversation messages with digital assistants from multiple interaction channels, converting them into messages with a predetermined data structure, and executing tasks based on this structure, consistency and flexibility are ensured across different interaction channels.
It improves the user's interaction experience with digital assistants, enhances the scalability and flexibility of interaction methods, and is able to handle multimodal messages and multi-turn dialogues in complex interaction scenarios.
Smart Images

Figure CN119030946A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for message processing. Background Art
[0002] With the development of machine learning technology, the application of robots (Bots) based on machine learning models has become more and more widespread, and conversations between users and Bots may occur in a variety of scenarios. In addition to work scenarios centered on instant messaging tools, users also hope to integrate Bot's intelligent question-and-answer function into existing business systems (for example, work order Q&A systems, customer relationship management (CRM) systems, etc.). At this time, it is expected that Bots can adapt to different channels without large-scale transformation, while achieving consistency in information presentation and interaction strategies across channels. Summary of the invention
[0003] In a first aspect of the present disclosure, a message processing method is provided. The method comprises: obtaining a first interaction message from a user in a conversation between the user and a digital assistant from a target interaction channel among multiple interaction channels; converting the first interaction message into a second interaction message having a predetermined data structure based on a target data structure corresponding to the target interaction channel; and executing a task indicated by the first interaction message based on the second interaction message.
[0004] In a second aspect of the present disclosure, a device for message processing is provided. The device includes: a message acquisition module configured to acquire a first interaction message from a user in a conversation between the user and a digital assistant from a target interaction channel among multiple interaction channels; a message conversion module configured to convert the first interaction message into a second interaction message having a predetermined data structure based on a target data structure corresponding to the target interaction channel; and a task execution module configured to execute a task indicated by the first interaction message based on the second interaction message.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the electronic device executes the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the medium, and when the computer program is executed by a processor, the method of the first aspect is implemented.
[0007] It should be understood that the content described in this section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent 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:
[0009] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0010] Figure 2 A schematic diagram showing an architecture for processing messages according to some embodiments of the present disclosure;
[0011] Figure 3 A schematic diagram showing multi-round session management according to some embodiments of the present disclosure is shown;
[0012] Figure 4 A flowchart showing a process for message processing according to some embodiments of the present disclosure is shown;
[0013] Figure 5 A schematic structural block diagram of an apparatus for message processing according to some embodiments of the present disclosure is shown; and
[0014] Figure 6 A block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented is shown. DETAILED DESCRIPTION
[0015] 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 accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, 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 only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0016] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "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 also be included below.
[0017] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0018] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0019] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scopes of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and their authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.
[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to software or hardware such as an electronic device, application, server or storage medium that executes the operation of the technical solution of the present disclosure based on the prompt message.
[0021] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, a prompt message is sent to the relevant user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.
[0022] 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 meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0023] As used herein, the term "model" can learn the association 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 technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multi-layer 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.
[0024] Figure 1A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. The environment 100 involves an application creation platform 110 and an application execution platform 140.
[0025] like Figure 1 As shown, the application creation platform 110 can provide a user 105 with an environment for creating and publishing applications. User 105 can be referred to as an application creation user or creator. In some embodiments, the application creation platform 110 can be a low-code platform that provides a collection of tools for application creation. The application creation platform 110 can support visual development of various types of applications, allowing developers to skip the manual coding process and speed up the application development cycle and cost. The application creation platform 110 can support any appropriate platform for users to develop one or more types of applications, and may include, for example, a platform based on Application Platform as a Service (aPaaS). Such a platform can support users to efficiently develop applications and implement operations such as application creation and application function adjustment.
[0026] The application creation platform 110 may be deployed locally on the terminal device of the user 105, and / or may be supported by a server-side device. For example, the terminal device of the user 105 may run a client of the application creation platform 110, which may support the interaction between the user and the application creation platform 110 provided by the server. In the case where the application creation platform 110 runs locally on the user's terminal device, the user 105 may directly interact with the local application creation platform 110 using the terminal device. In the case where the application creation platform 110 runs on the server-side device, the server-side device may provide services to the client running in the terminal device based on the communication connection with the terminal device. The application creation platform 110 may present a corresponding page 130 to the user 105 based on the operation of the user 105, so as to output information related to application creation to the user 105 and / or receive information from the user 105.
[0027] In some embodiments, the application creation platform 110 may be associated with a corresponding database, which stores data or information required for the application creation process supported by the application creation platform 110. For example, the database may store codes and description information corresponding to the various functional modules that constitute the application. The application creation platform 110 may also perform operations such as calling, adding, deleting, and updating the functional modules in the database. The database may also store operations that can be performed on different functional blocks. Exemplarily, in a scenario where an application is to be created, the application creation platform 110 may call the corresponding functional blocks from the database to build the application.
[0028] In an embodiment of the present disclosure, a user 105 can create a target application 120 as needed on an application creation platform 110 and publish the target application 120. The target application 120 can be published to any appropriate application runtime platform 140, as long as the application runtime platform 140 can support the operation of the target application 120. After publishing, the target application 120 can be used to be operated by one or more users 145. The user 145 can be referred to as an end user of the target application 120. In some embodiments, the target application 120 may include or be implemented as a digital assistant 122.
[0029] The digital assistant 122 may be configured to have an intelligent conversation. Figure 1 In the example shown, the digital assistant 122 can be integrated into the target application 120 as a part of the target application 120 to assist in the task processing within the target application 120. In other examples, the digital assistant 122 can be configured as an independently running application, such as a web application or other types of applications. In such an example, the digital assistant 122 and the target application 120 can be regarded as the same application. The digital assistant 122 is provided to assist users with various task processing requirements in different applications and scenarios. During the interaction with the digital assistant 122, the user inputs an interactive message, and the digital assistant 122 provides a reply message in response to the user input. Generally, the digital assistant 122 can support users to input questions in natural language, and perform tasks and provide replies based on the understanding of natural language input and logical reasoning ability.
[0030] In some embodiments, digital assistant 122 can interact with user 145 as a contact. For example, digital assistant 122 can be implemented in an instant messaging (IM) application. Digital assistant 122 can interact with user 145 in a single chat session with user 145. In some embodiments, digital assistant 122 can interact with multiple users in a group chat session including multiple users.
[0031] For each user 145, the client of the application running platform 140 can present an interactive window 142 of the target application 120 or the digital assistant 122 in the client interface, such as a conversation window with the digital assistant 122. The user 145 can enter a conversation message in the conversation window, and the target application 120 can determine the reply message of the digital assistant 122 based on the created configuration information and present it to the user in the interactive window 142. In some embodiments, depending on the configuration of the target application 120, the interactive message with the target application 120 may include a message in a multimodal form, such as a text message (e.g., a natural language text), a voice message, an image message, a video message, and the like.
[0032] Similar to the application creation platform 110, the application operation platform 140 can be deployed locally on the terminal device of each user 145, and / or can be supported by a server-side device. For example, the terminal device of the user 145 can run a client of the application operation platform 140, which can support the interaction between the user and the application operation platform 140 provided by the server. In the case where the application operation platform 140 runs locally on the user's terminal device, the user 145 can directly use the terminal device to interact with the local application operation platform 140. In the case where the application operation platform 140 runs on the server-side device, the server-side device can realize the service supply to the client running in the terminal device based on the communication connection with the terminal device. The application operation platform 140 can present the corresponding application page to the user 145 based on the operation of the user 145, so as to output and / or receive information related to the use of the application to the user 145 and / or from the user 145.
[0033] In some embodiments, the implementation of at least part of the functions of the target application 120 and / or the implementation of at least part of the functions of the digital assistant 122 in the target application 120 can be implemented based on the model. During the creation or operation of the target application 120, one or more models 155, such as the capabilities of the model 155, can be called. In the target application 120, the digital assistant 122 can use the model 155 to understand the user input and provide a reply to the user based on the output of the model 155.
[0034] During the creation process, the application creation platform 110 needs to use the model 155 to determine whether the operation result of the target application 120 meets expectations when testing the target application 120. During the operation process, in response to different operation requests of the user of the target application 120, the application operation platform 140 may need to use the model 155 to determine the response result to the user.
[0035] Although shown as being independent of the application creation platform 110 and the application runtime platform 140, one or more models 155 may run on the application creation platform 110 and / or the application runtime platform 140, or other remote servers. In some embodiments, the model 155 may be a machine learning model, a deep learning model, a learning model, a neural network, etc. In some embodiments, the model may be based on a language model (LM). The language model can have question-answering capabilities by learning from a large amount of corpus. The model 155 may also be based on other appropriate models.
[0036] The application creation platform 110 and / or the application running platform 140 can be run on appropriate electronic devices. The electronic device here can be any type of device with computing capabilities, including terminal devices or server devices. The terminal device can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, gaming devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. The server device can include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like. In some embodiments, the application creation platform 110 and / or the application running platform 140 can be implemented based on cloud services.
[0037] It should be understood that the structure and functionality of environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure. Figure 1 A single user interacting with the application creation platform 110 and a single user interacting with the application execution platform 140 are shown, but in fact multiple users can access the application creation platform 110 to each create a digital assistant, and each digital assistant can be used to interact with multiple users.
[0038] As mentioned above, Bot has certain shortcomings in multi-channel interaction. In addition, Bot interaction mainly relies on a single-round text question-and-answer mode, which has great limitations when dealing with complex interaction scenarios (such as follow-up clarification, visual forms, multi-modal message display, etc.).
[0039] To this end, a scheme for message processing is provided according to an embodiment of the present disclosure. According to various embodiments of the present disclosure, a first interaction message from a user in a conversation between a user and a digital assistant is obtained from a target interaction channel among multiple interaction channels. Based on a target data structure corresponding to the target interaction channel, the first interaction message is converted into a second interaction message having a predetermined data structure. Based on the second interaction message, a task indicated by the first interaction message is executed.
[0040] In various embodiments of the present disclosure, first interaction messages obtained from different interaction channels are converted into second interaction messages with a predetermined data structure, thereby ensuring the consistency of messages transmitted on different interaction channels. In this way, users can interact with digital assistants through different interaction channels, thereby improving the scalability of the interaction mode. As a result, the interaction experience between users and digital assistants can be improved.
[0041] The following further describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. In the following examples, for the sake of discussion, the description is made from the perspective of the application running platform, for example Figure 1 The application execution platform 140 is shown. The page presented by the application execution platform 140 can be presented via the terminal device of the user 145, and the user input can be received via the terminal device of the user 145.
[0042] Figure 2 FIG. 2 is a schematic diagram of an architecture 200 for processing messages according to some embodiments of the present disclosure. Figure 2 As shown, the conversation service module 210 and the function runtime module 220 can be deployed in the application execution platform 140 to respond to the request of the user 145. The function runtime module 220 can implement at least one function of the digital assistant, such as a question-and-answer function, a personalized recommendation function, etc.
[0043] The conversation service module 210 can provide and support different interaction channels between the user and the digital assistant, such as interaction channels 230-1, 230-2, 230-3, which are also collectively or individually referred to as interaction channels 230, which are also collectively or individually referred to as interaction channels 230. It should be understood that Figure 2 The number of interaction channels shown is exemplary only and is not intended to limit the scope of the present disclosure.
[0044] In some embodiments, the digital assistant can be triggered for interaction in multiple interaction channels. These interaction channels have respective message presentation modes and support respective computer languages. For example, these interaction channels may use different message protocols or have customized message formats. In some embodiments, the message presentation modes of each of these interaction channels may be based on the respective conversational user interface (CUI) capabilities of these interaction channels.
[0045] The interaction channel may refer to the interaction form, interaction mode, and interaction interface between the user and the digital assistant. For example, the interaction channel may be an interaction via an instant messaging (IM) application or component. In this interaction, the interaction messages between the user and the digital assistant are usually presented in the form of messages. As another example, the interaction channel may be an interaction via a web interface, in which the interaction messages between the user and the digital assistant may be presented in the form of rich media. As another example, for interactions via IM applications or components, there may also be different interaction channels, for example, one interaction channel supports text-type interaction messages, while another channel may indicate messages in the form of cards. Messages in the form of cards can not only display text, but also other forms of content, such as charts, forms, and the like.
[0046] In the interaction between the user and the digital assistant, the application running platform 140 can obtain the first interaction message from the user in the conversation between the user and the digital assistant from the target interaction channel in the multiple interaction channels 230. For example, the first interaction message can come from the conversation window of the IM application.
[0047] In some embodiments, the plurality of interaction channels 230 may include a conversational application in which a digital assistant is deployed. The digital assistant may be directly published in the conversational application to implement the digital assistant function. For example, a user may send an interaction message to the digital assistant through a conversation window associated with the digital assistant in the conversational application. It should be understood that a conversational application may be an application including a conversational function, and such an application may also provide other functions or business components, such as mail, calendar, document, etc.
[0048] Alternatively or additionally, the plurality of interaction channels 230 may include a web application embedded with a digital assistant. In one example, a software development kit (SDK) related to the digital assistant may be provided to the web application, and the web application may then implement the digital assistant functionality by integrating the SDK. The SDK includes a precompiled code library, documentation, sample code, and tools, and providing the SDK to the web application may improve development efficiency and implement functional expansion of the web application.
[0049] Alternatively or additionally, the plurality of interaction channels 230 may include an application programming interface (API) for interfacing with the digital assistant. In one example, the third-party application may send an interaction message to the digital assistant by calling the API. For example, a user may enter an interaction message in an input window of the third-party application, and then the third-party application may send the interaction message to the digital assistant by calling the application programming interface.
[0050] After obtaining the first interaction message, based on the target data structure corresponding to the target interaction channel, the application running platform 140 can convert the first interaction message into a second interaction message with a predetermined data structure. Since the target interaction channel and the application running platform 140 may use different programming languages, frameworks or platforms, and they each support different data formats, it is necessary to convert the interaction messages obtained from different interaction channels into interaction messages with a predetermined data structure, so that the application running platform 140 can process the interaction messages with the predetermined data structure. Exemplarily, such a predetermined data structure can be defined by a structured message protocol to be compatible with the parsing and adaptation capabilities of multiple channels at the same time. In addition, the protocol should have good scalability so that future functions and requirements can be seamlessly integrated. The protocol ensures that the messages generated by the digital assistant on different channels are consistent and unambiguous.
[0051] In some embodiments, the target data structure may include a standardized data structure used by the target interaction channel. A standardized data structure means that any interaction channel can use the same standardized data structure to communicate with the digital assistant. In one example, the standardized data structure may include a data structure specified in an application programming interface.
[0052] Alternatively or additionally, the target data structure may include a data structure specific to the target interaction channel. For different interaction channels, it is necessary to consider the characteristics of different interaction channels, so the data structures specific to different interaction channels are different. For example, the first interaction channel is a conversational application, and the second interaction channel is a web application. Since the first interaction channel and the second interaction channel are different in terms of functional characteristics, implementation methods, etc., the data structure specific to the first interaction channel is different from the data structure specific to the second interaction channel. For another example, the interaction channel may use a custom protocol or data format.
[0053] After obtaining the second interaction message with a predetermined data structure, the application execution platform 140 may execute the task indicated by the first interaction message based on the second interaction message. In one example, the application execution platform 140 may send the processing result obtained by executing the task to the corresponding interaction channel.
[0054] In some embodiments, in response to the existence of at least one first historical interaction message from the target interaction channel before the first interaction message is obtained, the application running platform 140 can determine at least one second historical interaction message having a predetermined data structure. The at least one second historical interaction message is obtained by performing data structure conversion on at least one first historical interaction message. The first historical interaction message has a target data structure, and the second historical interaction message has a predetermined data structure. If there is at least one first historical interaction message before the first interaction message, it means that the application running platform 140 needs to manage multiple rounds of conversations. In one example, the application running platform 140 can extract at least one second historical interaction message from the historical message stream.
[0055] In some embodiments, the second interaction message and at least one second historical interaction message may be input into the function runtime module 120 to perform task processing according to the multi-round dialogue. Figure 3 Schematic diagram 300 of performing multi-round session management according to some embodiments of the present disclosure is shown. Figure 3 As shown, the historical messages 310 and 315 that occurred before the current message 305 (as an example of the second interactive message) can be placed in the input message 320 so that the function runtime module 120 performs task processing based on the input message 320. The historical messages 310 and 315 are stored in the chat history 325.
[0056] After obtaining at least one second historical interaction message, the application running platform 140 can perform the task based on the second interaction message and the at least one second historical interaction message. In this way, the digital assistant can understand the complex needs of the user, thereby providing more accurate and comprehensive answers, and can adjust subsequent questions or suggestions based on the user's answers and feedback, thereby providing a more personalized experience.
[0057] In some embodiments, the application running platform 140 may determine a predetermined number of message rounds indicating semantic information that carries multiple rounds of conversations. For example, if the predetermined number of message rounds is 10 rounds, it means that these 10 rounds of conversations carry semantic information, that is, the influence of historical messages can be considered in these 10 rounds of conversations. After determining the predetermined number of message rounds, the application running platform 140 may obtain at least one second historical interaction message from the stored historical interaction messages based on the predetermined number of message rounds, and the number of at least one second historical interaction message is related to the predetermined number of message rounds. In one example, the number of at least one second historical interaction message is positively correlated with the predetermined number of message rounds, and the more predetermined message rounds there are, the more the number of at least one second historical interaction message is. For example, if the current conversation is the 15th round of conversation, the 10 rounds of conversations before the 15th round of conversation can be obtained as at least one second historical interaction message.
[0058] In some embodiments, based on the execution result of the task, a third interactive message having a predetermined data structure may be generated as a response to the first interactive message. Since the task is executed in the application runtime platform 140, a response message (i.e., a third interactive message) having a predetermined data structure may be generated. After obtaining the third interactive message, the application runtime platform 140 may convert the third interactive message into a fourth interactive message having a target data structure. Since the target interactive channel supports the target data structure, the data structure of the response message needs to be converted to obtain a fourth interactive message having a target data structure. Afterwards, the application runtime platform 140 may provide the fourth interactive message to the target interactive channel, thereby providing a response to the user.
[0059] In some embodiments, the application execution platform 140 may determine a processing mode for a predetermined type of content included in the first interactive message. Exemplarily, the processing mode may include extracting pictures, processing quoted messages, processing information of mentioned people, or processing and converting data in a chart (e.g., filtering and sorting, row and column conversion, etc.).
[0060] After determining the processing mode, the application running platform 140 can process the predetermined type of content in the second interactive message based on the determined processing mode and the predetermined data structure to perform the task. In the scenario of multiple rounds of dialogue, the application running platform 140 can place the results obtained from executing each round of tasks in the prompt information of the machine learning model used by the digital assistant, so that the machine learning model can fully consider the context information and ensure accurate understanding of the user's intention.
[0061] In some embodiments, the predetermined type of content includes at least one of: an image, a quoted message, information about a person mentioned, or a chart. In one example, the quoted message may include a message quoted by a uniform resource locator (URL). In one example, information about a person mentioned may include information about a person mentioned using the “@” symbol. In this way, effective clarification, selection, and correction are performed in multiple rounds of dialogue to ensure accurate understanding of the user's intentions.
[0062] In some embodiments, after obtaining the second interaction message, the application runtime platform 140 can route the second interaction message to the corresponding service module according to the service type requested by the first interaction message. In one example, the digital assistant can provide different types of services, and the service modules corresponding to these services can be deployed separately. For example, the service requested by the first interaction message is a question-and-answer service, so the application runtime platform 140 can route the second interaction message to the question-and-answer service module corresponding to the question-and-answer service. In this way, the interaction channel does not need to consider the deployment locations of different service modules, and can obtain the corresponding service response by sending a unified service request, thereby decoupling the interaction channel from the services provided by the digital assistant and improving the flexibility of user interaction with the digital assistant.
[0063] Figure 4 FIG. 4 is a flowchart of a process 400 for message processing according to some embodiments of the present disclosure. The process 400 may be implemented at the application execution platform 140. Figure 4 Process 400 is described.
[0064] In box 410, the application execution platform 140 obtains a first interaction message from a user in a conversation between the user and the digital assistant from a target interaction channel among multiple interaction channels.
[0065] In block 420 , the application execution platform 140 converts the first interaction message into a second interaction message having a predetermined data structure based on a target data structure corresponding to a target interaction channel.
[0066] In block 430 , the application execution platform 140 executes the task indicated by the first interaction message based on the second interaction message.
[0067] In some embodiments, process 400 also includes: generating a third interaction message having a predetermined data structure based on the execution result of the task as a response to the first interaction message; converting the third interaction message into a fourth interaction message having a target data structure; and providing the fourth interaction message to the target interaction channel.
[0068] In some embodiments, executing a task includes: in response to the existence of at least one first historical interaction message from a target interaction channel before obtaining a first interaction message, determining at least one second historical interaction message having a predetermined data structure, the at least one second historical interaction message being obtained by performing a data structure conversion on the at least one first historical interaction message, wherein the first historical interaction message has a target data structure and the second historical interaction message has a predetermined data structure; and executing the task based on the second interaction message and the at least one second historical interaction message.
[0069] In some embodiments, process 400 also includes: determining a predetermined number of message rounds indicating semantic information carrying multiple rounds of conversations; and based on the predetermined number of message rounds, obtaining at least one second historical interaction message from the stored historical interaction messages, wherein the number of at least one second historical interaction message is related to the predetermined number of message rounds.
[0070] In some embodiments, process 400 also includes: determining a processing mode for a predetermined type of content included in the first interaction message; and processing the predetermined type of content in the second interaction message based on the determined processing mode and a predetermined data structure for performing a task.
[0071] In some embodiments, the predetermined type of content includes at least one of: an image, a quoted message, information about a person mentioned, or a chart.
[0072] In some embodiments, the target data structure comprises a standardized data structure used by the target interaction channel or a data structure specific to the target interaction channel.
[0073] In some embodiments, the multiple interaction channels include at least two of the following: a conversational application deployed with a digital assistant, a web application embedded with a digital assistant, or an application programming interface for interfacing with a digital assistant.
[0074] Figure 5 A schematic structural block diagram of an apparatus 500 for message processing according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented in or included in the application execution platform 140, for example. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.
[0075] As shown in the figure, the device 500 includes a message acquisition module 510, which is configured to acquire a first interaction message from a user in a conversation between the user and the digital assistant from a target interaction channel among multiple interaction channels.
[0076] The apparatus 500 further includes a message conversion module 520 configured to convert the first interaction message into a second interaction message having a predetermined data structure based on a target data structure corresponding to a target interaction channel. The apparatus 500 further includes a task execution module 530 configured to execute the task indicated by the first interaction message based on the second interaction message.
[0077] In some embodiments, the device 500 also includes a service response module 530, which is configured to generate a third interaction message having a predetermined data structure based on the execution result of the task as a response to the first interaction message; convert the third interaction message into a fourth interaction message having a target data structure; and provide the fourth interaction message to the target interaction channel.
[0078] In some embodiments, the task execution module 530 is further configured to determine, in response to the presence of at least one first historical interaction message from the target interaction channel before the first interaction message is acquired, at least one second historical interaction message having a predetermined data structure, wherein the at least one second historical interaction message is obtained by performing data structure conversion on at least one first historical interaction message, wherein the first historical interaction message has the target data structure and the second historical interaction message has the predetermined data structure; and execute the task based on the second interaction message and the at least one second historical interaction message.
[0079] In some embodiments, the device 500 also includes a second task processing module, which is configured to determine a processing mode for a predetermined type of content included in the first interaction message; and based on the determined processing mode and a predetermined data structure, process the predetermined type of content in the second interaction message for performing a task.
[0080] In some embodiments, the device 500 also includes a second historical interaction message acquisition module, which is configured to determine a predetermined number of message rounds indicating semantic information carrying multiple rounds of conversations; and based on the predetermined number of message rounds, obtain at least one second historical interaction message from the stored historical interaction messages, wherein the number of at least one second historical interaction message is related to the predetermined number of message rounds.
[0081] In some embodiments, the predetermined type of content includes at least one of: an image, a quoted message, information about a person mentioned, or a chart.
[0082] In some embodiments, the target data structure comprises a standardized data structure used by the target interaction channel or a data structure specific to the target interaction channel.
[0083] In some embodiments, the multiple interaction channels include at least two of the following: a conversational application deployed with a digital assistant, a web application embedded with a digital assistant, or an application programming interface for interfacing with a digital assistant.
[0084] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown may include or be implemented as Figure 1 application execution platform 140, or Figure 5 Device 500.
[0085] like Figure 6 As shown, the electronic device 600 is in the form of a general electronic device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 600.
[0086] The electronic device 600 typically includes a plurality of computer storage media. Such media may be any accessible media that is accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 may be a volatile memory (e.g., registers, caches, 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 630 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data and may be accessed within the electronic device 600.
[0087] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0088] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 600 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.
[0089] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 600, or communicate with any device that allows the electronic device 600 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).
[0090] 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.
[0091] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0092] 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, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0093] 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, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0094] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square 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.
[0095] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A message processing method, include: Acquire, from a target interaction channel among the multiple interaction channels, a first interaction message from the user in a conversation between the user and the digital assistant; Based on a target data structure corresponding to the target interaction channel, converting the first interaction message into a second interaction message having a predetermined data structure; as well as Based on the second interaction message, execute the task indicated by the first interaction message.
2. The method according to claim 1, further comprising: include: Based on the execution result of the task, generating a third interaction message having the predetermined data structure as a response to the first interaction message; converting the third interaction message into a fourth interaction message having the target data structure; as well as The fourth interaction message is provided to the target interaction channel.
3. The method according to claim 1, wherein performing the task include: In response to at least one first historical interaction message from the target interaction channel existing before the first interaction message is acquired, determining at least one second historical interaction message having the predetermined data structure, wherein the at least one second historical interaction message is obtained by performing data structure conversion on the at least one first historical interaction message, wherein the first historical interaction message has the target data structure, and the second historical interaction message has the predetermined data structure; and The task is performed based on the second interaction message and the at least one second historical interaction message.
4. The method according to claim 3, further comprising: include: Determining a predetermined number of message rounds indicating semantic information carrying a multi-round conversation; as well as Based on the predetermined message round number, the at least one second historical interaction message is obtained from the stored historical interaction messages, wherein the number of the at least one second historical interaction message is related to the predetermined message round number.
5. The method according to claim 1, further comprising: include: determining a processing mode for a predetermined type of content included in the first interaction message; as well as Based on the determined processing mode and the predetermined data structure, the predetermined type of content in the second interaction message is processed to perform the task.
6. The method according to claim 5, wherein the predetermined type of content comprises at least one of: image, Quote message, Mentioned person information, or chart. 7 . The method of claim 1 , wherein the target data structure comprises a standardized data structure used by the target interaction channel or a data structure specific to the target interaction channel.
8. The method according to claim 1, wherein the plurality of interaction channels comprises at least two of the following: a conversational application in which the digital assistant is deployed, A web application in which the digital assistant is embedded, or An application programming interface for interfacing with the digital assistant.
9. A message processing device, include: A message acquisition module, configured to acquire a first interaction message from a user in a conversation between the user and the digital assistant from a target interaction channel among the multiple interaction channels; a message conversion module, configured to convert the first interaction message into a second interaction message having a predetermined data structure based on a target data structure corresponding to the target interaction channel; as well as The task execution module is configured to execute the task indicated by the first interaction message based on the second interaction message.
10. An electronic device, include: 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.
Citation Information
Patent Citations
Interactive content generation method and device, computer equipment and storage medium
CN109857848A
Message processing method and device
CN115412523A
