Data processing method and electronic equipment

By listening to and storing notification information from third-party applications and building an intent library, the problem of task execution failure of AI agents when the interface is not open is solved, and direct control of third-party applications and natural language command response are realized.

CN121560591APending Publication Date: 2026-02-24LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511736521.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

When an AI agent calls the functional interfaces of a third-party application, if the interfaces are not publicly accessible, it can lead to task execution failures.

Method used

By listening to notifications from third-party applications, extracting and storing execution instruction information (Intent) and its intent description, an intent library is built to achieve direct control over third-party applications.

Benefits of technology

Without relying on third-party application open interfaces, it improves the efficiency of interaction with third-party applications, can respond to users' natural language commands, and realize the function execution of target controls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560591A_ABST
    Figure CN121560591A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and electronic equipment, notification information is obtained, the notification information is information generated by an application program meeting a notification condition and a notification template, and the notification template comprises at least one control; analyzing the notification information to obtain data information for each at least one control in the notification information; based on the data information of each at least one control, if a target control meeting a first condition exists in the at least one control, executing indication information of the target control is stored, and the data information of the target control meeting the first condition comprises mark information representing a triggered response interface of the target control; the execution indication information of the target control belongs to the data information and is the execution indication information of the response interface; analyzing the execution indication information to obtain an execution action and a communication object so as to generate a target intention description of the execution indication information; and adding the target intention description to an intention library.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data processing method and an electronic device. Background Technology

[0002] Currently, AI (Artificial Intelligence) agents need to call the functional interfaces of relevant applications to execute tasks according to user instructions. If the task involves functional interfaces that are not publicly available, the agent will be unable to perform the relevant functions, resulting in task execution failure. Summary of the Invention

[0003] In view of the above, this application provides a data processing method and an electronic device, as follows:

[0004] A data processing method, comprising:

[0005] The application receives notification information, which is generated by the application using a notification template that meets notification conditions. The notification template includes at least one control. The notification information includes data information constructed by the application for each of the at least one control to express the function of each of the at least one control.

[0006] Parse the notification information to obtain data information for each of the at least one control in the notification information;

[0007] Based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, the execution instruction information of the target control is stored. The data information of the target control that satisfies the first condition includes flag information representing the response interface that triggers the target control. The execution instruction information of the target control belongs to the data information and is the execution instruction information of the response interface.

[0008] Parse the execution instruction information to obtain the execution action and communication object, and generate a target intent description of the execution instruction information;

[0009] Add the target intent description to the intent library.

[0010] Preferably, based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, the target execution instruction information of the target control is stored, including the following:

[0011] If at least one of the controls satisfies the first condition, store the first execution instruction information of the first control; or;

[0012] If there is a first control among the at least one controls that satisfies the first condition, store the first execution instruction information of the first control and the second execution instruction information of the second control. If the second control does not satisfy the first condition, the second control belongs to the at least one control.

[0013] Preferably, based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, storing the execution instruction information of the target control includes:

[0014] Based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, and the application satisfies the second condition, the execution instruction information of the target control is stored.

[0015] Preferably, the execution action obtained by parsing the first execution instruction information is a response, and the target intent description of the first execution instruction information is a description of the sending action for the first communication object.

[0016] Preferably, the execution action obtained by parsing the second execution instruction information is viewing, and the target intent description of the second execution instruction information is a viewing action description for the first communication object.

[0017] A data processing method, comprising:

[0018] Obtain input information, wherein the input information is the user's natural language expression;

[0019] Obtain an intent library, which includes intent descriptions for at least one communication object;

[0020] Based on the first model, the input information and the intent database are processed to obtain an intent description for the first communication object that matches the input information;

[0021] Based on the intent description for the first communication object, determine the first execution instruction information corresponding to the intent description for the first communication object;

[0022] The first execution instruction information is transmitted to the first application so that the first application responds based on the first execution instruction information.

[0023] Preferably, the data processing method further includes:

[0024] Obtain prompt words to guide the second model's operation;

[0025] The second model processes the input information based on the prompt words to obtain the target input portion of the input information;

[0026] Add the target input portion to the target identifier bit of the first execution instruction information.

[0027] The step of transmitting the first execution instruction information to the first application, so that the first application responds to the input information based on the first execution instruction information, includes:

[0028] The target intent description of the first execution instruction information is a description of the sending action for the first communication object. The first execution instruction information is transmitted to the first application so that the first application sends the target input portion to the first communication object based on the first execution instruction information.

[0029] Preferably, transmitting the first execution instruction information to the first application, so that the first application responds to the input information based on the first execution instruction information, includes:

[0030] The target intent description of the first execution instruction information is a description of a viewing action for the first communication object. The first execution instruction information is transmitted to the first application so that the first application can view the information corresponding to the first communication object based on the first execution instruction information.

[0031] An electronic device includes at least one processor and a memory connected to the processor, wherein: the memory is used to store a computer program; and the processor is used to execute the computer program to enable the electronic device to implement the data processing method described below:

[0032] The application receives notification information, which is generated by the application using a notification template that meets notification conditions. The notification template includes at least one control. The notification information includes data information constructed by the application for each of the at least one control to express the function of each of the at least one control.

[0033] Parse the notification information to obtain data information for each of the at least one control in the notification information;

[0034] Based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, the execution instruction information of the target control is stored. The data information of the target control that satisfies the first condition includes flag information representing the response interface that triggers the target control. The execution instruction information of the target control belongs to the data information and is the execution instruction information of the response interface.

[0035] Parse the execution instruction information to obtain the execution action and communication object, and generate a target intent description of the execution instruction information;

[0036] Add the target intent description to the intent library.

[0037] An electronic device includes at least one processor and a memory connected to the processor, wherein: the memory is used to store a computer program; and the processor is used to execute the computer program to enable the electronic device to implement the data processing method described below:

[0038] Obtain input information, wherein the input information is the user's natural language expression;

[0039] Obtain an intent library, which includes intent descriptions for at least one communication object;

[0040] Based on the first model, the input information and the intent database are processed to obtain an intent description for the first communication object that matches the input information;

[0041] Based on the intent description for the first communication object, determine the first execution instruction information corresponding to the intent description for the first communication object;

[0042] The first execution instruction information is transmitted to a first application, so that the first application responds based on the first execution instruction information. As can be seen from the above technical solution, this application discloses a data processing method and electronic device that obtains notification information, which is information generated by an application based on a notification template that meets notification conditions. The notification template includes at least one control. The notification information includes data information constructed by the application for each at least one control to express the function of each at least one control. The notification information is parsed to obtain data information for each at least one control. Based on the data information of each at least one control, if there is a target control among the at least one controls that meets a first condition, the execution instruction information of the target control is stored. The data information of the target control that meets the first condition includes flag information representing the response interface triggered by the target control. The execution instruction information of the target control belongs to data information and is the execution instruction information of the response interface. The execution instruction information is parsed to obtain the execution action and the communication object to generate a target intent description of the execution instruction information. The target intent description is added to the intent library. Input information is obtained, which is a natural language expression of the user. An intent library is obtained, which includes intent descriptions for at least one communication object. The input information and the intent library are processed based on a first model to obtain an intent description for the first communication object that matches the input information. Based on the intent description for the first communication object, first execution instruction information corresponding to the intent description for the first communication object is determined. The first execution instruction information is transmitted to the first application so that the first application responds based on the first execution instruction information. Attached Figure Description

[0043] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0045] Figure 2a This diagram illustrates a message interface for a notification message sent by an application.

[0046] Figure 2b A schematic diagram of a responsive interface is provided;

[0047] Figure 3 An interactive diagram illustrating an implementation of a data processing method provided in an embodiment of this application;

[0048] Figure 4 A flowchart illustrating another data processing method provided in an embodiment of this application;

[0049] Figure 5a A schematic diagram illustrating an input information interface for an intelligent agent is provided.

[0050] Figure 5b A schematic diagram of a response interface for an intelligent agent is provided.

[0051] Figure 6 A flowchart illustrating another data processing method provided in an embodiment of this application;

[0052] Figure 7 An interaction diagram illustrating yet another implementation of a data processing method provided in this application embodiment;

[0053] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0055] This application provides a data processing method, specifically applied to an AI agent (e.g., a voice assistant configured in a smartphone) configured in an electronic device (e.g., a smart mobile terminal). In the absence of open interfaces for third-party applications, the method listens for, extracts, and stores execution instruction information (Intent) and its intent description from notification information of third-party applications. This allows the method to respond to user input information by directly transmitting the Intent to the third-party application after receiving natural language input from the user, based on the stored Intent and its intent description.

[0056] like Figure 1 The diagram shown is a flowchart illustrating a data processing method disclosed in this application. Figure 1 As shown, this method specifically includes steps 101 to 105, as follows:

[0057] Step 101: Receive notification information.

[0058] In this embodiment, the notification information is generated by the application based on a notification template when the notification conditions are met. Specifically, when the notification conditions are met, the application (e.g., a third-party application) automatically generates and sends the notification to the system notification bar according to the notification template. The operating system's notification management system is responsible for distributing the system-level notification information to the AI ​​agent that started the listening process after receiving the system-level notification from the application.

[0059] In this embodiment, the notification template includes at least one control, and the notification information includes data information constructed by the application for each control in the notification template. The data information of the control is used to express the function of the control. That is, the notification information is a structured data object (e.g., the Notification object in the Android system), which includes the data required to encapsulate the function of each control.

[0060] For example, when a social application receives a new message or meets the notification timing, it generates a first notification message based on a first notification template. It constructs data information to express the functions of control 1 and control 2 in the first notification template. The operating system's notification management system receives the first notification message and sends the first notification message containing the data information of control 1 and control 2 to the AI ​​agent. Thus, the AI ​​agent receives the structured first notification message through the listening program.

[0061] Step 102: Parse the notification information.

[0062] In this embodiment, the notification information includes data information for each control. The data information of a control is used to express the function of the control. Specifically, by parsing the structured notification information, the data information of each space in the notification information is extracted to determine the function of each control. For example, by parsing the first notification information, data information 1 for control 1 and data information 2 for control 2 are determined. For example, control 1 is a control with a first function, and data information 1 contains structured data expressing the first function. Control 2 is a control with a second function, and data information 2 contains structured data expressing the second function.

[0063] Step 103: Based on the data information of each control in at least one control, if there is a target control in at least one control that satisfies the first condition, store the execution instruction information of the target control.

[0064] In this embodiment, the data information of the target control that satisfies the first condition includes flag information representing the response interface that the target control is triggered. That is, when the data information of the control includes flag information representing the response interface that the target control is triggered, it is determined that the control satisfies the first condition. The flag information representing the response interface that the target control is triggered indicates that after the target control is triggered, it enters a response interface. The response interface is an interface that allows users to input information. For example, the response interface is a reply interface with an input box and a confirmation button.

[0065] In this embodiment, the execution instruction information of the target control belongs to data information and is the execution instruction information of the response interface. That is, the execution instruction information of the control is a data structure extracted from the data information. This execution instruction information is used to drive the application to execute the function of the control after entering the response interface. Specifically, the execution instruction information of the control is an Intent extracted from the data information or a PendingIntent that encapsulates an Intent.

[0066] Step 104: Parse the execution instruction information to obtain the execution action and communication object, so as to generate a target intent description of the execution instruction information.

[0067] In this embodiment, the string describing the operation type is obtained from the execution instruction information, thereby determining the description representing the operation type, i.e., the execution action. For example, the Action attribute describing the operation type as a reply operation is parsed from the Intent, thus determining that the execution action is a reply. The operation target is obtained from the execution instruction information, thus obtaining the communication object. For example, the target of the reply operation is Zhang San, which is parsed from the Extras data packet of the Intent, thus determining that the communication object is Zhang San.

[0068] In this embodiment, the target intent of the generated execution instruction information is described as a structured natural language description obtained by combining the execution action and the communication object. For example, if the execution action and the communication object obtained by parsing the execution instruction information are reply and Zhang San respectively, then the target intent of the execution instruction information is described as replying to Zhang San.

[0069] Step 105: Add the target intent description to the intent library.

[0070] In this embodiment, the execution instruction information and the target intent description are associated and stored in an intent library. It can be understood that the intent library stores the intent descriptions corresponding to the execution instruction information from various applications.

[0071] As can be seen from the above technical solutions, the data processing method provided in this application embodiment is based on the fact that the notification information is generated by the application according to the notification template when the notification conditions are met. The notification template includes at least one control, and the notification information includes data information constructed by the application for each at least one control to express the function of each control. Therefore, by parsing the notification information, the data information for each at least one control in the notification information can be obtained, thereby identifying the function of each control. Furthermore, based on the data information of each at least one control, if there is a target control among the at least one controls that satisfies the first condition, the execution instruction information of the target control is stored. The data information of the target control that satisfies the first condition includes the flag information representing the response interface that is triggered by the target control. That is, the target control that displays the response interface after being triggered is obtained by filtering through the first condition. The execution instruction information of the response interface is then stored as the execution instruction information of the target control. The target intent description generated based on the execution action and communication object obtained by parsing the execution instruction information is added to the intent library. This realizes the function recognition of the target control, the extraction of execution instruction information, and the conversion of intent description. By storing the extracted execution instruction information and its corresponding intent description, the AI ​​agent can determine the execution logic used to drive the application to realize the function of the target control based on the natural language description, thereby preparing the data for directly driving the application with the execution instruction information.

[0072] In an optional embodiment, step 103, namely, based on the data information of each control in at least one control, if there is a target control in at least one control that satisfies the first condition, a specific implementation method for storing the execution indication information of the target control is as follows: if there is a first control in at least one control that satisfies the first condition, store the first execution indication information of the first control, wherein the execution indication information of the first control belongs to the data information and is the execution indication information of the response interface, that is, extract the execution indication information of the response interface triggered by the first control from the data information.

[0073] In this embodiment, the data information of the first control that meets the first condition includes flag information representing the response interface triggered by the first control; that is, triggering the first control will enter a response interface. Taking the function of control 1 as a reply as an example, Figure 2a This diagram illustrates a message interface for a notification message sent by an application, such as... Figure 2a As shown, the application is a first social application. After receiving a message from a contact named Zhang San, the first social application generates a chat notification based on a notification template. The operating system displays the chat notification and the corresponding reply interaction button of control 1 on the notification interface based on the chat notification information. The data information of control 1 contains the flag information that represents the response interface triggered by control 1. That is, after control 1 is triggered (for example, the reply interaction button is clicked), the response interface will be displayed. It can be seen that control 1 is the first control that meets the first condition.

[0074] Figure 2b An example of a responsive interface is shown, such as... Figure 2b As shown, the response interface is a reply interface that provides an input box and a send button. On the reply interface, after the send button is triggered, the application will send the information entered by the user in the input box to Zhang San. That is, when the send button on the reply interface is triggered, control 1, i.e., the reply function, will be executed.

[0075] In summary, taking control 1 as an example, this step will obtain the Intent of the response interface triggered by control 1 from the data information of control 1.

[0076] In another optional embodiment, step 103, namely, based on the data information of each control in at least one control, if there is a target control in at least one control that satisfies the first condition, a specific implementation method for storing the execution instruction information of the target control is as follows:

[0077] If at least one of the controls satisfies the first condition, the first execution instruction information of the first control and the second execution instruction information of the second control are stored. Where the second control does not satisfy the first condition, the second control belongs to at least one control, meaning the second control is a control other than the first control. Specifically, when the notification information includes data information of multiple (more than 2) controls, including a first control that satisfies the first condition and a second control that does not satisfy the first condition, the first execution instruction information of the first control is stored according to the above embodiment, and the second execution instruction information of the second control is obtained from the notification information.

[0078] Taking control 2 as an example for viewing functionality, the data information of control 2 does not include the flag information of the response interface when control 2 is triggered, such as... Figure 2aAs shown, the operating system also displays a view interaction button for control 2 in the notification interface. After control 2 is triggered (for example, the view interaction button is clicked), the first social application will perform a view operation and generate view information so that the operating system can display the chat interface with Zhang San, including the chat history with Zhang San. It is evident that after control 2 is triggered, there is no response interface; instead, the view operation is executed directly. Control 2 does not meet the first condition.

[0079] In this embodiment, while identifying and storing the first execution instruction information of the first control, the second execution instruction information of other second controls that do not meet the first condition in the notification information is also stored.

[0080] It should be noted that the second control is not directly associated with the user-input response interface, but since it encapsulates a shortcut operation that the application can execute, storing the execution instruction information of the first and second controls simultaneously improves the coverage of the application's functions by pre-stored execution instruction information.

[0081] Furthermore, to optimize the utilization efficiency of storage resources and improve the usability of the intent library, in step S103, based on the data information of each control in at least one control, if there is a target control in at least one control that meets the first condition, a specific implementation method for storing the execution indication information of the target control is as follows: If there is a target control in at least one control that meets the first condition, and the application meets the second condition, the execution indication information of the target control is stored. That is, when the data information of the target control includes flag information representing the response interface triggered by the target control, and the application meets the second condition, the execution indication information of the target control is stored. Here, the determination of whether an application meets the second condition is based on application information and / or user behavior data. Optionally, the usage frequency of applications that meet the second condition is greater than a frequency threshold. Therefore, by setting the second condition for application filtering, the storage of execution indication information of controls of applications with low usage frequency is avoided, reducing the amount of redundant data in the intent library, saving storage space, and improving the retrieval speed of intent matching.

[0082] Furthermore, the intent description of each execution instruction is obtained by combining the execution action and communication object obtained from parsing the execution instruction.

[0083] In an optional embodiment, if the execution action obtained by parsing the first execution instruction information is a reply, and the communication object is the first communication object, then the target intent description of the first execution instruction information is a description of the sending action for the first communication object. Taking the first execution instruction information corresponding to control 1 as an example, the target intent description of the first execution instruction information is "to reply to Zhang San".

[0084] In another optional embodiment, if the execution action obtained by parsing the second execution instruction information is "viewing" and the communication object is the first communication object, then the target intent description of the second execution instruction information is a description of the viewing action for the first communication object. Taking the second execution instruction information corresponding to control 2 as an example, the target intent description of the second execution instruction information is "viewing the chat history with Zhang San".

[0085] In summary, by combining the execution action and the communication object into a structured natural language description, a mapping between execution instruction information and natural language is established. Furthermore, the intent description corresponding to the execution instruction information is stored, thus abstracting complex, structured operation instructions hidden inside the application into simple natural language instructions.

[0086] As can be seen from the above embodiments, the data processing method provided in this application involves an AI agent listening to notification information generated by a third-party application through the operating system, extracting and storing execution instruction information (Intent) and its intent description, constructing an intent library, and referring to... Figure 3 , Figure 3 This is an interactive diagram illustrating an implementation of a data processing method provided in an embodiment of this application. Figure 3 This embodiment illustrates a specific implementation flow of a data processing method provided in this example, such as... Figure 3 As shown, after a third-party application (APP) generates a notification message using a notification template and meets the notification conditions, it requests the operating system to send the notification. The operating system then distributes the notification message to listeners, including AI agents. It should be noted that the operating system distributes the notification message to at least one listener authorized by the APP, such as... Figure 3 As shown, the listening parties include Listener 1 to Listener N, where Listener N is an AI agent.

[0087] After receiving the notification, the AI ​​agent performs the following actions:

[0088] 1. Determine whether the notification message contains a target control that meets the first condition. The data information of the target control includes flag information indicating that the target control is triggered to open a response interface. The flag information includes two types of information: the first type is the remote input flag "RemodelInput", which indicates that an input box needs to be created after the button is clicked; the second type is the Intent corresponding to the operation request to send the input box content. In other words, the data information of the target control in the notification message defines that after clicking the button of the target control in the notification message, a response interface will appear, which includes an input box and a send button.

[0089] 2. Determine whether the notification information comes from an application that meets the second condition, for example, whether it comes from an app that the user uses more frequently than a frequency threshold.

[0090] 3. If conditions 1 and 2 above are met, store the first execution instruction information and the second execution instruction information.

[0091] by Figure 2a Taking the notification information shown as an example, the notification information includes data information for the reply control that meets the first condition and data information for the view control that does not meet the first condition. The first execution instruction information is the execution instruction information from the reply control, that is, the Intent corresponding to the send button with an input box on the response interface. The second execution instruction information is the execution instruction information from the view control.

[0092] 4. Obtain the communication object and the action to be performed from the notification information, that is, the contact's identifier and the action identifier.

[0093] 5. Generate and store the intent descriptions of each first execution instruction information and second execution instruction information.

[0094] Still with Figure 2a Taking the notification information shown as an example, the execution action obtained from the first execution instruction information is to send, and the communication object is Zhang San. Therefore, the intent of the first execution instruction information is described as "send a message to Zhang San". The execution action obtained from the second execution instruction information is to view, and the communication object is Zhang San. Therefore, the intent of the second execution instruction information is described as "view the chat history with Zhang San".

[0095] It should be noted that the intent description of the execution instruction information and the first execution instruction information (or identifier) ​​are stored accordingly.

[0096] This application also provides a data processing method, specifically applied to an AI agent (e.g., a voice assistant configured in a smartphone) configured in an electronic device (e.g., a smart mobile terminal). In the absence of open interfaces for third-party applications, after receiving natural language information input by a user, the method responds to the user's input information by directly transmitting the execution instruction information to a third-party application based on the stored execution instruction information and its intent description.

[0097] like Figure 4 The diagram shown is a flowchart illustrating another data processing method disclosed in this application. Figure 4 As shown, this method specifically includes steps 401 to 405, as follows:

[0098] Step 401: Obtain input information.

[0099] In this embodiment, the input information is the user's natural language expression. Specifically, the user enters text or voice commands on the input interface of the AI ​​agent to instruct the AI ​​agent to perform a task. For example, the user enters a text command: "Reply to Zhang San with a message and tell him that there will be a meeting at 10 o'clock tomorrow."

[0100] In this embodiment, the methods for obtaining input information include, but are not limited to: voice signals captured by the device's microphone (converted into text through speech recognition), or direct text information input through the device's keyboard or touchscreen.

[0101] Figure 5a An example is a schematic diagram of an input information interface for an intelligent agent, such as... Figure 5a As shown, the input information interface of the intelligent agent "intelligent assistant" includes an input box and an interaction area. The interaction area is used to display the input prompts or operation results of the intelligent agent. The user can enter the text "Reply to Zhang San with a message and tell him that there is a meeting at 10 o'clock tomorrow" in the input box.

[0102] Step 402: Obtain the intent library.

[0103] In this embodiment, the intent library includes intent descriptions for at least one communication object, wherein each intent description corresponds to an execution instruction message, which describes the execution action and communication object of the execution instruction message. For example, the intent library includes intent descriptions for a first communication object such as "send a message to the first communication object", intent descriptions for a first communication object such as "view the chat history of the first communication object", and intent descriptions for a second communication object such as "send a message to the second communication object".

[0104] It should be noted that the intent descriptions in this intent library are obtained by listening to and parsing historical notification information.

[0105] Step 403: Based on the first model, process the input information and intent library to obtain an intent description for the first communication object that matches the input information.

[0106] In this embodiment, the first model is an artificial intelligence model or a combination of artificial intelligence models used for semantic understanding and matching. The first model performs semantic analysis and feature extraction on the input information and the intent description in the intent library, and finds the intent description for the first communication object that is semantically closest to the input information from the intent library. Figure 5b This example illustrates a schematic diagram of an agent's response interface, such as... Figure 5b As shown, the AI ​​agent processes the user input information "Reply to Zhang San with a message and tell him that there will be a meeting at 10 o'clock tomorrow" through the first model, and obtains the intent description for the first communication object that matches the input information as "Send a message to Zhang San". The AI ​​agent displays the intent description on the response interface.

[0107] Step 404: Based on the intent description for the first communication object, determine the first execution instruction information corresponding to the intent description for the first communication object.

[0108] In this embodiment, the mapping relationship corresponding to the intent description of the first communication object stored in the intent library is used to obtain the first execution instruction information associated with the stored intent description, that is, the first Intent.

[0109] Step 405: Transmit the first execution instruction information to the first application so that the first application responds based on the first execution instruction information.

[0110] In this embodiment, the first execution instruction information is transmitted to the first application through the operating system. The first application is the application to which the first execution instruction information belongs, that is, the first execution instruction information belongs to the data information of the control constructed by the first application.

[0111] It is understandable that, since the first execution instruction information belongs to the data information of the control built by the first application, when the operating system sends the first execution instruction information back to the first application, the first application will recognize it as a legitimate operation request from itself and execute the function defined by the first execution instruction information. For example, the first application sends a message to Zhang San based on the input information, or pops up a chat interface with Zhang San and displays the chat history.

[0112] As can be seen from the above technical solutions, the data processing method provided in this application involves obtaining input information and an intent library, the intent library including intent descriptions for at least one communication object. The input information and the intent library are processed based on a first model to obtain an intent description for the first communication object that matches the input information. Based on the intent description for the first communication object, first execution instruction information corresponding to the intent description for the first communication object is determined. The first execution instruction information is transmitted to a first application so that the first application responds based on the first execution instruction information. Therefore, this application obtains the user's natural language-matched intent description for the first communication object from the intent library, thereby determining execution instruction information for implementing natural language instructions. This execution instruction information drives the application to complete the operation indicated by the natural language instructions, improving the interaction efficiency with the application without relying on the application actively opening interfaces.

[0113] Furthermore, the first execution instruction information includes the execution instruction information of the first control that satisfies the first condition. That is, the data information of the first control includes flag information representing the triggered response interface. The first execution instruction information is the execution instruction information of the response interface in the data information. When there is a flag bit in the first execution instruction information, the flag bit needs to be filled to generate complete first execution instruction information. For example, the Intent of the reply control contains a data identifier bit (i.e., the Extras field), which is used to fill the sent content in the response interface after the reply control is triggered. Based on this, the data processing method provided in this application embodiment also includes a flag bit filling step for the first execution instruction information. See [link to relevant documentation]. Figure 6 , Figure 6 This is a flowchart illustrating another data processing method provided in an embodiment of this application. Figure 6 The specific process of filling the flag bits of the first execution instruction information is shown, such as... Figure 6 As shown, this method specifically includes steps 601 to 603, as follows:

[0114] Step 601: Obtain prompt words to guide the operation of the second model.

[0115] In this embodiment, the second model is a trained natural language understanding model, such as a large language model. The prompt words can be one or more segments of structured text, used to guide and constrain the second model, enabling it to extract content that meets the requirements from the input information. Specifically, prompt words are obtained to guide the second model to extract the content corresponding to the identifier bit of the first execution instruction information from the input information. For example, the content to be sent to Zhang San is extracted from the text instruction "Reply to Zhang San with a message and tell him that there is a meeting at 10 o'clock tomorrow".

[0116] Step 602: The second model processes the input information based on the prompt words to obtain the target input part of the input information.

[0117] In this embodiment, the target input part is the content to be filled corresponding to the identifier bit of the first execution instruction information. For example, the text instruction "Reply to Zhang San with a message and tell him that there is a meeting at 10 o'clock tomorrow" will be used to extract the target input part "there is a meeting at 10 o'clock tomorrow" under the guidance of the prompt word "extract the information to be replied to".

[0118] like Figure 5b As shown, the second model extracts the content to be sent to Zhang San as "meeting at 10 o'clock tomorrow" from the text instruction "reply to Zhang San with a message and tell him that there is a meeting at 10 o'clock tomorrow", and displays the content on the response interface.

[0119] Step 603: Add the target input part to the target identifier bit of the first execution instruction information.

[0120] In this embodiment, the target input portion is filled into the target identifier bit in the additional data packet of the first execution instruction information in the form of key-value pairs.

[0121] Therefore, when the first execution instruction information, which has been filled with the target input portion, is transmitted to the first application, the first application can directly complete the execution instruction information of the response interface.

[0122] Furthermore, when the target intent description of the first execution instruction information is a sending action description for the first communication object, the first execution instruction information is transmitted to the first application, so that the first application, based on the first execution instruction information, sends the target input portion to the first communication object. Specifically, the target intent description of the first execution instruction information is a sending action description for the first communication object; that is, the execution instruction information is the execution instruction information of the reply control. After the reply content is filled into the first execution instruction information, the first execution instruction information is transmitted to the first application. The first application will respond to the first execution instruction information to implement the reply function. Specifically, the target input portion filled in the first execution instruction information is sent to the corresponding communication object, for example, sending "Meeting at 10 am tomorrow" to Zhang San to complete the reply. Figure 5b As shown, after the AI ​​agent successfully transmits the first execution instruction information to the first application, the response interface displays that the task has been completed.

[0123] Furthermore, when the target intent of the first execution instruction information is described as a viewing action description for the first communication object, the first execution instruction information is transmitted to the first application so that the first application can view the information corresponding to the first communication object based on the first execution instruction information. Specifically, the target intent of the first execution instruction information is described as a viewing action description for the first communication object. That is, the first execution instruction information is the execution instruction information for the viewing control. After the first execution instruction information is transmitted to the first application, the first application will use the first execution instruction information to implement the function defined for the viewing control, such as displaying the chat history interface with Zhang San.

[0124] As can be seen from the above technical solution, the intent library contains intent descriptions corresponding to different execution instruction information. Therefore, the AI ​​agent understands different user input information, matches them with different intent descriptions in the intent library, and further obtains execution instruction information to implement the user input information. This execution instruction information is then transmitted to the first application, enabling the first application to directly execute different functions based on the different execution instruction information. Specifically, the AI ​​agent can instruct the application to implement the function of a first control by transmitting execution instruction information, that is, to instruct the application to implement the function of a second control by transmitting execution instruction information, covering multiple key scenarios of user-application interaction.

[0125] As can be seen from the above embodiments, the data processing method provided in this application embodiment involves an AI agent receiving a natural language instruction input by a user, matching the intent description based on an intent library to obtain an Intent for implementing the natural language instruction, and transmitting the Intent to a third-party application through the operating system, so that the third-party application can execute the corresponding function based on the Intent.

[0126] Reference Figure 7 , Figure 7 An interaction diagram for another implementation of a data processing method provided in this application embodiment, such as... Figure 7 As shown, after receiving the user's natural language input, the AI ​​agent performs the following actions:

[0127] 1. Convert natural language input into text commands.

[0128] 2. The first model is used to match the text instruction with the stored intent description to obtain the intent description that matches the text instruction, thereby determining the corresponding execution instruction information.

[0129] 3. Use the second model to extract the information content that the user needs to send from the text instructions.

[0130] 4. After filling the information content into the identifier of the execution instruction information, the operating system sends the execution instruction information to the application (APP) to which the execution instruction information belongs.

[0131] 5. The APP responds based on the execution instruction information, that is, it executes the Intent, for example, replying to Zhang San with the message "Tomorrow at 10:00 AM".

[0132] This application also provides an electronic device, for reference. Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided for an embodiment of this application, illustrating a structure suitable for implementing the electronic device in the embodiment of this application. For example... Figure 8 As shown, the electronic devices in the embodiments of this application may include, but are not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0133] like Figure 8As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. When the electronic device is powered on, the RAM 803 also stores various programs and data required for the operation of the electronic device. The processing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0134] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, memory cards, hard drives, etc.; and communication devices 809. Communication device 809 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0135] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement the various steps of any data processing method provided in this application.

[0136] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the various steps of any of the data processing methods provided in this application.

[0137] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0138] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0139] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0140] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0141] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0142] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0143] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0144] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily 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 this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, comprising: The application receives notification information, which is generated by the application using a notification template that meets notification conditions. The notification template includes at least one control. The notification information includes data information constructed by the application for each of the at least one control to express the function of each of the at least one control. Parse the notification information to obtain data information for each of the at least one control in the notification information; Based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, the execution instruction information of the target control is stored. The data information of the target control that satisfies the first condition includes flag information representing the response interface that triggers the target control. The execution instruction information of the target control belongs to the data information and is the execution instruction information of the response interface. Parse the execution instruction information to obtain the execution action and communication object, and generate a target intent description of the execution instruction information; Add the target intent description to the intent library.

2. The data processing method according to claim 1, based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, storing the target execution instruction information of the target control, including one of the following: If at least one of the controls satisfies the first condition, store the first execution instruction information of the first control; or; If there is a first control among the at least one controls that satisfies the first condition, store the first execution instruction information of the first control and the second execution instruction information of the second control. If the second control does not satisfy the first condition, the second control belongs to the at least one control.

3. The data processing method according to claim 2, based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, storing the execution instruction information of the target control includes: Based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, and the application satisfies the second condition, the execution instruction information of the target control is stored.

4. The data processing method according to claim 2, The execution action obtained by parsing the first execution instruction information is a reply, and the target intent description of the first execution instruction information is a description of the sending action for the first communication object.

5. The data processing method according to claim 2, The execution action obtained by parsing the second execution instruction information is viewing, and the target intent description of the second execution instruction information is a viewing action description for the first communication object.

6. A data processing method, comprising: Obtain input information, wherein the input information is the user's natural language expression; Obtain an intent library, which includes intent descriptions for at least one communication object; Based on the first model, the input information and the intent database are processed to obtain an intent description for the first communication object that matches the input information; Based on the intent description for the first communication object, determine the first execution instruction information corresponding to the intent description for the first communication object; The first execution instruction information is transmitted to the first application so that the first application responds based on the first execution instruction information.

7. The data processing method according to claim 6, further comprising: Obtain prompt words to guide the second model's operation; The second model processes the input information based on the prompt words to obtain the target input portion of the input information; Add the target input portion to the target identifier bit of the first execution instruction information; The step of transmitting the first execution instruction information to the first application, so that the first application responds to the input information based on the first execution instruction information, includes: The target intent description of the first execution instruction information is a description of the sending action for the first communication object. The first execution instruction information is transmitted to the first application so that the first application sends the target input portion to the first communication object based on the first execution instruction information.

8. The data processing method according to claim 6, wherein the first execution instruction information is transmitted to a first application, so that the first application responds to the input information based on the first execution instruction information, comprising: The target intent description of the first execution instruction information is a description of a viewing action for the first communication object. The first execution instruction information is transmitted to the first application so that the first application can view the information corresponding to the first communication object based on the first execution instruction information.

9. An electronic device comprising at least one processor and a memory connected to said processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to enable the electronic device to implement a data processing method, the data processing method comprising: The application receives notification information, which is generated by the application using a notification template that meets notification conditions. The notification template includes at least one control. The notification information includes data information constructed by the application for each of the at least one control to express the function of each of the at least one control. Parse the notification information to obtain data information for each of the at least one control in the notification information; Based on the data information of each of the at least one control, if there is a target control among the at least one control that satisfies the first condition, the execution instruction information of the target control is stored. The data information of the target control that satisfies the first condition includes flag information representing the response interface that triggers the target control. The execution instruction information of the target control belongs to the data information and is the execution instruction information of the response interface. Parse the execution instruction information to obtain the execution action and communication object, and generate a target intent description of the execution instruction information; Add the target intent description to the intent library.

10. An electronic device comprising at least one processor and a memory connected to said processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to enable the electronic device to implement a data processing method, the data processing method comprising: Obtain input information, wherein the input information is the user's natural language expression; Obtain an intent library, which includes intent descriptions for at least one communication object; Based on the first model, the input information and the intent database are processed to obtain an intent description for the first communication object that matches the input information; Based on the intent description for the first communication object, determine the first execution instruction information corresponding to the intent description for the first communication object; The first execution instruction information is transmitted to the first application so that the first application responds based on the first execution instruction information.