Intelligent agent method, device and system

Through the resolution of the requirements of intelligent agent tasks and dynamic location extraction, the accuracy problem of intelligent agents when positioning the bottom of the web page or occluding elements is solved, and the accurate execution of the web page is achieved under the changes in the web page is improved, and the stability of automated tasks is improved.

CN118426874BActive Publication Date: 2024-10-25IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410885888.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-10-25
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

Intelligent agents based on large language models have poor accuracy when positioning the bottom of a web page or occluding elements, and cannot guarantee the accurate execution of automated tasks.

Method used

By parsing the requirements and splitting the historical task trajectory of the proxy tasks sent by the client, a subtask action sequence is generated, and the current position of page elements in the web page is dynamically extracted, and the hash code and element library are used to ensure accurate positioning and execution of actions.

Benefits of technology

It realizes accurate positioning and execution of intelligent agents when web page changes and elements are at the bottom or are obscured, improving the accuracy and stability of automation tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118426874B_ABST
    Figure CN118426874B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and provides an intelligent proxy method, device and system, the method comprising: performing demand analysis on a proxy task sent by a client to obtain a demand analysis result; splitting the proxy task into multiple subtasks based on the demand analysis result and the historical task track; performing action planning on each subtask based on the expected result of each subtask and the historical task action track to generate an action sequence for each subtask; the action sequence of each subtask is used to describe the execution action of a page element in each subtask; extracting the current position of the page element in each subtask in a web page, and executing the execution action corresponding to each page element at the current position of each page element. The present invention can realize automatic and accurate task planning for different proxy tasks to obtain multiple subtasks, and perform action planning on multiple subtasks to generate corresponding action sequences, and accurately locate the corresponding page elements, thereby ensuring the accuracy of the intelligent proxy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an intelligent agent method, device and system. Background Art

[0002] Web automation refers to the use of software tools or programming techniques to simulate and execute user operations on web pages to achieve automated testing, data extraction, task execution and other functions.

[0003] Currently, web automation is mostly achieved by intelligent agents based on large language models. However, they use visual algorithms to understand web page content and locate page elements. It is difficult to locate bottom elements or partially obscured elements, and thus the accuracy of the intelligent agents cannot be guaranteed. Summary of the invention

[0004] The present invention provides an intelligent agent method, device and system to solve the defects in the prior art.

[0005] The present invention provides an intelligent agent method, comprising the following steps.

[0006] Perform demand analysis on the proxy task sent by the client and obtain the demand analysis result;

[0007] Based on the demand analysis result and the historical task track, split the proxy task into multiple subtasks;

[0008] Based on the expected results of each subtask and the historical task action trajectory, action planning is performed for each subtask to generate an action sequence for each subtask; the action sequence of each subtask is used to describe the execution actions of the page elements in each subtask;

[0009] The current position of the page element in each subtask in the web page is extracted, and the execution action corresponding to each page element is executed at the current position of each page element.

[0010] According to an intelligent proxy method provided by the present invention, the step of extracting the current position of the page element in each subtask in the web page includes:

[0011] Get the current hash code of the web page;

[0012] In the case where the current hash code is inconsistent with the historical hash code of the web page, the current position of the page element in each subtask in the web page is extracted based on the source code of the web page, or the current position of the page element in each subtask in the web page is extracted from an element library, wherein the element library stores position information of different page elements in the web page;

[0013] When the current hash code is consistent with the historical hash code of the web page, the historical position of the page element in each subtask in the web page is used as the current position.

[0014] An intelligent agent method provided by the present invention also includes:

[0015] In the process of executing the execution actions corresponding to the page elements at the current positions of the page elements, the progress of the execution actions is monitored, and when there is an abnormality in the execution result of any execution action, the execution action is adjusted.

[0016] According to an intelligent proxy method provided by the present invention, the adjusting any one of the execution actions further comprises:

[0017] When an abnormality exists in the execution result of any of the adjusted execution actions, the cause of the abnormality is analyzed, and based on the abnormality analysis result, the execution sequence of the subtask corresponding to the any of the execution actions is updated or the execution of the subtask corresponding to the any of the execution actions is stopped.

[0018] An intelligent agent method provided by the present invention also includes:

[0019] When the execution sequence of any subtask is completed or executed abnormally, analyzing whether the execution of any subtask is successful;

[0020] If any of the subtasks is successfully executed, analyzing whether the execution sequence of the next subtask can be executed;

[0021] In the case that any of the subtasks fails to execute, the failure cause is analyzed, and the execution sequence of any of the subtasks is updated based on the failure analysis result.

[0022] According to an intelligent agent method provided by the present invention, the analyzing whether any of the subtasks is successfully executed further includes:

[0023] The task tracks and task action tracks corresponding to the successfully executed subtasks are stored.

[0024] According to an intelligent agent method provided by the present invention, after obtaining the demand analysis result, the method further includes:

[0025] In the case where the requirements in the requirements parsing result are incomplete, the execution of the proxy task is terminated and a prompt message is sent to the client, so that the client returns the complete requirements.

[0026] The present invention also provides an intelligent agent device, comprising the following modules.

[0027] The control reflection agent module is used to perform demand analysis on the agent task sent by the client and obtain the demand analysis result;

[0028] A task planning agent module is used to split the agent task into multiple subtasks based on the demand analysis results and historical task trajectories;

[0029] The action planning agent module is used to plan the actions of each subtask based on the expected results of each subtask and the historical task action trajectory, and generate the action sequence of each subtask; the action sequence of each subtask is used to describe the execution actions of the page elements in each subtask;

[0030] The action execution proxy module is used to extract the current position of the page elements in each subtask in the web page, and execute the execution action corresponding to each page element at the current position of each page element.

[0031] The present invention also provides an intelligent agent system, comprising the intelligent agent device as described above, a memory module, an action module and a plug-in module;

[0032] The memory module is used to store the historical task trajectory and the historical task action trajectory, the action module is used to store tools for executing corresponding actions of each page element, and the plug-in module is used to send the path information of each page element under the web page to the intelligent agent device, so that the intelligent agent device can extract the current position of each page element in the web page.

[0033] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the intelligent agent method described above is implemented.

[0034] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the intelligent agent methods described above.

[0035] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the intelligent agent method described above is implemented.

[0036] The intelligent proxy method, device and system provided by the present invention automatically split the proxy task into multiple subtasks based on the demand analysis results of the proxy task and the historical task trajectory, so that the action sequence of each subtask can be automatically and accurately generated based on the expected results of each subtask and the historical task action trajectory, that is, it is possible to automatically and accurately perform task planning for different proxy tasks to obtain multiple subtasks, and perform action planning for multiple subtasks to generate corresponding action sequences. In addition, the embodiment of the present invention can accurately locate the corresponding page element even when the web page changes, the page element is at the bottom of the web page, or the page element is covered by dynamically extracting the current position of the page element in each subtask, and then accurately execute the execution action corresponding to each page element at the current position of each page element, thereby ensuring the accuracy of the intelligent proxy. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 It is a flow chart of the intelligent agent method provided by the present invention.

[0039] Figure 2 It is a flowchart of the implementation of step 140 in the intelligent agent method provided by the present invention.

[0040] Figure 3 It is a structural diagram of the intelligent agent device provided by the present invention.

[0041] Figure 4 It is a structural diagram of the intelligent agent system provided by the present invention.

[0042] Figure 5 It is a flow chart of the intelligent agent method based on the intelligent agent system provided by the present invention.

[0043] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] Currently, web automation is mostly achieved by intelligent agents based on large language models. However, they use visual algorithms to understand web page content and locate page elements. It is difficult to locate bottom elements or partially obscured elements. Multiple sliding, hovering, screenshots, and recognition operations are required to locate the corresponding elements, and the accuracy of the intelligent agents cannot be guaranteed.

[0046] For example, when page A of a shopping website is updated, the original refund operation is on the My Order page. After the update, the My Order function item is merged into the My Shopping function item. At this time, you need to hover the mouse over the My Shopping function item to find the My Order function item. The action sequence originally generated at one time requires clicking the My Order function item first. If a visual algorithm is used, it cannot locate or misjudges the obscured item.

[0047] In addition, there are also web automation based on Robotic Process Automation (RPA), which manually designs the operation process, but it requires users to have domain business knowledge. For example, the refund process of online shopping is different on different e-commerce platforms, so different RPA processes need to be built. In addition, the anti-interference ability is poor. For example, a pop-up security verification pops up suddenly during the execution of an automated process for processing online bank transactions. The current fixed RPA process may not be able to handle such unexpected situations, resulting in the failure of the entire process.

[0048] Figure 1 It is a flow chart of the intelligent agent method provided by the present invention, such as Figure 1 As shown, the method includes step 110 , step 120 , step 130 and step 140 .

[0049] Step 110: parse the requirements of the proxy task sent by the client to obtain the requirements parsing result.

[0050] Here, the proxy task can be understood as a web automation task that the user needs to perform. The proxy task can be a task requirement description entered by the user on the client. For example, the user can enter "go to shopping website A to search for baseball caps" on the client.

[0051] When conducting a demand analysis on an agent task, the specific requirements and goals of the agent task can be clarified. The results of the demand analysis can include the task description (such as the overall goal and expected results of the task), the target website (such as the website or webpage that needs to be accessed and operated), the task requirements (such as the frequency and time requirements for task execution, other specific requirements or restrictions, etc.), etc.

[0052] Step 120: Based on the demand analysis result and the historical task track, the proxy task is split into multiple subtasks.

[0053] Specifically, the historical task track is used to describe the task flow of the historical task, which can be understood as the historical task track is used to describe the multiple subtasks corresponding to the historical task. For example, the task flow corresponding to the historical task "Help me return the latest order on shopping website A" is "Enter the My Orders page of shopping website A - Select the latest order return".

[0054] Optionally, the historical task trajectory here can be the task flow of historical tasks similar to the proxy task, that is, using the historical task trajectory as a reference and combining the requirements analysis results, the proxy task is split into multiple subtasks, and the execution order of each subtask is determined according to the logical relationship and dependency of each subtask.

[0055] Step 130: Based on the expected results of each subtask and the historical task action trajectory, action planning is performed for each subtask to generate an action sequence for each subtask; the action sequence of each subtask is used to describe the execution action of the page element in each subtask.

[0056] Specifically, the expected result of each subtask can be understood as the expected output after the execution of each subtask, such as successful login to the website, successful cancellation of the order, etc. The historical task action trajectory is used to describe the action sequence of the historical task, which can be understood as a specific description of the execution action corresponding to the task.

[0057] Optionally, the historical task action trajectory here can be an action sequence of a historical task similar to the proxy task, that is, taking the historical task action trajectory as a reference, combined with the expected results of each subtask, action planning is performed for each subtask to generate an action sequence for each subtask. Among them, when referring to the historical task action trajectory, if an action has a higher success rate in the historical task, then the action is preferentially selected as the action in the action sequence. The action sequence of each subtask is used to describe the execution actions of the page elements in each subtask. The page elements here can be understood as interactive elements of the web page, such as text libraries, buttons, links, drop-down menus, pictures, tables, scroll bars, pop-up boxes, etc.

[0058] For example, the current subtask is "enter my order page of shopping website A", and the corresponding action sequence can be "1. Input-browser-www.xx.com; 2. Input-webpage-account; 3. Input-webpage-password; 4. Click-webpage-login; 5. Click-webpage-my order".

[0059] Step 140: extract the current position of the page element in each subtask in the web page, and execute the execution action corresponding to each page element at the current position of each page element.

[0060] Specifically, the current position of a page element in a web page usually refers to the specific position of the page element in the web page window. The embodiment of the present invention dynamically extracts the current position of the page element in each subtask in the web page, and can accurately locate the corresponding page element when the web page changes, the page element is located at the bottom of the web page, or the page element is covered, and can then accurately execute the execution action corresponding to each page element at the current position of each page element, thereby ensuring the accuracy of the intelligent agent. Among them, when executing the execution action corresponding to each page element, the corresponding plug-in module interface can be called to control the cursor movement to complete the corresponding execution action.

[0061] The intelligent proxy method provided by the embodiment of the present invention automatically splits the proxy task into multiple subtasks based on the demand analysis results of the proxy task and the historical task trajectory, so that the action sequence of each subtask can be automatically and accurately generated based on the expected results of each subtask and the historical task action trajectory, that is, it can realize automatic and accurate task planning for different proxy tasks to obtain multiple subtasks, and perform action planning for multiple subtasks to generate corresponding action sequences. In addition, the embodiment of the present invention can accurately locate the corresponding page element even when the web page changes, the page element is at the bottom of the web page, or the page element is covered by dynamically extracting the current position of the page element in each subtask. Then, it can accurately execute the execution action corresponding to each page element at the current position of each page element, thereby ensuring the accuracy of the intelligent proxy.

[0062] As an optional embodiment, the above steps 110 to 140 can be implemented by an intelligent proxy model, which can be constructed based on pre-trained models such as BERT model (Bidirectional Encoder Representations from Transformers), XLNet model (extreme Multi-label Learning Network), ROBERTa model (Robustly Optimized BERT approach), T5 model (Text-to-Text Transfer Transformer). Here, the intelligent proxy model can also be a large-scale model deployed in a chat robot with human-like characteristics, for example, the IFlytek Spark model. The chat robot deployed with this code model can communicate with users by understanding and learning human language, and can also interact with users according to the context of the conversation. It has real human-like communication capabilities. In addition, it also has human capabilities, such as editing, translation, and search.

[0063] Optionally, the intelligent agent model can be trained based on the following steps:

[0064] The LLAMA-V3 large language model is used to fine-tune the constructed "requirement-task" corpus, "task-action" corpus, and "action-tool" corpus to enable it to have the capabilities of requirement analysis, task planning, action planning, and tool calling. It is then fine-tuned on the "task / action reflection" corpus to enable it to have the ability to reflect on tasks and actions after execution. WEBGLM is then used to fine-tune on the constructed "web page-page element" dataset to enable it to have the ability to understand web pages and locate page elements.

[0065] For example, in the "demand-task" corpus, the demand is "publish a blog post praising summer on Weibo", and the corresponding tasks are: 1. Enter the Weibo website; 2. Log in to the Weibo account; 3. Add a new blog post praising summer.

[0066] In the "task-action" corpus, the task is "log in to Weibo account", and the corresponding actions are 1. Input-mobile number input box-empty; 2. Interaction-mobile number input box-empty; 3. Input-mobile number input box-123; 4. Input-password input box-abc; 5. Click-login button-empty.

[0067] In the “action-tool” corpus, the action is “click-login button-empty”, the corresponding tool function is click, and the parameter is the login button.

[0068] In the "Task / Action-Reflection" corpus, after executing the action "Interaction-Mobile Number Input Box-Empty" in the task "Login to Weibo Account", the tool returns "Mobile number and other personal information have been entered", then the action reflection is "The current action is executed successfully, the task is not completed, and the next action is continued"; if the tool returns "No information is supplemented", then the action reflection is "The current action failed to execute, the task is not completed, and the current task action sequence is terminated", and the corresponding task reflection is "Lack of necessary information, unable to meet the requirements, the task stops".

[0069] The input of the sample corresponding to the "Webpage-Page Elements" corpus is the HTML webpage and the webpage target input box, and the corresponding output target location is the absolute xpath path of the input box.

[0070] Based on the above embodiments, Figure 2 is a flow chart of an implementation of step 140 in the intelligent agent method provided by the present invention, such as Figure 2 As shown, step 140 extracts the current position of the page element in each subtask in the web page, including step 141 and step 142.

[0071] Step 141: Get the current hash code of the web page.

[0072] Step 142: When the current hash code is inconsistent with the historical hash code of the web page, the current position of the page element in each subtask in the web page is extracted based on the source code of the web page, or the current position of the page element in each subtask in the web page is extracted from the element library, which stores the position information of different page elements in the web page; when the current hash code is consistent with the historical hash code of the web page, the historical position of the page element in each subtask in the web page is used as the current position.

[0073] Specifically, the current hash code of a webpage is a unique identifier obtained by performing a hash calculation on the current content of the webpage, wherein the hash code represents the overall state of the webpage content, and the hash code can be used to quickly determine whether the webpage content has changed.

[0074] If the current hash code is inconsistent with the historical hash code, it indicates that the current content of the webpage has changed, that is, the webpage has been updated, and the current position of each page element in the webpage may also have changed. In this regard, the embodiment of the present invention extracts the current position of each page element in the webpage based on the source code of the webpage, such as cleaning the source code of the webpage, obtaining the xpath of the page element based on the cleaned source code, and determining the current position of each page element in the webpage based on the xpath.

[0075] Optionally, if the current position of the page element in the web page cannot be extracted from the web page source code (such as extraction failure), the current position of the page element in the web page can be obtained by searching in the element library.

[0076] If the current hash code is consistent with the historical hash code of the web page, it means that the current content of the web page has not changed, and thus the current position of each page element in the web page has not changed. Therefore, the historical position of the page element in each subtask in the web page can be used as the current position.

[0077] Based on any of the above embodiments, it also includes:

[0078] In the process of executing the execution actions corresponding to the page elements at the current positions of the page elements, the progress of the execution actions is monitored, and when there is an abnormality in the execution result of any execution action, any execution action is adjusted.

[0079] Specifically, during the process of executing the execution actions corresponding to each page element at the current position of each page element, the progress of each execution action is monitored, including tracking whether the execution actions are performed as required and detecting any possible problems or anomalies.

[0080] In the event that an execution result of any execution action is abnormal, such as any execution action does not achieve the expected result, the corresponding execution action needs to be adjusted.

[0081] Based on any of the above embodiments, any execution action is adjusted, and then further includes:

[0082] When an abnormality exists in the execution result of any of the adjusted execution actions, the cause of the abnormality is analyzed, and based on the abnormality analysis result, the execution sequence of the subtask corresponding to any of the execution actions is updated or the execution of the subtask corresponding to any of the execution actions is stopped.

[0083] Specifically, after adjusting any execution action, execute any execution action after the adjustment. If there is still an exception in the execution result, such as the exception still occurs after multiple adjustments, return the execution failure mark, and after analyzing the cause of the exception, regenerate the action plan based on the exception analysis result (that is, update the execution sequence of the subtask corresponding to any execution action), or stop executing the subtask corresponding to any execution action.

[0084] Based on any of the above embodiments, it also includes:

[0085] When the execution sequence of any subtask ends or the execution is abnormal, analyze whether any subtask is executed successfully;

[0086] When any subtask is successfully executed, analyze whether the execution sequence of the next subtask can be executed;

[0087] In the event that any subtask fails to execute, the failure cause is analyzed, and the execution sequence of any subtask is updated based on the failure analysis result.

[0088] Specifically, the completion of the execution sequence of any subtask can be understood as the completion of all execution actions in the execution sequence of any subtask. If the execution sequence of any subtask is completed or executed abnormally, it is necessary to monitor the progress and execution results of any subtask, analyze whether any subtask is executed successfully, and if so, determine whether the execution sequence of the next subtask can be carried out.

[0089] If any subtask fails to execute, analyze the reason for the failure, determine whether the user needs to provide additional information, and re-plan the action based on the failure analysis results (that is, update the execution sequence of any subtask).

[0090] Based on any of the above embodiments, analyzing whether any subtask is successfully executed, and then further comprising:

[0091] The task tracks and task action tracks corresponding to the successfully executed subtasks are stored. A relational database (such as MySQL, PostgreSQL) or a non-relational database (such as MongoDB) can be used to store the task tracks and task action tracks.

[0092] Based on any of the above embodiments, after obtaining the demand analysis result, the method further includes:

[0093] In the case that the requirements in the requirements parsing result are incomplete, the execution of the proxy task is terminated and a prompt message is sent to the client so that the client returns the complete requirements.

[0094] Specifically, after obtaining the demand analysis result, if the demand in the demand analysis result is incomplete, such as unclear, incomplete or lacking necessary information, in order to avoid errors and waste of resources, the proxy task is terminated. At the same time, a prompt message is sent to the client to enable the user to supplement the necessary information, and the complete demand is returned from the client, so that the proxy task can be correctly executed.

[0095] The intelligent agent device provided by the present invention is described below. The intelligent agent device described below and the intelligent agent method described above can be referenced to each other.

[0096] Based on any of the above embodiments, Figure 3 is a schematic diagram of the structure of the intelligent agent device provided by the present invention, such as Figure 3 As shown, the device includes a control reflection agent module 310 , a task planning agent module 320 , an action planning agent module 330 and an action execution agent module 340 .

[0097] The control reflection agent module 310 is used to perform demand analysis on the agent task sent by the client to obtain the demand analysis result;

[0098] The task planning agent module 320 is used to split the agent task into multiple subtasks based on the demand analysis results and historical task trajectories;

[0099] The action planning agent module 330 is used to perform action planning for each subtask based on the expected results of each subtask and the historical task action trajectory, and generate an action sequence for each subtask; the action sequence of each subtask is used to describe the execution action of the page element in each subtask;

[0100] The action execution proxy module 340 is used to extract the current position of the page elements in each subtask in the web page, and execute the execution action corresponding to each page element at the current position of each page element.

[0101] Based on any of the above embodiments, extracting the current position of the page element in each subtask in the webpage includes:

[0102] Get the current hash code of the web page;

[0103] When the current hash code is inconsistent with the historical hash code of the web page, the current position of the page element in each subtask in the web page is extracted based on the source code of the web page, or the current position of the page element in each subtask in the web page is extracted from the element library, which stores the position information of different page elements in the web page;

[0104] When the current hash code is consistent with the historical hash code of the web page, the historical position of the page element in each subtask in the web page is used as the current position.

[0105] Based on any of the above embodiments, it also includes:

[0106] In the process of executing the execution actions corresponding to the respective page elements at the current positions of the respective page elements, the progress of the respective execution actions is monitored, and in the event that the execution result of any execution action is abnormal, any execution action is adjusted.

[0107] Based on any of the above embodiments, any execution action is adjusted, and then further includes:

[0108] When an abnormality exists in the execution result of any of the adjusted execution actions, the cause of the abnormality is analyzed, and based on the abnormality analysis result, the execution sequence of the subtask corresponding to any of the execution actions is updated or the execution of the subtask corresponding to any of the execution actions is stopped.

[0109] Based on any of the above embodiments, it also includes:

[0110] When the execution sequence of any subtask ends or the execution is abnormal, analyze whether any subtask is executed successfully;

[0111] When any subtask is successfully executed, analyze whether the execution sequence of the next subtask can be executed;

[0112] In the event that any subtask fails to execute, the failure cause is analyzed, and the execution sequence of any subtask is updated based on the failure analysis result.

[0113] Based on any of the above embodiments, analyzing whether any subtask is successfully executed, and then further comprising:

[0114] The task tracks and task action tracks corresponding to the successfully executed subtasks are stored.

[0115] Based on any of the above embodiments, after obtaining the demand analysis result, the method further includes:

[0116] In the case that the requirements in the requirements parsing result are incomplete, the execution of the proxy task is terminated and a prompt message is sent to the client so that the client returns the complete requirements.

[0117] Based on any of the above embodiments, Figure 4 It is a structural diagram of the intelligent agent system provided by the present invention. Figure 4 As shown, the system includes the intelligent agent device, memory module, action module and plug-in module as described in any of the above embodiments, which cooperate with each other to jointly realize the automated agent function of the system.

[0118] The memory module is used to store historical task trajectories and historical task action trajectories. The action module is used to store tools for executing corresponding actions for each page element. The plug-in module is used to send the path information of each page element under the web page to the intelligent agent device so that the intelligent agent device can extract the current position of each page element in the web page.

[0119] Among them, the intelligent agent device acts as the core engine of the entire system, responsible for receiving agent tasks from users, and then scheduling other modules to perform corresponding operations. The intelligent agent device realizes intelligent perception and processing of user needs through collaboration with other modules. All agent roles of the intelligent agent device can be generated based on the intelligent agent model. Through real-time planning and user interaction capabilities, new business knowledge can be learned instantly by following instructions, so as to respond to various business changes more flexibly. Specifically, the intelligent agent device contains four agent roles, namely control reflection agent, task planning agent, action planning agent and action execution agent. The control reflection agent is responsible for the progress control of all tasks and action execution, and determines whether the task and action execution need to be adjusted or terminated. The role of the task planning agent is to refer to the latest business knowledge (such as historical task trajectory), disassemble multiple subtasks, and analyze the reasons for disassembling each subtask. The role of the action planning agent is to refer to the latest business execution knowledge (such as historical task action trajectory), gradually generate the actions to be executed according to the task, and give a specific description of each action, including the action name, the element input required for the action, and the reasons for selecting these actions and inputs and the expected results of the action. The action execution agent calls the appropriate tool from the action module to complete the operation according to the required action, and provides the reason for selecting the action, the expected result, and the actual result. For example, it obtains the latest business information by searching the knowledge base or interacting with the user in natural language, avoiding the need to continuously train and update the business knowledge learned by the model.

[0120] The plug-in module extends the browser's functionality, enabling it to communicate with the intelligent agent device and receive instructions from the intelligent agent device. Through the plug-in module, the system can achieve real-time monitoring and interaction with web pages. For example, the intelligent agent device can obtain the current HTML page source code through the plug-in module, and can complete click and input operations by passing the xpath path of the page element to the plug-in module.

[0121] The action module is responsible for executing specific operations issued by the intelligent agent device, such as clicking, inputting, scrolling, etc., to complete various tasks. For example, if the "click-shopping website A" action is received, the "perception-shopping website A" action will be triggered first, the interface of the plug-in module will be called, the HTML source code of the current page will be obtained, and after cleaning, it will be input into the intelligent agent model to obtain the xpath of the page element "shopping website A", and then the interface of the plug-in module will be called to control the mouse movement to complete the click.

[0122] The memory module acts as the system's memory and learning center, used to store and manage the information and experience accumulated by the system during operation. The memory module can help the system better understand the user's intentions and improve the system's intelligence level. The memory module mainly contains three knowledge bases, namely the element library, the task track library, and the action track library. The element library mainly stores the information of the page elements that have been operated, such as the name of the page element, the URL of the page where the page element is located, the hash code of the page where the page element is located after cleaning, and the information insertion time. The hash code is used to determine whether the page has changed. The task track library contains all successfully executed requirements-task tracks, such as the requirements described by the user, the task flow of execution, and the information insertion time. For example, the task flow corresponding to the requirement "Help me return the latest order on shopping website A" should be "1. Enter the my order page of shopping website A; 2. Select the latest order return". The action trajectory library contains all successfully executed task-action trajectories, the requirements described by EU users, the currently executed tasks, the action sequences corresponding to the tasks, and the time when the information is inserted. For example, the requirement is "Help me return the latest order on shopping website A", and the currently executed task is "Enter the my order page of shopping website A". The corresponding action sequence may be "1. Input-browser-www.jd.com; 2. Input-webpage-account; 3. Input-webpage-password; 4. Click-webpage-login; 5. Click-webpage-my order".

[0123] Figure 5 is a flow chart of an intelligent agent method based on an intelligent agent system provided by the present invention, such as Figure 5 As shown, the method flow is as follows:

[0124] Step 1: The user inputs a requirement description, and the intelligent agent device receives the requirement description input by the user.

[0125] Step 2: The control reflection agent parses the requirement description input by the user and obtains the requirement analysis result. The control reflection agent can instruct the action execution agent to retrieve the historical task trajectory associated with the current requirement from the task trajectory library for sample reference, or block the system execution through the action execution agent to prompt the user to supplement the necessary information and improve the requirement analysis result.

[0126] Step 3: Based on the demand analysis results and historical task trajectories, the task planning agent performs detailed task planning. Task planning may not involve execution details, but will have expectations for the results or outputs produced by each task and give reasons for the expectations.

[0127] Step 4: Based on the expectations of individual tasks and historical task action trajectories, the action planning agent performs detailed action planning and provides a specific description of each action, including the action name, the element input required for the action, the reasons for selecting these actions, the input, and the expected results of the action.

[0128] Step 5: The action execution agent is responsible for executing specific actions, such as calling Python tool scripts, simulating user clicks, inputs, and other behaviors, and interacting with plug-ins to complete operations. In order to solve the problem of dynamic changes in page elements, when a page element needs to be located, the HTML block is first cleaned, and then the page element is retrieved through the intelligent agent language model. In addition, there is also an element library in the system's memory module, and each page element has its corresponding historical information record. When the execution of an action requires the location of a page element, it can be located first through the intelligent agent model. If the location fails, it will choose to search from the element library.

[0129] Step 6: After the action execution agent completes the single-step action, it provides the control reflection agent with the reason for selecting the action, the expected result, and the actual result.

[0130] Step 7: During the execution of the action, the control reflection agent needs to monitor the progress of the action, including tracking whether the action is performed as required and detecting any possible problems or exceptions. When the result of the action execution is not the expected result, it is considered that an exception has occurred and the action needs to be adjusted. If the specified action adjustment still fails after several steps, it is considered that an exception has occurred and the execution failure mark is returned. The control reflection agent needs to analyze the cause of the exception and inform the action planning agent to regenerate the action plan or stop execution.

[0131] Step 8: When the action sequence of a single task is completed or an exception occurs, the control reflection agent needs to monitor the progress and results of the single task, analyze whether the current task is successfully executed, and determine whether the next task can be performed. If the current task fails, analyze the cause of the current task failure and whether the user needs to supplement information, confirm, and re-plan the action.

[0132] Step 9: After the action planning agent determines that the action sequence is completed, it gives the expected and actual results of a single task to the control reflection agent. The control reflection agent monitors the task progress and analyzes whether the current task is successfully executed and whether the next task can be performed. If the current task is not executed as expected, the current task status is analyzed and the task is replanned, or the task is judged to be unreachable and the reason for the judgment is notified to the user. Finally, for the trajectory that is finally successfully executed after multiple rounds of interaction with the user, the control reflection agent adds a new trajectory record through the control action execution agent and revises the trajectory library in the memory module.

[0133] In order to further understand the technical solution of the present invention, the intelligent agent process of the present invention is described below using the agent task (i.e., user demand) of "go to shopping website A to search for baseball caps".

[0134] When receiving the agent task of "Go to shopping website A to search for baseball caps", the control reflection agent triggers the "Retrieval-Task Trajectory Library-Go to shopping website A to search for baseball caps" action, and calls the tool through the action execution agent. If the call result is a retrieval failure, the control reflection agent triggers the "Intervention-Task-Go to shopping website A to search for baseball caps" operation, and calls the tool through the action execution agent, informing the user of the task flow corresponding to the input requirement for task trajectory reference.

[0135] When there are several reference task trajectories (for example, the task trajectory corresponding to the requirement "search for sun hats on shopping website A", 1. enter the homepage of shopping website A; 2. log in to the account of shopping website A; 3. search for sun hats), the control reflection agent informs the task planning agent through messages to generate the initial task flow (for example, 1. enter the homepage of shopping website A; 2. log in to the account of shopping website A; 3. search for Harley hats). Based on the reference trajectory, the task planning agent analyzes the tasks (i.e. subtasks) of each stage corresponding to the requirement and gives the reasons for completing the current task (for example, 1. the product search operation needs to be completed on the webpage of shopping website A with search function; 2. The search of shopping website A requires logging in; 3. The action required by the user is to search, and the target is Harley hats).

[0136] The task planning agent informs the action planning agent through messages to generate the action flow of the current task (for example, Task 1 enters the homepage of shopping website A). The action planning agent first triggers the "retrieval-action trajectory library-enter the homepage of shopping website A" action, and calls the tool through the action execution agent. After obtaining the action trajectory (such as the trajectory "input-browser-www.xx.com"; trajectory "input-browser-www.xxsports.com", etc.), the action planning agent plans to generate the action sequence "input-browser-www.xx.com" and gives the reason "the homepage of shopping website A contains a search function". The prediction result is "successfully open the homepage of shopping website A". The action planning agent informs the action execution agent through messages to execute the "input-browser-www.jd.com" action, and passes the task / action selection reason of the "demand-task-action sequence", the action result prediction and the actual action result through messages to the control reflection agent. The control reflection agent determines whether the current task has been executed based on whether the action has achieved the task goal, or revise the action sequence and execute it again. For example, the control reflection agent receives "requirement: go to shopping website A to search for baseball caps; action sequence: 1. Enter the homepage of shopping website A; 2. Log in to the account of shopping website A; 3. Search for Harley hats; task planning reason: 1. The product search operation can only be completed on the webpage of shopping website A with search function; 2. The search of shopping website A requires login; 3. The action required by the user is to search, and the target is Harley hats; currently completed tasks: none; currently executing tasks: 1. Enter the homepage of shopping website A; currently completed action sequence: none; currently executing action sequence: <input-browser-www.xx.com, expected to open the homepage of shopping website A, open www.xxcom webpage successfully>", the control reflection agent determines that the homepage of shopping website A has been opened, the action sequence of the current task has been completed successfully, and task 1 has been completed successfully. It notifies the action planning agent through a message that the current action has been completed and no new action needs to be generated. It also notifies the task planning agent through a message that task 1 has been completed and no new task needs to be generated. After receiving the message, the task planning agent completes tasks 2 and 3 in a similar way.

[0137] It should be noted that for the input account action in the action sequence generated by Task 2. Login to shopping website A account, the control reflection agent will judge the execution failure based on the specific action information such as <Input-Account input box-None, expected to enter the user's shopping website A account, input content is empty and input is successful>, and the user is required to enter the necessary account information, triggering the "Interaction-Enter the homepage of shopping website A, log in to shopping website A account-Lack of shopping website A account information" action, blocking and waiting for the user to enter the necessary information, and then carrying the updated information, passing a message to the action planning agent to regenerate the action execution.

[0138] Finally, after the user's demand agent task is fully completed, the "Revision-Task Track Library" and "Revision-Action Track Library" actions are triggered to update the task track library and action track library.

[0139] The present invention first understands user needs through an intelligent agent model, splits the way to achieve the needs into several subtasks, and then splits each subtask into a corresponding action sequence. The page elements and their positions in the web page are extracted through the content understanding ability of the intelligent agent model, laying the foundation for the web-side automated behavior corresponding to the action sequence. In addition, the present invention solves the problems that the visual algorithm cannot locate the masked elements, the business update agent system cannot perform process transformation in a timely and effective manner, and the error execution cannot terminate the process in time. It realizes the intelligent process of automatically completing the planning, execution, and adjustment of web-side tasks through multiple rounds of natural language interaction by users.

[0140] Figure 6 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the intelligent proxy method, which includes: performing demand analysis on the proxy task sent by the client to obtain the demand analysis result; splitting the proxy task into multiple subtasks based on the demand analysis result and the historical task track; performing action planning on each subtask based on the expected result of each subtask and the historical task action track to generate the action sequence of each subtask; the action sequence of each subtask is used to describe the execution action of the page element in each subtask; extracting the current position of the page element in each subtask in the web page, and executing the execution action corresponding to each page element at the current position of each page element.

[0141] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0142] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the intelligent proxy method provided by the above-mentioned methods, which includes: performing demand analysis on the proxy task sent by the client to obtain the demand analysis result; based on the demand analysis result and the historical task trajectory, splitting the proxy task into multiple subtasks; based on the expected results of each subtask and the historical task action trajectory, performing action planning for each subtask to generate an action sequence for each subtask; the action sequence of each subtask is used to describe the execution action of the page elements in each subtask; extracting the current position of the page elements in each subtask in the web page, and executing the execution action corresponding to each page element at the current position of each page element.

[0143] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the intelligent proxy method provided by the above-mentioned methods, the method comprising: performing demand analysis on the proxy task sent by the client to obtain a demand analysis result; based on the demand analysis result and the historical task trajectory, splitting the proxy task into multiple subtasks; based on the expected results of each subtask and the historical task action trajectory, performing action planning for each subtask to generate an action sequence for each subtask; the action sequence of each subtask is used to describe the execution action of the page elements in each subtask; extracting the current position of the page elements in each subtask in the web page, and executing the execution action corresponding to each page element at the current position of each page element.

[0144] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An intelligent agent method, characterized in that: include: Perform demand analysis on the proxy task sent by the client and obtain the demand analysis result; Based on the demand analysis result and the historical task track, the proxy task is split into multiple subtasks; the historical task track is used to describe the multiple subtasks corresponding to the historical task, and the historical task track is the task flow of the historical task similar to the proxy task; Based on the expected results of each subtask and the historical task action trajectory, action planning is performed on each subtask to generate an action sequence for each subtask; the action sequence of each subtask is used to describe the execution action of the page element in each subtask; the historical task action trajectory is the action sequence of the historical task similar to the proxy task; Dynamically extract the current position of the page elements in each subtask in the web page, and execute the execution action corresponding to each page element at the current position of each page element; The extracting the current position of the page element in each subtask in the webpage includes: Get the current hash code of the web page; When the current hash code is inconsistent with the historical hash code of the web page, the current position of the page elements in each subtask in the web page is extracted based on the source code of the web page, or the current position of the page elements in each subtask in the web page is extracted from an element library, which stores the position information of different page elements in the web page.

2. The intelligent agent method according to claim 1, characterized in that: The extracting the current position of the page element in each subtask in the webpage includes: When the current hash code is consistent with the historical hash code of the web page, the historical position of the page element in each subtask in the web page is used as the current position.

3. The intelligent agent method according to claim 1, characterized in that: Also includes: In the process of executing the execution actions corresponding to the page elements at the current positions of the page elements, the progress of the execution actions is monitored, and when there is an abnormality in the execution result of any execution action, the execution action is adjusted.

4. The intelligent agent method according to claim 3, characterized in that: The adjusting any of the execution actions further comprises: When an abnormality exists in the execution result of any of the adjusted execution actions, the cause of the abnormality is analyzed, and based on the abnormality analysis result, the execution sequence of the subtask corresponding to the any of the execution actions is updated or the execution of the subtask corresponding to the any of the execution actions is stopped.

5. The intelligent agent method according to any one of claims 1 to 4, characterized in that: Also includes: When the execution sequence of any subtask is completed or executed abnormally, analyzing whether the execution of any subtask is successful; If any of the subtasks is successfully executed, analyzing whether the execution sequence of the next subtask can be executed; In the case that any of the subtasks fails to execute, the failure cause is analyzed, and the execution sequence of any of the subtasks is updated based on the failure analysis result.

6. The intelligent agent method according to claim 5, characterized in that: The analyzing whether any of the subtasks is successfully executed further includes: The task tracks and task action tracks corresponding to the successfully executed subtasks are stored.

7. The intelligent agent method according to any one of claims 1 to 4, characterized in that: After obtaining the demand analysis result, the method further includes: In the case where the requirements in the requirements parsing result are incomplete, the execution of the proxy task is terminated and a prompt message is sent to the client, so that the client returns the complete requirements.

8. An intelligent agent device, characterized in that: include: The control reflection agent module is used to perform demand analysis on the agent task sent by the client and obtain the demand analysis result; A task planning agent module is used to split the agent task into multiple subtasks based on the demand analysis result and the historical task trajectory; the historical task trajectory is used to describe the multiple subtasks corresponding to the historical task, and the historical task trajectory is the task flow of the historical task similar to the agent task; The action planning agent module is used to perform action planning for each subtask based on the expected results of each subtask and the historical task action trajectory, and generate the action sequence of each subtask; the action sequence of each subtask is used to describe the execution action of the page element in each subtask; the historical task action trajectory is the action sequence of the historical task similar to the agent task; The action execution proxy module is used to dynamically extract the current position of the page elements in each subtask in the web page, and execute the execution action corresponding to each page element at the current position of each page element; The extracting the current position of the page element in each subtask in the webpage includes: Get the current hash code of the web page; When the current hash code is inconsistent with the historical hash code of the web page, the current position of the page elements in each subtask in the web page is extracted based on the source code of the web page, or the current position of the page elements in each subtask in the web page is extracted from an element library, which stores the position information of different page elements in the web page.

9. An intelligent agent system, characterized in that: include: The intelligent agent device as claimed in claim 8, a memory module, an action module and a plug-in module; The memory module is used to store the historical task trajectory and the historical task action trajectory, the action module is used to store tools for executing corresponding actions of each page element, and the plug-in module is used to send the path information of each page element under the web page to the intelligent agent device, so that the intelligent agent device can extract the current position of each page element in the web page.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the intelligent agent method as described in any one of claims 1 to 7 is implemented.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the intelligent agent method according to any one of claims 1 to 7 is implemented.