Information processing method, system, equipment and medium
Through message transmission between the first server and the external server of the digital assistant, the client supports the realization of human-computer dialogue under the task theme created by the external server, solving the problem of insufficient flexibility of user human-computer interaction in the prior art.
Patent Information
- Application Number
- CN202311559410.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-05-23
AI Technical Summary
Existing digital assistants have poor user flexibility in human-computer interaction, which is difficult to meet the diverse human-computer interaction needs of users.
The first server of the digital assistant responds to the trigger request under the task topic created by the client on the external server, and generates and transmits messages to realize human-computer dialogue. The specific steps include generating a message, sending a message to an external server, and receiving and forwarding a reply message to the client.
It realizes that the digital assistant client conducts human-computer dialogue under the task theme created by the external server, meeting the diverse human-computer interaction needs of users.
Smart Images

Figure CN120030107A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information processing method, system, electronic device, and computer-readable storage medium. Background Art
[0002] With the rapid development of computer technology, digital assistants have emerged. Digital assistants usually have natural language processing capabilities, and users can interact with digital assistants through human-computer dialogue.
[0003] Specifically, the user can send request information through the digital assistant's client, and the digital assistant's server processes the request information, generates reply information, and returns the reply information to the digital assistant's client, thereby realizing human-computer dialogue.
[0004] However, in the related art, the interaction flexibility between users and digital assistants is relatively poor, and digital assistants find it difficult to meet users' diverse human-computer interaction needs. Summary of the invention
[0005] The present application provides an information processing method. The method supports the client to implement human-computer dialogue under the task theme created by the external server, meeting the diverse human-computer dialogue needs of users. The present application also provides a system, electronic device, computer-readable storage medium and computer program product corresponding to the above method.
[0006] In a first aspect, the present application provides an information processing method, which is applied to a first server of a digital assistant, and the method comprises:
[0007] In response to a trigger request from a client of the digital assistant under a first task topic, generating a first message based on information indicated by the trigger request;
[0008] Sending the first message to a second server, so that the second server processes the trigger request under the first task theme, the second server being the creator of the first task theme;
[0009] Receive the second message returned by the second server, and send the second message to the client of the digital assistant.
[0010] In a second aspect, the present application provides an information processing system, the system comprising:
[0011] A generating module, configured to generate a first message in response to a trigger request of a client of the digital assistant under a first task theme and based on information indicated by the trigger request;
[0012] A communication module, used for sending the first message to a second server, so that the second server processes the trigger request under the first task theme, and the second server is the creator of the first task theme;
[0013] The communication module is also used to receive a second message returned by the second server and send the second message to the client of the digital assistant.
[0014] In a third aspect, the present application provides an electronic device, the electronic device comprising a processor and a memory. The processor and the memory communicate with each other. The processor is used to execute instructions stored in the memory, so that the electronic device performs the information processing method in the first aspect or any implementation of the first aspect.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, wherein the instructions instruct an electronic device to execute the information processing method described in the first aspect or any one of the implementations of the first aspect.
[0016] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the information processing method described in the first aspect or any one of the implementations of the first aspect.
[0017] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations.
[0018] It can be seen from the above technical solutions that this application has the following advantages:
[0019] The present application provides an information processing method, which is applied to the first server of a digital assistant. Specifically, the first server of the digital assistant responds to the trigger request of the client of the digital assistant under the first task topic, generates a first message based on the information indicated by the trigger request, and then, the first server of the digital assistant sends the first message to the second server, so that the second server processes the trigger request under the first task topic, wherein the second server is the creator of the first task topic, the first server receives the second message returned by the second server, and sends the second message to the client of the digital assistant.
[0020] In this method, the first server of the digital assistant provides a human-computer dialogue service, and the user triggers a request related to the human-computer dialogue under the task theme created by the second server (i.e., the external server). The first message generated by the first server of the digital assistant can be parsed by the second server, and the second server can process the trigger request and generate a second message, thereby realizing the human-computer dialogue. In this way, by generating the first message through the information indicated by different trigger requests, the message transmission between the client of the digital assistant, the first server of the digital assistant and the external server can be realized, and the client of the digital assistant is supported to realize the human-computer dialogue under the task theme created by the external server, so as to meet the diverse human-computer dialogue needs of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical method of the embodiments of the present application, the drawings required for use in the embodiments are briefly introduced below.
[0022] Figure 1 A schematic diagram of a task subject provided in an embodiment of the present application;
[0023] Figure 2 A schematic diagram of a conversation under a task theme provided in an embodiment of the present application;
[0024] Figure 3 A schematic diagram of the architecture of an information processing system provided in an embodiment of the present application;
[0025] Figure 4 A flowchart of an information processing method provided in an embodiment of the present application;
[0026] Figure 5 A schematic diagram of the structure of an information processing system provided in an embodiment of the present application;
[0027] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0029] First, some technical terms involved in the embodiments of the present application are introduced.
[0030] Digital assistants, also known as conversational robots or chatbots, usually have natural language processing capabilities, and users can interact with digital assistants through human-computer dialogue.
[0031] In this application, the concept of task theme is proposed. Task theme, also known as dialogue scenario, can be understood as the theme of the human-computer dialogue between the user and the digital assistant. The digital assistant can provide multiple task themes, and the user can select a task theme according to actual needs and start a dialogue under the task theme. The above-mentioned human-computer dialogue under a specific task theme is also called a scenario dialogue.
[0032] A task theme is configured with corresponding configuration information to perform tasks of corresponding types. The configuration information may include at least one of the following: task theme setting information and plug-in information. The task theme setting information is used to describe information related to the corresponding task theme, and the plug-in information indicates at least one plug-in used to perform tasks under the corresponding task theme.
[0033] In some embodiments, the task theme setting information can be used to construct a prompt input (prompt) to be provided to the language model used under the corresponding task theme, and the reply information for the user can be determined based on the output of the language model. The task theme setting information can include at least one of the following: a description of the corresponding type of task, a digital assistant reply style under the task theme, a definition of the workflow to be executed under the corresponding task theme, or a definition of the digital assistant reply format under the corresponding task theme.
[0034] In other embodiments, the configuration information of a task theme may include, in addition to task theme setting information and plug-in information, at least one of the following: an indication of a selected language model, which is called to determine a reply to the user under the corresponding task theme; task theme guidance information, which is presented to the user after the corresponding task theme is selected; and at least one recommended question for the digital assistant, which is presented to the user for selection after the corresponding task theme is selected.
[0035] In response to receiving a selection operation for a first task theme among at least one task theme, the user and the digital assistant can be interacted with based on the configuration information of the first task theme in the interaction page between the user and the digital assistant to implement the selection of the task theme (also referred to as scenario selection). For example, when the user wants to schedule a schedule through the digital assistant, the user can select "schedule theme". For another example, when the user wants to summarize the content of a document through the digital assistant, the user can select "document theme".
[0036] The digital assistant may handle conversations opened by users under different task themes differently. Specifically, the prompt information (prompt) in the language model used by the digital assistant may be different for conversations opened by users under different task themes, and the prompt information may include descriptive information related to the task theme. For example, when the task theme is "schedule theme", the prompt information may include descriptive information related to the schedule (such as function description information and parameter description information related to the schedule).
[0037] In addition, for the conversations opened by the user under different task themes, the processing tools (i.e., plug-ins) called by the digital assistant may also be at least partially different, and the processing tools may include tools related to the task theme. For example, when the task theme is "schedule theme", the processing tool called by the digital assistant may be a schedule plug-in. For another example, when the task theme is "document theme", the processing tool called by the digital assistant may be a document plug-in.
[0038] After the user selects the first task theme, the first task theme can be opened in the interaction page with the digital assistant. For example, the interaction page can present a dividing line between the first task theme and the previous task theme, and in response to the user performing the interaction with the digital assistant in the first task theme, the logo of the first task theme is presented at the associated area of the dividing line, thereby achieving the distinction between different task themes (also called different scenarios).
[0039] In the related art, before starting a conversation with a digital assistant, the user needs to select a processing tool (i.e., a plug-in) by themselves. However, the above method requires the user to have a certain understanding of different plug-ins, which is prone to errors. In the conversation under the task theme, by configuring the plug-in information in the task theme, the user's entry threshold for using the digital assistant is lowered and the user's operation is simplified.
[0040] Through the user's selection of task topics, the digital assistant can process natural language tasks in a targeted manner under the task topic selected by the user, thereby improving the accuracy of the digital assistant's responses. However, the topics provided by the digital assistant can only be configured by the digital assistant's developers, which makes it difficult to meet the user's diverse human-computer dialogue needs.
[0041] In view of this, the present application provides an information processing method. The method is applied to the first server of the digital assistant. Specifically, the first server of the digital assistant responds to the trigger request of the client of the digital assistant under the first task topic, generates a first message based on the information indicated by the trigger request, and then, the first server of the digital assistant sends the first message to the second server, so that the second server processes the trigger request under the first task topic, wherein the second server is the creator of the first task topic, the first server receives the second message returned by the second server, and sends the second message to the client of the digital assistant.
[0042] In this method, the first server of the digital assistant provides a human-computer dialogue service, and the user triggers a request related to the human-computer dialogue under the task theme created by the second server (i.e., the external server). The first message generated by the first server of the digital assistant can be parsed by the second server, and the second server can process the trigger request and generate a second message, thereby realizing the human-computer dialogue. In this way, by generating the first message through the information indicated by different trigger requests, the message transmission between the client of the digital assistant, the first server of the digital assistant and the external server can be realized, and the client of the digital assistant is supported to realize the human-computer dialogue under the task theme created by the external server, so as to meet the diverse human-computer dialogue needs of users.
[0043] To facilitate understanding of the technical solution provided by the embodiments of the present application, it will be described below with reference to the accompanying drawings.
[0044] See also Figure 1 In the schematic diagram of a task theme shown in FIG. 1 , the second server can manage the first task theme, for example, the second server can create the first task theme, update the first task theme, or deactivate the first task theme. Specifically, the second server can manage the content of the first task theme, such as the theme name, theme icon, opening remarks, and guide words.
[0045] The second server can implement natural language processing using capability sets from different sources, where the capability set may include a variety of capabilities related to natural language processing. In some possible implementations, the low-code development platform (application platform as a service, aPaaS) provides a capability set related to natural language processing, and the second server can create the first task topic using the capability set provided by aPaaS. In other possible implementations, the second server itself has a capability set related to natural language processing, and the second server can create the first task topic using its own capability set.
[0046] After the second server creates the first task theme, the client of the digital assistant can discover, add or delete the first task theme. Among them, discovering the first task theme can be understood as presenting the first task theme in a task theme page (for example, a page in a task theme store), and by presenting the first task theme, the user can understand the existence of the first task theme. Adding the first task theme can be understood as adding the first task theme as a theme of the client of the digital assistant, so that the user can conduct human-computer dialogue under the first task theme. Deleting the first task theme can be understood as deleting the first task theme from the theme of the client of the digital assistant.
[0047] Furthermore, the first task theme may have visibility of different dimensions. For example, the first task theme may have tenant visibility. In other words, the first task theme may be presented in the clients of some tenants (i.e., visible to the clients of some tenants), but not presented in the clients of other tenants (i.e., invisible to the clients of other tenants). In the process of creating the first task theme, the second server may limit the scope of use of the first task theme by configuring tenant visibility. For another example, the first task theme may have sharing visibility. In other words, some clients may share the first task theme externally, while other clients may not share the first task theme externally. In the process of creating the first task theme, the second server may enhance the privacy and security of the first task theme by configuring sharing visibility.
[0048] See also Figure 2 A schematic diagram of a conversation under a task theme is shown, and operations related to the first task theme may include task theme creation, task theme update, task theme deletion, task theme pull, and task theme sharing. For example, the second server can create a task theme (including the creation of an opening statement and a guide), update a task theme (including an update of visibility), and delete a task theme, and the client of the digital assistant can pull a task theme and share a task theme.
[0049] During the human-computer dialogue under the first task theme, the digital assistant's client can generate multiple trigger requests such as dialogue start, message sending, message regeneration, and message stop generation. The second server can process the trigger requests generated by the client and generate messages for reply, thereby realizing human-computer dialogue.
[0050] See also Figure 3 The schematic diagram of the architecture of an information processing system shown in the figure includes a client of a digital assistant, a first server of the digital assistant, and a second server. Among them, the second server is the creator of the first task theme. Specifically, the client of the digital assistant can trigger a request related to human-computer dialogue under the first task theme, and the trigger request can be sent to the first server through the first gateway.
[0051] In some embodiments, the first server includes a message service and a message processing device. Among them, the message service is used to manage messages. For example, the message service can manage messages generated during the human-computer dialogue between the digital assistant's client and the first server. For another example, the message service can manage messages generated by other servers (such as instant messaging servers) in the same system (such as a business platform) as the first server. The message service receives the trigger request and sends the trigger request to the message processing device, so that the message processing device can generate a first message based on the information indicated by the trigger request.
[0052] The message processing device can send the first information to the second server, the second server processes the trigger request under the first task topic, generates a second message, and sends the second message to the first server through the second gateway, so that the first server can send the second message to the client to realize human-computer dialogue.
[0053] See also Figure 4 The flowchart of an information processing method provided by an embodiment of the present application is shown, and the method can be applied to a first server of a digital assistant, and the method specifically includes:
[0054] S401: In response to a trigger request from a client under a first task topic, a first message is generated based on information indicated by the trigger request.
[0055] In an embodiment of the present application, the first server performs human-computer dialogue with a client of the digital assistant, and therefore, the first server can be understood as the server of the digital assistant.
[0056] The first server provides a variety of task themes, and the user can select from a variety of task themes according to actual needs, so as to conduct a human-computer dialogue under the selected task theme. In the embodiment of the present application, the task theme selected by the user is the first task theme, and the first task theme is created by the second server, that is, the second server is the creator of the first task theme.
[0057] Since the second server is different from the first server, the second server may also be referred to as an external server or a third-party server. In other words, the first task theme is a task theme created by the external server.
[0058] The second server can create a task subject by calling an interface. In specific implementation, the first server of the digital assistant responds to the call request of the second server for the second interface (application programming interface, API), receives the creation parameters sent by the second server through the second interface, and then the first server creates the first task subject according to the creation parameters.
[0059] The second interface may be an interface provided by the first server, and the second server may call the second interface, and transmit the creation parameters through the second interface according to the protocol configured by the second interface, so that the first server may create the first task theme according to the creation parameters. In this way, by providing the second interface by the first server, the external server is supported to create the task theme in the first server, and the types of task themes in the first server can be enriched.
[0060] The trigger request of the digital assistant client under the first task theme can be understood as a request related to the first task theme triggered by the digital assistant client, and the trigger request can indicate the trigger type. For example, when the trigger request is for the digital assistant client to open the first task theme, the trigger type can be dialogue opening. For another example, when the trigger request is for the digital assistant client to send a third message, the trigger type can be message sending. For another example, when the trigger request is for the digital assistant client to trigger the regeneration of controls, the trigger type can be message regeneration. For another example, when the trigger request is for the digital assistant client to trigger the stop generation of controls, the trigger type can be message stop generation.
[0061] In the embodiment of the present application, different trigger types may correspond to different templates. The template (also referred to as a structure) may include multiple fields related to the trigger type, which represent the content that needs to be delivered to the second server under the trigger type. In addition, the second server also stores templates corresponding to different trigger types.
[0062] The first server can determine the trigger type indicated by the trigger request according to the trigger request, and process the trigger request based on the template corresponding to the trigger type to generate the first message. In specific implementation, the first server can parse the trigger request, extract parameter information from the trigger request, for example, extract field values corresponding to multiple fields in the template related to the trigger type, and fill them into the template, thereby generating the first message.
[0063] Since the first message is generated based on the template of the trigger type indicated by the trigger request, the first message can also be referred to as the event corresponding to the trigger request. The first message under different trigger requests will be described below.
[0064] In some embodiments, the trigger request is for the client to open the first task topic. The first server generates a first message based on information indicated by the opening request in response to the opening request for the first task topic.
[0065] Among them, the opening request for the first task theme can be understood as a request for the digital assistant client to enter the dialogue page of the first task theme. Considering that when the trigger request opens the first task theme for the client, the second server can send pre-configured content such as opening remarks and guides to the client to enable the user to understand the first task theme and facilitate the user to better conduct human-computer dialogue under the first task theme, therefore, the first server can generate a first message for the trigger request, wherein the first message includes fields related to the first task theme.
[0066] It is understandable that the second server needs to send the corresponding pre-configured content according to the task topic currently entered by the client. Therefore, the first message sent by the first server to the second server may include a field related to the first task topic.
[0067] The following will be described with reference to specific examples. In some possible implementations, the template of the trigger type of the start request indication is:
[0068]
[0069]
[0070] Among them, SceneID is a field related to the first task theme, which indicates the identifier of the first task theme. Furthermore, the first message may also include a field "Sender" for indicating the sender of the trigger request, a field "SessionID" for indicating the current session identifier, and a field "VerifyToken" for message verification.
[0071] In some embodiments, the trigger request is to send a third message to the client of the digital assistant. The first server obtains the third message sent by the client of the digital assistant in response to the message sending request under the first task topic, and then the first server can generate the first message based on the third message and the information indicated by the message sending request.
[0072] Among them, the message sending request under the first task theme can be understood as a request for the digital assistant's client to send natural language content, and the natural language content can be input by the user through the digital assistant's client. Considering that when the trigger request is for the client to send a third message, the second server can send the reply content of the third message to the client to complete a round of dialogue, therefore, the first server can generate a first message for the trigger request, wherein the first message includes fields related to the first task theme and fields related to the third message, and the message structure indicated by the fields related to the third message is consistent with the message structure of the second server.
[0073] It is understandable that the second server needs to send the reply content of the third message according to the task topic currently entered by the client and the third message sent by the client. Therefore, the first message sent by the first server to the second server may include fields related to the first task topic and fields related to the third message. Furthermore, in the first message sent to the second server, the third message sent by the client is stored in the message structure of the second server, so that the second server can extract the content of the third message by parsing the first message, so as to realize the human-computer dialogue later.
[0074] The following will be described with reference to specific examples. In some possible implementations, the template of the trigger type indicated by the message sending request is:
[0075]
[0076]
[0077] Among them, SceneID is a field related to the first task theme, which indicates the identifier of the first task theme, and Message is a field related to the third message, and the message structure indicated by this field is consistent with the message structure of the second server. Furthermore, the first message may also include a field "Sender" for indicating the sender of the trigger request, a field "SessionID" for indicating the current session identifier, and a field "VerifyToken" for message verification.
[0078] Similarly, the trigger request can also trigger the regeneration of controls for the client of the digital assistant, or trigger the stop generation of controls for the client of the digital assistant. The first server can generate a first message based on the information indicated by the message regeneration request, or based on the information indicated by the message stop generation request, so that the second server can process different events under the first task topic.
[0079] In addition, in some embodiments, the client of the digital assistant can also actively subscribe to the first task topic. After the client actively subscribes to the first task topic, the second server can actively send a message to the client without the client sending the third message. At this time, the trigger request can set the sending time for the client to arrive, and the first server can generate the first message based on the information indicated by the message active sending request.
[0080] In some embodiments, considering that the trigger request of the client is to be processed by the second server, in order to ensure the security of message transmission, the first server can perform message verification. In specific implementation, the first server responds to the trigger request of the digital assistant client under the first task topic, generates a first verification token corresponding to the trigger request, and then generates a first message based on the first verification token and the template of the trigger type indicated by the trigger request.
[0081] By carrying the first verification token (i.e., the "VerifyToken" field mentioned above) in the first message generated by the first server, message verification can be performed when the second message returned by the second server is subsequently received. The first verification token can be generated by a unique generator to ensure the uniqueness of the first verification token. After generating the first verification token, the first server can bind the first verification token to information related to the trigger request, such as binding the first verification token to one or more of the task subject identifier (i.e., the first task subject), the trigger type, the trigger request, the current session identifier, and the creator of the task subject (i.e., the second server). In this way, in the subsequent message verification process, the verification token can be used as an index to find information related to the trigger request, and then verification can be performed.
[0082] S402: Send the first message to the second server, so that the second server processes the trigger request under the first task theme.
[0083] Since the first task topic is created by the second server, the second server needs to process the trigger request under the first task topic to generate a second message.
[0084] Specifically, when the trigger request of the digital assistant client under the first task theme is an opening request for the first task theme, the second message may include content pre-configured by the second server. For example, the pre-configured content may be a welcome message, an introductory message, or an opening statement. In this way, when the digital assistant client opens the first task theme, a welcome message, an introductory message, or an opening statement may be presented to the user.
[0085] When the trigger request of the digital assistant client under the first task theme is a message sending request, the second message may include the reply content to the third message sent by the digital assistant client. In this way, when the user sends natural language content under the first task theme, the reply content of the natural language content may be presented to the user to realize human-computer dialogue.
[0086] The second server can process the third message with the help of the language model. In specific implementation, the second server can determine the third message sent by the digital assistant client based on the first message, and then call the language model corresponding to the first task topic to enable the language model to process the third message and return the reply content for the third message. The second server generates the second message based on the reply content.
[0087] Among them, the language model usually has natural language processing capabilities and can process natural language tasks. For example, the language model can be a deep learning model trained using text data. The language model corresponding to the first task theme can be understood as a language model that can be used to process the trigger request under the first task theme, for example, a language model that includes descriptive information related to the first task theme in the prompt information.
[0088] Since the message structure of the third message stored in the first message is the same as the message structure of the second server, the second server can extract the third message from the first message, and use the language model to perform natural language processing on the third message, identify the intention expressed by the third message, and then generate the reply content of the third message. In this way, the second server can complete the processing of the trigger request under the first task theme and generate a second message.
[0089] S403: Receive the second message returned by the second server, and send the second message to the client of the digital assistant.
[0090] After the second server completes the processing of the trigger request under the first task topic and generates the second message, since the second server cannot directly send the second message to the client of the digital assistant, the second server can first send the second message to the first server, and then the first server sends the second message to the client of the digital assistant, so as to display the content corresponding to the second message in the client of the digital assistant.
[0091] The second server can send the second message by calling the interface. In specific implementation, the first server can receive the second message sent by the second server through the first interface in response to the calling request of the second server for the first interface.
[0092] Among them, the first interface can be an interface provided by the first server of the digital assistant, and the second server can call the first interface to transmit the second message through the first interface in the format supported by the protocol configured by the first interface, so as to realize the delivery of the second message to the first server.
[0093] In some embodiments, the first server of the digital assistant may provide a first interface for two different transmission modes, namely, streaming transmission and non-streaming transmission. Specifically, the second server may select the required transmission mode according to actual needs, such as according to a trigger request or according to the format of the second message, and call the first interface of the corresponding transmission mode to transmit the second message to the first server via streaming transmission or non-streaming transmission.
[0094] Furthermore, when the second message is used for message update, the first interface may also be an interface for message update. The second server may pass the second message (e.g., the second message presented as a card message) to the first server by calling the first interface to update the message in the client of the digital assistant.
[0095] In some embodiments, the first message includes a first verification token corresponding to the trigger request, at which point the first server can perform message verification. In specific implementation, the first server receives the second message returned by the second server, obtains the second verification token in the second message, and in response to the verification information indicated by the second verification token satisfying the verification condition of the first verification token, the first server can send the second message to the client of the digital assistant.
[0096] That is to say, the second message generated by the second server carries the second verification token, and the first server can search for corresponding verification information based on the second verification token, such as one or more of the task subject identifier, trigger type, trigger request, current session identifier, and the creator of the task subject bound to the second verification token.
[0097] Since the first message carries the first verification token when the first server generates the first message, and the first verification token is bound to the information related to the trigger request, the first server can compare the found verification information with the information bound to the first verification token to implement message verification. When the verification information meets the verification conditions of the first verification token, for example, the verification information indicated by the second verification token is the same as the information related to the trigger request bound to the first verification token, the first server can determine that the second verification token and the first verification token are the same verification token. If the verification is successful, the first server can send the second message to the client of the digital assistant.
[0098] In this way, by verifying the token, the first server can verify whether the second message sent by the second server is a message generated after the second server processes the trigger request under the first task topic, ensuring that the second message corresponds to the first message and avoiding sending erroneous messages to the client.
[0099] Furthermore, the verification token can also be configured with an expiration mechanism. Specifically, the verification condition of the first verification token can also include whether the first verification token is used for the first time. When the first verification token is not used for the first time, the verification fails. In other words, when the first server can determine that the second verification token is the same as the first verification token, if the first verification token is not used for the first time, it indicates that the second server has previously sent a second message for the current trigger request to the client of the digital assistant through the first server. In order to avoid the second server repeatedly sending messages to the client, if the verification fails at this time, the first server will not send the second message to the client of the digital assistant, thereby reducing excessive disturbance of the second server to the user.
[0100] In addition, the verification token can also be configured with a fallback mechanism. Specifically, the verification condition of the first verification token can also include whether the first verification token is used within the set usage period. When the first verification token is not used within the set usage period, the verification fails. In other words, when the first server can determine that the second verification token is the same verification token as the first verification token, if the first verification token is not used within the set usage period, it indicates that the second server has not completed the processing of the trigger request for the first task topic for a long time. In order to avoid the user waiting for a long time, the verification fails at this time, and the first server will not send the second message to the digital assistant's client, thereby improving the efficiency of human-computer dialogue.
[0101] In the embodiment of the present application, since the second server only creates the first task topic in the first server, and the client essentially still conducts a human-computer dialogue with the first server, the sender of the second message received by the client of the digital assistant should be the first server. In specific implementation, the first server can modify the field related to the sender in the second message, and the sender indicated by the modified second message is the first server of the digital assistant, and the modified second message is sent to the client of the digital assistant.
[0102] In this way, during the human-computer dialogue between the first server and the client, no matter the client of the digital assistant triggers a request under the task subject created by the first server or triggers a request under the task subject created by the external server, the sender of the response (i.e., the second message) received by the client is the first server of the digital assistant. Without changing the human-computer dialogue logic between the first server and the client, a human-computer dialogue under a richer and more customized task subject is achieved.
[0103] Based on the above description, an embodiment of the present application provides an information processing method. The method is applied to the first server of the digital assistant. Specifically, the first server of the digital assistant responds to the trigger request of the digital assistant's client under the first task topic, generates a first message based on the information indicated by the trigger request, and then, the first server of the digital assistant sends the first message to the second server, so that the second server processes the trigger request under the first task topic, wherein the second server is the creator of the first task topic, the first server receives the second message returned by the second server, and sends the second message to the client of the digital assistant.
[0104] In this method, the first server of the digital assistant provides a human-computer dialogue service, and the user triggers a request related to the human-computer dialogue under the task theme created by the second server (i.e., the external server). The first message generated by the first server of the digital assistant can be parsed by the second server, and the second server can process the trigger request and generate a second message, thereby realizing the human-computer dialogue. In this way, by generating the first message through the information indicated by different trigger requests, the message transmission between the client of the digital assistant, the first server of the digital assistant and the external server can be realized, and the client of the digital assistant is supported to realize the human-computer dialogue under the task theme created by the external server, so as to meet the diverse human-computer dialogue needs of users.
[0105] Combination of the above Figures 1 to 4 The information processing method provided in the embodiment of the present application is introduced in detail. The system and device provided in the embodiment of the present application will be introduced in conjunction with the accompanying drawings.
[0106] See also Figure 5 The structural diagram of the information processing system shown in FIG. 5 includes:
[0107] A generating module 501 is used to generate a first message based on information indicated by the trigger request in response to a trigger request of the client of the digital assistant under the first task theme;
[0108] The communication module 502 is used to send the first message to the second server, so that the second server processes the trigger request under the first task theme, and the second server is the creator of the first task theme;
[0109] The communication module 502 is also used to receive a second message returned by the second server and send the second message to the client of the digital assistant.
[0110] In some possible implementations, the generating module 501 is specifically used to:
[0111] Determining, according to the trigger request, a trigger type indicated by the trigger request;
[0112] A first message is generated based on a template corresponding to the trigger type.
[0113] In some possible implementations, the generating module 501 is specifically used to:
[0114] In response to a request from the client of the digital assistant to start a first task topic, a first message is generated based on information indicated by the start request, and the first message includes fields related to the first task topic.
[0115] In some possible implementations, the generating module 501 is specifically used to:
[0116] In response to a message sending request of the client of the digital assistant under the first task topic, obtaining a third message sent by the client of the digital assistant;
[0117] According to the third message, based on the information indicated by the message sending request, a first message is generated, the first message including fields related to the first task topic and fields related to the third message, and the message structure indicated by the fields related to the third message is consistent with the message structure of the second server.
[0118] In some possible implementations, the communication module 502 is specifically configured to:
[0119] In response to the call request of the second server for the first interface, a second message sent by the second server through the first interface is received.
[0120] In some possible implementations, the generating module 501 is specifically used to:
[0121] In response to a trigger request from the client of the digital assistant under a first task topic, generating a first verification token corresponding to the trigger request;
[0122] A first message is generated based on the first verification token and the information indicated by the trigger request.
[0123] In some possible implementations, the first message includes a first verification token corresponding to the trigger request, and the communication module 502 is specifically configured to:
[0124] Receive a second message returned by the second server, and obtain a second verification token in the second message;
[0125] In response to the verification information indicated by the second verification token satisfying the verification condition of the first verification token, the second message is sent to the client of the digital assistant.
[0126] In some possible implementations, the system 50 further includes a modification module, and the modification module is used to:
[0127] Modify the field related to the sender in the second message, the sender indicated by the modified second message is the first server of the digital assistant;
[0128] The communication module 502 is specifically used for:
[0129] The modified second message is sent to the client of the digital assistant.
[0130] In some possible implementations, the trigger request of the digital assistant client under the first task topic is an opening request for the first task topic, and the second message includes content pre-configured by the second server;
[0131] The trigger request of the digital assistant's client under the first task topic is a message sending request, and the second message includes reply content to the third message sent by the digital assistant's client.
[0132] In some possible implementations, the trigger request of the digital assistant client under the first task topic is a message sending request, and the second server processes the trigger request under the first task topic, including:
[0133] The second server determines, based on the first message, a third message sent by the client of the digital assistant;
[0134] The second server calls the language model corresponding to the first task topic, so that the language model processes the third message and returns a reply content to the third message;
[0135] The second server generates a second message according to the reply content.
[0136] In some possible implementations, the second server creates the first task topic through the following steps:
[0137] In response to the call request of the second server for the second interface, receiving the creation parameters sent by the second server through the second interface;
[0138] The first task topic is created according to the creation parameters.
[0139] In some possible implementations, the first task theme is configured with corresponding configuration information to perform tasks of the corresponding type, and the configuration information includes at least one of the following: task theme setting information and plug-in information, wherein the task theme setting information is used to describe information related to the corresponding task theme, and the plug-in information indicates at least one plug-in used to perform tasks under the corresponding task theme.
[0140] The information processing system 50 according to the embodiment of the present application may correspond to executing the method described in the embodiment of the present application, and the above and other operations and / or functions of each module / unit of the information processing system 50 are respectively to implement Figure 4 For the sake of brevity, the corresponding processes of each method in the illustrated embodiment are not described in detail here.
[0141] The present application also provides an electronic device. The electronic device is specifically used to implement Figure 5 Functionality of information processing system 50 in the illustrated embodiment.
[0142] Figure 6 A schematic diagram of the structure of an electronic device 600 is provided. Figure 6 As shown, the electronic device 600 includes a bus 601, a processor 602, a communication interface 603 and a memory 604. The processor 602, the memory 604 and the communication interface 603 communicate with each other via the bus 601.
[0143] The bus 601 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0144] The processor 602 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0145] The communication interface 603 is used for communicating with the outside. For example, the communication interface 603 can be used for communicating with a terminal.
[0146] The memory 604 may include a volatile memory, such as a random access memory (RAM). The memory 604 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0147] The memory 604 stores executable codes, and the processor 602 executes the executable codes to perform the aforementioned information processing method.
[0148] Specifically, in implementing Figure 5 In the case of the embodiment shown, and Figure 5 When each module or unit of the information processing system 50 described in the embodiment is implemented by software, the execution Figure 5 The software or program code required for the functions of each module / unit in the system may be partially or completely stored in the memory 604. The processor 602 executes the program code corresponding to each unit stored in the memory 604 to perform the aforementioned information processing method.
[0149] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned text processing method applied to the information processing system 50.
[0150] The embodiment of the present application further provides a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
[0151] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0152] When the computer program product is executed by a computer, the computer executes any of the aforementioned information processing methods. The computer program product may be a software installation package, and when any of the aforementioned information processing methods is needed, the computer program product may be downloaded and executed on a computer.
[0153] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to each embodiment of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession 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 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 implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0154] The units involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the unit / module does not, in some cases, constitute a limitation on the unit itself.
[0155] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0156] In the context of the present application embodiment, machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0157] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0158] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0159] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0160] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0161] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An information processing method, It is characterized in that The method applied to the first server of the digital assistant includes: In response to a trigger request from a client of the digital assistant under a first task topic, generating a first message based on information indicated by the trigger request; Sending the first message to a second server, so that the second server processes the trigger request under the first task theme, the second server being the creator of the first task theme; Receive the second message returned by the second server, and send the second message to the client of the digital assistant.
2. The method according to claim 1, It is characterized in that The generating a first message based on the information indicated by the trigger request includes: Determining, according to the trigger request, a trigger type indicated by the trigger request; A first message is generated based on a template corresponding to the trigger type.
3. The method according to claim 1, It is characterized in that The step of generating a first message in response to a trigger request of a client of the digital assistant under a first task topic based on information indicated by the trigger request includes: In response to a request from the client of the digital assistant to start a first task topic, a first message is generated based on information indicated by the start request, and the first message includes fields related to the first task topic.
4. The method according to claim 1, It is characterized in that The step of generating a first message in response to a trigger request of a client of the digital assistant under a first task topic based on information indicated by the trigger request includes: In response to a message sending request of the client of the digital assistant under the first task topic, obtaining a third message sent by the client of the digital assistant; According to the third message, based on the information indicated by the message sending request, a first message is generated, the first message including fields related to the first task topic and fields related to the third message, and the message structure indicated by the fields related to the third message is consistent with the message structure of the second server.
5. The method according to claim 1, It is characterized in that The receiving a second message returned by the second server includes: In response to the call request of the second server for the first interface, a second message sent by the second server through the first interface is received.
6. The method according to claim 1, It is characterized in that The step of generating a first message in response to a trigger request of a client of the digital assistant under a first task topic based on information indicated by the trigger request includes: In response to a trigger request from the client of the digital assistant under a first task topic, generating a first verification token corresponding to the trigger request; A first message is generated based on the first verification token and the information indicated by the trigger request.
7. The method according to claim 1, It is characterized in that The first message includes a first verification token corresponding to the trigger request, and the receiving the second message returned by the second server and sending the second message to the client of the digital assistant includes: Receive a second message returned by the second server, and obtain a second verification token in the second message; In response to the verification information indicated by the second verification token satisfying the verification condition of the first verification token, the second message is sent to the client of the digital assistant.
8. The method according to claim 1, It is characterized in that After receiving the second message returned by the second server, the method further includes: Modify the field related to the sender in the second message, the sender indicated by the modified second message is the first server of the digital assistant; The sending the second message to the client of the digital assistant includes: The modified second message is sent to the client of the digital assistant.
9. The method according to claim 1, It is characterized in that The trigger request of the client of the digital assistant under the first task topic is an opening request for the first topic, and the second message includes content pre-configured by the second server; The trigger request of the digital assistant's client under the first task topic is a message sending request, and the second message includes reply content to the third message sent by the digital assistant's client.
10. The method according to claim 1, It is characterized in that The trigger request of the digital assistant client under the first task theme is a message sending request, and the second server processes the trigger request under the first task theme, including: The second server determines, based on the first message, a third message sent by the client of the digital assistant; The second server calls the language model corresponding to the first task topic, so that the language model processes the third message and returns a reply content to the third message; The second server generates a second message according to the reply content.
11. The method according to claim 1, It is characterized in that The second server creates the first task topic by the following steps: In response to the call request of the second server for the second interface, receiving the creation parameters sent by the second server through the second interface; The first task topic is created according to the creation parameters.
12. The method according to any one of claims 1 to 11, It is characterized in that The first task theme is configured with corresponding configuration information to perform tasks of corresponding types, and the configuration information includes at least one of the following: task theme setting information and plug-in information. The task theme setting information is used to describe information related to the corresponding task theme, and the plug-in information indicates at least one plug-in used to perform tasks under the corresponding task theme.
13. An information processing system, It is characterized in that The system comprises: A generating module, configured to generate a first message in response to a trigger request of a client of a digital assistant under a first task theme, based on information indicated by the trigger request; A communication module, used for sending the first message to a second server, so that the second server processes the trigger request under the first task theme, and the second server is the creator of the first task theme; The communication module is also used to receive a second message returned by the second server and send the second message to the client of the digital assistant.
14. An electronic device, It is characterized in that The electronic device comprises a processor and a memory; The processor is configured to execute instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 12.
15. A computer-readable storage medium, It is characterized in that The method comprises instructions, wherein the instructions instruct an electronic device to execute the method according to any one of claims 1 to 12.