A task autonomous processing method, device, storage medium and electronic device
RPA code is generated through task processing large language model, and complex transactions in intelligent interactive services are automatically processed, solving the problem of low efficiency of existing intelligent interactive services and achieving convenient processing and efficient execution of user tasks.
Patent Information
- Application Number
- CN202411045830.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Existing intelligent interactive services cannot effectively handle complex transactions, resulting in cumbersome and inefficient user operations, and cannot provide convenient and easy-to-use intelligent interactive services.
The task processing large language model is adopted, and the target transaction is modeled based on the basic large language model, RPA code is generated, and the agent service object is controlled to execute the code to automatically complete user tasks, bridge users and target transactions, and realize task autonomous processing.
Through the collaborative work of the agent service object and task processing large language model, complex user tasks are automated, work efficiency is significantly improved, and convenient and easy-to-use intelligent interactive services are provided.
Smart Images

Figure CN118567626B_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for autonomous task processing. Background Art
[0002] With the popularization of electronic devices and the increasing complexity of transaction services provided by electronic devices, autonomous transaction service interaction has become increasingly important. It is still a major challenge to develop intelligent interactive services that can effectively navigate and interact with transaction services while providing convenient and easy-to-use services. Summary of the invention
[0003] This specification provides a task autonomous processing method, device, storage medium and electronic device, and the technical solution is as follows:
[0004] In a first aspect, this specification provides a method for autonomous task processing, the method comprising:
[0005] Obtaining the target task for the target transaction input by the user to the agent service object;
[0006] Based on the target task, a task processing large language model is used to generate a task execution code to obtain a target RPA code, wherein the task processing large language model is obtained by training a model based on a basic large language model using a reference task processing example for the target transaction;
[0007] Control the intelligent agent service object to execute the target RPA code on the target transaction to perform autonomous processing on the target task.
[0008] In a second aspect, this specification provides a method for training a large language model for task processing, the method comprising:
[0009] Creating an initial task processing big language model for the target transaction based on the basic big language model;
[0010] Acquire a reference task processing example and a sample task for the target transaction, wherein the task type of the sample task includes an extended task type other than the reference task type;
[0011] Model training is performed on the initial task processing large language model based on the reference task processing example and the sample task to obtain a task processing large language model after model training.
[0012] In a third aspect, this specification provides a task autonomous processing device, the device comprising:
[0013] Creating an initial task processing big language model for the target transaction based on the basic big language model;
[0014] Acquire a reference task processing example and a sample task for the target transaction, wherein the task type of the sample task includes an extended task type other than the reference task type;
[0015] Model training is performed on the initial task processing large language model based on the reference task processing example and the sample task to obtain a task processing large language model after model training.
[0016] In a fourth aspect, this specification provides a task processing large language model training device, the device comprising:
[0017] A model creation module, used to create an initial task processing big language model for a target transaction based on the basic big language model;
[0018] A data acquisition module, used to acquire a reference task processing example and a sample task for the target transaction, wherein the task type of the sample task includes an extended task type other than the reference task type;
[0019] The model training module is used to perform model training on the initial task processing large language model based on the reference task processing example and the sample task to obtain the task processing large language model after model training.
[0020] In a fifth aspect, the present specification provides a computer storage medium, wherein the computer storage medium stores at least one instruction, wherein the instruction is suitable for being loaded by a processor and executing the method steps of one or more embodiments of the present specification.
[0021] In a sixth aspect, the present specification provides a computer program product, wherein the computer program product stores at least one instruction, wherein the instruction is suitable for being loaded by a processor and executing the method steps of one or more embodiments of the present specification.
[0022] In a seventh aspect, the present specification provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps of one or more embodiments of the present specification.
[0023] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least:
[0024] In one or more embodiments of the present specification, the electronic device obtains the target task for the target transaction input by the user to the intelligent agent service object, generates the task execution code based on the target task using the task processing large language model to obtain the target RPA code, and controls the intelligent agent service object to execute the target RPA code on the target transaction to autonomously process the target task. The intelligent agent service object and the task processing large language model can effectively bridge the interaction between the user and the target transaction, automate the execution of complex user tasks, thereby providing users with convenient and easy-to-use intelligent interactive services and significantly improving work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in this specification or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 It is a scenario diagram of a task autonomous processing system provided in this specification;
[0027] Figure 2 It is a flowchart of a task autonomous processing method provided in this manual;
[0028] Figure 3 It is a schematic diagram of a task autonomous processing scenario provided in this manual;
[0029] Figure 4 This is a flowchart of a task execution code generation process provided in this manual;
[0030] Figure 5 It is a simplified schematic diagram of a target RPA code provided in this manual;
[0031] Figure 6 It is a flowchart of a task processing large language model training method provided in this specification;
[0032] Figure 7 It is a brief schematic diagram of an interface definition description provided in this manual;
[0033] Figure 8 This is a schematic diagram of a prompt word generated by the task code provided in this manual;
[0034] Fig. 9 This is a flowchart of a model training process for a large language model for task processing provided in this specification;
[0035] Fig.10This is a model training framework diagram for a large language model for task processing provided in this specification;
[0036] Fig.11 It is a schematic diagram of the structure of a large language model training device for task processing provided in this specification;
[0037] Fig.12 It is a schematic diagram of the structure of a task autonomous processing device provided in this specification;
[0038] Fig.13 It is a structural schematic diagram of an electronic device provided in this manual. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in this specification to clearly and completely describe the technical solutions in this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0040] In the description of this specification, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of this specification, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in this specification can be understood by specific circumstances. In addition, in the description of this specification, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.
[0041] In the related technologies, users hope to input tasks into applications based on intelligent interactive services, and then independently process the tasks based on the intelligent interactive services. However, in the related technologies, intelligent interactive services are often based on fixed interaction paradigms. For tasks that can be covered by the interaction paradigm, task processing can be achieved, but for tasks that cannot be covered by the interaction paradigm, the intelligent interactive services cannot help users process the tasks. Based on this, how to provide convenient and easy-to-use intelligent interactive services is an urgent problem that needs to be solved.
[0042] The present specification is described in detail below with reference to specific embodiments.
[0043] See also Figure 1 , is a schematic diagram of a scenario of a task autonomous processing system provided in this specification. Figure 1 As shown, the task autonomous processing system may include at least a client cluster and a service platform 100 .
[0044] The client cluster may include at least one client, such as Figure 1 As shown, it specifically includes client 1 corresponding to user 1, client 2 corresponding to user 2, ..., client n corresponding to user n, where n is an integer greater than 0.
[0045] Each client in the client cluster may be an electronic device with communication function, including but not limited to: wearable device, handheld device, personal computer, tablet computer, vehicle-mounted device, smart phone, computing device or other processing device connected to a wireless modem, etc. Electronic devices may be called different names in different networks, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), electronic devices in 5G network or future evolution network, etc.
[0046] The service platform 100 can be a separate server device, such as a rack-mounted, blade, tower, or cabinet-mounted server device, or a workstation, mainframe computer, or other hardware device with strong computing power; it can also be a server cluster composed of multiple servers, and the servers in the service cluster can be composed in a symmetrical manner, wherein each server has equivalent functions and status in the transaction link, and each server can provide services to the outside independently, and the independent service can be understood as not requiring the assistance of other servers.
[0047] In one or more embodiments of the present specification, the service platform 100 may establish a communication connection with at least one client in the client cluster, and complete the interaction of data in the task autonomous processing process based on the communication connection;
[0048] For example, the service platform 100 can provide agent object services to the client based on the task autonomous processing method of this specification;
[0049] For another example, the service platform 100 may obtain a target task for a target transaction input by a user to an agent service object from a client, and perform task execution code generation processing based on the target task using a task processing large language model to obtain a target RPA code, wherein the task processing large language model is obtained by model training based on a basic large language model using a reference task processing example for the target transaction;
[0050] For another example, the client can obtain the target task for the target transaction input by the user to the intelligent agent service object, and based on the target task request service platform 100, use the task processing large language model to generate the task execution code to obtain the target RPA code, and control the intelligent agent service object to execute the target RPA code on the target transaction to perform task autonomous processing on the target task, and control the intelligent agent service object to execute the target RPA code on the target transaction to perform task autonomous processing on the target task.
[0051] It should be noted that the service platform 100 and at least one client in the client cluster establish a communication connection through a network for interactive communication, wherein the network can be a wireless network or a wired network, the wireless network includes but is not limited to a cellular network, a wireless local area network, an infrared network or a Bluetooth network, and the wired network includes but is not limited to Ethernet, a universal serial bus (USB) or a controller local area network. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data (such as a target compressed package) exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.
[0052] The autonomous task processing system embodiment provided in this specification and the autonomous task processing method in one or more embodiments belong to the same concept. The execution subject corresponding to the autonomous task processing method in one or more embodiments of the specification can be the above-mentioned service platform 100; the execution subject corresponding to the autonomous task processing method in one or more embodiments of the specification can also be the electronic device corresponding to the client, which is determined based on the actual application environment. The implementation process of the autonomous task processing system embodiment can be found in the following method embodiment, which will not be repeated here.
[0053] based on Figure 1 The scenario diagram is shown, and the task autonomous processing method provided by one or more embodiments of this specification is introduced in detail below.
[0054] See also Figure 2 , a flowchart of a task autonomous processing method is provided for one or more embodiments of the present specification, the method can be implemented by a computer program and can be run on a task autonomous processing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application. The task autonomous processing device can be an electronic device.
[0055] Specifically, the task autonomous processing method includes:
[0056] S102: Obtaining a target task for a target transaction input by a user to an agent service object;
[0057] In this specification, the agent service object (Agent service object) is a computer program with perception, reasoning, and decision-making based on electronic devices. The agent service object is the service carrier object of the agent, relying on the task processing large language model in this specification to provide users with autonomous task processing functions for target transactions;
[0058] For example, the agent service object may be a service control that carries the agent service, and the user may trigger the service control corresponding to the agent service object and input the target task for the target transaction in the agent service interface corresponding to the service control;
[0059] Intelligent agent service objects can be applied to application scenarios such as artificial intelligence, robotics, virtual reality, games, automatic control, information retrieval, recommendation systems, and natural language processing.
[0060] The target transaction can be an application transaction, a web automation transaction, a robotic process automation transaction, an intelligent virtual assistant transaction, etc.
[0061] Taking the target transaction as an example of an application transaction, the application transaction can be based on a system application or a third-party application. The type of the target transaction is not limited. The target transaction can provide services to users. With the popularization of electronic devices and the increasing complexity of transaction services, in one or more embodiments of the present specification, in order to facilitate users, the target task input by the user can be implemented based on the intelligent body service, and the target transaction service indicated by the target task can be autonomously interacted with and task navigated, thereby completing the autonomous processing of the target task and saving the user's operation path for completing the target task, thereby improving task processing efficiency.
[0062] The target task can be understood as a task request based on the target transaction. The target task can be understood as the target task request information for the target transaction input by the user, that is, it refers to the autonomous task processing made by the user to the intelligent agent service object to request the intelligent agent service object to directly perform the target task.
[0063] Illustratively, the target transaction is a beverage application, and the target task for the beverage purchase program may be specifically, for example, "buy me a large cup of American coffee", etc., without limitation;
[0064] In an illustrative example, the target transaction is a traffic travel procedure, and the target task may be specifically, for example, "help me call an express car from point A to point B", etc., without limitation;
[0065] In this specification, the task autonomous processing method for large model scenarios can be applied to intelligent agent service objects, that is, users can interact with intelligent agent service objects so that the intelligent agent service objects can accurately and efficiently perform "autonomous operation target transactions" for users through the task processing large model to complete the target tasks.
[0066] Among them, the intelligent agent service object can include a variety of services for the target transaction, each service can rely on the target transaction to have corresponding service functions, the number of target transactions can be multiple different types of applications, and the services of multiple different types of applications can be jointly run to autonomously interact with the target transaction to complete the target person's autonomous interaction processing, and realize the transformation of human-computer interaction based on the target task into interaction between the intelligent agent and the application.
[0067] S104: Based on the target task, a task processing large language model is used to generate a task execution code to obtain a target RPA code, wherein the task processing large language model is obtained by training a model based on a basic large language model using a reference task processing example for the target transaction;
[0068] RPA code refers to Robotic Process Automation code, or RPA code for short; Robotic Process Automation RPA focuses on automating repetitive and rule-based tasks that are traditionally performed by humans interacting with transactions such as software applications. RPA code is designed to replicate human actions, such as clicking buttons, entering data, and navigating interfaces, to simplify transaction interaction processes and improve efficiency;
[0069] The target RPA code can be understood as the RPA code obtained by the task processing large language model performing task execution code generation processing on the target task. By executing the target RPA code in the target transaction, autonomous processing of the target task can be achieved. The target RPA code can be an executable script generated based on the target task described in natural language.
[0070] In this specification, an initial task processing large language model is created in advance based on the basic large language model, and then reference task processing examples of the target transaction are collected. The initial task processing large language model is trained using the reference task processing examples to obtain a task processing large language model that can process the target task. The task processing large language model is adapted to the reference task processing instance of the target transaction so that the task intent can be parsed to generate the target RPA code that can perform the target task operation on the target transaction.
[0071] In actual applications, the task processing large language model is associated with the agent service object to obtain the target task for the target transaction input by the user to the agent service object. The agent service object generates the task execution code based on the target task request task processing large language model to obtain the target RPA code.
[0072] In one or more embodiments of the present specification, the basic large language model may be a Wenxin Yiyan model, a Tongyi Qianwen model, a GPT model, etc.;
[0073] S106: Control the intelligent agent service object to execute the target RPA code on the target transaction to perform autonomous processing on the target task.
[0074] Illustratively, the verified target RPA code may be transmitted to the intelligent agent service object, and the intelligent agent service object executes the target RPA code on the target transaction to process the specified target task.
[0075] For example, Figure 3 As shown, Figure 3It is a schematic diagram of a task autonomous processing scenario, in which a user intends to achieve a target task of "buying a large cup of American coffee" in a certain beverage application, but the actual operation of the user to achieve "buying a large cup of American coffee" may require multiple and cumbersome operations to achieve, and the task implementation operation path is long and inconvenient. Based on this, the task autonomous processing method of one or more embodiments of this specification is adopted, and the user inputs the target task of "buying a large cup of American coffee" for the target transaction "a certain beverage application" to the intelligent agent service object, and then uses the task processing large language model to generate the task execution code for "buying a large cup of American coffee" to obtain the target RPA code, and then controls the intelligent agent service object to execute the target RPA code on the "certain beverage application" to automatically "buy a large cup of American coffee" for the user, thereby completing the target task.
[0076] In one or more embodiments of the present specification, the electronic device obtains the target task for the target transaction input by the user to the intelligent agent service object, generates the task execution code based on the target task using the task processing large language model to obtain the target RPA code, and controls the intelligent agent service object to execute the target RPA code on the target transaction to autonomously process the target task. The intelligent agent service object and the task processing large language model can effectively bridge the interaction between the user and the target transaction, automate the execution of complex user tasks, thereby providing users with convenient and easy-to-use intelligent interactive services and significantly improving work efficiency.
[0077] See also Figure 4 , Figure 4 This is a flowchart of a task execution code generation process proposed in one or more embodiments of this specification. To perform the task execution code generation process based on the target task using the task processing large language model to obtain the target RPA code, refer to the following method:
[0078] S2002: Generate a task code for the target task and generate prompt words;
[0079] In a feasible implementation, the target task can be directly used as a task code to generate prompt words;
[0080] In a feasible implementation, a task prompt word template may be preset, and the target task may be filled into the preset task prompt word template to obtain a task code generation prompt word;
[0081] Optionally, the preset task prompt word template may also include a prompt word for using a function tool for calling a function tool for a basic operation;
[0082] In a feasible implementation, the task request of the user's target task can be understood. For example, the target task input by the user can be parsed using natural language processing (NLP) technology to extract the key information and task requirement information of the task. Based on the parsed key information and task requirement information of the task, the intelligent agent service object generates a set of prompt words for task code generation. These prompt words are used as part of the input of the task processing large language model to guide the model to generate subsequent task operation sequences more accurately. The prompt words may include task type, key operation, object, specific parameters, and the use of function tool prompt words for calling function tools for basic operations, etc.
[0083] S2004: Inputting the task code generation prompt word into the task processing large language model, performing task operation sequence generation processing on the target task through the task processing large language model to obtain a target task execution step sequence, and performing task code generation processing based on the target task execution step sequence using a basic operation calling function tool to obtain a target RPA code;
[0084] Exemplarily, the task code generation prompt word is input into the task processing large language model, and the task processing large language model uses the input prompt word to generate a series of task operation steps, and then uses the basic operation call function tool to determine the target task operation call function to be called for each task operation step, and performs task code generation processing based on a series of task operation steps and the target task operation call function to obtain the target RPA code. For example, the target RPA code can be a code script, code program, etc. that calls the basic operation call function tool;
[0085] In a feasible implementation, the task processing large language model performs task operation sequence generation processing on the target task to obtain a target task execution step sequence, and performs task code generation processing based on the target task execution step sequence using the basic operation calling function tool to obtain a target RPA code, including:
[0086] A2: performing task operation generation processing on the target task to obtain a target task execution step sequence, and determining execution step explanation information corresponding to the task execution step sequence;
[0087] Schematically, the task processing large language model parses the user's target task request based on the prompt words. This includes understanding the specific requirements of the target task, and also involves decomposing these specific requirements into a series of specific task execution steps for the target transaction in combination with the target transaction. All task execution steps form a target task execution step sequence according to the operation sequence, and can also generate execution step explanation information for the task execution steps in the task execution step sequence;
[0088] The purpose of introducing execution step explanation information into the target RPA code is to increase the transparency of model processing and code maintainability. The task processing large language model will generate explanation information for each step, including the step function information and step execution information of each step.
[0089] A4: Determine the target task operation sequence calling function corresponding to the target task execution step sequence through the basic operation calling function tool;
[0090] The basic operation calling function tool can be understood as the pre-abstracting of basic general operations for the target transaction (service), such as click, slide, long press, move and other basic general operations. The basic operation calling function tool can be adapted to the target transaction. The basic operation calling function tool contains various predefined basic operation calling functions or API calls. The basic operation calling function tool can greatly reduce the difficulty of task code generation for the large model. It is only necessary to generate step code snippets for each task execution step around the basic operation calling function tool. The basic operation calling function tool may include basic transaction operations, database queries, API interactions, and so on. It can be understood that the task processing large language model maps each step in the task execution step sequence to one or more specific basic operation calling functions in the basic operation calling function tool. The basic operation calling functions corresponding to each task execution step constitute the target task operation sequence calling function according to the operation sequence;
[0091] A6: Based on the target task execution step sequence, the execution step explanation information, and the target task operation sequence, a function is called to perform task code generation processing to obtain a target RPA code.
[0092] The task processing large language model integrates the execution step explanation information, execution step sequence and function call. The task processing large language model will use the execution step sequence, step explanation information and operation sequence obtained in the first two steps to call the function and generate the actual target RPA code.
[0093] S2006: Control the task processing large language model to output the target RPA code.
[0094] The final generated RPA code is an automated script, which is based on the user's original task request and is converted into specific operations that can be performed on the target transaction through intelligent parsing and code generation. This automated script can perform complex tasks, reduce manual intervention, and improve processing speed and accuracy.
[0095] Indicatively, Figure 5 As shown, Figure 5It is a simple schematic diagram of the target RPA code. Assuming that the target task is to achieve the target task "buy a cup of matcha latte" in a beverage application, the task processing language model determines the sequence of target task execution steps as follows Figure 5 The step sequence shown in the figure consists of 9 task execution steps. Each step corresponds to the call of the basic operation calling function. For example, the third step "Enter the name of the meal Matcha Latte" needs to call the basic operation calling function "self.clikckAndGetExpose". Each task execution step in the target RPA code is accompanied by the execution step explanation information, such as "The second step is to click search", "The third step is to enter the name of the meal Matcha Latte", etc.
[0096] In one or more embodiments of this specification, large language models, natural language processing technology, and best practices in software engineering are fully utilized to ensure that each step from user requirements to final code generation is efficient and accurate. Figure 5 ,In this way, the generated code snippet is displayed, which is suitable for selecting meals and their quantities for an application. Each step contains explanatory comments, which enhances the readability of the code and can achieve efficient and accurate task automation, thereby significantly improving operational efficiency and reducing error rates. By carefully parsing user task requests, generating detailed execution steps and corresponding codes, it can help save time, reduce operation path costs, and simplify user transaction operation processes.
[0097] See also Figure 6 , a flowchart of a large language model training method for task processing is provided for one or more embodiments of this specification. The method can be implemented by a computer program and can be run on a large language model training device for task processing based on the von Neumann system. The large language model training device for task processing and the task autonomous processing device can be the same or different. The computer program can be integrated into an application or run as an independent tool application. The task autonomous processing device can be an electronic device.
[0098] S302: Creating an initial task processing big language model for the target transaction based on the basic big language model;
[0099] In a feasible implementation, the initial task processing large language model can be a model structure composed of at least one model module based on the basic large language model component, and then obtained after model training for the task processing scenario of the target transaction. The basic large language model (LLM) is an artificial intelligence content generation model designed to understand and generate human language. The basic large language model is trained on a large amount of data, and the trained task processing large language model can perform a wide range of tasks, including text summarization, task processing, code generation, etc.
[0100] Optionally, the basic large language model can be a common AIGC model, such as the Wenxin Yiyan large model, the Tongyi Qianwen large model, the GPT series large model, etc.
[0101] S304: Acquire a reference task processing example and a sample task for the target transaction, wherein the task type of the sample task includes an extended task type other than the reference task type;
[0102] In an illustrative manner, a trained basic large language model can be obtained, adapted to the task processing scenario, and reference task processing examples and sample tasks for the target transaction can be obtained. The reference task processing examples and sample tasks together constitute sample training data. Sample RPA code labels can be annotated in advance by expert end services for sample tasks in the sample training data.
[0103] Optionally, the task type of the sample task includes an extended task type in addition to the reference task type, so that the task processing large language model can learn from the user reference task demonstration, generalize to unseen extended tasks, and support providing transparent explanations for extended task operations.
[0104] In a feasible implementation, a reference task processing example is used to perform model understanding training on the initial task processing large model to understand the user's operation process in the reference task processing example. During the model training process, a sample task is used to perform task processing training on the initial task processing large model to obtain a predicted sample RPA code. Based on the predicted sample RPA code and the sample RPA code label, the model parameters of the initial task processing large model are adjusted to obtain the task processing large model after model training.
[0105] Then, the initial task processing large language model may be trained based on the reference task processing example and the sample task to obtain a task processing large language model after model training. For details, refer to S306-S308;
[0106] S306: Generate sample task code generation prompt words for reference task processing examples and sample tasks based on a preset code generation prompt word structure and a basic operation calling function tool;
[0107] Schematically, the preset code generation prompt word structure can be understood as a prompt word generation template, which is used to generate sample task code generation prompt words for reference task processing examples and sample tasks; based on the preset code generation prompt word structure and the basic operation calling function tool, the prompt word structure content can be filled to generate sample task code generation prompt words for reference task processing examples and sample tasks;
[0108] Schematically, the basic operation calling function tool can be understood as pre-abstracting basic general operations for the target transaction (service), such as click, slide, long press, move, type selection and other basic general operations. The basic operation calling function tool can be adapted to the target transaction. The basic operation calling function tool contains various predefined basic operation calling functions or API calls. The basic operation calling function tool can greatly reduce the difficulty of task code generation for the large model, indicating that the large model can directly call the implemented function attack when generating code, and only needs to generate step code snippets for each task execution step around the basic operation calling function tool. The basic operation calling function tool may include basic transaction operations, database queries, API interactions, etc. It can be understood that the task processing large language model maps each step in the task execution step sequence to one or more specific basic operation calling functions in the basic operation calling function tool. The basic operation calling function corresponding to each task execution step constitutes the target task operation sequence calling function according to the operation sequence;
[0109] For example, a basic operation calling function tool is provided for code generation. The basic operation calling function tool includes a function interface for calling the basic operation calling function. Please refer to Figure 7 , Figure 7 It is a brief diagram of an interface definition. Figure 7 The function interfaces of some basic operation calling functions in the basic operation calling function tool are shown in FIG. 1 , such as clickAndGetExpose calling function, type calling function, scrollAndGetExpose calling function, and enter calling function. Figure 7 The specific definition and description of the function interface of these basic operation calling functions are shown.
[0110] In a feasible implementation, a prompt word generation method is illustrated, which uses a series of refined prompt words to guide and optimize the performance of a large language model when generating task processing code. The prompt words cover multiple aspects of the task, including roles, skills, constraints, tool descriptions, and reference operation information. The following method can be used to generate prompt words for reference task processing examples and sample task codes based on the preset code generation prompt word structure and basic operation call function tool:
[0111] 1. Generate prompt word structure and basic operation call function tool based on preset code, determine role prompt words, task processing skill prompt words, constraint condition prompt words, tool description prompt words and reference task operation information prompt words;
[0112] The preset code generation prompt word structure indicates that the role prompt words, task processing skill prompt words, constraint condition prompt words, tool description prompt words and reference task operation information prompt words need to be determined;
[0113] Role prompts: Define the roles or entities involved in the task execution. For example, in a transaction autonomous processing scenario, the roles can be code experts, technical support experts, etc. This helps the model understand the tasks requirements and the operations and permissions associated with a specific role.
[0114] Task processing skills prompt words: Describe the specific skills or techniques required to complete the task. For example, if the task involves data analysis, the prompt words may include "data mining", "statistical analysis", etc.
[0115] Constraint prompts: Describe the restrictions or rules that must be considered when performing the task. For example, time constraints, budget restrictions, or specific data processing rules (such as GDPR compliance).
[0116] Tool description prompt words: Describe the basic operation calling function tool used for task processing;
[0117] Reference task operation information prompt words: Provides operation information corresponding to the reference task processing example for processing the reference task, helping the model understand how to learn from past experience and solutions of the reference task in similar situations. Reference task operation information prompt words can represent queries and complete operation sequences that demonstrate reference task processing examples;
[0118] 2. Generate prompt words for sample task code generation for reference task processing examples and sample tasks based on the role prompt words, task processing skill prompt words, constraint condition prompt words, tool description prompt words and reference task operation information prompt words.
[0119] For example, please refer to Figure 8 , Figure 8 This is a schematic diagram of the task code generation prompt word, based on the preset code generation prompt word structure and the sample task code generation prompt word generated by the basic operation calling function tool. Figure 8 In the example, role prompts, task processing skill prompts, constraint prompts, tool description prompts, and reference task operation information prompts are given. The reference task operation information prompts are Figure 8 The "Example Operation Sequence" in the example, the {current_demo_with_code} attachment represents the query and complete operation sequence of the reference task demonstration, {api_spec} represents the basic operation call function tool given, and the sample task is "Order me a Matcha Latte at Starbucks".
[0120] S308: Based on the sample task code generation prompt words, the reference task processing example and the basic operation calling function tool, perform at least one round of model training on the initial task processing large language model, determine the predicted sample RPA code obtained after the initial task processing large language model performs task execution code generation processing on the sample task, and adjust model parameters of the initial task processing large language model based on the predicted sample RPA code until the initial task processing large language model completes model training to obtain the task processing large language model.
[0121] Exemplarily, the prompt words generated based on the sample task code, the reference task processing example and the basic operation calling function tool are used as model inputs, and output to the initial task processing large language model for model training;
[0122] In the process of model forward propagation training, the initial task processing large language model performs task execution code generation processing on the sample task to obtain the predicted sample RPA code;
[0123] During the model back-propagation training process, the target model loss is calculated for the initial task processing large language model based on the predicted sample RPA code, and the model loss value is used to adjust the model parameters until the initial task processing large language model meets the model end training conditions, so as to end the model training and obtain the task processing large language model.
[0124] In a feasible implementation manner, the adjusting model parameters of the initial task processing large language model based on the predicted sample RPA code includes:
[0125] A sample RPA code label for a sample task is obtained, a target model loss is determined based on the predicted sample RPA generation and the sample RPA code label, and the target model loss is used to adjust model parameters of the initial task processing large language model.
[0126] Illustratively, a loss calculation function is used to calculate the target model loss based on the predicted sample RPA generation and the sample RPA code label;
[0127] Optionally, the loss calculation function may adopt a cross entropy loss calculation function, a hinge loss calculation function, a contrast loss calculation function, a Euclidean distance loss calculation function, etc. in the related technology;
[0128] Optionally, the model training end condition of the model may include, for example, the value of the loss function is less than or equal to a preset loss function threshold, the number of iterations reaches a preset number threshold, etc. The specific model training end condition can be determined based on actual conditions and is not specifically limited here.
[0129] It should be noted that the machine learning models involved in one or more embodiments of this specification include but are not limited to the fitting of one or more machine learning models such as Convolutional Neural Network (CNN) model, Deep Neural Network (DNN) model, Recurrent Neural Networks (RNN) model, embedding model, Gradient Boosting Decision Tree (GBDT) model, Logistic Regression (LR) model, etc.;
[0130] In one or more embodiments of the present specification, the above-mentioned method can be used to train a large language model for task processing, which can learn from user reference task demonstrations, generalize to unseen extended tasks, and support providing transparent explanations of extended task operations, thereby enhancing the generalization ability of the intelligent agent service object combined with the large language model for task processing.
[0131] See also Fig. 9 , Fig. 9 It is a flow chart of the model training of the task processing large language model proposed in one or more embodiments of this specification. The (initial) task processing large language model includes a demonstration coding module, a code generation module, a UI (User Interface) mapping module and a behavior cloning fusion module. Specifically, the tool for generating prompt words based on the sample task code, the reference task processing example and the basic operation calling function performs at least one round of model training on the initial task processing large language model. The following implementation methods can be referred to, specifically:
[0132] S4002: Using the sample task code to generate prompt words, the reference task processing example, and the basic operation calling function tool to perform model training on the initial task processing large language model;
[0133] For example, Fig.10 As shown, Fig.10 It is a model training framework diagram for task processing large language models. Fig.10 The large language model (LLM) is shown combined with a chain of behavioral cloning by learning demonstrations to create an interpretable processing large language model for transactional interactions such as mobile application transactions. A schematic model structure of the (initial) task processing large language model mainly includes a demonstration encoding module (such as Fig.10 "Demonstration Code" in red font), code generation module (such as Fig.10"Code Generation" in red font), UI Mapping Module (such as Fig.10 The model structure is used for the behavior cloning fusion module of "behavior cloning chain fusion" (such as Fig.10 These modules work together to enable the LLM agent to learn from user demonstrations, generalize to unseen tasks, and provide transparent explanations of its actions.
[0134] 1. The demonstration encoding module can capture (such as Fig.10 The reference task processing example input in the initialization phase of the reference task processing example) refers to the user demonstration in the task processing example and constructs it into a format that can be processed by a large language model, using advanced visual question-answering models to extract rich semantic information.
[0135] Optionally, the demonstration coding module may be constructed based on a machine learning model, for example, may be constructed using an advanced visual question answering model;
[0136] 2. The code generation module uses the generation function of LLM (Large Language Model) to convert the coded demonstration into modular, parameterized and interpretable code snippets (see Fig.10 The code snippets of the code generation link shown in c). Optionally, the code generation module can be constructed based on the basic large language model;
[0137] 3. The UI mapping module establishes a correspondence between the generated code snippets and the relevant interface UI elements within the application to ensure accurate and seamless autonomous interaction.
[0138] 4. (Initial) Task Processing The large language model introduces the behavior clone chain fusion method, and builds a behavior clone fusion module based on the behavior clone chain fusion method (see Fig.10 The behavior cloning (fusion) module in the CNN allows the (initial) task handling large language model to learn from multiple demonstrations and merge the learned behaviors into a cohesive and flexible interaction model (called the task interaction behavior knowledge model). This behavior cloning chain fusion method enhances the generalization ability of the agent, enabling it to effectively adapt to new scenarios and combine and execute appropriate learning functions according to the identified task requirements.
[0139] The following Fig.10 The model training framework of the task processing large language model shown is explained in conjunction with the specific steps as follows:
[0140] S4004: performing task demonstration coding training processing based on the reference task processing example by the demonstration coding module to obtain a task demonstration operation structured sequence;
[0141] The demonstration encoding module captures the user demonstrations in the reference task processing example and structures them into a format that can be processed by the large language model. The demonstration encoding module extracts rich semantic information. The user demonstrations in the reference task processing example are represented as a series of actions performed within a target transaction such as an application transaction (these actions constitute Fig.10 action sequence prototype shown);
[0142] In a feasible implementation, the following method may be referred to:
[0143] B2: Determine, by means of the demonstration coding module, a reference task action sequence in the reference task processing example and a demonstration action behavior representation corresponding to the reference task action, wherein the demonstration action behavior representation includes an action type representation, an action interaction representation, and a transaction interface UI metadata representation;
[0144] The demonstration encoding module performs demonstration analysis on the reference task processing example: the reference task action sequence in the reference task processing example consists of a series of demonstration actions (reference task actions), and the reference task action sequence is represented as D = {a1, a2, ..., a n}, where each reference task action a i Represented as a demonstration action behavior representation (τ i ,e i , m i ), where the action type represents τ i Indicates the basic operation type (for example, Fig.10 Click, input, scroll, input, return shown in ); action interaction representation ei represents the interaction elements between actions and transaction interfaces; transaction interface UI metadata representation m i It can be understood as the relevant interface metadata on the transaction interface such as the application transaction interface, such as text, identifiers, and boundaries.
[0145] B4: Based on the reference task action sequence and the demonstration action behavior representation, feature structuring processing is performed to obtain a task demonstration operation structured sequence including demonstration task action coding, wherein the coding tuple corresponding to the demonstration task action coding includes an action type coding, an associated text coding, an interactive element identification coding, a visual feature coding and an application display text list coding.
[0146] After the demonstration coding module performs demonstration analysis on the reference task processing example, it performs feature structured processing based on the reference task action sequence and the demonstration action behavior representation to obtain a task demonstration operation structured sequence (which can be called demonstration coding) including demonstration task action coding: convert the reference task action sequence D into a structured representation to obtain a task demonstration operation structured sequence E D={s1,s2,...,s n};
[0147] Each encoded demonstration task action s i All correspond to coding tuples (coding information combinations) (τi,ti,idi,vi,expi);
[0148] Among them, the action type code: τ i ; Associated text code: t i ; The identifier of the interactive element, also known as the interactive element identification code id i ; Visual feature encoding: v i ; Application display text list (text list displayed on the transaction screen interface) code: exp i ;
[0149] For example, the demonstration encoding module can capture rich semantic information about interactive elements by leveraging the VQA model, so that the agent can generalize to never-before-seen scenarios and provide accurate explanations for its behavior. In some embodiments, the demonstration encoding module can automatically determine the step explanation for each step after completing the demonstration encoding.
[0150] S4006: The code generation module uses the basic operation calling function tool to perform task execution code generation training based on the task demonstration operation structured sequence to obtain a reference task behavior RPA code including all reference operation RPA code snippets.
[0151] In a feasible implementation, the following method may be referred to:
[0152] Based on the structured sequence of task demonstration operations, the basic operation calling function tool is used to perform task step execution code conversion to obtain reference operation RPA code snippets corresponding to all reference operations, and reference execution step explanations are generated for the reference operation RPA code snippets, and reference task behavior RPA code is generated based on all the reference operation RPA code snippets and the reference execution step explanations.
[0153] Exemplarily, the code generation module is a module based on the basic LLM, which can utilize the generation function of the LLM to convert the coded task demonstration operation into a structured sequence E D Convert into executable RPA code (refer to task behavior RPA code).
[0154] Based on the task demonstration operation structured sequence, use the basic operation call function tool to convert each encoding step into i Perform task step execution code conversion to obtain all reference operations s i Corresponding reference operation RPA code snippet c i,Complete the generation of a code fragment C={c1,c2,...,c n}, the generation process can be expressed as: i =L(s i ,M,θ), where θ represents the learnable large language model parameters, L represents the encoding generation process of the large language model LLM, and s i represents the demonstration task action encoding, M represents the step s i The UI metadata of the transaction interface involved;
[0155] Optionally, the code generation module is configured to mine potential loop structures in the code snippets, that is, the number of generated code snippets may be smaller than the code snippets in the original reference task. This is because there are potential loop structures in the code. The code generation module intelligently identifies and utilizes these potential loop structures to generate concise and efficient code that accurately replicates the demonstrated behavior.
[0156] In order for the code generation module to generalize to unseen actions, the code generation module uses demonstration techniques from image recognition to identify reference tasks and extract the relevant hyperparameters H={h1,h2,...,hk} of the model during task processing. These hyperparameters form a set of choices that allow the large language model to dynamically adjust the generated code based on the identified parameters. The extraction of hyperparameters can be expressed as: h j =R(vi,φ), where R is the task processing of a large language model with image recognition capabilities and learnable parameters. The generated code snippet c i It is configured to be modular, parameterized, and comes with explanatory comments to ensure transparency and interoperability. The above code generation module can easily understand and modify the generated code, enhancing the interpretability and adaptability of large language models for task processing.
[0157] S4008: Performing application UI element mapping training processing on the target transaction based on the reference operation RPA code snippet by the UI mapping module to obtain target transaction UI operation mapping information;
[0158] The UI mapping module can also be called the UI Mapping module, which generates the code snippet corresponding to the operation. i Establishing a corresponding relationship with operation-related UI elements in a transaction interface such as an application transaction interface, the combination of which is called target transaction UI operation mapping information;
[0159] Optionally, the UI mapping module mainly adopts two methods: text and identifier matching, and visual information matching.
[0160] The text and identifier matching method locates the target element of the interaction by matching the text and resource identifier of the UI element. This method uses the structured representation of the application UI hierarchy to find the most relevant element based on the encoded step information.
[0161] Visual information matching methods use visual features and basic algorithms to locate UI elements based on their appearance. i By comparing with the visual information of the UI elements, the UI mapping module can accurately identify the target UI element targeted by a step in the transaction interface when the text or identifier information is vague or missing.
[0162] The UI mapping module can be expressed as: i =M(s i ,U,ψ), where u i is the encoding step s i The corresponding UI elements, U is the UI hierarchy of the transaction application, and ψ represents the learnable parameters of the mapping function M. The UI mapping module ensures that the generated code can be seamlessly executed within the application, mimicking the user's operations with high fidelity. The UI mapping module also provides an explanation of how the large language model recognizes and interacts with specific UI elements, thereby enhancing the transparency and explainability of task processing.
[0163] S4010: Clone the behavior representation of the reference task behavior RPA code through the behavior cloning fusion module to obtain a reference task behavior representation, perform behavior knowledge fusion based on all task behavior representations to obtain a task interaction behavior knowledge model, perform task operation generation processing on the sample task through the task interaction behavior knowledge model to obtain a sample task execution step sequence, and perform task code generation processing based on the sample task execution step sequence using the basic operation calling function tool to obtain a predicted sample RPA code;
[0164] Among them, the task behavior representation includes a reference task behavior representation, or the task behavior representation includes a reference task behavior representation and a sample task behavior representation corresponding to the predicted sample RPA code.
[0165] In order to further enhance the generalization ability of the task processing model, the task processing model introduces a clone fusion module based on the behavior clone chain fusion technology. The clone fusion module learns from multiple reference task demonstrations and merges the learned behaviors into a cohesive and flexible task interaction behavior knowledge model. It should be noted that during the model back-propagation training process, the target model loss calculated based on the preset sample RPA code label will reversely fine-tune the sample task behavior representation corresponding to the current predicted sample RPA code. Based on this, the behavior knowledge will be fused based on all task behavior representations to obtain the task interaction behavior knowledge model.
[0166] Let D = {D1, D2, ..., D m} is a set of m demonstrations that teach different sample tasks. Each demonstration Di is encoded and processed by the code generation module, resulting in a set of learning behaviors F={f1,f2,...,f m}. The behavior cloning fusion module (denoted as B) dynamically calls and combines these learned functions according to the identified task requirements. Given a new task T, the fusion process can be expressed as: f=B(T,F,ξ), where f is the fused behavior function and ξ represents the learnable parameters of the fusion module. The behavior cloning fusion module intelligently selects and executes appropriate learned functions by fusing the behavior function f, enabling the task processing large language model to effectively adapt to tasks in new scenarios. By leveraging the knowledge gained from multiple demonstrations, the task processing large language model can handle a wide range of new tasks with the task interaction behavior knowledge model and exhibit more robust and flexible behaviors.
[0167] Exemplarily, the behavior cloning fusion module plays an important role in enhancing the generalization ability of large language models for task processing. The behavior cloning fusion module combines the learned demonstration knowledge of reference behaviors in a novel way, enabling it to solve unknown tasks by combining and adjusting the knowledge obtained from different demonstrations.
[0168] In one or more embodiments of the present specification, through the above-mentioned model training method, combined with LLM and clone learning, the user's operation process can be efficiently understood. For complex tasks, the demonstration coding module is used to disassemble it step by step to understand the meaning of each step. Then, through the code generation method, the complex logic is connected in series, and then the natural language and real operations are accurately mapped through the UI mapping module. At the same time, the behavior-based clone fusion module can be deeply integrated through the learning of multiple demonstrations to enhance the generalization ability of the model. The large language model for task processing trained can greatly improve the success rate of the task. It works in conjunction with the intelligent agent service to capture user demonstrations, generate executable code snippets, and establish an accurate correspondence between code and UI elements.
[0169] The following will be combined Fig.11 , the task processing large language model training device and the task autonomous processing device provided in this specification are introduced in detail. It should be noted that, Fig.11 The task processing large language model training device and task autonomous processing device shown are used to execute this instruction manual Figure 1 to Figure 10 For the sake of convenience, only the parts related to this specification are shown. For specific technical details not disclosed, please refer to this specification. Figure 1 to Figure 11 The embodiment shown.
[0170] See also Fig.11 , which shows a schematic diagram of the structure of the task processing large language model training device of this specification. The task processing large language model training device 1 can be implemented as all or part of the device through software, hardware or a combination of both. According to some embodiments, the task processing large language model training device 1 includes a model creation module 11, a data acquisition module 12 and a model training module 13, which are specifically used to:
[0171] A model creation module 11, used to create an initial task processing large language model for a target transaction based on the basic large language model;
[0172] A data acquisition module 12, used to acquire a reference task processing example and a sample task for the target transaction, wherein the task type of the sample task includes an extended task type other than the reference task type;
[0173] The model training module 13 is used to perform model training on the initial task processing large language model based on the reference task processing example and the sample task to obtain a task processing large language model after model training.
[0174] Optionally, the model training module 13 is used to:
[0175] Generate sample task code generation prompts for reference task processing examples and sample tasks based on a preset code generation prompt structure and a basic operation calling function tool;
[0176] Based on the sample task code generation prompt words, the reference task processing example and the basic operation calling function tool, at least one round of model training is performed on the initial task processing large language model, and the predicted sample RPA code obtained after the initial task processing large language model performs task execution code generation processing on the sample task is determined; based on the predicted sample RPA code, model parameters of the initial task processing large language model are adjusted until the initial task processing large language model completes model training to obtain the task processing large language model.
[0177] Optionally, the initial task processing large language model includes a demonstration coding module, a code generation module, a UI mapping module and a behavior cloning fusion module, and the model training module 13 is used to:
[0178] The sample task code generates prompt words, the reference task processing example and the basic operation calling function tool to perform model training on the initial task processing large language model;
[0179] During model training:
[0180] Performing task demonstration coding training processing based on the reference task processing example by the demonstration coding module to obtain a task demonstration operation structured sequence;
[0181] And, the code generation module uses the basic operation calling function tool to perform task execution code generation training based on the task demonstration operation structured sequence to obtain a reference task behavior RPA code including all reference operation RPA code fragments;
[0182] And, the UI mapping module performs application UI element mapping training processing on the target transaction based on the reference operation RPA code snippet to obtain target transaction UI operation mapping information;
[0183] And, the reference task behavior RPA code is cloned by the behavior cloning fusion module to obtain a reference task behavior representation, behavior knowledge fusion is performed based on all task behavior representations to obtain a task interaction behavior knowledge model, task operation generation processing is performed on the sample task by the task interaction behavior knowledge model to obtain a sample task execution step sequence, and task code generation processing is performed based on the sample task execution step sequence using the basic operation calling function tool to obtain a predicted sample RPA code;
[0184] The behavior representation includes a reference task behavior representation, or the behavior representation includes a sample task behavior representation corresponding to the predicted sample RPA code.
[0185] Optionally, the model training module 13 is used to:
[0186] Determine, by means of the demonstration coding module, a reference task action sequence in the reference task processing example and a demonstration action behavior representation corresponding to the reference task action, wherein the demonstration action behavior representation includes an action type representation, an action interaction representation, and a transaction interface UI metadata representation;
[0187] Based on the reference task action sequence and the demonstration action behavior representation, feature structuring processing is performed to obtain a task demonstration operation structured sequence including demonstration task action coding, and the coding tuple corresponding to the demonstration task action coding includes action type coding, associated text coding, interactive element identification coding, visual feature coding and application display text list coding.
[0188] Optionally, the model training module 13 is used to:
[0189] Based on the structured sequence of task demonstration operations, the basic operation calling function tool is used to perform task step execution code conversion to obtain reference operation RPA code snippets corresponding to all reference operations, and a reference execution step explanation is generated for the reference operation RPA code snippets;
[0190] A reference task behavior RPA code is generated based on all the reference operation RPA code snippets and the reference execution step interpretations.
[0191] Optionally, the model training module 13 is used to:
[0192] Get sample RPA code tags for sample tasks;
[0193] A target model loss is determined based on the predicted sample RPA generation and the sample RPA code label, and the target model loss is used to adjust model parameters of the initial task processing large language model.
[0194] Optionally, the model training module 13 is used to:
[0195] Generate prompt word structure and basic operation call function tool based on preset code, determine role prompt word, task processing skill prompt word, constraint condition prompt word, tool description prompt word and reference task operation information prompt word;
[0196] Based on the role prompt words, task processing skill prompt words, constraint condition prompt words, tool description prompt words and reference task operation information prompt words, sample task code generation prompt words are generated for reference task processing examples and sample tasks.
[0197] It should be noted that the task processing large language model training device provided in the above embodiment may be the same device as the task autonomous processing device or may not be the same device. When the task processing large language model training device executes the task processing large language model training method, it only uses the division of the above-mentioned functional modules as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the task processing large language model training device provided in the above embodiment and the task processing large language model training method embodiment belong to the same concept. The implementation process is detailed in the method embodiment, which will not be repeated here.
[0198] See also Fig.12 , which shows a schematic diagram of the structure of the task autonomous processing device of this specification. The task autonomous processing device 2 can be implemented as all or part of the device through software, hardware or a combination of both. According to some embodiments, the task autonomous processing device 2 includes a task acquisition module 21, a code generation module 22 and a task processing module 23, which are specifically used to:
[0199] The task acquisition module 21 is used to acquire the target task for the target transaction input by the user to the intelligent agent service object;
[0200] A code generation module 22 is used to generate task execution code based on the target task using a task processing large language model to obtain a target RPA code, wherein the task processing large language model is obtained by training a model based on a basic large language model using a reference task processing example for the target transaction;
[0201] The task processing module 23 is used to control the intelligent agent service object to execute the target RPA code on the target transaction so as to perform autonomous processing on the target task.
[0202] Optionally, the code generation module 22 is used to:
[0203] Generate task code generation prompt words for target tasks;
[0204] Inputting the task code generation prompt word into the task processing large language model, performing task operation sequence generation processing on the target task through the task processing large language model to obtain a target task execution step sequence, and performing task code generation processing based on the target task execution step sequence using a basic operation calling function tool to obtain a target RPA code;
[0205] The task processing large language model is controlled to output the target RPA code.
[0206] Optionally, the code generation module 22 is used to:
[0207] Performing task operation generation processing on the target task to obtain a target task execution step sequence, and determining execution step explanation information corresponding to the task execution step sequence;
[0208] Determine the target task operation sequence calling function corresponding to the target task execution step sequence by using the basic operation calling function tool;
[0209] Based on the target task execution step sequence, the execution step explanation information and the target task operation sequence, a function is called to perform task code generation processing to obtain a target RPA code.
[0210] The above serial numbers in this specification are for description only and do not represent the advantages or disadvantages of the embodiments.
[0211] The present specification also provides a computer storage medium, which can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 1 to Figure 10 The task autonomous processing method and / or task processing large language model training method of the illustrated embodiment, the specific execution process can be referred to in Figure 1 to Figure 10 The specific description of the illustrated embodiment will not be repeated here.
[0212] The present specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 to Figure 10 The task autonomous processing method and / or task processing large language model training method of the illustrated embodiment, the specific execution process can be referred to in Figure 1 to Figure 10 The specific description of the illustrated embodiment will not be repeated here.
[0213] Please refer to Fig.13 , is a block diagram of a structure of an electronic device provided in an embodiment of this specification. The electronic device in this specification may include one or more of the following components: a processor 1010, a memory 1020, an input device 1030, an output device 1040, and a bus 1050. The processor 1010, the memory 1020, the input device 1030, and the output device 1040 may be connected via a bus 1050.
[0214] The processor 1010 may include one or more processing cores. The processor 1010 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1020, and calling data stored in the memory 1020. Optionally, the processor 1010 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1010 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1010, but may be implemented separately through a communication chip.
[0215] The memory 1020 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1020 includes a non-transitory computer-readable storage medium. The memory 1020 may be used to store instructions, programs, codes, code sets, or instruction sets.
[0216] The input device 1030 is used to receive input instructions or data, and the input device 1030 includes but is not limited to a keyboard, a mouse, a camera, a microphone or a touch device. The output device 1040 is used to output instructions or data, and the output device 1040 includes but is not limited to a display device and a speaker. In the embodiment of this specification, the input device 1030 can be a temperature sensor for obtaining the operating temperature of the electronic device. The output device 1040 can be a speaker for outputting audio signals.
[0217] In addition, those skilled in the art can understand that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes radio frequency circuits, input units, sensors, audio circuits, wireless fidelity (WIFI) modules, power supplies, Bluetooth modules and other components, which will not be described in detail here.
[0218] In the embodiments of this specification, the execution subject of each step may be the electronic device described above. Optionally, the execution subject of each step is the operating system of the electronic device. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiments of this specification.
[0219] exist Fig.13 In an electronic device, the processor 1010 can be used to call the program stored in the memory 1020 and execute it to implement the task autonomous processing method and / or the task processing large language model training method as described in the various method embodiments of this specification.
[0220] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0221] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the reference task processing examples and sample tasks involved in this specification are all obtained with full authorization.
[0222] The above disclosure is only the preferred embodiment of this specification, which certainly cannot be used to limit the scope of rights of this specification. Therefore, equivalent changes made according to the claims of this specification are still within the scope covered by this specification.
Claims
1. A method for training a large language model for task processing, the method comprising: Creating an initial task processing big language model for the target transaction based on the basic big language model; Acquire a reference task processing example and a sample task for the target transaction, wherein the task type of the sample task includes an extended task type other than the reference task type; Based on the preset code generation prompt word structure and the basic operation calling function tool, sample task code generation prompt words for reference task processing examples and sample tasks are generated. The initial task processing large language model includes a demonstration coding module, a code generation module, a UI mapping module, and a behavior cloning fusion module. Perform at least one round of model training on the initial task processing large language model based on the sample task code generation prompt word, the reference task processing example, and the basic operation calling function tool; During the model training process: the demonstration coding module performs task demonstration coding training based on the reference task processing example to obtain a structured sequence of task demonstration operations, wherein the task demonstration coding includes constructing the user demonstration coding in the reference task processing example into a structured sequence that can be processed by a large language model; and the code generation module performs task execution code generation training based on the task demonstration operation structured sequence using the basic operation calling function tool to obtain a reference task behavior RPA code including all reference operation RPA code snippets, wherein the reference operation RPA code snippet is an executable RPA code snippet corresponding to the reference operation, the reference operation is a demonstration task action in the task demonstration operation structured sequence, and the reference task behavior RPA code includes all reference operation RPA code snippets corresponding to the reference operations; And, the UI mapping module performs application UI element mapping training processing on the target transaction based on the reference operation RPA code snippet to obtain target transaction UI operation mapping information; And, the reference task behavior RPA code is cloned by the behavior cloning and fusion module to obtain a reference task behavior representation, behavior knowledge fusion is performed based on all task behavior representations to obtain a task interaction behavior knowledge model, task operation generation processing is performed on the sample task by the task interaction behavior knowledge model to obtain a sample task execution step sequence, and task code generation processing is performed based on the sample task execution step sequence using the basic operation calling function tool to obtain a predicted sample RPA code, wherein the task behavior representation includes the reference task behavior representation, or the task behavior representation includes the reference task behavior representation and the sample task behavior representation corresponding to the predicted sample RPA code; Determine the predicted sample RPA code obtained after the initial task processing large language model performs task execution code generation processing on the sample task, and adjust model parameters of the initial task processing large language model based on the predicted sample RPA code until the initial task processing large language model completes model training to obtain the task processing large language model.
2. According to the method of claim 1, the step of performing task demonstration coding training processing based on the reference task processing example by the demonstration coding module to obtain a structured sequence of task demonstration operations comprises: Determine, by means of the demonstration coding module, a reference task action sequence in the reference task processing example and a demonstration action behavior representation corresponding to the reference task action, wherein the demonstration action behavior representation includes an action type representation, an action interaction representation, and a transaction interface UI metadata representation; Based on the reference task action sequence and the demonstration action behavior representation, feature structuring processing is performed to obtain a task demonstration operation structured sequence including demonstration task action coding, and the coding tuple corresponding to the demonstration task action coding includes action type coding, associated text coding, interactive element identification coding, visual feature coding and application display text list coding.
3. According to the method of claim 2, the code generation module uses the basic operation calling function tool to perform task execution code generation training based on the task demonstration operation structured sequence to obtain a reference task behavior RPA code including all reference operation RPA code fragments, including: Based on the structured sequence of task demonstration operations, the basic operation calling function tool is used to perform task step execution code conversion to obtain reference operation RPA code snippets corresponding to all reference operations, and a reference execution step explanation is generated for the reference operation RPA code snippets; A reference task behavior RPA code is generated based on all the reference operation RPA code snippets and the reference execution step interpretations.
4. According to the method of claim 1, the step of adjusting the model parameters of the initial task processing large language model based on the predicted sample RPA code comprises: Get sample RPA code tags for sample tasks; A target model loss is determined based on the predicted sample RPA code and the sample RPA code label, and the target model loss is used to adjust model parameters of the initial task processing large language model.
5. The method according to claim 1, wherein the generating of sample task code generation prompt words for reference task processing examples and sample tasks based on a preset code generation prompt word structure and a basic operation calling function tool comprises: Generate prompt word structure and basic operation call function tool based on preset code, determine role prompt word, task processing skill prompt word, constraint condition prompt word, tool description prompt word and reference task operation information prompt word; Based on the role prompt words, task processing skill prompt words, constraint condition prompt words, tool description prompt words and reference task operation information prompt words, sample task code generation prompt words are generated for reference task processing examples and sample tasks.
6. A method for autonomous task processing, the method comprising: Obtaining the target task for the target transaction input by the user to the agent service object; Based on the target task, a task execution code generation process is performed using a task processing large language model to obtain a target RPA code, wherein the task processing large language model is obtained by using the method steps described in any one of claims 1 to 5; Control the intelligent agent service object to execute the target RPA code on the target transaction to perform autonomous processing on the target task.
7. According to the method of claim 6, the step of generating a task execution code based on the target task using a task processing large language model to obtain a target RPA code comprises: Generate task code generation prompt words for target tasks; Inputting the task code generation prompt word into the task processing large language model, performing task operation sequence generation processing on the target task through the task processing large language model to obtain a target task execution step sequence, and performing task code generation processing based on the target task execution step sequence using a basic operation calling function tool to obtain a target RPA code; The task processing large language model is controlled to output the target RPA code.
8. The method according to claim 7, wherein the step of performing task operation sequence generation processing on the target task to obtain a target task execution step sequence, and performing task code generation processing using a basic operation calling function tool based on the target task execution step sequence to obtain a target RPA code, comprises: Performing task operation generation processing on the target task to obtain a target task execution step sequence, and determining execution step explanation information corresponding to the task execution step sequence; Determine the target task operation sequence calling function corresponding to the target task execution step sequence by using the basic operation calling function tool; Based on the target task execution step sequence, the execution step explanation information and the target task operation sequence, a function is called to perform task code generation processing to obtain a target RPA code.
9. A task processing large language model training device, the device comprising: A model creation module, used to create an initial task processing big language model for a target transaction based on the basic big language model; A data acquisition module, used to acquire a reference task processing example and a sample task for the target transaction, wherein the task type of the sample task includes an extended task type other than the reference task type; A model training module, used for performing model training on the initial task processing large language model based on the reference task processing example and the sample task to obtain a task processing large language model after model training; The performing model training on the initial task processing large language model based on the reference task processing example and the sample task to obtain the task processing large language model after model training includes: Based on the preset code generation prompt word structure and the basic operation calling function tool, sample task code generation prompt words for reference task processing examples and sample tasks are generated. The initial task processing large language model includes a demonstration coding module, a code generation module, a UI mapping module, and a behavior cloning fusion module. Perform at least one round of model training on the initial task processing large language model based on the sample task code generation prompt word, the reference task processing example, and the basic operation calling function tool; During the model training process: the demonstration coding module performs task demonstration coding training based on the reference task processing example to obtain a structured sequence of task demonstration operations, wherein the task demonstration coding includes encoding the user demonstration in the reference task processing example into a structured sequence that can be processed by a large language model; and the code generation module performs task execution code generation training based on the task demonstration operation structured sequence using the basic operation calling function tool to obtain a reference task behavior RPA code including all reference operation RPA code snippets, wherein the reference operation RPA code snippet is an executable RPA code snippet corresponding to the reference operation, the reference operation is a reference task action corresponding to the reference task in the task demonstration operation structured sequence, and the reference task behavior RPA code includes all reference operation RPA code snippets corresponding to the reference operations; and, The target transaction UI operation mapping information is obtained by performing application UI element mapping training processing on the target transaction based on the reference operation RPA code snippet through the UI mapping module; and, the reference task behavior RPA code is cloned by the behavior cloning and fusion module to obtain a reference task behavior representation, and a task interaction behavior knowledge model is obtained based on all task behavior representations. The sample task is subjected to task operation generation processing through the task interaction behavior knowledge model to obtain a sample task execution step sequence, and the basic operation calling function tool is used to perform task code generation processing based on the sample task execution step sequence to obtain a predicted sample RPA code, wherein the task behavior representation includes a reference task behavior representation, or the task behavior representation includes a reference task behavior representation and a sample task behavior representation corresponding to the predicted sample RPA code; Determine the predicted sample RPA code obtained after the initial task processing large language model performs task execution code generation processing on the sample task, and adjust model parameters of the initial task processing large language model based on the predicted sample RPA code until the initial task processing large language model completes model training to obtain the task processing large language model.
10. A task autonomous processing device, the device comprising: A task acquisition module is used to acquire the target task for the target transaction input by the user to the intelligent agent service object; A code generation module, configured to generate task execution code based on the target task using a task processing large language model to obtain a target RPA code, wherein the task processing large language model is obtained using the method steps described in any one of claims 1 to 5; The task processing module is used to control the intelligent agent service object to execute the target RPA code on the target transaction so as to perform autonomous processing on the target task.
11. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method steps of any one of claims 1 to 5 or 6 to 8.
12. A computer program product, the computer program product storing at least one instruction, wherein the at least one instruction is loaded by a processor and executes the method steps according to any one of claims 1 to 5 or 6 to 8.
13. An electronic device comprising: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 5 or 6 to 8.
Citation Information
Patent Citations
Task execution method, device, system and equipment and storage medium
CN117112082A
Robot process automation method and device, all-in-one machine and storage medium
CN117371950A
Design method of RPA intelligent interactive system based on AIGC
CN117421414A
